]> git.saurik.com Git - bison.git/blob - ChangeLog
maint: catch missing gnulib macros.
[bison.git] / ChangeLog
1 2012-01-13 Akim Demaille <akim@lrde.epita.fr>
2
3 maint: catch missing gnulib macros.
4 * configure.ac: Add m4_pattern_forbid.
5
6 2012-01-11 Tim Landscheidt <tim@tim-landscheidt.de>
7
8 java: remove used variable.
9 * data/lalr1.java (yyresult): remove, unused.
10
11 2012-01-11 Akim Demaille <demaille@gostai.com>
12
13 scanner: fix typo.
14 * src/scan-skel.l (@`): s/emtpy/empty/.
15 Reported by Tim Landscheidt.
16
17 2012-01-06 Jim Meyering <meyering@redhat.com>
18
19 build: avoid warnings about set-but-not-used variables
20 * lib/bitset_stats.c (bitset_stats_list): Remove declaration
21 and set of unused local, "type".
22 * lib/ebitset.c (ebitset_init): Likewise, for "size".
23 * lib/lbitset.c (lbitset_not): Likewise, for "elt".
24
25 2011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
26
27 tests: add -pedantic for --enable-gcc-warnings.
28 This should help to avoid some portability problems. For example,
29 it would have revealed the empty unions fixed by the last patch
30 * configure.ac (WARN_CFLAGS_TESTS, WARN_CXXFLAGS_TEST): Implement.
31 * tests/synclines.at (AT_TEST_SYNCLINE): Avoid -pedantic warning
32 about an empty translation unit.
33
34 2011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
35
36 tests: fix empty unions.
37 Empty unions are not accepted by the ISO C99 grammar or by at
38 least some versions of Sun Studio. Reported by Wolfgang S. Kechel
39 at
40 <http://lists.gnu.org/archive/html/bug-bison/2011-08/msg00003.html>.
41 * NEWS (2.5.1): Document fix.
42 * THANKS (Wolfgang S. Kechel): Add.
43 * tests/existing.at (GNU Cim Grammar)
44 (GNU pic (Groff 1.18.1) Grammar.): Remove empty %union.
45
46 2011-07-10 Joel E. Denny <joeldenny@joeldenny.org>
47
48 build: avoid YACC typo inherited from Autoconf.
49 The typo shows up in the `configure --help' output. Reported by
50 W.C.A. Wijngaards and Paul Eggert at
51 <http://lists.gnu.org/archive/html/bug-bison/2011-07/msg00000.html>.
52 * README-hacking (Release Procedure): Remind about updating
53 maintainer tools before a release.
54 * THANKS (W.C.A. Wijngaards): Add.
55 * configure.ac (AC_PREREQ): Set to 2.68, which fixes the YACC
56 typo.
57
58 2011-07-10 Joel E. Denny <joeldenny@joeldenny.org>
59
60 build: create xz instead of bzip2 tarballs.
61 Suggested by Jim Meyering at
62 <http://lists.gnu.org/archive/html/bug-bison/2011-06/msg00012.html>.
63 * README-hacking (Release Procedure): Update example.
64 * configure.ac (AM_INIT_AUTOMAKE): Replace dist-bzip2 with
65 dist-xz.
66
67 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
68
69 doc: clean up references to `Locations Overview'.
70 * doc/bison.texinfo (Locations Overview): Rename node to...
71 (Locations): ... this, which is its section name. Update menus to
72 match that and not to use the title `Tracking Locations', which is
73 a different section.
74
75 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
76
77 doc: clean up references to `Tracking Locations'.
78 * doc/bison.texinfo (Locations): Rename node to...
79 (Tracking Locations): ... this, which is its section name, and
80 update all cross references. The trouble is that there is another
81 node about locations. Its section name is `Locations', which was
82 easily confused with the node name of this node. Moreover, its
83 node name is `Locations Overview', which was mistakenly used to
84 label some cross references to this node.
85
86 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
87
88 doc: clean up `Named References' a little.
89 * doc/bison.texinfo (Named References): Rename section to match
90 the node name, and update all cross references. Don't use the
91 acronyms RHS and LHS given that we don't expand them anywhere in
92 the manual. Try to use @samp and @code properly. Mention that
93 named references are experimental as we've already stated in NEWS.
94 (Destructor Decl): Expand the only remaining use of RHS or LHS.
95
96 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
97
98 doc: motivate named references.
99 Suggested by Hans Aberg at
100 <http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
101 * doc/bison.texinfo (Named References): Explain briefly how
102 they're better than the traditional positional references.
103
104 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
105
106 doc: discuss named references after locations.
107 Reported by Hans Aberg at
108 <http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
109 * NEWS (2.5.1): Document.
110 * doc/bison.texinfo (Named References): Because it discusses
111 locations in addition to semantic values, move this subsection out
112 of the section `Defining Language Semantics', where locations have
113 not yet been introduced, to be a new section after the following
114 section, `Tracking Locations'.
115
116 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
117
118 Prepare for the possibility of a 2.5.1 release.
119 * NEWS (2.5.1): New heading.
120
121 2011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
122
123 Version 2.5.
124 * NEWS (2.5): Set date.
125
126 2011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
127
128 Don't use IF_LINT in Bison sources.
129 It creates unnecessary differences between the sources that Bison
130 maintainers build and test (given that maintainers normally
131 configure with --enable-gcc-warnings) and the sources that Bison
132 users build. Instead, use PACIFY_CC, which doesn't. This change
133 fixes compiler warnings reported by Tys Lefering at
134 <http://lists.gnu.org/archive/html/bison-patches/2011-05/msg00004.html>.
135 * configure.ac: Don't AC_DEFINE lint regardless of the configure
136 options. This change affects imported gnulib sources, where
137 IF_LINT still appears and depends on lint.
138 * src/scan-gram.l, src/scan-skel.l: Replace uses of IF_LINT with
139 PACIFY_CC.
140 * src/system.h (IF_LINT): Remove cpp macro.
141 (PACIFY_CC): New cpp macro.
142
143 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
144
145 Fix precedence for end token.
146 Since Bison 2.3b, which restored the ability of precedence
147 directives to assign user token numbers, doing so for user token
148 number 0 has produced an assertion failure.
149 * NEWS (2.5): Document fix.
150 * src/symtab.c (symbol_user_token_number_set): In the case of the
151 end token, don't decrement ntokens if it was never incremented.
152 * tests/regression.at (Token number in precedence declaration):
153 Extend.
154
155 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
156
157 Prepare for 2.5 release.
158 * NEWS (2.5_rc1): Rename back to...
159 (2.5): ... this, and unset date.
160
161 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
162
163 Version 2.5_rc1.
164 * NEWS (2.5): Rename to...
165 (2.5_rc1): ... this, and set date.
166
167 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
168
169 Pacify -DGNULIB_POSIXCHECK.
170 * bootstrap.conf (gnulib_modules): Add all modules suggested by
171 -DGNULIB_POSIXCHECK.
172 * src/files.c (file_name_split)
173 * src/getargs.c (getargs)
174 * src/location.c (boundary_set_from_string)
175 * src/output.c (token_definitions_output, output_skeleton)
176 * src/parse-gram.y (prologue_declaration)
177 * src/scan-gram.l (handle_syncline)
178 * src/symtab.c (symbol_new): Use mbschr and mbsrchr instead of
179 strchr and strrchr. In the cases of command-line options, file
180 names, and thus locations, functionality may be improved. In the
181 case of symbol names, there should be no functional difference as
182 all characters are ASCII, so the intended benefit is just warning
183 suppression.
184
185 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
186
187 * NEWS (2.5): Fix minor typos.
188
189 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
190
191 doc: clean up quotation style in NEWS.
192 * NEWS (2.5): For multi-character tokens in example grammar rules,
193 use "token" not 'token'. In English, use a consistent quotation
194 style; we might as well follow the precedent seen in info pages:
195 `quote' not "quote".
196
197 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
198
199 tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
200 Reported by Jim Meyering at
201 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
202 * tests/actions.at
203 (Default %printer and %destructor for mid-rule values): Define
204 YYLLOC_DEFAULT so that it uses its Rhs argument.
205
206 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
207
208 glr.c: omit yyresolveLocations when locations are disabled.
209 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
210 about yyresolveLocations's local yyrhsloc. When locations are
211 enabled, there's no such warning because YYLLOC_DEFAULT then uses
212 yyrhsloc. Reported by Jim Meyering at
213 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
214 * data/glr.c (yyresolveLocations): Omit definition when locations
215 are disabled.
216 (yyresolveValue): Omit yyresolveLocations invocation when
217 locations are disabled.
218
219 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
220
221 gnulib, autoconf: update.
222 * README-hacking (Updating a submodule): Give advice on how to
223 determine the versions of gnulib and autoconf to which we should
224 update.
225 (Release Procedure): Note that submodules should be updated.
226 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
227 suggested in updated gnulib NEWS.
228 * gnulib: Choose a stable snapshot according to advice in Bison's
229 README-hacking.
230 * po/POTFILES.in (lib/pipe.c): Rename to...
231 (lib/spawn-pipe.c): ... this.
232 * src/output.c: Update to include spawn-pipe.h.
233 * submodules/autoconf: Update to latest for improvement in m4.m4
234 that excludes M4 with buggy strstr. The only other changes to
235 files that we use are copyright updates.
236
237 2011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
238
239 Fix missing updates to GPLv3.
240 Reported by Tys Lefering at
241 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
242 * src/print-xml.c, src/print-xml.h: In these files.
243
244 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
245
246 Add -Wconflicts-sr and -Wconflicts-rr.
247 Thus, conflict reports are now affected by -Werror and -Wnone
248 (unless %expect or %expect-rr is specified). Reported by George
249 Neuner at
250 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
251 * NEWS (2.5): Document.
252 * doc/bison.texinfo (Bison Options): Document.
253 * src/complain.c, src/complain.h (set_warning_issued): Export
254 function.
255 * src/conflicts.c (conflicts_print): Suppress conflict report
256 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
257 conflicts as errors if -Werror.
258 * src/getargs.c (warnings_flag): Initialize with
259 warnings_conflicts_sr and warnings_conflicts_rr as well.
260 (warnings_args, warnings_types): Add entries for
261 warnings_conflicts_sr and warnings_conflicts_rr.
262 (usage): Update.
263 * src/getargs.h (enum warnings): Add entries for
264 warnings_conflicts_sr and warnings_conflicts_rr.
265 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
266 group.
267 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
268 conflict report can produce a "warnings being treated as errors"
269 message. Also, check that stderr is now fully scrubbed by -Wnone
270 when the exit status is 0.
271
272 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
273
274 Pacify maintainer-check-posix.
275 Adding command-line options after the grammar file name is not
276 permitted, so disable checks that do that when
277 maintainer-check-posix is running.
278 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
279 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
280 remove an unnecessary m4_if.
281
282 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
283
284 Add -Wother so -Wnone suppresses all warnings.
285 Reported by George Neuner at
286 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
287 * NEWS (2.5): Document.
288 * THANKS (George Neuner): Add.
289 * doc/bison.texinfo (Bison Options): Document.
290 * src/complain.c, src/complain.h
291 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
292 (midrule_value_at): New warning function, similar to yacc_at in
293 that it's controlled by its own warning category.
294 * src/getargs.c (warnings_flag): Initialize to warnings_other.
295 (warnings_args, warnings_types): Add entry for warnings_other.
296 (usage): Update.
297 * src/getargs.h (enum warnings): Add entry for warnings_other.
298 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
299 don't print useless rules.
300 * src/reader.c (symbol_should_be_used): Rather than adjusting the
301 return value based on whether midrule value warnings are enabled,
302 accept a new parameter for telling the caller whether true is
303 being returned for a potential midrule warning.
304 (grammar_rule_check): Use midrule_value_at for midrule value
305 warnings, and continue to use warn_at for all other warnings. Let
306 them check whether the warnings are enabled.
307 * tests/local.at (AT_BISON_CHECK): Update documentation.
308 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
309 disable all warnings exercised in the test suite.
310
311 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
312
313 Don't let -Wnone disable -Werror.
314 Discussed at
315 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
316 * NEWS (2.5): Document.
317 * src/getargs.c (flags_argmatch): Accept a new argument that
318 specifies what flags "all" and thus "none" affect.
319 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
320 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
321 New test group.
322
323 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
324
325 * NEWS (2.5): Document fix for -Wno-CATEGORY.
326
327 2008-11-21 Di-an Jan <dianj@freeshell.org>
328
329 Implement no-XXX arguments for --warnings, --report, --trace.
330 * src/getargs.c (flags_argmatch): Handles no-XXX.
331 Fix typo in doxygen comment.
332
333 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
334
335 doc: fix confusing citation of LAC publication.
336 Suggested by Akim Demaille.
337 * doc/bison.texinfo (LAC): Here.
338
339 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
340
341 lr.default-reductions: rename "full" value to "most".
342 Unlike "consistent" and "accepting", "full" doesn't answer the
343 question of "which states".
344 * doc/bison.texinfo (%define Summary): Update.
345 (Default Reductions): Update.
346 * src/print.c (print_reductions): Update.
347 * src/reader.c (prepare_percent_define_front_end_variables):
348 Update.
349 * src/tables.c (action_row): Update.
350 * tests/input.at (%define enum variables): Update.
351 * tests/reduce.at (%define lr.default-reductions): Update.
352
353 2011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
354
355 * src/parse-gram.c, src/parse-gram.h: Regenerate.
356
357 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
358
359 named references: fix double free.
360 In `rhs[name]: "a" | "b"', do not free "name" twice.
361 Reported by Tys Lefering.
362 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
363 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
364 * src/parse-gram.y (current_lhs): Rename as...
365 (current_lhs_symbol): this.
366 (current_lhs): New function. Use it to free the current lhs
367 named reference.
368 * src/reader.c: Bind lhs to a copy of the current named reference.
369 * src/symlist.c: Rely on free (0) being valid.
370 * tests/named-refs.at: Test this.
371
372 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
373
374 tests: style changes.
375 * tests/named-refs.at (Redundant words in LHS brackets)
376 (Unresolved references): here.
377
378 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
379
380 java: fix parser tracing bug.
381 * NEWS (2.5): Document.
382 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
383 element.
384
385 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
386
387 java: finish fixing parser stack popping bug.
388 * NEWS (2.5): Document.
389 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
390 in clearing the location stack. Also fix pop function that
391 accepts no arguments.
392
393 2011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
394
395 java: fix parser stack popping bug.
396 Reported at
397 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
398 * THANKS (Angelo Borsotti): Add.
399 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
400 in clearing the value stack. Previously, the top element of the
401 stack wasn't cleared and so the value was not garbage collected.
402
403 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
404
405 doc: cite publication for LAC.
406 * doc/bison.texinfo (LAC): Here.
407
408 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
409
410 doc: clean up terminology for mysterious conflicts.
411 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
412 (Mysterious Conflicts): ... this, which is already the section
413 title and the name used in the index. Update all cross-references
414 to this node. Also, don't imply that R/R conflicts are the only
415 kind of mysterious conflict.
416
417 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
418
419 lr.default-reductions: rename "all" value to "full".
420 States that shift the error token do not have default reductions,
421 and GLR disables some default reductions, so "all" was a misnomer.
422 * doc/bison.texinfo (%define Summary): Update.
423 (Default Reductions): Update.
424 * src/print.c (print_reductions): Update.
425 * src/reader.c (prepare_percent_define_front_end_variables):
426 Update.
427 * src/tables.c (action_row): Update.
428 * tests/input.at (%define enum variables): Update.
429 * tests/reduce.at (%define lr.default-reductions): Update.
430
431 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
432
433 doc: create a new Tuning LR section in the manual.
434 And clean up all other documentation of the features described
435 there.
436 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
437 bit, update the cross-references to the manual, and point out that
438 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
439 That is, as the referenced section in the manual documents, LAC
440 does not fix infinite parsing loops on syntax errors.
441 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
442 IELR, and LR in @cindex.
443 (%define Summary): Condense the entries for lr.default-reductions,
444 lr.keep-unreachable-states, lr.type, and parse.lac into brief
445 summaries, and cross-reference the appropriate subsections of
446 Tuning LR. For parse.lac, mention that it's only implemented for
447 deterministic parsers in C.
448 (Error Reporting): When mentioning %error-verbose, mention LAC,
449 and add cross-reference to the LAC section.
450 (Tuning LR): New section with an extended version of the
451 documentation removed from %define Summary. Change all
452 cross-references in the manual to point here instead of there.
453 (Calc++ Parser): When mentioning %error-verbose, mention LAC, and
454 add cross-reference to the LAC section.
455 (Table of Symbols): In %error-verbose and YYERROR_VERBOSE entries,
456 add cross-references to Error Reporting.
457 (Glossary): Capitalize entry titles consistently. Add definitions
458 for "defaulted state" and "unreachable state". Expand IELR
459 acronym in IELR's entry.
460
461 2011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
462
463 doc: add bibliography to manual.
464 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
465 bibliography instead of citing publications directly.
466 (Generalized LR Parsing): Likewise.
467 (Bibliography): New section. Not all entries are cross-referenced
468 yet, but that will come in future patches.
469
470 2011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
471
472 java: test and document previous bug fix.
473 * NEWS (2.5): Document it.
474 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
475 invocations, pass a location that spans multiple tokens. Change
476 yyerror to report all of a location rather than just the begin
477 position. Extend yylex and Position to count tokens on a line.
478 Remove getHashCode as it's unused. Update all expected output.
479
480 2011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
481
482 java: fix location handling bug.
483 Reported at
484 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
485 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
486 reversed access to location stack.
487 * THANKS (Bernd Kiefer): Add.
488
489 2010-05-11 Akim Demaille <demaille@gostai.com>
490
491 doc: please Emacs.
492 * doc/bison.texinfo (Local Variables): Move this after the
493 LocalWords, since the latter are looked for in the whole document,
494 while the former are looked for only at its end.
495 Require american spell checking.
496
497 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
498
499 doc: clean up new subsections in manual.
500 * doc/bison.texinfo (%define Summary): Reword so it reads well as
501 a separate section. For example, add an intro, and move most of
502 the text outside of the @deffn so it is not indented so far.
503 (%code Summary): Likewise.
504 (Table of Symbols): Reword %code entry to match the %code entry in
505 Decl Summary.
506
507 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
508
509 doc: finish splitting apart the manual's Decl Summary section.
510 Suggested by Akim Demaille at
511 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
512 * doc/bison.texinfo (Decl Summary): Extract most of the %define
513 entry into...
514 (%define Summary): ... this new subsection, and update all
515 cross-references. For readability of the patches, rewriting of
516 the text so it makes sense as a separate subsection will come in a
517 later patch. Moreover, the majority of the text describing the
518 various new LR features should likely move to another new section
519 somewhere.
520
521 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
522
523 doc: begin to split apart the manual's Decl Summary section.
524 Discussed in thread starting at
525 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
526 * doc/bison.texinfo (Decl Summary): Extract most of the %code
527 entry into...
528 (%code Summary): ... this new subsection, and update all
529 cross-references. For readability of the patches, rewriting of
530 the text so it makes sense as a separate subsection will come in a
531 later patch.
532
533 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
534
535 doc: clean up naming of various Bison files.
536 The Bison manual's names for various files associated with a Bison
537 parser has devolved into inconsistency. This patch makes the
538 naming consistent for the most important files. First, it chooses
539 "grammar file" over "input file". The former appears to be more
540 traditional in the Bison manual, and Bison has other input
541 files (skeletons). Second, it chooses "parser implementation
542 file" over names like "parser file", "parser source file", "parser
543 source code file", and "parser output file". The new name makes
544 it clearer where Bison generates the main parser implementation,
545 and it is easily distinguishable from "parser header file".
546 * doc/bison.texinfo: Implement throughout.
547
548 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
549
550 doc: give credit to more of Bison's developers.
551 * doc/bison.texinfo (Introduction): Don't imply that only Robert
552 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
553 Bison. However, I don't have time to write a full history, so
554 just point readers to THANKS and ChangeLog.
555
556 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
557
558 doc: document experimental features better.
559 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
560 LR(1) are experimental. Mention Java. Normally experimental
561 features probably shouldn't be mentioned in the introduction.
562 However, if Bison's limitations to LALR(1), C, and C++ are so
563 important that they should be mentioned here, then it's important
564 to point out that Bison is beginning to escape those limitations.
565 Moreover, these particular experimental features have very little
566 chance of being removed.
567 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
568 experimental.
569
570 2011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
571
572 Do not allow identifiers that start with a dash.
573 This cleans up our previous fixes for a bug whereby Bison
574 discarded `.field' in `$-1.field'. The previous fixes were less
575 restrictive about where a dash could appear in an identifier, but
576 the restrictions were hard to explain. That bug was reported and
577 this final fix was originally suggested by Paul Hilfinger. This
578 also fixes a remaining bug reported by Paul Eggert whereby Bison
579 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
580 identifier. Now, `-' cannot be an identifier. Discussed in
581 threads beginning at
582 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
583 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
584 * NEWS (2.5): Update entry describing the dash extension to
585 grammar symbol names. Also, move that entry before the named
586 references entry because the latter mentions the former.
587 * doc/bison.texinfo (Symbol): Update documentation for symbol
588 names. As suggested by Paul Eggert, mention the effect of periods
589 and dashes on named references.
590 (Decl Summary): Update documentation for unquoted %define values,
591 which, as a side effect, can no longer start with dashes either.
592 * src/scan-code.l (id): Implement.
593 * src/scan-gram.l (id): Implement.
594 * tests/actions.at (Exotic Dollars): Extend test group to exercise
595 bug reported by Paul Hilfinger.
596 * tests/input.at (Symbols): Update test group, and extend to
597 exercise bug reported by Paul Eggert.
598 * tests/named-refs.at (Stray symbols in brackets): Update test
599 group.
600 ($ or @ followed by . or -): Likewise.
601 * tests/regression.at (Invalid inputs): Likewise.
602
603 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
604
605 * data/yacc.c: Fix last apostrophe warning from xgettext.
606
607 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
608
609 Fix minor problems encountered by a fresh bootstrap.
610 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
611 as they confuse xgettext, which tries to parse them as C character
612 constants in a preprocessor directive.
613 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
614 that expression might not promote to int on some platforms.
615 * src/parse-gram.c, src/parse-gram.h: Regenerate.
616
617 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
618
619 Improve error messages for `$' or `@' followed by `.' or `-'.
620 Previously, for this special case of an invalid reference, the
621 usual "symbol not found in production:" was printed. However,
622 because the symbol name was parsed as the empty string, that
623 message was followed immediately by a newline instead of a symbol
624 name. In reality, this is a syntax error, so the reference is
625 invalid regardless of the symbols actually appearing in the
626 production. Discussed at
627 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
628 * src/scan-code.l (parse_ref): Report the above case as a syntax
629 error. Other than that, continue to handle this case like any
630 other invalid reference that Bison manages to parse because
631 "possibly meant" messages can still be helpful to the user.
632 * tests/named-refs.at ($ or @ followed by . or -): New test group.
633
634 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
635
636 doc: don't use @acronym.
637 Lately, many GNU packages are dropping it. See
638 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
639 * doc/bison.texinfo: Remove all uses.
640
641 2011-01-05 Alex Rozenman <rozenman@gmail.com>
642
643 Do not allow identifiers that start with a negative number.
644 Reported by Paul Hilfinger as a side effect of named references
645 support at
646 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
647 Suggested by Paul Eggert.
648 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
649 * src/scan-gram.l ({letter}, {id}): Likewise.
650
651 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
652
653 * ChangeLog (2011-01-02): improve description.
654
655 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
656
657 maint: don't update copyright years in bootstrap.
658 * .x-update-copyright: Add entry for bootstrap.
659 * bootstrap: Remove 2011 from copyright years. The bootstrap
660 version we're currently using comes from an older version of
661 gnulib.
662 * bootstrap.conf (bootstrap_sync): Add comments explaining this
663 issue.
664
665 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
666
667 maint: run "make update-copyright".
668
669 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
670
671 maint: prepare to use year ranges in copyright notices.
672 * README (Copyright statements): New section explaining the range
673 notation. The GNU maintainers document requires this explanation:
674 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
675 I copied our explanation from coreutils.
676 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
677 disabled Bison's automated use of ranges.
678 * cfg.mk (update-copyright-env): Likewise.
679
680 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
681
682 Correct my email address.
683 * ChangeLog: In all recent entries.
684 * THANKS (Joel E. Denny): Here.
685
686 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
687
688 doc: cleanup.
689 * NEWS (2.5): Try to sort entries according to how interesting
690 users might find them.
691
692 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
693
694 doc: cleanup.
695 * NEWS (2.5): Make some minor improvements to wording, and format
696 entries more consistently.
697 * doc/bison.texinfo (Language and Grammar): Point out that IELR
698 and canonical LR are experimental features.
699 (Decl Summary): In list of %define variables, make wording more
700 consistent. Improve discussion of using LALR for GLR.
701
702 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
703
704 parse.lac: document.
705 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
706 other corrections to verbose syntax error messages.
707 * doc/bison.texinfo (Decl Summary): Rewrite entries for
708 lr.default-reductions and lr.type to be clearer, to mention
709 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
710 for parse.lac.
711 (Glossary): Add entry for LAC.
712
713 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
714
715 parse.lac: implement exploratory stack reallocations.
716 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
717 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
718 with values of "failures" (default) or "full".
719 (b4_declare_parser_state_variables): Add yyesa, yyes, and
720 yyes_capacity variables.
721 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
722 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
723 LAC requested.
724 (YYCOPY_NEEDED): New cpp macro.
725 (YYCOPY): Define if LAC requested.
726 (yy_lac_stack_realloc): New function implementing stack
727 reallocations. Use YYMAXDEPTH for maximum stack size given that
728 the stack should never need to grow larger than the main state
729 stack needs to grow without LAC.
730 (YY_LAC_ESTABLISH): Update yy_lac invocation.
731 (yy_lac): Add arguments for exploratory stack memory data
732 recorded in the main parser. Invoke yy_lac_stack_realloc when
733 reallocation is necessary.
734 (yysyntax_error): Add the same new arguments and pass them to
735 yy_lac.
736 (yypstate_delete): Free yyes if necessary.
737 (yyesa, yyes, yyes_capacity): #define these to yypstate members
738 in the case of push parsing.
739 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
740 Update yysyntax_error invocations. At yyreturn, free yyes if
741 necessary.
742 * src/parse-gram.y: %define parse.lac full.
743 * tests/input.at (LAC: errors for %define): Extend for
744 parse.lac-memory-trace.
745 * tests/regression.at (LAC: Exploratory stack): Extend to check
746 that stack reallocs happen when expected.
747 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
748 parse.lac.es-capacity-initial.
749
750 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
751
752 parse.lac: implement as %define variable.
753 LAC = lookahead correction. See discussion at
754 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
755 However, one point there must be corrected: because of %nonassoc,
756 LAC is *not* always redundant for lr.type=canonical-lr.
757 * data/yacc.c: Accept values of "none" (default) or "full" for
758 parse.lac. Accept %define parse.lac.es-capacity to specify
759 capacity of LAC's temporary exploratory stack. It defaults to 20
760 and, for now, will not grow dynamically.
761 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
762 parse.lac!=none.
763 (YYBACKUP): Invoke YY_LAC_DISCARD.
764 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
765 yy_lac and track when it needs to be invoked
766 (yy_lac): New function that, given the current stack, determines
767 whether a token can eventually be shifted. Return status mimics
768 yyparse return status.
769 (yysyntax_error): Change yystate argument to yyssp so stack top
770 can be passed to yy_lac. If LAC is requested, build expected
771 token list by invoking yy_lac for every token instead of just
772 checking the current state for lookaheads. Return 2 if yy_lac
773 exhausts memory.
774 (yyparse, yypush_parse): Use local variable yy_lac_established and
775 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
776 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
777 is requested.
778 * tests/conflicts.at (%nonassoc and eof): Extend to check the
779 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
780 (%error-verbose and consistent errors): Likewise.
781 (LAC: %nonassoc requires splitting canonical LR states): New test
782 group demonstrating how LAC can fix canonical LR.
783 * tests/input.at (LAC: Errors for %define): New test group.
784 * tests/regression.at (LAC: Exploratory stack): New test group.
785 (LAC: Memory exhaustion): New test group.
786
787 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
788
789 build: use gnulib's new bootstrap_sync option.
790 Now, whenever we update bison's copy of gnulib, bootstrap will
791 update itself the next time it's run.
792 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
793 * bootstrap.conf (bootstrap_sync): Set to true.
794 * gnulib: Update to latest so bootstrap is in sync now.
795
796 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
797
798 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
799 On master, there is no yychar in lalr1.cc, but there is on
800 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
801 manipulation in user semantic actions" wasn't adjusted for that
802 difference.
803 * data/lalr1.cc (yy::parser::parse): Translate yychar before
804 every use of yytoken, and add comments explaining this approach.
805 * tests/conflicts.at (%error-verbose and consistent errors):
806 Extend to test yychar manipulation with lalr1.cc.
807
808 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
809
810 yysyntax_error: fix for consistent error with lookahead.
811 * NEWS (2.5): Document.
812 * data/yacc.c (yysyntax_error): In a verbose syntax error
813 message while in a consistent state with a default action (which
814 must be an error action given that yysyntax_error is being
815 invoked), continue to drop the expected token list, but don't
816 drop the unexpected token unless there actually is no lookahead.
817 Moreover, handle that internally instead of returning 1 to tell
818 the caller to do it. With that meaning of 1 gone, renumber
819 return codes more usefully.
820 (yyparse, yypush_parse): Update yysyntax_error usage. Most
821 importantly, set yytoken to YYEMPTY when there's no lookahead.
822 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
823 unexpected token unless there actually is no lookahead.
824 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
825 set yytoken to yyempty_ before invoking yysyntax_error_.
826 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
827 token unless there actually is no lookahead.
828 * data/lalr1.java (YYParser::parse): If there's no lookahead,
829 set yytoken to yyempty_ before invoking yysyntax_error.
830 (YYParser::yysyntax_error): Again, don't drop the unexpected
831 token unless there actually is no lookahead.
832 * tests/conflicts.at (%error-verbose and consistent
833 errors): Extend test group to further reveal how the previous
834 use of the simple "syntax error" message was too general. Test
835 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
836 failure.
837 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
838 to...
839 * tests/local.at: ... here.
840 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
841 (AT_BISON_OPTION_POPDEFS): Pop it.
842 (AT_FULL_COMPILE): Extend to handle Java.
843
844 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
845
846 yysyntax_error: more preparation for readability of next patch.
847 There are no behavioral changes here.
848 * data/glr.c (yyreportSyntaxError): Reorganize.
849 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
850 * tests/conflicts.at (%error-verbose and consistent errors):
851 Reorganize.
852
853 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
854
855 yysyntax_error: prepare for readability of next patches.
856 These are purely whitespace changes that result in ugly code
857 but that make the next couple of patches much easier to read.
858 * data/glr.c (yyreportSyntaxError): Reindent.
859 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
860 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
861 * data/yacc.c (yysyntax_error): Reindent.
862
863 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
864
865 yysyntax_error: improve invocation readability.
866 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
867 invocation, get rid of the while loop, which is misleading
868 because there are really at most two iterations.
869
870 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
871
872 * ChangeLog: Correct some errors in previous entries.
873
874 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
875
876 maint: re-anchor all .gitignore entries.
877 * bootstrap: Copy from gnulib's latest for the fix to
878 automatically anchor entries it constructs.
879 * gnulib: Update to latest just so it has the same bootstrap.
880 * .gitignore, build-aux/.gitignore, doc/.gitignore:
881 * lib/.gitignore, m4/.gitignore, po/.gitignore:
882 * runtime-po/.gitignore: Re-anchor all entries.
883
884 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
885
886 Fix portability problem on OpenBSD 4.7.
887
888 Jim Meyering reported this in
889 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
890 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
891 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
892 for quite some time.
893 * src/parse-gram.c, src/parse-gram.h: Regenerate.
894 * tests/regression.at: Tamper with the renamed witness.
895
896 Adjust to recent changes to gnulib bootstrap.
897
898 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
899 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
900 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
901 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
902 anymore and don't know of anybody else who does. If someone needs
903 these files, they can resurrect them.
904 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
905 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
906 Omit leading '/', since bootstrap omits it.
907 Adjust file names to match current contents better.
908 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
909 installed just for us.
910 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
911 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
912 needed somehow. Don't have time to look into why.
913 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
914 the GNU malloc behavior, where malloc (0) != NULL unless we're
915 out of storage? If not, we can omit malloc-gnu; but for now I left
916 it in to be safe.
917 (vc_ignore): Remove.
918 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
919 uses that convention.
920
921 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
922
923 Version 2.4.3.
924 * NEWS (2.4.3): Set date.
925
926 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
927
928 maint: add gettext version to release announcements.
929 Suggested by Paul Hilfinger at
930 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
931 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
932 * cfg.mk (bootstrap-tools): Add gettext.
933
934 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
935
936 doc: fix -W and %expect documentation some.
937 * NEWS (2.4.3): Mention that there are documentation fixes.
938 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
939 turns conflicts into errors not warnings.
940 (Shift/Reduce): Likewise.
941 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
942
943 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
944
945 -Werror: fix for rules useless in parser after conflicts.
946 * NEWS (2.4.3): Document fix.
947 * src/complain.c (error_message): Extend to handle incomplete
948 error messages so warn and warn_at can be used in more cases.
949 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
950 -Werror is always obeyed.
951 * src/reduce.c (reduce_print): Use warn so that the "warnings
952 being treated as errors" message is printed consistently before
953 the first warning message. This makes testing easier.
954 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
955 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
956 --warnings=error when warnings appear in bison's stderr.
957
958 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
959
960 maint: enable gnits only at stable releases.
961 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
962 version string should disable gnits. Explain in comments.
963
964 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
965
966 i18n: update.
967 * po/POTFILES.in: Add src/graphviz.c.
968
969 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
970
971 i18n: fix for gnulib.
972 * po/POTFILES.in: Add remaining gnulib files that have
973 translatable strings.
974
975 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
976
977 maint: use announce-gen's new --mail-headers.
978 * HACKING (Announce): Update instructions.
979 * cfg.mk (announcement_Cc_): Define.
980 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
981 required by latest gnulib.
982 * gnulib: Update to latest.
983
984 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
985
986 tests: handle Valgrind that complains about >&-.
987 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
988 (Output files: -dv >&-): Skip test group if running
989 maintainer-check-valgrind.
990
991 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
992
993 Update from GFDL GFDL 1.2 to 1.3.
994 * doc/bison.texinfo: Update GFDL version number.
995 * doc/fdl.texi: Update to version 1.3, taken from:
996 http://www.gnu.org/licenses/fdl.texi
997
998 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
999
1000 Do not use date ranges in copyright notices.
1001 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
1002
1003 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
1004 * TODO, bootstrap, bootstrap.conf:
1005 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
1006 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
1007 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
1008 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
1009 * data/lalr1.java, data/location.cc:
1010 * data/xslt/bison.xsl:
1011 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
1012 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
1013 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
1014 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
1015 * djgpp/subpipe.c, djgpp/subpipe.h:
1016 * djgpp/testsuite.sed, doc/bison.texinfo:
1017 * doc/refcard.tex, etc/README, etc/bench.pl.in:
1018 * examples/calc++/Makefile.am, examples/extexi:
1019 * lib/abitset.c, lib/abitset.h:
1020 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1021 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1022 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1023 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1024 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1025 * lib/libiberty.h, lib/main.c, lib/timevar.c:
1026 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
1027 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
1028 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
1029 * src/AnnotationList.c, src/AnnotationList.h:
1030 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
1031 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
1032 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
1033 * src/complain.h, src/conflicts.c, src/conflicts.h:
1034 * src/derives.c, src/derives.h, src/files.c, src/files.h:
1035 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
1036 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
1037 * src/ielr.h, src/lalr.c, src/lalr.h:
1038 * src/location.c, src/location.h, src/main.c:
1039 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
1040 * src/named-ref.h, src/nullable.c, src/nullable.h:
1041 * src/output.c, src/output.h, src/parse-gram.y:
1042 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
1043 * src/print_graph.c, src/print_graph.h, src/reader.c:
1044 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
1045 * src/relation.h, src/scan-code.h, src/scan-code.l:
1046 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1047 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1048 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1049 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1050 * tests/actions.at, tests/atlocal.in, tests/c++.at:
1051 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1052 * tests/existing.at, tests/glr-regression.at:
1053 * tests/headers.at, tests/input.at, tests/java.at:
1054 * tests/local.at, tests/named-refs.at:
1055 * tests/output.at, tests/push.at, tests/reduce.at:
1056 * tests/regression.at, tests/sets.at, tests/skeletons.at:
1057 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
1058 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
1059 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
1060 * etc/Makefile.am:
1061 Don't use date ranges in copyright notices.
1062
1063 2010-05-11 Akim Demaille <demaille@gostai.com>
1064
1065 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
1066 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
1067 header file to the implementation file, after the user %code
1068 sections.
1069 * NEWS (2.5): Document this.
1070
1071 2010-05-07 Akim Demaille <demaille@gostai.com>
1072
1073 c++: use YYRHSLOC.
1074 * data/lalr1.cc (YYRHSLOC): New.
1075 (YYLLOC_DEFAULT): Use it.
1076 * data/glr.cc: If location_type was user defined, do not include
1077 location.hh, and do not produce location.hh and position.hh.
1078 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
1079 Check that glr.cc supports user defined location_type.
1080 * NEWS: Document this.
1081
1082 2010-05-10 Akim Demaille <demaille@gostai.com>
1083
1084 doc: fix lalr1.cc documentation.
1085 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
1086 (C++ Bison Interface): Fix lalr1.cc skeleton name.
1087 (C++ Parser Interface): Fix semantic_type and location_type names.
1088 Document yy::parser::token.
1089 Reported by Jerry Quinn.
1090
1091 2010-05-04 Akim Demaille <demaille@gostai.com>
1092
1093 lalr1.cc: don't generate location.hh when location_type is defined
1094 * data/bison.m4 (b4_percent_define_use): New.
1095 (b4_percent_define_get): Use it.
1096 Accept a default value.
1097 * data/c++.m4: Do not provide a default value for the %define
1098 variable location_type, rather, use b4_percent_define_get with a
1099 default argument where its value is needed.
1100 * data/lalr1.cc: Do not load location.cc (which outputs both
1101 location.hh and position.hh) if the user defined location_type.
1102 Do not include location.hh either.
1103 * data/glr.cc: Likewise.
1104
1105 2010-05-04 Akim Demaille <demaille@gostai.com>
1106
1107 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
1108 * tests/calc.at (Span): Instead of begin/end, as in the built-in
1109 location class, use first and last.
1110 Define YYLLOC_DEFAULT to adjust to these changes.
1111 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
1112 location_type changes.
1113
1114 2010-05-04 Akim Demaille <demaille@gostai.com>
1115
1116 tests: enhance AT_SYNCLINES_COMPILE.
1117 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
1118 into...
1119 (AT_SYNCLINES_COMPILE): here.
1120 Add more distcc patterns.
1121
1122 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1123
1124 tests: fix maintainer-xml-check.
1125 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
1126 Update output to include comments now produced by --graph.
1127 (xsl:template match="automaton"): As for --graph, name the
1128 digraph after the grammar file.
1129 * src/print-xml.c (escape_bufs): Enlarge array.
1130 (print_xml): Add bug-report and url attributes to
1131 bison-xml-report element.
1132
1133 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1134
1135 In DOT output, convert from "/*" comments to "//" comments.
1136 This handles the possibility that a "*/" might appear in
1137 variable portions of those comments at some point in the future.
1138 * src/graphviz.c (start_graph): Implement.
1139
1140 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1141
1142 Document that undefined %prec identifier warnings will remain.
1143 * NEWS (2.4.3): Here.
1144 (2.4.2): Here.
1145
1146 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1147
1148 Revert 2009-12-30 change for undefined %prec token complaints.
1149 That is, keep them as warnings because that should be sufficient
1150 to satisfy POSIX without creating backward compatibility issues.
1151 Suggested by Richard Stallman at
1152 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
1153 * NEWS (2.5): Remove mention of complaint.
1154 * src/reader.c (grammar_rule_check): Convert complaint back to
1155 warning.
1156 * tests/input.at (%prec's token must be defined): Update.
1157
1158 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1159
1160 build: don't require src/bison during bootstrap.
1161 Suggested by Eric Blake at
1162 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
1163 * bootstrap.conf (bootstrap_epilogue): New function to make sure
1164 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
1165
1166 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1167
1168 i18n: fix untranslatable string.
1169 Reported by Goran Uddeborg at
1170 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
1171 * src/muscle-tab.c (muscle_percent_define_insert): Here.
1172
1173 2010-04-13 Akim Demaille <demaille@gostai.com>
1174
1175 tests: calc: minor refactoring.
1176 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
1177
1178 2010-04-13 Akim Demaille <demaille@gostai.com>
1179
1180 tests: calc: simplify location management.
1181 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
1182 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
1183 define the appropriate AT_LOC accessors.
1184 * tests/calc.at: Use AT_LOC accessors.
1185
1186 2010-04-13 Akim Demaille <demaille@gostai.com>
1187
1188 test location_type.
1189 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1190 Define AT_LOCATION_TYPE_IF.
1191 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1192 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1193 used, provide a user location type and use it.
1194 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1195
1196 2010-04-13 Akim Demaille <demaille@gostai.com>
1197
1198 tests: check fclose's return value.
1199 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1200
1201 2010-04-13 Akim Demaille <demaille@gostai.com>
1202
1203 tests: don't depend on the actual location type.
1204 * tests/calc.at: Use yy::parser::location_type rather than
1205 yy::location, since the former is always right, and might point to
1206 another type than the latter.
1207
1208 2010-04-13 Akim Demaille <demaille@gostai.com>
1209
1210 formatting changes.
1211 * tests/calc.at: Formatting changes.
1212
1213 2010-04-13 Akim Demaille <demaille@gostai.com>
1214
1215 lalr1.cc: remove useless forward declaration.
1216 * data/lalr1.cc: Include location.hh before stack.hh.
1217 Remove the useless forward declarations of position and location.
1218 Reported by Chris Morley.
1219 * data/glr.cc: Likewise.
1220
1221 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1222
1223 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1224
1225 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1226
1227 tests: fix for newer Sun Studio C++.
1228 Reported by Dagobert Michelsen at
1229 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1230 * THANKS (Dagobert Michelsen): Add.
1231 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1232 Autoconf macro for handling the restrict keyword.
1233 * gnulib: Update to latest, which no longer overrides that macro
1234 from Autoconf.
1235
1236 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1237
1238 portability: fix pointer arithmetic to conform to C standard.
1239 Reported by Tys Lefering at
1240 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1241 This fix is already implemented in glr.c and does not apply to
1242 lalr1.java.
1243 * data/lalr1.cc (yy::parser::parse): Increase size of
1244 yyerror_range and adjust subscripting so you don't have to
1245 subtract one from the beginning of the array.
1246 * data/yacc.c (b4_declare_parser_state_variables,
1247 yyparse, yypush_parse): Likewise.
1248
1249 2010-04-05 Akim Demaille <demaille@gostai.com>
1250
1251 remove useless include.
1252 * src/graphviz.h: Don't include stdbool.h.
1253
1254 2010-04-05 Akim Demaille <demaille@gostai.com>
1255
1256 graph: sign the output file.
1257 * src/graphviz.c (start_graph): Issue comments about Bison.
1258 Suggested by Tys Lefering.
1259
1260 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1261
1262 portability: fix test suite for GCC 4.5's new #error message.
1263 Reported by Tys Lefering at
1264 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1265 * NEWS (2.4.3): Mention.
1266 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1267
1268 2010-03-30 Akim Demaille <demaille@gostai.com>
1269
1270 fix comments.
1271 * src/graphviz.h: Add missing license notice.
1272 Document.
1273
1274 2010-03-25 Akim Demaille <demaille@gostai.com>
1275
1276 tests: fix 250: parse.error=verbose overflow.
1277 * tests/regression.at (parse.error=verbose overflow): Avoid the
1278 double inclusion of stdlib.h as it triggers hard errors.
1279
1280 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1281
1282 portability: fix for BSD make.
1283 Reported by Johan van Selst at
1284 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1285 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
1286 this dependency list as in package.m4's target rule.
1287
1288 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1289
1290 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1291 Reported by Johan van Selst at
1292 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1293 * NEWS (2.4.3): New.
1294 * THANKS (Johan van Selst): Add.
1295 * gnulib: Update to latest.
1296
1297 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1298
1299 maint: update for changes to gnulib's announce-gen.
1300 * HACKING (Announce): RELEASE_TYPE=major must now be written
1301 RELEASE_TYPE=stable.
1302
1303 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1304
1305 Version 2.4.2.
1306 * NEWS (2.4.2): Set version and date. For the recent test suite
1307 portability fixes, don't be so optimistic about their success
1308 given the lack of feedback on the affected platforms.
1309
1310 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1311
1312 tests: fix maintainer-xml-check for recent changes.
1313 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1314 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1315 output file whose name conflicts with a previous output file
1316 is now never generated.
1317
1318 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1319
1320 portability: fix several issues with M4 subprocess.
1321
1322 M4's output pipe was not being drained upon fatal errors during
1323 scan_skel. As a result, broken-pipe messages from M4 were seen
1324 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1325 failure in the test suite. The problem was that, on platforms
1326 where the default disposition for SIGPIPE is ignore instead of
1327 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1328 then reported it. However, there's some sort of race condition,
1329 because the new test group occasionally succeeded.
1330 Reported by Albert Chin at
1331 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1332
1333 There were also problems with the test suite livelocking on
1334 Tru64 5.1b. Reported by Didier Godefroy at
1335 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1336 Switching to create_pipe_bidi suggested by Akim Demaille.
1337
1338 To attempt to solve both of these problems, switch to gnulib's
1339 create_pipe_bidi and register M4 process as a slave. Along the
1340 way, clean up file name conflict handling, which was affected by
1341 the broken-pipe problem before the switch.
1342 * NEWS (2.4.2): Document.
1343 * THANKS (Didier Godefroy): Add.
1344 * bootstrap.conf (gnulib_modules): Add pipe.
1345 * gnulib: Update to latest to make sure we have all the latest
1346 fixes.
1347 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
1348 subpipe.c.
1349 * po/POTFILES.in (lib/subpipe.c): Remove.
1350 * src/files.c (compute_output_file_names): Update invocations
1351 of output_file_name_check.
1352 (output_file_name_check): In the case that the grammar file
1353 would be overwritten, use complain instead of fatal, but replace
1354 the output file name with /dev/null. Use the /dev/null solution
1355 for the case of two conflicting output files as well because it
1356 seems safer in case Bison one day tries to open both files at
1357 the same time.
1358 * src/files.h (output_file_name_check): Update prototype.
1359 * src/output.c (output_skeleton): Use create_pipe_bidi and
1360 wait_subprocess. Assert that scan_skel completely drains the
1361 pipe.
1362 * src/scan-skel.l (at_directive_perform): Update
1363 output_file_name_check invocation.
1364 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1365 grammar file actually isn't overwritten.
1366 (Conflicting output files: -o foo.y): Update expected output.
1367 * tests/skeletons.at (Fatal errors but M4 continues producing
1368 output): New test group.
1369
1370 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1371
1372 Update POTFILES.
1373 * HACKING (Release Procedure): Add reminder about keeping
1374 POTFILES files up-to-date.
1375 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1376
1377 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
1378
1379 Code cleanup.
1380 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1381 which is already defined in atconfig.
1382
1383 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1384
1385 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1386
1387 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1388
1389 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1390 * HACKING (Release Procedure): Update notes on copyright years.
1391 * Makefile.am (update-package-copyright-year): New target rule.
1392 * build-aux/update-package-copyright-year: New file.
1393 * cfg.mk (update-copyright): Add update-package-copyright-year
1394 as a dependency.
1395
1396 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1397
1398 * bootstrap: Import improvements from latest gnulib.
1399
1400 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1401
1402 build: require Automake 1.11.1 to avoid a security flaw.
1403 * HACKING (Release Procedure): Don't document Automake security
1404 flaw here.
1405 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1406 why here.
1407
1408 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1409
1410 gnulib: update to latest.
1411
1412 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1413
1414 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1415
1416 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
1417
1418 Thank the developer of the initial push parser implementation.
1419 This unfortunate oversight is several years old.
1420 * THANKS (Odd Arild Olsen): Add.
1421
1422 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1423
1424 Fix some comments concerning LR(0) versus LALR(1).
1425
1426 Stop equating LR(0) with nondeterminism and LALR(1) with
1427 determinism. That is, if all states are consistent, then LR(0)
1428 tables are deterministic. On the other hand, LALR(1) tables
1429 might be nondeterministic before conflict resolution, and GLR
1430 permits LALR(1) tables to remain nondeterministic.
1431 * src/LR0.c, src/LR0.h: Here.
1432 * src/lalr.c, src/lalr.h: Here.
1433 * src/main.c (main): Here.
1434 * src/state.c, src/state.h: Here.
1435
1436 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1437 parser tables.
1438
1439 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1440
1441 maint: run "make update-copyright"
1442
1443 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1444
1445 POSIX: complain if %prec's token was not defined.
1446 * NEWS (2.5): Document.
1447 * src/reader.c (grammar_rule_check): Convert warning to
1448 complaint.
1449 * tests/input.at (%prec's token must be defined): Update.
1450
1451 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1452
1453 POSIX: warn if %prec's token was not defined.
1454 Reported by Florian Krohm at
1455 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1456 * NEWS (2.4.2): Document.
1457 * src/reader.c (grammar_rule_check): Implement.
1458 (grammar_current_rule_prec_set): Add comments explaining that we
1459 here assume a %prec identifier is a token, but we still manage
1460 to support POSIX.
1461 * tests/input.at (%prec's token must be defined): New test
1462 group.
1463
1464 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
1465
1466 * HACKING (Release Procedure): Recommend a secure automake.
1467
1468 2008-12-11 Akim Demaille <demaille@gostai.com>
1469
1470 Propagate i18n changes into glr.c.
1471 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1472 building the error message format dynamically.
1473 * data/lalr1.java: Formatting changes.
1474
1475 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1476
1477 Port small part of master's 11707b2b so future ports are easier.
1478 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
1479
1480 2008-12-11 Akim Demaille <demaille@gostai.com>
1481
1482 Simplify the i18n of the error messages.
1483 * data/lalr1.cc: Comment changes.
1484
1485 2008-11-11 Akim Demaille <demaille@gostai.com>
1486
1487 Prefer M4 to CPP.
1488 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1489 YYERROR_VERBOSE.
1490
1491 2008-11-11 Akim Demaille <demaille@gostai.com>
1492
1493 Support i18n of the parse error messages.
1494 * TODO (lalr1.cc/I18n): Remove.
1495 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1496 error messages, as done in yacc.c.
1497 Stay within the yy* pseudo namespace.
1498
1499 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1500
1501 Port small part of master's 8901f32e so future ports are easier.
1502 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1503 argument, but name it in the function definition only when
1504 verbose error messages are enabled and it'll thus be used.
1505 (yy::parser::parse): Update use of yysyntax_error_.
1506
1507 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1508
1509 portability: `<' and `>' are not always defined on addresses.
1510 Specifically, don't sort objects by their memory addresses when
1511 they're not allocated in the same array or other object. Though
1512 I haven't found a test case where that fails on my platform, C
1513 says the behavior is undefined.
1514 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1515 FIXME. Use new id field of InadequacyList nodes rather than
1516 their memory addresses when sorting.
1517 (AnnotationList__compute_from_inadequacies): Add
1518 inadequacy_list_node_count argument to pass to
1519 InadequacyList__new_conflict.
1520 * src/AnnotationList.h
1521 (AnnotationList__compute_from_inadequacies): Update prototype
1522 and documentation for new argument.
1523 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1524 node_count argument and use it to assign a unique ID.
1525 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1526 (InadequacyList): Add id field.
1527 (InadequacyList__new_conflict): Update prototype and
1528 documentation for new argument.
1529 * src/ielr.c (ielr_compute_annotation_lists): Update
1530 AnnotationList__compute_from_inadequacies invocation.
1531
1532 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1533
1534 Fix handling of yychar manipulation in user semantic actions.
1535 The problem was that yacc.c didn't always update the yychar
1536 translation afterwards. However, other skeletons appear to be
1537 fine. glr.c appears to already translate yychar before every
1538 use. lalr1.cc does not define yychar and does not document its
1539 replacement, yyla, for users. It does provide yyclearin, but
1540 that does not manipulate yyla and thus requires no translation
1541 update. In lalr1.java, yychar is out of scope during semantic
1542 actions.
1543 * NEWS (2.5): Document.
1544 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1545 yytoken here.
1546 (yyparse, yypush_parse): Instead, translate before every use of
1547 yytoken, and add comments explaining this approach.
1548 * tests/actions.at (Destroying lookahead assigned by semantic
1549 action): New test group checking that translation happens before
1550 lookahead destructor calls at parser return. Previously,
1551 incorrect destructors were called.
1552 * tests/conflicts.at (%error-verbose and consistent
1553 errors): New test group checking that translation happens at
1554 syntax error detection before the associated verbose error
1555 message and the associated lookahead destructor calls. While
1556 the destructor call is fixed by this patch, the verbose error
1557 message is currently incorrect due to another bug (see
1558 comments in test group), so this is an expected failure for now.
1559
1560 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1561
1562 YYFAIL: warn about uses and remove from lalr1.java.
1563 * NEWS (2.5): Document.
1564 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1565 and make it private. Update all uses.
1566 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1567
1568 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1569
1570 YYFAIL: deprecate.
1571 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1572 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1573 deprecation.
1574 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1575 YYFAIL from GCC cpp's -Wunused-macros.
1576 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1577 documentation.
1578 (LocalWords): Remove YYFAIL.
1579
1580 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1581
1582 Code cleanup.
1583 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1584 function, which is no longer used.
1585
1586 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1587
1588 Add gcc's -Wundef to test suite and fix another warning from it.
1589 * NEWS (2.4.2): Update description of -Wundef fix.
1590 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1591 (WARN_CFLAGS_TEST): New substitution.
1592 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1593 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1594 WARN_CFLAGS.
1595 (NO_WERROR_CFLAGS): Likewise.
1596 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1597
1598 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1599
1600 * data/yacc.c: Reformat m4 a little.
1601
1602 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1603
1604 Document gcc -Wundef fix.
1605 * NEWS (2.4.2): Here.
1606 * THANKS (Jonathan Nieder): Add.
1607
1608 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1609
1610 Simplify y.tab.c when location tracking is disabled.
1611 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1612 tracking is not enabled. Instead, unconditionally define
1613 YY_LOCATION_PRINT as a no-op for backward compatibility.
1614
1615 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1616
1617 Avoid warnings from gcc -Wundef y.tab.c.
1618 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1619 defined before using them.
1620 * data/lalr1.cc: Likewise.
1621 * data/yacc.c: Likewise.
1622
1623 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1624
1625 autoconf: update to latest for fix of M4 detection.
1626 Reported by Eric Blake.
1627 * submodules/autoconf: Update.
1628
1629 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1630
1631 portability: use -DGNULIB_POSIXCHECK.
1632 Reported by Eric Blake. See discussions at
1633 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1634 and
1635 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1636 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1637 * bootstrap.conf (gnulib_modules): Add all the printf modules
1638 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1639 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1640 (excluded_files): Remove m4/printf-posix.m4.
1641 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1642 lib/libbison.a so gnulib libraries can be linked.
1643
1644 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1645
1646 Enable assertion output and --disable-assert for configure.
1647 * bootstrap.conf (gnulib_modules): Add assert module.
1648 * src/system.h (aver): Define as assert, and summarize the
1649 discussion on this issue.
1650
1651 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1652
1653 Expand GLR acronym in summary of Bison.
1654 Based on discussion with Akim Demaille starting at
1655 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1656 * doc/bison.texinfo (Introduction): Here.
1657 * src/getargs.c (usage): Here.
1658
1659 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1660
1661 Document named references.
1662 * doc/bison.texinfo (Actions): Add new example and xref to
1663 Using Named References node.
1664 (Using Named References): New node.
1665
1666 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1667
1668 cleanup.
1669 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1670 of char*.
1671 (Sbitset__isEmpty): Use Sbitset instead of char*.
1672 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1673 instead of char. This helps to avoid casting errors.
1674 (Sbitset__or): Use Sbitset instead of char*.
1675
1676 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1677
1678 portability: don't assume 8-bit bytes.
1679 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1680 * src/Sbitset.h (Sbitset__nbytes): Here.
1681 (Sbitset__byteAddress): Here.
1682 (Sbitset__bit_mask): Here.
1683 (Sbitset__last_byte_mask): Here.
1684 (Sbitset__ones): Here.
1685 (SBITSET__FOR_EACH): Here.
1686
1687 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1688
1689 portability: use va_start and va_end in the same function.
1690 * src/complain.c (error_message): Move va_end from here...
1691 (ERROR_MESSAGE): ... to here.
1692
1693 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1694
1695 * data/bison.m4: Update comments for rename to muscle-tab.h.
1696
1697 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1698
1699 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1700 * src/Makefile.am (bison_SOURCES): Update.
1701 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1702 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1703 src/tables.c: Update include.
1704 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1705 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1706 include.
1707
1708 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1709
1710 Minor code cleanup.
1711 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1712 replace all uses with UNIQSTR_CONCAT.
1713 * src/uniqstr.c (uniqstr_vsprintf): New function.
1714 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1715 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1716 macros.
1717
1718 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1719
1720 Minor code cleanup.
1721 * src/parse-gram.y: Clean up sorting of declarations.
1722 Use types to simplify %printer declarations where possible.
1723 Provide %printer for BRACKETED_ID and symbol.prec.
1724 * src/symtab.c: Whitespace change.
1725
1726 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1727
1728 tests: skip tests of file names that platform does not support.
1729 Reported by Michael Raskin at
1730 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1731 * THANKS (Michael Raskin): Add.
1732 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1733 to fail at least for file names containing ":" or "\".
1734
1735 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1736
1737 yysyntax_error: avoid duplicate lookahead collection.
1738 Except when memory reallocation is required, this change
1739 eliminates the need to invoke yysyntax_error twice and thus to
1740 repeat the collection of lookaheads. It also prepares for
1741 future extensions that will make those repetitions more
1742 expensive and that will require additional memory management in
1743 yysyntax_error. Finally, it fixes an obscure bug already
1744 exercised in the test suite.
1745 * data/yacc.c (yysyntax_error): Add arguments for message
1746 buffer variables stored in the parser. Instead of size, return
1747 status similar to yyparse status but indicating success of
1748 message creation. Other than the actual reallocation of the
1749 message buffer, import and clean up memory management code
1750 from...
1751 (yyparse, yypush_parse): ... here.
1752 * tests/regression.at (%error-verbose overflow): No longer an
1753 expected failure.
1754
1755 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1756
1757 yysyntax_error: test memory management more.
1758 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1759 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1760 New test group.
1761 (%error-verbose overflow): New test group that reveals an
1762 obscure bug. Expected fail for now.
1763
1764 2008-12-11 Akim Demaille <demaille@gostai.com>
1765
1766 Pass the token type to yysyntax_error.
1767 * data/yacc.c (yysyntax_error): Take the transated token instead
1768 of the raw number.
1769 Adjust callers.
1770
1771 2008-12-11 Akim Demaille <demaille@gostai.com>
1772
1773 Simplify the i18n of the error messages.
1774 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1775 of building dynamically the format string.
1776
1777 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1778
1779 Remove dead code.
1780 * src/symtab.c (symbol_pack): Here because every symbol's number
1781 is always defined by this time.
1782
1783 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1784
1785 Add additional space after periods in NEWS.
1786 * NEWS (2.5): here.
1787
1788 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1789
1790 Use the correct conversion specifier for size_t.
1791 Reported by Jim Meyering.
1792 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1793 because Sbitset__Index is size_t.
1794 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1795
1796 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1797
1798 tests: don't abuse AT_BISON_CHECK.
1799 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1800 additional shell commands outside of AT_BISON_CHECK.
1801
1802 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1803
1804 tests: check that parse-gram.y's IELR and LALR are identical.
1805 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1806 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1807 group.
1808
1809 2009-09-16 Akim Demaille <demaille@gostai.com>
1810
1811 doc: comment changes.
1812 * doc/bison.texinfo: Comment changes.
1813
1814 2009-09-16 Akim Demaille <demaille@gostai.com>
1815
1816 doc: spell checking.
1817 * doc/bison.texinfo: here.
1818
1819 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1820
1821 Keep sub-messages aligned. Fix strings for translation.
1822 * src/location.h (location_print): Add return value.
1823 * src/location.c (location_print): Return number of printed
1824 characters.
1825 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1826 new functions.
1827 * src/complain.cpp (indent_ptr): New static variable.
1828 (error_message, complain_at_indent, warn_at_indent): Implement
1829 the alignment mechanism.
1830 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1831 for translations. Use new alignment mechanism.
1832 * tests/named-ref.at: Adjust test-cases.
1833 * NEWS (2.5): Add an announcement about named references.
1834
1835 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1836
1837 tests: clean up push.at test group titles.
1838 * tests/push.at: Remove "Push Parsing: " from test group titles
1839 because these are already under the banner "Push Parsing Tests".
1840
1841 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1842
1843 Provide an additional sub-message for clarity.
1844 Add "symbol not found in production" error message when
1845 an "invalid reference" is detected in named references
1846 resolution.
1847 * src/scan-code.l: Update "invalid reference" case.
1848 * tests/named-ref.at: Adjust test-cases.
1849
1850 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1851
1852 Clean up yacc.c a little.
1853 * data/yacc.c: Clean up M4 for readability, and make output
1854 whitespace more consistent. For the main parse function
1855 comment, instead of saying "yyparse or yypush_parse", say either
1856 "yyparse" or "yypush_parse" depending on which it actually is.
1857
1858 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1859
1860 Complain about unused %define variables and %code qualifiers.
1861 * NEWS (2.5): Document.
1862 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1863 * doc/bison.texinfo (Decl Summary): Document complaint, and
1864 improve %define documentation a little otherwise.
1865 * tests/input.at (Reject unused %code qualifiers): Update.
1866 (%define errors): Update.
1867 (%define, --define, --force-define): Update.
1868 (%define backward compatibility): Update.
1869 (Unused %define api.pure): Update.
1870 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1871
1872 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1873
1874 Use aver not assert.
1875 * src/output.c: Don't include assert.h.
1876 (output_skeleton): Use aver not assert.
1877 * src/system.h (aver): In documentation of why, add links to
1878 Paul Eggert's explanations in the mailing lists.
1879
1880 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1881
1882 Use "Unresolved reference" error message when no symbols were found
1883 in a symbolic reference resolution. Remove .expr and -expr from
1884 the shown reference when the reference is unresolved.
1885 * src/scan-code.l: Change the error message, adjust location columns,
1886 rename variable "exact_mode" to "explicit_bracketing".
1887 * tests/named-ref.at: Adjust existing tests and add a new one.
1888
1889 2009-09-03 Akim Demaille <demaille@gostai.com>
1890
1891 * NEWS (2.4.2): Add "Internationalization" item.
1892
1893 2009-09-03 Akim Demaille <demaille@gostai.com>
1894
1895 bootstrap: fix/improve find_tool.
1896 * bootstrap (find_tool): Improve error messages.
1897 Fix typo about find_tool_names.
1898
1899 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1900
1901 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1902 See
1903 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1904 * src/scan-code.h (code_props_rule_action_init): Rename
1905 named_ref arg to name so it doesn't shadow named_ref type. This
1906 makes it consistent with the function definition in scan-code.l
1907 anyway.
1908
1909 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1910
1911 %define: accept unquoted values.
1912 * NEWS (2.5): Group all %define changes together, and document
1913 this one. Remove quotes in IELR and canonical LR entry.
1914 * doc/bison.texinfo: Remove quotes in most examples throughout.
1915 (Decl Summary): Update %define documentation.
1916 (Table of Symbols): Likewise.
1917 * src/ielr.c (LrType): Update documentation.
1918 * src/parse-gram.y (content.opt): Add production for ID.
1919 * tests/calc.at: Remove quotes in most tests.
1920 * tests/existing.at: Likewise.
1921 * tests/input.at: Likewise.
1922 * tests/local.at: Likewise.
1923 * tests/push.at: Likewise.
1924 * tests/reduce.at: Likewise.
1925 * tests/torture.at: Likewise.
1926
1927 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1928
1929 %define lr.type: make values lowercase IDs.
1930 That is, "LALR" => "lalr", "IELR" => "ielr", and
1931 "canonical LR" => "canonical-lr".
1932 * NEWS (2.5): Update documentation.
1933 * doc/bison.texinfo (Decl Summary): Likewise.
1934 * src/ielr.c (ielr): Use new values.
1935 * src/ielr.h (ielr): Update documentation.
1936 * src/reader.c (prepare_percent_define_front_end_variables): Use
1937 and validate new values.
1938 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1939 grammars.
1940 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1941
1942 2009-08-27 Eric Blake <ebb9@byu.net>
1943
1944 scan-gram: avoid portability trap with ctype usage.
1945 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1946 Avoid compiler warning.
1947
1948 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1949
1950 tests: use perl for printing special sequences to files.
1951 And skip tests if perl is not available. This is better than
1952 playing tricks with shell portability. Suggested by Akim
1953 Demaille.
1954 * tests/input.at (Bad character literals): Use it here for
1955 omitting final newlines.
1956 (Bad escapes in literals): Use it here for special characters.
1957
1958 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1959
1960 tests: show a use of %define lr.default-reductions "consistent"
1961 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1962 prevents the omission of expected tokens for %error-verbose.
1963
1964 2009-08-26 Akim Demaille <demaille@gostai.com>
1965
1966 tests: portability fix.
1967 * tests/input.at (Bad escapes in literals): Don't expect "echo
1968 '\0'" to output \ then 0.
1969
1970 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1971
1972 Actually handle the yytable zero value correctly this time.
1973 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1974 mention zero values in the YYTABLE comments.
1975 * data/glr.c (yytable_value_is_error): Don't check for zero
1976 value.
1977 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1978 * data/yacc.c (yytable_value_is_error): Likewise.
1979 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1980 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1981 * src/tables.h: In header comments, explain why it's useless to
1982 check for a zero value in yytable.
1983
1984 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
1985
1986 More fixes related to last two patches.
1987 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1988 defined.
1989 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1990 yytable comments: zero indicates syntax error not default
1991 action.
1992 * data/glr.c (yyis_pact_ninf): Rename to...
1993 (yypact_value_is_default): ... this.
1994 (yyisDefaultedState): Update for rename.
1995 (yyis_table_ninf): Rename to...
1996 (yytable_value_is_error): ... this, and check for value zero
1997 besides just YYTABLE_NINF.
1998 (yygetLRActions): Check for default value from yypact. It
1999 appears that this check is always performed before this function
2000 is invoked, and so adding the check here is probably redundant.
2001 However, the code may evolve after this subtlety is forgotten.
2002 Also, update for rename to yytable_value_is_error. Because that
2003 macro now checks for zero, a different but equivalent branch of
2004 the if-then-else here is evaluated.
2005 (yyreportSyntaxError): Update for rename to
2006 yytable_value_is_error. The zero condition was mishandled
2007 before.
2008 (yyrecoverSyntaxError): Update for renames. No behavioral
2009 changes.
2010 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
2011 New function.
2012 (yy_table_value_is_error_): New function.
2013 (parse): Use new functions where possible. No behavioral
2014 changes.
2015 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
2016 The zero condition was mishandled before.
2017 * data/yacc.c (yyis_pact_ninf): Rename to...
2018 (yypact_value_is_default): ... this.
2019 (yyis_table_ninf): Rename to...
2020 (yytable_value_is_error): ... this, and check for value zero
2021 besides just YYTABLE_NINF.
2022 (yysyntax_error): Update for rename to yytable_value_is_error.
2023 The zero condition was mishandled before.
2024 (yyparse): Update for renames. No behavioral changes.
2025 * src/tables.h: Improve comments about yypact, yytable, etc.
2026 more. Most importantly, say yytable value of zero means syntax
2027 error not default action.
2028
2029 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2030
2031 Fix %error-verbose for conflicts resolved by %nonassoc.
2032 * NEWS (2.5): Document.
2033 * data/glr.c (yyreportSyntaxError): Fix this by checking
2034 yyis_table_ninf.
2035 * data/yacc.c (yysyntax_error): Likewise.
2036 * data/lalr1.cc (yysyntax_error_): Fix this by checking
2037 yytable_ninf_.
2038 * data/lalr1.java (yysyntax_error): Likewise.
2039 * tests/conflicts.at (%nonassoc and eof): Update expected output
2040 and remove FIXME.
2041
2042 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2043
2044 Some code and documentation improvements.
2045 * data/c.m4 (b4_table_value_equals): New macro to capture
2046 some repeated code.
2047 * data/glr.c (yyis_pact_ninf): Use it here.
2048 (yyis_table_ninf): Likewise.
2049 (yyreportSyntaxError): Improve internal comments.
2050 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
2051 Use it everywhere possible.
2052 (yyis_table_ninf): Likewise.
2053 (yysyntax_error): Improve internal comments.
2054 * data/lalr1.cc (yysyntax_error_): Likewise.
2055 * data/lalr1.java (yysyntax_error): Likewise.
2056 * src/tables.h: Improve comments about yypact, yytable, etc.
2057
2058 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
2059
2060 Use locale when quoting.
2061 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
2062 quote rather than implementing quoting here.
2063
2064 2009-08-20 Eric Blake <ebb9@byu.net>
2065
2066 Make previous patch more robust.
2067 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
2068 argmatch.h.
2069 (output_skeleton): Use it.
2070 Suggested by Akim Demaille.
2071
2072 Import latest m4/m4.m4.
2073 * submodules/autoconf: Update to autoconf 2.64.
2074 * configure.ac (M4_GNU_OPTION): New define.
2075 * src/output.c (output_skeleton): Use it to resolve FIXME.
2076 * NEWS: Mention this.
2077
2078 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
2079
2080 Fix complaints about escape sequences.
2081 Discussed starting at
2082 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
2083 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
2084 For a \0 and similar escape sequences meaning the null
2085 character, report an invalid escape sequence instead of an
2086 invalid null character because the latter does not actually
2087 appear in the user's input.
2088 In all escape sequence complaints, don't escape the initial
2089 backslash, and don't quote when the sequence appears at the end
2090 of the complaint line unless there's whitespace that quotearg
2091 won't escape.
2092 Consistently say "invalid" not "unrecognized".
2093 Consistently prefer "empty character literal" over "extra
2094 characters in character literal" warning for invalid escape
2095 sequences; that is, consistently discard those sequences.
2096 * tests/input.at (Bad escapes in literals): New.
2097
2098 2009-08-19 Akim Demaille <demaille@gostai.com>
2099
2100 doc: fixes.
2101 * doc/bison.texinfo: Fix minor Texinfo errors.
2102
2103 2009-08-19 Akim Demaille <demaille@gostai.com>
2104
2105 doc: %initial-action to initialize yylloc.
2106 Reported by Bill Allombert.
2107 * doc/bison.texinfo: Set fill-column to 76.
2108 (Location Type): Document the use of %initial-action to initialize
2109 yylloc.
2110
2111 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
2112
2113 maint: update for gnulib's recent update-copyright changes
2114 * gnulib: Update.
2115 * .x-update-copyright (COPYING): Add as it's no longer implied
2116 when .x-update-copyright is present.
2117 * cfg.mk (update-copyright-local): Remove, now ignored.
2118 (update-copyright): Declare update-b4-copyright as a dependency.
2119
2120 2009-08-17 Akim Demaille <demaille@gostai.com>
2121
2122 build: require gettext 0.17.
2123
2124 Suggested by Bruno Haible.
2125 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
2126 * configure.ac: require gettext 0.17 to ensure compatibility with
2127 gnulib.
2128
2129 2009-08-17 Akim Demaille <demaille@gostai.com>
2130
2131 build: lower gettext requirements.
2132
2133 Bison was uselessly requiring the formatstring macros from
2134 gettext, which resulted in mo files not being installed on systems
2135 that perfectly supported Bison mo files. Lower the requirement.
2136 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
2137
2138 * configure.ac: Require need-ngettext instead of
2139 need-formatstring-macros.
2140 Reported by Martin Jabocs.
2141 Suggested by Bruno Haible.
2142 * INSTALL: Restructure.
2143 (Internationalization): New.
2144
2145 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
2146
2147 maint: fix use of copyright year intervals.
2148 * gnulib: Update.
2149 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
2150 as now recommended in gnulib/NEWS.
2151 * build-aux/update-b4-copyright: Fix.
2152 * cfg.mk (update-copyright-env): Configure update-copyright.
2153
2154 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
2155
2156 Make it easier to write deterministic tests.
2157 Continues Akim's work from his 2009-06-10 commits.
2158 * src/reader.c (check_and_convert_grammar): Don't add any
2159 symbols after the first symbols_do invocation.
2160 * src/symtab.c (symbols_sorted): New static global.
2161 (user_token_number_redeclaration): Update comments.
2162 (symbol_from_uniqstr): If a new symbol is being created, assert
2163 that symbols_sorted hasn't been allocated yet.
2164 (symbols_free): Free symbols_sorted.
2165 (symbols_cmp, symbols_cmp_qsort): New functions.
2166 (symbols_do): Sort symbol_table into symbols_sorted on first
2167 invocation.
2168 * tests/input.at (Numbered tokens): Recombine tests now that the
2169 output should be deterministic across multiple numbers.
2170
2171 2009-08-12 Akim Demaille <demaille@gostai.com>
2172
2173 distcheck: fix.
2174
2175 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
2176
2177 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2178
2179 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
2180
2181 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2182
2183 Miscellaneous code readability improvements.
2184
2185 * src/reader.c (reader): Move %define front-end variable
2186 defaults and checking into...
2187 (prepare_percent_define_front_end_variables): ... this new
2188 function.
2189
2190 * src/scan-gram.l (INITIAL): For consistency with string
2191 literals, don't store open quote on character literal. It's
2192 discarded before returning anyway.
2193 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2194 Make length test more readable, and make the character stored
2195 for an empty literal more obvious while consistent with the
2196 previous behavior.
2197
2198 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2199 USER_NUMBER_HAS_STRING_ALIAS throughout.
2200 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2201 that is repeated in symtab.h. Improve argument names to make it
2202 clear which side of the symbol-string alias pair is which.
2203 (symbol_check_alias_consistency): Improve local variable names
2204 for the same purpose.
2205 * src/symtab.h (struct symbol): Make comments about aliases
2206 clearer.
2207 (symbol_make_alias): Improve comments and argument name.
2208 * src/output.c (token_definitions_output): Update for rename to
2209 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2210
2211 2009-08-08 Alex Rozenman <rozenman@gmail.com>
2212
2213 Convert "misleading reference" messages to warnings.
2214 * src/scan-code.l: New function 'show_sub_messages', more
2215 factoring.
2216 * tests/named-ref.at: Adjust tests.
2217
2218 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2219
2220 maint: run "make update-copyright"
2221
2222 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2223
2224 maint: make update-b4-copyright easier to use
2225 * build-aux/update-b4-copyright: In warnings, report line
2226 numbers rather than character positions.
2227 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2228 that update-copyright runs it.
2229 * gnulib: Update.
2230
2231 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
2232
2233 maint: clean up update-b4-copyright code
2234 * build-aux/update-b4-copyright: Do not accept 2-digit
2235 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2236 Don't accept a `[' in a b4_copyright argument.
2237 Format code more consistently.
2238 Don't assume b4*copyright never occurs.
2239
2240 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2241
2242 maint: automate b4_copyright updates.
2243 * Makefile.am (update-b4-copyright): New target rule.
2244 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
2245 * build-aux/update-b4-copyright: New.
2246 * data/yacc.c: Remove stray characters around b4_copyright
2247 invocations.
2248
2249 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2250
2251 maint: automate annual package-wide copyright-year update.
2252 * .x-update-copyright: New.
2253 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2254 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2255 update-copyright. Remove gnumakefile, which is implied by
2256 maintainer-makefile.
2257 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2258 * gnulib: Update.
2259 * maint.mk: Remove, now copied from gnulib.
2260 * examples/extexi: Add missing "(C)" in copyright statement so
2261 update-copyright can recognize it.
2262 * src/LR0.h: Likewise.
2263 * src/print.h: Likewise.
2264 * src/print_graph.h: Likewise.
2265 * src/gram.c: Add missing comma in copyright statement.
2266 * src/gram.h: Likewise.
2267
2268 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2269
2270 Fix "make distcheck".
2271 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2272 of just calc.stamp.
2273
2274 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
2275
2276 Pacify "gcc -Wunused" for the input function from Flex.
2277 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2278 and later.
2279 * src/scan-code.l: Add "%option noinput", which I cannot find in
2280 the Flex manual, but which Flex has supported since at least as
2281 far back as 2.5.4. However, if any of our developers still use
2282 Flex 2.5.4, they'll need to stop configuring with
2283 --enable-gcc-warnings because "%option noinput" didn't work
2284 correctly until Flex 2.5.6.
2285 * src/scan-gram.l: Likewise.
2286 * src/scan-skel.l: Likewise.
2287
2288 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2289
2290 Fix --enable-gcc-warnings problems.
2291 * src/reader.c: Adjust variable names.
2292 * src/scan-code.l: Fix prototypes and adjust names.
2293 * src/named-ref.c: Remove redundant "if".
2294
2295 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2296
2297 Fix a --enable-gcc-warnings problem.
2298 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2299 variable.
2300
2301 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2302
2303 Fix some memory leaks.
2304 * src/named-ref.c: Add a pointer check (named_ref_free).
2305 * src/scan-code.l: New function (variant_table_free). Called in
2306 code_scanner_free.
2307 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2308
2309 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2310
2311 Warn about character literals not of length one.
2312 * NEWS (2.5): Document.
2313 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2314 the length.
2315 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2316 * tests/input.at (Bad character literals): New test group.
2317
2318 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2319
2320 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2321
2322 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2323
2324 Some M4 cleanup in the testsuite.
2325 Suggested by Eric Blake at
2326 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2327 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2328 complicate the code by distinguishing between a missing value
2329 and an empty string value for an optional argument. This fix is
2330 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2331 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2332 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2333 arguments are not needed because of the following changes.
2334 Fix stale comments.
2335 Bison developers should use GNU M4 and should not use
2336 POSIXLY_CORRECT when building the test suite, so do not
2337 complicate the code by avoiding $10 and above.
2338 Do not quote an empty string value for an optional argument, and
2339 do not distinguish between a missing value and an empty string
2340 value.
2341
2342 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
2343
2344 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
2345
2346 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2347
2348 Revert unnecessary column realignment in --help output.
2349 Reported by Akim Demaille at
2350 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2351 * src/getargs.c (usage): Here.
2352
2353 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2354
2355 Alphabetical order in src/Makefile.am.
2356 * src/Makefile.am: Adjust.
2357
2358 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2359
2360 Style changes and factoring.
2361 * src/named-ref.h: Add comments.
2362 * src/parse-gram.y: Readability and style changes.
2363 * src/reader.c: Factoring: assign_named_ref function.
2364 * src/scan-code.l: Factoring and style changes. Rename
2365 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2366 Use "unsigned" type for variant index. Improve readablity.
2367 * src/scan-gram.l: Change error messages and add comments.
2368 * src/symlist.h: symbol_list_null: New function decl.
2369 * src/symlist.c: symbol_list_null: Implement here.
2370 * tests/named-refs.at: Adjust for new error messages.
2371
2372 2009-06-29 Eric Blake <ebb9@byu.net>
2373
2374 scan-code: avoid compiler warnings
2375 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2376
2377 2009-06-29 Akim Demaille <demaille@gostai.com>
2378
2379 build: avoid concurrent extraction of calc++.
2380 * examples/calc++/Makefile.am (calc.stamp): New.
2381 Depend on it to create the sources of calc++ so that concurrent
2382 builds don't launch several "extexi" in parallel.
2383 Not only this is inefficient, this also builds incorrect sources
2384 with several extractions mixed together.
2385
2386 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2387
2388 Implement support for named symbol references.
2389 * src/parse-gram.y: Add new syntax (named_ref.opt).
2390 * src/reader.c: Store named refs in symbol lists.
2391 * src/reader.h: New argument for symbol_append and
2392 action_append functions.
2393 * src/scan-code.h: Add new field (named_ref) into
2394 code_props data structure. Keeps named ref of midrule
2395 actions.
2396 * src/scan-code.l: Support for named refs in semantic
2397 action code. New function 'parse_named_ref'.
2398 * src/scan-gram.l: Support bracketed id.
2399 * src/symlist.c: Store named refs in symbol lists.
2400 * src/symlist.h: New field in symbol list: named_ref.
2401 * src/named-ref.h: New file, a struct for named_ref.
2402 * src/named-ref.cp: New file, named_ref_new function.
2403 * src/local.mk: Add two new files.
2404 * tests/testsuite.at: Include new test group:
2405 * tests/named-refs.at: this new file.
2406
2407 2009-06-25 Akim Demaille <demaille@gostai.com>
2408
2409 hash: check insertion for memory exhaustion.
2410 * src/uniqstr.c (uniqstr_new): New.
2411
2412 2009-06-11 Akim Demaille <demaille@gostai.com>
2413
2414 style changes.
2415 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2416 * src/print-xml.c: Style changes.
2417 * tests/conflicts.at: Comment changes.
2418
2419 2009-06-11 Akim Demaille <demaille@gostai.com>
2420
2421 xml: beware of user strings used to give a %prec to rules.
2422 * tests/conflicts.at (%prec with user strings): New.
2423 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2424 XML output.
2425
2426 2009-06-11 Akim Demaille <demaille@gostai.com>
2427
2428 hash: check insertion for memory exhaustion.
2429 * src/muscle-tab.c (muscle_insert, muscle_grow)
2430 * src/state.c (state_hash_insert): Check the return value of
2431 hash_insert.
2432
2433 2009-06-10 Akim Demaille <demaille@gostai.com>
2434
2435 deterministic test suite.
2436 Some consistency checks on symbols are performed after all the
2437 symbols were read, by an iteration over the symbol table. This
2438 traversal is nondeterministic, which can be a problem for test
2439 cases.
2440 Avoid this.
2441 Addresses another form of nondeterminism reported by Joel E. Denny.
2442 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2443
2444 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2445 test in two.
2446 Use different file names for the three tests to make the
2447 maintenance easier.
2448
2449 2009-06-10 Akim Demaille <demaille@gostai.com>
2450
2451 deterministic user-token-number redeclaration errors.
2452 Address nondeterminism reported by Joel E. Denny.
2453 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2454
2455 * src/uniqstr.h: Comment changes.
2456 * src/location.h (boundary_cmp, location_cmp): New.
2457 * src/symtab.c (user_token_number_redeclaration): New.
2458 (symbol_translation): Use it.
2459 * tests/input.at (Numbered tokens): Adjust the expected output.
2460
2461 2009-05-25 Akim Demaille <demaille@gostai.com>
2462
2463 gnulib: update.
2464 * gnulib: Update to latest.
2465 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2466 * m4/.gitignore: Regen.
2467 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2468 Call xalloc_die on hash_insert failures.
2469 Requested by the new __warn_unused_result__ attribute of
2470 hash_insert.
2471
2472 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2473
2474 Convert multiple variable definition warnings to complaints.
2475 * NEWS (2.5): Add a new entry for that change.
2476 * doc/bison.texinfo (Decl Summary): Update %define entry.
2477 (Bison Options): Update -D/--define/-F/--force-define entry.
2478 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
2479 * src/muscle_tab.h (muscle_percent_define_insert): Update
2480 comments.
2481 * tests/input.at (`%define errors'): Update.
2482 (`%define, --define, --force-define'): Update.
2483
2484 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2485
2486 -F/--force-define and relative %define/-D/--define priorities.
2487 * NEWS (2.5): Add documentation to -D/--define entry.
2488 * build-aux/cross-options.pl: Hard-code association of
2489 --force-define with %define.
2490 * doc/bison.texinfo (Decl Summary): In %define entry,
2491 cross-reference command-line options.
2492 (Bison Options): Add documentation to -D/--define entry.
2493 (Option Cross Key): Widen column for --force-define row.
2494 * src/getargs.c (usage): Document -F/--force-define. Realign
2495 options in output.
2496 (short_options, long_options, getargs): Parse -F/--force-define,
2497 and update muscle_percent_define_insert invocation.
2498 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2499 (muscle_percent_define_insert): Add argument with that type.
2500 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2501 -F/--force-define behavior and priorities.
2502 * src/parse-gram.y (prologue_declaration): Update
2503 muscle_percent_define_insert invocations.
2504 * tests/input.at (`%define, --define'): Rename to...
2505 (`%define, --define, --force-define'): ... this and extend.
2506
2507 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2508
2509 Update some comments to make sense for -D.
2510 * data/bison.m4 (b4_check_user_names): In header comments, say
2511 "user occurrence" instead of "grammar occurrence".
2512 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2513 (muscle_percent_code_grow): Likewise just for consistency.
2514
2515 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2516
2517 * data/c++.m4: Update copyright year.
2518
2519 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2520
2521 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2522
2523 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2524
2525 Handle a trailing `:' in a user-supplied C++ namespace better.
2526 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2527 among the closing braces here. This fix might make the
2528 generated code easier to debug, but otherwise it should be
2529 insignificant because a trailing `:' is a C++ error already.
2530
2531 2009-05-19 Akim Demaille <demaille@gostai.com>
2532
2533 remove useless variable.
2534 * src/getargs.c (skeleton_arg): Remove now useless variable.
2535 Should help the compiler see that this printf-like call is sane.
2536
2537 2009-05-11 Akim Demaille <demaille@gostai.com>
2538
2539 doc: use C++ headers.
2540 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2541 headers.
2542
2543 2009-05-05 Akim Demaille <demaille@gostai.com>
2544
2545 fix hexadecimal token number support.
2546 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2547
2548 2009-05-05 Akim Demaille <demaille@gostai.com>
2549
2550 tests: check token numbers.
2551 * tests/input.at (Numbered tokens): New.
2552
2553 2009-05-04 Akim Demaille <demaille@gostai.com>
2554
2555 bison: catch bad symbol names.
2556 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2557 * tests/input.at: Adjust.
2558
2559 2009-05-04 Akim Demaille <demaille@gostai.com>
2560
2561 space changes.
2562 * src/scan-gram.l: Untabify to be robust to zealous editors.
2563
2564 2009-05-04 Akim Demaille <demaille@gostai.com>
2565
2566 identifiers: dashes are letters.
2567 Dashes can now start identifiers (symbols and directives).
2568
2569 * src/scan-gram.l ({letter}): Add dash.
2570 ({id}): Remove it.
2571 * tests/input.at (Symbols): Adjust.
2572 Remove stray comment.
2573 * tests/regression.at (Invalid inputs): Adjust error message.
2574 * doc/bison.texinfo (Symbols): Update.
2575
2576 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2577
2578 Declare %code to be a permanent feature.
2579 * NEWS (2.4.2): Here.
2580 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2581 experimental.
2582 (Decl Summary): Likewise.
2583
2584 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2585
2586 Convert underscores to dashes in some %define variable names.
2587 For now, just api.push-pull and lr.keep-unreachable-states.
2588 Maintain old names for backward compatibility.
2589 * NEWS (2.5): Document.
2590 * data/c.m4 (b4_identification): Update comment.
2591 * data/yacc.c: Update access.
2592 * doc/bison.texinfo: Update.
2593 * etc/bench.pl.in (bench_grammar): Update use.
2594 * src/files.c (tr): Move to...
2595 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2596 think of a better place to expose it. My logic is that, for all
2597 uses of tr so far, command-line arguments can be involved, and
2598 getargs.h is already included.
2599 * src/main.c (main): Update access.
2600 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2601 variable names to new variable names before assigning value.
2602 * src/reader.c (reader): Update setting default.
2603 * tests/calc.at: Update uses.
2604 * tests/conflicts.at (Unreachable States After Conflict
2605 Resolution): Update use.
2606 * tests/input.at (%define enum variables): Update use.
2607 (%define backward compatibility): New test group.
2608 * tests/push.at: Update uses.
2609 * tests/reduce.at: Update uses.
2610 * tests/torture.at: Update uses.
2611
2612 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2613
2614 Set all front-end %define defaults in one place.
2615 * src/main.c (main): Move lr.keep_unreachable_states default...
2616 * src/reader.c (reader): ... to here.
2617
2618 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2619
2620 Rename lr.default_reductions to lr.default-reductions.
2621 * NEWS (2.5): Here.
2622 * doc/bison.texinfo: Here.
2623 * src/lalr.c (initialize_LA): Here.
2624 * src/print.c (print_reductions): Here.
2625 * src/reader.c (reader): Here.
2626 * src/tables.c (action_row): Here.
2627 * tests/input.at (%define enum variables): Here.
2628 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2629
2630 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2631
2632 Pacify ./configure --enable-gcc-warnings.
2633 * tests/input.at (Symbols): Prototype yyerror and yylex.
2634
2635 2009-04-21 Akim Demaille <demaille@gostai.com>
2636
2637 tests: check the use of dashes and periods in symbols.
2638 * tests/input.at (Symbol): New test group.
2639
2640 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2641
2642 Document how `%define "var" "value"' is not M4-friendly.
2643 * src/parse-gram.y (variable): In comments here.
2644
2645 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2646
2647 Add copyright updates missed during previous cherry pick.
2648 * src/output.c: Here.
2649 * src/parse-gram.y: Here.
2650 * src/scan-gram.l: Here.
2651
2652 2009-04-20 Akim Demaille <demaille@gostai.com>
2653
2654 variables: accept dashes.
2655 * src/scan-gram.l ({id}): Also accept dashes after the initial
2656 letter.
2657 ({directive}): Use {id}.
2658 * src/parse-gram.y: Comment and formatting changes.
2659 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2660 symbols.
2661 * src/complain.h, src/complain.c (yacc_at): New.
2662 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2663 symbol names.
2664 * src/output.c (token_definitions_output): Do not #define token
2665 names with dashes.
2666
2667 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2668
2669 Clean up recent patches a little.
2670 Reported by Akim Demaille.
2671 * doc/bison.texinfo (Understanding): Fix typos.
2672 * src/print.c (print_reductions): Don't use negated variable.
2673
2674 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2675
2676 List accepted values for a %define enum variable with an invalid value.
2677 Suggested by Akim Demaille at
2678 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2679 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2680 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2681 * tests/input.at (%define lr.default_reductions invalid values): Merge
2682 into...
2683 (%define enum variables): ... here, and update output.
2684
2685 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2686
2687 Rename "default rule" to "default reduction".
2688 This includes changing variable names in code, changing
2689 comments, and renaming %define lr.default_rules to %define
2690 lr.default_reductions.
2691 * NEWS (2.5): Update IELR documentation.
2692 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2693 Adjust YYDEFACT and yydefact_ documentation.
2694 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2695 and lr.type documentation. Make some other wording
2696 improvements.
2697 (Glossary): Adjust cross-references and Default Reduction
2698 definition.
2699 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2700 Remove a confusing comment pointed out by Akim Demaille.
2701 (initialize_LA): Adjust code.
2702 * src/print-xml.c (print_reductions): Adjust code.
2703 * src/print.c (print_reductions): Adjust code.
2704 * src/reader.c (reader): Adjust code.
2705 * src/tables.c (action_row): Adjust code.
2706 (token_actions): Adjust code.
2707 * src/tables.h: Adjust YYDEFACT documentation.
2708 * tests/input.at (%define lr.default_rules invalid values):
2709 Rename test group to...
2710 (%define lr.default_reductions invalid values): ... this, and
2711 update grammar file and expected output.
2712 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2713 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2714
2715 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2716
2717 Document %define lr.type and lr.default_rules.
2718 * NEWS (2.5): Add an entry.
2719 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2720 besides just LALR(1) and GLR(1).
2721 * doc/bison.texinfo (Introduction): Likewise.
2722 (Language and Grammar): Bison is no longer limited to LALR(1)
2723 restrictions.
2724 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2725 when trying to distinguish from GLR. Talk about LR(1) grammars
2726 rather than LALR(1) grammars.
2727 (Decl Summary): In %define api.push_pull entry, say it applies
2728 to deterministic parsers in C rather than LALR(1) parsers in C.
2729 Add lr.default_rules entry.
2730 Add lr.type entry.
2731 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2732 restrictions.
2733 (Generalized LR Parsing): Same changes as for the previous GLR
2734 section.
2735 (Memory Management): Say deterministic rather than LALR(1).
2736 (Understanding): Correct some bison output.
2737 Index discussion of "accepting state".
2738 Say deterministic rather than LALR(1).
2739 (Bison Options): In --yacc entry, say deterministic rather than
2740 LALR(1).
2741 In --report, --graph, and --xml entries, just don't mention
2742 LALR(1).
2743 (C++ Parsers): Say deterministic rather than LALR(1).
2744 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2745 (Glossary): Add Accepting State, Consistent State, Default Rule,
2746 and IELR(1) definitions.
2747 In Generalized LR (GLR) definition, make same changes as in
2748 previous GLR sections.
2749 In LALR(1) definition, say Bison uses LALR(1) by default rather
2750 than implying Bison is limited to LALR(1).
2751 (LocalWords): Add IELR.
2752
2753 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2754
2755 Finish implementing %define lr.type.
2756 Its value can be "LALR", "IELR", or "canonical LR".
2757 * lib/timevar.def (TV_IELR_PHASE1): New var.
2758 (TV_IELR_PHASE2): New var.
2759 (TV_IELR_PHASE3): New var.
2760 (TV_IELR_PHASE4): New var.
2761 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2762 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2763 Sbitset.h, ielr.h, and ielr.c.
2764 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2765 trace_types): Add trace_ielr.
2766 * src/lalr.h, src/lalr.c (ngotos): Export it.
2767 (F): Rename to...
2768 (goto_follows): ... this, update all uses, and export it.
2769 (set_goto_map): Export it.
2770 (map_goto): Export it.
2771 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2772 handled in ielr.
2773 (initialize_LA): Export it. Move lookback allocation to...
2774 (lalr): ... here because, for canonical LR, initialize_LA must
2775 be invoked but lookback and much of the rest of LALR isn't
2776 needed.
2777 * main.c (main): Instead of lalr, invoke ielr, which invokes
2778 lalr.
2779 * src/reader.c (reader): Default lr.type to "LALR".
2780 Default lr.default_rules to "accepting" if lr.type is "canonical
2781 LR". Leave the default as "all" otherwise.
2782 Check for a valid lr.type value.
2783 * src/state.h, src/state.c (struct state_list): Add state_list
2784 member.
2785 (state_new): Initialize state_list member to NULL.
2786 (state_new_isocore): New function, exported.
2787 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2788 exercises all values of lr.type.
2789 (GNU AWK Grammar): Rename test group to...
2790 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2791 AT_TEST_EXISTING_GRAMMAR.
2792 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2793 (GNU pic Grammar): Rename test group to...
2794 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2795 AT_TEST_EXISTING_GRAMMAR.
2796 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2797 all values of lr.type.
2798 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2799 (Lane Split): Likewise.
2800 (Complex Lane Split): Likewise.
2801 (Split During Added Lookahead Propagation): Likewise.
2802
2803 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2804
2805 Add new files for IELR and canonical LR implementation.
2806 * src/AnnotationList.c: New.
2807 * src/AnnotationList.h: New.
2808 * src/InadequacyList.c: New.
2809 * src/InadequacyList.h: New.
2810 * src/Sbitset.c: New.
2811 * src/Sbitset.h: New.
2812 * src/ielr.c: New.
2813 * src/ielr.h: New.
2814
2815 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2816
2817 Implement %define lr.default_rules.
2818 Its value describes the states that are permitted to contain
2819 default rules: "all", "consistent", or "accepting".
2820 * src/reader.c (reader): Default lr.default_rules to "all".
2821 Check for a valid lr.default_rules value.
2822 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2823 is "accepting", then only mark the accepting state as
2824 consistent.
2825 (initialize_LA): Tell state_lookahead_tokens_count whether
2826 lr.default_rules is "accepting".
2827 * src/tables.c (action_row): If lr.default_rules is not "all",
2828 then disable default rules in inconsistent states.
2829 * src/print.c (print_reductions): Use this opportunity to
2830 perform some assertions about whether lr.default_rules was
2831 obeyed correctly.
2832 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2833 helps with checking the parser tables for a grammar.
2834 * tests/input.at (%define lr.default_rules invalid values): New
2835 test group.
2836 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2837 AT_TEST_TABLES_AND_PARSE.
2838 (`no %define lr.default_rules'): New test group generated by
2839 AT_TEST_LR_DEFAULT_RULES.
2840 (`%define lr.default_rules "all"'): Likewise.
2841 (`%define lr.default_rules "consistent"'): Likewise.
2842 (`%define lr.default_rules "accepting"'): Likewise.
2843
2844 2009-04-20 Akim Demaille <demaille@gostai.com>
2845
2846 Consistently refer to Yacc, not YACC.
2847 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2848
2849 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2850
2851 Pacify make maintainer-check-posix.
2852 * tests/input.at (%define, --define): Move bison command-line
2853 options before grammar file name.
2854
2855 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2856
2857 Document semicolon warnings.
2858 * NEWS (2.5): Here.
2859
2860 2008-12-08 Akim Demaille <demaille@gostai.com>
2861
2862 Fix portability issue in the test suite.
2863 * tests/local.at (AT_MATCHES_CHECK): New.
2864 Based on Perl instead of Sed. Sed has too many portability
2865 pitfalls, not ever Sed is GNU Sed.
2866 * tests/actions.at (Fix user actions without a trailing semicolon):
2867 Use it.
2868
2869 2008-12-07 Di-an Jan <dianj@freeshell.org>
2870
2871 Implement the FIXME that ends an user action with a semicolon
2872 if it seems necessary.
2873 * src/scan-code.l (flex rules section): Flag cpp directive from
2874 any `#' to the first unescaped end-of-line. Semicolon is not
2875 needed after `;', `{', '}', or cpp directives and is needed after
2876 any other token (whitespaces and comments have no effect).
2877 * tests/actions.at (Fix user actions without a trailing semicolon):
2878 New test.
2879 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2880 to make user actions complete statements.
2881 Adjust column numbers in error messages.
2882 * tests/regression.at (Fix user actions without a trailing semicolon):
2883 Remove. Covered by new test.
2884
2885 2009-04-14 Akim Demaille <demaille@gostai.com>
2886
2887 doc: minor fixes.
2888 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2889 (Table of Symbols): Remove duplicate entry for %debug.
2890
2891 2009-04-10 Eric Blake <ebb9@byu.net>
2892
2893 submodules: update to latest
2894 * submodules/autoconf: Use latest upstream Autoconf.
2895
2896 2009-04-06 Eric Blake <ebb9@byu.net>
2897
2898 Work around autoconf 2.63b bug in testsuite.
2899 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2900 autoconf bug related to # in test.
2901
2902 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2903
2904 * NEWS (2.5): Describe new -D/--define feature.
2905
2906 2008-11-10 Akim Demaille <demaille@gostai.com>
2907
2908 --trace=muscles
2909 * src/getargs.h, src/getargs.c (trace_muscle): New.
2910 (trace_types, trace_args): Support it.
2911 * src/output.c (output_skeleton): Use it.
2912
2913 2008-11-10 Akim Demaille <demaille@gostai.com>
2914
2915 muscles_output.
2916 * src/output.c (muscles_output): New, extracted from...
2917 (output_skeleton): here.
2918 Adjust.
2919
2920 2008-11-21 Akim Demaille <demaille@gostai.com>
2921
2922 Display the changes in cross-options.texi.
2923 * build-aux/cross-options.pl ($sep): New, to separate items.
2924 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2925 the changes.
2926
2927 2008-11-20 Di-an Jan <dianj@freeshell.org>
2928
2929 Improves options in the manual.
2930 * doc/bison.texinfo (-g, -x): Add space before argument.
2931 (Option Cross Key): Implement FIXME: listing directives also.
2932 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2933 (Short Option): Special case -d. Put arguments inside @option.
2934 (Bison Directive): Add column, automatically extracted from
2935 src/scan-gram.l (actual name passed as the first argument)
2936 with special case for %define.
2937 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2938 to build-aux/cross-options.pl.
2939 * src/getargs.c (usage): Document limitations of cross-options.pl.
2940 * src/scan-gram.l: Likewise.
2941
2942 2009-02-25 Akim Demaille <demaille@gostai.com>
2943
2944 Copyright years.
2945 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2946
2947 2008-12-08 Akim Demaille <demaille@gostai.com>
2948
2949 Install autoconf as a submodule to get m4sugar.
2950 * .gitmodules: Add submodules/autoconf.
2951 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2952 submodules/autoconf.
2953
2954 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2955
2956 Simplify last patch slightly.
2957 * src/getargs.c (getargs): Here.
2958
2959 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2960
2961 Fix last warning from --enable-gcc-warnings.
2962 * src/getargs.c (getargs): Don't assign const address to non-const
2963 pointer.
2964
2965 2008-11-17 Di-an Jan <dianj@freeshell.org>
2966
2967 Handle --enable-gcc-warnings.
2968 * src/getargs.c (command_line_location): Set parameters to void.
2969
2970 2008-11-11 Akim Demaille <demaille@gostai.com>
2971
2972 AT_FULL_COMPILE.
2973 * tests/actions.at, tests/regression.at: Use it.
2974
2975 2008-11-07 Akim Demaille <demaille@gostai.com>
2976
2977 Pass command line location to skeleton_arg and language_argmatch.
2978 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2979 The location argument is now mandatory.
2980 Adjust all dependencies.
2981 (getargs): Use command_line_location.
2982
2983 2008-11-07 Akim Demaille <demaille@gostai.com>
2984
2985 -D, --define.
2986 * src/getargs.c (usage): Document -D.
2987 Fix help string for --locations.
2988 (command_line_location): New.
2989 (short_options, long_options, getargs): Support -D, --define.
2990 (getargs): Move -d support at the right place.
2991 * doc/bison.texinfo (Bison Options): Update.
2992 * tests/input.at (%define, --define): New.
2993
2994 2008-11-07 Akim Demaille <demaille@gostai.com>
2995
2996 Initialize the muscle table before parsing the command line.
2997 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2998 (getargs): Define file_name.
2999 * src/main.c (main): Initialize muscle_tab before calling
3000 getargs.
3001 * src/muscle_tab.c (muscle_init): No longer define file_name, as
3002 its value is not available yet.
3003
3004 2008-11-09 Akim Demaille <demaille@gostai.com>
3005
3006 Require the generation of parse-gram.output.
3007 * src/Makefile.am (YACC): Pass --report=all.
3008
3009 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3010
3011 * NEWS (2.5): New stub.
3012
3013 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3014
3015 Fix options documentation.
3016 * build-aux/cross-options.pl: As in --help output, write optional
3017 arguments as [=ARG] not =[ARG].
3018 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
3019
3020 2008-11-07 Akim Demaille <demaille@gostai.com>
3021
3022 Fix --help.
3023 * src/getargs.c (usage): Fix help string for -W.
3024
3025 2008-11-07 Akim Demaille <demaille@gostai.com>
3026
3027 Handle more general types of option arguments.
3028 * build-aux/cross-options.pl: The argument ends at the first
3029 space, not the first non-symbol character.
3030 Use @var for each word appearing the argument description.
3031
3032 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3033
3034 Remove spurious initial empty lines.
3035 * data/location.cc: End the @output lines with an @.
3036
3037 2008-11-04 Akim Demaille <demaille@gostai.com>
3038
3039 Remove spurious initial empty lines.
3040 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3041 * data/yacc.c: End the @output lines with an @.
3042
3043 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3044
3045 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
3046 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
3047 requirements for a correct m4 are stricter.
3048 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
3049 * configure.ac: Update to use AC_PROG_GNU_M4.
3050 Reported by Eric Blake.
3051
3052 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3053
3054 Help with updating web manual.
3055 * HACKING: Incorporate instructions from gnulib/doc/README.
3056 * bootstrap.conf (gnulib_modules): Add gendocs.
3057
3058 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3059
3060 Fix strange %define locations for default values.
3061 Reported by Akim Demaille at
3062 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
3063 and discussed again starting at
3064 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
3065 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
3066 because location information is bogus.
3067 Use angle brackets to delimit fake file name because square brackets
3068 look like underexpanded m4. Choose a better fake file name.
3069 Use negative line numbers.
3070 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
3071 * src/location.c (location_print): If line for a boundary is negative,
3072 only print that boundary's file name.
3073 * src/location.h: Document that.
3074 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3075 defaults): Update output.
3076
3077 2008-11-07 Akim Demaille <demaille@gostai.com>
3078
3079 Locations without columns for command line arguments.
3080 * src/location.c (location_print): Don't display negative columns.
3081 * src/location.h: Document this.
3082
3083 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3084
3085 Add reminder about uploading public key to keys.gnupg.net.
3086 * HACKING (Release Procedure): Here.
3087
3088 2009-03-31 Akim Demaille <demaille@gostai.com>
3089
3090 bootstrap: --help to stdout.
3091 * bootstrap (usage): Don't send --help to stderr.
3092 Use a here doc instead of a long string.
3093
3094 2009-03-31 Akim Demaille <demaille@gostai.com>
3095
3096 bootstrap: README-hacking no longer exists
3097 * bootstrap (checkout_only_file): Set to HACKING.
3098
3099 2009-03-26 Akim Demaille <demaille@gostai.com>
3100
3101 doc: merge HACKING and README-hacking.
3102 Two files is confusing.
3103 Reported by Alexandre Duret-Lutz.
3104
3105 * README-hacking: Merge into...
3106 * HACKING (Working from the repository): here.
3107
3108 2009-03-26 Akim Demaille <demaille@gostai.com>
3109
3110 doc: update README-hacking.
3111 * README-hacking: We now use git and git submodules.
3112 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
3113
3114 2009-03-26 Akim Demaille <demaille@gostai.com>
3115
3116 lalr1.cc: avoid GCC 4.3 warnings.
3117 GCC 4.3 now warns about "a || b && c" and asks for explicit
3118 parentheses.
3119 Reported by Alexandre Duret-Lutz.
3120 * data/location.cc: Update copyright years.
3121 (Position::operator==): Use parens to make precedence explicit.
3122 Compare lines and columns first, as they are more likely to be
3123 different, and they are faster to compare.
3124
3125 2009-03-26 Akim Demaille <demaille@gostai.com>
3126
3127 gnulib: update.
3128 * gnulib: Update to latest.
3129 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
3130 use +=.
3131
3132 2009-01-08 Akim Demaille <demaille@gostai.com>
3133
3134 Fix grep portability issues.
3135 Grep on Solaris does not support -q.
3136 Reported by Summum Bonum.
3137
3138 * NEWS: Add a stub for 2.4.2.
3139 * THANKS: Add Summum Bonum.
3140 * tests/atlocal.in (EGREP): New.
3141 (CC, CXX, XSLTPROC): Make it possible to override them via
3142 envvars.
3143 * tests/java.at: Use $EGREP instead of egrep.
3144 Use AT_CHECK's ignore instead of grep's -q.
3145
3146 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
3147
3148 Version 2.4.1.
3149 * NEWS: Set version and date.
3150 * lib/Makefile.am: Update copyright year.
3151 * tests/atlocal.in: Update copyright year.
3152
3153 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
3154
3155 Semicolon feature removal is not about future language support.
3156 * NEWS: The semicolon feature is no longer active for newer languages,
3157 so don't claim that it causes trouble for them.
3158
3159 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
3160
3161 * gnulib: Update submodule to HEAD.
3162
3163 2008-12-09 Akim Demaille <demaille@gostai.com>
3164
3165 Update data/README.
3166 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3167
3168 2008-12-05 Eric Blake <ebb9@byu.net>
3169
3170 Build testsuite with newer autoconf.
3171 * tests/output.at (m4_expand): Don't override in newer autoconf,
3172 where the underlying implementation changed.
3173 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3174 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3175 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3176 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3177 since some of them contain unbalanced ')'.
3178
3179 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
3180
3181 * NEWS: Clarify a little.
3182
3183 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
3184
3185 * NEWS: Update for recent changes.
3186
3187 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3188
3189 Fix unexpanded macros in GLR defines file.
3190 Reported by Csaba Raduly at
3191 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3192 * THANKS (Csaba Raduly): Add.
3193 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3194 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3195 lexer in a separate module that includes the defines file.
3196 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
3197 source.
3198 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3199 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3200 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3201 (AT_DATA_SOURCE_PROLOGUE): New.
3202 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3203 (AT_DATA_SOURCE): New.
3204 (AT_FULL_COMPILE): New, copied from master branch and extended to
3205 support an additional source file.
3206
3207 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3208
3209 Don't let maintainer-*-check targets force a version update.
3210 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3211 handled.
3212
3213 2008-11-17 Di-an Jan <dianj@freeshell.org>
3214
3215 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3216 Align menus. Adjust word wrapping. Use node names for menu names.
3217 (Examples): Don't abbreviate node names.
3218 (LocalWords): Remove abbreviations.
3219 (Copying): Make description a sentence.
3220 (Java Action Features): Remove period to match the rest of menu.
3221
3222 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3223
3224 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3225 * configure.ac: Adjust usage.
3226 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3227 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3228 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3229
3230 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3231
3232 Don't add a semicolon to actions for %skeleton or %language.
3233 It breaks Java test cases as reported by Akim Demaille.
3234 * src/scan-code.l: Implement.
3235
3236 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3237
3238 Clean up %skeleton and %language priority implementation.
3239 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3240 remove static qualifier because others will soon need to see it.
3241 (language_prio): Likewise.
3242 (getargs): Use command_line_prio rather than 0.
3243 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3244 enum fields.
3245 (skeleton_prio): Extern it.
3246 (language_prio): Extern it.
3247 * src/parse-gram.y: Use grammar_prio rather than 1.
3248
3249 2008-11-04 Akim Demaille <demaille@gostai.com>
3250
3251 * NEWS: Mention the trailing semicolon in action.
3252
3253 2008-11-04 Akim Demaille <demaille@gostai.com>
3254
3255 Reformat NEWS.
3256 * NEWS: Use more outline-mode markup.
3257 Suggested by Jim Meyering.
3258
3259 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3260
3261 Fix user actions without a trailing semicolon.
3262 Reported by Sergei Steshenko at
3263 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3264 * THANKS (Sergei Steshenko): Add.
3265 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3266 * tests/regression.at (Fix user actions without a trailing semicolon):
3267 New test case.
3268
3269 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3270
3271 Initiate further development.
3272 * NEWS: Create an empty section for new entries.
3273 * gnulib: Update submodule to HEAD.
3274
3275 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3276
3277 * NEWS: Version 2.4.
3278
3279 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3280
3281 Prepare for next release.
3282 * NEWS: Briefly mention changes since 2.3b.
3283 * README: Say GNU m4 1.4.6, which we've been requiring in release
3284 announcements already, not 1.4.3, which breaks the build.
3285
3286 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3287
3288 Say %language is experimental.
3289 We're thinking of extending it's effect on output file naming. See the
3290 thread at
3291 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3292 * NEWS: Say it's experimental.
3293 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3294 recommend it over %skeleton for now.
3295 (Bison Options): Likewise.
3296 (C++ Bison Interface): Use %skeleton not %language.
3297 (Calc++ Parser): Use %skeleton not %language.
3298 * src/getargs.c (usage): Say it's experimental.
3299
3300 2008-11-01 Di-an Jan <dianj@freeshell.org>
3301 Paolo Bonzini <bonzini@gnu.org>
3302
3303 Support all Java parser class modifiers.
3304 * data/java.m4 (b4_percent_define_get3): New.
3305 (b4_final_if, b4_strictfp_if): New.
3306 * data/lalr1.java (final, strictfp, extends, implements): Support.
3307 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3308 documentation.
3309 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3310 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3311 (AT_CHECK_JAVA_GREP): New.
3312 (Java parser class modifiers): New test.
3313 (Java parser class extends and implements): New test.
3314
3315 Model exception propagation better with throws and lex_throws.
3316 * data/java.m4 (b4_list2): New.
3317 (throws): Change default.
3318 * data/lalr1.java (yyaction): Add throws.
3319 (parse): Add lex_throws in addition to throws.
3320 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3321 * tests/java.at (Java throws specifications): New test.
3322
3323 Improve documentation for Java parsers.
3324 * doc/bison.texinfo (Java Parsers): Add subsections.
3325 Don't quote first argument of %define.
3326 (Java Bison Interface): Document output files. Move documentation
3327 of parser class and merge into Java Parser Interface. Document
3328 features that error out. Document directives with no effect.
3329 Move note about Javadoc higher.
3330 (Java Semantic Values): Explicitly mention stype.
3331 Document that generic types cannot be used.
3332 (Java Location Values): Use @deftypeivar. Document constructors.
3333 Correct return value for toString.
3334 (Java Parser Interface): List undocumented constants/fields.
3335 Move documentation of fields added by %parse-param closer to list
3336 of members. Document that token names are added as fields.
3337 Document constructors accurately. Remove error method.
3338 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3339 Interface. Describe %code lexer and yylex accutately.
3340 Remove documentation that does not match the code.
3341 (Java Action Features): New.
3342 (Java Differences): Add reference. Add item on semantic values.
3343 Add note about @{ ... @}. Clarify %% epilogue placement.
3344 (Java Declarations Summary): New.
3345
3346 Fix Java skeleton.
3347 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3348 (b4_remove_comma): Quote test argument.
3349 (b4_identification): Remove "bison" field.
3350 * tests/java.at (Java parser class and package names): New test.
3351 (Java %parse-param and %lex-param): New test.
3352 (Java stype, position_class and location_class): New test.
3353
3354 2008-10-31 Di-an Jan <dianj@freeshell.org>
3355
3356 * data/lalr1.jave: Update copyright years.
3357 (YYParser): Correct name of "generated from" file in Javadoc:
3358 use b4_file_name instead of @ofile@.
3359 (Location constructor): Correct Javadoc parameter name.
3360 (yylloc): Add missing opening m4 quote after b4_location_if.
3361 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3362 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3363 (YYParser constructor): Correct Javadoc parameter name.
3364
3365 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3366
3367 Always put auxiliary code files in the same dir as other output files.
3368 * src/files.c (compute_file_name_parts): When the user specifies
3369 --output but not --file-prefix, extract the directory prefix from the
3370 file prefix not from the grammar file name. This affects the location
3371 of files like location.hh generated by the C++ skeleton. The includes
3372 in the other output files require this fix.
3373 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3374 for expected output files.
3375 (Output files): Add a test for the above.
3376
3377 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3378
3379 * gnulib: Update submodule to HEAD.
3380
3381 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3382
3383 Update copyright year.
3384 * src/files.c: Here.
3385
3386 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3387
3388 Don't overwrite the input file.
3389 * src/files.c (output_file_name_check): Fatal error if using input file
3390 for output.
3391 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3392 argument.
3393 (Conflicting output files): Add test.
3394
3395 2008-10-28 Akim Demaille <demaille@gostai.com>
3396
3397 Space changes.
3398 * data/lalr1.cc: Formatting changes.
3399
3400 2008-10-28 Akim Demaille <demaille@gostai.com>
3401
3402 Don't define debugging functions when !YYDEBUG.
3403 * data/lalr1.cc (debug_stream, set_debug_stream)
3404 (debug_level_type, debug_level, set_debug_level): Don't
3405 declare them when YYDEBUG is not defined.
3406 The implementation are already YYDEBUG-aware.
3407
3408 2008-10-28 Akim Demaille <demaille@gostai.com>
3409
3410 Prefer "continue" for empty loop bodies.
3411 * etc/bench.pl.in: Use "continue" instead of {}.
3412
3413 2008-10-28 Akim Demaille <demaille@gostai.com>
3414
3415 Space and comments changes.
3416 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3417 * data/c.m4, data/lalr1.cc: Space changes.
3418
3419 2008-10-28 Akim Demaille <demaille@gostai.com>
3420
3421 Make gnulib a submodule.
3422 * gnulib: New.
3423 * .gitmodules (gnulib): New.
3424
3425 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3426
3427 Fix yyerror_range for user-defined location type in C++. Reported by
3428 Georg Sauthoff at
3429 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3430 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3431 * THANKS (Georg Sauthoff): Add.
3432
3433 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3434
3435 Update several administrative files mainly to facilitate releasing.
3436 * HACKING (Administrivia): Make the git-merge-changelog notes more
3437 helpful.
3438 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3439 (Release Procedure): Update for git and add numerous details that were
3440 previously missing.
3441 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3442 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3443 that announcements don't claim we bootstrapped with whatever bison
3444 happened to be in PATH. Add flex as a bootstrap tool.
3445 * Makefile.maint: Remove, previously replaced by maint.mk.
3446 * Makefile.cfg: Remove, and migrate settings to...
3447 * cfg.mk: ... here for the sake of `make announcement'.
3448 * bootstrap.conf (gnulib_modules): Add announce-gen.
3449 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3450 Berry.
3451
3452 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3453
3454 Small but important bugfixes for the Java skeleton.
3455 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3456 (yy_symbol_print): Call toString on yyvaluep.
3457
3458 2008-08-29 Akim Demaille <demaille@gostai.com>
3459
3460 Clarify UPDATED use.
3461 * doc/bison.texinfo: It refers to the last edition of this file,
3462 not to the release date of Bison.
3463 Reported by Joel E. Denny.
3464
3465 2008-08-29 Akim Demaille <demaille@gostai.com>
3466
3467 * README: Update FAQ pointer.
3468 Reported by Joel E. Denny.
3469
3470 2008-08-27 Eric Blake <ebb9@byu.net>
3471
3472 Resync m4sugar from autoconf.
3473 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3474 (m4_init): Adjust to latest m4.git changes.
3475 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3476 effects.
3477 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3478 (_m4_list_cmp): Reduce side effects.
3479
3480 2008-08-27 Akim Demaille <demaille@gostai.com>
3481
3482 Check yyerrok in calc.at.
3483 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3484 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3485 expected.
3486
3487 2008-08-27 Akim Demaille <demaille@gostai.com>
3488
3489 Support yyerrok in lalr1.cc.
3490 YYBACKUP is still to import back into lalr1.cc.
3491 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3492
3493 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3494
3495 For maintainer-check*, don't recompile for a $(VERSION) update.
3496 * cfg.mk: New file.
3497 (_is-dist-target): Override the one in GNUmakefile.
3498 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3499
3500 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3501
3502 Update for recent change to gnulib.
3503 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3504 string.h now.
3505
3506 2008-08-15 Eric Blake <ebb9@byu.net>
3507
3508 Remaining m4sugar merge from autoconf.
3509 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3510 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3511 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3512 * src/output.c (output_skeleton): Tell m4 how to find it.
3513
3514 Partial m4sugar merge from autoconf: m4_map.
3515 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3516 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3517 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3518 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3519 for empty list.
3520 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3521 Likewise.
3522 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3523 declares it.
3524
3525 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3526
3527 Keep .version and PACKAGE_VERSION in sync.
3528 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3529 dependency, and add comments justifying this in more detail. Discussed
3530 starting at
3531 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3532
3533 2008-08-06 Eric Blake <ebb9@byu.net>
3534
3535 Partial m4sugar merge from autoconf: m4_shiftn.
3536 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3537 (m4_shift2, m4_shift3): New macros.
3538 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3539 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3540 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3541 * data/java.m4 (b4_remove_comma): Likewise.
3542
3543 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3544 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3545 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3546 (m4_init): Consolidate wrapped text into single m4_wrap.
3547 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3548 in wrapped text.
3549
3550 2008-08-05 Eric Blake <ebb9@byu.net>
3551
3552 Partial m4sugar merge from autoconf: builtins, version.m4.
3553 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3554 (m4_prepend): Remove, as it is unused and inherently quadratic,
3555 whereas m4_append is linear in newer m4.
3556 (m4_mkstemp): New builtin.
3557 (m4_symbols): Make rename conditional.
3558 (m4_version_prereq): Ensure fatal error if used in bison, which
3559 intentionally lacks version.m4.
3560
3561 Fix comments in m4sugar.
3562 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3563
3564 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3565
3566 Update for recent .gitignore fix in Gnulib.
3567 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3568 anchored .gitignore entries.
3569
3570 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3571
3572 Set gnu or gnits strictness.
3573 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3574 development and gnits strictness for releases. Based on Eric Blake's
3575 suggestion at
3576 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3577
3578 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3579
3580 * NEWS: Clarify documentation of %language.
3581
3582 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3583
3584 Support usage of git-merge-changelog.
3585 * .gitattributes: New.
3586 * HACKING: Document usage of git-merge-changelog.
3587 * bootstrap: Install git-merge-changelog entries in .git/config
3588 if appropriate.
3589
3590 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3591
3592 Remove remaining dependence on CVS Id keyword.
3593 * ChangeLog: For the sake of people still using CVS, don't use dollars
3594 when mentioning Id.
3595 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3596 unusual anyway.
3597 * data/xslt/xml2dot.xsl: Likewise.
3598 * data/xslt/xml2text.xsl: Likewise.
3599 * data/xslt/xml2xhtml.xsl: Likewise.
3600 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3601 * doc/Makefile.am (neutralize): Remove, no longer needed.
3602 (.x.1): Don't use neutralize.
3603 (edit): Don't substitute for ID.
3604 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3605
3606 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3607
3608 Fix dependence on computed configure variables.
3609 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3610 $(top_srcdir)/configure.ac so that changes to computed variables, such
3611 as PACKAGE_VERSION, are seen.
3612 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3613
3614 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3615
3616 Update copyright dates for recent changes.
3617 * Makefile.am: Here.
3618 * src/Makefile.am: Here.
3619 * src/reduce.c: Here.
3620 * tests/reduce.at: Here.
3621
3622 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3623
3624 Use git-version-gen for version names between releases.
3625 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3626 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3627 * .prev-version: New.
3628 * .version.in: Remove.
3629 * ChangeLog: Remove the Id previously used for capturing the CVS
3630 revision.
3631 * GNUmakefile: Remove, now copied from Gnulib.
3632 * Makefile.am: Add code suggested by comments in
3633 build-aux/git-version-gen.
3634 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3635 .prev-version, and .version.
3636 * NEWS (2.3b+): Rename to...
3637 (?.?): ... this because we're dropping the "+" version naming scheme,
3638 but, in general, we still can't be sure of our next release name.
3639 * bootstrap: Add a quick hack to remove from .gitignore the
3640 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3641 entry. This should really be fixed in gnulib instead.
3642 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3643 * configure.ac (AC_INIT): Set version name by invoking
3644 build-aux/git-version-gen.
3645 (AC_CONFIG_FILES): Remove .version, now generated by
3646 build-aux/git-version-gen.
3647 * maint.mk: New, copied from coreutils.
3648 * doc/.cvsignore (bison.1): Add.
3649 * doc/.gitignore (/bison.1): Add.
3650 * doc/bison.1: Remove, generated.
3651 * src/.cvsignore (revision.c): Remove.
3652 * src/.gitignore (/revision.c): Remove.
3653 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3654 (BUILT_SOURCES): Remove revision.c.
3655 (revision.c): Remove.
3656 * src/getargs.c (version): Don't print revision after the VERSION.
3657 * src/revision.h: Remove.
3658
3659 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3660
3661 Fix untranslatable composition of sentences. Reported by Goran
3662 Uddeborg at
3663 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3664 * THANKS (Goran Uddeborg): Add.
3665 * src/reduce.c (reduce_print): Report the number of nonterminals and
3666 rules useless in the grammar in separate sentences.
3667 * tests/reduce.at (Useless Rules): Update output.
3668 (Reduced Automaton): Likewise.
3669 (Underivable Rules): Likewise.
3670 (Empty Language): Likewise.
3671
3672 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3673
3674 Fix some .gitignore and .cvsignore problems.
3675 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3676 (insert_vc_ignore): ... this new function, which prepends `/' to all
3677 .gitignore entries before passing them to insert_sorted_if_absent.
3678 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3679 .cvsignore files are maintained even though Bison developers run
3680 bootstrap while using Git.
3681 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3682 unneeded by Bison.
3683 (gnulib): Add.
3684 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3685 unneeded. Reported by Eric Blake.
3686 * lib/.gitignore (/*~): Add.
3687 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3688 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3689 Blake.
3690 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3691
3692 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3693
3694 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3695 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3696 * bootstrap.conf (gnulib_modules): Add unsetenv.
3697 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3698 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3699 (/setenv.m4): Add.
3700 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3701 the first argument because it may become position-dependent, and unset
3702 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3703 Add comments explaining these issues in more detail.
3704
3705 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3706
3707 Add .gitignore everywhere based on .cvsignore.
3708 * .gitignore: New.
3709 * build-aux/.gitignore: New.
3710 * data/.gitignore: New.
3711 * doc/.gitignore: New.
3712 * etc/.gitignore: New.
3713 * examples/.gitignore: New.
3714 * examples/calc++/.gitignore: New.
3715 * lib/.gitignore: New.
3716 * m4/.gitignore: New.
3717 * po/.gitignore: New.
3718 * runtime-po/.gitignore: New.
3719 * src/.gitignore: New.
3720 * tests/.gitignore: New.
3721
3722 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3723
3724 * NEWS (2.3b+): New section, empty for now.
3725 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3726
3727 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3728
3729 * NEWS (2.3b): Update release date since there has been a delay in
3730 getting the announcements and tarballs out.
3731
3732 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3733
3734 * NEWS: Version 2.3b.
3735 * configure.ac (AC_INIT): Likewise.
3736 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3737
3738 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3739
3740 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3741 been doing it for years.
3742 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3743 (Release Procedure): Add FIXME about make alpha being unmaintained.
3744
3745 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3746
3747 * data/yacc.c: Reformat m4 a little for readability.
3748 * src/lalr.c (build_relations): Correct comment.
3749
3750 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3751
3752 DJGPP specific issue.
3753 * djgpp/config.sed: Fixes required to run configure scripts generated
3754 by autoconf 2.62.
3755
3756 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3757
3758 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3759 coordinator@translationproject.org.
3760
3761 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3762
3763 * THANKS: Add Eric Blake.
3764
3765 2008-04-23 Eric Blake <ebb9@byu.net>
3766
3767 Revert prior patch, by working around autoconf regression.
3768 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3769 ("Output file name: ("): Uncomment test.
3770 ("Output file name: )"): Likewise.
3771 Based on an idea from Noah Misch.
3772
3773 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3774
3775 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3776 2.61. Reported by Juan Manuel Guerrero at
3777 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3778 * tests/output.at ("Output file name: ("): Comment out test case for
3779 now.
3780 ("Output file name: )"): Likewise.
3781
3782 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3783
3784 * GNUmakefile: Update git-version-gen invocation so make dist
3785 succeeds.
3786
3787 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3788
3789 Update to the current gnulib CVS repository, and fix trigraph handling
3790 in Bison.
3791 * bootstrap: Update gnulib CVS repository URL.
3792 (symlink_to_dir): Encapsulate the code that guarantees the destination
3793 directory exists into...
3794 (check_dst_dir): ... this new function, and...
3795 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3796 fail when copying files into lib/uniwidth/.
3797 * src/output.c (prepare_symbols): When writing yytname muscles, where
3798 symbol names will be encoded in C-string literals, tell quotearg to
3799 escape trigraphs. This used to be the default in gnulib.
3800 * tests/regression.at (Token definitions): Because of the change in
3801 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3802 escapes trigraphs in symbol names. Thus, yytname no longer has
3803 trigraphs unnecessarily doubly escaped. Update test case output.
3804 Extend test case to be sure Bison's own error messages will no longer
3805 have trigraphs in symbol names unnecessarily escaped once.
3806
3807 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3808
3809 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3810 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3811 * .cvsignore: Add .version.
3812 * .version.in: New.
3813 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3814 * configure.ac (AC_CONFIG_FILES): Add .version.
3815 * build-aux/.cvsignore: Add git-version-gen.
3816
3817 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3818
3819 * NEWS (2.3a+): Mention that -g now takes an argument.
3820 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3821 consistency. Update the -g and -x entries now that they take
3822 arguments. Use brackets to indicate optional arguments.
3823 * src/getargs.c (usage): Explain the relationship between arguments of
3824 long and short options more completely. Document --defines and -d
3825 separately since the former takes an argument but, for POSIX Yacc, the
3826 latter does not.
3827 (short_options): Let -W take an optional argument like --warnings.
3828 (getargs): Sort cases.
3829
3830 2008-02-28 Akim Demaille <demaille@gostai.com>
3831
3832 * doc/bison.texinfo: Fix a few typos.
3833
3834 2008-02-28 Akim Demaille <akim@epita.fr>
3835
3836 * doc/bison.texinfo (Bison Options): Document -W.
3837 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3838
3839 2008-02-28 Akim Demaille <akim@epita.fr>
3840
3841 * src/getargs.c (short_options): Split and sort for readability.
3842 -g and -x take optional arguments, just like their long options.
3843 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3844 understand.
3845 Fix the handling of $opt which resulted in all the argument to be
3846 considered as optional.
3847
3848 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3849
3850 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3851 say its interface is experimental.
3852 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3853 Java.
3854 (Bison Options): In the -L and --language entry, mention Java.
3855 (Java Bison Interface): Say the interface is experimental.
3856 * src/getargs.c (usage): Mention -L and --language.
3857
3858 * NEWS (2.3a+): Say the push parsing interface is experimental.
3859 * doc/bison.texinfo (Push Decl): Likewise.
3860 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3861 (Push Parser Function): Likewise.
3862 (Pull Parser Function): Likewise.
3863 (Parser Create Function): Likewise.
3864 (Parser Delete Function): Likewise.
3865 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3866 yypull_parse, and yypush_parse entries.
3867
3868 * NEWS (2.3a+): Mention XML support, and say the schema is
3869 experimental.
3870 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3871 * src/getargs.c (usage): Say the XML schema is experimental.
3872
3873 * NEWS (2.3a+): Say option instead of flag.
3874
3875 2008-02-21 Wojciech Polak <polak@gnu.org>
3876
3877 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3878 text.
3879
3880 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3881
3882 Fix impure push parser compile error reported by Bob Rossi at
3883 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3884 * data/yacc.c: Clean up whitespace in the output a little.
3885 (yypstate_allocated): Define for impure push parsers regardless of
3886 whether the pull interface is also requested.
3887 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3888 check impure push parsers without the pull interface.
3889
3890 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3891 yyerror takes arguments specified by %parse-param while yypstate_new
3892 does not.
3893 * doc/bison.texinfo (Parser Create Function): Document that
3894 yypstate_new returns 0 for multiple impure parser instances.
3895 * tests/push.at (Push Parsing: Multiple impure instances): Update
3896 expected stderr output.
3897
3898 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3899
3900 * runtime-po/POTFILES.in (push.c): Remove.
3901
3902 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3903
3904 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3905 * data/push.c: Rename to...
3906 * data/yacc.c: ... this, overwriting it.
3907 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3908 `%push-pull-parser' -> `%define api.push_pull "both"'.
3909 Remove old yacc.c tests, and update push.c tests to yacc.c.
3910
3911 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3912
3913 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3914 `"%code top" blocks' instead of `%code "top" blocks'.
3915 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3916 Clean up whitespace in the output a little.
3917
3918 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3919
3920 Fix documentation problems reported by Tim Josling at
3921 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3922 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3923 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3924 integers. Explain the effect of literal string aliases on error
3925 messages. Copy token 0 documentation from the C++ skeleton
3926 documentation.
3927
3928 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3929
3930 Accept a token number in a %left, %right, or %nonassoc for POSIX
3931 conformance. Reported by Tim Josling at
3932 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3933 * NEWS (2.3a+): Mention.
3934 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3935 and code numbers are treated by precedence declarations.
3936 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3937 of symbols.1.
3938 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3939 of symbol.
3940 (symbol.prec): New, just like symbol but allows INT.
3941 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3942 longer holds.
3943 * tests/regression.at (Token number in precedence declaration): New
3944 test case.
3945
3946 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3947
3948 DJGPP specific issues.
3949 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3950 be changed. Copyright timestamp adjusted.
3951 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3952 be changed. Copyright timestamp adjusted.
3953 * djgpp/config.site: Copyright timestamp adjusted.
3954 * djgpp/config_h.sed: Copyright timestamp adjusted.
3955 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3956 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3957 filename translation list.
3958 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3959 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3960 files shall be created. Before trying to use the temp dir where the
3961 environment variable points to check that the dir really exists. If
3962 not default to the cwd as temp dir. Copyright timestamp adjusted.
3963 * djgpp/subpipe.h: Copyright timestamp adjusted.
3964 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3965
3966 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3967
3968 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3969
3970 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3971
3972 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3973 Problem reported by Claudio Saavedra in
3974 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3975
3976 2008-01-05 Wojciech Polak <polak@gnu.org>
3977
3978 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3979 document's title with the input grammar file name.
3980
3981 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3982
3983 Automate regression testing of the XML/XSLT implementation. Discussed
3984 starting at
3985 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3986 * configure.ac (XSLTPROC): New substitution.
3987 * Makefile.am (maintainer-xml-check): New phony target invoking...
3988 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3989 invoking make maintainer-check with BISON_TEST_XML=1.
3990 * tests/atlocal.in (XSLTPROC): New.
3991 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3992 not to report reachable memory when Bison is expected to have a
3993 non-zero exit status and (2) to compare XML/XSLT output with --graph
3994 and --report=all output for every working grammar when
3995 BISON_TEST_XML=1.
3996 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3997 (AT_BISON_CHECK_XML): New.
3998 (AT_QUELL_VALGRIND): New.
3999 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4000 (AT_CHECK): ... don't redefine this since this was the old way to
4001 quell Valgrind.
4002 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4003 AT_BISON_CHECK invocations.
4004 * tests/c++.at: Likewise.
4005 * tests/calc.at: Likewise.
4006 * tests/conflicts.at: Likewise.
4007 * tests/cxx-type.at: Likewise.
4008 * tests/existing.at: Likewise.
4009 * tests/glr-regression.at: Likewise.
4010 * tests/headers.at: Likewise.
4011 * tests/input.at: Likewise.
4012 * tests/java.at: Likewise.
4013 * tests/output.at: Likewise.
4014 * tests/push.at: Likewise.
4015 * tests/reduce.at: Likewise.
4016 * tests/regression.at: Likewise.
4017 * tests/sets.at: Likewise.
4018 * tests/skeletons.at: Likewise.
4019 * tests/synclines.at: Likewise.
4020 * tests/torture.at: Likewise.
4021 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4022 tends to hang xsltproc.
4023 (Big horizontal): Likewise.
4024
4025 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4026
4027 In XML output, remove redundant class attribute on symbol element.
4028 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4029 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4030 look up a symbol to determine whether it's a nonterminal or terminal.
4031 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4032 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4033
4034 Add prec/assoc information to XML output.
4035 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4036 %prec, add a percent_prec attribute.
4037 * src/print-xml.c (print_grammar): For each terminal that has a
4038 precedence or associativity, add a prec or assoc attribute.
4039 (xml_indent): New.
4040 (xml_puts): Use xml_indent.
4041 (xml_printf): Use xml_indent.
4042 * src/print-xml.h (xml_indent): Prototype.
4043
4044 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4045 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4046
4047 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4048
4049 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4050 (bison:ruleByNumber): ... this for clarity.
4051 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4052 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4053 (xsl:template match="reduction"): Update.
4054 (xsl:template match="item"): Update.
4055 (xsl:template match="reduction"): Update.
4056
4057 In the XML output, don't print the list of rules where symbols appear.
4058 Compute it in XSLT instead. Discussed at
4059 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4060 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4061 (bison:ruleByRhs): New.
4062 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4063 bison:ruleByRhs.
4064 (xsl:template match="terminal/rule"): Remove.
4065 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4066 bison:ruleByRhs.
4067 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4068 Remove.
4069 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4070 bison:ruleByRhs and mode="number-link" for rule template.
4071 (xsl:template match="terminal/rule"): Remove.
4072 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4073 bison:ruleByRhs and mode="number-link" for rule template.
4074 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4075 Rewrite as...
4076 (xsl:template match="rule" mode="number-link"): ... this.
4077 * src/print-xml.c (print_grammar): Don't print the list of rules.
4078
4079 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4080
4081 Don't let --report affect XML output; always print all information.
4082 Discussed at
4083 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4084 * src/conflicts.c (log_resolution): Implement.
4085 * src/print-xml.c (print_core): Implement.
4086 (print_state): Implement.
4087 (print_xml): Implement.
4088
4089 * NEWS (2.3a+): Fix quotes.
4090 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4091 don't let %verbose clear the list specified by --report.
4092
4093 2007-11-26 Akim Demaille <akim@epita.fr>
4094
4095 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4096
4097 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4098
4099 In the XML output, list useless and unused symbols and rules with the
4100 useful ones and add a "usefulness" attribute. Discussed starting at
4101 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4102 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4103 (grammar_rules_print_xml): Print all rules instead of just those
4104 useful in the grammar, and add a "usefulness" attribute.
4105 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4106 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4107 (print_grammar): Print all nonterminals instead of just useful ones,
4108 and add a "usefulness" attribute to nonterminals and terminals.
4109 (print_xml): Don't print a separate "reductions" or
4110 "rules-useless-in-parser" element.
4111 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4112 (reduce_xml): Remove.
4113 (reduce_token_unused_in_grammar): New.
4114 (reduce_nonterminal_useless_in_grammar): New.
4115 * src/reduce.h (reduce_xml): Remove prototype.
4116 (reduce_token_unused_in_grammar): Add prototype.
4117 (reduce_nonterminal_useless_in_grammar): Add prototype.
4118 * data/xslt/xml2text.xsl: Update for XML changes.
4119 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4120 * tests/reduce.at (Useless Terminals): Update output.
4121 (Useless Rules): Update output.
4122 (Reduced Automaton): Update output.
4123
4124 Say "Terminals unused in grammar" instead of "Unused terminals".
4125 * NEWS (2.3a+): Update.
4126 * doc/bison.texinfo (Understanding): Update example output.
4127 * src/reduce.c (reduce_output): Implement.
4128 * data/xslt/xml2text.xsl: Implement.
4129 * data/xslt/xml2xhtml.xsl: Implement.
4130
4131 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4132
4133 Accept --report-file=FILE to override the default `.output' filename.
4134 * NEWS (2.3a+): Mention.
4135 * doc/bison.texinfo (Bison Options): Add an entry.
4136 * src/files.c (compute_output_file_names): Don't override
4137 spec_verbose_file if already set.
4138 * src/getargs.c (usage): Document --report-file.
4139 (REPORT_FILE_OPTION): New anonymous enum member.
4140 (long_options): Add entry for it.
4141 (getargs): Add case for it setting spec_verbose_file.
4142
4143 * build-aux/cross-options.pl: Don't record a short option just because
4144 there's an arg.
4145 * doc/.cvsignore: Add yacc.1.
4146
4147 2007-11-14 Akim Demaille <akim@epita.fr>
4148
4149 * doc/yacc.1.in: New.
4150 * configure.ac, doc/Makefile.am: Adjust.
4151 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4152 config.h symbol.
4153 Use AC_SUBST for assignments too.
4154 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4155
4156 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4157
4158 * src/gram.c: Remove comments that duplicate comments in gram.h.
4159
4160 When reporting useless rules and nonterminals, say "useless in grammar"
4161 instead of "useless", and say "useless in parser" instead of "never
4162 reduced". Discussed starting at
4163 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4164 * NEWS (2.3a+): Mention this change.
4165 * data/xslt/xml2text.xsl: Update output text and expected input XML
4166 element names to match changes below.
4167 * data/xslt/xml2xhtml.xsl: Likewise.
4168 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4169 Contents: "Rules useless in parser due to conflicts".
4170 * doc/bison.texinfo (Decl Summary): Reword a little.
4171 (Understanding): Update example output for changes below.
4172 * src/gram.c: (rule_useful_p): Rename to...
4173 (rule_useful_in_grammar_p): ... this.
4174 (rule_useless_p): Rename to...
4175 (rule_useless_in_grammar_p): ... this.
4176 (rule_never_reduced_p): Rename to...
4177 (rule_useless_in_parser_p): ... this.
4178 (grammar_rules_print): Update for renames.
4179 (grammar_rules_print_xml): Update for renames.
4180 (grammar_rules_never_reduced_report): Rename to...
4181 (grammar_rules_useless_report): ... this since it is used for either
4182 kind of useless rule.
4183 * src/gram.h: Reword comments and update function names in prototypes.
4184 * src/main.c (main): Say "rule useless in parser due to conflicts".
4185 * src/print-xml.c (print_rules_never_reduced): Rename to...
4186 (print_rules_useless_in_parser): ... this, and rename output XML
4187 element "rules-never-reduced" to "rules-useless-in-parser".
4188 (print_xml): Update for rename.
4189 * src/print.c (print_results): Say "Rules useless in parser due to
4190 conflicts".
4191 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4192 (nonterminals_reduce): Say "nonterminal useless in grammar".
4193 (reduce_output): Say "Nonterminals useless in grammar".
4194 Say "Rules useless in grammar".
4195 (reduce_xml): Rename output XML element "useless" to
4196 "useless-in-grammar".
4197 (reduce_print): Don't report the count of grammatically useless rules
4198 as "rules never reduced" just because %yacc is specified.
4199 In the correct report of this count, say nonterminal(s) and rule(s)
4200 "useless in grammar".
4201 * tests/conflicts.at (S/R in initial): Update expected output.
4202 (Defaulted Conflicted Reduction): Likewise.
4203 (Unreachable States After Conflict Resolution): Likewise.
4204 * tests/existing.at (GNU pic Grammar): Likewise.
4205 * tests/reduce.at (Useless Nonterminals): Likewise.
4206 (Useless Rules): Likewise.
4207 (Reduced Automaton): Likewise.
4208 (Underivable Rules): Likewise.
4209 (Empty Language): Likewise.
4210
4211 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4212
4213 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4214 here document and before the EOF so that BSD's implementation of Bourne
4215 shell doesn't parse the delimiter as part of the here document.
4216 * doc/.cvsignore: Add cross-options.texi.
4217 * src/getargs.c (usage): Add a blank line after the warning categories.
4218
4219 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4220
4221 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4222
4223 2007-11-05 Akim Demaille <akim@epita.fr>
4224
4225 Remove Id: from bison.1.
4226 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4227 (perl -0777 -pi -e 's/\.PP\nId): New.
4228 (.x.1): Use it to ignore the version control revision.
4229
4230 2007-11-05 Akim Demaille <demaille@gostai.com>
4231
4232 * build-aux/Makefile.am: Ship cross-options.pl.
4233 * doc/Makefile.am: Always refer to cross-options.texi with
4234 $(srcdir).
4235 (MAINTAINERCLEANFILES): Add it.
4236
4237 2007-11-04 Akim Demaille <demaille@gostai.com>
4238
4239 Generate the long/short option cross-table.
4240 * build-aux/cross-options.pl: New.
4241 * doc/Makefile.am (cross-options.texi): New.
4242 * doc/bison.texinfo: Use it.
4243
4244 2007-11-04 Akim Demaille <demaille@gostai.com>
4245
4246 Generate bison.1 using help2man.
4247 * doc/common.x, doc/bison.x: New.
4248 * doc/Makefile.am (bison.1, .x.1): New.
4249 The code is taken from autoconf-2.61/man/Makefile.am.
4250 * configure.ac: Look for help2man.
4251
4252 2007-11-04 Akim Demaille <demaille@gostai.com>
4253
4254 Complete --help.
4255 * src/getargs.c (usage): Document -W, make it clear that -d,
4256 -g and -x have optional arguments.
4257
4258 2007-11-04 Akim Demaille <demaille@gostai.com>
4259
4260 Find sha1sum when named gsha1sum.
4261 * bootstrap (find_tool): New.
4262 ($SHA1SUM): New.
4263
4264 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4265
4266 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4267 at
4268 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4269 * NEWS (2.3a+): Mention.
4270 * data/bison.m4 (b4_pure_if): Don't define it here.
4271 * data/c.m4 (b4_identification): Depend on individual skeletons to
4272 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4273 values of the %define variables api.pure or api.push_pull. Define
4274 YYPURE, YYPUSH, and YYPULL accordingly.
4275 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4276 glr.cc has already defined b4_pure_flag.
4277 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4278 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4279 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4280 * doc/bison.texinfo (Pure Decl): Update.
4281 (Push Decl): Update.
4282 (Decl Summary): Add api.pure to %define entry.
4283 In %pure-parser entry, say it's deprecated and reference %define.
4284 (Pure Calling): Update.
4285 (Error Reporting): Update.
4286 (C++ Scanner Interface): Update.
4287 (How Can I Reset the Parser): Update.
4288 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4289 reference %define.
4290 * src/getargs.c (pure_parser): Remove global variable.
4291 * src/getargs.h (pure_parser): Remove extern.
4292 * src/output.c (prepare): Don't define pure_flag muscle.
4293 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4294 wrapper around `%define api.pure'.
4295 * tests/calc.at (Simple LALR Calculator): Update.
4296 (Simple GLR Calculator): Update.
4297 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4298 Update.
4299 (GLR: Resolve ambiguity, pure, locations): Update.
4300 (GLR: Merge conflicting parses, pure, no locations): Update.
4301 (GLR: Merge conflicting parses, pure, locations): Update.
4302 * tests/glr-regression.at (Uninitialized location when reporting
4303 ambiguity): Update
4304 * tests/input.at (Unused %define api.pure): New test case.
4305 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4306 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4307 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4308
4309 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4310
4311 %define push_pull -> %define api.push_pull. Discussed starting at
4312 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4313 * data/push.c: Expect the new name.
4314 * data/yacc.c: Likewise.
4315 * doc/bison.texinfo (Push Decl): Update.
4316 (Decl Summary): Update %define entry.
4317 (Push Parser Function): Update.
4318 (Pull Parser Function): Update.
4319 (Parser Create Function): Update.
4320 (Parser Delete Function): Update.
4321 * tests/calc.at (Simple LALR Calculator): Update.
4322 * tests/input.at (%define enum variables): Update.
4323 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4324 (Push Parsing: Multiple impure instances): Update.
4325 (Push Parsing: Unsupported Skeletons): Update.
4326 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4327 (Exploding the Stack Size with Malloc): Update.
4328
4329 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4330 other entries some.
4331
4332 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4333
4334 For the XML output's terminal element, rename @number to @token-number,
4335 and add @symbol-number. In the nonterminal element, rename @number to
4336 @symbol-number. Discussed starting at
4337 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4338 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4339 renames.
4340 (xsl:template match="nonterminal"): Likewise.
4341 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4342 (xsl:template match="nonterminal"): Likewise.
4343 * src/print-xml.c (print_grammar): Implement.
4344
4345 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4346
4347 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4348 2007-10-11 change, the child elements here are items not rules.
4349 (xsl:template match="item"): New.
4350 (xsl:template match="rule"): Update for new reduced itemset.
4351 (xsl:template match="point"): Remove.
4352 (xsl:template match="empty"): For consistency with --graph, don't
4353 output "/* empty */".
4354 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4355 line-wrap, don't pass a negative value as first-line-length since this
4356 won't work with the following changes.
4357 (xsl:template name="line-wrap"): Simplify slightly.
4358 (xsl:template name="ws-search"): Eliminate recursion.
4359 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4360 set next to an item whose dot is not at the end of the RHS even if it
4361 happens to be associated with the same rule.
4362
4363 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4364
4365 Add %define lr.keep_unreachable_states.
4366 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4367 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4368 * src/main.c (main): Implement it.
4369 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4370 Extend to test it, and fix a typo.
4371
4372 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4373
4374 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4375 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4376 the example .output text.
4377 * tests/regression.at (Extra lookahead sets in report): Improve wording
4378 of comments.
4379
4380 2007-10-17 Wojciech Polak <polak@gnu.org>
4381
4382 * src/print-xml.c (print_grammar): Renamed
4383 <terminal> and <nonterminal> attributes:
4384 "type" to "number" and "symbol" to "name".
4385 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4386 Use new attribute names.
4387 (xsl:template match="nonterminal"): Likewise.
4388 * data/xslt/xml2xhtml.xsl: Likewise.
4389
4390 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4391
4392 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4393 (Option Cross Key): Likewise.
4394
4395 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4396 next to an item whose dot is not at the end of the RHS even if it
4397 happens to be associated with the same rule.
4398 * src/print.c (print_core): Likewise.
4399 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4400 (Resolved SR Conflicts): Update output.
4401 * tests/regression.at (Extra lookahead sets in report): New test case.
4402
4403 2007-10-11 Wojciech Polak <polak@gnu.org>
4404
4405 * src/print-xml.c (print_core): Remove item set
4406 redundancy.
4407 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4408 Improve processing time. Suggested by Joel E. Denny.
4409 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4410 Write xsl:param "required" attribute as comment.
4411 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4412 (xsl:template match="rule"): Support new reduced itemset.
4413 (xsl:template match="point"): Remove.
4414 * data/xslt/xml2xhtml.xsl: Likewise.
4415
4416 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4417
4418 * src/getargs.c (version): Update copyright year.
4419
4420 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4421
4422 Make xml2dot.xsl and --graph produce the same output.
4423 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4424 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4425 escaped later.
4426 (xsl:template name="output-node"): Use the new escape template instead
4427 of the string-replace template directly.
4428 (xsl:template name="output-edge"): Likewise.
4429 (xsl:template name="escape"): New, escapes backslashes and newlines in
4430 addition to quotation marks.
4431 * src/graphviz.c (start_graph, output_node, output_edge): Add
4432 whitespace to output for legibility.
4433
4434 Make xml2text.xsl and --report produce the same output, and remove the
4435 XML "conflicts" element since a conflict summary is easily extracted
4436 from the automaton.
4437 * data/xslt/bison.xsl: New.
4438 (xsl:template match="state" mode="bison:count-conflicts): New.
4439 * data/xslt/xml2text.xsl: Import bison.xsl.
4440 (xsl:template match="bison-xml-report"): Instead of styling the
4441 "conflicts" element, style the "automaton" element with mode
4442 "conflicts". Unlike the former, the latter lists S/R and R/R
4443 conflicts for a state on the same line.
4444 (xsl:template match="conflicts"): Remove.
4445 (xsl:template match="conflict"): Remove.
4446 (xsl:template match="terminal"): Line-wrap the list of rules in which
4447 the terminal is used.
4448 (xsl:template match="nonterminal"): Likewise for nonterminals.
4449 (xsl:template match="automaton" mode="conflicts"): New.
4450 (xsl:template match="state" mode="conflicts"): New.
4451 (xsl:template name="line-wrap"): New.
4452 (xsl:template name="ws-search"): New.
4453 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4454 (xsl:template match="bison-xml-report"): Instead of styling the
4455 "conflicts" element, style the "automaton" element with mode
4456 "conflicts."
4457 (xsl:template match="conflicts"): Remove.
4458 (xsl:template match="conflict"): Remove.
4459 (xsl:template match="automaton" mode="conflicts"): New.
4460 (xsl:template match="state" mode="conflicts): New.
4461 * src/conflicts.c (conflicts_output_xml): Remove.
4462 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4463 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4464 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4465 the corresponding XSLT is easier. Also, never wrap between a word and
4466 the comma that follows it.
4467
4468 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4469
4470 Improve C++ namespace support. Discussed starting at
4471 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4472 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4473 b4_namespace_close): New macros that interpret the %define variable
4474 "namespace" so its value can contain "::" to indicate nested
4475 namespaces.
4476 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4477 the above macros.
4478 * data/lalr1.cc (b4_namespace): Likewise.
4479 * data/location.cc (b4_namespace): Likewise.
4480 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4481 inside a new table in the general %define entry. Document `%define
4482 namespace' there as well. Point the %name-prefix entry to it since it
4483 explains it more completely in the case of C++.
4484 (C++ Bison Interface): Mention `%define namespace' instead of
4485 %name-prefix.
4486 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4487 entry suffices.
4488 * tests/c++.at (Relative namespace references): New test case.
4489 (Absolute namespace references): New test case.
4490 (Syntactically invalid namespace references): New test case.
4491 * tests/input.at (C++ namespace reference errors): New test case.
4492
4493 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4494
4495 Add syncline support and location accessor to internal %define
4496 interfaces.
4497 * data/bison.m4 (b4_percent_define_get_loc): New.
4498 (b4_percent_define_get_syncline): New.
4499 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4500 (b4_percent_define_default): Record defining location as line 1 rather
4501 than 0 for the sake of synchronizing #line's, and define
4502 b4_percent_define_syncline(VARIABLE).
4503 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4504 * src/muscle_tab.c (muscle_syncline_grow): New.
4505 (muscle_code_grow): Use muscle_syncline_grow.
4506 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4507 define b4_percent_define_syncline(VARIABLE).
4508 (muscle_percent_define_get_loc): New.
4509 (muscle_percent_define_get_syncline): New.
4510 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4511 remove some unused variables.
4512 (muscle_percent_define_default): Record defining location as line 1
4513 rather than 0 for the sake of synchronizing #line's, and define
4514 b4_percent_define_syncline(VARIABLE).
4515 (muscle_percent_define_check_values): Use
4516 muscle_percent_define_get_loc.
4517 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4518 (muscle_percent_define_get_syncline): Prototype.
4519 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4520 defaults): Update output for location change.
4521 (Complaining during macro argument expansion): Extend to test
4522 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4523
4524 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4525
4526 Fix some error-reporting macro bugs.
4527 * data/bison.m4 (b4_cat): New.
4528 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4529 to stdout so they don't become arguments to other macros. Update
4530 comments and add examples.
4531 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4532 add examples.
4533 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4534 after printing the error directive so that M4 doesn't report subsequent
4535 problems that are induced by this problem.
4536 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4537 instead of just in them. Recognize @\n in both places. Both expand to
4538 the empty string. Needed by b4_cat.
4539 * tests/skeletons.at (Complaining during macro argument expansion):
4540 New test case.
4541 (Fatal errors make M4 exit immediately): New test case.
4542
4543 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4544
4545 Implement --print-datadir.
4546 * src/getargs.c (usage): Mention.
4547 (PRINT_DATADIR_OPTION): New anonymous enum member.
4548 (long_options): Add entry for it.
4549 (getargs): Add case for it calling compute_pkgdatadir.
4550 * src/output.c (output_skeleton): Encapsulate data directory
4551 computation from here...
4552 (prepare): ... and from here...
4553 (compute_pkgdatadir): ... into this new function.
4554 * src/output.h (compute_pkgdatadir): Prototype.
4555
4556 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4557
4558 * src/print-xml.c (escape_bufs): New static global variable
4559 replacing...
4560 (xml_escape_n): ... the static local variable buf here.
4561 (print_xml): Free memory for escape_bufs.
4562 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4563
4564 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4565
4566 Replace `%push-parser' and `%push-pull-parser' with
4567 `%define push_pull "push"' and `%define push_pull "both"'.
4568 `%define push_pull "pull"' is the default.
4569 * doc/bison.texinfo (Push Decl, Push Parser Function,
4570 Pull Parser Function, Parser Create Function, Parser Delete Function):
4571 Update declarations.
4572 (Decl Summary, Table of Symbols): Replace %push-parser and
4573 %push-pull-parser entries with a %define push_pull entry.
4574 * data/bison.m4 (b4_percent_define_check_values): New macro.
4575 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4576 definitions...
4577 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4578 definitions...
4579 * data/push.c: ... to here and compute them from the value of the
4580 %define variable push_pull.
4581 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4582 parsing requests here...
4583 * data/yacc.c: ... hack this to switch to push.c any time
4584 b4_use_push_pull_flag or the %define variable push_pull is set. This
4585 will go away when we mv push.c yacc.c.
4586 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4587 push parsing is not supported since unused %define variables are
4588 reported anyway.
4589 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4590 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4591 comments for consistency with b4_percent_define_check_values.
4592 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4593 muscles.
4594 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4595 Remove.
4596 (prologue_declaration): Remove %push-parser and %push-pull-parser
4597 rules.
4598 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4599 * tests/calc.at: Update declarations.
4600 * tests/input.at (%define enum variables): New test case.
4601 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4602 declaration.
4603 (Push Parsing: Multiple impure instances): Update declaration.
4604 (Push Parsing: Unsupported Skeletons): New test case.
4605 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4606 declaration.
4607 (Exploding the Stack Size with Malloc): Update declaration.
4608
4609 2007-09-24 Wojciech Polak <polak@gnu.org>
4610
4611 Add XSLT transformations.
4612
4613 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4614 * data/xslt/xml2text.xsl: Transform XML into plain text.
4615 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4616 * data/Makefile.am (xsltdir): New variable.
4617 (dist_xslt_DATA): Add xslt/*.xsl files.
4618
4619 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4620
4621 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4622 Problem reported by Wojciech Polak.
4623 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4624 (xml_printf): Undo change I made on 21 September; that is,
4625 indent 2 spaces, not 1.
4626
4627 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4628
4629 Pacify ./configure --enable-gcc-warnings.
4630 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4631 `char const *' instead of `char *'.
4632 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4633 local variable `sep'.
4634
4635 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4636
4637 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4638 elsewhere.
4639 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4640 (xml_printf): Indent just 1 space for level.
4641 (e_char, xlate_char): Remove.
4642 (xml_escape_string): Rewrite to avoid undefined behavior (used
4643 storage that was freed from the stack).
4644 (xml_escape_n): Don't bother checking for subscript error.
4645
4646 2007-09-21 Wojciech Polak <polak@gnu.org>
4647
4648 Add Bison XML Automaton Report.
4649
4650 Add support for an -x option to generate an XML report.
4651 It is not documented yet.
4652 * src/print-xml.c: New file.
4653 * src/print-xml.h: Likewise.
4654 * lib/timevar.def (TV_XML): New var.
4655 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4656 * src/conflicts.c: Include print-xml.h.
4657 (solved_conflicts_xml_obstack): New var.
4658 (log_resolution, conflicts_solve, conflicts_free):
4659 Add support for XML report.
4660 (conflicts_output_val): New function.
4661 * src/conflicts.h (conflicts_output_val): New decl.
4662 * src/files.c (spec_xml_file): New var.
4663 (compute_output_file_names, output_file_names_free): Add XML support.
4664 * src/files.h (spec_xml_file): New decl.
4665 * src/getargs.c (xml_flag): New var.
4666 (usage, short_options, long_options, getargs): Add XML support.
4667 * src/getargs.h (xml_flag): New decl.
4668 * src/gram.c: Include print-xml.h.
4669 (rule_lhs_print_xml, rule_rhs_print_xml):
4670 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4671 New functions.
4672 * src/gram.h: Declare external ones.
4673 * src/main.c: Include print-xml.h.
4674 (main): Add XML support.
4675 * src/reduce.c: Include print-xml.h.
4676 (reduce_xml): New function.
4677 * src/reduce.h: Declare it.
4678 * src/state.c: Include print-xml.h.
4679 (state_new): Add XML support.
4680 (state_rule_lookahead_tokens_print_xml): New function.
4681 * src/state.h: Declare it.
4682 (struct state): New member solved_conflicts_xml.
4683 * src/symtab.c (symbol_class_get_string): New function.
4684 * src/symtab.h: Declare it.
4685
4686 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4687
4688 * GNUmakefile: Switch to coreutils's version.
4689 * bootstrap: Likewise.
4690 * Makefile.cfg: Adjust to new GNUmakefile.
4691 * README-hacking: Likewise.
4692
4693 Import from gnulib:
4694
4695 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4696 Bruno Haible <bruno@clisp.org>
4697
4698 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4699 and is a script that invokes bison. Tighten the code. Add comments.
4700
4701 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4702
4703 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4704 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4705 * doc/bison.texinfo (Decl Summary): Fix.
4706 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4707 * tests/input.at (Boolean %define variables): Update output.
4708 * tests/skeletons.at (%define boolean variables: invalid skeleton
4709 defaults): Rename to...
4710 (%define Boolean variables: invalid skeleton defaults): ... this and
4711 update output.
4712
4713 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4714
4715 In impure push mode, don't allow more than one yypstate to be allocated
4716 since multiple impure parsers would corrupt yynerrs.
4717 * data/push.c (yypstate_allocated): New static global variable
4718 initialized to 0.
4719 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4720 exhaustion if yypstate_allocated is 1, but still return 2.
4721 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4722 already 1. Otherwise, set it to 1.
4723 (yypstate_delete): Set it to 0.
4724 * tests/push.at (Push Parsing: Multiple impure instances): New test
4725 case.
4726
4727 2007-08-17 Bob Rossi <bob@brasko.net>
4728
4729 * doc/bison.texinfo (Push Decl): Document the push parser.
4730 (Table of Symbols): Ditto.
4731 (Pure Decl): Ditto.
4732 (Decl Summary): Ditto.
4733 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4734 Parser Create Function, Parser Delete Function):
4735 Add new push parser symbols.
4736 (Table of Symbols): Document push-parser, push-pull-parser,
4737 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4738
4739 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4740
4741 Update to GPLv3.
4742 * doc/gpl-3.0.texi: New file.
4743 * doc/gpl.texi: Remove.
4744 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4745 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4746 * README-hacking, TODO, bootstrap, bootstrap.conf:
4747 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4748 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4749 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4750 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4751 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4752 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4753 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4754 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4755 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4756 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4757 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4758 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4759 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4760 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4761 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4762 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4763 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4764 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4765 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4766 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4767 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4768 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4769 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4770 * src/complain.c, src/complain.h, src/conflicts.c:
4771 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4772 * src/files.h, src/flex-scanner.h, src/getargs.c:
4773 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4774 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4775 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4776 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4777 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4778 * src/print.c, src/print.h, src/print_graph.c:
4779 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4780 * src/reduce.h, src/relation.c, src/relation.h:
4781 * src/revision.h, src/scan-code.h, src/scan-code.l:
4782 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4783 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4784 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4785 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4786 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4787 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4788 * tests/existing.at, tests/glr-regression.at:
4789 * tests/headers.at, tests/input.at, tests/java.at:
4790 * tests/local.at, tests/output.at, tests/push.at:
4791 * tests/reduce.at, tests/regression.at, tests/sets.at:
4792 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4793 * tests/torture.at:
4794 Update to GPLv3.
4795
4796 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4797
4798 Get rid of broken %no-parser, -n, and --no-parser implementation and
4799 documentation.
4800 * TODO: Don't mention them.
4801 * doc/bison.1: Likewise.
4802 * doc/bison.texinfo (Decl Summary): Likewise.
4803 (Bison Options): Likewise.
4804 (Option Cross Key): Likewise.
4805 * src/getargs.c (no_parser_flag): Remove global variable.
4806 (usage): Don't print description of -n and --no-parser.
4807 (long_options): Remove --no-parser entry here.
4808 (getargs): Remove -n case in the switch here.
4809 * src/getargs.h (no_parser_flag): Remove extern.
4810 * tests/regression.at (Web2c Actions): Remove comment that mentions
4811 --no-parser.
4812
4813 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4814
4815 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4816 name user variables starting with `yy'. Just pass NULL instead of a
4817 dummy local &yylval to yypush_parse.
4818 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4819 starting with `yy'.
4820
4821 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4822
4823 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4824 true since it's then always used regardless of whether yyoverflow is
4825 defined. Reported by Christian Burger at
4826 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4827 * THANKS: Add Christian Burger.
4828
4829 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4830 node names: say "Decl Summary" not "Bison Declaration Summary".
4831
4832 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4833
4834 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4835 determine whether this function has already complained about an invalid
4836 value for a %define boolean variable, don't check whether Bison has
4837 ever examined the value. As written, the check was a tautology.
4838 Instead, record and check for this complaint using a separate muscle.
4839
4840 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4841
4842 Fix push parsing memory leak reported by Brandon Lucia at
4843 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4844 * THANKS: Add Brandon Lucia.
4845 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4846 but the parse never completed and thus freed it.
4847 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4848 * tests/testsuite.at: Include push.at.
4849 * test/push.at: New.
4850 (Push Parsing: Memory Leak for Early Deletion): New test case.
4851
4852 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4853
4854 Improve handling of multiple S/R conflicts in the same state and of S/R
4855 conflicts involving multiple reductions.
4856 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4857 set for a state here or Bison will abort if it is reassigned on a
4858 later conflicted reduction in the same state.
4859 Similarly, don't finalize and assign the solved conflicts report here
4860 or it will be lost if it is reassigned on a later conflicted reduction
4861 in the same state.
4862 (set_conflicts): Instead, assign them both here after all S/R conflicts
4863 in the state have been fully examined.
4864 * src/print.c (shift_set): Rename to...
4865 (no_reduce_set): ... this.
4866 (print_reductions): Update for rename, and add %nonassoc error action
4867 tokens to no_reduce_set so that, when printing the first remaining
4868 reduction on an error action token, the reduction is enclosed in
4869 brackets.
4870 (print_results): Update for rename.
4871 * tests/conflicts.at (Solved conflicts report for multiple reductions
4872 in a state): New test case.
4873 (%nonassoc error actions for multiple reductions in a state): New test
4874 case.
4875
4876 * src/main.c (main): Don't depend on C99 features.
4877
4878 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4879
4880 * build-aux/.cvsignore: Add compile.
4881 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4882 uniwidth.
4883
4884 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4885
4886 * bootstrap (slurp): Create target directories that don't exist.
4887 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4888
4889 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4890
4891 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4892 than item number.
4893 * closure.c (closure): Likewise.
4894 * state.h (reductions): Comment sorting of rules.
4895 (state): Comment sorting of items.
4896
4897 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4898
4899 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4900 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4901 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4902 definition in order to avoid Gnulib headers since we don't use config.h
4903 here.
4904 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4905 rather than AT_DATA so that config.h is included.
4906
4907 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4908
4909 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4910 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4911 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4912 and so that YYFPRINTF is guaranteed to be defined here.
4913
4914 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4915
4916 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4917 with...
4918 (muscle_percent_define_check_values): ... this more helpful function.
4919 Again, it's not used yet, but it will be.
4920 * src/muscle_tab.h: Likewise.
4921
4922 Improve some comments in parser table construction.
4923 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4924 (generate_states): Don't mention ruleset, which is internal to closure.
4925 * src/closure.c (closure): Explain sorting of core and itemset, which
4926 is required for this function to behave correctly.
4927 * src/closure.h (closure): Mention sorting.
4928
4929 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4930
4931 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4932 move the check for disabled transitions to an aver since conflict
4933 resolution hasn't happened yet.
4934
4935 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4936 labels a state as inconsistent just because it has error transitions.
4937 The original form of this check appeared in revision 1.1 of lalr.c,
4938 which was committed on 1991-12-21. Now (at least), changing the
4939 consistency label on such a state appears to have no useful effect in
4940 any of the places it is examined, which I enumerate below. The key
4941 point to understanding each item in this enumeration is that a state
4942 with an error transition is labelled consistent in the first place only
4943 if it has no rules, so the check cannot matter for states that have
4944 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4945 to try to identify its conflicts, and a state must have *rules* to have
4946 conflicts. (2) Labelling a state as inconsistent will affect how
4947 action_row sets the default *rule* for the state. (3) Labelling a
4948 state as inconsistent will cause build_relations to add lookback edges
4949 to *rules* in that state.
4950 * src/state.h (struct state): Word the comment for member consistent
4951 more carefully.
4952
4953 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4954
4955 Don't depend on C99 features.
4956 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4957 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4958 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4959 * src/state.c (state_mark_reachable_states): Fix for-loop.
4960 (state_remove_unreachable_states): Fix for-loop.
4961
4962 Don't widen struct state with member reachable just to temporarily
4963 record reachability. Instead, use a local bitset.
4964 * src/state.h (struct state): Remove member.
4965 * src/state.c (state_new): Don't initialize it.
4966 (state_mark_reachable_states): Rename to...
4967 (state_record_reachable_states): ... this, and use bitset.
4968 (state_remove_unreachable_states): Use bitset.
4969
4970 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4971
4972 * src/Makefile.am (yacc): Quote target action commands properly so
4973 that the yacc script isn't corrupt. Reported by Hans Aberg at
4974 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4975
4976 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4977 the case of pure parsers. Reported by Frans Englich at
4978 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4979 * THANKS: Add Frans Englich.
4980
4981 * NEWS (2.3a+): In the %code entry, reference section `Bison
4982 Declaration Summary' from the manual now since the %code summary has
4983 moved there.
4984 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4985 in the rules section must be terminated by semicolons.
4986
4987 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4988
4989 Extend the front-end API for %define variables to more completely
4990 mirror the back-end. This will be useful in the future.
4991 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4992 Update comments to mention the new front-end counterparts of these
4993 macros.
4994 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4995 for muscle_string_decode and muscle_location_decode.
4996 (muscle_string_decode): New static function.
4997 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4998 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4999 functions.
5000 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5001 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5002 implementation more closely.
5003 (muscle_percent_define_invalid_value): New function.
5004 * src/muscle_tab.h (muscle_percent_define_get,
5005 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5006 Prototype.
5007
5008 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5009
5010 * NEWS (2.3a+): Mention yesterday's state-removal change.
5011 (2.3a): Remove the %language entry, which was added after 2.3a.
5012 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5013 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5014 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5015 tests/existing.at: Update copyright date.
5016
5017 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5018
5019 If conflict resolution makes states unreachable, remove those states,
5020 report rules that are then unused, and don't report conflicts in those
5021 states.
5022 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5023 New global function.
5024 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5025 function.
5026 * src/main.c (main): After conflict resolution, remove the unreachable
5027 states and update all data structures that reference states by number.
5028 * src/state.c (state_new): Initialize each state's reachable member to
5029 false.
5030 (state_mark_reachable_states): New static function.
5031 (state_remove_unreachable_states): New global function.
5032 * src/state.h (struct state): Add member bool reachable.
5033 (state_remove_unreachable_states): Prototype.
5034 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5035 New test case.
5036 * tests/existing.at (GNU pic Grammar): Update test case output now that
5037 an unused rule is discovered.
5038
5039 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5040
5041 Minor code cleanup in parser table construction.
5042 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5043 (new_itemsets, save_reductions): Update for rename to nitemset.
5044 * src/closure.c (nritemset): Rename to...
5045 (nitemset): ... this since the "r" appears to meaningless and isn't
5046 used in the comments.
5047 (closure): Update for rename.
5048 * src/closure.h (nritemset): Update extern to...
5049 (nitemset): ... this.
5050 * src/lalr.c (LA): Fix a typo in comments.
5051 * src/print.c (print_core): Update for rename to nitemset.
5052 * src/print_graph.c (print_graph): Likewise.
5053 * src/state.h: Fix some typos in header comments.
5054
5055 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5056
5057 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5058 still sticks to ASCII. Sorry!
5059
5060 * README-hacking: New file, taken mostly from coreutils, with changes
5061 for Bison. Contains much of the contents of:
5062 * README-cvs: Remove.
5063 * bootstrap: Sync from gnulib.
5064 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5065 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5066
5067 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5068
5069 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5070 Setzer.
5071 (Java Differences): Fix some typos.
5072 * THANKS: Add Sebastian Setzer.
5073
5074 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5075
5076 * data/java.m4 (b4_single_class_if): Remove.
5077 (b4_abstract_if): Look at "%define abstract".
5078 (b4_lexer_if): New.
5079 (b4_union_name): Rename...
5080 (b4_yystype): ... to this. Map to "%define stype".
5081 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5082 b4_maybe_throws): Fix quoting.
5083 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5084 * data/lalr1.java (Lexer interface): Always define.
5085 (Lexer interface within parser class): Remove.
5086 (YYLexer class): New, used when "%code lexer" is present.
5087 (constructor): When "%code lexer" is used, pass %lex-param
5088 to the lexer constructor.
5089 (yylex, yyparse): Remove %lex-param from method invocations
5090 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5091
5092 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5093 abstract". Rename "%define union_name" to "%define stype".
5094 Rename method names according to previous patch.
5095 (Java Scanner Interface): Describe "%code lexer" instead of
5096 "%pure-parser" and "%define single_class".
5097 (Java Differences): Mention "%code lexer".
5098
5099 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5100 Include scanner here, using macros from tests/local.at.
5101 (AT_DATA_CALC_Y): Remove final argument.
5102 (_AT_CHECK_JAVA_CALC): Likewise.
5103 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5104 of %locations and %error-verbose.
5105 (main): Test with and without %lex-param.
5106 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5107 (AT_BISON_OPTION_POPDEFS): Pop it.
5108
5109 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5110
5111 DJGPP spefic issue. Inhibit the use of disallowed characters for
5112 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5113 and concern testsuite case 46.
5114 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5115 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5116 * djgpp/config.bat: Inhibit the use of disallowed characters.
5117
5118 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5119
5120 Miscellaneous %define and %code cleanup.
5121 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5122 values are interpreted.
5123 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5124 documentation a little more.
5125 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5126 muscle_percent_define_insert, muscle_percent_code_grow): New
5127 functions/macros.
5128 * src/muscle_tab.h (muscle_percent_define_insert,
5129 muscle_percent_code_grow): Prototype.
5130 * src/parse-gram.y (prologue_declaration): Use
5131 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5132 %define and %code directives.
5133
5134 Make it easy to share %define boolean variables between the front-end
5135 and back-end. Though not used yet, this will be useful in the future.
5136 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5137 Bison uses of names rather than just skeleton uses of names.
5138 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5139 b4_percent_define_skeleton_variables(VARIABLE) to
5140 b4_percent_define_bison_variables(VARIABLE).
5141 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5142 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5143 b4_percent_code_bison_qualifiers(QUALIFIER).
5144 (b4_check_user_names_wrap): Update for renames.
5145 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5146 muscle_percent_define_default): New functions mimicking
5147 b4_percent_define_flag_if and b4_percent_define_default.
5148
5149 For %define variables, report locations for invalid values and
5150 redefinitions.
5151 * data/bison.m4 (b4_percent_define_flag_if): Read
5152 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5153 value for VARIABLE.
5154 (b4_percent_define_default): Save a special location in
5155 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5156 must later be reported as invalid.
5157 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5158 functions.
5159 (muscle_percent_define_insert): Record the location of VARIABLE in
5160 muscle percent_define_loc(VARIABLE), and use it to report the previous
5161 location for a redefinition.
5162 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5163 (muscle_percent_define_default): Update like b4_percent_define_default.
5164 (muscle_grow_user_name_list): Rename to...
5165 (muscle_user_name_list_grow): ... this for consistency and use
5166 muscle_location_grow.
5167 * src/muscle_tab.h (muscle_location_grow): Prototype.
5168 * tests/input.at (%define errors): Update expected output.
5169 * tests/skeletons.at (%define boolean variables: invalid skeleton
5170 defaults): New test case.
5171
5172 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5173
5174 * src/print.c (lookahead_set, state_default_rule): Remove.
5175 (print_reductions): Replace state_default_rule invocation with
5176 equivalent use of yydefact, which was computed in token_actions in
5177 tables.c.
5178 (print_results): Don't allocate lookahead_set.
5179
5180 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5181
5182 * data/lalr1.java: Prefix all private members with yy.
5183
5184 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5185
5186 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5187 Sebastien Fricker at
5188 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5189 * THANKS: Add Sebastien Fricker.
5190 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5191 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5192 accept a variable number of arguments.
5193
5194 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5195
5196 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5197
5198 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5199
5200 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5201 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5202 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5203
5204 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5205
5206 Undo my 2007-02-07 change, switching back to the c-strcase module
5207 introduced in the 2007-02-03 change. Bruno Haible reported that
5208 the 2007-02-07 change would be dangerous in Turkish if we add a
5209 language whose name contains "i", since "i" is not lowercase "I"
5210 in Turkish.
5211 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5212 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5213 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5214 * m4/.cvsignore: Remove strcase.m4.
5215 * src/getargs.c: Revert 2007-02-07 change, as follows.
5216 Include c-strcase.h.
5217 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5218
5219 2007-02-11 Bruno Haible <bruno@clisp.org>
5220
5221 Enable the Java related testsuite tests when the only Java compiler
5222 found is a gcj < 4.3. Discussed at
5223 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5224 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5225
5226 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5227
5228 * data/Makefile.am: Update copyright date.
5229 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5230 yypstate_new returns NULL.
5231 (yypstate_new): Return NULL if malloc does.
5232 * src/reader.c (packgram): Move translation of rule actions from the
5233 beginning of packgram to...
5234 (check_and_convert_grammar): ... here right before packgram is invoked
5235 so it's easier to write more complete comments, and remove redundant
5236 code.
5237
5238 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5239
5240 As in semantic actions, make @$ in %initial-action, %destructor, and
5241 %printer imply %locations.
5242 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5243 scanning @$.
5244 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5245 (@$ in %initial-action implies %locations,
5246 @$ in %destructor implies %locations,
5247 @$ in %printer implies %locations): ... these new test cases.
5248
5249 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5250
5251 Undo most of the 2007-02-03 change, switching to the strcase module
5252 now that gnulib strcase has been fixed.
5253 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5254 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5255 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5256 * m4/.cvsignore: Add strcase.m4.
5257 * src/getargs.c: Revert 2007-02-03 change, as follows.
5258 Don't include c-strcase.h.
5259 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5260 strcasecmp has "unspecified behavior" outside the POSIX locale,
5261 but it works fine in practice if at least one argument is ASCII,
5262 as is the case in Bison.
5263
5264 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5265
5266 * tests/java.at: Skip tests if only one of javac/java is present.
5267 Reported by Joel E. Denny.
5268 * tests/atlocal.in: Adjust copyright years.
5269
5270 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5271
5272 * data/lalr1.java (Stack): Work around old verifiers that disallow
5273 access to the private fields of an inner class, from the outer class.
5274 We can make Stack's fields public because user code doesn't have access
5275 to the instance of Stack used by parse(). Reported by Paul Eggert.
5276
5277 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5278
5279 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5280 the right spot for these files?
5281 * bootstrap.conf (gnulib_modules): Add c-strcase.
5282 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5283 c-strncasecmp.c.
5284 * src/getargs.c: Include c-strcase.h.
5285 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5286 to avoid unspecified behavior.
5287
5288 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5289
5290 * doc/bison.texinfo (Decl Summary): Correct typo.
5291
5292 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5293
5294 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5295 Complain if the value does not match empty, "true" or "false".
5296 * data/c++.m4: Adjust default definitions of %define variables.
5297 * data/java.m4: Adjust default definitions of %define variables.
5298 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5299 to above behavior.
5300 * tests/input.at (Boolean %define variables): Test new behavior.
5301
5302 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5303
5304 * NEWS: Mention java.
5305 * TODO: Remove things that are done.
5306 * bootstrap.conf: Add javacomp-script and javaexec-script.
5307 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5308
5309 * data/Makefile.am: Add new files.
5310 * data/java-skel.m4: New.
5311 * data/java.m4: New.
5312 * data/lalr1.java: New.
5313
5314 * doc/bison.texinfo: Put "A Complete C++ Example" under
5315 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5316 under Other Languages.
5317
5318 * src/getargs.c (valid_languages): Add Java.
5319 * src/getargs.h (struct bison_language): Update size of string fields.
5320
5321 * tests/Makefile.am: Add java.at.
5322 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5323 * tests/java.at: New.
5324 * tests/testsuite.at: Include it.
5325
5326 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5327
5328 Clean up.
5329 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5330 at_directive_argv arguments so these no longer have to be global
5331 variables. Also, update the implementation for the following changes.
5332 (fail_for_at_directive_too_many_args,
5333 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5334 (at_directive_name): Remove as at_directive_argv[0] will be used for
5335 this now.
5336 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5337 for the directive name.
5338 (at_directive_argc, at_directive_argv): Make these local within
5339 skel_lex instead of global.
5340 (INITIAL): Update directive start action for above changes.
5341 (SC_AT_DIRECTIVE_ARG): Rename to...
5342 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5343 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5344 (scan_skel): Move yylex_destroy to...
5345 (skel_scanner_free): ... here.
5346 * tests/skeletons.at (installed skeleton file name): Rename to...
5347 (installed skeleton file names): ... this.
5348
5349 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5350
5351 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5352 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5353 Summary" not "Directives".
5354 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5355 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5356 since the former is now the more complete one.
5357 (Prologue Alternatives): Likewise and do the same for %defines.
5358 (Table of Symbols): Add summary of %code, add summary of %define, and
5359 move full %code documentation to...
5360 (Decl Summary): ... here for consistency with other entries in these
5361 sections.
5362 Move %define entry in order to keep this list alphabetized.
5363 Reword %define entry a little to put less emphasis on the skeleton
5364 concept, which most users shouldn't have to think about.
5365
5366 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5367
5368 Adjust to recent gnulib changes.
5369 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5370 Add string.h, string_.h, unistd_.h, wchar_.h.
5371 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5372 * src/system.h: Don't include <stpcpy.h>; this is now done by
5373 <string.h>.
5374
5375 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5376
5377 Simplify implementation of unqualified %code, implement macros for
5378 uniform treatment of boolean %define flags. Document %define.
5379 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5380 b4_percent_code_ifdef): New.
5381 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5382 * data/c++.m4: Define default value for global_tokens_and_yystype.
5383 * data/glr.cc: Likewise.
5384 * data/location.cc: Use b4_percent_define_flag_if.
5385
5386 * doc/bison.texinfo (Decl Summary): Document %define.
5387
5388 * src/parse-gram.y (Unqualified %code): Change muscle name to
5389 b4_percent_code().
5390 (content.opt): Default to empty.
5391
5392 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5393
5394 Implement support for relative and absolute skeleton file names.
5395 Discussed starting at
5396 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5397 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5398 (Bison Options): Document in --skeleton entry.
5399 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5400 full_skeleton can't necessarily hold all of pkgdatadir.
5401 If the specified skeleton file name contains a `/', don't prepend
5402 pkgdatadir.
5403 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5404 file name contains a `/', prepend the grammar file directory.
5405 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5406 * skeletons.at: New file.
5407 (relative skeleton file names): New test case.
5408 (installed skeleton file names): New test case.
5409 * tests/testsuite.at: Include skeletons.at.
5410
5411 * bootstrap: Update copyright to 2007.
5412
5413 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5414
5415 * bootstrap: Remove occurrences of .#bootmp from the files.
5416
5417 2007-01-17 Akim Demaille <akim@epita.fr>
5418
5419 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5420 nonterminals.
5421 Use per-type %printer.
5422
5423 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5424
5425 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5426 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5427 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5428 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5429 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5430 tests/glr-regression.at, tests/input.at, tests/local.at,
5431 tests/output.at, tests/torture.at: Update copyright to 2007.
5432
5433 2007-01-16 Akim Demaille <akim@epita.fr>
5434
5435 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5436 error code.
5437 (Calc++ Scanner): Exit with failure if we can't open the input
5438 file.
5439 Accept "-" standing for stdin.
5440 (Calc++ Top Level): Print the result only if the parsing was
5441 successful.
5442
5443 2007-01-16 Akim Demaille <akim@epita.fr>
5444
5445 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5446
5447 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5448 and Joel E. Denny <jdenny@ces.clemson.edu>
5449
5450 Clean up %define and %code implementation in M4 some. Most
5451 importantly, rename all related macros to be in the b4_percent_define
5452 and b4_percent_code namespaces. Also, complete support for `.' in
5453 %define variable names and %code qualifiers.
5454 * data/bison.m4 (b4_check_user_names): Check for special
5455 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5456 m4_foreach loops.
5457 (b4_get_percent_define, b4_get_percent_code): Rename to...
5458 (b4_percent_define_get, b4_percent_code_get): ... these.
5459 Extend documentation with examples.
5460 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5461 b4_percent_define_skeleton_variables and
5462 b4_percent_code_skeleton_qualifiers.
5463 Expect any value for the %define variable `foo' to be stored in the
5464 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5465 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5466 expect any unqualified %code blocks to be stored in a macro named
5467 `b4_percent_code_unqualified'.
5468 Use m4_indir so that %define variable names and %code qualifiers can
5469 contain `.', which is allowed by the grammar parser.
5470 (b4_percent_define_default): New macro to set a default value for a
5471 %define variable.
5472 (m4_wrap): Update wrapped code, and fix some underquoting.
5473 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5474 Expect grammar uses of %define variables and %code qualifiers to be
5475 defined in b4_percent_define_user_variables and
5476 b4_percent_code_user_qualifiers.
5477 * data/c++.m4: Use b4_percent_define_default rather than
5478 m4_define_default. Fix some underquoting. Skeleton usage of %define
5479 variable define_location_comparison now implies skeleton usage of
5480 %define variable filename_type.
5481 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5482 data/push.c, data/yacc.c: Update macro names.
5483 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5484 muscle names.
5485
5486 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5487
5488 DJGPP specific issues.
5489
5490 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5491 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5492
5493 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5494
5495 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5496 run parsers in all tests so that Valgrind is invoked during
5497 maintainer-check-valgrind.
5498 (Duplicate representation of merged trees): Free all semantic values.
5499 (Duplicated user destructor for lookahead): Likewise.
5500
5501 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5502
5503 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5504 command-line prefix.
5505 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5506 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5507 miss Valgrind messages.
5508 (Exploding the Stack Size with Malloc): Likewise.
5509
5510 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5511
5512 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5513 locals. Reported by Juan Manuel Guerrero at
5514 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5515 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5516 Fix some indentation also.
5517 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5518 explaining this issue.
5519
5520 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5521 and Joel E. Denny <jdenny@ces.clemson.edu>
5522
5523 Simplify union and prologue handling, and escape union and lex/parse
5524 params with digraphs.
5525 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5526 values to the empty string since these are no longer guaranteed
5527 initialized by the front-end.
5528 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5529 braces around b4_user_stype since this is no longer done by the
5530 front-end.
5531 * src/files.c, src/files.h (pre_prologue_obstack,
5532 post_prologue_obstack): Remove.
5533 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5534 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5535 with digraphs. This fixes lex params and parse params.
5536 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5537 * src/output.c (prepare): Remove muscle insertion of the prologues.
5538 (output): Remove freeing of pre_prologue_obstack and
5539 post_prologue_obstack.
5540 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5541 than prologue_augment for prologue parsing so you don't need prologue
5542 obstacks.
5543 (grammar_declaration): For %union RHS, use `braceless' instead of
5544 "{...}" so that braces are already stripped and code is escaped with
5545 digraphs.
5546 * src/reader.c (prologue_augment): Remove.
5547 (reader): Remove initialization of pre_prologue_obstack and
5548 post_prologue_obstack.
5549 * src/reader.h (prologue_augment): Remove.
5550
5551 * data/c.m4: Remove stray parenthesis.
5552
5553 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5554
5555 Remove quotes from variables names in %define directives and from
5556 qualifiers in %code directives, and restrict the characters that are
5557 allowed in them to M4-friendly ones. For %define, continue to support
5558 the quoted form as a deprecated feature. Discussed starting at
5559 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5560 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5561 %code.
5562 * doc/bison.texinfo (Prologue Alternatives): Update.
5563 (Decl Summary): In %defines entry, update mention of `%code requires'
5564 and `%code provides'.
5565 (C++ Location Values): Update %define uses.
5566 (Calc++ Parser Interface): Likewise.
5567 (Calc++ Parser): Likewise, and update `%code requires' uses.
5568 (Table of Symbols): Update %code documentation.
5569 * src/parse-gram.y (prologue_declaration): For %define variables, use
5570 `variable' instead of `STRING'.
5571 (grammar_declaration): For %code qualifiers, use `ID' instead of
5572 `STRING'.
5573 (variable): New nonterminal that takes an `ID' or a `STRING'.
5574 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5575 and %define uses.
5576 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5577 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5578 (%define errors): Update %define uses.
5579
5580 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5581
5582 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5583 instead of muscle_insert for %define values so that M4-special
5584 characters are replaced with digraphs.
5585 * tests/input.at (%define errors): Extend to check weird values.
5586
5587 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5588
5589 Instead of having skeletons declare all valid %define variables and
5590 %code qualifiers, provide macros that retrieve the associated values
5591 and build these lists automatically. Thus Bison will now warn when a
5592 variable or qualifier is not used by the skeleton in the current
5593 invocation regardless of whether it might sometimes be used by that
5594 skeleton in other invocations. Also, move all %define value macros to
5595 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5596 form, which is replaced by %code.
5597 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5598 (b4_check_user_names): ... this, and change the series of valid name
5599 arguments to a single list argument for names used in the skeleton
5600 similar to the existing list argument for names used in the grammar.
5601 Warn instead of complaining.
5602 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5603 values and %code code, to format %code code properly, and to build
5604 lists of all %define variables and %code qualifiers used in the
5605 skeleton: b4_skeleton_percent_define_variables and
5606 b4_skeleton_percent_code_qualifiers.
5607 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5608 Remove, and...
5609 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5610 the skeleton names lists can finish building first. In place of
5611 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5612 expect the lists b4_user_percent_define_variables and
5613 b4_user_percent_code_qualifiers.
5614 * data/c++.m4: Where setting default values for b4_parser_class_name,
5615 b4_location_type, b4_filename_type, b4_namespace, and
5616 b4_define_location_comparison, update their names to the
5617 b4_percent_define_ namespace.
5618 * data/glr.c: Don't use b4_check_percent_define_variables and
5619 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5620 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5621 (b4_parser_class_name, b4_namespace): Define these using
5622 b4_get_percent_define for parser_class_name and namespace.
5623 * data/location.cc: Use b4_get_percent_define.
5624 * data/push.c: Don't use b4_check_percent_define_variables and
5625 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5626 * data/yacc.c: Likewise, and don't call m4_exit in
5627 b4_use_push_for_pull_if or m4_wrap code will never execute.
5628 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5629 Rename to...
5630 (muscle_grow_user_name_list): ... this for consistency with the
5631 terminology used in bison.m4.
5632 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5633 %define variable names, and rename muscle used_percent_define_variables
5634 to user_percent_define_variables.
5635 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5636 user_percent_code_qualifiers.
5637 (content): Remove.
5638 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5639 {CODE} form is no longer accepted.
5640 * tests/input.at (Reject bad %code qualifiers): Rename to...
5641 (Reject unused %code qualifiers): ... this, and update test output.
5642 (%define error): Update test output.
5643
5644 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5645
5646 Check for unrecognized %define variables similar to checking for
5647 unrecognized %code qualifiers. Check for redefined %define variables.
5648 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5649 generalizes...
5650 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5651 (b4_check_percent_define_variables): New, also wraps it.
5652 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5653 variables using b4_check_percent_define_variables.
5654 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5655 all those exercised in the test suite and all those listed in the
5656 `Default values' section of c++.m4. Are there others?
5657 * data/push.c, data/yacc.c: Declare no valid %define variables.
5658 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5659 similar to muscle_find, but it works even when the muscle stores a
5660 const value.
5661 (muscle_grow_used_name_list): New function for constructing the used
5662 name list muscles that b4_check_for_unrecognized_names requires.
5663 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5664 %define'd more than once. Define the b4_used_percent_define_variables
5665 muscle with muscle_grow_used_name_list.
5666 (grammar_declaration): Abbreviate %code code with
5667 muscle_grow_used_name_list.
5668 * tests/input.at (%define errors): New.
5669
5670 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5671
5672 Provide warn_at, complain_at, and fatal_at function callbacks to the
5673 skeletons, and use this for %code qualifier complaints.
5674 * data/bison.m4 (b4_error_at): New, invoked by...
5675 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5676 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5677 @fatal_at(...@) directives.
5678 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5679 qualifiers in b4_used_percent_code_qualifiers and to use
5680 b4_complain_at.
5681 * src/location.c, src/location.h (boundary_set_from_string): New global
5682 function.
5683 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5684 function.
5685 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5686 to b4_used_percent_code_qualifiers.
5687 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5688 function.
5689 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5690 (lineno): Rename to...
5691 (out_lineno): ... this so I don't misunderstand it again.
5692 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5693 here; these newlines are in the input but not the output file.
5694 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5695 (at_directive_perform): ... this new static function, and add handling
5696 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5697 directives.
5698 * tests/input.at (Reject bad %code qualifiers): Update test output with
5699 locations and extend.
5700
5701 * tests/output.at (Output file name: [, Output file name: ]): Remove
5702 bogus comment about these tests failing.
5703
5704 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5705
5706 Clean up b4_check_percent_code_qualifiers a little.
5707 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5708 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5709 documentation and add examples.
5710 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5711 qualifiers here.
5712
5713 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5714
5715 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5716 unreliable -- especially when they're hidden inside another macro.
5717 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5718 data/c.m4: Remove m4_divert(-1).
5719 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5720 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5721 m4_divert_push(0) and m4_divert_pop(0).
5722 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5723 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5724 pushed and popped by m4sugar, should be first on the stack.
5725
5726 Provide warn, complain, and fatal function callbacks to the skeletons.
5727 This provides more flexibility than m4_fatal, improves the error
5728 message format, and captures messages for translation. Discussed
5729 starting at
5730 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5731 * data/bison.m4 (b4_error): New, invoked by...
5732 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5733 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5734 directives. Because these M4 macros might be called when the current
5735 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5736 the previous removal of uses of m4_divert, which caused trouble.
5737 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5738 m4_fatal to report unrecognized %code qualifiers.
5739 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5740 push parser requests.
5741 * data/glr.c: Use b4_complain instead of m4_fatal to report
5742 non-deterministic push parser requests.
5743 Update @output usage to @output(...@) form.
5744 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5745 report missing %defines. Update @output usage to @output(...@) form.
5746 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5747 @output(...@) form.
5748 * src/main.c (main): Invoke skel_scanner_free.
5749 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5750 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5751 obstack_for_string from flex-scanner.h.
5752 (YY_DECL): Use to declare skel_lex static.
5753 (decode_at_digraphs): Remove; now handled in the new
5754 SC_AT_DIRECTIVE_ARG start condition.
5755 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5756 functions.
5757 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5758 at_directive_argv): New static globals.
5759 (INITIAL): Use fail_for_invalid_at.
5760 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5761 recognize the start of a generalized `@directive(...@)' form and
5762 start...
5763 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5764 directive args (using the new obstack_for_string), to decode the
5765 contained @ diagraphs, and to perform the directive. It recognizes
5766 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5767 @output(...@).
5768 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5769 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5770 `@,'.
5771 (scan_skel): Initialize obstack_for_string on the first call.
5772 (skel_scanner_free): New function to free obstack_for_string.
5773 * tests/input.at (Reject bad %code qualifiers): Update test output.
5774
5775 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5776
5777 Consolidate the 4 prologue alternative directives (%code, %requires,
5778 %provides, and %code-top) into a single %code directive with an
5779 optional qualifier field. Discussed at
5780 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5781 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5782 alternatives.
5783 * doc/bison.texinfo (Prologue Alternatives): Update.
5784 (Decl Summary): Update to %code "requires" and %code "provides".
5785 (Calc++ Parser): Update to %code "requires".
5786 (Table of Symbols): Remove entries for %requires, %provides, and
5787 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5788 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5789 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5790 which are skeleton-specific.
5791 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5792 declare what %code qualifiers it supports and to complain if any other
5793 qualifiers were used in the grammar.
5794 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5795 and b4_user_code([b4_percent_code_provides]) in place of
5796 b4_user_requires and b4_user_provides.
5797 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5798 Add b4_user_code([b4_percent_code_top]) and
5799 b4_user_code([b4_percent_code]).
5800 Invoke b4_check_percent_code_qualifiers.
5801 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5802 PERCENT_REQUIRES): Remove.
5803 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5804 %requires. Rewrite the %code RHS as the unqualified form defining the
5805 muscle b4_percent_code. Add another RHS for the qualified %code form,
5806 which defines muscles of the form b4_percent_code_QUALIFIER and the
5807 b4_used_percent_code_qualifiers muscle.
5808 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5809 PERCENT_REQUIRES): Remove.
5810 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5811 %code "requires" and %code "provides".
5812 * tests/input.at (Reject bad %code qualifiers): New.
5813
5814 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5815
5816 Use the new code_props interface for destructors and printers.
5817 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5818 printer_location members, and change the type of the destructor and
5819 printer members to code_props.
5820 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5821 symbol_printer_get, semantic_type_destructor_set,
5822 semantic_type_printer_set, default_tagged_destructor_set,
5823 default_tagless_destructor_set, default_tagged_printer_set,
5824 default_tagless_printer_set): Use code_props in arguments and return
5825 types in place of char const * and location.
5826 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5827 since the locations are now contained in the return of
5828 symbol_destructor_get and symbol_printer_get.
5829 * src/output.c (symbol_destructors_output, symbol_printers_output):
5830 Replace with...
5831 (symbol_code_props_output): ... this to eliminate duplicate code.
5832 (output_skeleton): Update to use symbol_code_props_output.
5833 * src/reader.c (symbol_should_be_used): Update use of
5834 symbol_destructor_get.
5835 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5836 Update uses of the various _destructor_set and _printer_set functions.
5837 * src/symtab.c: (default_tagged_destructor_location,
5838 default_tagless_destructor_location, default_tagged_printer_location,
5839 default_tagless_printer_location): Remove since we...
5840 (default_tagged_destructor, default_tagless_destructor,
5841 default_tagged_printer, default_tagless_printer): ... change the type
5842 of these to code_props.
5843 (symbol_new, semantic_type_new, symbol_destructor_set,
5844 semantic_type_destructor_set, symbol_destructor_get,
5845 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5846 symbol_check_alias_consistency, default_tagged_destructor_set,
5847 default_tagless_destructor_set, default_tagged_printer_set,
5848 default_tagless_printer_set): Update.
5849 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5850 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5851 code_props members.
5852 (symbol_print): Use SYMBOL_CODE_PRINT.
5853
5854 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5855
5856 Use the new code_props interface for rule actions.
5857 * src/symlist.h (symbol_list): Replace action, action_location, and
5858 used members with a code_props action_props member.
5859 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5860 grammar_midrule_action, grammar_current_rule_merge_set,
5861 grammar_current_rule_symbol_append, packgram): Update.
5862 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5863 * src/scan-code.l (handle_action_dollar): Update.
5864 (translate_rule_action): Remove, no longer used.
5865 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5866
5867 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5868
5869 Use the new code_props interface in parse-gram.y.
5870 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5871 Update all uses of translate_* functions to use the new code_props
5872 interface and to use gram_scanner_last_string_free and
5873 code_scanner_last_string_free where possible.
5874 (grammar_declaration): symbol_list_destructor_set and
5875 symbol_list_printer_set now perform the translation, so don't do it
5876 here. Use gram_scanner_last_string_free where possible.
5877 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5878 translate_code): Remove, no longer used.
5879 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5880 symbol_list_printer_set): Perform code translation here rather than
5881 depending on the caller to do so.
5882
5883 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5884 * src/scan-gram.h (gram_last_string): Remove declaration.
5885 * src/scan-gram.l (last_string): Declare it static.
5886
5887 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5888
5889 Encapsulate code properties and related functionality for the various
5890 destructors, printers, and actions into a code_props structure and
5891 interface. This patch merely implements code_props in scan-code.h and
5892 scan-code.l. Future patches will rewrite other modules to use it.
5893 Discussed starting at
5894 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5895 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5896 consistently initialize const structs that have an empty location
5897 field.
5898 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5899 to ensure consistency.
5900 * src/scan-code.h (code_props): New structure.
5901 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5902 function, macro, and const global variable for initializing a
5903 code_props with no code.
5904 (code_props_plain_init, code_props_symbol_action_init,
5905 code_props_rule_action_init, code_props_translate_code): The rest of
5906 the new code_props functional interface. Among other things, the init
5907 functions set the code_props kind field so that
5908 code_props_translate_code will know whether to behave like
5909 translate_symbol_action, translate_rule_action, or translate_code.
5910 These old translate functions must remain until all other modules are
5911 updated to use the new code_props interface.
5912 (code_scanner_last_string_free): New function similar to
5913 gram_scanner_last_string_free.
5914 (code_scanner_free): Add documentation.
5915 * src/scan-code.l: Implement the new interface.
5916 (code_lex): Make it static, add a code_props* argument, and remove the
5917 rule argument.
5918 (last_string): New static global similar to the one in scan-gram.l.
5919 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5920 instead of rule.
5921 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5922 code_props since Bison may one day use this information for destructors
5923 and printers.
5924 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5925 (handle_action_dollar): Use symbol_list_n_get and set used flag
5926 directly since symbol_list_n_used_set is removed.
5927 (translate_action): Add a code_props* argument and remove the rule,
5928 action, and location arguments. Pass the code_props* on to code_lex.
5929 (translate_rule_action, translate_symbol_action, translate_code):
5930 Rewrite as wrappers around the new code_props interface.
5931 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5932 it would eventually need to break the encapsulation of code_props.
5933
5934 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5935
5936 * etc/.cvsignore: New.
5937
5938 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5939
5940 Add maintainer-push-check to run maintainer-check using push parsing in
5941 place of pull parsing where available.
5942 * Makefile.am (maintainer-push-check): New.
5943 * data/bison.m4 (b4_use_push_for_pull_if): New.
5944 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5945 appropriately based on their existing values.
5946 (yypush_parse): Don't print push-parser-specific diagnostics if push
5947 parsing is being used in place of pull parsing.
5948 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5949 push.c.
5950 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5951 variable, and insert b4_use_push_for_pull_flag into muscles.
5952 * tests/Makefile.am (maintainer-push-check): New.
5953
5954 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5955
5956 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5957 (whether successful or failed) so that yypush_parse can be invoked
5958 again to start a new parse using the same yypstate.
5959 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5960 check multiple yypull_parse invocations on the same yypstate. For pull
5961 mode, extend to check multiple yyparse invocations.
5962 (Exploding the Stack Size with Alloca): Extend to try with
5963 %push-pull-parser.
5964 (Exploding the Stack Size with Malloc): Likewise.
5965
5966 * tests/calc.at (Simple LALR Calculator): Don't specify
5967 %skeleton "push.c" since %push-pull-parser implies that now.
5968 * tests/headers.at (export YYLTYPE): Don't check for the push
5969 declarations. Otherwise, this test case can't be used to see if push
5970 mode can truly emulate pull mode.
5971 * tests/input.at (Torturing the Scanner): Likewise.
5972 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5973 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5974 AT_YACC_IF, which now includes the case of push mode since %skeleton
5975 need not be used for push mode. This will be more intuitive once
5976 push.c is renamed to yacc.c.
5977
5978 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5979
5980 For push mode, convert yyparse from a macro to a function, invoke yylex
5981 instead of passing a yylexp argument to yypull_parse, and don't
5982 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5983 Discussed starting at
5984 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5985 * data/bison.m4 (b4_pull_if): New.
5986 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5987 * data/push.c: Improve M4 quoting a little.
5988 (b4_generate_macro_args, b4_parenthesize): Remove.
5989 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5990 any time a pull parser is requested.
5991 Don't #define this as a wrapper around yypull_parse. Instead, when
5992 both push and pull are requested, make it a function that does that
5993 same thing.
5994 (yypull_parse): If there's a b4_prefix, #define this to
5995 b4_prefix[pull_parse] when both push and pull are requested.
5996 Don't define this as a function unless both push and pull are
5997 requested.
5998 Remove the yylexp argument and hard-code yylex invocation instead.
5999 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6000 %push-parser.
6001 * src/getargs.c (pull_parser): New global initialized to true.
6002 * getargs.h (pull_parser): extern it.
6003 * src/output.c (prepare): Insert pull_flag muscle.
6004 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6005 (prologue_declaration): Set both push_parser and pull_parser = true for
6006 %push-pull-parser. Set push_parser = true and pull_parser = false for
6007 %push-parser.
6008 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6009 %push-parser since there's no backward-compatibility concern here.
6010 Scan %push-pull-parser.
6011 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6012 instead of %push-parser.
6013 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6014 prototype it in the module that calls yyparse.
6015 * tests/input.at (Torturing the Scanner): Likewise.
6016 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6017
6018 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6019
6020 Update etc/bench.pl. Optimize push mode a little (the yyn change
6021 deserves most of the credit).
6022 * Makefile.am (SUBDIRS): Add etc subdirectory.
6023 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6024 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6025 yytoken, yyval, and yyloc declarations to...
6026 (yyparse or yypush_parse): ... here to improve performance. For
6027 yypush_parse invocations after the first, be sure to assign yyn its old
6028 value again.
6029 (yypstate_new): Don't bother initializing the yyresult field since the
6030 initial value isn't used.
6031 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6032 remove the #define that, in push mode, set it to yyps->NAME.
6033 * etc/Makefile.am: New.
6034 * etc/bench.pl: Remove and build it instead from...
6035 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6036 "tests/bison" from the build directory by default rather than just
6037 invoking "bison" from $PATH.
6038 (calc_grammar): Update push parser code: don't declare yylval globally,
6039 don't define yyparse_wrapper, and don't #define yyparse.
6040 (bench_grammar): Update to check all working combinations of yacc.c,
6041 push.c, impure, pure, pull, and push.
6042
6043 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6044
6045 For push mode, add pull wrappers around yypush_parse.
6046 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6047 (yypull_parse): New function wrapping yypush_parse.
6048 (yyparse): New #define wrapping yypull_parse.
6049 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6050 is declared.
6051 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6052 prototype yylex in the module that calls yyparse, and don't prototype
6053 yyparse there. Otherwise, the yyparse expansion won't compile.
6054 * tests/input.at (Torturing the Scanner): Likewise.
6055
6056 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6057
6058 Enable push parsers to operate in impure mode. Thus, %push-parser no
6059 longer implies %pure-parser. The point of this change is to move
6060 towards being able to test the push parser code by running the entire
6061 test suite as if %push-parser had been declared.
6062 * data/push.c (yypush_parse): For impure mode, remove the
6063 yypushed_char, yypushed_val, and yypushed_loc arguments.
6064 Instead, declare these as local variables initialized to the global
6065 yychar, yylval, and yylloc.
6066 For the first yypush_parse invocation only, restore the initial values
6067 of these global variables when it's time to read a token since they
6068 have been overwritten.
6069 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6070 %push-parser.
6071 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6072 %pure-parser along with %push-parser since this test case was designed
6073 for pure push parsers.
6074 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6075 (AT_YACC_OR_PUSH_IF): New.
6076 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6077 add a note that it's still wrong for some cases (as it has been for a
6078 while).
6079 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6080 %push-parser no longer implies %pure-parser.
6081
6082 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6083
6084 Remove some unnecessary differences between the pull parser code and
6085 the push parser code. This patch enables yynerrs in push mode.
6086 * data/push.c: Reformat M4 a little.
6087 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6088 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6089 because push mode is on. Instead, if pure mode is on, move yynerrs
6090 to...
6091 (b4_declare_parser_state_variables): ... here.
6092 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6093 to yyps->NAME so it can be used in yypush_parse.
6094 (yypush_parse): Don't omit uses of yynerrs in push mode.
6095
6096 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6097
6098 Fix bug such that the first pushed token's value and location are
6099 sometimes overwritten (sometimes by %initial-action) before being used.
6100 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6101 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6102 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6103 more closely mimic the pull parser logic.
6104 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6105 time to read a token, which is after any initialization of yylval and
6106 yylloc.
6107 (gottoken): Rename label to...
6108 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6109 user namespace.
6110
6111 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6112
6113 Rearrange initialization of the parser state variables so that the
6114 skeleton doesn't have to have a copy for pull mode and another for push
6115 mode. This patch also fixes at least a bug such that yylloc was not
6116 initialized (with b4_location_initial_line and
6117 b4_location_initial_column) upon calling yypush_parse. However, that
6118 initialization now overwrites the first token's location;
6119 %initial-action assigning @$ already did the same thing, and both bugs
6120 will be fixed in a later patch.
6121 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6122 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6123 yyss, yyvs, yyls, and yystacksize.
6124 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6125 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6126 yylsp.
6127 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6128 yyps->NAME so it can be used in yypush_parse.
6129 (yyparse or yypush_parse): For yypush_parse, don't print the
6130 "Starting parse" diagnostic for invocations after the first.
6131 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6132 yypush_parse, only do it for the first invocation.
6133 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6134 initialization to occur in yypush_parse but only on the first
6135 invocation.
6136
6137 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6138
6139 * data/push.c: Add CPP guards around push parser declarations in both
6140 the header and the code file.
6141 In the code file, move the push parser declarations to the same place
6142 they appear in the header file.
6143 Clean up the M4 some, especially the inconsistent underquoting in
6144 some b4_c_function_def and b4_c_function_decl uses.
6145
6146 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6147
6148 Encapsulate the push parser state variables into an M4 macro so the
6149 push skeleton doesn't have to list them again for pull mode's yyparse.
6150 For push mode, remove yypush_parse's local equivalents of these
6151 variables to eliminate unnecessary copying between the two sets at
6152 run-time. This patch also fixes at least a bug related to multiple
6153 %initial-action invocations in push mode.
6154 * data/push.c (b4_declare_parser_variables): Rename to...
6155 (b4_declare_scanner_communication_variables): ... this for clarity and
6156 update both uses.
6157 (b4_declare_yyparse_variables): Remove and move its contents to the one
6158 spot where it was invoked.
6159 (b4_declare_parser_state_variables): New macro containing the parser
6160 state variables required by push mode.
6161 (struct yypstate): Replace all fields but yynew with
6162 b4_declare_parser_state_variables.
6163 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6164 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6165 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6166 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6167 parser state variable declarations with
6168 b4_declare_parser_state_variables.
6169 Don't initialize parser state variables when calling yypush_parse since
6170 yypstate_new already does that.
6171 Invoke the user's initial action only upon the first yypush_parse
6172 invocation.
6173 Remove all code that copies between the local parser state variables
6174 and the yypstate.
6175
6176 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6177
6178 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6179 prevent a name collision in a future patch where these names will
6180 sometimes be #define'd.
6181 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6182 since it no longer has the same name as the existing argument.
6183 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6184
6185 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6186 and Joel E. Denny <jdenny@ces.clemson.edu>
6187
6188 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6189 that the argument is case-insensitive, and there's no `=' here.
6190 For the %skeleton entry, mention that %language is better.
6191 (Bison Options): Likewise for --language and --skeleton. Move the
6192 --skeleton entry so that the `Tuning the parser' section is sorted
6193 alphabetically on long options.
6194 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6195 %language directive in detail here; cross-reference the %language
6196 documentation instead.
6197 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6198 `%require "2.3b"' so that the example is always up-to-date.
6199 (Table of Symbols): Add entries for %language and %skeleton.
6200 * examples/extexi (normalize): Instead of replacing every %require
6201 argument with the current Bison version, just substitute for
6202 `@value{VERSION}'. This guarantees that we're testing what actually
6203 appears in the documentation.
6204 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6205 rather than `@VERSION@'.
6206
6207 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6208
6209 * NEWS: Reword the %language news a bit, and put it earlier.
6210
6211 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6212 Rewrite to simplify the logic.
6213 (language_argmatch): Likewise.
6214 (program_name): We now own this var.
6215 * src/getargs.h (struct bison_language): Use char[] rather than
6216 const char *.
6217
6218 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6219 Java is supported.
6220 * src/complain.c (program_name): Remove decl; no longer needed.
6221 * src/main.c (program_name): Remove; now belongs to getargs.
6222
6223 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6224
6225 * NEWS: Document %language.
6226
6227 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6228
6229 * data/c-skel.m4, data/c++-skel.m4: New files.
6230 * data/glr.c: Complain on push parsers.
6231
6232 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6233 over %skeleton.
6234 (Decl Summary): Document %language and %skeleton.
6235 (Command line): Document -L.
6236
6237 * examples/extexi: Rewrite %require directive.
6238 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6239
6240 * src/files.c (compute_exts_from_gc): Look in language structure
6241 for .y extension.
6242 (compute_file_name_parts): Check whether .tab should be added.
6243 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6244 (language, skeleton_arg, language_argmatch): New.
6245 (long_options): Add --language.
6246 (getargs): Use skeleton_arg, add -L/--language.
6247 * src/getargs.h: Include location.h.
6248 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6249 * src/output.c (prepare): Pick default skeleton from struct language.
6250 Don't dispatch C skeletons here.
6251 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6252 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6253 * src/scan-gram.l ("%language"): New rule.
6254
6255 * tests/calc.at: Test %skeleton and %language.
6256 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6257 (AT_GLR_IF): Look for %skeleton "glr.cc".
6258 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6259 (AT_YACC_IF): Reject %language.
6260
6261 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6262
6263 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6264 since it wasn't used; only the typedef name 'semantic_type' is needed.
6265 Also, omit trailing white space.
6266
6267 * bootstrap: Sync from coreutils.
6268 (gnulib_extra_files): Add build-aux/announce.gen.
6269 (slurp): Adjust .gitignore files like .cvsignore files.
6270 * build-aux/announce-gen: Remove from CVS, since bootstrap
6271 now creates this.
6272
6273 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6274
6275 Make %push-parser imply %pure-parser. This fixes several bugs; see
6276 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6277 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6278 pure_parser = true.
6279 * data/push.c: Don't bother testing b4_push_if when deciding whether
6280 to expand b4_declare_parser_variables globally.
6281 (yypush_parse): Likewise in here.
6282
6283 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6284 (yy_reduce_print): Reformat M4 for readability.
6285
6286 2006-12-15 Bob Rossi <bob@brasko.net>
6287 and Joel Denny <jdenny@ces.clemson.edu>
6288
6289 * data/push.c (yypstate): Add typedef, and update all uses of
6290 struct yypstate to just yypstate.
6291 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6292
6293 2006-12-14 Bob Rossi <bob@brasko.net>
6294
6295 * data/push.c (yypush_parse): Declare prototype regardless of
6296 %locations option.
6297
6298 2006-12-14 Bob Rossi <bob@brasko.net>
6299
6300 * data/push.c (yyparse): Remove the prototype and the #define when in
6301 push-parser mode.
6302
6303 2006-12-13 Bob Rossi <bob@brasko.net>
6304
6305 * data/push.c (yypstate_init): Rename to...
6306 (yypstate_new): ... this and use b4_c_function_def.
6307 (yypstate_delete): New.
6308 (yypush_parse): Change parameters yynval and yynlloc to be const.
6309 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6310 yypstate_delete functions.
6311
6312 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6313
6314 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6315 strange test case titles. Reported by Bob Rossi.
6316
6317 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6318
6319 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6320 of potential ambiguities in GLR grammers.
6321
6322 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6323
6324 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6325 `bison ', use m4_index instead of m4_substr since chopping up a string
6326 containing M4-special characters causes problems here.
6327
6328 Fix a couple of bugs related to special characters in user-specified
6329 file names, and make it easier for skeletons to compute output file
6330 names with the same file name prefix as Bison-computed output file
6331 names.
6332 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6333 b4_parser_file_name and b4_spec_defines_file instead of
6334 @output_parser_name@ and @output_header_name@, which are now redundant.
6335 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6336 b4_parser_file_name, b4_spec_defines_file, and the new
6337 @basename(FILENAME@) instead of @output_parser_name@ and
6338 @output_header_name@, which inappropriately escaped the file names as
6339 C string literals.
6340 * src/files.c (all_but_ext): Remove static qualifier.
6341 (compute_output_file_names): Move `free (all_but_ext)' to...
6342 (output_file_names_free): ... here since all_but_ext is needed later.
6343 * src/files.h (all_but_ext): Extern.
6344 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6345 exactly what MUSCLE_INSERT_STRING used to do.
6346 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6347 characters are escaped properly.
6348 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6349 all_but_ext.
6350 For pkgdatadir muscle, maintain previous functionality by using
6351 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6352 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6353 digraphs would never be expanded. Hopefully no one has M4-special
6354 characters in his Bison installation path.
6355 * src/scan-skel.l: Don't parse @output_header_name@ and
6356 @output_parser_name@ anymore since they're now redundant.
6357 In @output, use decode_at_digraphs.
6358 Parse a new @basename command that invokes last_component.
6359 (decode_at_digraphs): New.
6360 (BASE_QPUTS): Remove unused.
6361 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6362 (Output file name): New tests.
6363
6364 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6365
6366 Warn about output files that are generated by the skeletons and that
6367 conflict with other output files.
6368 * data/glr.c: Don't generate the header file here when glr.cc does.
6369 * src/files.c (file_names, file_names_count): New static globals.
6370 (compute_output_file_names): Invoke output_file_name_check for files
6371 not generated by the skeletons and remove existing checks.
6372 (output_file_name_check): New function that warns about conflicting
6373 output file names.
6374 (output_file_names_free): Free file_names.
6375 * src/files.h (output_file_name_check): Declare.
6376 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6377 the skeletons.
6378 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6379 (Conflicting output files): New tests.
6380
6381 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6382
6383 * doc/bison.texinfo: Fix a couple of typos.
6384
6385 2006-12-08 Bob Rossi <bob@brasko.net>
6386
6387 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6388 Rename to...
6389 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6390 update all uses.
6391 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6392 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6393 local pv.
6394 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6395 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6396
6397 2006-12-07 Bob Rossi <bob@brasko.net>
6398 and Joel Denny <jdenny@ces.clemson.edu>
6399
6400 * data/push.c (yypvarsinit): Change return type from void* to struct
6401 yypvars*. No longer cast to void* on return.
6402 (struct yypvars): Remove yylen since it need not be remembered between
6403 yypushparse invocations.
6404 (yypushparse): Don't copy between yylen and pv->yylen.
6405
6406 2006-12-05 Bob Rossi <bob@brasko.net>
6407
6408 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6409 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6410 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6411 (struct yypvars): Remove b4_declare_parser_variables.
6412 (yypvarsinit): Remove init code for removed variables.
6413 (global scope): Do not declare b4_declare_parser_variables if
6414 push or pure mode.
6415 (yypushparse): Add b4_declare_parser_variables.
6416 Init new local variables, and remove init code for removed
6417 yypvars variables.
6418 (yyparse): Delete.
6419 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6420 and yyparse for other modes.
6421 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6422 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6423 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6424 (AT_PURE_LEX_IF): True if pure or push parser.
6425
6426 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6427
6428 Document Yacc prologue alternatives and default %destructor's and
6429 %printer's as experimental. Don't mention Java yet. Discussed at
6430 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6431 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6432 (2.3a): Annotate this entry to say the old forms of these features were
6433 also experimental.
6434 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6435 Table of Symbols): Say they're experimental. Comment out any mention
6436 of Java (we'll want this back eventually).
6437
6438 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6439
6440 Support a file name argument to %defines. Deprecate `=' in
6441 %file-prefix, %name-prefix, and %output. Discussed at
6442 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6443 * NEWS (2.3a+): Mention.
6444 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6445 form of %defines, and remove `=' from entries for %file-prefix,
6446 %name-prefix, and %output.
6447 * src/parse-gram.y (prologue_declaration): Implement.
6448 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6449 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6450 all but one occurrence of %name-prefix.
6451 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6452 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6453 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6454 occurrence of each of %file-prefix and %output. Add check for %defines
6455 with argument.
6456 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6457 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6458 Remove the `=' from %output.
6459
6460 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6461
6462 Don't escape $ in test case titles since Autoconf 2.61 now does that
6463 correctly.
6464 * tests/actions.at (Default %printer and %destructor are not for error
6465 or $undefined): Here.
6466 (Default %printer and %destructor are not for $accept): Here.
6467 * tests/input.at (Invalid $n and @n): Here.
6468
6469 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6470
6471 Rename <!> to <>. Discussed starting at
6472 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6473 * NEWS (2.3a+): Update.
6474 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6475 Update.
6476 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6477 * src/scan-gram.l (INITIAL): Implement.
6478 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6479 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6480 comment.
6481 * tests/actions.at (Default tagless %printer and %destructor,
6482 Default tagged and per-type %printer and %destructor,
6483 Default %printer and %destructor are not for error or $undefined,
6484 Default %printer and %destructor are not for $accept,
6485 Default %printer and %destructor for mid-rule values): Update.
6486 * tests/input.at (Default %printer and %destructor redeclared,
6487 Unused values with default %destructor): Update.
6488
6489 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6490
6491 Don't let %prec take a nonterminal.
6492 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6493 token.
6494 * tests/input.at (%prec takes a token): New test checking that %prec
6495 won't take a nonterminal.
6496
6497 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6498
6499 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6500 it was double-quoted.
6501 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6502 grammar is maintained with Bison's highest standards.
6503 * src/getargs.c: Fix some typos in Doxygen comments.
6504
6505 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6506
6507 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6508 later. Reported by Paul Eggert in
6509 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6510 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6511 * src/scan-code.l (translate_action): Don't bother invoking
6512 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6513 (code_scanner_free): Instead of invoking
6514 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6515 which frees more.
6516 * src/scan-gram.l (gram_scanner_free): Likewise.
6517 * src/scan-skel.l (scan_skel): Likewise.
6518
6519 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6520
6521 * src/files.c (tr): Change return type to void.
6522 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6523 has been called previously for the same key.
6524 (muscle_find): Return storage instead of value so that
6525 --enable-gcc-warnings doesn't produce warnings that the return discards
6526 const. aver that the value and storage are the same since storage
6527 could potentially be NULL when value is not.
6528 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6529 same as 0.
6530
6531 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6532
6533 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6534 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6535 us a slightly cleaner distribution, and also works.
6536 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6537 gnulib changes.
6538
6539 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6540 and Paul Eggert <eggert@cs.ucla.edu>
6541
6542 Don't let Bison leak memory except when it complains.
6543 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6544 (spec_defines_file, dir_prefix): Now char *, not const char *,
6545 since they are freed.
6546 * src/files.c: Likewise.
6547 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6548 Likewise.
6549 (tr): Now operates in-place. All uses changed.
6550 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6551 values.
6552 (compute_file_name_parts, compute_output_file_names): Don't store
6553 read-only data in variables that will be freed.
6554 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6555 src_extension, and header_extension.
6556 (output_file_names_free): New public function to free
6557 spec_verbose_file, spec_graph_file, spec_defines_file,
6558 parser_file_name, and dir_prefix.
6559 * src/getargs.c (getargs): Don't store read-only data in variables that
6560 will be freed.
6561 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6562 (which previously existed but was unused), and quotearg_free.
6563 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6564 * src/muscle_tab.c: Likewise.
6565 (muscle_entry): Make the value char const *,
6566 and add a new storage member that is char * and can be freed.
6567 (muscle_entry_free): New private function.
6568 (muscle_init): Use it instead of free.
6569 (muscle_insert, muscle_grow): Update and use new storage member.
6570 (muscle_code_grow): Free the string passed to muscle_grow
6571 since it's not needed anymore.
6572 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6573 add a new `char *code' member.
6574 ("{...}"): Declare semantic type as code.
6575 * src/scan-code.h (translate_rule_action):
6576 (translate_symbol_action, translate_code, translate_action): Return
6577 `char const *' rather than `char *' since external code should not free
6578 these strings.
6579 * src/scan-code.l: Likewise.
6580 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6581 which is "{...}" in the parser.
6582 * tests/Makefile.am (maintainer-check-valgrind): Set
6583 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6584 Valgrind.
6585 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6586 complain.
6587 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6588 expecting a non-zero exit status sets --leak-check=summary and
6589 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6590 this case, and we don't want to hear about it.
6591
6592 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6593
6594 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6595 instead of from the template, to simplify configuration a bit.
6596 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6597 and m4/wint_t.m4, as they are needed with the latest gnulib.
6598
6599 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6600
6601 Disable unset/unused mid-rule value warnings by default, and recognize
6602 --warnings=midrule-values to enable them. Discussed starting at
6603 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6604 * NEWS (2.3a+): Mention.
6605 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6606 warnings): Add entry for midrule-values subargument.
6607 * src/reader.c (symbol_should_be_used): Don't return true just because
6608 the value is a set/used mid-rule value unless
6609 --warnings=midrule-values was specified.
6610 * tests/input.at (Unused values, Unused values before symbol
6611 declarations): Run tests with and without --warnings=midrule-values.
6612
6613 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6614 than LIST_FREE directly.
6615
6616 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6617
6618 Finish implementing --warnings=error, which should not be implied by
6619 --warnings=all (or by its synonyms -W and --warnings without
6620 subarguments).
6621 * src/complain.c (set_warning_issued): New function to report that
6622 warnings are being treated as errors and to record an error if so.
6623 Invoke...
6624 (warn_at, warn): ... here.
6625 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6626 "error - warnings are errors" does not appear above "all - all of the
6627 above".
6628 (getargs): For -W and --warnings without subarguments, don't let
6629 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6630 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6631
6632 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6633
6634 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6635 empty subargument list. For example: `bison --warnings= parser.y'.
6636
6637 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6638
6639 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6640 the parser header file so that gcc doesn't warn.
6641
6642 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6643
6644 Split the default %destructor/%printer into two kinds: <*> and <!>.
6645 Discussed starting at
6646 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6647 * NEWS (2.3a+): Mention.
6648 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6649 previous change today related to mid-rules.
6650 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6651 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6652 (TYPE_TAG_ANY): Add as <*>.
6653 (TYPE_TAG_NONE): Add as <!>.
6654 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6655 for <*> and <!>.
6656 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6657 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6658 * src/symlist.c (symbol_list_default_new): Split into tagged and
6659 tagless versions.
6660 (symbol_list_destructor_set, symbol_list_printer_set): Split
6661 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6662 SYMLIST_DEFAULT_TAGLESS.
6663 * src/symlist.h: Update symbol_list_default*_new prototypes.
6664 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6665 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6666 * src/symtab.c (default_destructor, default_destructor_location,
6667 default_printer, default_printer_location): Split each into tagged and
6668 tagless versions.
6669 (symbol_destructor_get, symbol_destructor_location_get,
6670 symbol_printer_get, symbol_printer_location_get): Implement tagged
6671 default and tagless default cases.
6672 (default_destructor_set, default_printer_set): Split each into tagged
6673 and tagless versions.
6674 * src/symtab.h: Update prototypes.
6675 * tests/actions.at (Default %printer and %destructor): Rename to...
6676 (Default tagless %printer and %destructor): ... this, and extend.
6677 (Per-type %printer and %destructor): Rename to...
6678 (Default tagged and per-type %printer and %destructor): ... this, and
6679 extend.
6680 (Default %printer and %destructor for user-defined end token): Extend.
6681 (Default %printer and %destructor are not for error or $undefined):
6682 Update.
6683 (Default %printer and %destructor are not for $accept): Update.
6684 (Default %printer and %destructor for mid-rule values): Extend.
6685 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6686 (Unused values with default %destructor): Extend.
6687
6688 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6689
6690 Don't apply the default %destructor/%printer to an unreferenced midrule
6691 value. Mentioned at
6692 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6693 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6694 like $@n instead of just @n so that the default %destructor/%printer
6695 logic doesn't see them as user-defined symbols.
6696 (symbol_is_dummy): Check for both forms of the name.
6697 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6698 name for which the midrule value is referenced in any action.
6699 * tests/actions.at (Default %printer and %destructor for mid-rule
6700 values): New test.
6701 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6702 for change to dummy symbol names.
6703
6704 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6705
6706 Warn about unset midrule $$ if the corresponding $n is used.
6707 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6708 $n usage.
6709 (packgram): Before invoking grammar_rule_check on any rule, make sure
6710 all actions have already been scanned in order to set `used' flags.
6711 Otherwise, checking that a midrule's $$ is set will not always work
6712 properly because the midrule check must forward-reference the midrule's
6713 parent rule.
6714 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6715 warning.
6716
6717 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6718
6719 More improvements to the documentation of the prologue alternatives:
6720 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6721 Bison manual.
6722 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6723 some text to clarify the relative importance of the new directives and
6724 to show how these directives may be viewed as code labels.
6725
6726 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6727
6728 Similar to the recently removed %before-header, add %code-top as the
6729 alternative to the pre-prologue. Mentioned at
6730 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6731 Also, let the prologue alternatives appear in the grammar section.
6732 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6733 (prologue_declaration): Move the existing prologue alternatives to...
6734 (grammar_declaration): ... here and add %code-top.
6735 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6736
6737 Clean up and extend documentation for the prologue alternatives.
6738 * NEWS (2.3a+): Describe prologue alternatives.
6739 * doc/bison.texinfo (Prologue): Move discussion of prologue
6740 alternatives to...
6741 (Prologue Alternatives): ... this new section, and extend it to discuss
6742 all 4 directives in detail.
6743 (Table of Symbols): Clean up discussion of prologue alternatives and
6744 add %code-top.
6745
6746 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6747
6748 DJGPP specific issues.
6749
6750 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6751 config.bat accordingly.
6752 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6753 * djgpp/config.site: Likewise.
6754
6755 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6756
6757 Replace %*-header with %provides, %requires, %code. See discussion at
6758 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6759
6760 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6761 (b4_user_start_header): Remove.
6762 * data/glr.c: Use new macros instead of b4_*start_header
6763 and b4_*end_header.
6764 * data/glr.cc: Likewise.
6765 * data/lalr1.cc: Likewise.
6766 * data/push.c: Likewise.
6767 * data/yacc.c: Likewise.
6768
6769 * doc/bison.texinfo: Remove %before-header, rename
6770 %{start,end,after}-header to %requires, %provides, %code.
6771
6772 * src/parse-gram.y: Likewise (also rename token names accordingly).
6773 * src/scan-gram.l: Likewise.
6774 * tests/actions.at: Likewise.
6775
6776 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6777
6778 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6779 Problem reported by Joel E. Denny.
6780
6781 2006-10-14 Jim Meyering <jim@meyering.net>
6782
6783 (Sync from coreutils.)
6784 Work also when the working directory (with e.g. coreutils sources)
6785 is version controlled with git, rather than CVS.
6786 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6787 rather than CVS.
6788 In messages and comments, say e.g., "checked-out sources",
6789 rather than "CVS sources".
6790 (version_controlled_file): New function. Work for git as well as
6791 for CVS. Don't use grep's -q option.
6792 (slurp): Call it here, in place of CVS-specific code.
6793
6794 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6795
6796 Fix testsuite for ./configure --enable-gcc-warnings:
6797 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6798 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6799 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6800 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6801 * test/regression.at (Diagnostic that expects two alternatives):
6802 Likewise.
6803
6804 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6805
6806 * bootstrap.conf (gnulib_modules): Add config-h.
6807 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6808 worry about HAVE_CONFIG_H.
6809 * lib/abitset.c: Likewise.
6810 * lib/bitset.c: Likewise.
6811 * lib/bitset_stats.c: Likewise.
6812 * lib/bitsetv-print.c: Likewise.
6813 * lib/bitsetv.c: Likewise.
6814 * lib/ebitset.c: Likewise.
6815 * lib/get-errno.c: Likewise.
6816 * lib/lbitset.c: Likewise.
6817 * lib/subpipe.c: Likewise.
6818 * lib/timevar.c: Likewise.
6819 * lib/vbitset.c: Likewise.
6820 * lib/bitset.c: Include "bitset.h" first, to test interface.
6821 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6822 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6823 * lib/bitsetv.c: Include "bitsetv.h" first.
6824 * lib/get-errno.c: Include "get-errno.h" first.
6825 * m4/.cvsignore: Add config-h.m4.
6826 * tests/actions.at (Default %printer and %destructor for ...):
6827 Adjust expected line numbers in output to reflect removal of #if
6828 HAVE_CONFIG_H lines.
6829 * tests/glr-regression.at (Missed %merge type warnings when ...):
6830 Likewise.
6831 * tests/regression.at (Braced code in declaration in rules section):
6832 Likewise.
6833 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6834 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6835 Include <config.h> unconditionally.
6836
6837 * bootstrap: Sync from coreutils, as follows:
6838
6839 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6840
6841 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6842 variable was sometimes used without being initialized. This
6843 messed up the installation of the INSTALL file in some cases.
6844
6845 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6846
6847 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6848 --copy. Inspired by a suggestion from Bruno Haible.
6849
6850 2006-10-03 Jim Meyering <jim@meyering.net>
6851
6852 * bootstrap: Undo last change to this file, since now gnulib-tool
6853 sticks with the automake default in generating dependencies.
6854
6855 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6856
6857 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6858 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6859
6860 * doc/bison.1: Add copyright notice.
6861
6862 * data/glr.c: Don't include <stdarg.h>; not used.
6863
6864 * NEWS: The -g and --graph options now output graphs in Graphviz
6865 DOT format, not VCG format.
6866 * doc/bison.1: Likewise.
6867 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6868 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6869 of this change in
6870 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6871 * TODO: Remove Graphviz entry.
6872 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6873 remove vcg.c, vcg.h, vcg_defaults.h.
6874 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6875 * src/graphviz.c, src/graphviz.h: New files.
6876 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6877 * src/files.h: Make comment more generic.
6878 * src/main.c (main): Likewise.
6879 * src/print_graph.h: Likewise.
6880 * src/getargs.c (usage): Make usage description more generic.
6881 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6882 (static_graph, fgraph): Remove. All uses changed to pass
6883 arguments instead of sharing a static var.
6884 (print_core, print_actions, print_state, print_graph):
6885 Output graphviz format rather than VCG format.
6886 * tests/.cvsignore: Remove *.vcg; add *.dot.
6887 * tests/output.at: Expect *.dot files, not *.vcg files.
6888
6889 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6890 accommodates the 2006-10-08 change.
6891
6892 2006-10-11 Bob Rossi <bob@brasko.net>
6893
6894 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6895 (b4_yyssa, b4_yyerror_range): New macros.
6896 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6897 (yypvarsinit): Remove init of removed fields.
6898 (yypushparse): Remove use of removed fields; use new macros instead.
6899
6900 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6901
6902 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6903 in a push parser. Reindent slightly to match yacc.c better.
6904
6905 2006-10-11 Bob Rossi <bob@brasko.net>
6906
6907 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6908 yymsg_alloc fields.
6909 (yypvarsinit, yypushparse): Remove init of removed fields.
6910 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6911
6912 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6913
6914 * THANKS: Add Paolo Bonzini and Bob Rossi.
6915
6916 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6917
6918 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6919 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6920 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6921 b4_define_user_cde and uses): Remove.
6922 (b4_comment, b4_prefix, b4_sync_start): New.
6923 * data/bison.m4: New file, with most of the content removed from c.m4.
6924 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6925 * src/output.c (output_skeleton): Pass bison.m4.
6926 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6927 only if specified.
6928
6929 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6930
6931 Fix test failure reported by Tom Lane in
6932 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6933 and try to make such failures easier to catch in the future.
6934 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6935 that's now the caller's responsibility.
6936 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6937 Set yychar = YYEOF if it's negative.
6938 * tests/actions.at (yylex): Abort if asked to read past EOF.
6939 * tests/conflicts.at (yylex): Likewise.
6940 * tests/cxx-type.at (yylex): Likewise.
6941 * tests/glr-regression.at (yylex): Likewise.
6942 * tests/input.at (yylex): Likewise.
6943 * tests/regression.at (yylex): Likewise.
6944 * tests/torture.at (yylex): Likewise.
6945
6946 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6947
6948 Fix problems with translating English-language diagnostics.
6949 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6950 respect to bison-runtime pot generation. The YY_ stuff
6951 wasn't being captured.
6952 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6953 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6954 * runtime-po/POTFILES.in: Add data/push.c.
6955
6956 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6957
6958 Merge bootstrap changes from coreutils.
6959
6960 2006-09-28 Jim Meyering <jim@meyering.net>
6961
6962 Automatically generated dependencies are important even
6963 when all of the sources in a directory come from gnulib.
6964 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6965 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6966
6967 2006-09-23 Jim Meyering <jim@meyering.net>
6968
6969 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6970
6971 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6972
6973 * bootstrap: Add support for --force.
6974 (usage): New function. Describe usage less tersely.
6975 (CVS_only_file): New var.
6976
6977 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6978
6979 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6980 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6981 Adjust white space and comments to match GNU style better.
6982
6983 2006-09-20 Bob Rossi <bob@brasko.net>
6984
6985 * data/push.c (yyresult_get): Remove function.
6986 (YYPUSH_MORE): Add #define.
6987 (yypushparse): Modify return value.
6988
6989 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6990
6991 * stamp-h.in: Remove; no longer needed.
6992 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6993 Remove config.h, config.hin, intl (no longer created).
6994 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6995 stamp-h1.
6996
6997 Sync bootstrap from coreutils, as follows:
6998
6999 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7000
7001 * bootstrap (symlink_to_gnulib): New function.
7002 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7003 to copies-of-gnulib.
7004 (cp_mark_as_generated, slurp, gnulib_files):
7005 Avoid making a copy if it's the same as the old version.
7006 (gnulib_files): Add support for this variable (used by Bison).
7007
7008 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7009
7010 * src/getargs.c (usage): Rework to use conventions similar to
7011 coreutils, to make translation a bit easier and the code a bit
7012 smaller. Problem reported by Tim Van Holder.
7013
7014 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7015
7016 Use some of gnulib's new modules, taken from coreutils.
7017
7018 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7019 * bootstrap.conf: New file.
7020 (gnulib_modules): Add configmake, inttypes, unistd.
7021 (XGETTEXT_OPTIONS): Add complain, complain_at,
7022 fatal, fatal_at, warn, warn_at, unexpected_end.
7023 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7024 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7025 (gl_EARLY): Add.
7026 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7027 (gl_INIT): Add
7028 (GNULIB_AUTOCONF_SNIPPET): Remove.
7029 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7030 the pickiest.
7031 * lib/.cvsignore: Add inttypes_.h.
7032 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7033 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7034 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7035 no-longer-necessary initializations.
7036 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7037 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7038 use the unistd module.
7039 * src/system.h: Likewise.
7040 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7041 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7042 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7043 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7044 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7045 * src/system.h: Include inttypes.h unconditionally, now that we
7046 use the inttypes module. Don't bother to include stdint.h, since
7047 inttypes.h now does that for us.
7048 (LOCALEDIR): Remove, now that we use the configmake module.
7049 * src/getargs.c: Include configmake.h.
7050 * src/main.c: Likewise.
7051 * src/output.c: Likewise.
7052 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7053 not from $abs_top_builddir, since config.h moved.
7054
7055
7056 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7057 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7058
7059 * src/parse-gram.y (symbol_declaration): Don't put statements
7060 before declarations; it's not portable to C89.
7061 * src/scan-code.l (handle_action_at): Likewise.
7062
7063 * src/scan-code.l: Always initialize braces_level; the old code
7064 left it uninitialized and therefore had undefined behavior.
7065
7066 Don't attempt to redefine 'assert', since it runs afoul of
7067 systems where standard headers (mistakenly) include <assert.h>.
7068 Instead, define and use our own alternative, called 'aver'.
7069 * src/reader.c: Don't include assert.h, since we no longer
7070 use assert.
7071 * src/scan-code.l: Likewise.
7072 * src/system.h (assert): Remove, replacing with....
7073 (aver): New function, taking a bool arg. All uses changed.
7074 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7075 not merely an integer.
7076
7077 2006-09-15 Bob Rossi <bob@brasko.net>
7078
7079 Add support for push parsing. Based on the original work of
7080 Odd Arild Olsen <oao@fibula.no>.
7081 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7082 * data/c.m4 (YYPUSH): New.
7083 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7084 * data/push.c: New file.
7085 * src/getargs.c (push_parser): New var.
7086 * src/getargs.h (push_parser): New declaration.
7087 * src/output.c (prepare): Add macro insertion of `push_flag'.
7088 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7089 (prologue_declaration): Parse %push-parser.
7090 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7091 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7092 list of removed lines from the traces observed.
7093 (AT_CHECK_CALC_LALR): Added push parser tests.
7094
7095 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7096
7097 * NEWS: Version 2.3a.
7098 * configure.ac (AC_INIT): Likewise.
7099
7100 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7101 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7102 due to header ordering dependencies. I don't know why the #define
7103 was there.
7104
7105 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7106 runtime cost when YYDEBUG is not defined, and so that some tests
7107 that used to fail now work. Problem and initial suggestion by
7108 Paolo Bonzini.
7109 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7110 * data/glr.cc (b4_parser_class_name):
7111 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7112 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7113 (yydebug_) [YYDEBUG]: New member.
7114 (yycdebug_): Now defined only if YYDEBUG.
7115 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7116 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7117 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7118 if YYYDEBUG.
7119 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7120 Define only if YYDEBUG.
7121 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7122 set_debug_level.
7123 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7124 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7125 AT_CHECK_CALC_GLR_CC that are working now.
7126
7127 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7128
7129 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7130 We don't need them in glr.cc, and glr.c defines them.
7131 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7132 assumes that defining it to anything is the same as defining
7133 it to 1. Problem reported by Paolo Bonzini.
7134
7135 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7136
7137 * data/c.m4 (b4_null, b4_case): Define.
7138 * src/output.c (prepare_symbols): Use b4_null.
7139 (user_actions_output): Use b4_case.
7140
7141 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7142
7143 * data/glr.c (b4_shared_declarations): Put start-header first,
7144 before any #includes that we generate, so that feature-test
7145 macros work. Problem reported by Michael Deutschmann in
7146 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7147 * data/lalr1.cc: Likewise.
7148 * doc/bison.texinfo (Prologue): Document that feature-test macros
7149 should be defined before any Bison declarations.
7150 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7151 that depend on location.hh after, not before, Bison decls, since
7152 we now include location.hh after the first user prologue.
7153
7154 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7155 Sander Brandenburg in
7156 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7157 Also, fix minor white space and comment issues.
7158 (Prologue): Mention that it's better to define feature-test macros
7159 before Bison declarations. Problem reported by Michael Deutschmann.
7160
7161 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7162 by Jim Meyering.
7163 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7164 This adjusts to recent gnulib changes.
7165
7166 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7167
7168 Finish implementation of per-type %destructor/%printer. Discussed
7169 starting at
7170 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7171 and
7172 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7173 * NEWS (2.3+): Add a description of this feature to the default
7174 %destructor/%printer description.
7175 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7176 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7177 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7178 list node contains a semantic type.
7179 * src/symtab.c, src/symtab.h: Extend with a table that associates
7180 semantic types with their %destructor's and %printer's.
7181 (semantic_type_from_uniqstr, semantic_type_get,
7182 semantic_type_destructor_set, semantic_type_printer_set): New functions
7183 composing the public interface of that table.
7184 (symbol_destructor_get, symbol_destructor_location_get,
7185 symbol_printer_get, symbol_printer_location_get): If there's no
7186 per-symbol %destructor/%printer, look up the per-type before trying
7187 the default.
7188 * tests/actions.at (Per-type %printer and %destructor): New test case.
7189 * tests/input.at (Default %printer and %destructor redeclared):
7190 Extend to check that multiple occurrences of %symbol-default in a
7191 single %destructor/%printer declaration is an error.
7192 (Per-type %printer and %destructor redeclared, Unused values with
7193 per-type %destructor): New test cases.
7194
7195 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7196
7197 Require default %destructor/%printer to be declared using
7198 %symbol-default instead of an empty symbol list, and start working on
7199 new per-type %destructor/%printer. Discussed at
7200 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7201 * NEWS (2.3+): Add %symbol-default to example.
7202 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7203 (Table of Symbols): Add entry for %symbol-default.
7204 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7205 (generic_symlist, generic_symlist_item): New nonterminals for creating
7206 a list in which each item is a symbol, semantic type, or
7207 %symbol-default.
7208 (grammar_declaration): Use generic_symlist in %destructor and %printer
7209 declarations instead of symbols.1 or an empty list.
7210 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7211 for changes to symbol_list.
7212 * src/reader.c: Update for changes to symbol_list.
7213 * src/scan-code.l: Likewise.
7214 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7215 * src/symlist.c, src/symlist.h: Extend such that a list node may
7216 represent a semantic type or a %symbol-default in addition to just an
7217 ordinary symbol. Add switched functions for setting %destructor's and
7218 %printer's.
7219 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7220 %destructor/%printer declarations.
7221
7222 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7223
7224 Whether the default %destructor/%printer applies to a particular symbol
7225 isn't a question of whether the user *declares* that symbol (in %token,
7226 for example). It's a question of whether the user by any means
7227 *defines* the symbol at all (by simply using a char token, for
7228 example). $end is defined by Bison whereas any other token with token
7229 number 0 is defined by the user. The error token is always defined by
7230 Bison regardless of whether the user declares it with %token, but we
7231 may one day let the user define error as a nonterminal instead.
7232 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7233 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7234 the meaning of "user-defined".
7235 * tests/actions.at (Default %printer and %destructor for user-declared
7236 end token): Rename to...
7237 (Default %printer and %destructor for user-defined end token): ...
7238 this.
7239
7240 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7241 computation of whether to apply the default, don't maintain a list of
7242 every Bison-defined symbol. Instead, just check for a first character
7243 of '$', which a user symbol cannot have, and check for the error token.
7244
7245 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7246
7247 Don't apply the default %destructor or %printer to the error token,
7248 $undefined, or $accept. This change fits the general rule that the
7249 default %destructor and %printer are only for user-declared symbols,
7250 and it solves several difficulties that are described in the new test
7251 cases listed below.
7252 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7253 * tests/actions.at (Default %printer and %destructor are not for error
7254 or $undefined, Default %printer and %destructor are not for $accept):
7255 New test cases.
7256
7257 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7258
7259 Allow %start after the first rule.
7260 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7261 when parsing the first rule.
7262 (check_and_convert_grammar): Search for it here after all grammar
7263 declarations have been parsed. Skip midrules, which have dummy LHS
7264 nonterminals.
7265 * src/symtab.c (symbol_is_dummy): New function.
7266 * src/symtab.h (symbol_is_dummy): Declare it.
7267 * tests/input.at (%start after first rule): New test.
7268
7269 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7270
7271 Redo some of the previous commit: add back the ability to use
7272 non-aliased/undeclared string literals since it might be useful to
7273 those declaring %token-table.
7274 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7275 commit: don't worry about complaints from symbols_pack.
7276 * src/symtab.c (symbol_new, symbol_class_set,
7277 symbol_check_alias_consistency): Undo changes in previous commit: count
7278 each string literal as a new symbol and token, assign it a symbol
7279 number, and don't complain about non-aliased string literals.
7280 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7281 and token counts but does still set aliased tokens to the same number,
7282 symbol_pack_processor now leaves empty slots in the symbols array.
7283 Remove those slots.
7284 * tests/regression.at (Undeclared string literal): Remove test case
7285 added in previous commit since non-aliased string literals are allowed
7286 again.
7287 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7288 remove unnecessary string literal declarations.
7289 * tests/sets.at (Firsts): Likewise.
7290
7291 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7292
7293 Don't allow an undeclared string literal, but allow a string literal to
7294 be used before its declaration.
7295 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7296 symbols_pack complained.
7297 * src/symtab.c (symbol_new): Don't count a string literal as a new
7298 symbol.
7299 (symbol_class_set): Don't count a string literal as a new token, and
7300 don't assign it a symbol number since symbol_make_alias does that.
7301 (symbol_make_alias): It's not necessary to decrement the symbol and
7302 token counts anymore. Don't assume that an alias declaration occurs
7303 before any uses of the identifier or string, and thus don't assert that
7304 one of them has the highest symbol number so far.
7305 (symbol_check_alias_consistency): Complain if there's a string literal
7306 that wasn't declared as an alias.
7307 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7308 symbol_pack asserts that every token has been assigned a symbol number
7309 although undeclared string literals have not.
7310 * tests/regression.at (String alias declared after use, Undeclared
7311 string literal): New test cases.
7312 (Characters Escapes, Web2c Actions): Declare string literals as
7313 aliases.
7314 * tests/sets.at (Firsts): Likewise.
7315
7316 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7317
7318 In the grammar scanner, STRING_FINISH unclosed constructs and return
7319 them to the parser in order to improve error messages.
7320 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7321 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7322 * tests/input.at (Unclosed constructs): New test case.
7323 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7324 seen.
7325
7326 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7327 unused global.
7328
7329 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7330
7331 Handle string aliases for character tokens correctly.
7332 * src/symtab.c (symbol_user_token_number_set): If the token has an
7333 alias, check and set its alias's user token number instead of its own,
7334 which is set to indicate the alias. Previously, every occurrence of
7335 the character token in the grammar overwrote that alias indicator with
7336 the character code.
7337 * tests/input.at (String aliases for character tokens): New test.
7338
7339 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7340
7341 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7342
7343 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7344
7345 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7346 to prevent failures when building on older platforms.
7347 Check for autopoint failure.
7348 Set XGETTEXT_OPTIONS to values that check for C format strings,
7349 so that translators are warned about them (this also helps
7350 prevent core dumps).
7351
7352 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7353 function, since it simplifies our code a bit.
7354
7355 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7356 rather than -W, so we don't get bogus warnings about sign comparisons.
7357 Add -Wpointer-arith, since that warning is useful (it reports code
7358 that does not conform to C89 and that some compilers reject).
7359 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7360 since it's no longer needed.
7361
7362 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7363
7364 Clean up scanners a bit.
7365 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7366 definitions so gcc won't warn when obstack_for_string is unused.
7367 * src/scan-code.l: config.h and system.h are already #include'd by
7368 scan-code-c.c, so get rid of them here.
7369 * src/scan-gram.l: Likewise.
7370 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7371 definitions rather than duplicating the rest of it.
7372 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7373
7374 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7375
7376 Suppress signed/unsigned comparison warnings for yycheck.
7377 * data/c.m4 (b4_safest_int_type): New macro.
7378 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7379 a signed int type, cast it to b4_safest_int_type first.
7380 * data/yacc.c: Likewise.
7381 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7382 also overwritten.
7383
7384 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7385
7386 * doc/bison.texinfo: Fix some typos.
7387
7388 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7389
7390 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7391 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7392
7393 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7394 the latest gnulib does this a different way.
7395 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7396 translation was patched, so stop omitting it.
7397
7398 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7399
7400 Enable declaration of default %printer/%destructor. Make the parser
7401 use these for all user-declared grammar symbols for which the user does
7402 not declare a specific %printer/%destructor. Thus, the parser uses it
7403 for token 0 if the user declares it but not if Bison generates it as
7404 $end. Discussed starting at
7405 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7406 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7407 and
7408 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7409 * NEWS (2.3+): Mention.
7410 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7411 declare a %destructor for a mid-rule's semantic value. It's just
7412 impossible to declare one specific to it.
7413 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7414 code. Describe default %destructor form.
7415 * src/parse-gram.y (grammar_declaration): Parse default
7416 %printer/%destructor declarations.
7417 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7418 and symbol_destructor_location_get rather than accessing the destructor
7419 and destructor_location members of struct symbol.
7420 (symbol_printers_output): Likewise but for %printer's.
7421 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7422 again.
7423 * src/symtab.c (default_destructor, default_destructor_location,
7424 default_printer, default_printer_location): New static global
7425 variables to record the default %destructor and %printer.
7426 (symbol_destructor_get, symbol_destructor_location_get,
7427 symbol_printer_get, symbol_printer_location_get): New functions to
7428 compute the appropriate %destructor and %printer for a symbol.
7429 (default_destructor_set, default_printer_set): New functions to set the
7430 default %destructor and %printer.
7431 * src/symtab.h: Prototype all those new functions.
7432 * tests/actions.at (Default %printer and %destructor): New test to
7433 check that the right %printer and %destructor are called, that they're
7434 not called for $end, and that $$ and @$ work correctly.
7435 (Default %printer and %destructor for user-declared end token): New
7436 test to check that the default %printer and %destructor are called for
7437 a user-declared end token.
7438 * tests/input.at (Default %printer and %destructor redeclared, Unused
7439 values with default %destructor): New tests to check related grammar
7440 warnings and errors.
7441
7442 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7443
7444 Clean up handling of %destructor for the end token (token 0).
7445 Discussed starting at
7446 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7447 and
7448 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7449
7450 Make the skeletons consistent in how they pop the end token and invoke
7451 its %destructor.
7452 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7453 state, which has token number 0, since this would invoke the
7454 %destructor for the end token.
7455 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7456 until after shifting the end token, or else it won't be popped.
7457 * data/yacc.c (yyparse): Likewise.
7458
7459 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7460 it's the end token. Upon termination, destroy an unshifted lookahead
7461 even when it's the end token.
7462 * data/lalr1.cc (yy::parser::parse): Likewise.
7463 * data/yacc.c (yyparse): Likewise.
7464
7465 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7466 value warnings for the end token when the user gives the end token a
7467 %destructor.
7468
7469 * tests/actions.at (Printers and Destructors): Test all the above.
7470
7471 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7472
7473 Update to latest gnulib and gettext versions.
7474 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7475 Add fopen-safer.
7476 (gnulib_files): Add m4/warning.m4. Don't worry about files
7477 overwritten by autopoint.
7478 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7479 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7480 rejects them.
7481 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7482 so that we can remove the intl files at a better time.
7483 (intl_files_to_remove): Remove aclocal.m4, since it gets
7484 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7485 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7486 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7487 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7488 Remove datarootdir hack; no longer needed.
7489 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7490 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7491 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7492 strdup.h.
7493 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7494 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7495
7496 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7497
7498 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7499 it with --assume-autoconf='latest-stable'.
7500
7501 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7502
7503 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7504 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7505 YYSTYPE' and `{'.
7506 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7507 those from muscle_tab.c since the old ones are misleading.
7508
7509 2006-07-13 Akim Demaille <akim@epita.fr>
7510
7511 Support %define "KEY" {VALUE}.
7512 * src/scan-code.h, src/scan-code.l (translate_action)
7513 (translate_rule_action, translate_symbol_action, translate_code):
7514 Return char *, not const char *.
7515 * src/parse-gram.y (declaration): Rename as...
7516 (prologue_declaration): this.
7517 (string_content): Remove this nonterminal, use STRING.
7518 (braceless, content, content.opt): New nonterminal.
7519 Use them.
7520 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7521 as value.
7522 * src/scan-gram.l (getargs.h): Don't include it.
7523
7524 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7525
7526 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7527 rather than a for-loop that declares a local bool variable. This
7528 should work around a compatibility problem with a Cray x1e C++
7529 compiler reported by Hung Nguyen in
7530 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7531 The for-loop was introduced in the 2004-11-17 change but I don't
7532 know why it was needed.
7533
7534 2006-07-12 Akim Demaille <akim@epita.fr>
7535
7536 * data/c.m4: Comment changes.
7537
7538 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7539
7540 * src/complain.c (error_message, ERROR_MESSAGE): New.
7541 To factor...
7542 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7543 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7544
7545 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7546
7547 * NEWS: Instead of %union, you can define and use your own union type
7548 YYSTYPE if your grammar contains at least one <type> tag.
7549 Your YYSTYPE need not be a macro; it can be a typedef.
7550 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7551 (Union Decl, Decl Summary): Document this.
7552 * data/glr.c (YYSTYPE): Implement this.
7553 * data/glr.cc (YYSTYPE): Likewise.
7554 * data/lalr1.cc (YYSTYPE): Likewise.
7555 * data/yacc.c (YYSTYPE): Likewise.
7556 * src/output.c (prepare): Output tag_seen_flag.
7557 * src/parse-gram.y (declaration, grammar_declaration):
7558 Use 'union_seen' rather than 'typed' to determine whether
7559 %union has been seen, since grammars can now be typed without
7560 %union.
7561 (symbol_declaration, type.opt, symbol_def):
7562 Keep track of whether a tag has been seen.
7563 * src/reader.c (union_seen, tag_seen): New vars.
7564 (typed): remove.
7565 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7566 * src/scan-code.l (untyped_var_seen): New variable.
7567 (handle_action_dollar): Adjust to above changes.
7568 (handle_action_dollar, handle_action_at):
7569 Improve overflow checking for outlandish numbers.
7570 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7571 avoid new diagnostics generated by above changes.
7572 * tests/regression.at (YYSTYPE typedef): Add test to check
7573 for type tags without %union.
7574
7575 * src/symlist.c (symbol_list_length): Return int, not unsigned
7576 int, since callers expect int. This may need to get revisited
7577 once we have proper integer overflow checking.
7578
7579 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7580 object is now static.
7581
7582 * src/getargs.c (flags_argmatch): Return void, not int,
7583 to pacify ./configure --enable-gcc-warnings.
7584
7585 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7586 since last_string is already defined to FLEX_PREFIX (last_string).
7587
7588 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7589
7590 Implement --warnings/-W.
7591 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7592 replaced by...
7593 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7594 Adjust callers.
7595 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7596 (warnings_args, warnings_types): New.
7597 (getargs, short_options, long_options): Accept -W/--warnings.
7598 Sort the options by alphabetical order, upper case letter right
7599 before its lower case.
7600
7601 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7602
7603 Change %merge result type clash warnings to errors. Discussed at
7604 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7605 * src/reader.c (record_merge_function_type): Use complain_at.
7606 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7607 declared later): Update test case results.
7608
7609 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7610
7611 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7612 to be in alphabetical order.
7613 (trace_args): Spelling fixes.
7614
7615 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7616
7617 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7618 so they don't collide with user-defined macros.
7619 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7620 this was never guaranteed, and now that we're using gnulib stdint,
7621 which defines int_fast16_t to long int, the problem is exposed.
7622
7623 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7624
7625 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7626 need the full POSIX semantics (and weren't implementing them
7627 anyway).
7628
7629 Adjust to Autoconf 2.60 and today's gnulib.
7630 * bootstrap (gnulib_modules): Add stdint.
7631 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7632 no longer copies it.
7633 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7634 since stdint needs the former and wcwidth (which is now required
7635 by mbswidth) needs the latter.
7636 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7637 work around a compatibility glitch between gettext 0.14.6 and
7638 Autoconf 2.60.
7639 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7640 Do not check for uintptr_t, since new stdint module does the right
7641 thing.
7642 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7643 Add stdint.h, stdint_.h, wcwidth.h.
7644 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7645 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7646 stdint.m4, wchar_t.m4, wcwidth.m4.
7647 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7648 usual order for ../lib/*.h files.
7649 (file_name_split): Use last_component, not base_name, to adjust
7650 to gnulib changes.
7651 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7652 for ../lib/*.h files.
7653 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7654 Define unconditionally, since we now assume the stdint module.
7655 * src/scan-skel.l: Include <dirname.h>.
7656 (BASE_QPUTS): Use last_component, not base_name.
7657 * src/system.h: Include <unlocked-io.h> in the usual order
7658 for ../lib/*.h files. Include <stdint.h> unconditionally,
7659 since we now use the stdint module.
7660 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7661 HAVE_UINTPTR_T, since we now use the stdint module.
7662 (base_name): Remove decl, since files now include <dirname.h>
7663 to get the decl.
7664
7665 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7666
7667 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7668 New, default to 1.
7669 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7670 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7671 default.
7672 * tests/calc.at: Adjust.
7673
7674 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7675
7676 * data/c.m4 (b4_basename): New.
7677 (b4_syncline): Also output the location of its invocation (from
7678 the skeleton).
7679 (b4_user_action, b4_define_user_action, b4_user_actions)
7680 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7681 (b4_user_stype): New.
7682 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7683
7684 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7685
7686 In the grammar file, the first column is 1 not 0 on the first line as
7687 on every other line.
7688 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7689 * tests/input.at (Torturing the Scanner): Update output.
7690
7691 * src/scan-gram.l (scanner_cursor): Declare it static.
7692
7693 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7694
7695 In warnings, say "previous declaration" rather than "first
7696 declaration".
7697 * src/symtab.c (redeclaration): Do that here.
7698 * src/reader.c (record_merge_function_type): In the case of a result
7699 type clash, report the previous declaration rather than the very first
7700 one in the grammar file.
7701 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7702 declared later): Add a third declaration to check this behavior.
7703 * tests/input.at (Incompatible Aliases): Update output.
7704
7705 2006-06-27 Akim Demaille <akim@epita.fr>
7706
7707 * doc/Doxyfile.in: New.
7708 * doc/Makefile.am: Use it.
7709 * src/lalr.h, src/symtab.h: Initial doxygenation.
7710
7711 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7712
7713 Don't miss %merge result type warnings just because the LHS types are
7714 declared after the %merge. This continues the effort of the previous
7715 patch.
7716 * src/reader.c (get_merge_function): Don't set the merger type yet.
7717 (record_merge_function_type): New function for setting the merger type
7718 and checking for clashes.
7719 (grammar_current_rule_merge_set): Set the location of the %merge for
7720 the current rule.
7721 (packgram): Invoke record_merge_function_type for each rule now that
7722 all symbol type declarations have been parsed.
7723 * src/reader.h (merger_list.type_declaration_location): New member
7724 storing the location of the first %merge from which the type for this
7725 merging function was derived.
7726 * src/symlist.h (symbol_list.merger_declaration_location): New member
7727 storing the location of a rule's %merge, if any.
7728 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7729 declared later): New test to catch the error fixed by the above patch.
7730
7731 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7732
7733 Get action warnings (grammar_rule_check) right even when symbol
7734 declarations appear after the rules. Discussed at
7735 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7736 and
7737 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7738 Don't mistake the type of $$ in a midrule to be that of its parent
7739 rule's $$.
7740 * src/reader.c (grammar_current_rule_end): Don't invoke
7741 grammar_rule_check yet since not all symbol declarations may have been
7742 parsed yet.
7743 (grammar_midrule_action): Likewise.
7744 Don't record whether the midrule's $$ has been used yet since actions
7745 haven't been translated yet.
7746 Record the midrule's parent rule and its RHS index within the parent
7747 rule.
7748 (grammar_current_rule_action_append): Don't translate the action yet
7749 since not all symbol declarations may have been parsed yet and, thus,
7750 warnings about types for $$, $n, @$, and @n can't be reported yet.
7751 (packgram): Translate the action and invoke grammar_rule_check now that
7752 all symbol declarations have been parsed.
7753 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7754 after parsing the entire grammar file, the symbol list here in the case
7755 of a midrule is actually the midrule's empty RHS, so reference its
7756 parent rule's RHS where necessary.
7757 On the other hand, now that you can already know it's a midrule, you
7758 aren't forced to think $$ has the same type as its parent rule's $$.
7759 (handle_action_at): In the case of a midrule, reference the parent rule
7760 where necessary.
7761 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7762 members.
7763 (symbol_list_length): Now that this is invoked after all rules have
7764 been parsed, a NULL symbol (rather than a NULL symbol list node)
7765 terminates a rule. symbol_list_print already does this correctly.
7766 * src/symlist.h (symbol_list.midrule_parent_rule,
7767 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7768 remember their relationships with their parents.
7769 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7770 fixed by the above patch.
7771 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7772 implementing...
7773 (Unused values): ... this old test case and...
7774 (Unused values before symbol declarations): ... this new test case.
7775 This one is the same as `Unused values' except that all symbol
7776 declarations appear after the rules in order to catch the rest of the
7777 errors fixed by the above patch.
7778
7779 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7780
7781 More cleanup.
7782 * src/reader.c (current_rule): Declare it static since it's no longer
7783 used outside this file.
7784 (grammar_current_rule_action_append): Remove redundant arguments from
7785 translate_rule_action invocation.
7786 * src/reader.h (current_rule): Remove this unused extern.
7787 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7788 * src/scan-code.l (translate_rule_action): Likewise.
7789
7790 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7791
7792 Clean up yesterday's patch.
7793 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7794 to...
7795 * src/reader.c (grammar_current_rule_action_append): ... here for
7796 consistency with grammar_current_rule_symbol_append.
7797 * tests/regression.at (Braced code in declaration in rules section):
7798 Make yyerror and yylex static as usual.
7799
7800 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7801
7802 Fix bug that mistakes braced code in a declaration in the rules section
7803 to be a rule action. Mentioned at
7804 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7805 * src/scan-gram.l: Move midrule action detection from the start of the
7806 scanning of any braced code to...
7807 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7808 action. For readability, use $2 and @2 rather than the equivalent
7809 global variables.
7810 * tests/regression.at (Braced code in declaration in rules section):
7811 New test to catch the error fixed by the above patch.
7812
7813 Work on code readability some.
7814 * src/scan-code.l (current_rule): Get rid of this misleading and
7815 redundant declaration: it's actually extern'ed in reader.h.
7816 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7817 translate_action): Add a rule argument and use it instead of the global
7818 current_rule.
7819 (translate_rule_action): This already receives current_rule through an
7820 argument, so pass it on to translate_action instead of assigning
7821 current_rule to current_rule.
7822 (translate_symbol_action, translate_code): Pass rule = NULL to
7823 translate_action.
7824
7825 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7826
7827 Rename %before-definitions to %start-header and %after-definitions to
7828 %end-header. Don't use these declarations to separate pre-prologue
7829 blocks from post-prologue blocks. Add new order-independent
7830 declarations %before-header and %after-header as alternatives to the
7831 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7832 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7833 * NEWS (2.3+): Update for these changes.
7834 * data/glr.c (b4_before_definitions): Update to...
7835 (b4_start_header): ... this.
7836 (b4_after_definitions): Update to...
7837 (b4_end_header): ... this.
7838 * data/glr.cc: Likewise.
7839 * data/lalr1.cc: Likewise.
7840 * data/yacc.c: Likewise.
7841 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7842 prologue blocks with %*-header declarations.
7843 (Calc++ Parser): Likewise.
7844 (Decl Summary): Update names.
7845 (Table of Symbols): Update description.
7846 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7847 (PERCENT_END_HEADER): ... this.
7848 (PERCENT_BEFORE_DEFINITIONS): Update to...
7849 (PERCENT_START_HEADER): ... this.
7850 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7851 (declaration): Update token names and m4 macro names.
7852 When parsing %end-header and %start-header, invoke translate_code
7853 before muscle_code_grow, and no longer set global booleans to remember
7854 whether these declarations have been seen.
7855 Parse new %after-header and %before-header.
7856 * src/reader.c (before_definitions, after_definitions): Remove.
7857 (prologue_augment): Accept a new bool argument to specify whether to
7858 augment the pre-prologue or post-prologue.
7859 * src/reader.h (before_definitions, after_definitions): Remove these
7860 extern's.
7861 (prologue_augment): Add new bool argument.
7862 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7863 (PERCENT_END_HEADER): ... this.
7864 (PERCENT_BEFORE_DEFINITIONS): Update to...
7865 (PERCENT_START_HEADER): ... this.
7866 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7867 * tests/actions.at (Printers and Destructors): Update names.
7868
7869 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7870
7871 Add comparison operators for C++ location classes. Discussed at
7872 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7873 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7874 declaration indicating whether filename_type has an operator==. If
7875 filename_type is `std::string', it defaults to `1', `0' otherwise.
7876 * data/location.cc: Iff b4_define_location_comparison is `1', add
7877 operator== and operator!= for class position and for class location.
7878
7879 Some minor fixes.
7880 * src/scan-action.l: Remove unused file.
7881 * src/symtab.c (symbol_printer_set): Use printer_location not
7882 destructor_location.
7883 * src/symtab.h (struct symbol): Replace incorrect source comment for
7884 printer members.
7885 * tests/input.at (Incompatible Aliases): Update output with correct
7886 printer location.
7887
7888 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7889
7890 Don't put the pre-prologue in the header file. For the yacc.c code
7891 file and the glr.c header and code files, move the pre-prologue before
7892 the token definitions. Add new %before-definitions and
7893 %after-definitions to declare code that will go in both the header file
7894 and code file. Discussed at
7895 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7896 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7897 and
7898 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7899 * NEWS (2.3+): Describe these changes.
7900 * data/glr.c (b4_pre_prologue): Move from within to before...
7901 (b4_shared_declarations): ... this.
7902 Add new b4_before_definitions before b4_token_enums.
7903 Add new b4_after_definitions at the end.
7904 * data/glr.cc (b4_pre_prologue): Replace with...
7905 (b4_before_definitions): ... this in the header file.
7906 (b4_after_definitions): New near the end of the header file.
7907 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7908 code file right before including the header file.
7909 (b4_before_definitions): New in the previous position of
7910 b4_pre_prologue in the header file.
7911 (b4_after_definitions): New near the end of the header file.
7912 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7913 (b4_token_enums_defines): In the code file, move to right before
7914 YYSTYPE for consistency with the header file.
7915 (b4_before_definitions): New right before b4_token_enums_defines in
7916 both the header and code file.
7917 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7918 header and code file.
7919 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7920 of prologues for %union dependencies.
7921 (Decl Summary): In %defines description, mention the effect of
7922 %before-definitions and %after-definitions on the header file.
7923 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7924 than in the pre-prologue so that make check succeeds.
7925 (Table of Symbols): Add entries for %before-definitions and
7926 %after-definitions.
7927 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7928 %before-definitions.
7929 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7930 (declaration): Parse those declarations and append to
7931 b4_before_definitions and b4_after_definitions, respectively.
7932 * src/reader.c (before_definitions, after_definitions): New bools to
7933 track whether those declarations have been seen.
7934 (prologue_augment): Add to the post-prologue if %union,
7935 %before-definitions, or %after-definitions has been seen.
7936 * src/reader.h (before_definitions, after_definitions): New extern's.
7937 * src/scan-gram.l: Scan the new declarations.
7938 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7939 prologue block in a %before-definitions or a %after-definitions based
7940 on whether the %union is declared.
7941 * tests/regression.at (Early token definitions with --yacc, Early token
7942 definitions without --yacc): Move tests for token definitions into the
7943 post-prologue since token names are no longer defined in the
7944 pre-prologue.
7945
7946 2006-06-20 Akim Demaille <akim@epita.fr>
7947
7948 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7949 (symbol_get): Use it.
7950 * src/parse-gram.y: Use it.
7951
7952 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7953
7954 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7955 build succeeds when configured with --enable-gcc-warnings.
7956
7957 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7958
7959 * src/parse-gram.y (char_name): New function.
7960 (CHAR, STRING, string_content): For %printer, properly escape.
7961 (ID): Prefer fputs to fprintf.
7962 (id): Reindent to be consistent with other rules.
7963 Properly quote char.
7964
7965 The Translation Project changed its way of publishing translations
7966 to maintainers. I haven't received any responses to my request
7967 for supporting the old way, or for documenting the new way. I
7968 have modified 'bootstrap' to use screen scraping
7969 (in this case, HTML scraping). This is unreliable and inelegant,
7970 but I don't see any better way. Yuck.
7971 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7972 (get_translations): New function, which uses HTML scraping to
7973 deduce locations of latest translations.
7974 Use this function to grab both bison and bison-runtime .po files.
7975 Don't bother priming the pump for the runtime-po domain any more,
7976 as it's now translated better than bison is.
7977
7978 2006-06-19 Akim Demaille <akim@epita.fr>
7979
7980 * src/scan-gram.l: No longer "parse" things after `%union' until
7981 `{'. Rather, return a single "%union" token.
7982 No longer make symbols: return strings, and leave the conversion
7983 to symbols to the parser.
7984 (SC_PRE_CODE, token_type): Remove.
7985 * src/parse-gram.y (%union): New field `character'.
7986 Sort tokens.
7987 (CHAR): New token.
7988 (ID, ID_COLON): Now that the scanner no longer makes them
7989 identifiers, adjust all uses to invoke symbol_get.
7990 (id_colon): New, wraps the conversion from string to symbol.
7991 (%union): Accept a possible union_name.
7992 (symbol): Now can be a char.
7993 * data/c.m4 (b4_union_name): Leave a default value.
7994 * data/glr.c, data/yacc.c: Use it.
7995
7996 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7997
7998 For associating token numbers with token names for "yacc.c", don't use
7999 #define statements unless `--yacc' is specified; always use enum
8000 yytokentype. Most important discussions start at:
8001 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8002 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8003 and
8004 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8005 * NEWS (2.3+): Mention.
8006 * data/c.m4 (b4_yacc_if): New.
8007 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8008 token #define's.
8009 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8010 on token name definitions.
8011 * src/getargs.c (usage): Capitalize `Yacc' in English.
8012 * src/output.c (prepare): Define b4_yacc_flag.
8013 * tests/regression.at (Early token definitions): Test that tokens names
8014 are defined before the pre-prologue not just before the post-prologue.
8015 Remove this test case and copy to...
8016 (Early token definitions with --yacc): ... this to test #define's.
8017 (Early token definitions without --yacc): ... and this to test enums.
8018
8019 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8020
8021 * NEWS: Reword the post-2.3 change to not be so optimistic about
8022 removing the old "look-ahead" spelling.
8023 Update previous look-ahead/lookahead change reports.
8024 * REFERENCES: look-ahead -> lookahead (since that's
8025 what he actually wrote).
8026 * doc/refcard.tex: look ahead -> lookahead,
8027 look-ahead -> lookahead
8028
8029 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8030
8031 For consistency, use `lookahead' instead of `look-ahead' or
8032 `look_ahead'. Discussed starting at
8033 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8034 and then at
8035 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8036 * NEWS: For the next release, note the change to `--report'.
8037 * TODO, doc/bison.1: Update English.
8038 * doc/bison.texinfo: Update English.
8039 (Understanding Your Parser, Bison Options): Document as
8040 `--report=lookahead' rather than `--report=look-ahead'.
8041 * src/conflicts.c: Update English in comments.
8042 (lookahead_set): Rename from look_ahead_set.
8043 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8044 (resolve_sr_conflict): Rename local look_ahead_tokens to
8045 lookahead_tokens, and update other uses.
8046 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8047 count_rr_conflicts, conflicts_free): Update uses.
8048 * src/getargs.c (report_args): Move "lookahead" before alternate
8049 spellings.
8050 (report_types): Update uses.
8051 (usage): For `--report' usage description, state `lookahead' spelling
8052 rather than `look-ahead'.
8053 * src/getargs.h (report.report_lookahead_tokens): Rename from
8054 report_look_ahead_tokens.
8055 * src/lalr.c: Update English in comments.
8056 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8057 (state_lookahead_tokens_count): Rename from
8058 state_look_ahead_tokens_count.
8059 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8060 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8061 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8062 Update other uses.
8063 Update English in output.
8064 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8065 * src/print.c: Update English in comments.
8066 (lookahead_set): Rename from look_ahead_set.
8067 (print_reduction): Rename argument lookahead_token from
8068 look_ahead_token.
8069 (print_core, state_default_rule, print_reductions, print_results):
8070 Update uses.
8071 * src/print_graph.c: Update English in comments.
8072 (print_core): Update uses.
8073 * src/state.c: Update English in comments.
8074 (reductions_new): Update uses.
8075 (state_rule_lookahead_tokens_print): Rename from
8076 state_rule_look_ahead_tokens_print, and update other uses.
8077 * src/state.h: Update English in comments.
8078 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8079 (state_rule_lookahead_tokens_print): Rename from
8080 state_rule_look_ahead_tokens_print.
8081 * src/tables.c: Update English in comments.
8082 (conflict_row, action_row): Update uses.
8083 * tests/glr-regression.at
8084 (Incorrect lookahead during deterministic GLR,
8085 Incorrect lookahead during nondeterministic GLR): Rename
8086 print_look_ahead to print_lookahead.
8087 * tests/torture.at: Update English in comments.
8088 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8089 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8090 (Many lookahead tokens): Update uses.
8091 * data/glr.c: Update English in comments.
8092 * lalr1.cc: Likewise.
8093 * yacc.c: Likewise.
8094 * src/conflicts.h: Likewise.
8095 * src/lalr.h: Likewise.
8096 * src/main.c: Likewise.
8097 * src/output.c: Likewise.
8098 * src/parse-gram.c: Likewise.
8099 * src/tables.h: Likewise.
8100 * tests/calc.at: Likewise.
8101
8102 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8103
8104 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8105
8106 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8107
8108 * TODO: Add request from Nelson H. F. Beebe to be able to install
8109 Bison without installing the yacc script.
8110
8111 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8112
8113 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8114 and yytext if they're already #define'd.
8115 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8116 * src/scan-code-c.c: ... here.
8117 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8118 <config.h>.
8119
8120 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8121
8122 Get Bison to build again when configured with --enable-gcc-warnings.
8123 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8124 missing #include's.
8125 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8126 loc argument as it shadows a global.
8127 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8128 invocation.
8129
8130 * src/.cvsignore: Add scan-code.c.
8131
8132 2006-06-07 Akim Demaille <akim@epita.fr>
8133
8134 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8135 to...
8136 * src/scan-code.l: here.
8137 * tests/input.at (Torturing the Scanner): Fix another location
8138 error.
8139
8140 2006-06-07 Akim Demaille <akim@epita.fr>
8141
8142 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8143
8144 2006-06-06 Akim Demaille <akim@epita.fr>
8145
8146 Extract the parsing of user actions from the grammar scanner.
8147 As a consequence, the relation between the grammar scanner and
8148 parser is much simpler. We can also split "composite tokens" back
8149 into simple tokens.
8150 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8151 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8152 rename as...
8153 * src/location.h, src/location.c (add_column_width)
8154 (location_compute): these.
8155 Fix the column count: the initial column is 0.
8156 (location_print): Be robust to ending column being 0.
8157 * src/location.h (boundary_set): New.
8158 * src/main.c: Adjust to scanner_free being renamed as
8159 gram_scanner_free.
8160 * src/output.c: Include scan-code.h.
8161 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8162 Use boundary_set.
8163 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8164 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8165 which is now, again, a separate token.
8166 Adjust all dependencies.
8167 Whereever actions with $ and @ are used, use translate_code.
8168 (action): Remove this nonterminal which is now useless.
8169 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8170 (grammar_current_rule_action_append): Use translate_code.
8171 (packgram): Bound check ruleno, itemno, and rule_length.
8172 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8173 (last_string, last_braced_code_loc, max_left_semantic_context)
8174 (scanner_initialize, scanner_free, scanner_last_string_free)
8175 (gram_out, gram_lineno, YY_DECL_): Move to...
8176 * src/scan-gram.h: this new file.
8177 (YY_DECL): Rename as...
8178 (GRAM_DECL): this.
8179 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8180 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8181 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8182 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8183 Move these declarations, and...
8184 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8185 these to...
8186 * src/flex-scanner.h: this new file.
8187 * src/scan-gram.l (rule_length, rule_length_overflow)
8188 (increment_rule_length): Remove.
8189 (last_braced_code_loc): Rename as...
8190 (gram_last_braced_code_loc): this.
8191 Adjust to the changes of the parser.
8192 Move all the handling of $ and @ into...
8193 * src/scan-code.l: here.
8194 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8195 (handle_action_dollar, handle_action_at): Move to...
8196 * src/scan-code.l: here.
8197 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8198 scan-code.h, scan-code-c.c, scan-gram.h.
8199 (EXTRA_bison_SOURCES): Add scan-code.l.
8200 (BUILT_SOURCES): Add scan-code.c.
8201 (yacc): Be robust to white spaces.
8202
8203 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8204 * tests/regression.at: Adjust the column numbers.
8205 * tests/regression.at: Adjust the error message.
8206
8207 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8208
8209 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8210 Use Akim's wording from
8211 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8212
8213 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8214
8215 Between Bison releases, manually append `+' to the previous Bison
8216 release number, and use that as a signal to automatically print the
8217 ChangeLog's CVS Id keyword from --version. Discussed starting at
8218 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8219 * ChangeLog: Add Id header.
8220 * configure.ac (AC_INIT): Append `+' to `2.3'.
8221 * src/.cvsignore: Add revision.c.
8222 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8223 (BUILT_SOURCES): Add revision.c.
8224 (revision.c): New target rule. This file defines a new global variable
8225 named revision. It initializes it with either the Id from ChangeLog
8226 or, if VERSION doesn't contain `+', with the empty string.
8227 * src/getargs.c (version): Print the value of revision.
8228 * src/revision.h: Extern revision.
8229
8230 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8231
8232 * NEWS: Version 2.3.
8233 * configure.ac (AC_INIT): Likewise.
8234
8235 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8236
8237 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8238 with no arguments, not as an object-like macro. This is for
8239 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8240 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8241 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8242 Document this.
8243
8244 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8245
8246 * src/getargs.c (usage): Back out yesterday's modification of the
8247 --help output so that we don't have to wait for translation before
8248 releasing 2.3.
8249
8250 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8251
8252 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8253 Problem reported by Akim Demaille.
8254
8255 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8256
8257 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8258
8259 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8260
8261 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8262 generated source code. Problem reported by Frans Englich in
8263 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8264
8265 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8266
8267 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8268 shell, not within 'make', so that 'make' by an ordinary builder
8269 (using GNU make) does not worry about configuring gzip. This also
8270 works around a bug reported independently by Keith Thompson and by
8271 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8272 stderr rather than stdout, messing up the build logs.
8273
8274 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8275
8276 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8277 to make sure that YYID will never be unused. This fixes a 'make
8278 maintainer-check' failure caused by the recent changes to the 'Trivial
8279 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8280 not used.
8281 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8282
8283 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8284
8285 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8286 state before an empty RHS is always resolved here. Only the location
8287 of that state is guaranteed to be resolved, and that's enough. This
8288 fixes the remaining bug reported by Derek M. Jones in
8289 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8290 * tests/glr-regression.at (Uninitialized location when reporting
8291 ambiguity): Test the above case.
8292 Also, the embedded comments in this test case claim it checks the case
8293 of an empty RHS that has inherited the initial location. However, the
8294 corresponding LHS was already resolved, so yyresolveLocations didn't
8295 actually have reason to modify it. Fix this by forcing
8296 nondeterministic operation at the beginning of the parse.
8297
8298 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8299
8300 * data/c.m4 (b4_yy_symbol_print_generate):
8301 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8302 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8303 of the bugs reported today by Derek M Jones in
8304 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8305 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8306 defined to be a type name without parens or brackets.
8307 (Location Type): Similarly for YYLTYPE.
8308 * tests/regression.at (Trivial grammars): Put in a test for this
8309 bug that will be caught by 'make maintainer-check' (though not,
8310 alas, by 'make check' unless your compiler is picky).
8311
8312 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8313
8314 * NEWS: Version 2.2.
8315 * configure.ac (AC_INIT): Likewise.
8316
8317 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8318
8319 * data/glr.c (yyreportTree): Make room in yystates for the state
8320 preceding the RHS. This fixes the segmentation fault reported by Derek
8321 M. Jones in
8322 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8323 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8324 to the user. Reported for yyreportTree by Derek M. Jones later in the
8325 same thread.
8326 * THANKS: Add Derek M. Jones.
8327 Update my email address.
8328 Fix typo in Steve Murphy's name.
8329
8330 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8331
8332 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8333 checking against YYLAST that caused the parser to miss a potential
8334 alternative in its diagnostic.
8335 Problem reported by Maria Jose Moron Fernandez in
8336 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8337 * data/lalr1.cc (yysyntax_error_): Likewise.
8338 * data/yacc.c (yysyntax_error): Likewise.
8339 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8340 tokens, in case we run into an older C compiler.
8341 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8342 Use them to check for the off-by-one error fixed above.
8343
8344 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8345 YYSIZE_T, not size_t.
8346 * tests/regression.at (Trivial grammars): New test, to catch
8347 the error fixed by the above patch.
8348
8349 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8350
8351 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8352 scheme.
8353 Reported by Steve Murphy.
8354
8355 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8356
8357 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8358 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8359
8360 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8361
8362 Implement --trace=m4.
8363 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8364 * src/output.c (output_skeleton): When set, pass -dV to m4.
8365
8366 Factor the handling of flags in m4.
8367 * src/output.c (prepare): Rename the muscle names debug, defines,
8368 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8369 * data/c.m4: Adjust.
8370 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8371 Use b4_define_flag_if to define other b4_FLAG_if macros.
8372 (b4_location_if): As a consequence, rename as...
8373 (b4_locations_if): this, for consistency.
8374 Adjust all the skeletons.
8375
8376 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8377
8378 * etc/bench.pm: Shorten bench names.
8379
8380 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8381
8382 * src/output.h, src/output.c (error_verbose): Move to...
8383 * src/getargs.h, src/getargs.c: here.
8384 Sort the flags.
8385 Adjust dependencies.
8386
8387 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8388
8389 * data/c.m4 (b4_copyright): Put the special exception for Bison
8390 skeletons here, so we don't have to put it in each skeleton. All
8391 uses changed. Suggested by Akim Demaille. Also, wrap the
8392 copyright notice, in case it is longer than 80 columns. Replace
8393 comma by newline after title.
8394
8395 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8396
8397 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8398 incompatibility, not a bug. Mention that it wasn't fixed as of
8399 flex 2.5.33.
8400
8401 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8402
8403 * examples/extexi: Enforce the precedence of concatenation over
8404 >>.
8405 Reported by Tommy Nordgren.
8406
8407 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8408
8409 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8410 with the member "token".
8411 Reported by Martin Nylin.
8412
8413 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8414
8415 * data/glr.c: Switch to Bison 2.2 special-exception language in
8416 the copyright notice. Use more-regular format for titles and
8417 copyright notices.
8418 * data/glr.cc: Likewise.
8419 * data/location.cc: Likewise.
8420 * data/yacc.cc: Likewise.
8421 * doc/bison.texinfo (Conditions): Document this.
8422 * NEWS: likewise. Upgrade version to 2.2.
8423
8424 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8425
8426 * data/glr.cc: Remove dead code.
8427
8428 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8429
8430 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8431 that variable and the line breaks the bootstrap. Problem reported
8432 by Juan M. Guerrero.
8433
8434 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8435
8436 * doc/bison.texinfo (Multiple start-symbols): New.
8437
8438 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8439
8440 * etc/README, etc/bench.pl: New.
8441
8442 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8443
8444 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8445 rule.
8446 Reported by Mickael Labau.
8447 * tests/input.at (Torturing the Scanner): Test it.
8448
8449 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8450
8451 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8452 Problem reported by Bob Rossi.
8453
8454 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8455
8456 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8457 and didn't really work.
8458 For the index, use @ifnotinfo, not @iftex.
8459 Minor cleanups of spacing and terminology.
8460
8461 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8462
8463 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8464 of AT_NAME_PREFIX when %name-prefix is not used.
8465
8466 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8467
8468 Apply --prefix to C++ skeletons too: they change the namespace.
8469 The test suite already exercize these cases.
8470 * data/c++.m4 (b4_namespace): New.
8471 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8472 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8473 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8474 * doc/bison.texinfo: Document it.
8475 (Option Cross Key): Use @multitable in all formats. It looks
8476 nicer, even in TeX outputs.
8477 (Rules): Use the same code whatever the output type is.
8478 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8479 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8480 * tests/calc.at: Use it, instead of hard coding `yy'.
8481
8482 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8483
8484 * TODO: Remove dead items.
8485
8486 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8487
8488 * doc/FAQ: Remove, merged into...
8489 * doc/bison.texinfo (FAQ): this.
8490 * doc/Makefile.am (EXTRA_DIST): Adjust.
8491
8492 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8493
8494 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8495 even if empty.
8496 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8497 * doc/bison.texinfo (Calc++ Scanner): Use it.
8498
8499 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8500
8501 Fix two nits reported by twlevo, plus one more that I discovered.
8502
8503 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8504 this is the usual Bison style.
8505 * src/location.h (location_print): Likewise.
8506
8507 * src/reader.h (token_name): Likewise.
8508
8509 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8510
8511 Fix some nits reported by twlevo.
8512 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8513 and "POSIX". Use more-modern syntax for URLs. Mention C++
8514 and ask for Java. Don't hardwire OS version numbers. Add
8515 copyright notice.
8516 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8517 * src/conflicts.c (solved_conflicts_obstack): Now static.
8518
8519 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8520
8521 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8522 page. Say "you can use it" not "you may use it" as on the web page;
8523 we're describing capabilities not granting permission.
8524
8525 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8526
8527 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8528 shadowing warnings. Use usual patter for iterating through RHS.
8529 * tests/glr-regression.at
8530 (Uninitialized location when reporting ambiguity):
8531 Modify yylex so that it uses its argument, rather than trying
8532 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8533 const char -> char const.
8534
8535 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8536 Don't use tabs inside commands; it messes up 'ps'.
8537 Problem reported by twlevo.
8538
8539 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8540
8541 * tests/glr-regression.at (Uninitialized location when reporting
8542 ambiguity): New test case.
8543 * data/glr.c (yyresolveLocations): New function, which uses
8544 YYLLOC_DEFAULT.
8545 (yyresolveValue): Invoke yyresolveLocations before reporting an
8546 ambiguity.
8547 * doc/bison.texinfo (Default Action for Locations): Note
8548 YYLLOC_DEFAULT's usage for ambiguity locations.
8549 (GLR Semantic Actions): Cross-reference those notes.
8550
8551 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8552
8553 * tests/glr-regression.at (Leaked semantic values when reporting
8554 ambiguity): Remove unnecessary union and type declarations.
8555 (Leaked lookahead after nondeterministic parse syntax error): New test
8556 case.
8557 * data/glr.c (yyparse): Check for zero stacks remaining before
8558 attempting to shift the lookahead so that you don't lose it.
8559
8560 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8561
8562 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8563 * tests/glr-regression.at (Leaked semantic values when reporting
8564 ambiguity): New test case.
8565 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8566 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8567 now unnecessary yystackp parameter.
8568 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8569 destructors can be called.
8570
8571 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8572 in existing testcases.
8573
8574 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8575
8576 Don't leak semantic values for parent RHS when a user action cuts the
8577 parser, and clean up related code a bit.
8578 * tests/glr-regression.at (Leaked merged semantic value if user action
8579 cuts parse): Rename to...
8580 (Leaked semantic values if user action cuts parse): ... this. Add check
8581 for leaked parent RHS values.
8582 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8583 between an unresolved state (non-empty chain of semantic options) and
8584 an incomplete one (signaled by an empty chain).
8585 (yyresolveStates): Document the interface. Move all manipulation of a
8586 successfully or unsuccessfully resolved yyGLRState to...
8587 (yyresolveValue): ... here so that yyresolveValue always leaves a
8588 yyGLRState with consistent data and thus is easier to understand.
8589 Remove the yyvalp and yylocp parameters since they are always just
8590 taken from the yys parameter. When reporting a discarded merged value
8591 in debugging output, note that it is incompletely merged. Document the
8592 interface.
8593 (yyresolveAction): If resolving any of the RHS states fails, destroy
8594 them all rather than leaking them. Thus, as long as user actions are
8595 written to clean up the RHS correctly, yyresolveAction always cleans up
8596 the RHS of a semantic option. Document the interface.
8597
8598 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8599
8600 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8601 led to a segmentation fault in GNU Pascal. Problem reported
8602 by Waldek Hebisch.
8603
8604 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8605
8606 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8607 mid-rule action inside a nonterminal symbol in order to declare a
8608 destructor for its semantic value.
8609
8610 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8611
8612 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8613 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8614 __cplusplus && ! defined _STDLIB_H && !
8615 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8616 defined free))]: Include <stdlib.h> rather than rolling our own
8617 declarations of malloc and free, to avoid problems with
8618 incompatible declarations (using 'throw') C++'s stdlib.h. This
8619 should fix Debian bug 340012
8620 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8621 reported by Guillaume Melquiond.
8622
8623 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8624
8625 * NEWS: Clarify symbols versus types in unused-value warnings.
8626
8627 * configure.ac (AC_INIT): Bump version number.
8628
8629 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8630
8631 * NEWS: Version 2.1a.
8632 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8633 since C99 requires this.
8634
8635 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8636
8637 * m4/c-working.m4: New file.
8638 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8639
8640 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8641
8642 * Makefile.maint: Merge from coreutils.
8643
8644 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8645
8646 More portability fixes for problems summarized by Nelson H. F. Beebe.
8647
8648 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8649 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8650 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8651 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8652 messes up because C++ code is compiled in 32-bit mode but linked
8653 in 64-bit mode.
8654
8655 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8656
8657 More portability fixes for problems summarized by Nelson H. F. Beebe.
8658
8659 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8660 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8661
8662 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8663 nodist_PROGRAMS, since we don't need to actually compile the
8664 example if we're just doing a plain 'make'. This avoids bothering
8665 the installer unnecessarily about problems due to weird C++
8666 compilers.
8667
8668 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8669
8670 More portability fixes for problems summarized by Nelson H. F. Beebe.
8671
8672 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8673 than #include "...", and compile with -I'.'. The old method was
8674 not portable, according to Posix and the C standard, and it does
8675 not work with Sun C 5.7, where previous #line directives affect
8676 the working directory used in later #include "..." directives.
8677
8678 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8679
8680 Various DJGGP specific issues in /djgpp
8681
8682 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8683
8684 More portability fixes for problems summarized by Nelson H. F. Beebe.
8685
8686 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8687 '#include <map>' works and that you can apply ++ to iterators.
8688
8689 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8690
8691 Work around portability problems summarized by Nelson H. F. Beebe in
8692 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8693
8694 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8695 that '#include <string>' works.
8696
8697 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8698 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8699 "warning: sorry: semantics of inline function static data `const
8700 unsigned char translate_table[262]' are wrong (you'll wind up with
8701 multiple copies)".
8702
8703 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8704 or, xor to not_, and_, or_, and xor_, respectively. This works
8705 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8706 random system header somewhere that includes the equivalent of
8707 <iso646.h>.
8708
8709 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8710 -E" works; it apparently doesn't work with PathScale EKO Compiler
8711 Suite Version 2.0.
8712
8713 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8714
8715 During deterministic GLR operation, user actions should be able to
8716 influence the parse by changing yychar. To make this easier to fix and
8717 to make glr.c easier to evolve in general, don't maintain yytoken in
8718 parallel with yychar; just compute yytoken when needed.
8719 * tests/glr-regression.at (Incorrect lookahead during deterministic
8720 GLR): Check that setting yychar in a user action has the intended
8721 effect.
8722 * data/glr.c (yyGLRStack): Remove yytokenp member.
8723 (yyclearin): Don't set *yytokenp.
8724 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8725 yychar rather than *yytokenp to determine the current lookahead.
8726 Compute yytoken locally when needed.
8727 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8728 point to.
8729
8730 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8731 after `--report' documentation.
8732
8733 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8734
8735 * src/parse-gram.y (grammar_declaration): Location of printer
8736 symbol is @1, not list->location. Bug reported by twlevo.
8737 * tests/input.at (Incompatible Aliases): Adjust to above change.
8738
8739 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8740
8741 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8742 all the test at once. This makes the output easier to read in the
8743 normal case.
8744
8745 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8746 got from <http://bro-ids.org/download.html>. The bug is that
8747 when two actions appeared in succession, the second one was
8748 scanned before the first one was added to the grammar rule
8749 as a midrule action. Bison then output the incorrect warning
8750 "parse.y:905.17-906.36: warning: unused value: $3".
8751 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8752 associated with a value.
8753 (rhs): Don't invoke grammar_current_rule_action_append.
8754 (action): Invoke it here instead.
8755 * src/reader.c (grammar_midrule_action): Now extern.
8756 (grammar_current_rule_action_append): Don't invoke
8757 grammar_midrule_action; that is now the scanner's job.
8758 * src/reader.h (last_string, last_braced_code_loc):
8759 (grammar_midrule_action): New decls.
8760 * src/scan-gram.l (last_string): Now extern, sigh.
8761 (last_braced_code_loc): New extern variable.
8762 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8763 rule already has an action.
8764 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8765 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8766 Add some tests to check that the above changes fixed the bug.
8767
8768 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8769
8770 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8771 All used changed. Check whether the symbol has a destructor,
8772 not whether it is typed.
8773 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8774 that the values are still reported as unused. All line numbers
8775 adjusted.
8776
8777 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8778
8779 Work around a bug in bro 0.8, which underparenthesizes its
8780 definition of YYLLOC_DEFAULT.
8781 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8782 their arguments.
8783 * data/lalr1.cc: Likewise.
8784 * data/yacc.cc: Likewise.
8785
8786 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8787
8788 Work around a bug in Pike 7.0, and give the Pike folks a
8789 better way to override the usual int widths.
8790 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8791 user can override the types.
8792 (short): #undef, to work around a bug in Pike 7.0.
8793 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8794 (union yyalloc.yyss): Use yytype_int16 rather than short.
8795 All uses changed.
8796 (yysigned_char): Remove.
8797 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8798 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8799 * tests/regression.at (Web2c Actions): Adjust to above changes.
8800
8801 * src/reader.c (check_and_convert_grammar): New function.
8802 (reader): Close the input file even if something went wrong during
8803 parsing. Minor file descriptor leak reported by twlevo.
8804
8805 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8806 to pacify gcc -Wswitch-default.
8807 * src/scan-gram.l (adjust_location): Use a default: break; case
8808 to pacify gcc -Wswitch-default.
8809 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8810 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8811 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8812 Move these decls to scan-skel.l, since they don't need to be
8813 visible elsewhere.
8814 * src/scan-skel.l: Accept the above decls.
8815 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8816 is used.
8817
8818 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8819
8820 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8821 since we don't want to insist on a version number at the start
8822 of the changelog every time.
8823 * Makefile.maint: Sync from coreutils a bit better.
8824 (sc_trailing_blank): Renamed from sc_trailing_space.
8825 All uses changed.
8826 (sc_no_if_have_config_h, sc_require_config_h):
8827 (sc_prohibit_assert_without_use): New rules.
8828 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8829 (sc_dd_max_sym_length): Fix leading spaces in rule.
8830 (sc_system_h_headers): Prefix with @.
8831 (sc_useless_cpp_parens, m4-check): Output line numbers.
8832 (changelog-check): Allow version only in head.
8833 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8834 satisfy new Makefile.maint rule.
8835 * data/glr.c: Likewise.
8836 * data/glr.cc: Likewise.
8837 * data/lalr1.cc: Likewise.
8838 * data/yacc.c: Likewise.
8839 * lib/ebitsetv.c: Likewise.
8840 * lib/lbitset.c: Likewise.
8841 * lib/subpipe.c: Likewise.
8842 * lib/timevar.c: Likewise.
8843 * src/system.h: Likewise.
8844 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8845 * djgpp/Makefile.maint: Add copyright notice.
8846 * djgpp/README.in: Likewise.
8847 * djgpp/config.bat: Likewise.
8848 * djgpp/config.site: Likewise.
8849 * djgpp/config_h.sed: Likewise.
8850 * djgpp/djunpack.bat: Likewise.
8851 * djgpp/config.sed: Fix copyright notice to match standard format.
8852 * djgpp/subpipe.h: Likewise.
8853 * lib/bitsetv-print.c: Likewise.
8854 * lib/bitsetv.c: Likewise.
8855 * lib/subpipe.h: Likewise.
8856 * lib/timevar.c: Likewise.
8857 * lib/timevar.h: Likewise.
8858 * djgpp/subpipe.c: Use standard recipe for config.h.
8859 * lib/abitset.c: Likewise.
8860 * lib/bitset.c: Likewise.
8861 * lib/bitset_stats.c: Likewise.
8862 * lib/bitsetv-print.c: Likewise.
8863 * lib/bitsetv.c: Likewise.
8864 * lib/ebitsetv.c: Likewise.
8865 * lib/get-errno.c: Likewise.
8866 * lib/lbitset.c: Likewise.
8867 * lib/subpipe.c: Likewise.
8868 * lib/timevar.c: Likewise.
8869 * lib/vbitset.c: Likewise.
8870 * tests/local.at: Likewise.
8871 * src/scan-gram.l: Don't include verify.h, since system.h does
8872 that for us.
8873 * .x-sc_require_config_h: New file.
8874 * .x-sc_unmarked_diagnostics: New file.
8875
8876 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8877
8878 Be a bit more systematic about using 'abort'.
8879 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8880 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8881 Put 'default: abort ();' before some other case, to satisfy older
8882 pedantic compilers.
8883 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8884 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8885 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8886 * src/conflicts.c (resolve_sr_conflict): Likewise.
8887 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8888 (get_decision_str, get_orientation_str, get_node_alignment_str):
8889 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8890 (get_linestyle_str, get_arrowstyle_str): Likewise.
8891 * src/conflicts.c (resolve_sr_conflict):
8892 Use a default case rather than one for the one remaining enum
8893 value, to catch invalid enum values as well.
8894 * src/lalr.c (set_goto_map, map_goto):
8895 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8896 * src/nullable.c (nullable_compute, token_definitions_output):
8897 Likewise.
8898 * src/reader.c (packgram, reader): Likewise.
8899 * src/state.c (transitions_to, state_new, state_reduction_find):
8900 Likewise.
8901 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8902 (symbol_pack): Likewise.
8903 * src/tables.c (conflict_row, pack_vector): Likewise.
8904 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8905 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8906 * src/system.h: Don't include <assert.h>.
8907 (assert): New macro.
8908
8909 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8910 (Destructor Decl, Parser Function, Pure Calling):
8911 Describe rules for braces inside C code more carefully.
8912
8913 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8914
8915 Fix some porting glitches found by Nelson H. F. Beebe.
8916 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8917 compilers that don't understand that abort () does not return.
8918 * src/state.c (transitions_to): Likewise.
8919 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8920 that '#include <cstdlib>' works.
8921 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8922 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8923 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8924 for the benefit of some pre-C99 compilers.
8925
8926 * bootstrap: Undo changes to gnulib files that autoreconf made.
8927
8928 Minor fixups to get 'make maintainer-check' to work.
8929 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8930 with the new verify.h implementation.
8931 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8932 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8933 * data/yacc.c (YYUSE): Likewise.
8934 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8935 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8936 * src/parse-gram.y (declaration): Don't pass a string constant
8937 to a function that expects char *, since GCC might complain
8938 about the constant value.
8939 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8940 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8941 before #defining them.
8942 * tests/glr-regression.at
8943 (Incorrectly initialized location for empty right-hand side in GLR):
8944 In yyerror, use the msg arg.
8945 (Corrupted semantic options if user action cuts parse):
8946 (Incorrect lookahead during deterministic GLR):
8947 (Incorrect lookahead during nondeterministic GLR):
8948 Don't name a local var 'index'; it shadows string.h's 'index'.
8949
8950 2006-01-19 Akim Demaille <akim@epita.fr>
8951
8952 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8953 location, not just parts of it.
8954
8955 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8956
8957 * NEWS: Document the fact that multiple %unions are now allowed.
8958 * doc/bison.texinfo (Union Decl): Likewise.
8959 * TODO: This feature is now implemented, so remove it from
8960 the wishlist.
8961
8962 * Makefile.maint: Merge with coreutils Makefile.maint.
8963 (CVS_LIST): Use build-aux version if available.
8964 (VERSION_REGEXP): New macro.
8965 (syntax-check-rules): Add sc_no_if_have_config_h,
8966 sc_prohibit_assert_without_use, sc_require_config_h,
8967 sc_useless_cpp_parens.
8968 (sc_obsolete_symbols): Check for O_NDELAY.
8969 (sc_dd_max_sym_length): Track coreutils.
8970 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8971 (sc_useless_cpp_parens): New rule.
8972 (news-date-check): Look for version or today's date.
8973 (changelog-check): Don't require version number near head.
8974 (copyright-check): Use current year instead of hardwiring 2005.
8975 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8976 (announcement): Add --gpg-key-ID.
8977
8978 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8979 with "file system".
8980
8981 Avoid undefined behavior that addressed just before the start of an
8982 array. Problem reported by twlevo.
8983 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8984 * src/lalr.c (build_relations): Rely on new sentinel.
8985 * src/gram.c (gram_free): Adjust to new sentinel.
8986
8987 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8988
8989 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8990 yylookaheadNeeds. All uses updated.
8991 (yysplitStack): Rename local yynewLookaheadStatuses to
8992 yynewLookaheadNeeds.
8993 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8994 GLR): In comments, change `lookahead status' to `lookahead need'.
8995
8996 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8997
8998 * data/glr.c (yysplitStack): A little stylistic rewrite.
8999
9000 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9001
9002 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9003
9004 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9005
9006 * doc/bison.texinfo: Fix some typos.
9007 (GLR Semantic Actions): New subsection discussing special
9008 considerations because GLR semantic actions might be deferred.
9009 (Actions): Mention look-ahead usage of yylval.
9010 (Actions and Locations): Mention look-ahead usage of yylloc.
9011 (Special Features for Use in Actions): Add YYEOF entry and mention it
9012 in the yychar entry.
9013 In the yychar entry, remove mention of the local yychar case (pure
9014 parser) since this is irrelevant information when writing semantic
9015 actions and since it's already discussed in `Table of Symbols' where
9016 yychar is otherwise described as an external variable.
9017 In the yychar entry, don't call it the `current' look-ahead since it
9018 isn't when semantic actions are deferred.
9019 In the yychar and yyclearin entries, add note about deferred semantic
9020 actions.
9021 Add yylloc and yylval entries discussing look-ahead usage.
9022 (Look-Ahead Tokens): When discussing yychar, don't call it the
9023 `current' look-ahead, and do mention yylval and yylloc.
9024 (Error Recovery): Cross-reference `Action Features' when mentioning
9025 yyclearin.
9026 (Table of Symbols): In the yychar entry, don't call it the `current'
9027 look-ahead.
9028 In the yylloc and yylval entries, mention look-ahead usage.
9029
9030 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9031
9032 * tests/glr-regression.at: Update copyright year to 2006.
9033
9034 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9035
9036 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9037 use during nondeterministic operation to track which stacks have
9038 actually needed the current lookahead.
9039 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9040 Allocate, deallocate, resize, and otherwise shuffle space for
9041 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9042 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9043 appropriately during nondeterministic operation.
9044 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9045 members to store the current lookahead to be used by the deferred
9046 user action.
9047 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9048 from which the RHS is taken. Set the lookahead members of the new
9049 yySemanticOption according to the lookahead status for stack yyk.
9050 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9051 yyaddDeferredAction.
9052 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9053 members of yySemanticOption before invoking yyuserAction, and then set
9054 them back to their current values afterward.
9055 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9056 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9057 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9058 titles for consistency.
9059 (Leaked merged semantic value if user action cuts parse): In order to
9060 suppress lint warnings, use arguments in merge function, and assign
9061 char value < 128 in main.
9062 (Incorrect lookahead during deterministic GLR): New test case.
9063 (Incorrect lookahead during nondeterministic GLR): New test case.
9064
9065 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9066
9067 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9068 !yyvaluep as signal that no semantic value is available to print.
9069 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9070 to print a semantic value.
9071
9072 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9073
9074 * tests/glr-regression.at: For consistency with my newer test cases,
9075 don't thank myself.
9076
9077 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9078
9079 * data/glr.c (yyresolveValue): When merging semantic options, if at
9080 least one user action succeeds but a later one cuts the parse, then
9081 destroy the semantic value before returning rather than leaking it.
9082 (yyresolveStates): If a user action cuts the parse and thus
9083 yyresolveValue fails, ignore the (unset) semantic value rather than
9084 corrupting the yyGLRState, and empty the semantic options list since
9085 the user actions should have called all necessary destructors.
9086 Simplify code with YYCHK.
9087 * tests/glr-regression.at (Corrupted semantic options if user action
9088 cuts parse): New test case.
9089 (Undesirable destructors if user action cuts parse): New test case.
9090 Before applying any of this patch, this test case never actually failed
9091 for me... but only because the corrupted semantic options usually
9092 masked this bug.
9093 (Leaked merged semantic value if user action cuts parse): New test
9094 case.
9095
9096 2006-01-05 Akim Demaille <akim@epita.fr>
9097
9098 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9099
9100 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9101
9102 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9103 _MSC_VER. Problem reported by Cenzato Marco.
9104 (b4_c_function_def): Use it.
9105 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9106 b4_c_modern.
9107 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9108 than rolling our own.
9109
9110 2006-01-04 Akim Demaille <akim@epita.fr>
9111
9112 Also warn about non-used mid-rule values.
9113 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9114 member.
9115 (symbol_list_new): Adjust.
9116 * src/reader.c (symbol_typed_p): New.
9117 (grammar_rule_check): Use it.
9118 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9119 Check its rule.
9120 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9121 Use it.
9122 * tests/actions.at (Exotic Dollars): Adjust.
9123
9124 2006-01-04 Akim Demaille <akim@epita.fr>
9125
9126 * src/reader.c (grammar_midrule_action): If $$ is set in a
9127 mid-rule, move the `used' bit to its lhs.
9128 * tests/input.at (Unused values): New.
9129 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9130
9131 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9132
9133 * doc/bison.texinfo (Bison Options): Say more accurately what
9134 --yacc does.
9135 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9136 about declarations in the grammar when in Yacc mode, as POSIX does
9137 not require a diagnostic when the grammar uses extensions.
9138
9139 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9140
9141 Warn about dubious constructions like "%token T T".
9142 Reported by twlevo.
9143 * src/symtab.h (struct symbol.declared): New member.
9144 * src/symtab.c (symbol_new): Initialize it to false.
9145 (symbol_class_set): New arg DECLARING, specifying whether
9146 this is a declaration that we want to warn about, if there
9147 is more than one of them. All uses changed.
9148
9149 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9150 Allow multiple %union directives, whose contents concatenate.
9151 * src/parse-gram.y (grammar_declaration): Likewise.
9152 Use muscle_code_grow, so that we don't need stype_line any more.
9153 All uses changed.
9154
9155 * src/muscle_tab.c (muscle_grow): Fix comment.
9156
9157 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9158 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9159 Update copyright year to 2006.
9160
9161 2006-01-03 Akim Demaille <akim@epita.fr>
9162
9163 Have glr.cc pass (some of) the calc.at tests.
9164 * data/glr.cc (b4_parse_param_orig): New.
9165 (b4_parse_param): Improve its definition, and bound it more
9166 clearly in the skeleton.
9167 (b4_epilogue): Append, instead of prepending, in order to keep
9168 #line consistency.
9169 Simplify the generation of auxiliary functions: locations and
9170 purity are mandated.
9171 (b4_global_tokens_and_yystype): Honor it.
9172 * data/location.cc (c++.m4): Don't include it.
9173 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9174 and AT_SKEL_CC_IF.
9175 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9176 AT_LALR1_CC_IF.
9177 Be sure to initialize the first position's filename.
9178 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9179 mandated anyway.
9180 (AT_CHECK_CALC_GLR_CC): New.
9181 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9182
9183 2006-01-02 Akim Demaille <akim@epita.fr>
9184
9185 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9186 c.m4.
9187 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9188 * data/glr.cc: Do not include stack.hh.
9189
9190 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9191
9192 * data/glr.c: Reformat whitespace with tabs.
9193 (b4_lpure_formals): Remove this unused m4 macro.
9194 * tests/cxx-type.at: Reformat whitespace with tabs.
9195 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9196 since it's a member. Rename type to isNterm for clarity.
9197
9198 2005-12-29 Akim <akim@sulaco.local>
9199
9200 Let glr.cc catch up with symbol_value_print.
9201 * data/glr.cc (b4_yysymprint_generate): Replace by...
9202 (b4_yy_symbol_print_generate): this.
9203 (yy_symbol_print, yy_symbol_value_print): Declare them.
9204
9205 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9206
9207 * src/location.h (boundary): Note that a line or column equal
9208 to INT_MAX indicates an overflow.
9209 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9210 (rule_length_overflow, increment_rule_length, add_column_width):
9211 New functions.
9212 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9213 (<SC_BRACED_CODE>"}"):
9214 Use increment_rule_length rather than incrementing it by hand.
9215 (adjust_location, handle_syncline): Diagnose overflow.
9216 (handle_action_dollar, handle_action_at):
9217 Fix bug with monstrosities like $-2147483648.
9218 Remove now-unnecessary checks.
9219 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9220 (convert_ucn_to_byte): Verify assumptions.
9221 (handle_syncline): New arg LOC. All callers changed.
9222 Don't store through a value derived from char const * pointer.
9223
9224 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9225 GCC warnings.
9226
9227 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9228
9229 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9230 Remove unnecessary forward static decls.
9231
9232 2005-12-27 Akim Demaille <akim@epita.fr>
9233
9234 * src/reader.c (grammar_current_rule_check): Also check that $$
9235 is used.
9236 Take the rule to check as argument, hence rename as...
9237 (grammar_rule_check): this.
9238 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9239 Rename as...
9240 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9241 (grammar_midrule_action, grammar_symbol_append): Now static.
9242 * tests/torture.at (input): Don't rely on the default action
9243 being always performed.
9244 * tests/calc.at: "Set" $$ even when the action is "cut" with
9245 YYERROR or other.
9246 * tests/actions.at (Exotic Dollars): Instead of using unused
9247 values, check that the warning is issued.
9248
9249 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9250
9251 * NEWS: Improve wording for unused-value warnings.
9252
9253 2005-12-22 Akim Demaille <akim@epita.fr>
9254
9255 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9256 (b4_yysymprint_generate): Rename as...
9257 (b4_yy_symbol_print_generate): this.
9258 Generate yy_symbol_print instead of yysymprint.
9259 Generate also yy_symbol_value_print, and use it.
9260
9261 2005-12-22 Akim Demaille <akim@epita.fr>
9262
9263 * NEWS: Warn about unused values.
9264 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9265 a `used' member.
9266 (symbol_list_n_get, symbol_list_n_used_set): New.
9267 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9268 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9269 * src/reader.c (grammar_current_rule_check): Check that values are
9270 used.
9271 * src/symtab.c (symbol_print): Accept 0.
9272 * tests/existing.at: Remove the type information.
9273 Empty the actions.
9274 Remove useless actions (beware of mid-rule actions: perl -000
9275 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9276 * tests/actions.at (Exotic Dollars): Use unused values.
9277 * tests/calc.at: Likewise.
9278 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9279 Likewise.
9280
9281 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9282 rule_useful_p.
9283
9284 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9285
9286 Undo 2005-12-01 tentative license wording change. The wording is
9287 still being reviewed by the lawyers, and we don't want to wait for
9288 them before publishing a test release. For now, revert to the
9289 previous wording.
9290 * NEWS: Undo 2005-12-01 change.
9291 * data/glr.c: Revert to previous license wording.
9292 * data/glr.cc: Likewise.
9293 * data/lalr1.cc: Likewise.
9294 * data/location.cc: Likewise.
9295 * data/yacc.c: Likewise.
9296
9297 * NEWS: Reword %destructor vs YYABORT etc.
9298 * data/glr.c: Use American spacing, for consistency.
9299 * data/glr.cc: Likewise.
9300 * data/lalr1.cc: Likewise.
9301 * data/yacc.c: Likewise.
9302 * data/yacc.c: Reformat comments slightly.
9303 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9304 for consistency. Fix some spelling errors and reword recently-included
9305 text slightly.
9306 * tests/cxx-type.at: Cast results of malloc, for C++.
9307
9308 2005-12-21 Joel E. Denny <address@hidden>
9309
9310 * tests/cxx-type.at: Construct a tree, count the parents of shared
9311 nodes, and free each node once and only once. Previously, the memory
9312 for semantic values was leaked instead.
9313
9314 2005-12-21 Joel E. Denny <address@hidden>
9315
9316 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9317 (yylval, yylloc): If pure, #define to yystackp->yyval and
9318 yystackp->yyloc similar to yychar and yynerrs.
9319 (yyparse): If pure, remove local yylval and yylloc. Add local
9320 yystackp to accommodate pure definitions of yylval and yylloc.
9321 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9322 yylvalp and yyllocp to &yylval and &yylloc.
9323 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9324 namespace. Previously, nerrs and char were missing, but lval and lloc
9325 weren't necessary.
9326 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9327 yylvalp and yyllocp parameters since, if pure, these are now always
9328 accessible through yystackp. If not pure, they are still accessible
9329 globally.
9330 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9331 `if (YYID (N))' to pacify lint.
9332
9333 2005-12-21 Akim Demaille <akim@epita.fr>
9334
9335 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9336 destroy the RHS symbols of a rule.
9337 * data/yacc.c (yylen): Initialize to 0.
9338 Keep its value to the number of items to possibly shift.
9339 In particular, a regular successful parse that ends on YYFINAL by
9340 a (internal) YYACCEPT must not have yylen != 0.
9341 (yyerrorlab, yyreturn): Pop the RHS.
9342 Reorder a bit to emphasize the `shifting' bits of code.
9343 (YYPOPSTACK): Now accept a number of items to pop.
9344 * data/lalr1.cc: Likewise.
9345 * data/glr.c: Formatting changes.
9346 Use goto instead of fall through.
9347 * doc/bison.texinfo (Destructor Decl): Complete.
9348
9349 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9350
9351 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9352 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9353 * djgpp/config.bat: Replace every occurence of the file name
9354 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9355 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9356 * djgpp/config.sed: Replace every occurence of the file name
9357 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9358 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9359 * djgpp/djunpack.bat: DJGPP specific file.
9360 * djgpp/fnchange.lst: DJGPP specific file.
9361 * djgpp/README.in: Add new information about how to unpack the bison
9362 source on MSDOS and other systems which have 8.3 file name restrictions
9363 using djunpack.bat and fnchange.lst.
9364
9365 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9366
9367 * bootstrap (build_cvs_prefix): Remove; unused.
9368 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9369 when getting gnulib.
9370
9371 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9372
9373 * data/glr.c: Reorder typedef declarations for structs to match order
9374 of struct declarations.
9375 Rename yystack everywhere to yystackp except in yyparse where it's not
9376 a pointer.
9377 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9378 consistency.
9379 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9380 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9381 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9382 lint.
9383
9384 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9385
9386 * tests/sets.at (Accept): Fix typos in regular expression used to
9387 sed out the final state number.
9388
9389 Work around portability problem on Solaris 10: flex-generated
9390 files include <stdio.h> before <config.h>, which messes up
9391 because the latter defines __EXTENSIONS__. Address the problem
9392 by creating two new little files that include <config.h> first,
9393 then include the flex-generated files. Rewrite everyone else
9394 to include <config.h> first, as well.
9395 * lib/timevar.c: Always include "config.h".
9396 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9397 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9398 (EXTRA_bison_SOURCES): New macro.
9399 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9400 * src/system.h: Don't include config.h.
9401 * src/LR0.c: Include <config.h> first.
9402 * src/assoc.c: Likewise.
9403 * src/closure.c: Likewise.
9404 * src/complain.c: Likewise.
9405 * src/conflicts.c: Likewise.
9406 * src/derives.c: Likewise.
9407 * src/files.c: Likewise.
9408 * src/getargs.c: Likewise.
9409 * src/gram.c: Likewise.
9410 * src/lalr.c: Likewise.
9411 * src/location.c: Likewise.
9412 * src/main.c: Likewise.
9413 * src/muscle_tab.c: Likewise.
9414 * src/nullable.c: Likewise.
9415 * src/output.c: Likewise.
9416 * src/parse-gram.y: Likewise.
9417 * src/print.c: Likewise.
9418 * src/print_graph.c: Likewise.
9419 * src/reader.c: Likewise.
9420 * src/reduce.c: Likewise.
9421 * src/relation.c: Likewise.
9422 * src/state.c: Likewise.
9423 * src/symlist.c: Likewise.
9424 * src/symtab.c: Likewise.
9425 * src/tables.c: Likewise.
9426 * src/uniqstr.c: Likewise.
9427 * src/vcg.c: Likewise.
9428
9429 * src/parse-gram.y: Fix minor problems uncovered by lint.
9430 (current_lhs, current_lhs_location): Now static.
9431 (current_assoc): Remove unused variable.
9432
9433 Cleanups so that Bison-generated parsers have less lint.
9434 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9435 Prepend /*ARGSUSED*/, for lint's sake.
9436 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9437 definition if 'lint' is defined.
9438 (YYID): New macro (or function, if lint).
9439 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9440 * data/yacc.c: Likewise.
9441 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9442 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9443 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9444 is C++ only.
9445 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9446 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9447 Use YYID(0) rather than 0, for lint.
9448 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9449 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9450
9451 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9452
9453 * tests/glr-regression.at
9454 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9455 Close memory leak reported by twlevo.
9456
9457 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9458
9459 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9460 all stacks.
9461 (yyparse): Iterate another stack in order to call user destructors.
9462 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9463 New test case.
9464 (Duplicated user destructor for lookahead): This test now is expected
9465 to succeed.
9466
9467 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9468
9469 * NEWS: Document the following change.
9470 * data/yacc.c: Say "parser skeleton" rather than "file", since
9471 it's no longer just a file.
9472 * data/glr.c: Grant a special exception for C GLR parsers, that
9473 reads like the already-existing exception for C LALR(1) parsers.
9474 * data/glr.cc: Likewise.
9475 * data/lalr1.cc: Likewise.
9476 * data/location.cc: Likewise.
9477 * data/yacc.c: Reword the "written by" statement to clarify that
9478 it was the parser skeleton, not the entire output file.
9479 * data/glr.c: Written by Paul Hilfinger.
9480 * data/glr.cc: Written by Akim Demaille.
9481 * data/lalr1.cc: Likewise.
9482
9483 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9484
9485 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9486 Fix typos in previous change that broke 'make check'.
9487 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9488 supported in C.
9489 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9490 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9491 We can revert this once things settle down.
9492
9493 * src/conflicts.c (conflicts_print): Don't print file name twice
9494 when %expect fails because there were no conflicts.
9495 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9496 change.
9497 * tests/conflicts.at (%expect not enough, %expect too much):
9498 (%expect with reduce conflicts): Adjust to new behavior.
9499
9500 2005-11-18 Akim Demaille <akim@epita.fr>
9501
9502 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9503 errors.
9504 * NEWS: Document this.
9505 * doc/bison.texinfo (Expect Decl): Likewise.
9506
9507 2005-11-16 Akim Demaille <akim@epita.fr>
9508
9509 Generalize the display of semantic values and locations in traces.
9510 * data/glr.c (yy_reduce_print): Fix indices (again).
9511 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9512 literal integers.
9513 * data/lalr1.cc (yyreduce_print): Rename as...
9514 (yy_reduce_print): this.
9515 Display values and locations.
9516 * data/yacc.c (yy_reduce_print): Likewise.
9517 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9518 (yysymprint): Move higher to be visible from yy_reduce_print).
9519 (yyparse): Adjust.
9520 * tests/calc.at: Adjust the expected length of the traces.
9521
9522 2005-11-14 Akim Demaille <akim@epita.fr>
9523
9524 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9525 from 1 to N, while values and location start at 0.
9526 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9527
9528 2005-11-14 Akim Demaille <akim@epita.fr>
9529
9530 * data/glr.c (yy_reduce_print): Fix the $ number.
9531
9532 2005-11-14 Akim Demaille <akim@epita.fr>
9533
9534 "Use" parse parameters.
9535 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9536 * data/glr.c, data/glr.cc: Use them.
9537 * data/glr.c (YYUSE): Have a C++ definition that supports
9538 non-pointer types.
9539
9540 2005-11-14 Akim Demaille <akim@epita.fr>
9541
9542 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9543
9544 2005-11-14 Akim Demaille <akim@epita.fr>
9545
9546 * data/glr.cc: New.
9547 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9548
9549 2005-11-12 Akim Demaille <akim@epita.fr>
9550
9551 Let position and location be PODs.
9552 * data/location.cc (position::initialize, location::initialize): New.
9553 (position::position, location::location): Define only if
9554 b4_location_constructors is defined.
9555 * data/lalr1.cc (b4_location_constructors): Define it for backward
9556 compatibility.
9557 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9558
9559 2005-11-12 Akim Demaille <akim@epita.fr>
9560
9561 * data/lalr1.cc: Move the body of the ctor and dtor into the
9562 parser file (instead of the header).
9563 Wrap the implementations in a "namespace yy".
9564
9565 2005-11-12 Akim Demaille <akim@epita.fr>
9566
9567 Have glr.c include its header file when created.
9568 * data/glr.c (b4_shared_declarations): New.
9569 Output them verbatim in the parser if !%defines, otherwise
9570 output then in the header file, and include it instead.
9571
9572 2005-11-11 Akim Demaille <akim@epita.fr>
9573
9574 * data/glr.c: Comment changes.
9575
9576 2005-11-11 Akim Demaille <akim@epita.fr>
9577
9578 When yydebug, report semantic and location values for reductions.
9579 * data/glr.c (yy_reduce_print): Report the semantic values and the
9580 locations.
9581 (YY_REDUCE_PRINT): Adjust.
9582 (yyglrReduce): Use them.
9583 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9584 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9585 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9586 traces.
9587
9588 2005-11-10 Akim Demaille <akim@epita.fr>
9589
9590 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9591 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9592 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9593
9594 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9595
9596 * m4/cxx.m4, examples/Makefile.am: Don't build
9597 examples/calc++ if no C++ compiler is available. (trivial change)
9598
9599 2005-11-09 Akim Demaille <akim@epita.fr>
9600
9601 * src/scan-skel.l: Use a couple of asserts.
9602
9603 2005-11-03 Akim Demaille <akim@epita.fr>
9604
9605 In some (weird) cases, the final state number is incorrect.
9606 Reported by Alexandre Duret-Lutz.
9607 * src/LR0.c (state_list_append): Remove the computation of
9608 final_state.
9609 (save_reductions): Do it here.
9610 (get_state): Alpha conversion.
9611 (generate_states): Use a for loop.
9612 * src/gram.h (item_number_is_rule_number)
9613 (item_number_is_symbol_number): New.
9614 * src/state.c: Use assert.
9615 * src/system.h: Include assert.h.
9616 * tests/sets.at (Accept): New.
9617
9618 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9619
9620 * data/glr.c (yyfill): Adjust comment.
9621 (yyresolveAction): Initialize default location properly
9622 for empty right-hand sides.
9623 (yydoAction): Ditto.
9624 Add comment explaining apparently dead code.
9625 * tests/glr-regression.at
9626 (Incorrectly initialized location for empty right-hand side in GLR):
9627 New test.
9628
9629 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9630
9631 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9632 gnulib when interrupted. This fixes some race conditions and
9633 works around some portability problems (one noted by Paul
9634 Hilfinger).
9635
9636 2005-10-22 Akim <akim@epita.fr>
9637
9638 * Makefile.cfg: Adjust to config -> build-aux.
9639 Reported by twledo.
9640
9641 2005-10-21 Akim Demaille <akim@epita.fr>
9642
9643 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9644 the %parse-params.
9645 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9646 * data/yacc.c (b4_Pure_if): Rename as...
9647 (b4_yacc_pure_if): this.
9648 (YY_SYMBOL_PRINT, yyparse): Adjust.
9649 * doc/bison.texinfo: Formatting changes.
9650
9651 2005-10-21 Akim Demaille <akim@epita.fr>
9652
9653 Finish the transition config -> build-aux.
9654 * configure.ac, Makefile.am: Use build-aux.
9655 * config/prev-version, config/announce-gen, config/Makefile.am:
9656 Move to...
9657 * build-aux/prev-version, build-aux/announce-gen,
9658 * build-aux/Makefile.am: here.
9659
9660 2005-10-14 Akim Demaille <akim@epita.fr>
9661
9662 * examples/calc++/test: Use set -x only when VERBOSE.
9663
9664 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9665
9666 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9667 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9668
9669 2005-10-13 Akim Demaille <akim@epita.fr>
9670
9671 * src/scan-skel.l: Output the base name parts of the parser and
9672 header file names.
9673 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9674 additional checks.
9675 Use this to exercise C++ outputs in subdirs.
9676 Reported by Oleg Smolsky.
9677
9678 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9679
9680 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9681 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9682 Problem reported by John P. Hartmann.
9683 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9684 already defined it.
9685
9686 2005-10-12 Akim Demaille <akim@epita.fr>
9687
9688 * src/parse-gram.y (version_check): Exit 63 to please missing
9689 (stands for "version mismatch).
9690 * tests/input.at, doc/bison.texinfo: Adjust.
9691
9692 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9693
9694 Work around portability problems with Visual Age C compiler
9695 (xlc and xlC_r) reported by John P. Hartmann.
9696 * data/location.cc (initial_column, initial_line): Remove.
9697 All uses replaced by 0 and 1.
9698 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9699 that xlc complains about.
9700 * src/scan-skel.l (skel_wrap): Likewise.
9701 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9702 as __STDC__.
9703 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9704 __STDC_VERSION__. Use it everywhere instead of looking at
9705 __STDC__ and __cplusplus.
9706
9707 2005-10-10 Akim Demaille <akim@epita.fr>
9708
9709 * examples/calc++/test: Be quiet unless VERBOSE.
9710
9711 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9712
9713 * data/c.m4 (yydestruct, yysymprint):
9714 Use YYUSE instead of casting to void.
9715 * data/glr.c (YYUSE): New macro.
9716 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9717 Use it instead of rolling our own.
9718 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9719 (YYCHK1):
9720 Use /*CONSTCOND*/ to suppress lint warnings.
9721 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9722 (YY_STACK_PRINT): Use 'false' not '0'.
9723 (YYUSE): New macro.
9724 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9725 * data/yacc.c (YYUSE): New macro.
9726 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9727 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9728 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9729
9730
9731 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9732 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9733
9734 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9735
9736 Undo the parts of the unlocked-I/O change that substituted
9737 putc or puts for printf. This might hurt performance a bit,
9738 but some people prefer the printf style.
9739 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9740 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9741 All uses replaced by YYFPRINTF and YYDPRINTF.
9742 * data/yacc.c: Likewise.
9743 * lib/bitset.c (bitset_print): Likewise.
9744 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9745 putc and puts.
9746 * lib/lbitset.c (debug_lbitset): Likewise.
9747 * src/closure.c (print_firsts, print_fderives): Likewise.
9748 * src/gram.c (grammar_dump): Likewise.
9749 * src/lalr.c (look_ahead_tokens_print): Likewise.
9750 * src/output.c (escaped_output): Likewise.
9751 (user_actions_output): Break apart two printfs.
9752 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9753 * src/reduce.c (reduce_print): Likewise.
9754 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9755 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9756
9757 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9758 Use assignments rather than casts-to-void to suppress
9759 unused-variable warnings. This pacifies 'lint'.
9760 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9761 unused-variable warnings.
9762
9763 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9764
9765 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9766
9767 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9768
9769 Use unlocked I/O for a minor performance improvement on hosts like
9770 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9771 is to use the gnlib unlocked-io module, and to prefer putc and
9772 puts to printf when either will work (since the latter doesn't
9773 come in an unlocked flavor).
9774 * bootstrap (gnulib_modules): Add unlocked-io.
9775 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9776 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9777 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9778 and similarly for puts and putc and printf.
9779 * data/yacc.c: Likewise.
9780 * lib/bitset.c (bitset_print): Likewise.
9781 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9782 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9783 to printf.
9784 * lib/lbitset.c (debug_lbitset): Likewise.
9785 * src/closure.c (print_firsts, print_fderives): Likewise.
9786 * src/gram.c (grammar_dump): Likewise.
9787 * src/lalr.c (look_ahead_tokens_print): Likewise.
9788 * src/output.c (escaped_output): Likewise.
9789 (user_actions_output): Coalesce two printfs.
9790 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9791 * src/reduce.c (reduce_print): Likewise.
9792 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9793 * src/system.h: Include unlocked-io.h rather than stdio.h.
9794
9795 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9796 this confuses xgettext.
9797
9798 2005-10-02 Akim Demaille <akim@epita.fr>
9799
9800 * bootstrap (gnulib_modules): Add strverscmp.
9801 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9802 * m4/.cvsignore: Add strverscmp.m4.
9803 * src/parse-gram.y (%require): New token, new rule.
9804 (version_check): New.
9805 * src/scan-gram.l (%require): Adjust.
9806 * tests/input.at (AT_REQUIRE): New.
9807 Use it.
9808 * doc/bison.texinfo (Require Decl): New.
9809 (Calc++ Parser): Use %require.
9810
9811 2005-10-02 Akim Demaille <akim@epita.fr>
9812
9813 * data/location.cc: New.
9814
9815 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9816 Akim Demaille <akim@epita.fr>
9817
9818 Make sure -odir/foo.cc creates dir/location.hh etc.
9819 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9820 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9821 (spec_defines_file): Now const.
9822 (dir_prefix): New.
9823 (short_base_name): Remove.
9824 * src/files.c: Adjust.
9825 (dirname.h): Include.
9826 (base_name): Don't prototype it.
9827 (finput): Remove, duplicates gram_in.
9828 (full_base_name, short_base_name): Replace by...
9829 (all_but_ext, all_but_tab_ext): these.
9830 (compute_base_names): Rename as...
9831 (compute_file_name_parts): this.
9832 Update to compute the new variables, including dir_prefix.
9833 Adjust dependencies.
9834 * src/output.c (prepare): Output them.
9835 * src/reader.c: Adjust to use gram_in, not finput.
9836 * src/scan-skel.l (@dir_prefix@): New.
9837
9838 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9839
9840 * lib/subpipe.c: New function end_of_output_subpipe() added
9841 to allow support for non-posix systems. This is a no-op function
9842 for posix systems.
9843
9844 * lib/subpipe.h: New function end_of_output_subpipe() added
9845 to allow support for non-posix systems. This is a no-op function
9846 for posix systems.
9847
9848 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9849 handle the lack of pipe/fork functionality on non-posix systems.
9850
9851 * djgpp/Makefile.maint: DJGPP specific file.
9852
9853 * djgpp/README.in: DJGPP specific file.
9854
9855 * djgpp/config.bat: DJGPP specific configuration file.
9856
9857 * djgpp/config.sed: DJGPP specific configuration file.
9858
9859 * djgpp/config.site: DJGPP specific configuration file.
9860
9861 * djgpp/config_h.sed: DJGPP specific configuration file.
9862
9863 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9864
9865 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9866
9867 2005-10-02 Akim Demaille <akim@epita.fr>
9868
9869 * data/location.cc: New, extract from...
9870 * data/lalr1.cc: here.
9871 (location.hh): Include it after the user prologue, in case the
9872 filename type is defined by the user.
9873 Forward declation location and position before the pre-prologue.
9874 (yyresult_): Rename as...
9875 (yyresult): this, it's a local variable, not an attribute.
9876 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9877
9878 2005-10-01 Akim Demaille <akim@epita.fr>
9879
9880 * examples/extexi: Restore the #line generation.
9881
9882 2005-09-30 Akim Demaille <akim@epita.fr>,
9883 Alexandre Duret-Lutz <adl@gnu.org>
9884
9885 Move the token type and YYSTYPE in the parser class.
9886 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9887 (parser::token): New, from the moved free definition of tokens.
9888 (parser::semantic_value): Now a full definition instead of an
9889 indirection to YYSTYPE.
9890 (b4_post_prologue): No longer included in the header file, but
9891 in the implementation file.
9892 * doc/bison.texi (C+ Language Interface): Update.
9893 * src/parse-gram.y: Support unary %define.
9894 * tests/actions.at: Define global_tokens_and_yystype for backward
9895 compatibility until we update the tests.
9896 * tests/calc.at: Idem.
9897 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9898 to simplify the code.
9899
9900 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9901
9902 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9903 Ah, the good old days! Problem reported by Peter Klein.
9904 * bootstrap (gnulib_modules): Add strerror, strtoul.
9905 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9906 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9907
9908 2005-09-29 Akim Demaille <akim@epita.fr>
9909
9910 * data/c.m4 (b4_error_verbose_if): New.
9911 * data/lalr1.cc: Use it.
9912 (YYERROR_VERBOSE_IF): Remove.
9913 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9914 parser members, replaced by...
9915 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9916 local variables.
9917 (yysyntax_error_): Takes the state number as argument.
9918 (yyreduce_print_): Use the argument yyrule, not the former
9919 attribute yyn_.
9920
9921 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9922
9923 * bootstrap (gnulib_modules): Add verify.
9924 * lib/.cvsignore: Add verify.h.
9925 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9926 * src/system.h (verify): Remove.
9927 Include verify.h instead.
9928 * src/tables.c (tables_generate): Use new API for 'verify'.
9929
9930 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9931
9932 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9933 local variables whose names begin with 'yy'.
9934 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9935 Trivial changes from Joel E. Denny.
9936
9937 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9938 it itself.
9939 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9940 don't use alloca any more.
9941
9942 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9943 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9944 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9945 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9946 to match yacc.c, to test more hosts.
9947
9948 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9949
9950 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9951 doesn't affect behavior.
9952 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9953 Solaris, AIX, MSC.
9954 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9955 This works a bit better with glibc, if user code has already included
9956 stdlib.h.
9957 * doc/bison.texinfo (Bison Parser): Document that users can't
9958 arbitrarily use malloc and free for other purposes. Document
9959 that <alloca.h> and <malloc.h> might be included.
9960 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9961 user must declare alloca.
9962
9963 * HACKING (release): Forwarn the Translation Project about
9964 stable releses.
9965
9966 2005-09-20 Akim Demaille <akim@epita.fr>
9967
9968 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9969
9970 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9971
9972 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9973 (YYSTACK_ALLOC_MAXIMUM): Use it.
9974 (yysyntax_error): New function.
9975 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9976 multiple syntax errors are reported, and alloca is being used.
9977 Instead, reallocate buffers twice as big each time, so that
9978 we waste at most half the allocated memory. Start with a small
9979 (128-byte) buffer that will suffice in most cases anyway.
9980 Use yysyntax_error to do most of the work.
9981
9982 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9983 yynerrs is the number of errors reported, not the number of
9984 errors encountered.
9985
9986 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9987 Mark it as expected to fail.
9988 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9989 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9990 Don't start user-code symbols with "yy", to avoid name space problems.
9991
9992 2005-09-19 Akim Demaille <akim@epita.fr>
9993
9994 Remove the traits, failed experiment.
9995 It never proved useful, and anyway because of the current
9996 definition, it was not possible to have several specialization of
9997 this traits, making it useless.
9998 * data/lalr1.cc (yy:traits): Remove.
9999 Inline its definitions in the parser class.
10000
10001 2005-09-19 Akim Demaille <akim@epita.fr>
10002
10003 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10004 least Mac OSX with a /usr/local install of gettext.
10005
10006 2005-09-19 Akim Demaille <akim@epita.fr>
10007
10008 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10009 and yytoken for similarity with the other skeletons.
10010
10011 2005-09-19 Akim Demaille <akim@epita.fr>
10012
10013 * NEWS, configure.ac: update version number to 2.1a.
10014
10015 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10016
10017 * NEWS: Version 2.1.
10018
10019 * NEWS: Remove notice of yytname change, since it was never in an
10020 official release.
10021 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10022 diagnostic.
10023 * src/output.c (prepare): Likewise.
10024 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10025 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10026 is not defined. This is an awful hack, but it's enough for now.
10027 All callers changed.
10028 * tests/glr-regression-at (make_value): Args are const pointers now,
10029 to avoid GCC warning.
10030 (Duplicated user destructor for lookahead): New test. Currently
10031 skipped. It fails on my host but I'm not sure it'll always fail.
10032
10033 2005-09-16 Akim Demaille <akim@epita.fr>
10034
10035 * src/symtab.h (struct symbol): Declare the printer and destructor
10036 as const, to avoid accidental calls to free.
10037 (symbol_destructor_set, symbol_printer_set): Adjust.
10038 * src/symtab.c: Adjust.
10039
10040 2005-09-16 Akim Demaille <akim@epita.fr>
10041
10042 * data/c.m4 (b4_token_enums): New.
10043 (b4_token_defines): Rename as...
10044 (b4_token_enums_defines): this.
10045 (b4_token_defines): New, output only the #defines.
10046 * data/yacc.c, data/glr.c: Adjust.
10047 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10048 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10049 as default values.
10050
10051 2005-09-16 Akim Demaille <akim@epita.fr>
10052
10053 * data/lalr1.cc (yylex_): Remove, inline its code.
10054 (yyreport_syntax_error_): Remove, replaced by...
10055 (yysyntax_error_): this which returns a string and leaves to the
10056 caller the call to the users' error function.
10057 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10058 Move from members of the parser object...
10059 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10060 to local variables of the parse function.
10061
10062 2005-09-16 Akim Demaille <akim@epita.fr>
10063
10064 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10065 since it's in Bison's name space.
10066
10067 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10068
10069 * data/glr.c (yyresolveValue): Add default case to pacify
10070 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10071
10072 * NEWS: Document when yyparse started to return 2.
10073 * doc/bison.texinfo (Parser Function): Document when yyparse
10074 returns 2.
10075
10076 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10077 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10078 changed.
10079 (class position): file_name -> filename (reverting). All uses changed.
10080
10081 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10082
10083 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10084 do anything if $@ exists. This reverts part of the 2005-07-07
10085 patch.
10086
10087 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10088
10089 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10090 contains obsolete information and isn't worth distributing as a
10091 separate file anyway.
10092 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10093 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10094 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10095 (yyparse): Abort if user code uses longjmp to throw an unexpected
10096 value.
10097
10098 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10099
10100 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10101 Suggested by twlevo@xs4all.nl.
10102
10103 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10104 This avoids a diagnostic from gcc -Wswitch-enum.
10105 Problem reported by twlevo@xs4all.nl.
10106
10107 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10108 standards. Use "file name" or "file" or "name", depending on
10109 the context.
10110 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10111 not to hack/foo.tab.c.
10112 (Calc++ Top Level): 2nd arg of main is not const.
10113 * data/glr.c: b4_filename -> b4_file_name.
10114 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10115 All uses changed.
10116 (class position): filename -> file_name. All uses changed.
10117 * data/yacc.c: b4_filename -> b4_file_name.
10118 * lib/bitset.h: filename -> file_name in local vars.
10119 * lib/bitset_stats.c: Likewise.
10120 * src/files.c: Likewise.
10121 * src/scan-skel.l ("@output ".*\n): Likewise.
10122 * src/files.c (file_name_split): Renamed from filename_split.
10123 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10124
10125 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10126
10127 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10128 to accommodate latest gnulib.
10129
10130 * tests/glr-regression.at (Duplicate representation of merged trees):
10131 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10132
10133 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10134 needed.
10135
10136 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10137
10138 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10139 All uses changed. Invoke user destructor after an error during a
10140 split parse (trivial change from Joel E. Denny).
10141
10142 * tests/glr-regression.at
10143 (User destructor after an error during a split parse): New test case.
10144 Problem reported by Joel E. Denny in:
10145 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10146
10147 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10148
10149 * README-cvs: Give URLs for recommended tools.
10150 Mention Gzip version problem, and bootstrapping issues.
10151 Remove troubleshooting section, as it's somewhat obsolete.
10152
10153 * bootstrap (no_cache): New var, to accommodate different wget
10154 variants. Use it instead of '-C off'. Problem reported by
10155 twlevo@xs4all.nl.
10156
10157 * data/glr.c (yydestroyStackItem): New function.
10158 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10159 debugging information. Problem reported by Joel E. Denny.
10160
10161 2005-08-25 Akim Demaille <akim@epita.fr>
10162
10163 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10164
10165 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10166
10167 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10168 Don't invoke destructor on unresolved entries.
10169 * tests/glr-regression.at
10170 (User destructor for unresolved GLR semantic value): New test case.
10171 Problem reported by Joel E. Denny in:
10172 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10173
10174 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10175
10176 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10177 Add strnlen.c.
10178 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10179 lib-prefix.m4, po.m4.
10180
10181 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10182 in yydestruct diagnostic, since it might not be an error.
10183 Problem reported by Joel Denny near end of
10184 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10185 * data/lalr1.cc (yyerturn): Likewise.
10186 * data/yacc.c (yyreturn): Likewise.
10187 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10188
10189 * src/files.c: Remove obsolete FIXME comment.
10190
10191 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10192 with the other templates, and to fix bogus run-on messages such
10193 as the one reported at the end of
10194 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10195 All callers changed to avoid the newline.
10196 (yyprocessOneStack): Output two lines rather than one, to accommodate
10197 the above change. This changes the debug output format slightly.
10198
10199 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10200 reported by Joel E. Denny in
10201 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10202 (trivial change).
10203 * tests/glr-regression.at (Duplicate representation of merged trees):
10204 New test, from Joel E. Denny in:
10205 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10206 * THANKS: Add Joel E. Denny.
10207
10208 * configure.ac (AC_INIT): Bump to 2.0c.
10209
10210 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10211
10212 * NEWS: Version 2.0b.
10213
10214 * Makefile.am (SUBDIRS): Put examples before tests, so that
10215 "make check" doesn't finish with "All 1 tests passed".
10216
10217 * tests/regression.at (Token definitions): Don't rely on
10218 AT_PARSER_CHECK for data that contains backslashes. It currently
10219 uses 'echo', and 'echo' isn't portable if its argument contains
10220 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10221 that the byte '\0xff' is not printable in the C locale; it is,
10222 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10223 not printable, so use '\0x81' to test.
10224
10225 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10226 version of GCC, since the macro is used with non-GCC compilers.
10227
10228 Fix core dump reported by Pablo De Napoli in
10229 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10230 * tests/regression.at (Invalid inputs with {}): New test.
10231 * src/parse-gram.y (token_name): Translate type before using
10232 it as an index.
10233
10234 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10235 the user's name space. All uses changed to __attribute__
10236 ((__unused__)).
10237 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10238 Add __attribute__ ((__noreturn__)).
10239
10240 * etc/clcommit: Remove. We weren't using it, and it failed
10241 "make maintainer-distcheck".
10242 * Makefile.maint: Merge from coreutils.
10243 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10244 (syntax-check-rules): Change list of rules as described below.
10245 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10246 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10247 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10248 (sc_trailing_space): New rules.
10249 (sc_xalloc_h_in_src): Remove.
10250 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10251 (sc_space_tab, sc_error_exit_success, sc_changelog):
10252 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10253 (makefile-check, po-check, author_mark_check):
10254 (makefile_path_separator_check, copyright-check):
10255 Use grep -n, to make it easier to find violations.
10256 Use CVS_LIST and CVS_LIST_EXCEPT.
10257 (header_regexp, h_re): Remove.
10258 (dd_c): New macro.
10259 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10260 (my-distcheck): Use more-modern GCC flags.
10261 (signatures, %.asc): Remove.
10262 (rel-files, announcement): Remove signatures.
10263 Restore old updating code, even though we don't use it, so
10264 that we're the same as coreutils.
10265 (alpha, beta, major): Depend on news-date-check.
10266 Make the upload commands.
10267
10268 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10269 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10270 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10271 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10272 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10273 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10274 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10275 * tests/sets.at: Likewise.
10276
10277 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10278 we comment out the Autoconf version number.
10279 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10280 it's error-prone and "make maintainer-distcheck" rejects it.
10281
10282 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10283 Indent calls to "error" to pacify "make maintainer-distcheck",
10284 when the calls are not intended to be translated.
10285 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10286
10287 * src/Makefile.am (DEFS): Use +=, to pacify
10288 "make maintainer-distcheck".
10289 (bison_SOURCES): Add scan-skel.h.
10290 (sc_tight_scope): New rule, from coreutils.
10291
10292 * src/files.c (src_extension, header_extension):
10293 Now static, not extern.
10294 * src/getargs.c (short_options): Likewise.
10295 * src/muscle_tab.c (muscle_table): Likewise.
10296 * src/parse-gram.y (current_class, current_type, current_prec):
10297 Likewise.
10298 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10299 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10300 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10301 void, to avoid warning when NLS is disabled.
10302 * src/output.c: Include scan-skel.h.
10303 (scan_skel): Remove decl, since scan-skel.h does this.
10304 (output_skeleton):
10305 Indent calls to "error" to pacify "make maintainer-distcheck".
10306 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10307 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10308 "make maintainer-distcheck".
10309 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10310 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10311 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10312 (skel_lex_destroy, scan_skel): Move these decls to...
10313 * src/scan-skel.h: New file.
10314 * src/uniqstr.c (uniqstr_assert):
10315 Indent calls to "error" to pacify "make maintainer-distcheck".
10316
10317 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10318 not @VAR@.
10319
10320 * tests/torture.at: Revamp to avoid misuse of atoi that
10321 "make maintainer-distcheck" complained about.
10322
10323 * examples/extexi (message): Don't print a message more than once,
10324 and omit line-number decoration that makes Emacs compile think
10325 that informative messages are worth worrying about.
10326
10327 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10328
10329 * configure.ac: Update version number.
10330
10331 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10332 accidentally.
10333 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10334 autogenerated by the maintainer.
10335 * examples/calc++/.cvsignore: Add *.yy.
10336
10337 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10338 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10339 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10340
10341 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10342
10343 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10344 from maintainer-distcheck about casting the argument of 'free'.
10345
10346 * NEWS: Mention recent yytname changes.
10347 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10348
10349 * bootstrap: For translations that have not yet been upgraded to
10350 the new runtime-po domain, prime the pump by extracting the
10351 relevant strings from the obsolete translations. This code can be
10352 removed once the bison-runtime domain has been translated by each
10353 team.
10354
10355 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10356 now that token names are already quoted.
10357
10358 Fix problem reported by Anthony Heading.
10359 * data/glr.c (YYTOKEN_TABLE): New macro.
10360 (yytname): Define if YYTOKEN_TABLE.
10361 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10362 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10363 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10364 * src/output.c (prepare_symbols): Output token_table_flag.
10365
10366 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10367
10368 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10369 again if the first call fails.
10370
10371 * data/glr.c (yytnamerr): New function.
10372 (yyreportSyntaxError): Use it to dequote most string literals.
10373 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10374 with other skeletons. All uses changed.
10375 (yytnameerr_): New function.
10376 (yyreport_syntax_error): Use it to dequote most string literals.
10377 * data/yacc.c (yytnamerr): New function.
10378 (yyerrlab): Use it to decode most string literals.
10379 * doc/bison.texinfo (Decl Summary, Calling Convention):
10380 Clarify quoting convention of yytname.
10381 * src/output.c (prepare_symbols): Quote all names. This undoes
10382 the 2005-04-17 change, which is now accomplished (mostly) via
10383 changes in the parsers as described above.
10384 * tests/regression.at (Token definitions, Web2c Actions):
10385 Undo most 2005-04-17 change here, too.
10386
10387 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10388
10389 Fix more problems reported by twlevo@xs4all.nl.
10390 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10391 remove trailing spaces. This loses the exit status of ./types,
10392 and isn't needed since ./types shouldn't be emitting trailing
10393 spaces.
10394 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10395 as the stack isn't valid in that case.
10396
10397 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10398 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10399 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10400 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10401 is used.
10402 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10403 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10404 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10405 Likewise.
10406
10407 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10408 overly-picky compilers that reject 'char *foo = "bar";'.
10409
10410 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10411 to FILE * parameter, not to stderr. This fixes a typo introduced
10412 in the 2005-07-12 change.
10413
10414 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10415 warnings from GCC 4.
10416
10417 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10418 (yyglrShiftDefer, yysplitStack):
10419 Remove unused parameters b4_pure_formals. All uses changed.
10420 (yyglrShift): Remove unused parameters b4_user_formals.
10421 All uses changed.
10422 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10423
10424 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10425
10426 Destructor cleanups and regularization among the three skeletons.
10427 * NEWS: Document the behavior changes.
10428 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10429 stack before failing, as the cleanup code will do it for us now.
10430 * data/lalr1.cc (yyerrlab): Likewise.
10431 * data/glr.c (yyparse): Pop everything off the stack before
10432 freeing it, so that destructors get called properly.
10433 * data/lalr1.cc (yyreturn): Likewise.
10434 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10435 This is more consistent.
10436 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10437 why destructors might be called. 1.875 -> 2.1.
10438 (Destructor Decl, Decl Summary, Table of Symbols):
10439 Some English-language cleanups for %destructor.
10440 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10441 Add output line for destructor of start symbol.
10442 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10443 because of that same extra output line.
10444
10445 * NEWS: Document minor wording changes in diagnostics of
10446 Bison-generated parsers.
10447 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10448 Remove unused formals. All uses changed.
10449 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10450 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10451 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10452 Rename yyoverflowab to yyexhaustedlab.
10453 When memory exhaustion occurs during syntax-error reporting,
10454 report it separately rather than in a single diagnostic; this
10455 eases translation.
10456 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10457 (Memory Exhausted): Renamed from Parser Stack Overflow.
10458 Revamp wording slightly to prefer "memory exhaustion".
10459 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10460
10461 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10462
10463 Add i18n support to the GLR skeleton. Partially fix the C++
10464 skeleton; a C++ expert needs to finish this. Remove debugging
10465 msgids; there's little point to having them translated, since they
10466 can be understood only by someone who can read the
10467 (English-language) source code.
10468
10469 Generate runtime-po/bison-runtime.pot automatically, so that we
10470 don't have to worry about garbage getting in that file. We'll
10471 make sure after the next official release that old msgids don't
10472 get lost. See
10473 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10474
10475 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10476 Now auto-generated.
10477 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10478 Fix typos in explanations of the runtime file.
10479 * bootstrap: Change gettext keyword from YYI18N to YY_.
10480 Use standard Makefile.in.in in runtime-po, since we'll arrange
10481 for backward-compatible bison-runtime.po files in a different way.
10482 * data/glr.c (YY_): New macro, from yacc.c.
10483 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10484 Translate messages intended for users.
10485 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10486 the wording in the other skeletons. We don't know that the memory
10487 is virtual.
10488 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10489 Use same method that yacc.c uses.
10490 Don't translate debugging messages.
10491 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10492 it doesn't work (yet), and requires C++ expertise to fix.
10493 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10494 Move defn to a more logical place, to be consistent with other
10495 skeletons.
10496 Don't translate debugging messages.
10497 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10498 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10499 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10500 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10501
10502 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10503 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10504 void, not int.
10505 * tests/glr-regression.at (Badly Collapsed GLR States):
10506 Likewise.
10507 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10508 yylex should return 0 at EOF rather than aborting.
10509
10510 Improve tests for stack overflow in GLR parser.
10511 Problem reported by twlevo@xs4all.nl.
10512 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10513 All uses removed.
10514 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10515 can handle the problem.
10516 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10517 (yyparse): New local variable yyresult to record the result.
10518 Use result of setjmp to set it, rather than storing itinto
10519 struct.
10520 (yyDone): Remove label.
10521 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10522 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10523 if YYABORT is used).
10524 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10525 yyparse status; put status > 1 into diagnostic.
10526 Check that status==2 works.
10527 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10528 Use exit status 3 for failure to open (which shouldn't happen).
10529
10530 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10531
10532 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10533 1 on syntax error; just let yyparse do its thing.
10534 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10535 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10536 (Exploding the Stack Size with Alloca):
10537 (Exploding the Stack Size with Malloc):
10538 Expect exit status 2, not 1, since the parser is supposed to blow
10539 its stack. Problem reported by twlevo@xs4all.nl.
10540
10541 * data/glr.c (yyparse): Don't assume that the initial calls
10542 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10543 Print a stack-overflow message and fail instead.
10544 Initialize the line-number information before creating the stack,
10545 so that the stack-overflow message can report line zero safely.
10546
10547 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10548
10549 Fix problems reported by twlevo@xs4all.nl.
10550 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10551 (yyuserMerge): Provide a default case if b4_mergers is empty.
10552 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10553 * tests/glr-regression.at
10554 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10555 Add casts to pacify C++ compilers.
10556 * tests/glr-regression.at (Improper merging of GLR delayed action
10557 sets): Declare yylex before using it.
10558 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10559 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10560 test for valgrind; valgrind is independent of g++.
10561 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10562 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10563 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10564 Use a destructor, so that we can expand the stack. Change
10565 YYSTYPE to char * so that we can free it. Cast result of malloc.
10566
10567 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10568
10569 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10570 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10571
10572 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10573
10574 * PACKAGING: New file, suggested by Bruno Haible and taken from
10575 similar wording in gettext's PACKAGING file.
10576 * NEWS: Mention PACKAGING.
10577 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10578
10579 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10580
10581 * NEWS: Document recent i18n improvements.
10582 * bootstrap: Get runtime translations into runtime-po.
10583 Create runtime-po files automatically, if possible.
10584 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10585 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10586 does not infringe on the user's name space.
10587 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10588 * doc/bison.texinfo (Internationalization): Revamp the English
10589 and Texinfo syntax a bit, to try to make it clearer.
10590 (Bison Options, Option Cross Key): Mention --print-localedir.
10591 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10592 YYENABLE_NLS. Quote a bit more.
10593 * runtime-po/.cvsignore: New file.
10594 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10595 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10596 * runtime-po/quot.sed: Likewise.
10597 * runtime-po/boldquot.sed: Likewise.
10598 * runtime-po/en@quot.header: Likewise.
10599 * runtime-po/en@boldquot.header: Likewise.
10600 * runtime-po/insert-header.sin: Likewise.
10601 * runtime-po/remove-potcdate.sin: Likewise.
10602 * runtime-po/Makevars: Likewise.
10603 * runtime-po/LINGUAS: Likewise.
10604 * runtime-po/de.po: Likewise; we will rely on the translation project
10605 to maintain this, so "bootstrap" should get it.
10606 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10607 its value.
10608 * src/main.c (main): Bind the bison-runtime domain, too.
10609
10610 2005-07-12 Bruno Haible <bruno@clisp.org>
10611
10612 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10613 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10614 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10615 * runtime-po: New directory.
10616 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10617 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10618 * runtime-po/Rules-quot: New file, copied from po/.
10619 * runtime-po/quot.sed: Likewise.
10620 * runtime-po/boldquot.sed: Likewise.
10621 * runtime-po/en@quot.header: Likewise.
10622 * runtime-po/en@boldquot.header: Likewise.
10623 * runtime-po/insert-header.sin: Likewise.
10624 * runtime-po/remove-potcdate.sin: Likewise.
10625 * runtime-po/Makevars: New file.
10626 * runtime-po/POTFILES.in: New file.
10627 * runtime-po/LINGUAS: New file.
10628 * runtime-po/bison-runtime.pot: New file.
10629 * runtime-po/de.po: New file.
10630 * m4/bison.m4: New file.
10631 * Makefile.am (SUBDIRS): Add runtime-po.
10632 (aclocaldir, aclocal_DATA): New variables.
10633 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10634 Define aclocaldir.
10635 * src/getargs.c (usage): Document --print-localedir option.
10636 (PRINT_LOCALEDIR_OPTION): New enum item.
10637 (long_options): Add --print-localedir option.
10638 (getargs): Handle --print-localedir option.
10639 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10640 (Internationalization): New section.
10641
10642 2005-07-12 Akim Demaille <akim@epita.fr>
10643
10644 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10645 for consistency with the rest of the code.
10646 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10647 Add separators.
10648
10649 2005-07-12 Akim Demaille <akim@epita.fr>
10650
10651 * src/parse-gram.y: Use %printer instead of YYPRINT.
10652
10653 2005-07-12 Akim Demaille <akim@epita.fr>
10654
10655 * src/symtab.h, src/symtab.c (symbol_print): New.
10656 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10657 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10658
10659 2005-07-12 Akim Demaille <akim@epita.fr>
10660
10661 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10662 b4_at_dollar and b4_dollar_dollar.
10663
10664 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10665
10666 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10667 and Pennello's paper.
10668
10669 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10670
10671 * data/yacc.c (yyparse): Undo previous patch. Instead,
10672 set yylsp[0] and yyvsp[0] only if the initial action
10673 sets yylloc and yylval, respectively.
10674
10675 * data/yacc.c (yyparse): In the initial action, set
10676 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10677 This avoids the use of undefined variables if the initial
10678 action does not set yylloc and/or yylval.
10679
10680 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10681
10682 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10683 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10684 Remove from CVS. These files are automatically generated.
10685 * examples/extexi: Clarify that this file is now part of Bison,
10686 not GNU M4, and that it works with any POSIX-compatible Awk.
10687 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10688 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10689 so that we also get calc++-parser.yy. Geneate it.
10690 Use $(AWK), not gawk, since any conforming Awk will do.
10691 Put comment before action, since older 'make' can't handle comment
10692 in action.
10693 $(BUILT_SOURCES): List all built sources, not just some of them.
10694 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10695 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10696 $($(calc_sources_generated)): Remove unnecessary test for existence
10697 of target. (This had a shell syntax error anyway; a stray "x".)
10698 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10699 calc++-parser.yy.
10700 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10701
10702 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10703 implied by the other modules.
10704
10705 2005-07-06 Akim Demaille <akim@epita.fr>
10706
10707 Bind examples/calc++ to the package.
10708 * examples/calc++/Makefile: Remove, replaced by...
10709 * examples/calc++/Makefile.am: ... this new file.
10710 * examples/calc++/test: Remove input.
10711 * examples/calc++/compile: Remove.
10712 * examples/Makefile.am: New.
10713 * configure.ac, Makefile.am: Adjust.
10714 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10715
10716 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10717
10718 * data/glr.c (yyFail): Drastically simplify; since the format argument
10719 never had any % directives, we can simply pass it to yyerror.
10720 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10721 be modified later, as that is the usual style in glr.c.
10722 Problems reported by Paul Hilfinger.
10723
10724 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10725 and size overflow errors.
10726 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10727 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10728 (YYSIZEMAX): New macro.
10729 (yystpcpy): New function, taken from yacc.c.
10730 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10731 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10732 so that we don't have to maintain their signatures.
10733 (yyFail): Check for buffer overflow, by using vsnprintf rather
10734 than vsprintf. Allocate a bigger buffer if possible.
10735 Report an error if buffer allocation fails.
10736 (yyStackOverflow): New function.
10737 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10738 the initialization was successful. It might fail if storage was
10739 exhausted.
10740 (yyexpandGLRStack): Add more checks for storage allocation failure.
10741 Use yyStackOverflow to report failures.
10742 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10743 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10744 Don't assume stack number fits in int.
10745 (yysplitStack): Check for storage allocation failure.
10746 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10747 can print diagnostics on storage allocation failure. All callers
10748 changed.
10749 (yyresolveValue): Use yybool for boolean.
10750 (yyreportSyntaxError): Check for size-calculation overflow.
10751 This code is taken from yacc.c.
10752 (yyparse): Check for storage allocation errors when allocating
10753 the initial stack.
10754
10755 2005-07-05 Akim Demaille <akim@epita.fr>
10756
10757 Extract calc++ from the documentation.
10758 * doc/bison.texinfo (Calc++): Add the extraction marks.
10759 * examples/extexi: New, from the aborted GNU Programming 2E.
10760 Separate the different paragraph of a file with empty lines.
10761 * examples/Makefile: Use it to extract the whole calc++ example.
10762
10763 2005-06-24 Akim Demaille <akim@epita.fr>
10764
10765 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10766 class typedefs.
10767
10768 2005-06-22 Akim Demaille <akim@epita.fr>
10769
10770 * doc/bison.texinfo (C++ Language Interface): First stab.
10771 (C++ Parsers): Remove.
10772
10773 2005-06-22 Akim Demaille <akim@epita.fr>
10774
10775 * data/lalr1.cc (yylex_): Honor %lex-param.
10776
10777 2005-06-22 Akim Demaille <akim@epita.fr>
10778
10779 Start a set of simple examples.
10780 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10781 * examples/calc++/calc++-driver.hh,
10782 * examples/calc++/calc++-parser.yy,
10783 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10784 * examples/calc++/compile, examples/calc++/test: New.
10785
10786 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10787
10788 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10789 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10790 which stems from the 2005-05-27 patch.
10791
10792 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10793
10794 * data/glr.c: Modify treatment of unused parameters to permit use
10795 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10796
10797 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10798
10799 Fix infringement on user name space reported by Janos Zoltan Szabo.
10800 * data/yacc.c (yyparse): strlen -> yystrlen.
10801
10802 2005-05-30 Akim Demaille <akim@epita.fr>
10803
10804 * data/lalr1.cc (_): New.
10805 Translate the various messages.
10806
10807 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10808
10809 Fix infringement on user name space reported by Bruno Haible.
10810 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10811 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10812 the user's name space.
10813 (alloca): Include <stdlib.h> to get it, if it's not built in.
10814 (YYMALLOC, YYFREE): Define only if needed.
10815 (malloc, free): Declare, but only if needed, as this infringes on
10816 the user name space.
10817
10818 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10819
10820 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10821 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10822 with %d format.
10823 * lib/ebitset.c (min, max): Undef before defining.
10824 * lib/vbitset.c (min, max): Likewise.
10825 * lib/subpipe.c (create_subpipe): Save local variables in case
10826 vfork clobbers them.
10827
10828 2005-05-24 Bruno Haible <bruno@clisp.org>
10829
10830 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10831 error message syntax used by gcc-4.0.
10832
10833 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10834
10835 * README: Mention m4 1.4.3. Remove obsolete advice about
10836 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10837
10838 * bootstrap: Remove workaround for problem I encountered with
10839 gettext 0.14.1; it seems to be fixed now.
10840
10841 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10842
10843 * NEWS: Version 2.0a.
10844
10845 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10846 the previous change.
10847
10848 Various maintainer cleanups.
10849 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10850 conftest*, for benefit of CVS commands run at the same time as
10851 "configure". Add build-aux, since "bootstrap" now creates it and
10852 its subfiles.
10853 * Makefile.cfg (move_if_change): Remove.
10854 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10855 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10856 (po_repo, do-po-update, po-update, wget_files, get-targets):
10857 (config.guess-url_prefix, config.sub-url_prefix):
10858 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10859 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10860 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10861 Remove.
10862 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10863 this is now the recommended name.
10864 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10865 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10866 ylwrap. These files now go into build-aux.
10867 * config/move-if-change: Remove.
10868 * config/prev-version.txt: Bump from 1.75 to 2.0.
10869
10870 * bootstrap: Add stdio-safer, unistd-safer modules.
10871 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10872 we don't need it).
10873 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10874 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10875 * lib/subpipe.c: Include "unistd-safer.h".
10876 (create_subpipe): Make sure all the newly-created
10877 file descriptors are > 2, so that diagnostics don't
10878 get sent down them (which might cause Bison to hang, in theory).
10879 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10880 * src/files.c (xfopen): Use fopen_safer, not fopen.
10881
10882 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10883 yesterday's yacc.c fix.
10884
10885 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10886
10887 * data/glr.c, data/lalr1.cc: Update copyright date.
10888
10889 Fix a destructor bug reported by Wolfgang Spraul in
10890 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10891 * data/yacc.c (yyabortlab): Don't call destructor, and
10892 don't set yychar to EMPTY.
10893 (yyoverflowlab): Don't call destructor.
10894 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10895 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10896 since we no longer output the message "discarding lookahead token
10897 end of input ()".
10898
10899 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10900
10901 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10902 fix a small glitch in debugging output.
10903 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10904 after YY_SYMBOL_PRINT where needed.
10905
10906 (struct yyGLRState): Add some comments.
10907 (struct yySemanticOption): Add some comments.
10908 (union yyGLRStackItem): Add comment.
10909
10910 (yymergeOptionSets): Correct this to properly perform the union,
10911 avoiding infinite reported by Michael Rosien.
10912 Update comment.
10913
10914 * tests/glr-regression.at: Add test for GLR merging error reported
10915 by M. Rosien.
10916
10917 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10918
10919 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10920 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10921 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10922 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10923 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10924 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10925 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10926 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10927 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10928 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10929 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10930 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10931 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10932 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10933 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10934 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10935 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10936 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10937 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10938 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10939 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10940 src/output.h, src/parse-gram.c, src/parse-gram.h,
10941 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10942 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10943 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10944 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10945 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10946 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10947 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10948 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10949 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10950 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10951 tests/reduce.at, tests/regression.at, tests/sets.at,
10952 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10953 Update FSF postal mail address.
10954
10955 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10956
10957 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10958 Problem reported by Ralf Menzel.
10959
10960 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10961
10962 * tests/actions.at: Test that stack overflow invokes destructors.
10963 From Marcus Holland-Moritz.
10964 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10965 from here....
10966 (yyreturn): to here. That way, destructors are called properly
10967 even if the stack overflows, or the user calls YYACCEPT or
10968 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10969 (yyoverflowlab): Destroy the lookahead.
10970
10971 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10972
10973 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10974
10975 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10976
10977 * NEWS: Bison-generated C parsers no longer quote literal strings
10978 associated with tokens.
10979 * src/output.c (prepare_symbols): Don't escape strings,
10980 since users don't want to see C escapes.
10981 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10982 in diagnostics.
10983 * tests/input.at (Torturing the Scanner): Likewise.
10984 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10985
10986 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10987
10988 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10989 the data size is known to be too small and we can't increase it.
10990 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10991
10992 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10993
10994 * src/parse-gram.y: Include quotearg.h.
10995 (string_as_id): Quote $1 before using it as a key, since the
10996 lexer no longer quotes it for us.
10997 (string_content): Don't strip quotes, since lexer no longer
10998 quotes it for us.
10999 * src/scan-gram.l: Include quotearg.h.
11000 ("\""): Omit quote.
11001 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11002 a key, since the rest of the lexer doesn't quote it.
11003 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11004 * tests/regression.at (Token definitions): Check for backslashes
11005 in token strings.
11006
11007 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11008 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11009 (yyparse): Revamp code to generate long syntax error message, to
11010 make it easier to translate, and to avoid problems with arithmetic
11011 overflow. Change "virtual memory" to "memory" in diagnostic, since
11012 we don't know whether the memory is virtual.
11013
11014 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11015
11016 * NEWS: Bison-generated C parsers now use the _ macro to
11017 translate strings.
11018 * data/yacc.c (_) [!defined _]: New macro.
11019 All English strings wrapped inside this macro.
11020 * doc/bison.texinfo (Bison Parser): Document _.
11021 * po/POTFILES.in: Include src/parse-gram.c, since it now
11022 includes translateable strings that parse-gram.y doesn't.
11023
11024 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11025
11026 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11027 reverting the 2004-10-11 change to this function.
11028 (symbol_check_alias_consistency): Don't call symbol_type_set
11029 if the type name is already correct.
11030 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11031
11032 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11033
11034 * tests/regression.at (Token definitions): Don't use a token named
11035 c, as that generates a "#define c ..." that runs afoul of buggy
11036 stdlib.h that uses the identifier c as a member of struct
11037 drand48_data. Problem reported by Horst Wente.
11038
11039 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11040
11041 * bootstrap: Change translation URL from
11042 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11043 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11044 redirection glitches. Problem reported by twlevo@xs4all.nl.
11045
11046 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11047
11048 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11049 after operands; POSIX says this isn't portable for the c99 command.
11050
11051 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11052
11053 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11054 immediately if a data overrun has occurred; this may help us track
11055 down what may be a spurious failure on MacOS.
11056
11057 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11058
11059 Respond to problems reported by twlevo@xs4all.nl.
11060
11061 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11062
11063 * src/vcg.h: Comment fix.
11064 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11065 (G_CMAX): Change to -1 instead of INT_MAX.
11066
11067 * data/yacc.c (yyparse): Omit spaces before #line.
11068
11069 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11070
11071 * src/tables.c (state_number_to_vector_number): Put it inside an
11072 "#if 0", since it's not currently used. Problem reported by
11073 Roland McGrath.
11074
11075 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11076
11077 * src/output.c (escaped_output): Renamed from
11078 escaped_file_name_output, since we now use it for symbol tags as
11079 well. All uses changed.
11080 (symbol_destructors_output, symbol_printers_output):
11081 Escape symbol tags too.
11082 Problem reported by Matyas Forstner in
11083 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11084
11085 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11086 not needed.
11087 * src/output.c (user_actions_output, token_definitions_output,
11088 symbol_destructors_output, symbol_printers_output): Likewise.
11089 * src/reader.c (prologue_augment): Likewise.
11090 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11091
11092 * src/vcg.c (output_edge): Don't quote linestyle arg.
11093 Problem reported by twlevo@xs4all.nl.
11094
11095 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11096
11097 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11098 example, reported by Derek M Jones. Also, make the example even
11099 more outrageous, to better illustrate how bad the problem is.
11100
11101 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11102
11103 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11104 putsym. Typo reported by Sebastian Piping.
11105
11106 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11107
11108 * doc/bison.texinfo (Language and Grammar): some -> same
11109 (Epilogue): int he -> in the
11110 Typos reported by Sebastian Piping via Justin Pence.
11111
11112 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11113
11114 * tests/glr-regression.at (Improper handling of embedded actions
11115 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11116 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11117 with dollar signs in test names.
11118 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11119 for a similar reason.
11120
11121 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11122
11123 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11124 wants to redefine G_VIEW.
11125
11126 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11127
11128 * src/vcg.c (get_view_str): Remove case for normal_view.
11129 Problem reported by twlevo@xs4all.nl.
11130
11131 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11132
11133 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11134 Problem reported by twlevo@xs4all.nl.
11135
11136 * doc/bison.texinfo: Change @dircategory from "GNU programming
11137 tools" to "Software development". Requested by Richard Stallman
11138 via Karl Berry.
11139
11140 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11141
11142 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11143 Problem reported by twlevo@xs4all.nl.
11144
11145 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11146
11147 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11148 keyword; it's not needed with modern compilers, and it doesn't
11149 affect correctness with older compilers. Suggested by
11150 twlevo@xs4all.nl.
11151
11152 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11153
11154 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11155 gcc -Wswitch-default.
11156 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11157 * data/yacc.c (yyparse): Likewise.
11158
11159 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11160
11161 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11162 already. Let config.h define any nonstandard values.
11163
11164 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11165
11166 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11167 for the benefit of slower hosts. Problem reported by
11168 Nelson H. F. Beebe.
11169
11170 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11171
11172 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11173 being defined and not used.
11174 * data/lalr1.cc (yyparse): Likewise.
11175 Use "if (false)" rather than "if (0)".
11176
11177 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11178
11179 * TODO: Mention that we should allow NUL bytes in tokens.
11180
11181 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11182
11183 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11184 Problem reported by Hans Aberg.
11185
11186 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11187
11188 * src/getargs.c (version): Happy new year; update overall
11189 program copyright date from 2004 to 2005.
11190
11191 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11192 Problem reported by Hans Aberg.
11193 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11194 (Output file names.): Add a test for the case when standard output
11195 is closed.
11196
11197 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11198
11199 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11200 to fix an oversight in the Bison 2.0 manual.
11201
11202 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11203
11204 * NEWS: Version 2.0. Reformat the existing news items since
11205 1.875, so that related items are grouped together.
11206 * configure.ac (AC_INIT): Bump version to 2.0.
11207 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11208
11209 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11210 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11211 otherwise, we're not testing alloca. Unfortunately there's no
11212 simple way to consult HAVE_ALLOCA here.
11213
11214 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11215 for yymsg, too.
11216
11217 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11218 hand. This avoids a warning about comparing int to size_t when
11219 GCC warnings are enabled.
11220
11221 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11222
11223 * NEWS: Bison-generated parsers no longer default to using the
11224 alloca function (when available) to extend the parser stack, due
11225 to widespread problems in unchecked stack-overflow detection.
11226 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11227 responsibility to set it to a positive value. This lets the user
11228 specify a value that is not a preprocessor constant.
11229 * data/yacc.c (YYMAXDEPTH): Likewise.
11230 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11231 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11232 to be a compile-time constant. However, explain the constraints on it.
11233 Also, explain the constraints on YYINITDEPTH.
11234 (Table of Symbols): Explain that alloca is no longer the default.
11235 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11236 to 1.
11237
11238 * doc/bison.texinfo (Location Default Action): Mention that n must
11239 be zero when k is zero. Suggested by Frank Heckenbach.
11240
11241 2004-12-22 Akim Demaille <akim@epita.fr>
11242
11243 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11244 (parser::state_type, parser::semantic_type, parser::location_type):
11245 Private, not public.
11246 (parser::parse): Return ints, not bool.
11247 Returning a bool introduces a problem: 0 corresponds to false, and
11248 it seems weird to return false on success. Returning true changes
11249 the conventions for yyparse.
11250 Alternatively we could return void and send an exception.
11251 There is no clear consensus (yet?).
11252 (state_stack, semantic_stack, location_stack): Rename as...
11253 (state_stack_type, semantic_stack_type, location_stack_type): these.
11254 Private, not public.
11255 * tests/c++.at: New.
11256 * tests/testsuite.at, tests/Makefile.am: Adjust.
11257
11258 2004-12-21 Akim Demaille <akim@epita.fr>
11259
11260 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11261
11262 2004-12-21 Akim Demaille <akim@epita.fr>
11263
11264 Don't impose std::string for filenames.
11265
11266 * data/lalr1.cc (b4_filename_type): New.
11267 (position::filename): Use it.
11268 (parser.hh): Move the inclusion of stack.hh and location.hh below
11269 the user code, so that needed headers for the filename type can be
11270 included first.
11271 Forward declare them before the user code.
11272 * tests/Makefile.am (check-local, installcheck-local): Pass
11273 TESTSUITEFLAGS to the TESTSUITE.
11274
11275 2004-12-20 Akim Demaille <akim@epita.fr>
11276
11277 Use more STL like names: my_class instead of MyClass.
11278
11279 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11280 (SemanticStack, SemanticType, StateStack, StateType)
11281 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11282 (Parser::value): Rename as...
11283 (location_stack, location_type, rhs_number_type, semantic_stack)
11284 (semantic_type, state_stack, state_type, token_number_type, stack)
11285 (slice, traits, parser::yylloc, parser::yylval): these.
11286
11287 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11288
11289 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11290
11291 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11292 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11293
11294 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11295
11296 Remove uses of 'short int' and 'unsigned short int'. This raises
11297 some arbitrary limits. It uses more memory but nowadays that's
11298 not much of an issue.
11299
11300 This change does not affect the generated parsers; that's a different
11301 task, as some users will want to conserve memory there.
11302
11303 Ideally we should use size_t to represent all object counts, and
11304 something like ptrdiff_t to represent signed differences of object
11305 counts; but that will require more code-cleanup than I have the
11306 time to do right now.
11307
11308 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11309 Use size_t, not int or short int, to count objects.
11310 * src/closure.c (nritemset, closure): Likewise.
11311 * src/closure.h (nritemset, closure): Likewise.
11312 * src/nullable.c (nullable_compute): Likewise.
11313 * src/print.c (print_core): Likewise.
11314 * src/print_graph.c (print_core): Likewise.
11315 * src/state.c (state_compare, state_hash): Likewise.
11316 * src/state.h (struct state): Likewise.
11317 * src/tables.c (default_goto, goto_actions): Likewise.
11318
11319 * src/gram.h (rule_number, rule): Use int, not short int.
11320 * src/output.c (prepare_rules): Likewise.
11321 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11322 errs, reductions): Likewise.
11323 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11324 Likewise.
11325 * src/tables.c (vector_number, tally, action_number,
11326 ACTION_NUMBER_MINIMUM): Likewise.
11327 * src/output.c (muscle_insert_short_int_table): Remove.
11328
11329 2004-12-17 Akim Demaille <akim@epita.fr>
11330
11331 * data/lalr1.cc: Extensive Doxygenation.
11332 (error_): Rename as...
11333 (error): this, since it is visible to the user.
11334 Adjust callers.
11335 (Parser::message): Now an automatic variable from...
11336 (Parser::yyreport_syntax_error_): here.
11337 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11338 Parser::error.
11339 * tests/input.at: Escape $.
11340
11341 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11342
11343 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11344 Parenthesize rhs to avoid obscure problems with mistakes like
11345 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11346 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11347 b4_rhs_location): Likewise.
11348 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11349 b4_rhs_location): Likewise.
11350
11351 2004-12-16 Akim Demaille <akim@epita.fr>
11352
11353 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11354 yacc.c: be sure to stay within yycheck_.
11355 * tests/actions.at: Re-enable C++ tests.
11356
11357 2004-12-16 Akim Demaille <akim@epita.fr>
11358
11359 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11360 real.
11361
11362 2004-12-16 Akim Demaille <akim@epita.fr>
11363
11364 Use #define to handle the %name-prefix.
11365
11366 * data/glr.c, data/yacc.c: Comment changes.
11367 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11368 so that one can refer to yylex in the parser file, and have it
11369 renamed, as is the case with other skeletons.
11370
11371 2004-12-16 Akim Demaille <akim@epita.fr>
11372
11373 Move lalr1.cc internals into yy*.
11374
11375 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11376 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11377 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11378 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11379 (empty_, final_, terror_, errcode_, ntokens_)
11380 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11381 (looka_, ilooka_, error_range_, nerrs_):
11382 Rename as...
11383 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11384 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11385 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11386 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11387 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11388 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11389 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11390 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11391 these.
11392
11393 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11394
11395 Fix some problems reported by twlevo at xs4all.
11396 * src/symtab.c (symbol_new): Report an error if the input grammar
11397 contains too many symbols. This is better than calling abort() later.
11398 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11399 (struct node, struct graph):
11400 Rename member expand to stretch. All uses changed.
11401 (struct graph): Remove member layoutalgorithm. All uses removed.
11402 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11403 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11404 All uses changed.
11405 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11406
11407 2004-12-15 Akim Demaille <akim@epita.fr>
11408
11409 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11410 Add more Doxygen comments.
11411 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11412 (report_syntax_error_, translate_): Rename as...
11413 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11414 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11415
11416 2004-12-15 Akim Demaille <akim@epita.fr>
11417
11418 * data/lalr1.cc (lex_): Rename as...
11419 (yylex_): this.
11420 Move the trace here.
11421 Take the %name-prefix into account.
11422 Reported by Alexandre Duret-Lutz.
11423
11424 2004-12-15 Akim Demaille <akim@epita.fr>
11425
11426 Simplify the C++ parser constructor.
11427
11428 * data/lalr1.cc (debug_): Rename as...
11429 (yydebug_): so that the parser's internals are always in the yy*
11430 pseudo namespace.
11431 Adjust uses.
11432 (b4_parse_param_decl): Remove the leading comma as it is now only
11433 called as unique argument list.
11434 (Parser::Parser): Remove the constructor accepting a location and
11435 an initial debugging level.
11436 Remove from the other ctor the argument for the debugging level.
11437 (debug_level_type, debug_level, set_debug_level): New.
11438
11439 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11440 constructor calls.
11441
11442 2004-12-15 Akim Demaille <akim@epita.fr>
11443
11444 Remove b4_root related material: failure experiment
11445 (which goal was to allow to derive from a class).
11446
11447 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11448 definitions and uses.
11449
11450 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11451
11452 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11453 not 2, since it's not portable to subtract 1 from the start of an
11454 array. The new item 0 is never set or used. All uses changed.
11455
11456 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11457 the default definition of YYLLOC_DEFAULT. Problem reported
11458 by Frank Heckenbach.
11459
11460 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11461
11462 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11463 the normal case and one for the error case. Just use the
11464 first one uniformly. Problem reported by Frank Heckenbach.
11465 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11466 use exactly the same macro in both places.
11467 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11468 so that the normal-case YYRHSLOC works for the error case too.
11469 All uses changed.
11470 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11471 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11472 * doc/bison.texinfo (Location Default Action): Don't claim that
11473 we have an array of locations. Use the same macro for both glr
11474 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11475 the index is 0.
11476
11477 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11478
11479 * HACKING: Update email addresses to send announcements to.
11480
11481 * configure.ac (AC_INIT): Bump version to 1.875f.
11482
11483 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11484
11485 * NEWS: Version 1.875e.
11486 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11487
11488 * src/scan-skel.l: Include "complain.h", for "fatal".
11489
11490 * src/relation.h (relation_print, relation_digraph):
11491 Relation sizes are of type relation_node, not size_t (this is
11492 merely a doc fix, since the two types are equivalent).
11493 (relation_transpose): Relation sizes are of type relation_node,
11494 not int.
11495 * src/relation.c: Likewise.
11496 (top, infinity): Now of type relation_node, not int.
11497 (traverse, relation_transpose): Use relation_node, not int.
11498
11499 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11500 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11501 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11502
11503 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11504 specifying whether the test should be skipped. Use it tp
11505 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11506 fail on some hosts, and should be skipped.
11507
11508 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11509
11510 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11511 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11512 unless otherwise specified below.
11513
11514 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11515 to allocate kernel_base, kernel_items, kernel_size, since
11516 they needn't be initialized to 0.
11517 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11518 * src/closure.c (new_closure): Likewise, for itemset.
11519 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11520 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11521 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11522 (build_relations): Likewise for edge, states1, includes.
11523 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11524 * src/reader.c (packgram): Likewise, for ritem, rules.
11525 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11526 * src/relation.c (relation_digraph): Likewise for VERTICES.
11527 (relation_transpose): Likewise for new_R, end_R.
11528 * src/symtab.c (symbols_token_translations_init): Likewise for
11529 token_translations.
11530 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11531 (token_actions): Likewise for yydefact, actrow, conflrow,
11532 conflict_list.
11533 (save_column): Likewise for froms[symno], tos[symno].
11534 (goto_actions): Likewise for state_count.
11535 (pack_table): Likewise for base, pos, check.
11536 (tables_generate): Likewise for width.
11537
11538 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11539 for initial core. Just have a separate core, so we needn't worry
11540 about whether kernel_size and kernel_base are initialized.
11541
11542 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11543 kernel_size, kernel_items): Remove unnecessary initialization.
11544 * src/conflicts.c (conflicts): Likewise.
11545 * src/derives.c (derives): Likewise.
11546 * src/muscle_tablc (muscle_insert): Likewise.
11547 * src/relation.c (relation_digraph): Likewise.
11548 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11549 conflrow, conflict_table, conflict_list, table, check):
11550 Likewise.
11551
11552 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11553 This is because all callers pass unsigned int.
11554 * src/closure.h (new_closure): Likewise.
11555
11556 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11557 (build_relations): Initialize includes[i] in all cases.
11558 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11559 and rules[ruleno].precsym. Initialize members in order.
11560 * src/relation.c (relation_transpose): Always initialize new_R[i]
11561 and end_R[i].
11562 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11563
11564 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11565 conflict_list[0] was always 0, but now it isn't initialized.
11566
11567 * src/table.c (table_grow): When conflict_table grew, the grown
11568 area wasn't cleared. Fix this.
11569
11570 * lib/.cvsignore: Add strdup.c, strdup.h.
11571 * m4/.cvsignore: Add strdup.m4.
11572
11573 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11574
11575 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11576 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11577 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11578 ngotos + 1 without checking for overflow.
11579 (build_relations): Use END_NODE, not -1, to denote end of edges.
11580 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11581 build_relations): Use goto_number, not int, for goto numbers.
11582 * src/tables.c (save_column, default_goto): Likewise.
11583
11584 2004-11-23 Akim Demaille <akim@epita.fr>
11585
11586 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11587 of #defining from yystype.
11588 Don't typedef yystype, C++ does not need it.
11589 This lets it possible to forward declare it as union.
11590
11591 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11592
11593 * bootstrap (gnulib_modules): Add extensions.
11594 Problem reported by Jim Meyering.
11595
11596 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11597
11598 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11599 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11600 src/system.h, src/tables.c: XFREE -> free, to accommodate
11601 recent change to gnulib xalloc.h.
11602 Problem reported by Jim Meyering.
11603
11604 2004-11-17 Akim Demaille <akim@epita.fr>
11605
11606 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11607
11608 2004-11-17 Akim Demaille <akim@epita.fr>,
11609 Alexandre Duret-Lutz <adl@gnu.org>
11610
11611 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11612 changes.
11613 (YYCDEBUG): Adjust.
11614 Use it instead of cdebug_.
11615 (Parser::debug_stream, Parser::set_debug_stream): New.
11616 (Parser::symprint_): Define cdebug_ for temporary backward
11617 compatibility.
11618 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11619 debug_stream ().
11620
11621 2004-11-17 Akim Demaille <akim@epita.fr>
11622
11623 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11624 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11625 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11626 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11627
11628 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11629
11630 * data/glr.c (yyloc_default): Remove; not used.
11631 Problem reported by Frank Heckenbach.
11632
11633 2004-10-25 Akim Demaille <akim@epita.fr>
11634
11635 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11636 Introduce another definition to address simple location arrays.
11637 (yyGLRStack): New member: yyerror_range.
11638 (yyrecoverSyntaxError, yyparse): Update it.
11639 (yyrecoverSyntaxError): Use it when shifting the error token to
11640 have an accurate range, equivalent to the one computed by both
11641 yacc.c and lalr1.cc.
11642 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11643 that column numbers start at column 0, as per GNU Coding
11644 Standards, the others tests, and the doc.
11645 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11646 Adjust to the above change (first column is 0).
11647 And adjust the location of the "<error>", now covering the whole
11648 line.
11649
11650 2004-10-22 Akim Demaille <akim@epita.fr>
11651 and Paul Eggert <eggert@cs.ucla.edu>
11652
11653 Remove some arbitrary limits on goto numbers and relations.
11654 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11655 initial values, since they're never used.
11656 (set_goto_map): ngotos is now unsigned, so test for overflow
11657 by seeing whether it wraps around to zero.
11658 * src/lalr.h (goto_number): Now size_t, not short int.
11659 (GOTO_NUMBER_MAXIMUM): Remove.
11660 * src/relation.c (relation_print, traverse, relation_transpose):
11661 Check for END_NODE rather than looking at sign.
11662 * src/relation.h (END_NODE): New macro.
11663 (relation_node): Now size_t, not short int.
11664
11665 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11666
11667 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11668 keyword, not an identifier. Problem reported by Baron Schwartz in
11669 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11670
11671 2004-10-11 Akim Demaille <akim@epita.fr>
11672
11673 * src/symtab.c (symbol_check_alias_consistency): Also check
11674 type names, destructors, and printers.
11675 Reported by Alexandre Duret-Lutz.
11676 Recode the handling of associativity and precedence in terms
11677 of symbol_precedence_set.
11678 Accept no redeclaration at all, not even equal to the previous
11679 value.
11680 (redeclaration): New.
11681 Use it to factor redeclaration complaints.
11682 (symbol_make_alias): Don't set the type of the alias, let
11683 symbol_check_alias_consistency do it as for other features.
11684 * src/symtab.h (symbol): Add new member prec_location, and
11685 type_location.
11686 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11687 * tests/input.at (Incompatible Aliases): New.
11688
11689 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11690
11691 .cvsignore fixes to accommodate gnulib changes,
11692 and the practice of naming build directories "_build".
11693 * .cvsignore: Add "_*". Sort.
11694 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11695 * m4/.cvsignore: Add "*_gl.m4".
11696
11697 2004-10-06 Akim Demaille <akim@epita.fr>
11698
11699 * src/parse-gram.y (add_param): Fix the truncation of trailing
11700 spaces.
11701
11702 2004-10-05 Akim Demaille <akim@epita.fr>
11703
11704 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11705 whether the reducion was empty or not. This leaves room to
11706 improve the use of YYLLOC_DEFAULT in such a case.
11707 lalr1.cc is still experimental, so changing this is acceptable.
11708 And finally, there are probably not many users who changed the
11709 handling of locations in GLR, so changing is admissible too.
11710
11711 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11712 empty reduction, set @$ to an empty location ending the previously
11713 stacked symbol.
11714 Adjust uses to make sure the code is triggered on empty
11715 reductions.
11716 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11717 expected output: empty reductions have empty locations.
11718
11719 2004-09-29 Akim Demaille <akim@epita.fr>
11720
11721 * data/lalr1.cc: Move towards a more standard C++ coding style
11722 for templates: Class < T > -> Class<T>.
11723
11724 2004-09-29 Akim Demaille <akim@epita.fr>
11725
11726 * data/lalr1.cc: Reinstall the former ctor, for sake of
11727 compatibility, but warn it will be removed.
11728 Move towards a more standard C++ coding style (i.e., type *var ->
11729 type* var).
11730
11731 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11732
11733 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11734 since it's less likely to work if NULs are involved in the future.
11735
11736 2004-09-27 Akim Demaille <akim@epita.fr>
11737
11738 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11739
11740 2004-09-27 Akim Demaille <akim@epita.fr>
11741
11742 * data/lalr1.cc (b4_parse_param_decl_1): New.
11743 (b4_parse_param_decl): Use it to have different names between attribute
11744 and argument names.
11745 (b4_cc_constructor_call): Likewise.
11746
11747 2004-09-24 Akim Demaille <akim@epita.fr>
11748
11749 * src/parse-gram.y (add_param): Strip the leading and trailing
11750 blanks from a formal argument declaration.
11751 (YY_LOCATION_PRINT): New.
11752
11753 2004-09-24 Akim Demaille <akim@epita.fr>
11754
11755 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11756 after the location.
11757
11758 2004-09-24 Akim Demaille <akim@epita.fr>
11759
11760 * doc/bison.texinfo (Table of Symbols): Sort.
11761
11762 2004-09-21 Akim Demaille <akim@epita.fr>
11763
11764 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11765 the useless parentheses.
11766 Suggested by Paul Eggert.
11767
11768 2004-09-20 Akim Demaille <akim@epita.fr>
11769
11770 Let the initial-action act on the look-ahead, and use it for the
11771 "initial push" (corresponding to an hypothetical beginning-of-file).
11772 And let lalr1.cc honor %initial-action.
11773
11774 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11775 example.
11776 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11777 (Parser::Parser): Remove the ctor that used to initialize it.
11778 (Parser::parse): Like in the other skeletons, issue the "starting
11779 parse" message before any action.
11780 Honor %initial-action.
11781 Initialize the stacks with the lookahead.
11782 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11783 look-ahead.
11784 Push them in the stacks.
11785 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11786
11787 2004-09-20 Akim Demaille <akim@epita.fr>
11788
11789 * doc/bison.texinfo (Initial Action Decl): New.
11790
11791 2004-09-20 Akim Demaille <akim@epita.fr>
11792
11793 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11794 clearer criterion to define it.
11795 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11796 When reducing on an empty RHS, use the latest stacked location as
11797 location.
11798 yylloc is not always available.
11799 * data/glr.c: Likewise.
11800 Also, honor initial-actions.
11801
11802 2004-09-20 Akim Demaille <akim@epita.fr>
11803
11804 * data/yacc.c (YY_LOCATION_PRINT): New.
11805 Define when we know YYLTYPE's structure, i.e., when the default
11806 YYLLOC_DEFAULT is used.
11807 * data/c.m4 (b4_yysymprint_generate): Use it.
11808 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11809 value of the result.
11810 (error_start_): Replace with...
11811 (error_range_): this location array.
11812 This allows to replace code relying on the implementation of
11813 locations by portable code.
11814 * data/yacc.c (yylerrsp): Replace with...
11815 (yyerror_range): this.
11816 Every time a token is popped, update yyerror_range[0], to have an
11817 accurate location for the error token.
11818 * data/glr.c (YY_LOCATION_PRINT): New.
11819 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11820 deference a pointer.
11821 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11822 report the location in %printers.
11823
11824 * src/scan-skel.l: Instead of abort, report error messages to ease
11825 understanding skeleton scanning failures.
11826
11827 2004-09-16 Akim Demaille <akim@epita.fr>
11828
11829 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11830 (iterator, const_iterator): these, to be more in the C++ spirit.
11831 Also, return reverse iterators so that when displaying the stack
11832 we display its bottom first.
11833 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11834 from yacc.c.
11835 We should probably use vector here though.
11836
11837 2004-09-16 Akim Demaille <akim@epita.fr>
11838
11839 Have more complete shift traces.
11840
11841 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11842 to report Shifts instead of ad hoc YYDPRINTF invocations,
11843 including for the error token.
11844 * data/lalr1.cc (symprint_): Output the location.
11845 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11846 output the location within the %printer.
11847 Activate GLR tests, at least to make sure they compile properly.
11848 They still don't pass though.
11849 * tests/calc.at: Adjust expect verbose output, since now "Entering
11850 state..." is on a different line than the "Shifting" message.
11851
11852 2004-09-08 Akim Demaille <akim@epita.fr>
11853
11854 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11855 Bison directive from the Bison file to the invocation of this
11856 macro, so that these directives are passed to
11857 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11858 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11859 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11860 the extra Bison directives instead of the whole series.
11861 Change the grammar so that there are recoverable errors, and
11862 unrecoverable errors. Now we can have the parser give up before
11863 consuming the whole input. As a result we now can observe that
11864 the lookahead is freed when needed.
11865 Change the parser source to parse argv[1] instead of a hard coded
11866 string.
11867 Simplify yylex, and give a value and location to EOF.
11868 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11869 passed directives already coded in the file.
11870 Add some tests to check the location of "error".
11871 For some tests, the C++ parser is correct, and not yacc.c.
11872 For other tests, they provide different, but unsatisfying, values,
11873 so keep the C++ value so that at least one parser is "correct"
11874 according to the test suite.
11875 (Actions after errors): Remove, this is subsumed by the
11876 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11877
11878 2004-09-06 Akim Demaille <akim@epita.fr>
11879
11880 * data/lalr1.cc: Adjust the indentation of the labels.
11881 (Parser::pop): New.
11882 Use it.
11883
11884 2004-09-06 Akim Demaille <akim@epita.fr>
11885
11886 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11887 argument, an informative message.
11888 Call YY_SYMBOL_PRINT.
11889 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11890 * data/lalr1.cc (destruct_): Likewise.
11891 In addition, no longer depend on b4_yysymprint_generate and
11892 b4_yydestruct_generate to generate these functions, do it "by
11893 hand".
11894
11895 2004-09-03 Akim Demaille <akim@epita.fr>
11896
11897 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11898 invoked, yydestruct the lookahead.
11899 * tests/calc.at (Calculator $1): Update the expected lengths of
11900 traces: there is an added line for the discarded lookahead.
11901 * doc/bison.texinfo (Destructor Decl): Some rewording.
11902 Define "discarded" symbols.
11903
11904 2004-09-02 Akim Demaille <akim@epita.fr>
11905
11906 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11907
11908 2004-09-02 Akim Demaille <akim@epita.fr>
11909
11910 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11911 (YYDSYMPRINTF): Rename as...
11912 (YY_SYMBOL_PRINT): this.
11913 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11914 two.
11915 Use it instead of direct symprint_ calls.
11916 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11917 one.
11918
11919 2004-09-02 Akim Demaille <akim@epita.fr>
11920
11921 * data/lalr1.cc (b4_yysymprint_generate): New.
11922 (symprint_): New member function, defined when YYDEBUG.
11923 Use it consistently instead of token/nterm debugging output by
11924 hand.
11925 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11926 %printer calls to use cdebug_ when using lalr1.cc.
11927
11928 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11929
11930 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11931 with #ifdef YYDEBUG.
11932
11933 2004-08-26 Akim Demaille <akim@epita.fr>
11934
11935 * doc/bison.texinfo (Implementing Loops): Rename as...
11936 (Implementing Gotos/Loops): this.
11937
11938 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11939
11940 Adjust to latest gnulib.
11941 * bootstrap (gnulib_modules): Add xalloc-die.
11942 Set LC_ALL=C so that file names sort consistently.
11943 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11944 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11945 uintmax_t.m4, ulonglong.m4.
11946 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11947 po.m4 since we are now using _gl.m4 instead.
11948
11949 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11950
11951 * src/scan-action.l: Remove. Scanning of semantic actions is
11952 handled in scan-gram.l.
11953
11954 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11955
11956 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11957
11958 * src/location.h (struct): The file member is a uniqstr.
11959 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11960
11961 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11962
11963 Fix bug with non-%union parsers that have printers or destructors,
11964 which led to a Bison core dump. Reported by Peter Fales in
11965 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11966
11967 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11968 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11969 not to our own type.
11970 * src/output.c (symbol_destructors_output, symbol_printers_output):
11971 Don't assume %union.
11972 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11973 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11974 UNION-FLAG. All callers changed.
11975 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11976 Use type char, not unsigned int, when declaring an array of char;
11977 this lets us remove a cast.
11978 (Printers and Destructors): Add non-%union test cases.
11979
11980 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11981
11982 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11983 GLR writeups. E.g., avoid frenchspacing and the future tense,
11984 change "lookahead" to "look-ahead", and change "wrt" to "with
11985 respect to".
11986
11987 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11988
11989 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11990 New sections, split off from the GLR Parsers section. Put the new
11991 Simple GLR Parser near the start of the GLR section, for clarity.
11992 Rewrite connective text.
11993
11994 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11995
11996 * doc/bison.texinfo (Simple GLR Parsers): New section.
11997
11998 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11999
12000 * NEWS, TODO, doc/bison.texinfo:
12001 Use "look-ahead" instead of "lookahead", to be consistent.
12002 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12003 while we're fixing "look-ahead".
12004 * src/conflicts.c (shift_set): Renamed from shiftset.
12005 (look_ahead_set): Renamed from lookaheadset.
12006 * src/print.c: Likewise.
12007 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12008 name for "lookahead".
12009 (report_types, usage): Likewise.
12010 * src/getargs.h (report_look_ahead_tokens): Renamed from
12011 report_lookaheads.
12012 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12013 compute_lookaheads.
12014 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12015 (look_ahead_tokens_print): Renamed from lookaheads_print.
12016 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12017 state_rule_lookaheads_print.
12018 * src/state.h: Likewise.
12019 (reductions.look_ahead_tokens): Renamed from lookaheads.
12020 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12021 AT_DATA_LOOKAHEADS_GRAMMAR.
12022
12023 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12024
12025 * README: Update location of patched M4 distribution.
12026
12027 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12028
12029 Don't assume the C++ compiler takes the same arguments as the C compiler
12030 (trivial change).
12031 * configure.ac (O0CXXFLAGS): New var.
12032 * tests/atlocal.in (CXXFLAGS): Use it.
12033
12034 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12035
12036 Fix some "make check" problems with C++ reported by
12037 Albert Chin-A-Young for Tru64 C++ in this thread:
12038 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12039
12040 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12041 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12042 Output to a .cc file for C++, not to a .c file.
12043 * tests/calc.at (AT_CHECK_CALC): Likewise.
12044 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12045 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12046
12047 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12048
12049 * tests/calc.at, tests/actions.at: Workaround for SGI
12050 C++ compiler. (trivial change)
12051
12052 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12053
12054 Spent a few hours checking out which prerequisite versions the
12055 current sources actually require. I went all the way back to
12056 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12057 a seemingly endless set of combinations of versions more recent
12058 than that. The bottom line is that the current sources require
12059 fairly recent versions of the build tools, and it'll be some work
12060 to change this.
12061 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12062 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12063 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12064 Add comments explaining why those particular versions are
12065 currently needed.
12066
12067 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12068 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12069 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12070
12071 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12072 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12073
12074 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12075
12076 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12077 0.11.5. Suggested by Bruno Haible.
12078 * bootstrap: Remove gettext version checking.
12079
12080 * doc/bison.texinfo (Decl Summary): Also mention that %union
12081 can depend on prerequisite types. Problem reported by Tim
12082 Van Holder.
12083
12084 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12085
12086 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12087 * README-alpha: Don't tell people not to package this.
12088
12089 * bootstrap: Don't assume $(...) works; use `...` instead.
12090 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12091 gettext better.
12092
12093 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12094 put into the -d output file, and mention what to do if YYSTYPE is
12095 defined as a macro.
12096
12097 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12098
12099 Undo change made earlier today: it caused autopoint to not bring
12100 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12101 autopoint's.
12102
12103 * bootstrap: Check that gettext version matches what's in
12104 configure.ac. Warn users to ignore robots.txt ERROR 404.
12105 * bootstrap: Undo today's earlier change (logged below).
12106 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12107
12108 The gettext version checking is causing more trouble than it's
12109 curing; remove it. Problem reported by Paul Hilfinger.
12110
12111 * bootstrap: Issue a warning that one can expect a message
12112 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12113 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12114
12115 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12116
12117 Ensure that the C++ compiler used for testing actually works on a
12118 simple test program; if not, skip the C++-related tests. Problem
12119 reported by Vin Shelton in:
12120 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12121
12122 * m4/cxx.m4: New file.
12123 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12124 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12125 * tests/local.at (AT_COMPILE_CXX): Use it.
12126
12127 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12128
12129 * data/glr.c (yylloc): Output this macro even if locations are not
12130 being generated, as the GLR parser needs it even in that case.
12131 Problem reported by Troy A. Johnson
12132 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12133
12134 * configure.ac (AC_INIT): Update to 1.875e.
12135
12136 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12137
12138 * NEWS: Version 1.875d.
12139 * configure.ac (AC_INIT): Likewise.
12140 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12141
12142 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12143 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12144 lalr1.cc runs afoul of the first, and the last two are no longer
12145 supported by GCC 3.4.0.
12146 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12147 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12148
12149 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12150
12151 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12152 unsigned int, for compatibility with latest gnulib hash module.
12153 * src/state.c (state_hash, state_hasher): Likewise.
12154 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12155 * src/uniqstr.c (hash_uniqstr): Likewise.
12156
12157 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12158
12159 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12160
12161 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12162 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12163 character and string literals.
12164 (unexpected_end): New function.
12165 (unexpected_eof): Use it.
12166 (unexpected_newline): New function.
12167 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12168 actions.
12169
12170 * NEWS: Document %expect-rr.
12171
12172 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12173 Fix typo by replacing $1 with $option.
12174 Remove more 'intl'-related files.
12175 Don't DEFUN AM_INTL_SUBDIR twice.
12176
12177 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12178 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12179 strtoul.c.
12180 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12181 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12182 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12183 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12184 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12185 * src/.cvsignore: Add *.output.
12186
12187 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12188 gets copied to the output file.
12189
12190 2004-04-28 Paul Eggert <eggert@twinsun.com>
12191
12192 Get files from the gnulib and po repositories, instead of relying
12193 on them being in our CVS. Upgrade to latest versions of gnulib
12194 and Automake.
12195
12196 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12197 * bootstrap: Bootstrap from gnulib and po repositories.
12198 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12199 * README-cvs: Document these changes. Remove version numbers from
12200 mentions of build tools, since they change so often. Mention Flex.
12201
12202 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12203 (gl_USE_SYSTEM_EXTENSIONS): Add.
12204 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12205 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12206 does this for us.
12207 (AC_ISC_POSIX): Remove; we no longer support this
12208 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12209 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12210 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12211 Do not check for C89 headers, except for locale.h which is used
12212 by the Yacc library and must port to K&R hosts.
12213 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12214 Do not check for C89 functions, except for setlocale which is
12215 used by the Yacc library.
12216 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12217 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12218 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12219 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12220 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12221 AM_GNU_GETTEXT): Remove; now done by:
12222 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12223 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12224 for us.
12225
12226 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12227 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12228 Define to empty, as gnulib.mk will do the rest for us.
12229 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12230 for us.
12231 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12232 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12233
12234 * src/files.c: Include gnulib's xstrndup.h.
12235
12236 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12237 (REALLOC): Use xnrealloc, for likewise.
12238 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12239 (strnlen, memrchr): Remove decls; functions no longer used.
12240 Include <stpcpy.h>.
12241
12242 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12243 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12244 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12245 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12246 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12247 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12248 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12249 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12250 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12251 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12252 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12253 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12254 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12255 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12256 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12257 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12258 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12259 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12260 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12261 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12262 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12263 Remove, as these files are now generated automatically
12264 by bootstrap or automake.
12265
12266 * po/ChangeLog: Remove: all but one entry was a duplicate
12267 of this file, and I moved that 2000-11-02 entry here.
12268
12269 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12270 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12271 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12272 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12273 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12274 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12275 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12276 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12277 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12278 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12279 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12280 xstrndup.h.
12281 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12282 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12283 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12284 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12285 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12286 * src/.cvsignore: Remove *_.c.
12287
12288
12289 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12290 support it. (The latest stable gzip doesn't.)
12291
12292 2004-04-27 Paul Eggert <eggert@twinsun.com>
12293
12294 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12295 case, as stos_ is now used by destructors due to the 2004-02-09
12296 change.
12297
12298 Remove more K&R C support.
12299 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12300 * lib/subpipe.c (errno): Remove decl.
12301 Include <stdlib.h> unconditionally.
12302 (EXIT_FAILURE): Remove macro.
12303 * src/complain.c (vfprintf, strerror): Remove.
12304 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12305 unconditionally.
12306 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12307 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12308 (strchr, strspn, memchr): Remove decls.
12309 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12310 unconditionally. Do not declare perror.
12311 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12312 unconditionally.
12313
12314 * src/complain.c (_): Remove useless defn, as system.h defines this.
12315
12316 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12317 with latest obstack.h.
12318 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12319 to procedure types, as obstack.h now does that for us.
12320 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12321
12322 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12323 so that this include file can stand alone.
12324 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12325 does this now. Include subpipe.h first after config.h, to
12326 test whether it can stand alone.
12327
12328 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12329 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12330 unused declaration.
12331
12332 * tests/synclines.at (%union synch line): Put a dummy member in
12333 the union, because empty unions aren't allowed in C. Caught
12334 by GCC 3.4.0.
12335
12336 2004-04-13 Jim Meyering <jim@meyering.net>
12337
12338 * src/conflicts.c (conflicts_print): Correct format string typo:
12339 use `%%' to produce literal `%'. (trivial change)
12340
12341 2004-03-30 Paul Eggert <eggert@twinsun.com>
12342
12343 * src/getargs.c (version): Update copyright year to 2004.
12344
12345 * data/c.m4 (b4_int_type): Use 'short int' rather than
12346 'short', and similarly for 'long', 'unsigned', etc.
12347 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12348 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12349 yy_yypstack, yydumpstack): Likewise.
12350 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12351 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12352 Likewise.
12353 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12354 yy_stack_print, yyparse): Likewise.
12355 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12356 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12357 * lib/bitset.c (bitset_print): Likewise.
12358 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12359 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12360 * lib/bitsetv.c (bitsetv_dump): Likewise.
12361 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12362 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12363 Likewise.
12364 * src/LR0.c (allocate_itemsets): Likewise.
12365 * src/gram.h (rule_number, rule): Likewise.
12366 * src/lalr.h (goto_number): Likewise.
12367 * src/nullable.c (nullable_compute): Likewise.
12368 * src/output.c (prepare_rules): Likewise.
12369 * src/relation.c (relation_print, relation_digraph): Likewise.
12370 * src/relation.h (relation_node): Likewise.
12371 * src/state.h (state_number, transitions, errs, reductions,
12372 struct state): Likewise.
12373 * src/symtab.h (symbol_number, struct symbol): Likewise.
12374 * src/tables.c (vector_number, tally, action_number,
12375 default_goto, goto_actions): Likewise.
12376 * tests/existing.at (GNU Cim Grammar): Likewise.
12377 * tests/regression.at (Web2c Actions): Likewise.
12378
12379 * src/output.c (muscle_insert_short_int_table): Renamed from
12380 muscle_insert_short_table. All uses changed.
12381
12382 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12383
12384 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12385 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12386 Add %expect-rr rule.
12387
12388 * src/scan-gram.l: Recognize %expect-rr.
12389
12390 * src/conflicts.h (expected_sr_conflicts): Rename from
12391 expected_conflicts.
12392 (expected_rr_conflicts): Declare.
12393
12394 * src/conflicts.c (expected_sr_conflicts): Rename from
12395 expected_conflicts.
12396 (expected_rr_conflicts): Define.
12397 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12398 for GLR parsers.
12399 Use expected_sr_conflicts in place of expected_conflicts.
12400 Warn if expected_rr_conflicts used in non-GLR parser.
12401
12402 * doc/bison.texinfo: Add documentation for %expect-rr.
12403
12404 2004-03-08 Paul Eggert <eggert@gnu.org>
12405
12406 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12407 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12408
12409 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12410 in lalr1.cc.
12411 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12412 * src/scan-gram.l (scan_integer): New function.
12413 ({int}): Use it.
12414 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12415 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12416 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12417 Say "long int", not "long", for uniformity with GNU style.
12418
12419 2004-02-25 Paul Eggert <eggert@twinsun.com>
12420
12421 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12422 compilers. This fixes a problem with Intel's C++ compiler being
12423 chatty, reported by Guido Trentalancia in
12424 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12425
12426 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12427
12428 Support %destructor and merge error locations in lalr1.cc.
12429
12430 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12431 (Parser::stos_): Define unconditionally.
12432 (Parser::destruct_): New method. Generate its body with
12433 b4_yydestruct_generate.
12434 (Parser::error_start_): New attribute.
12435 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12436 token which are discarded.
12437 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12438 error_start_ when erroneous token are discarded.
12439 (Parser::parse) <yyerrlab1>: Compute the location of the error
12440 token so that it covers all the discarded tokens.
12441 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12442 it can be called with `%skeleton "lalr1.cc"', and do that.
12443
12444 2004-02-02 Paul Eggert <eggert@twinsun.com>
12445
12446 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12447 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12448 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12449 There's no need to mention top_builddir since Automake does that
12450 for us.
12451 (INCLUDES): Remove, as Automake says it's obsolescent.
12452 Contents migrated into AM_CPPFLAGS as described above.
12453 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12454
12455 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12456
12457 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12458 (yyreportSyntaxError): Handle case where lookahead token is
12459 YYEMPTY.
12460
12461 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12462
12463 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12464 resulting parsers are compilable with C++.
12465
12466 2003-12-23 Paul Eggert <eggert@twinsun.com>
12467
12468 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12469 * src/output.c (output_skeleton): Rename local var.
12470 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12471 Bison tokens, as this runs afoul of the 2003-10-07 change that
12472 disallowed NUL bytes in character constants or string literals.
12473
12474 * tests/local.at: Require Autoconf 2.59's Autotest.
12475 * tests/testsuite.at: Don't include local.at, since we now assume
12476 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12477 including it.
12478 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12479 multiple inclusion warnings.
12480
12481 2003-12-02 Akim Demaille <akim@epita.fr>
12482
12483 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12484 conditions.
12485 From Bruno Haible.
12486
12487 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12488
12489 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12490
12491 2003-10-07 Paul Eggert <eggert@twinsun.com>
12492
12493 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12494 if testsuite doesn't exist.
12495
12496 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12497 literals, unfortunately.
12498 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12499 Complain about NUL bytes in character constants or string literals.
12500
12501 2003-10-05 Paul Eggert <eggert@twinsun.com>
12502
12503 * NEWS: Don't document %no-default-prec, as it's still
12504 too experimental.
12505 * doc/bison.texinfo: Document %no-default-prec only if
12506 the defaultprec flag is set. Normally it's not.
12507
12508 2003-10-04 Paul Eggert <eggert@twinsun.com>
12509
12510 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12511 non-modifiable lvalue, instead of a modifiable one.
12512 * doc/bison.texinfo (Actions): Document that $$ can
12513 be assigned to. Do not claim that $$ and $N are
12514 array element references: user code should not rely on this.
12515
12516 2003-10-01 Paul Eggert <eggert@twinsun.com>
12517
12518 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12519 (grammar_declaration): Use it.
12520 * src/scan-gram.l: New token %no-default-prec.
12521 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12522 * NEWS, doc/bison.texinfo: Document the above.
12523
12524 2003-10-01 Akim Demaille <akim@epita.fr>
12525
12526 VCG no longer supports long_straight_phase.
12527
12528 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12529 * src/print_graph.c (print_graph): Adjust.
12530
12531 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12532 and Paul Eggert <eggert@twinsun.com>
12533
12534 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12535 Table of Symbols): Document %default-prec.
12536 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12537 (grammar_declaration): Set default_prec on %default-prec.
12538 * src/scan-gram.l (%default-prec): New token.
12539 * src/reader.h (default_prec): New flag.
12540 * src/reader.c: Likewise.
12541 (packgram): Handle it.
12542 * tests/conflicts.at (%default-prec without %prec,
12543 %default-prec with %prec, %default-prec 1): New tests.
12544
12545 2003-09-30 Paul Eggert <eggert@twinsun.com>
12546
12547 * tests/testsuite.at: Include local.at, not input.at, fixing
12548 a typo in the 2003-08-25 patch.
12549
12550 2003-08-27 Akim Demaille <akim@epita.fr>
12551
12552 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12553 GCC warnings.
12554
12555 2003-08-26 Akim Demaille <akim@epita.fr>
12556
12557 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12558 "<\#" to avoid magic from Gnus when posting parts of this script.
12559
12560 2003-08-26 Akim Demaille <akim@epita.fr>
12561
12562 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12563 (Parser::parse): here.
12564 Adjust: nerrs and errstatus is now replaced by...
12565 (Parser::nerrs_, Parser::errstatus_): New.
12566
12567 2003-08-25 Akim Demaille <akim@epita.fr>
12568
12569 * config/announce-gen, Makefile.cfg: New.
12570 * Makefile.am: Adjust.
12571 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12572 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12573
12574 2003-08-25 Akim Demaille <akim@epita.fr>
12575
12576 When reducing initial empty rules, Bison parser read an initial
12577 location that is not defined. This results in garbage, and that
12578 affects Bison's own parser. Therefore we need (i) to extend Bison
12579 to support a means to initialize this location, and (ii) to use
12580 this CVS Bison to fix CVS Bison's parser.
12581
12582 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12583 with...
12584 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12585 * src/parse-gram.y: Adjust.
12586 (%initial-action): New.
12587 (%error-verbose): Since we require CVS Bison, there is no reason
12588 not to use it.
12589 * src/scan-gram.l: Adjust.
12590 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12591 * data/yacc.c (yyparse): Use b4_initial_action.
12592
12593 2003-08-25 Akim Demaille <akim@epita.fr>
12594
12595 * doc/bison.texinfo: Don't promote stdout for error messages.
12596
12597 2003-08-25 Akim Demaille <akim@epita.fr>
12598
12599 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12600 From Alexandre Duret-Lutz.
12601
12602 2003-08-25 Akim Demaille <akim@epita.fr>
12603
12604 Version 1.875c.
12605
12606 2003-08-25 Akim Demaille <akim@epita.fr>
12607
12608 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12609 Use them.
12610
12611 2003-08-25 Akim Demaille <akim@epita.fr>
12612
12613 * data/lalr1.cc (Parser::reduce_print_): New.
12614 Use it.
12615
12616 2003-08-25 Akim Demaille <akim@epita.fr>
12617
12618 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12619 error recovery loops. This patch is based on
12620 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12621 Also, augment the similarity between lalr1.cc and yacc.c.
12622 Note: the locations of error recovery rules are not correct yet.
12623
12624 * data/lalr1.cc: Comment changes to augment the similarity between
12625 lalr1.cc and yacc.c.
12626 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12627 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12628 yyerrlab), when hitting EOF, pop the whole stack here instead of
12629 merely falling thru the default error handling mechanism.
12630 (yyerrorlab): New label, with the old contents of YYERROR,
12631 plus the following change: pop the stack of rhs corresponding
12632 to the production that invoked YYERROR. That is how Yacc
12633 behaves (required by POSIX).
12634 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12635 fail.
12636
12637 2003-08-25 Akim Demaille <akim@epita.fr>
12638
12639 Tune local.at so that people can "autom4te -l autotest calc.at -o
12640 calc" for instance, to extract a sub test suite.
12641
12642 * tests/testsuite.at: Move the initialization, Autotest version
12643 requirement, and AT_TESTED invocation into...
12644 * tests/local.at: here.
12645 * tests/testsuite.at: Include it for compatibility with Autoconf
12646 2.57.
12647 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12648 be ignore.
12649
12650 2003-08-04 Paul Eggert <eggert@twinsun.com>
12651
12652 Rework code slightly to avoid gcc -Wtraditional warnings.
12653 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12654 The returned value is now stored in *YY0. All callers changed.
12655 * src/output.c (merge_output): Adjust to the above change.
12656
12657 2003-07-26 Paul Eggert <eggert@twinsun.com>
12658
12659 * data/glr.c (YYASSERT): New macro.
12660 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12661 yyresolveStates, yyprocessOneStack):
12662 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12663 Derived from a suggestion by Frank Heckenbach.
12664
12665 2003-07-25 Paul Eggert <eggert@twinsun.com>
12666
12667 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12668 for portability to K&R C (after ansi2knr, presumably). See
12669 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12670 by Frank Heckenbach, though I have omitted the structure-initialization
12671 part of his glr-knr.diff patch since I recall that the Portable
12672 C Compiler didn't require that change.
12673
12674 Let the user specify how to allocate and free memory.
12675 Derived from a suggestion by Frank Heckenbach in
12676 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12677 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12678 All uses of free, malloc, realloc changed to use these macros,
12679 and unnecessary casts removed.
12680 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12681
12682 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12683
12684 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12685 use s.empty() rather than s == "" to test for empty string; see
12686 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12687 (trivial change)
12688
12689 2003-06-25 Akim Demaille <akim@epita.fr>
12690
12691 * config/depcomp, config/install-sh: Update from masters.
12692
12693 2003-06-20 Paul Eggert <eggert@twinsun.com>
12694
12695 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12696 and return properly parenthesized result.
12697 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12698 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12699 Remove unnecessary parentheses from uses.
12700 * doc/bison.texinfo (Location Default Action): Describe the
12701 conventions for parentheses.
12702
12703 2003-06-19 Paul Eggert <eggert@twinsun.com>
12704
12705 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12706 yyreportTree): Do not assume that size_t is the same width as int,
12707 when printing sizes. Print sizes using an unsigned format.
12708 Problem reported by Frank Heckenbach in
12709 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12710
12711 Port to Forte Developer 7 C compiler.
12712 * data/glr.c (struct YYLTYPE): If locations are not being used,
12713 declare a single dummy member, as empty structs do not conform
12714 to the C standard.
12715 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12716 the Forte Developer 7 C compiler complains that end-of-loop
12717 code is not reached.
12718
12719 2003-06-17 Paul Eggert <eggert@twinsun.com>
12720
12721 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12722 avoid warnings from picky compilers about redefinition of PARAMS.
12723
12724 2003-06-17 Paul Eggert <eggert@twinsun.com>
12725
12726 Version 1.875b.
12727
12728 * NEWS: Document 1.875b.
12729
12730 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12731 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12732 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12733 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12734 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12735 per recent gettext manual's suggestion.
12736 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12737 Use prototypes, not old-style definitions.
12738 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12739 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12740 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12741 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12742 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12743 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12744 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12745 vbitset_or_and_cmp, vbitset_copy): Likewise.
12746
12747 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12748 Do not include <stdlib.h>.
12749 (PARAMS): Define unconditionally for C89.
12750 (ATTRIBUTE_NORETURN): Remove.
12751 (ATTRIBUTE_UNUSED): Define unconditionally.
12752
12753 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12754 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12755 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12756 * lib/vbitset.c, lib/vbitset.h: New files.
12757 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12758 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12759 from libbitset.
12760
12761 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12762 `How Can I Reset @code{yyparse}', since texinfo does not allow
12763 arbitrary @ in node names.
12764
12765 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12766 shouldn't be needed according to the gettext 0.12.1 documentation
12767 but which seem to be needed anyway: codeset.m4 glibc21.m4
12768 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12769 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12770 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12771
12772 * lib/.cvsignore: Add stdbool.h.
12773 * m4/.cvsignore: Add nls.m4, po.m4.
12774
12775 Upgrade to CVS gnulib.
12776 * stdbool_.h: File renamed from stdbool.h.in.
12777 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12778 AC_HEADER_STDBOOL.
12779 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12780 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12781 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12782 (MOSTLYCLEANFILES): New var.
12783 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12784 (stdbool.h): New rule.
12785 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12786 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12787 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12788 m4/quote.m4: Upgrade to today's gnulib.
12789
12790 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12791 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12792 the tests right now.
12793 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12794 yyerror are declared before use; C99 requires this.
12795
12796 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12797
12798 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12799 first.
12800 (yyrecoverSyntaxError): Correct the logic for setting and testing
12801 yyerrState.
12802 Correct comment on handling EOF.
12803 Allow states with only a default reduction, rather than failing
12804 (I can't quite reconstruct why these were not allowed before).
12805
12806 Fixes to avoid problem that $-N rules in GLR parsers can cause
12807 buffer overruns, corrupting state.
12808
12809 * src/output.c (prepare_rules): Output max_left_semantic_context
12810 definition.
12811 * src/reader.h (max_left_semantic_context): New variable declaration.
12812 * src/scan-gram.l (max_left_semantic_context): Define.
12813 (handle_action_dollar): Update max_left_semantic_context.
12814 * data/glr.c (YYMAXLEFT): New definition.
12815 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12816 (yyresolveAction): Ditto.
12817
12818 Fixes to problems with location handling in GLR parsers reported by
12819 Frank Heckenbach (2003/06/05).
12820
12821 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12822 (YYRHSLOC): Add parentheses, and define only if locations used.
12823 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12824 locations not used.
12825 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12826 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12827
12828 * tests/cxx-type.at: Exercise location information; update tests
12829 to differentiate output with and without locations.
12830 Remove forward declarations of yylex and yyerror---caused errors
12831 because default YYLTYPE not yet defined.
12832 Change semantic actions to compute strings, rather than printing
12833 them directly (to test proper passing of semantics values). Change
12834 output to prefix notation and update test data and expected results.
12835 (yylex): Track locations.
12836 (stmtMerge): Return value rather than printing, and include arguments
12837 in value.
12838
12839 2003-06-03 Paul Eggert <eggert@twinsun.com>
12840
12841 Avoid warnings generated by GCC 2.95.4 when Bison is
12842 configured with --enable-gcc-warnings.
12843 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12844 yy::]b4_parser_class_name[::translate_,
12845 yy::Stack::operator[] (unsigned),
12846 yy::Stack::operator[] (unsigned) const,
12847 yy::Slice::operator[] (unsigned),
12848 yy::Slice::operator[] (unsigned) const):
12849 Rename local vars to avoid warnings.
12850 * tests/glr-regression.at (Improper handling of embedded actions
12851 and $-N in GLR parsers): Remove unused local variable from yylex.
12852 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12853 (void) as arg when not pure, since we now assume C89 when building
12854 Bison. Pacify GCC by using parameter.
12855
12856 2003-06-02 Paul Eggert <eggert@twinsun.com>
12857
12858 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12859 yy::Location::lines, yy::Location::columns): Rename arguments
12860 to avoid shadowing; this removes a warning generated by GCC 3.3.
12861
12862 2003-06-01 Paul Eggert <eggert@twinsun.com>
12863
12864 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12865 to g++, as GCC 3.3 complains if you do it.
12866 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12867 everything that WARNING_CFLAGS has, except omit warnings
12868 not suitable for C++.
12869 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12870 * tests/atlocal.in (CXXFLAGS): New var.
12871 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12872
12873 Fix a GLR parser bug I reported in February; see
12874 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12875 The problem was that GLR parsers did not conform to the C standard,
12876 because actions like { $1 = $2 + $3; } expanded to expressions
12877 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12878 to a local variable. The C standard says that expressions
12879 like (var = f ()) + (var = f ()) have undefined behavior.
12880 Another problem was that GCC sometimes issues warnings that
12881 yyfill and its parameters are unused.
12882
12883 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12884 as possibly unused.
12885 (yyfill): New function.
12886 (YYFILL): Use it.
12887 (yyuserAction): Change type of yynormal to bool, so that it matches
12888 the new yyfill signature. Mark it as possibly unused.
12889
12890
12891 Follow up on a bug I reported in February, where a Bison-generated
12892 parser can loop. Provide a test case and a fix for yacc.c. I
12893 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12894 The original bug report is in:
12895 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12896
12897 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12898 macro's size was becoming unwieldy.
12899 (yyerrlab): Do not discard an empty lookahead symbol, as this
12900 might destroy garbage.
12901 (yyerrorlab): New label, with the old contents of YYERROR,
12902 plus the following change: pop the stack of rhs corresponding
12903 to the production that invoked YYERROR. That is how Yacc
12904 behaves, and POSIX requires this behavior.
12905 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12906 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12907 Define 'alarm' to do nothing if unistd.h is not available.
12908 Add a new rule "exp: '-' error;" to test the above change to
12909 data/yacc.c. Use 'alarm' to abort any test taking longer than
12910 10 seconds, as it's probably looping.
12911 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12912 Also, the new yacc.c generates two fewer diagnostics for an
12913 existing test.
12914
12915 2003-05-24 Paul Eggert <eggert@twinsun.com>
12916
12917 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12918 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12919 This fixes a problem reported by John Bowman when the Compaq/HP
12920 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12921 -ansi -Wall -gall).
12922 * data/yacc.c (union yyalloc): Likewise.
12923 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12924
12925 Switch from 'int' to 'bool' where that makes sense.
12926
12927 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12928 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12929 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12930 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12931 Return or accept bool, not int. All callers changed.
12932 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12933 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12934 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12935 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12936 bitset_or_and_cmp_): Likewise.
12937 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12938 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12939 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12940 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12941 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12942 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12943 bitset_stats_or_and_cmp): Likewise.
12944 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12945 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12946 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12947 ebitset_xor_cmp): Likewise.
12948 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12949 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12950 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12951 lbitset_xor_cmp): Likewise.
12952 * lib/bbitset.h: Include <stdbool.h>.
12953 (struct bitset_vtable): The following members now return bool, not
12954 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12955 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12956 or_and_cmp).
12957 * src/conflicts.c (count_rr_conflicts): Likewise.
12958 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12959 All uses changed.
12960 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12961 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12962 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12963 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12964 graph_flag): Likewise.
12965 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12966 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12967 graph_flag): Likewise.
12968 * src/output.c (error_verbose): Likewise.
12969 * src/output.h (error_verbose): Likewise.
12970 * src/reader.c (start_flag, typed): Likewise.
12971 * src/reader.h (typed): Likewise.
12972 * src/getargs.c (LOCATIONS_OPTION): New constant.
12973 (long_options, getargs): Use it.
12974 * src/lalr.c (build_relations): Use bool, not int.
12975 * src/nullable.c (nullable_compute): Likewise.
12976 * src/print.c (print_reductions): Likewise.
12977 * src/tables.c (action_row, pack_vector): Likewise.
12978 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12979 * src/output.c (prepare): Use it.
12980 * src/output.c (token_definitions_output,
12981 symbol_destructors_output, symbol_destructors_output): Use string,
12982 not boolean integer, to keep track of whether to output separator.
12983 * src/print_graph.c (print_core): Likewise.
12984 * src/state.c (state_rule_lookaheads_print): Likewise.
12985
12986 * config/install-sh: Sync from automake 1.7.5.
12987
12988 2003-05-14 Paul Eggert <eggert@twinsun.com>
12989
12990 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12991 semicolon after a grammar declaration, in the interest of possible
12992 future changes to the Bison input language.
12993 Do not allow a stray semicolon at the start of the grammar.
12994 (rhses.1): Allow one or more semicolons after any rule, including
12995 just before "|" as required by POSIX.
12996 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12997 grammar.
12998
12999 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13000
13001 %parse-param support for lalr1.cc.
13002
13003 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13004 b4_cc_constructor_calls, b4_cc_constructor_call,
13005 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13006 definitions.
13007 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13008 parse-param arguments.
13009 (yy::b4_parser_class_name): Declare instance variables to
13010 hold parse-param arguments.
13011 * tests/calc.at: s/value/semantic_value/ because value clashes
13012 with a member of yy::b4_parser_class_name. Adjust C++ code
13013 to handle %parse-param. Enable %parse-param test in C++.
13014
13015 2003-05-12 Paul Eggert <eggert@twinsun.com>
13016
13017 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13018 English a bit. Fix fclose typo. Change "const char" to "char
13019 const", and use ANSI C rather than K&R for "main". Suggest
13020 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13021 and suggest yy_switch_to_buffer.
13022
13023 2003-05-05 Paul Eggert <eggert@twinsun.com>
13024
13025 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13026 C89. This avoids a diagnostic on compilers that define __STDC__
13027 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13028 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13029
13030 2003-05-03 Paul Eggert <eggert@twinsun.com>
13031
13032 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13033 Do not overrun array bounds.
13034 This should fix a bug reported today by Olatunji Oluwabukunmi in
13035 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13036
13037 2003-04-29 Akim Demaille <akim@epita.fr>
13038
13039 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13040 * src/getargs.c, src/getargs.h: here, as bool, not int.
13041 (nondeterministic_parser): New.
13042 * src/parse-gram.y, src/scan-gram.l: Support
13043 %nondeterministic-parser.
13044 * src/output.c (prepare): Use nondeterministic_parser instead
13045 of glr_parser where appropriate.
13046 * src/tables.c (conflict_row, action_row, save_row)
13047 (token_actions, token_actions, pack_vector): Ditto.
13048
13049 2003-04-29 Akim Demaille <akim@epita.fr>
13050
13051 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13052
13053 2003-04-29 Akim Demaille <akim@epita.fr>
13054
13055 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13056 with %pure-parser and %locations to exercise the patch from Yakov
13057 Markovitch below.
13058
13059 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13060
13061 * data/yacc.c: (b4_lex_param): Corrected for the case where
13062 %lex-param is provided and %pure-parser isn't.
13063
13064 2003-04-27 Paul Eggert <eggert@twinsun.com>
13065
13066 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13067 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13068 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13069 if it is not defined.
13070 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13071
13072 2003-04-26 Paul Eggert <eggert@twinsun.com>
13073
13074 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13075 Declare to be of type suitable for the ninf value itself, not of
13076 type suitable for the corresponding table, since the latter might
13077 be unsigned but the ninf value might be negative. This fixes a
13078 bug reported by Alexandre Duret-Lutz in
13079 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13080
13081 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13082 invokes it. We shouldn't invoke it twice because it will attempt
13083 to put error.o in the archive twice. This fixes a glitch reported
13084 by Martin Mokrejs in
13085 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13086
13087 2003-04-21 Paul Eggert <eggert@twinsun.com>
13088
13089 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13090 to gnulib.
13091
13092 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13093
13094 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13095 Fix obvious typo that results in uncompilable GLR parsers
13096 when both %pure-parser and %locations are used. (trivial change)
13097
13098 2003-04-17 Paul Eggert <eggert@twinsun.com>
13099
13100 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13101 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13102 Do not insert the expected token via unput, as this runs afoul
13103 of a POSIX-compatibility bug in flex 2.5.31.
13104 All uses changed to BEGIN the parent state,
13105 since we no longer insert the expected token via unput.
13106 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13107 that is no longer emitted after the above change.
13108
13109 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13110 the first one. This change is from Paul Hilfinger, and it fixes
13111 regression reported by Werner Lemberg in
13112 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13113
13114 (resolve_sr_conflict): Don't invoke state_errs_set
13115 unless one or more tokens have been explicitly made errors.
13116 Otherwise, the above change causes Bison to abort.
13117
13118 * tests/existing.at (GNU pic Grammar): New test case, taken from
13119 Lemberg's email.
13120
13121 2003-03-31 Akim Demaille <akim@epita.fr>
13122
13123 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13124
13125 2003-03-31 Akim Demaille <akim@epita.fr>
13126
13127 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13128 output.
13129
13130 2003-03-31 Akim Demaille <akim@epita.fr>
13131
13132 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13133 From Paul Hilfinger.
13134
13135 2003-03-29 Akim Demaille <akim@epita.fr>
13136
13137 * m4/error.m4: Do not put under dynamic conditions some code which
13138 expansion is under static control.
13139
13140 2003-03-29 Akim Demaille <akim@epita.fr>
13141
13142 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13143
13144 2003-03-29 Akim Demaille <akim@epita.fr>
13145
13146 * doc/bison.texinfo (Strings are Destroyed): New.
13147
13148 2003-03-13 Paul Eggert <eggert@twinsun.com>
13149
13150 * .cvsignore: Add configure.lineno.
13151 * src/.cvsignore: Add yacc.
13152 * tests/.cvsignore: Add testsuite.log.
13153 * doc/fdl.texi: Sync with latest FSF version.
13154
13155 2003-03-12 Paul Eggert <eggert@twinsun.com>
13156
13157 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13158 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13159 cursor, instead of leaving it undefined. This fixes a bug
13160 reported by Tim Van Holder in
13161 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13162 * tests/input.at (Torturing the Scanner): Test the scanner on
13163 an empty input file, which was Tim Van Holder's test case.
13164
13165 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13166 <sys/resource.h> can be included, include sys/time.h and
13167 sys/times.h first, if available. This works around the SunOS
13168 4.1.4 porting bug reported by Bruce Becker in
13169 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13170
13171 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13172 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13173 AC_HEADER_SYS_WAIT.
13174
13175 Merge changes from gnulib. This was prompted because the CVS
13176 snapshot didn't build on Solaris 7 due to strnlen problems.
13177
13178 These changes need to be merged back into gnulib:
13179 * lib/hash.c: Include <stdbool.h> unconditionally.
13180 * m4/onceonly.m4 (m4_quote): New macro.
13181 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13182 Quote AC_FOREACH variable-expansions properly.
13183 The 2003-01-03 obstack.h change also needs merging.
13184 {end of changes requiring merging}
13185
13186 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13187 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13188 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13189 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13190 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13191 New files, imported from gnulib.
13192 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13193 above.
13194
13195 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13196 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13197 gnulib sources.
13198
13199 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13200 Add.
13201 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13202 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13203 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13204 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13205 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13206 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13207 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13208 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13209 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13210 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13211 (jm_PREREQ_ARGMATCH): Remove.
13212 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13213 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13214
13215 * src/system.h: Include <stdbool.h> unconditionally.
13216
13217 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13218 assuming at least C89 in the bitset code for some time now.
13219
13220 2003-03-03 Akim Demaille <akim@epita.fr>
13221
13222 * ro.po: New.
13223
13224 2003-03-02 Akim Demaille <akim@epita.fr>
13225
13226 * doc/bison.texinfo (Table of Symbols): Reactivate the
13227 documentation for %lex-param, and %parse-param.
13228
13229 2003-03-02 Akim Demaille <akim@epita.fr>
13230
13231 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13232 generate verbose error messages.
13233 Use the number of tokens as an upper bound in yytname, as it
13234 cannot be a non terminal.
13235
13236 2003-03-02 Akim Demaille <akim@epita.fr>
13237
13238 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13239 message.
13240
13241 2003-03-02 Akim Demaille <akim@epita.fr>
13242
13243 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13244 Use them to exercise yycheck overrun.
13245 Based on Andrew Suffield's grammar.
13246
13247 2003-03-02 Akim Demaille <akim@epita.fr>
13248
13249 Create tests/local.at for Bison generic testing macros.
13250
13251 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13252 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13253 This new file.
13254 * tests/calc.at (AT_CHECK_CALC): Adjust.
13255 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13256 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13257 * tests/local.at: here.
13258 (AT_COMPILE_CXX): Tags the tests using it as c++.
13259 Ignore the test if CXX is not functional.
13260
13261 2003-03-01 Paul Eggert <eggert@twinsun.com>
13262
13263 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13264 not loc->end, since loc->end might contain garbage and this leads
13265 to undefined behavior on some platforms.
13266 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13267 depend on *loc, so that the reader doesn't give the the false
13268 impression that *loc is initialized.
13269 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13270 does not survive the return.
13271
13272 2003-03-01 Akim Demaille <akim@epita.fr>
13273
13274 * src/scan-gram.l (code_start): Always initialize it when entering
13275 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13276 yylex invocation. An alternative would be making it static, but
13277 then it starts with the second %%'s beginning, instead of its end.
13278
13279 2003-02-28 Paul Eggert <eggert@twinsun.com>
13280
13281 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13282 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13283 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13284
13285 2003-02-26 Paul Eggert <eggert@twinsun.com>
13286
13287 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13288 Remove Sequent/Pyramid discussion (nobody uses them any more).
13289 Merge VMS and MS-DOS discussion; these ports may well be dead
13290 but let's keep mentioning them for now. Put <> around email
13291 addresses. Add copyright notice.
13292
13293 2003-02-24 Paul Eggert <eggert@twinsun.com>
13294
13295 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13296 to avoid collision with flex use of yylineno.
13297 Problem reported by Bruce Lilly in
13298 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13299 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13300 * data/yacc.c (yy_reduce_print): Likewise.
13301
13302 * config/depcomp: Sync with Automake 1.7.3.
13303
13304 2003-02-21 Akim Demaille <akim@epita.fr>
13305
13306 * data/lalr1.cc: Use temporary variables instead of casts to
13307 change integer types.
13308 Suggested by Paul Eggert.
13309
13310 2003-02-21 Akim Demaille <akim@epita.fr>
13311
13312 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13313 to avoid confusions with lalr1.cc's notion of Position.
13314 Suggested by Paul Eggert.
13315
13316 2003-02-20 Akim Demaille <akim@epita.fr>
13317
13318 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13319 before initial_columns.
13320 (location.hh): Use consistent variable names when defining the
13321 operator<<.
13322 Use "last" so that we subtract from Positions, not from unsigned.
13323
13324 2003-02-20 Akim Demaille <akim@epita.fr>
13325
13326 * data/lalr1.cc (position.hh): New subfile, including the extended
13327 and Doxygen'ed documentation of class Position.
13328 (location.hh): Use it.
13329 Document a` la Doxygen.
13330 With the help of Benoit Perrot.
13331
13332 2003-02-20 Akim Demaille <akim@epita.fr>
13333
13334 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13335 AT_YACC_IF.
13336 Redefine AT_YYERROR_SEES_LOC_IF using it.
13337 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13338 not defined.
13339 Don't use the location in yy::Parser::error_ and
13340 yy::Parser::print_ when not %locations.
13341 Activate more lalr1.cc tests.
13342
13343 2003-02-19 Akim Demaille <akim@epita.fr>
13344
13345 * data/lalr1.cc: When displaying a line number, be sure to make it
13346 an int.
13347
13348 2003-02-19 Akim Demaille <akim@epita.fr>
13349
13350 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13351 Remove, useless.
13352 (YYABORT, YYACCEPT, YYERROR): New.
13353 * tests/calc.at: Renable the lalr1.cc test.
13354
13355 2003-02-19 Akim Demaille <akim@epita.fr>
13356
13357 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13358 error recovery, mixing with/without pops and discarding of the
13359 lookahead.
13360 Exercise YYERROR.
13361 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13362
13363 2003-02-17 Paul Eggert <eggert@twinsun.com>
13364
13365 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13366 * tests/testsuite.at (AT_COMPILE): Use them.
13367 This fixes the testsuite problem reported by Robert Lentz in
13368 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13369
13370 2003-02-12 Paul Eggert <eggert@twinsun.com>
13371
13372 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13373 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13374 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13375 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13376 Check for malloc failure, for consistency with yacc.c.
13377 (yytname_size): Remove, for consistency with yacc.c.
13378
13379 The bug still remains in data/lalr1.cc, as I didn't have time
13380 to fix it there.
13381
13382 2003-02-06 Akim Demaille <akim@epita.fr>
13383
13384 * configure.ac (GXX): Rename as...
13385 (CXX): this, to keep the original Autoconf semantics.
13386 Require 2.57.
13387 * data/lalr1.cc: Fix b4_copyright invocations.
13388 If YYDEBUG is not defined, don't depend upon name_ being defined.
13389 (location.hh): Include string and iostream.
13390 (Position::filename): New member.
13391 (Position::Position ()): New.
13392 (operator<< (Position)): New.
13393 (operator- (Position, int)): New.
13394 (Location::first, Location::last): Rename as...
13395 (Location::begin, Location::end): these, to mock the conventional
13396 iterator names.
13397 (operator<< (Location)): New.
13398 * tests/atlocal.in (CXX): New.
13399 * tests/testsuite.at (AT_COMPILE_CXX): New.
13400 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13401 locations in a more synthetic way.
13402 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13403 lalr1.cc is used.
13404 Adjust the C locations to match those from Emacs: first column is
13405 column 0.
13406 Change all the expected results.
13407 Conform to the GCS: simplify the locations when applicable.
13408 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13409 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13410 these CPP macros with the m4 macros new defined by...
13411 (AT_CHECK_PUSHDEFS): this, i.e.:
13412 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13413 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13414 New macros.
13415 (AT_CHECK_POPDEFS): Undefine them.
13416 (AT_CHECK_CALC_LALR1_CC): New.
13417 Use it for the first lalr1.cc test.
13418
13419 2003-02-04 Akim Demaille <akim@epita.fr>
13420
13421 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13422 Location as is defined.
13423
13424 2003-02-04 Akim Demaille <akim@epita.fr>
13425
13426 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13427 name_ being defined.
13428
13429 2003-02-03 Paul Eggert <eggert@twinsun.com>
13430
13431 * src/gram.h (start_symbol): Remove unused decl.
13432
13433 Use more-consistent naming conventions for local vars.
13434
13435 * src/derives.c (derives_compute): Change type of local var from
13436 int to rule_number.
13437 * src/gram.c (grammar_rules_partial_print): Likewise.
13438 * src/print.c (print_core): Likewise.
13439 * src/reduce.c (reduce_grammar_tables): Likewise.
13440
13441 * src/gram.c (grammar_dump): Change name of item_number *
13442 local var from r to rp.
13443 * src/nullable.c (nullable_compute): Likewise.
13444
13445 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13446
13447 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13448 for symbol or symbol_number var.
13449 * src/reader.c (grammar_start_symbol_set): Likewise.
13450 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13451 Likewise.
13452 * src/state.c (transitions_to): Likewise.
13453 * src/state.h: Likewise.
13454 * src/tables.c (symbol_number_to_vector_number): Likewise.
13455
13456 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13457 char * var.
13458
13459 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13460 var.
13461
13462 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13463 var.
13464
13465 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13466 Use str, not s, for char * var. Use ch, not c, for character var.
13467 Use size for size var.
13468
13469 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13470 char * var.
13471 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13472 uniqstr var.
13473 * src/uniqstr.h: Likewise.
13474
13475 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13476 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13477 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13478 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13479 param to have same name as that of enum, so that we don't use
13480 "s" to stand for a non-state.
13481
13482 2003-02-02 Akim Demaille <akim@epita.fr>
13483
13484 * src/scan-skel.l: Scan more than one inert character per yylex
13485 invocation.
13486
13487 2003-02-01 Paul Eggert <eggert@twinsun.com>
13488
13489 Version 1.875a.
13490
13491 * po/LINGUAS: Add ms.
13492
13493 2003-01-30 Akim Demaille <akim@epita.fr>
13494
13495 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13496
13497 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13498
13499 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13500 of $1.
13501
13502 Changes in response to error report by S. Eken: GLR mode does not
13503 handle negative $ indices or $ indices in embedded rules correctly.
13504 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13505
13506 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13507 (b4_rhs_location): Ditto.
13508 (yyfill): New function to copy from stack tree into array
13509 incrementally.
13510 (yyuserAction): Modify to allow incremental move of semantic values
13511 to rhs array when in GLR mode.
13512 Define YYFILL to use in user-defined actions to fill semantic array
13513 as needed.
13514 Remove dummy use of yystack, as there is now a guaranteed use.
13515 (yydoAction): Modify to allow incremental move of semantic values
13516 to rhs array when in GLR mode.
13517 (yyresolveAction): Ditto.
13518 (yyglrShiftDefer): Update comment.
13519 (yyresolveStates): Use X == NULL for pointers, not !X.
13520 (yyglrReduce): Ditto.
13521 (yydoAction): Ditto
13522
13523 * tests/glr-regr1.at: Rename to ...
13524 * tests/glr-regression.at: Add new regression test for the problems
13525 described above (adapted from S. Eken).
13526 Update copyright notice.
13527 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13528 * tests/Makefile.am: Ditto.
13529
13530 2003-01-28 Paul Eggert <eggert@twinsun.com>
13531
13532 * data/lalr1.cc: Do not use @output_header_name@ unless
13533 b4_defines_flag is set. This fixes two bugs reported by
13534 Tim Van Holder in
13535 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13536 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13537
13538 2003-01-21 Paul Eggert <eggert@twinsun.com>
13539
13540 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13541 we don't need to worry about yyerrlab1 being reported as an
13542 "unused label" by non-GCC C compilers. The downside is that if
13543 locations are used then a couple of statements are duplicated each
13544 time YYERROR is invoked, but the upside is that the warnings
13545 should vanish.
13546 (yyerrlab1): Move code to YERROR.
13547 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13548 This reverts some of the 2002-12-27 change.
13549
13550 2003-01-17 Paul Eggert <eggert@twinsun.com>
13551
13552 * src/output.c (symbol_printers_output): Fix typo that led
13553 to core dump. Problem reported by Antonio Rus in
13554 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13555
13556 2003-01-13 Akim Demaille <akim@epita.fr>,
13557 Quoc Peyrot <chojin@lrde.epita.fr>,
13558 Robert Anisko <anisko_r@lrde.epita.fr>
13559
13560 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13561 when the stacks contain one element, as the loop would otherwise
13562 free the last state, and then use the top state (the one we just
13563 popped). This means that the initial elements will not be freed
13564 explicitly, as is the case in yacc.c; it is not a problem, as
13565 these elements have fake values.
13566
13567 2003-01-11 Paul Eggert <eggert@twinsun.com>
13568
13569 * NEWS: %expect-violations are now just warnings, reverting
13570 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13571 bootstrapping problem reported by Matthias Klose; see
13572 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13573 * src/conflicts.c (conflicts_print): Likewise.
13574 * tests/conflicts.at (%expect not enough, %expect too much,
13575 %expect with reduce conflicts): Likewise.
13576 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13577 that the warning is enabled if the number of conflicts changes
13578 (not necessarily increases).
13579
13580 * src/getargs.c (version): Update copyright year.
13581
13582 2003-01-09 Akim Demaille <akim@epita.fr>
13583
13584 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13585
13586 2003-01-08 Paul Eggert <eggert@twinsun.com>
13587
13588 * Makefile.maint (WGETFLAGS):
13589 New macro, containing "-C off" to disable proxy caches.
13590 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13591 (rel-check): Use $(WGET) instead of wget.
13592
13593 2003-01-06 Paul Eggert <eggert@twinsun.com>
13594
13595 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13596 the GLR paper of Scott, Johnstone and Hussain.
13597
13598 2003-01-04 Paul Eggert <eggert@twinsun.com>
13599
13600 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13601 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13602 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13603 (EXTRA_LIBRARIES): New var, for liby.a.
13604 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13605 (EXTRA_SCRIPTS): New var, for yacc.
13606
13607 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13608 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13609 Problem reported by Nelson H. F. Beebe.
13610
13611 2003-01-03 Paul Eggert <eggert@twinsun.com>
13612
13613 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13614 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13615 when compiling Bison 1.875's `bitset bset = obstack_alloc
13616 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13617
13618 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13619 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13620 grow to a huge size with typical invocation.
13621
13622 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13623 Use the pattern recommended by Autoconf 2.57, except also protect
13624 against double-definition.
13625 * src/system.h: Likewise.
13626 Portability issues reported by Nelson H. F. Beebe.
13627
13628 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13629 All uses changed. Provide a definition in both C and C++.
13630 (yytrue, yyfalse): Define even if defined (__cplusplus).
13631
13632 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13633 Reported by Nelson H. F. Beebe.
13634
13635 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13636
13637 2003-01-02 Paul Eggert <eggert@twinsun.com>
13638
13639 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13640 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13641 Bug reported by Nelson H. F. Beebe.
13642
13643 2003-01-01 Paul Eggert <eggert@twinsun.com>
13644
13645 * Version 1.875.
13646
13647 2002-12-30 Paul Eggert <eggert@twinsun.com>
13648
13649 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13650 Moved here from...
13651 (<INITIAL>","): Here. This causes stray "," to be treated
13652 more uniformly.
13653
13654 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13655 last brace in braced code when not in Yacc mode, for compatibility
13656 with Bison 1.35. This resurrects the 2001-12-15 patch to
13657 src/reader.c.
13658
13659 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13660 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13661
13662 2002-12-28 Paul Eggert <eggert@twinsun.com>
13663
13664 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13665 that of SYM's type. This fixes Debian bug 168069, reported by
13666 Thomas Olsson.
13667
13668 2002-12-28 Paul Eggert <eggert@twinsun.com>
13669
13670 Version 1.75f.
13671
13672 Switch back to the Yacc style of conflict reports, undoing some
13673 of the 2002-07-30 change.
13674 * doc/bison.texinfo (Understanding): Use Yacc style for
13675 conflict reports. Also, use new way of locating rules.
13676 * src/conflicts.c (conflict_report):
13677 Renamed from conflict_report_yacc, removing the old
13678 'conflict_report'. Translate the entire conflict report at once,
13679 so that we don't assume that "," has the same interpretation in
13680 all languages.
13681 (conflicts_output): Use Yacc-style conflict report for each state,
13682 instead of our more-complicated style.
13683 (conflicts_print): Use Yacc-style conflict report, except print
13684 the input file name when not emulating Yacc.
13685 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13686 Conflicted Reduction, %expect not enough, %expect too much,
13687 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13688 * tests/existing.at (GNU Cim Grammar): Likewise.
13689 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13690
13691 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13692 fatal): Don't invoke fflush; it's not needed and it might even be
13693 harmful for stdout, as stdout might not be open.
13694 * src/reduce.c (reduce_print): Likewise.
13695
13696 2002-12-27 Paul Eggert <eggert@twinsun.com>
13697
13698 Fix a bug where error locations were not being recorded correctly.
13699 This problem was originally reported by Paul Hilfinger in
13700 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13701
13702 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13703 top of the location stack's error locations.
13704 (yyerrlab): Set it. When discarding a token, push its location
13705 onto yylerrsp so that we don't lose track of the error's end.
13706 (yyerrlab1): Now is only the target of YYERROR, so that we can
13707 properly record the location of the action that failed. For GCC
13708 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13709 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13710 (yyerrlab2): New label, which yyerrlab now falls through to.
13711 Compute the error's location by applying YYLLOC_DEFAULT to
13712 the locations of all the symbols that went into the error.
13713 * doc/bison.texinfo (Location Default Action): Mention that
13714 YYLLOC_DEFAULT is also invoked for syntax errors.
13715 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13716 Error locations include the locations of all the tokens that were
13717 discarded, not just the last token.
13718
13719 2002-12-26 Paul Eggert <eggert@twinsun.com>
13720
13721 * src/files.c: Include quote.h.
13722 (compute_output_file_names): Warn if we detect conflicting
13723 outputs to the same file. This should catch the misunderstanding
13724 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13725
13726 * src/conflicts.c (conflicts_print): If the user specifies
13727 "%expect N", report an error if there are any reduce/reduce
13728 conflicts. This is what the manual says should happen.
13729 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13730 * tests/conflicts.at (%expect with reduce conflicts): New test.
13731
13732 Don't use m4_include on relative file names, as it doesn't work as
13733 desired if there happens to be a file with that name under ".".
13734
13735 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13736 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13737 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13738 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13739 * src/output.c (output_skeleton): Use full path names when
13740 specifying a file to include; don't rely on include path, as
13741 it's unreliable when the working file contains a file with
13742 that name.
13743
13744 2002-12-25 Paul Eggert <eggert@twinsun.com>
13745
13746 Remove obsolete references to bison.simple and bison.hairy.
13747 Problem mentioned by Aubin Mahe in
13748 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13749 * data/glr.c: Comment fix.
13750 * doc/bison.1: Remove references. Also, mention "yacc".
13751
13752 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13753 with -g option.
13754
13755 * src/parse-gram.y (declaration): Use enum "report_states" rather
13756 than its numeric value 1.
13757
13758 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13759 opening a new one. This fixes Debian bug 165349, reported by
13760 Bruce Stephens.
13761
13762 2002-12-24 Paul Eggert <eggert@twinsun.com>
13763
13764 Version 1.75e.
13765
13766 * Makefile.maint (cvs-update): Don't assume that the shell
13767 supports $(...), as Solaris sh doesn't.
13768
13769 * src/parse-gram.y (lloc_default): Remove test for empty
13770 nonterminals at the end, since it didn't change the result.
13771
13772 2002-12-24 Paul Eggert <eggert@twinsun.com>
13773
13774 If the user does not define YYSTYPE as a macro, Bison now declares it
13775 using typedef instead of defining it as a macro. POSIX requires this.
13776 For consistency, YYLTYPE is also declared instead of defined.
13777
13778 %union directives can now have a tag before the `{', e.g., the
13779 directive `%union foo {...}' now generates the C code
13780 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13781 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13782 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13783 instead of `yyltype'.
13784
13785 `yystype' and `yyltype' are now obsolescent macros instead of being
13786 typedefs or tags; they are no longer documented and will be
13787 withdrawn in a future release.
13788
13789 * data/glr.c (b4_location_type): Remove.
13790 (YYSTYPE): Renamed from yystype.
13791 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13792 (struct YYLTYPE): Renamed from struct yyltype.
13793 (YYLTYPE): Renamed from yyltype.
13794 (yyltype, yystype): New (and obsolescent) macros,
13795 for backward compatibility.
13796 * data/yacc.c: Likewise.
13797
13798 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13799 does not specify a union tag. This is for compatibility with
13800 Solaris 9 yacc.
13801
13802 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13803 const *, since it is now modified by stripping surrounding { }.
13804 (current_braced_code): Remove.
13805 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13806 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13807 trailing " {...}". Now of type <chars>.
13808 (grammar_declaration): Adjust to bundled tokens.
13809 (code_content): Remove; stripping is now done by add_param.
13810 (print_token_value): Print contents of bundled tokens.
13811 (token_name): New function.
13812
13813 * src/reader.h (braced_code, current_braced_code): Remove.
13814 (token_name): New decl.
13815
13816 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13817 token_type, not braced_code code_kind. All uses changed.
13818 (SC_PRE_CODE): New state, for scanning after a keyword that
13819 has (or usually has) an immediately-following braced code.
13820 (token_type): New local var, to keep track of which token type
13821 to return when scanning braced code.
13822 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13823 <INITIAL>"%parse-param", <INITIAL>"%printer",
13824 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13825 instead of returning a token type immediately.
13826 (<INITIAL>"{"): Set token type.
13827 (<SC_BRACED_CODE>"}"): Use it.
13828 (handle_action_dollar, handle_action_at): Now returns bool
13829 indicating success. Fail if ! current_rule; this prevents a core dump.
13830 (handle_symbol_code_dollar, handle_symbol_code_at):
13831 Remove; merge body into caller.
13832 (handle_dollar, handle_at): Complain in invalid contexts.
13833
13834 * NEWS, doc/bison.texinfo: Document the above.
13835 * NEWS: Fix years and program names in copyright notice.
13836
13837 2002-12-17 Paul Eggert <eggert@twinsun.com>
13838
13839 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13840 Reporting, Table of Symbols): Omit mentions of %lex-param and
13841 %parse-param from the documentation for now.
13842
13843 2002-12-15 Paul Eggert <eggert@twinsun.com>
13844
13845 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13846 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13847 lookahead symbol, and which sets yychar in parser actions) and it
13848 disagreed with the Bison documentation. Bug
13849 reported by Andrew Walrond.
13850
13851 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13852 as the caller now does that.
13853 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13854 (YYEMPTY): Parenthesize right hand side, since others use it.
13855 (yyparse): Don't assume that our generated code is the only code
13856 that sets yychar.
13857
13858 2002-12-13 Paul Eggert <eggert@twinsun.com>
13859
13860 Version 1.75d.
13861
13862 POSIX requires a "yacc" command.
13863 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13864 (MOSTLYCLEANFILES): Add yacc.
13865 (yacc): New rule.
13866 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13867 as an alias for bison y.
13868
13869 * po/LINGUAS: Add da.
13870
13871 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13872 problem with latest <getopt.h>.
13873 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13874
13875 * doc/fdl.texi: Upgrade to 1.2.
13876 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13877 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13878 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13879 gnulib.
13880 * config/install-sh: Sync with autotools.
13881
13882 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13883 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13884 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13885 locations are requested.
13886 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13887 locations are requested.
13888
13889 2002-12-12 Paul Eggert <eggert@twinsun.com>
13890
13891 Remove unportable casts and storage allocation tricks.
13892 While we're at it, remove almost all casts, since they
13893 usually aren't needed and are a sign of trouble.
13894
13895 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13896
13897 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13898 the pointer DSET returned by malloc; this isn't portable.
13899 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13900 Similarly for DERIVES.
13901 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13902 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13903 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13904
13905 * src/derives.c (derives_compute): Do not bother invoking
13906 int_of_rule_number, since rule numbers are integers.
13907
13908 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13909 rather than XMALLOC (char, N).
13910
13911 * src/files.c (filename_split): Rewrite to avoid cast.
13912
13913 * src/gram.h (symbol_number_as_item_number,
13914 item_number_as_symbol_number, rule_number_as_item_number,
13915 item_number_as_rule_number):
13916 Now inline functions rather than macros, to avoid casts.
13917 * src/state.h (state_number_as_int): Likewise.
13918 * src/tables.c (state_number_to_vector_number,
13919 symbol_number_to_vector_number): Likewise.
13920
13921 * src/gram.h (int_of_rule_number): Remove; no longer used.
13922
13923 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13924 since the resulting storage is always stored into.
13925
13926 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13927 where it's needed.
13928
13929 * src/muscle_tab.c (muscle_m4_output):
13930 Now inline. Return bool, not int.
13931 * src/state.c (state_compare): Likewise.
13932 * src/symtab.c (symbol_check_defined,
13933 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13934 hash_compare_symbol, hash_symbol):
13935 Likewise.
13936 * src/uniqstr.c (uniqstr_print): Likewise.
13937 * src/muscle_tab.c (muscle_m4_output_processor):
13938 New function, to avoid casts.
13939 * src/state.c (state_comparator, stage_hasher): Likewise.
13940 * src/symtab.c (symbol_check_defined_processor,
13941 symbol_check_alias_consistency_processor, symbol_pack_processor,
13942 symbol_translation_processor, hash_symbol_comparator,
13943 hash_symbol_hasher): Likewise.
13944 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13945 * src/muscle_tab.c (muscles_m4_output):
13946 Use new functions instead of casting old functions unportably.
13947 * src/state.c (state_hash_new): Likewise.
13948 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13949 symbols_token_translations_init):
13950 Likewise.
13951 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13952
13953 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13954 var instead of casting to long, to avoid casts.
13955 (prepare_states): Use MALLOC rather than alloca, so that we don't
13956 have to worry about alloca.
13957 * src/state.c (state_hash_lookup): Likewise.
13958
13959 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13960 local var instead of casting to unsigned char, to avoid casts.
13961
13962 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13963 STATE_ALLOC): Remove.
13964 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13965 rather than calloc, and use offsetof to avoid allocating slightly
13966 too much storage.
13967 (state_new): Initialize all members.
13968
13969 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13970
13971 * src/symtab.c (symbol_free): Remove; unused.
13972 (symbol_get): Remove cast in lhs of assignment.
13973 (symbols_do): Now static. Accept generic arguments, not
13974 hashing-related ones.
13975
13976 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13977 (symbol_processor): Remove.
13978 (symbols_do): Remove decl; now static.
13979
13980 * src/system.h (alloca): Remove; decl no longer needed.
13981 (<stddef.h>): Include, for offsetof.
13982 (<inttypes.>, <stdint.h>): Include if available.
13983 (uintptr_t): New type, if system lacks it.
13984 (CALLOC, MALLOC, REALLOC): New macros.
13985 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13986 new macros.
13987
13988 * src/tables.c (table_size): Now int, to pacify GCC.
13989 (table_grow, table_ninf_remap): Use signed table size.
13990 (save_row): Don't bother initializing locals when not needed.
13991 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13992 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13993
13994 * src/vcg.h: Correct misspellings.
13995
13996 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13997
13998
13999 * src/getargs.c (getargs): Don't assume EOF == -1.
14000
14001 2002-12-09 Paul Eggert <eggert@twinsun.com>
14002
14003 Change identifier spellings to avoid collisions with names
14004 that are reserved by POSIX.
14005
14006 Don't use names ending in _t, since POSIX reserves them.
14007 For consistency, remove _e and _s endings -- they're weren't
14008 needed to remove ambiguity. All uses changed.
14009 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14010 turn was just renamed from struniq_t.
14011 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14012 which in turn was just renamed from struniq_processor_t.
14013 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14014 in turn was renamed from hash_compare_struniq_t.
14015 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14016 (state_list): Renamed from state_list_t.
14017 * src/assoc.h (assoc): Renamed from assoc_t.
14018 * src/conflicts.c (enum conflict_resolution): Renamed from
14019 enum conflict_resolution_e.
14020 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14021 (rule_list): Renamed from rule_list_t.
14022 * src/getargs.h (enum trace): Renamed from enum trace_e.
14023 (enum report): Renamed from enum report_e.
14024 * src/gram.h (item_number): Renamed from item_number_t.
14025 (rule_number): Renamed from rule_number_t.
14026 (struct rule_s): Remove the "rule_s" part; not used.
14027 (rule): Renamed from rule_t.
14028 (rule_filter): Renamed from rule_filter_t.
14029 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14030 (goto_list): Renamed from goto_list_t.
14031 * src/lalr.h (goto_number): Renamed from goto_number_t.
14032 * src/location.h (location): Renamed from location_t.
14033 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14034 and moved here from:
14035 * src/muscle_tab.h (muscle_entry_t): here.
14036 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14037 (rule_list): Renamed from rule_list_t.
14038 * src/print_graph.c (static_graph): Renamed from graph.
14039 * src/reader.h (braced_code): Renamed from braced_code_t.
14040 Remove brace_code_e tag.
14041 * src/relation.h (relation_node): Renamed from relation_node_t.
14042 (relation_nodes): Renamed from relation_nodes_t.
14043 (relation): Renamed from relation_t.
14044 * src/state.h (state_number): Renamed from state_number_t.
14045 (struct state): Renamed from struct state_s.
14046 (state): Renamed from state_t.
14047 (transitions): Renamed from transitions_t. Unused (and
14048 misspelled) transtion_s tag removed.
14049 (errs): Renamed from errs_t. Unused errs_s tag removed.
14050 (reductions): Renamed from reductions_t. Unused tag
14051 reductions_s removed.
14052 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14053 (struct symbol_list): Renamed from struct symbol_list_s.
14054 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14055 (struct symbol): Renamed from struct symbol_s.
14056 (symbol): Renamed from symbol_t.
14057 * src/tables.c (vector_number): Renamed from vector_number_t.
14058 (action_number): Renamed from action_t.
14059 * src/tables.h (base_number): Renamed from base_t.
14060 * src/vcg.h (enum color): Renamed from enum color_e.
14061 (enum textmode): Renamed from enum textmode_e.
14062 (enum shape): Renamed from enum shape_e.
14063 (struct colorentry): Renamed from struct colorentry_s.
14064 (struct classname): Renamed from struct classname_s.
14065 (struct infoname): Renamed from struct infoname_s.
14066 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14067 (enum decision): Renamed from enum decision_e.
14068 (enum orientation): Renamed from enum orientation_e.
14069 (enum alignment): Renamed from enum alignment_e.
14070 (enum arrow_mode): Renamed from enum arrow_mode_e.
14071 (enum crossing_type): Renamed from enum crossing_type_e.
14072 (enum view): Renamed from enum view_e.
14073 (struct node): Renamed from struct node_s.
14074 (node): Renamed from node_t.
14075 (enum linestyle): Renamed from enum linestyle_e.
14076 (enum arrowstyle): Renamed from enum arrowstyle_e.
14077 (struct edge): Renamed from struct edge.
14078 (edge): Renamed from edge_t.
14079 (struct graph): Renamed from struct graph_s.
14080 (graph): Renamed from graph_t.
14081 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14082 Rename value_t -> value.
14083 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14084 value_t_as_yystype -> value_as_yystype.
14085
14086 Don't include <errno.h> in the mainstream code, since it
14087 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14088 * lib/get-errno.c, lib/get-errno.h: New files.
14089 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14090 get-errno.c.
14091 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14092 * src/output.c (output_skeleton): Likewise.
14093 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14094 instead of errno.
14095 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14096 Likewise.
14097 (handle_action_dollar, handle_action_at): Likewise.
14098 * src/system.h: Do not include <errno.h>.
14099 (TAB_EXT): Renamed from EXT_TAB.
14100 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14101
14102 Avoid str[a-z]*, since <string.h> reserves that name space.
14103 Change all instances of "struniq" in names to "uniqstr", and
14104 likewise for "STRUNIQ" and "UNIQSTR".
14105 * src/uniqstr.c: Renamed from src/struniq.c.
14106 * src/uniqstr.h: Renamed from src/struniq.h.
14107 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14108 * src/files.c (strsuffix): Remove; unused.
14109 (concat2): Renamed from stringappend. Now static.
14110 * src/files.h (strsuffix, stringappend): Remove; unused.
14111 * src/parse-gram.y (<chars>): Renamed from <string>.
14112 (<uniqstr>): Renamed from <struniq>.
14113 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14114 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14115 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14116 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14117 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14118 (N_EXPAND): Renamed from N_STRETCH.
14119
14120 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14121 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14122 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14123 Remove; unused.
14124 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14125 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14126 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14127 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14128 (BASE_MAXIMUM): Renamed from BASE_MAX.
14129 (BASE_MINIMUM): Renamed from BASE_MIN.
14130 (ACTION_MAX): Remove; unused.
14131 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14132 Unnecessary casts removed from above defines.
14133
14134
14135 Fix misspelling in names.
14136 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14137 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14138 G_NODE_ALIGNEMENT.
14139
14140
14141 * lib/timevar.c (timevar_report): Renamed from time_report,
14142 for consistency with other names.
14143 * lib/timevar.h (timevar_report): New decl.
14144 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14145
14146
14147 Sort include-file uses.
14148
14149 Reorder all include files under src to be in the order "system.h".
14150 then the ../lib include files in angle brackets (alphabetized),
14151 then the . include files in double-quotes (alphabetized). Fix
14152 dependency breakages encountered in this process, as follows:
14153 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14154 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14155 * src/state.h: Include "symtab.h".
14156
14157 2002-12-08 Paul Eggert <eggert@twinsun.com>
14158
14159 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14160 since this causes problems when __file__ contains character
14161 sequences like "@" that are treated specially by src/scan-skel.l.
14162 Instead, just use the file's basename. This fixes the bug
14163 reported by Martin Mokrejs in
14164 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14165
14166 2002-12-06 Paul Eggert <eggert@twinsun.com>
14167
14168 Add support for rules that do not have trailing semicolons, as
14169 POSIX requires. Improve the quality of locations in Bison
14170 diagnostics.
14171
14172 * src/location.c: Include <quotearg.h>.
14173 (empty_location): Now const.
14174 (location_print): New function. Follow the recommendation of the
14175 GNU Coding Standards for locations that span file boundaries.
14176 * src/location.h: Do not include <quotearg.h>; no longer needed.
14177 (boundary): New type.
14178 (location_t): Use it. This allows locations to span file boundaries.
14179 All member uses changed: file -> start.file or end.file (as needed),
14180 first_line -> start.line, first_column -> start.column,
14181 last_line -> end.line, last_column -> end.column.
14182 (equal_boundaries): New function.
14183 (LOCATION_RESET, LOCATION_STEP): Remove.
14184 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14185 (empty_location): Now const.
14186 (location_print): New decl.
14187 * src/parse-gram.y (lloc_default): New function, which handles
14188 empty locations more accurately.
14189 (YYLLOC_DEFAULT): Use it.
14190 (%token COLON): Remove.
14191 (%token ID_COLON): New token.
14192 (rules): Use it.
14193 (declarations, rules): Remove trailing semicolon.
14194 (declaration, rules_or_grammar_declaration):
14195 Allow empty (";") declaration.
14196 (symbol_def): Remove empty actions; no longer needed.
14197 (rules_or_grammar_declaration): Remove trailing semicolon.
14198 (semi_colon.opt): Remove.
14199 * src/reader.h: Include location.h.
14200 (scanner_cursor): New decl.
14201 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14202 rolling our own.
14203 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14204 of *loc.
14205 (STEP): Remove. No longer needed, now that adjust_location does
14206 the work. All uses removed.
14207 (scanner_cursor): New var.
14208 (adjust_location): Renamed from extend_location. It now sets
14209 *loc and adjusts the scanner cursor. All uses changed.
14210 Don't bother testing for CR.
14211 (handle_syncline): Remove location arg; now updates scanner cursor.
14212 All callers changed.
14213 (unexpected_end_of_file): Now accepts start boundary of token or
14214 comment, not location. All callers changed. Update scanner cursor,
14215 not the location.
14216 (SC_AFTER_IDENTIFIER): New state.
14217 (context_state): Renamed from c_context. All uses changed.
14218 (id_loc, code_start, token_start): New local vars.
14219 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14220 processing of Yacc white space and equivalents here.
14221 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14222 instead of returning ID immediately, since we need to search for
14223 a subsequent colon.
14224 (<INITIAL>"'", "\""): Save token_start.
14225 (<INITIAL>"%{", "{", "%%"): Save code_start.
14226 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14227 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14228 BEGIN context_state at end, not INITIAL.
14229 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14230 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14231 Return correct token start.
14232 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14233 the start of a character, string or multiline comment is found.
14234 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14235 Reduction): Adjust reported locations to match the more-precise
14236 results now expected.
14237 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14238 * tests/reduce.at (Useless Rules, Reduced Automaton,
14239 Underivable Rules): Likewise.
14240 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14241 or "|"' now that so many other tokens are allowed by the new grammar.
14242
14243 * src/complain.h (current_file): Remove duplicate decl;
14244 current_file is now owned by files.h.
14245 * src/complain.c, src/scan-gram.l: Include files.h.
14246
14247 2002-12-06 Paul Eggert <eggert@twinsun.com>
14248
14249 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14250 promotes to int; it might be unsigned int.
14251 * data/yacc.c (yy_reduce_print): Likewise.
14252
14253 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14254 be #defined in the prologue, not in the Bison declarations.
14255 This fixes Debian Bug 102878, reported by Shaul Karl.
14256
14257 2002-12-02 Paul Eggert <eggert@twinsun.com>
14258
14259 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14260 * lib/strtoul.c: New file, from gnulib.
14261 This fixes a porting bug reported by Peter Klein in
14262 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14263
14264 2002-11-30 Paul Eggert <eggert@twinsun.com>
14265
14266 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14267 and put only a forward declaration in the prologue. This is for
14268 consistency with the other scanner helper functions.
14269
14270 Type clashes now generate warnings, not errors, since it
14271 appears that POSIX may allow some grammars with type clashes.
14272 * src/reader.c (grammar_current_rule_check): Warn about
14273 type clashes instead of complaining.
14274 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14275
14276 Add Yacc library, since POSIX requires it.
14277 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14278 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14279 * lib/main.c, lib/yyerror.c: New files.
14280
14281 gram_error can be static; it need not be extern.
14282 * src/reader.h (gram_error): Remove decl.
14283 * src/parse-gram.y (gram_error): Now static. Add static decl.
14284 (print_token_value): Omit parameter names from forward decl,
14285 for consistency.
14286
14287 2002-11-29 Paul Eggert <eggert@twinsun.com>
14288
14289 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14290 be declared before being used. E.g., one should typically
14291 declare them in the prologue. Use GNU coding style in examples.
14292 Put "const" consistently after the type it modifies. Mention
14293 that C99 supports "inline". Mention that yyerror traditionally
14294 returns "int".
14295
14296 %parse-param and %lex-param now take just one argument, the
14297 declaration; the argument name is deduced from the declaration.
14298
14299 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14300 Reporting, Table of Symbols): Document this.
14301 * src/parse-gram.y (add_param): New function.
14302 (COMMA): Remove.
14303 (declaration): Implement new rule for %parse-param and %lex-param.
14304 * src/scan-gram.l: "," now elicits a warning, rather than being
14305 a token; this is more compatible with byacc.
14306 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14307
14308 2002-11-27 Paul Eggert <eggert@twinsun.com>
14309
14310 Rename identifiers to avoid real and potential collisions.
14311
14312 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14313 to avoid collision with lex macro described by Bruce Lilly in
14314 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14315 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14316 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14317 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14318 All uses changed.
14319 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14320 The name "yycontrol" violates the name space rules, and this stuff
14321 wasn't being used anyway.
14322 (input): Remove action; this stuff wasn't being used.
14323 (gram_error): Rename local variable yylloc -> loc.
14324 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14325 (YY_DECL): Don't use "yy" at start of local variables.
14326 All uses changed, e.g., yylloc -> loc.
14327 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14328 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14329 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14330 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14331
14332 * src/parse-gram.y (gram_error): loc is now const *.
14333 * src/reader.h (gram_error): Likewise.
14334
14335 2002-11-24 Paul Eggert <eggert@twinsun.com>
14336
14337 Version 1.75c.
14338
14339 * tests/actions.at (Actions after errors): Use an output format
14340 more similar to that of the Printers and Destructors test.
14341 Test the position of the ';' token too.
14342 (Printers and Destructors): Likewise.
14343 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14344 unnecessarily alarming people when the test fails.
14345
14346 * data/yacc.c (yyerrlab1): Move this label down, so that the
14347 parser does not discard the lookahead token if the user code
14348 invokes YYERROR. This change is required for POSIX conformance.
14349
14350 * lib/error.c: Sync with gnulib.
14351
14352 2002-11-22 Paul Eggert <eggert@twinsun.com>
14353
14354 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14355 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14356 * lib/xmalloc.c: Likewise.
14357
14358 2002-11-20 Paul Eggert <eggert@twinsun.com>
14359
14360 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14361
14362 2002-11-20 Paul Eggert <eggert@twinsun.com>
14363
14364 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14365 should use `if (! x) abort ();' rather than `assert (x);', and
14366 anyway it's one less thing to worry about configuring.
14367
14368 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14369 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14370 and replace all instances of assert with abort.
14371 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14372 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14373
14374 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14375 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14376 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14377 hash_find_entry, hash_rehash, hash_insert): Likewise.
14378 * src/conflicts.c (resolve_sr_conflict): Likewise.
14379 * src/lalr.c (set_goto_map, map_goto): Likewise.
14380 * src/nullable.c (nullable_compute): Likewise.
14381 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14382 * src/reader.c (packgram, reader): Likewise.
14383 * src/state.c (state_new, state_free, state_transitions_set,
14384 state_reduction_find): Likewise.
14385 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14386 symbol_pack): Likewise.
14387 * src/tables.c (conflict_row, pack_vector): Likewise.
14388 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14389 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14390 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14391 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14392
14393 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14394 (ARGMATCH_CONSTRAINT): New macro.
14395 (ARGMATCH_ASSERT): Use it.
14396
14397 * src/system.h (verify): New macro.
14398 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14399 rather than assert.
14400 * src/tables.c (tables_generate): Likewise.
14401
14402 * src/struniq.c (struniq_assert): Now returns void, and aborts
14403 if the assertion is false.
14404 (struniq_assert_p): Remove.
14405 * src/struniq.h: Likewise.
14406
14407 2002-11-18 Paul Eggert <eggert@twinsun.com>
14408
14409 * data/glr.c (yygetLRActions): Replace `yyindex' with
14410 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14411 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14412 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14413
14414 2002-11-18 Akim Demaille <akim@epita.fr>
14415
14416 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14417 space.
14418 From Tim Van Holder.
14419
14420 2002-11-17 Paul Eggert <eggert@twinsun.com>
14421
14422 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14423 to "SyntaxError" for consistency with my 2002-11-15 change.
14424
14425 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14426 not define to {}, since this breaks the common use of `YYDPRINTF
14427 ((...));' if a single statement is desired (e.g. before `else').
14428 Work around GCC warnings by surrounding corresponding calls with
14429 {} if needed.
14430 (yyhasResolvedValue): Remove unused function.
14431 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14432 loop body.
14433 (yyreportSyntaxError): Renamed from yyreportParseError.
14434 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14435 All uses changed.
14436 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14437 extern when possible. Remove unused initializations.
14438
14439 2002-11-16 Akim Demaille <akim@epita.fr>
14440
14441 Augment the similarity between GLR and LALR traces.
14442
14443 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14444 (YY_REDUCE_PRINT): New.
14445 (yyparse): Use them.
14446 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14447 YYDPRINT here.
14448 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14449 state reached after the reduction/recovery, since...
14450 (yyparse, yyprocessOneStack): Report the state we are entering in.
14451
14452 2002-11-16 Akim Demaille <akim@epita.fr>
14453
14454 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14455 Add support for --trace=skeleton.
14456 * src/scan-skel.l: %option debug.
14457 Scan strings of non-@ or \n instead of character by character.
14458 (scan_skel): Handle trace_skeleton.
14459 (QPUTS): New.
14460 (@output_parser_name@, @output_header_name@): ``Restore'' their
14461 support (used to be M4 macros).
14462 * data/yacc.c: Quote larger chunks, a la glr.c.
14463 * data/lalr1.cc: Likewise.
14464 The header guards are no longer available, so use some other
14465 string than `YYLSP_NEEDED'.
14466
14467 2002-11-16 Akim Demaille <akim@epita.fr>
14468
14469 Make the ``Printers and Destructors'' test more verbose, taking
14470 `yacc.c''s behavior as (possibly wrong) reference.
14471
14472 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14473 instead of fprint on stdout.
14474 Set and report the last_line of the symbols.
14475 Consistently display values and locations.
14476
14477 2002-11-16 Paul Eggert <eggert@twinsun.com>
14478
14479 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14480
14481 2002-11-15 Paul Eggert <eggert@twinsun.com>
14482
14483 * tests/actions.at (Actions after errors): New test case.
14484
14485 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14486 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14487 tests/action.at, tests/calc.at, tests/conflicts.at,
14488 tests/cxx-type.at, tests/regression.at:
14489 "parse error" -> "syntax error" for POSIX compatibility.
14490 "parsing stack overflow..." -> "parser stack overflow" so
14491 that code matches Bison documentation.
14492
14493 2002-11-15 Akim Demaille <akim@epita.fr>
14494
14495 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14496 take two BRACED_CODE, not two string_content.
14497 Free the scanner's obstack when we are done.
14498 (code_content): New.
14499 * tests/calc.at: Adjust.
14500 * doc/bison.texinfo: Adjust.
14501 Also, make sure to include the `,' for these declarations.
14502
14503 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14504
14505 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14506 definition; avoids potential autoreconf problems.
14507
14508 2002-11-15 Akim Demaille <akim@epita.fr>
14509
14510 Always check the value returned by yyparse.
14511
14512 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14513 returned by yyparse.
14514 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14515 Adjust calls.
14516 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14517 returned by yyparse.
14518
14519 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14520
14521 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14522 on input.at test.
14523
14524 2002-11-14 Paul Eggert <eggert@twinsun.com>
14525
14526 * src/output.c (output_skeleton): Call xfopen instead of
14527 duplicating xfopen's body.
14528
14529 Fix bugs reported by Nelson H. F. Beebe in
14530 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14531
14532 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14533 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14534 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14535 file twice in the grammar, as an extra check.
14536
14537 * tests/input.at (Torturing the Scanner): Surround the
14538 backslash-newline tests with "#if 0", to make it less likely that
14539 we'll run into compiler bugs. Bring back solitary \ inside
14540 comment, but add a closing comment to work around HP C bug. Don't
14541 test backslash-newline in C character constant.
14542
14543 2002-11-14 Akim Demaille <akim@epita.fr>
14544
14545 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14546 status of the compiler.
14547 Calling `exit 1' is no longer needed.
14548 Reported by Nelson H. F. Beebe.
14549
14550 2002-11-14 Akim Demaille <akim@epita.fr>
14551
14552 * tests/atlocal.in (CPPFLAGS): We have config.h.
14553 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14554 New.
14555 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14556 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14557 * tests/regression.at, tests/torture.at: Use them for all the
14558 grammars that are to be compiled.
14559 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14560 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14561 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14562
14563 2002-11-14 Akim Demaille <akim@epita.fr>
14564
14565 * doc/bison.texinfo: Various formatting changes (alignments in
14566 samples, additional @group/@end group, GCS in samples.
14567 Use @deffn instead of simple @table to define the directives,
14568 macros, variables etc.
14569
14570 2002-11-13 Paul Eggert <eggert@twinsun.com>
14571
14572 Fix some bugs reported by Albert Chin-A-Young in
14573 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14574
14575 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14576 -o c"; the HP C compiler chatters during compilation.
14577 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14578 * tests/headers.at (export YYLTYPE): Likewise.
14579
14580 * tests/input.at (Torturing the Scanner): Remove lines containing
14581 solitary backslashes, as they tickle a bug in the HP C compiler.
14582
14583 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14584 comments, since they're not portable. Use GNU coding style.
14585
14586 2002-11-13 Akim Demaille <akim@epita.fr>
14587
14588 * data/yacc.c: Leave bigger chunks of quoted text.
14589 (YYDSYMPRINTF): New.
14590 Use it to report symbol activities.
14591 * data/glr.c (YYDSYMPRINTF): New.
14592 Use it.
14593
14594 2002-11-12 Paul Eggert <eggert@twinsun.com>
14595
14596 Version 1.75b.
14597
14598 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14599 (yyglrReduce): Return yyok, not 0.
14600 This should avoid the enumerated-type warnings reported
14601 by Nelson H. F. Beebe in
14602 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14603
14604 * lib/bbitset.h (BITSET_INLINE): Remove.
14605 * lib/bitset.h [! BITSET_INLINE]: Remove.
14606 (bitset_set, bitset_reset, bitset_test): Rename local vars
14607 to avoid shadowing warnings by GCC.
14608
14609 * data/glr.c (inline): Remove #define. It's the user's
14610 responsibility to #define it away, just like 'const'.
14611 This fixes one of the bugs reported by Nelson H. F. Beebe in
14612 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14613
14614 * Makefile.maint (po-check): Scan .l and .y files instead of the
14615 .c and the .h files that they generate. This fixes the bug
14616 reported by Tim Van Holder in:
14617 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14618 Look for N_ as well as for _. Try to avoid matching #define for
14619 N_ and _.
14620 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14621 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14622 * src/scan-gram.l: Revamp regular expressions so that " and '
14623 do not confuse xgettext.
14624
14625 * src/struniq.h (struniq_new): Do not declare the return type
14626 to be 'const'; this violates the C standard.
14627 * src/struniq.c (struniq_new): Likewise.
14628
14629 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14630
14631 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14632 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14633 linker.
14634
14635 2002-11-12 Akim Demaille <akim@epita.fr>
14636
14637 * Makefile.maint: Sync with Autoconf:
14638 (local_updates): New.
14639
14640 2002-11-12 Akim Demaille <akim@epita.fr>
14641
14642 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14643
14644 2002-11-12 Akim Demaille <akim@epita.fr>
14645
14646 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14647 locations.
14648
14649 2002-11-12 Akim Demaille <akim@epita.fr>
14650
14651 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14652 not yyvalue.
14653
14654 2002-11-12 Akim Demaille <akim@epita.fr>
14655
14656 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14657 Use it to test the GLR parser.
14658
14659 2002-11-12 Akim Demaille <akim@epita.fr>
14660
14661 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14662 defines it.
14663 * data/glr.c (yystos): New.
14664 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14665 (YYDSYMPRINT): New.
14666 (yyval): Don't define it, it is handled via M4.
14667 (yyrecoverParseError): Free verbosely the discarded symbols.
14668 * data/yacc.c (yysymprint): Remove, rather...
14669 (b4_yysymprint_generate): invoke.
14670 * data/c.m4 (b4_yysymprint_generate): New.
14671 Accept pointers as arguments, as opposed to the version from
14672 yacc.c.
14673 (b4_yydestruct_generate): Likewise.
14674 * tests/cations.at (Printers and Destructors): Use Bison directives
14675 instead of CPP macros.
14676 Don't rely on internal details.
14677
14678 2002-11-12 Akim Demaille <akim@epita.fr>
14679
14680 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14681 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14682 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14683 it against YYEMPTY and so forth), work on yytoken (i.e., set
14684 it to YYEMPTY etc.).
14685 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14686 (b4_symbol_actions): Remove.
14687 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14688 for 0, end-of-input.
14689
14690 2002-11-12 Akim Demaille <akim@epita.fr>
14691
14692 * doc/bison.texinfo (Destructor Decl): New.
14693
14694 2002-11-12 Akim Demaille <akim@epita.fr>
14695
14696 * src/tables.c (tables_generate): Use free for pointers that
14697 cannot be NULL, not XFREE.
14698 (pack_vector): Use assert, not fatal, for bound violations.
14699 * src/state.c (state_new): Likewise.
14700 * src/reader.c (reader): Likewise.
14701 * src/lalr.c (set_goto_map): Likewise.
14702 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14703 the file name.
14704
14705 2002-11-12 Akim Demaille <akim@epita.fr>
14706
14707 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14708 Restore.
14709 * src/scan-gram.l (last_string): Is global to the file, not to
14710 yylex.
14711 * src/parse-gram.y (input): Don't append the epilogue here,
14712 (epilogue.opt): do it here, and free the scanner's obstack.
14713 * src/reader.c (epilogue_set): Rename as...
14714 (epilogue_augment): this.
14715 * data/c.m4 (b4_epilogue): Defaults to empty.
14716
14717 2002-11-12 Akim Demaille <akim@epita.fr>
14718
14719 * src/getargs.c (long_options): Remove duplicates.
14720 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14721 Remove.
14722 * doc/bison.rnh: Remove.
14723 * doc/bison.texinfo (VMS Invocation): Remove.
14724
14725 2002-11-12 Akim Demaille <akim@epita.fr>
14726
14727 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14728 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14729
14730 Use struniq for symbols.
14731
14732 * src/symtab.h (symbol_t): The tag member is a struniq.
14733 (symbol_type_set): Adjust.
14734 * src/symtab.c (symbol_new): Takes a struniq.
14735 (symbol_free): Don't free the tag member.
14736 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14737 (hash_compare_symbol, hash_symbol): these.
14738 Use the fact that tags as struniqs.
14739 (symbol_get): Use struniq_new.
14740 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14741 Returns a strniq.
14742 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14743 and type members are struniqs.
14744 * src/reader.c (get_merge_function)
14745 (grammar_current_rule_merge_set): Adjust.
14746 (TYPE, current_type): Are struniq.
14747
14748 Use struniq for file names.
14749
14750 * src/files.h, src/files.c (infile): Split into...
14751 (grammar_file, current_file): these.
14752 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14753 * src/reduce.c (reduce_print): Likewise.
14754 * src/getargs.c (getargs): Likewise.
14755 * src/complain.h, src/complain.c: Likewise.
14756 * src/main.c (main): Call struniqs_new early enough to use it for
14757 file names.
14758 Don't free the input file name.
14759
14760 2002-11-12 Akim Demaille <akim@epita.fr>
14761
14762 * src/symtab.c (symbol_free): Remove dead deactivated code:
14763 type_name are properly removed.
14764 Don't use XFREE to free items that cannot be NULL.
14765 * src/struniq.h, src/struniq.c: New.
14766 * src/main.c (main): Initialize/free struniqs.
14767 * src/parse-gram.y (%union): Add astruniq member.
14768 (yyprint): Adjust.
14769 * src/scan-gram.l (<{tag}>): Return a struniq.
14770 Free the obstack bit that used to store it.
14771 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14772
14773 2002-11-11 Paul Eggert <eggert@twinsun.com>
14774
14775 Revamp to fix many (but not all) of the C- and M4-related quoting
14776 problems. Among other things, this fixes the Bison bug reported
14777 by Jan Hubicka when processing the Bash grammar; see:
14778 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14779
14780 Use new @ escapes consistently. Represent brackets with @{ and @}
14781 rather than @<:@ and @:>@, since this works a bit better with dumb
14782 editors like vi. Represent @ with @@, since @ is now consistently
14783 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14784 __ofile__, to avoid unexpected expansions. Similarly, use @output
14785 rather than #output.
14786
14787 * data/c.m4 (b4_copyright): Omit file name from comment, since
14788 the file name could contain "*/".
14789 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14790 be quoted. All uses changed.
14791
14792 * data/glr.c: Use new @ escapes consistently.
14793 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14794 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14795 Remove, since they couldn't handle arbitrary characters in file
14796 names.
14797 * data/lalr1.cc: Likewise.
14798 * data/yacc.c: Likewise.
14799
14800 * src/files.c (output_infix): Remove; all uses removed.
14801 * src/files.h: Likewise.
14802
14803 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14804 mishandled funny characters in file names, and anyway it isn't
14805 needed any more.
14806 * data/yacc.c: Likewise.
14807 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14808
14809 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14810 * data/yacc.c: Likewise.
14811
14812 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14813 strings now.
14814 (muscle_init): Quote filename as a C string.
14815 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14816 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14817 * src/output.c (escaped_file_name_output): New function.
14818 (prepare_symbols): Quote tokens for M4.
14819 (prepare): Don't insert output_infix, output_prefix,
14820 output_parser_name, output_header_name; this is now down by scan-skel.
14821 Insert skeleton as a C string.
14822
14823 * src/output.c (user_actions_output, symbol_destructors_output,
14824 symbol_printers_output): Quote filenames for C and M4.
14825 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14826
14827 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14828 escapes other than \\ and \'; this simplifies the code.
14829 (<SC_STRING>): Likewise, for \\ and \".
14830 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14831 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14832 Use new escapes @{ and @} for [ and ].
14833
14834 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14835 them with auto vars.
14836 Switch to new escape scheme, where @ is the escape character uniformly.
14837 Abort if a stray escape character is found. Avoid unbounded input
14838 buffer when parsing non-escaped text.
14839
14840 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14841 __oline__, #output, $@, and @{ do not have unintended meanings.
14842
14843 2002-11-09 Paul Eggert <eggert@twinsun.com>
14844
14845 Fix the test failure due to GCC warnings described in
14846 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14847 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14848 evaluate to 0 if it's impossible for NINF to be in the respective
14849 table.
14850 (yygetLRActions, yyrecoverParseError): Use them.
14851
14852 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14853 counted in the token inserted at end of file. Now takes
14854 location_t *, not location_t, so that the location can be
14855 adjusted. All uses changed.
14856
14857 * tests/regression.at (Invalid inputs): Adjust wording in
14858 diagnostic to match the new behavior.
14859
14860 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14861 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14862 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14863 abort ();'. This reduces the runtime of the "Many lookaheads"
14864 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14865 GCC 3.2.
14866
14867 2002-11-07 Paul Eggert <eggert@twinsun.com>
14868
14869 * src/parse-gram.y (CHARACTER): Remove unused token.
14870 All uses removed.
14871
14872 * src/scan-gram.l: Remove stack option. We no longer use the
14873 stack, since the stack was never deeper than 1; instead, use the
14874 new auto var c_context to record the stacked value.
14875
14876 Remove nounput option. At an unexpected end of file, we now unput
14877 the minimal input necessary to end cleanly; this simplifies the
14878 code.
14879
14880 Avoid unbounded token sizes where this is easy.
14881
14882 (unexpected_end_of_file): New function.
14883 Use it to systematize the error message on unexpected EOF.
14884 (last-string): Now auto, not static.
14885 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14886 (scanner_last_string_free): Remove; not used.
14887 (percent_percent_count): Move decl to just before use.
14888 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14889 not the (never otherwised-used) CHARACTER.
14890
14891 2002-11-07 Akim Demaille <akim@epita.fr>
14892
14893 Let yyerror always receive the msg as last argument, so that
14894 yyerror can be variadic.
14895
14896 * data/yacc.c (b4_yyerror_args): New.
14897 Use it when calling yyerror.
14898 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14899 Use it when calling yyerror.
14900 * doc/bison.texinfo (Error Reporting): Adjust.
14901 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14902 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14903
14904 2002-11-06 Akim Demaille <akim@epita.fr>
14905
14906 #line should have quoted strings.
14907 Ideally, this should be done by m4_quotearg.
14908
14909 * src/scan-skel.l: Include quotearg.h.
14910 Quote __ofile__.
14911 * src/output.c (symbol_printers_output)
14912 (symbol_destructors_output): Quote the file name.
14913
14914 2002-11-06 Akim Demaille <akim@epita.fr>
14915
14916 * tests/regression.at (Invalid inputs): Adjust to the recent
14917 messages.
14918
14919 2002-11-06 Akim Demaille <akim@epita.fr>
14920
14921 Restore --no-lines.
14922 Reported by Jim Kent.
14923
14924 * data/c.m4 (b4_syncline): New.
14925 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14926 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14927 * src/output.c (user_actions_output): Likewise.
14928 (prepare): Define 'b4_synclines_flag'.
14929 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14930
14931 2002-11-06 Akim Demaille <akim@epita.fr>
14932
14933 * src/main.c (main): Free `infile'.
14934 * src/scan-gram.l (handle_syncline): New.
14935 Recognize `#line'.
14936 * src/output.c (user_actions_output, symbol_destructors_output)
14937 (symbol_printers_output): Use the location's file name, not
14938 infile.
14939 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14940
14941 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14942
14943 * src/tables.c (matching_state): Don't allow states to match if
14944 either has GLR conflict entries.
14945
14946 2002-11-05 Paul Eggert <eggert@twinsun.com>
14947
14948 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14949 "integer out of range" rather than "invalid value".
14950 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14951 accordingly.
14952
14953 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14954 Also, remove one static variable in the scanner.
14955
14956 * src/scan-gram.l (braces_level): Now auto, not static.
14957 Initialize to zero if the compiler is being picky.
14958 (INITIAL): Clear braces_level instead of incrementing it.
14959 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14960 as POSIX 1003.1-2001 requires.
14961 * src/system.h (IF_LINT): New macro, taken from coreutils.
14962 * configure.ac: Define "lint" if --enable-gcc-warnings.
14963
14964 2002-11-05 Akim Demaille <akim@epita.fr>
14965
14966 * src/scan-gram.l: When it starts with `%', complain about the
14967 whole directive, not just that `invalid character: %'.
14968
14969 2002-11-04 Akim Demaille <akim@epita.fr>
14970
14971 * Makefile.maint: Update from Autoconf.
14972 (update, cvs-update, po-update, do-po-update): New.
14973
14974 2002-11-04 Akim Demaille <akim@epita.fr>
14975
14976 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14977 and yyerror.
14978 Have yyerror `use' its arguments.
14979 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14980 returns true when location & yacc & pure & parse-param.
14981 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14982
14983 2002-11-04 Akim Demaille <akim@epita.fr>
14984
14985 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14986 clashes.
14987 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14988 font-lock-mode.
14989 Use complain_at.
14990 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14991 slot 0.
14992
14993 2002-11-03 Paul Eggert <eggert@twinsun.com>
14994
14995 * src/reader.c (get_merge_function, grammar_current_rule_check):
14996 Use consistent diagnostics for reporting type name clashes.
14997 Quote the types with <>, for consistency with Yacc.
14998 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14999
15000 2002-11-03 Akim Demaille <akim@epita.fr>
15001
15002 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15003 New.
15004 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15005 (b4_parse_param): Remove.
15006 Use b4_identification.
15007 Propagate b4_pure_args where needed to pass them to yyerror.
15008 * data/glr.m4 (b4_parse_param): Remove.
15009 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15010 (b4_lpure_formals): New.
15011 Use b4_identification.
15012 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15013 b4_user_formals and b4_user_args.
15014 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15015 (yyreportAmbiguity): When using a pure parser, also need
15016 the location, and the parse-params.
15017 Adjust callers.
15018 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15019 When using a pure parser, also need the parse-params.
15020 Adjust callers.
15021 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15022 (%pure-parser + %parse-param) LALR and GLR parsers.
15023 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15024 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15025 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15026 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15027 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15028 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15029 * doc/bison.texinfo: Untabify the whole file.
15030 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15031 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15032 (Error Reporting): Adjust to these new directives.
15033 Document %error-verbose, deprecate YYERROR_VERBOSE.
15034
15035 2002-11-03 Akim Demaille <akim@epita.fr>
15036
15037 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15038 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15039 command line options.
15040 * tests/cxx-type.at: Formatting changes.
15041
15042 2002-11-03 Paul Eggert <eggert@twinsun.com>
15043
15044 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15045 to count columns correctly, and to check for invalid inputs.
15046
15047 Use mbsnwidth to count columns correctly. Account for tabs, too.
15048 Include mbswidth.h.
15049 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15050 (extend_location): New function.
15051 (YY_LINES): Remove.
15052
15053 Handle CRLF in C code rather than in Lex code.
15054 (YY_INPUT): New macro.
15055 (no_cr_read): New function.
15056
15057 Scan UCNs, even though we don't fully handle them yet.
15058 (convert_ucn_to_byte): New function.
15059
15060 Handle backslash-newline correctly in C code.
15061 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15062 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15063 all uses changed.
15064 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15065 Use {splice} wherever C allows backslash-newline.
15066 YY_STEP after space, newline, vertical-tab.
15067 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15068
15069 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15070
15071 ({int}, handle_action_dollar, handle_action_at): Check for integer
15072 overflow.
15073
15074 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15075
15076 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15077 as well as \000. Check for UCHAR_MAX, not 255.
15078 Allow \x with an arbitrary positive number of digits, as in C.
15079 Check for overflow here.
15080 Allow \? and UCNs, for compatibility with C.
15081
15082 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15083 with quote slot used by complain_at.
15084
15085 * tests/input.at: Add tests for backslash-newline, m4 quotes
15086 in symbols, long literals, and funny escapes in strings.
15087
15088 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15089 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15090 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15091 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15092 * m4/mbswidth.m4: New file, from GNU coreutils.
15093
15094 * doc/bison.texinfo (Grammar Outline): Document // comments.
15095 (Symbols): Document that trigraphs have no special meaning in Bison,
15096 nor is backslash-newline allowed.
15097 (Actions): Document that trigraphs have no special meaning.
15098
15099 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15100 no longer used.
15101
15102 2002-11-02 Paul Eggert <eggert@twinsun.com>
15103
15104 * src/reader.c: Don't include quote.h; not needed.
15105 (get_merge_function): Reword warning to be consistent with
15106 type clash diagnostic in grammar_current_rule_check.
15107
15108 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15109 bug in trigraph handling.
15110
15111 * src/output.c (prepare_symbols): When printing token names,
15112 escape "[" as "@<:@" and likewise for "]".
15113
15114 * src/system.h (errno): Remove declaration, as we are now
15115 assuming C89 or better, and C89 guarantees errno.
15116
15117 2002-10-30 Paul Eggert <eggert@twinsun.com>
15118
15119 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15120 Check for close failures.
15121 * src/files.h (xfclose): Return void, not int, since it always
15122 returned zero.
15123 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15124 indicates one.
15125 * src/output.c (output_skeleton): Use xfclose rather than fclose
15126 and ferror. xfclose now checks ferror.
15127
15128 * data/glr.c (YYLEFTMOST_STATE): Remove.
15129 (yyreportTree): Use a stack-based leftmost state. This avoids
15130 our continuing battles with bogus warnings about initializers.
15131
15132 2002-10-30 Akim Demaille <akim@epita.fr>
15133
15134 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15135 #if.
15136
15137 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15138
15139 * tests/glr-regr1.at: New test for reported regressions.
15140 * tests/testsuite.at: Add glr-regr1.at test.
15141 * tests/Makefile.am: Add glr-regr1.at test.
15142
15143 2002-10-24 Paul Eggert <eggert@twinsun.com>
15144
15145 Version 1.75a.
15146
15147 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15148 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15149 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15150 Don't assume strdup exists; POSIX says its an XSI extension.
15151 Check for buffer overflow on input.
15152
15153 2002-10-24 Akim Demaille <akim@epita.fr>
15154
15155 * src/output.c (output_skeleton): Don't disable M4sugar comments
15156 too soon: it results in comments being expanded.
15157 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15158 first output.
15159
15160 2002-10-24 Akim Demaille <akim@epita.fr>
15161
15162 * data/yacc.c (m4_int_type): New.
15163 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15164 char' as only yacc.c wants K&R portability.
15165 * data/glr.c (yysigned_char): Remove.
15166 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15167 Reported by Quoc Peyrot.
15168
15169 2002-10-23 Paul Eggert <eggert@twinsun.com>
15170
15171 * src/main.c (main): With --trace=time, report times even if a
15172 non-fatal error occurs. Formerly, the times were reported in some
15173 such cases but not in others.
15174 * src/reader.c (reader): Just return if a complaint has been issued,
15175 instead of exiting, so that 'main' can report times.
15176
15177 2002-10-22 Akim Demaille <akim@epita.fr>
15178
15179 * src/system.h: Include sys/types.
15180 Reported by Bert Deknuydt.
15181
15182 2002-10-23 Paul Eggert <eggert@twinsun.com>
15183
15184 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15185 Suggested by Art Haas.
15186
15187 2002-10-22 Paul Eggert <eggert@twinsun.com>
15188
15189 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15190 decl; not needed any more.
15191 * src/main.c (main): Use return to exit, undoing yesterday's change.
15192 The last OS that we could find where this wouldn't work is
15193 SunOS 3.5, and that's too old to worry about now.
15194
15195 * data/glr.c (struct yyltype): Define members even when not
15196 doing locations. This is more consistent with yacc.c, and it
15197 works around the following bug reports:
15198 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15199 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15200
15201 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15202 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15203 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15204
15205 2002-10-22 Akim Demaille <akim@epita.fr>
15206
15207 * data/README: New.
15208
15209 2002-10-21 Paul Eggert <eggert@twinsun.com>
15210
15211 Be consistent about 'bool'; the old code used an enum in one
15212 module and an int in another, and this violates the C standard.
15213 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15214 * configure.ac (AC_HEADER_STDBOOL): Add.
15215 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15216 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15217 * src/symtab.c (hash_compare_symbol_t): Likewise.
15218 * src/system.h (bool, false, true): Use a definition consistent
15219 with ../lib/hash.c. All uses changed.
15220
15221 * src/complain.c (warning_issued): Renamed from warn_message_count,
15222 so that we needn't worry about integer overflow (!).
15223 Now of type bool. All uses changed.
15224 (complaint_issued): Renamed from complain_message_count; likewise.
15225
15226 * src/main.c (main): Use exit to exit with failure.
15227
15228 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15229 rather than 1 and 0.
15230 * src/main.c (main): Likewise.
15231 * src/getargs.c (getargs): Likewise.
15232 * src/reader.c (reader): Likewise.
15233
15234 * src/getarg.c (getargs): Remove duplicate code for
15235 "Try `bison --help'".
15236
15237 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15238 What was that "2" for?
15239
15240 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15241 * src/getargs.c (usage): Likewise.
15242
15243 * src/getargs.c (getargs): When there are too few operands, report
15244 the last one. When there are too many, report the first extra
15245 one. This is how diffutils does it.
15246
15247 2002-10-20 Paul Eggert <eggert@twinsun.com>
15248
15249 Remove K&R vestiges.
15250 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15251 * src/complain.c (VA_START): Remove. Assume prototypes.
15252 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15253 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15254 fatal): Assume prototypes.
15255 * src/complain.h: Assume prototypes.
15256 * src/system.h (PARAMS): Remove.
15257 Include <limits.h> unconditionally, since it's guaranteeed even
15258 for a freestanding C89 compiler.
15259 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15260 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15261
15262 2002-10-20 Akim Demaille <akim@epita.fr>
15263
15264 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15265 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15266 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15267 (yyresolveStates, yyresolveAction, yyresolveStack)
15268 (yyprocessOneStack): Use them.
15269 (yy_reduce_print): New.
15270 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15271
15272 2002-10-20 Akim Demaille <akim@epita.fr>
15273
15274 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15275 arguments and output `void'.
15276 (b4_c_function): Rename as...
15277 (b4_c_function_def): this.
15278 (b4_c_function_decl, b4_c_ansi_function_def)
15279 (b4_c_ansi_function_decl): New.
15280 Change the interpretation of the arguments: before `int, foo', now
15281 `int foo, foo'.
15282 * data/yacc.c (yyparse): Prototype and define thanks to these.
15283 Adjust b4_c_function_def uses.
15284 * data/glr.c (yyparse): Likewise, but ANSI only.
15285
15286 2002-10-20 Akim Demaille <akim@epita.fr>
15287
15288 * src/output.c (prepare): Move the definition of `tokens_number',
15289 `nterms_number', `undef_token_number', `user_token_number_max'
15290 to...
15291 (prepare_tokens): Here.
15292 (prepare_tokens): Rename as...
15293 (prepare_symbols): this.
15294 (prepare): Move the definition of `rules_number' to...
15295 (prepare_rules): here.
15296 (prepare): Move the definition of `last', `final_state_number',
15297 `states_number' to...
15298 (prepare_states): here.
15299 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15300
15301 2002-10-20 Akim Demaille <akim@epita.fr>
15302
15303 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15304
15305 2002-10-20 Akim Demaille <akim@epita.fr>
15306
15307 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15308 * data/c.m4: here.
15309
15310 2002-10-20 Akim Demaille <akim@epita.fr>
15311
15312 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15313 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15314 `pair'.
15315 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15316 `name' to...
15317 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15318 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15319 These.
15320
15321 2002-10-19 Paul Eggert <eggert@twinsun.com>
15322
15323 Do not create a temporary file, as that involves security and
15324 cleanup headaches. Instead, use a pair of pipes.
15325 Derived from a suggestion by Florian Krohm.
15326 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15327 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15328 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15329 (BISON_PREREQ_SUBPIPE): Add.
15330 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15331 Add subpipe.h, subpipe.c.
15332 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15333 * po/POTFILES.in: Add lib/subpipe.c.
15334 * src/output.c: Include "subpipe.h".
15335 (m4_invoke): Remove decl.
15336 (scan_skel): New decl.
15337 (output_skeleton): Use pipe rather than temporary file for m4 input.
15338 Check that m4sugar.m4 is readable, to avoid deadlock.
15339 Check for pipe I/O error.
15340 * src/scan-skel.l (readpipe): Remove decl.
15341 (scan_skel): New function, to be used in place of m4_invoke.
15342 Read from stream rather than file.
15343
15344 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15345 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15346 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15347 this generates a more-accurate value anyway.
15348
15349 * lib/timevar.c (timervar_accumulate): Rename locals to
15350 avoid confusion with similarly-named more-global.
15351 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15352
15353 * src/output.c (prepare): Use xstrdup to convert char const *
15354 to char *, to avoid GCC warning.
15355
15356 2002-10-19 Akim Demaille <akim@epita.fr>
15357
15358 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15359 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15360 Use them to have `calc.y' ready for %pure-parser.
15361 * data/yacc.c (YYLEX): Pass a yylex return type to
15362 b4_c_function_call.
15363
15364 2002-10-19 Akim Demaille <akim@epita.fr>
15365
15366 Prototype support of %lex-param and %parse-param.
15367
15368 * src/parse-gram.y: Add the definition of the %lex-param and
15369 %parse-param tokens, plus their rules.
15370 Drop the `_' version of %glr-parser.
15371 Add the "," token.
15372 * src/scan-gram.l (INITIAL): Scan them.
15373 * src/muscle_tab.c: Comment changes.
15374 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15375 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15376 (muscle_entry_s): The `value' member is no longer const.
15377 Adjust all dependencies.
15378 * src/muscle_tab.c (muscle_init): Adjust: use
15379 MUSCLE_INSERT_STRING.
15380 Initialize the obstack earlier.
15381 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15382 (muscle_pair_list_grow): New.
15383 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15384 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15385 * tests/calc.at: Use %locations, not --locations.
15386 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15387
15388 2002-10-19 Akim Demaille <akim@epita.fr>
15389
15390 * src/getargs.c (usage): Take status as argument and exit
15391 accordingly.
15392 Report the traditional `Try ... --help' message when status != 0.
15393 (usage, version): Don't take a FILE * as arg, it is pointless.
15394 (getargs): When there is an incorrect number of arguments, make it
15395 an error, and report it GNUlically thanks to `usage ()'.
15396
15397 2002-10-18 Paul Eggert <eggert@twinsun.com>
15398
15399 * data/glr.c (yyreportParseError): Don't assume that sprintf
15400 yields the length of the printed string, as this is not true
15401 on SunOS 4.1.4. Reported by Peter Klein.
15402
15403 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15404 * tests/conflicts.at (%nonassoc and eof): Likewise.
15405 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15406
15407 2002-10-17 Akim Demaille <akim@epita.fr>
15408
15409 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15410 * src/getargs.c (trace_types, trace_args): Adjust.
15411 * src/reader.c (grammar_current_rule_prec_set)
15412 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15413 Standardize error messages.
15414 And s/@prec/%prec/!
15415 (reader): Use trace_flag to enable scanner/parser debugging,
15416 instead of an adhoc scheme.
15417 * src/scan-gram.l: Remove trailing debugging code.
15418
15419 2002-10-16 Paul Eggert <eggert@twinsun.com>
15420
15421 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15422 MUSCLE_TAB_H.
15423
15424 * NEWS: Officially drop support for building Bison with K&R C,
15425 since it didn't work anyway and it's not worth worrying about.
15426 * Makefile.maint (wget_files): Remove ansi2knr.c.
15427 (ansi2knr.c-url_prefix): Remove.
15428 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15429 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15430 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15431
15432 2002-10-15 Paul Eggert <eggert@twinsun.com>
15433
15434 Stop using the "enum_" trick for K&R-style function definitions;
15435 it confused me, and I was the author! Instead, assume that people
15436 who want to use K&R C compilers (when using these modules in GCC,
15437 perhaps?) will run ansi2knr.
15438
15439 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15440 All uses of "enum_" changed to "enum ".
15441 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15442 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15443
15444 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15445 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15446 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15447 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15448 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15449 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15450 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15451 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15452 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15453 Use function prototypes; this removes the need for declaring
15454 static functions simply to provide their prototypes.
15455 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15456 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15457 bitset_count_, bitset_create, bitset_dump, bitset_first,
15458 bitset_free, bitset_init, bitset_last, bitset_next,
15459 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15460 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15461 bitset_print, bitset_release_memory, bitset_toggle_,
15462 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15463 debug_bitset): Likewise.
15464 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15465 * lib/bitset_stats.c (bitset_log_histogram_print,
15466 bitset_percent_histogram_print, bitset_stats_and,
15467 bitset_stats_and_cmp, bitset_stats_and_or,
15468 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15469 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15470 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15471 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15472 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15473 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15474 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15475 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15476 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15477 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15478 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15479 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15480 bitset_stats_zero): Likewise.
15481 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15482 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15483 bitsetv_dump, debug_bitsetv): Likewise.
15484 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15485 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15486 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15487 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15488 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15489 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15490 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15491 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15492 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15493 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15494 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15495 Likewise.
15496 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15497 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15498 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15499 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15500 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15501 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15502 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15503 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15504 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15505 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15506 lbitset_xor_cmp, lbitset_zero): Likewise.
15507
15508 2002-10-14 Akim Demaille <akim@epita.fr>
15509
15510 Version 1.75.
15511
15512 2002-10-14 Akim Demaille <akim@epita.fr>
15513
15514 * tests/Makefile.am (maintainer-check-posix): New.
15515
15516 2002-10-14 Akim Demaille <akim@epita.fr>
15517
15518 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15519 member.
15520
15521 2002-10-14 Akim Demaille <akim@epita.fr>
15522
15523 * src/tables.c (table_ninf_remap): base -> tab.
15524 Reported by Matt Rosing.
15525
15526 2002-10-14 Paul Eggert <eggert@twinsun.com>
15527
15528 * tests/action.at, tests/calc.at, tests/conflicts.at,
15529 tests/cxx-type.at, tests/headers.at, tests/input.at,
15530 tests/regression.at, tests/synclines.at, tests/torture.at:
15531 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15532 so that the tests still work even if POSIXLY_CORRECT is set.
15533 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15534
15535 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15536 for portability to K&R hosts. Fix typo: signed char is guaranteed
15537 only to 127, not to 128.
15538 * data/glr.c (yysigned_char): New type.
15539 * data/yacc.c (yysigned_char): Likewise.
15540 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15541
15542 2002-10-13 Paul Eggert <eggert@twinsun.com>
15543
15544 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15545 true due to limited range of data type" warning from GCC.
15546
15547 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15548 by wrapping enum yytokentype's definition inside #ifndef
15549 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15550
15551 2002-10-13 Akim Demaille <akim@epita.fr>
15552
15553 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15554 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15555
15556 2002-10-13 Akim Demaille <akim@epita.fr>
15557
15558 * Makefile.maint: Update from Autoconf 2.54.
15559 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15560
15561 2002-10-13 Akim Demaille <akim@epita.fr>
15562
15563 * src/print.c (print_state): Separate the list of solved conflicts
15564 from the other items.
15565 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15566
15567 2002-10-13 Akim Demaille <akim@epita.fr>
15568
15569 Let nondeterministic skeletons be usable with deterministic
15570 tables.
15571
15572 With the patch, GAWK compiled by GCC without -O2 passes its test
15573 suite using a GLR parser driven by LALR tables. It fails with -O2
15574 because `struct stat' gives two different answers on my machine:
15575 88 (definition of an auto var) and later 96 (memset on this var).
15576 Hence the stack is badly corrumpted. The headers inclusion is to
15577 blame: if I move the awk.h inclusion before GLR's system header
15578 inclusion, the two struct stat have the same size.
15579
15580 * src/tables.c (pack_table): Always create conflict_table.
15581 (token_actions): Always create conflict_list.
15582 * data/glr.c (YYFLAG): Remove, unused.
15583
15584 2002-10-13 Akim Demaille <akim@epita.fr>
15585
15586 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15587 (O0FLAGS): New.
15588 (VALGRIND, GXX): New.
15589 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15590 * tests/bison.in: Run $PREBISON a pre-command.
15591 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15592 (maintainer-check-g++): New.
15593 * Makefile.am (maintainer-check): New.
15594
15595 2002-10-13 Akim Demaille <akim@epita.fr>
15596
15597 * data/glr.c: Formatting changes.
15598 Tweak some trace messages to match yacc.c's.
15599
15600 2002-10-13 Akim Demaille <akim@epita.fr>
15601
15602 GLR parsers sometimes raise parse errors instead of performing the
15603 default reduction.
15604 Reported by Charles-Henry de Boysson.
15605
15606 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15607 check the length of the traces when %glr.
15608 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15609 GLR's traces.
15610 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15611 Test GLR parsers.
15612 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15613 (yyltype): Remove the yy prefix from the member names.
15614 (yytable): Complete its comment.
15615 (yygetLRActions): Map error action number from YYTABLE from
15616 YYTABLE_NINF to 0.
15617 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15618 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15619 not satisfying as we could compare an YYACTION computed from
15620 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15621 only value for error actions.
15622 (yyreportParseError): In verbose parse error messages, don't issue
15623 `error' in the list of expected tokens.
15624 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15625 next action to perform to match glr.c's decoding.
15626 (yytable): Complete its comment.
15627
15628 2002-10-13 Paul Eggert <eggert@twinsun.com>
15629
15630 Fix problem reported by Henrik Grubbstroem in
15631 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15632 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15633 because the Bison parser reads the second action before reducing
15634 the first one.
15635 * src/scan-gram.l (rule_length): New static var.
15636 Use it to keep track of the rule length in the scanner, since
15637 we can't expect the parser to be in lock-step sync with the scanner.
15638 (handle_action_dollar, handle_action_at): Use this var.
15639 * tests/actions.at (Exotic Dollars): Test for the problem.
15640
15641 2002-10-12 Paul Eggert <eggert@twinsun.com>
15642
15643 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15644 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15645 Include <sys/time.h> when checking for clock_t and struct tms.
15646 Use same include order as source.
15647 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15648 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15649
15650 * lib/timevar.c: Update copyright date and clarify comments.
15651 (get_time) [IN_GCC]: Keep the GCC version for reference.
15652
15653 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15654 GCC version as of today, then merge Bison's changes.
15655 Change "GCC" to "Bison" in copyright notice. timevar.def's
15656 author is Akim, so change that too.
15657
15658 * src/reader.c (grammar_current_rule_check):
15659 Don't worry about the default action if $$ is untyped.
15660 Prevents bogus warnings reported by Jim Gifford in
15661 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15662
15663 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15664 * data/glr.c, data/lalr1.cc, data/yacc.c:
15665 Output token definitions before the first part of user declarations.
15666 Fixes compatibility problem reported by Jim Gifford for kbd in
15667 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15668
15669 2002-10-11 Paul Eggert <eggert@twinsun.com>
15670
15671 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15672 (yyparse): here. This undoes some of the 2002-07-25 change.
15673 Compatibility problem reported by Ralf S. Engelschall with
15674 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15675
15676 2002-10-11 Akim Demaille <akim@epita.fr>
15677
15678 * tests/regression.at Characters Escapes): New.
15679 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15680 characters.
15681 Reported by Jan Nieuwenhuizen.
15682
15683 2002-10-11 Akim Demaille <akim@epita.fr>
15684
15685 * po/id.po: New.
15686
15687 2002-10-10 Paul Eggert <eggert@twinsun.com>
15688
15689 Portability fixes for bitsets; this also avoids several GCC
15690 warnings.
15691
15692 * lib/abitset.c: Include <stddef.h>, for offsetof.
15693 * lib/lbitset.c: Likewise.
15694
15695 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15696 properly for vectors of objects. Do not assume that adding a
15697 header size to a multiple of a word size yields a value that is
15698 properly aligned for the whole union.
15699 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15700
15701 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15702 unique names for structures.
15703 * lib/ebitset.c (ebitset_bytes): Likewise.
15704 * lib/lbitset.c (lbitset_bytes): Likewise.
15705
15706 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15707 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15708 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15709 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15710 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15711 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15712 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15713 to improve the type-checking that GCC can do.
15714 * lib/bitset.c (bitset_op4_cmp): Likewise.
15715 * lib/bitset_stats.c (bitset_stats_count,
15716 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15717 bitset_stats_copy, bitset_stats_disjoint_p,
15718 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15719 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15720 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15721 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15722 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15723 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15724 bitset_stats_or_and_cmp): Likewise.
15725 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15726 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15727 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15728 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15729
15730 * lib/abitset.h: Include bitset.h, not bbitset.h.
15731 * lib/ebitset.h: Likewise.
15732 * lib/lbitset.h: Likewise.
15733
15734 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15735 All instances of parameters of type enum bitset_opts are now of
15736 type enum_bitset_opts, to conform to the C Standard, and similarly
15737 for enum_bitset_type.
15738 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15739 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15740
15741 Do not use "struct bitset_struct" to mean different things in
15742 different modules. Not only is this confusing, it violates
15743 the C Standard, which requires that structure types in different
15744 modules must be compatible if one is to be passed to the other.
15745 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15746 All instances of "struct bitset_struct *" replaced with "bitset".
15747 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15748 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15749 struct lbitset_struct, struct bitset_stats_struct): New types.
15750 All uses of struct bitset_struct changed to union bitset_union,
15751 etc.
15752 * lib/abitset.c (struct abitset_struct, abitset,
15753 struct bitset_struct): Remove.
15754 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15755 struct bitset_struct): Remove.
15756 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15757 bitset_struct): Remove.
15758 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15759 Likewise.
15760
15761 Do not call a function of type T using a call that assumes the
15762 function is of a different type U. Standard C requires that a
15763 function must be called with a type that is compatible with its
15764 definition.
15765 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15766 New decls.
15767 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15768 New functions.
15769 * lib/ebitset.c (PFV): Remove.
15770 * lib/lbitset.c (PFV): Likewise.
15771 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15772 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15773 decls.
15774 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15775 (ebitset_vtable): Use them.
15776 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15777 lbitset_xor): New functions.
15778 (lbitset_vtable): Use them.
15779
15780 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15781 Declare.
15782
15783 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15784 GCC warning.
15785 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15786 Use offsetof, for simplicity.
15787
15788 2002-10-06 Paul Eggert <eggert@twinsun.com>
15789
15790 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15791 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15792 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15793 which was inadvertently undone by the 2002-09-30 patch.
15794 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15795 the same width as int.
15796
15797 2002-10-04 Paul Eggert <eggert@twinsun.com>
15798
15799 Version 1.50.
15800
15801 * configure.ac (AC_INIT), NEWS: Increment version number.
15802
15803 * doc/bison.texinfo: Minor spelling, grammar, and white space
15804 fixes.
15805 (Symbols): Mention that any negative value returned from yylex
15806 signifies end-of-input. Warn about negative chars. Mention
15807 the portable Standard C character set.
15808
15809 The GNU coding standard says CFLAGS and YFLAGS are reserved
15810 for the installer to set.
15811 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15812 * src/Makefile.am (AM_CFLAGS): Likewise.
15813 (AM_YFLAGS): Renamed from YFLAGS.
15814
15815 Fix some MAX and MIN problems.
15816 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15817 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15818 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15819 * src/reader.c (reader): Use it.
15820
15821 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15822 POSIX 1003.1-2001 has removed fgrep.
15823
15824 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15825
15826 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15827 interpreted as signed.
15828 * lib/ebitset.c (ebitset_list): Fix bug.
15829
15830 2002-10-01 Paul Eggert <eggert@twinsun.com>
15831
15832 More fixes for 64-bit hosts and large bitsets.
15833
15834 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15835 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15836 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15837 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15838 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15839 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15840 bitset_count_): Likewise.
15841 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15842 bitset_first, bitset_last): Likewise.
15843 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15844 bitset_stats_list_reverse, bitset_stats_size,
15845 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15846 Likewise.
15847 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15848 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15849 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15850 bitsetv_reflexive_transitive_closure): Likewise.
15851 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15852 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15853 Likewise.
15854 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15855 Likewise.
15856
15857 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15858 Use size_t, not unsigned int, to count bytes.
15859 * lib/abitset.h (abitset_bytes): Likewise.
15860 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15861 Likewise.
15862 * lib/bitset.h (bitset_bytes): Likewise.
15863 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15864 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15865 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15866 * lib/ebitset.c (ebitset_bytes): Likewise.
15867 * lib/ebitset.h (ebitset_bytes): Likewise.
15868 * lib/lbitset.c (lbitset_bytes): Likewise.
15869 * lib/lbitset.h (lbitset_bytes): Likewise.
15870
15871 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15872 abitset_subset_p, abitset_disjoint_p, abitset_and,
15873 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15874 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15875 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15876 abitset_or_and, abitset_or_and_cmp):
15877 Use bitset_windex instead of unsigned int.
15878 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15879 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15880 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15881 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15882 Likewise.
15883 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15884
15885 * lib/bitset.c (bitset_print):
15886 Use proper printf formats for widths of integer types.
15887 * lib/bitset_stats.c (bitset_percent_histogram_print,
15888 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15889 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15890 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15891 * lib/lbitset.c (lbitset_bytes): Likewise.
15892
15893 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15894 BITSET_SIZE_MAX): New macros.
15895 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15896 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15897 to BITSET_WINDEX_MAX.
15898
15899 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15900 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15901 since we now return the bitset_bindex type (not int).
15902
15903 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15904 when computing sizes.
15905 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15906
15907 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15908 and avoid cast to unsigned.
15909
15910 2002-09-30 Akim Demaille <akim@epita.fr>
15911
15912 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15913 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15914 Updates from Michael Hayes.
15915
15916 2002-09-30 Art Haas <ahaas@neosoft.com>
15917
15918 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15919 invocations.
15920 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15921 defined.
15922
15923 2002-09-27 Akim Demaille <akim@epita.fr>
15924
15925 Version 1.49c.
15926
15927 2002-09-27 Akim Demaille <akim@epita.fr>
15928
15929 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15930 (Because of AC_LIBSOURCE).
15931
15932 2002-09-27 Akim Demaille <akim@epita.fr>
15933
15934 Playing with Autoscan.
15935
15936 * configure.ac: Remove the old LIBOBJ tweaks.
15937 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15938 * lib/strrchr.c: New.
15939 * lib/strtol.c: New, from the Coreutils 4.5.1.
15940
15941 2002-09-27 Akim Demaille <akim@epita.fr>
15942
15943 Playing with Autoscan.
15944
15945 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15946 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15947 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15948 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15949 Coreutils 4.5.1.
15950
15951 2002-09-24 Akim Demaille <akim@epita.fr>
15952
15953 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15954 (Frequently Asked Questions, Parser Stack Overflow): New.
15955
15956 2002-09-13 Akim Demaille <akim@epita.fr>
15957
15958 Playing with autoscan.
15959
15960 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15961 * src/files.c (skeleton_find): Remove, unused.
15962 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15963 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15964
15965 2002-09-13 Akim Demaille <akim@epita.fr>
15966
15967 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15968 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15969
15970 2002-09-13 Akim Demaille <akim@epita.fr>
15971
15972 * configure.ac: Require 2.54.
15973 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15974 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15975 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15976 Remove, provided by Autoconf macros.
15977
15978 2002-09-12 Akim Demaille <akim@epita.fr>
15979
15980 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15981
15982 2002-09-12 Akim Demaille <akim@epita.fr>
15983
15984 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15985 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15986 Reported by Martin Mokrejs.
15987
15988 2002-09-10 Akim Demaille <akim@epita.fr>
15989
15990 * src/parse-gram.y: Associate a human readable string to each
15991 token type.
15992 * tests/regression.at (Invalid inputs): Adjust.
15993
15994 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15995
15996 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15997 with an Autoconf-2.5x style configure.ac.
15998
15999 2002-09-06 Paul Eggert <eggert@twinsun.com>
16000
16001 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16002 exception applies only to yacc.c. This is a modification of a
16003 patch originally suggested by Akim Demaille.
16004
16005 2002-09-06 Akim Demaille <akim@epita.fr>
16006
16007 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16008 here to...
16009 * data/yacc.c: here.
16010
16011 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16012 LocationType.
16013 (b4_ltype): Default to yy::Location from location.hh.
16014
16015 2002-09-04 Jim Meyering <jim@meyering.net>
16016
16017 * data/yacc.c: Guard the declaration of yytoknum also with
16018 `#ifdef YYPRINT', so it is declared only when used.
16019
16020 2002-09-04 Akim Demaille <akim@epita.fr>
16021
16022 * configure.in: Rename as...
16023 * configure.ac: this.
16024 Bump to 1.49c.
16025
16026 2002-09-04 Akim Demaille <akim@epita.fr>
16027
16028 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16029 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16030 translate maintainer only messages.
16031
16032 2002-08-12 Paul Eggert <eggert@twinsun.com>
16033
16034 Version 1.49b.
16035
16036 * Makefile.am (SUBDIRS): Remove intl.
16037 (DISTCLEANFILES): Remove.
16038 * NEWS: Mention that GNU M4 is now required. Clarify what is
16039 meant by "larger grammars". Mention the pt_BR translation.
16040 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16041 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16042 Bump version from 0.11.2 to 0.11.5.
16043 (BISON_PREREQ_STAGE): Remove.
16044 (AM_GNU_GETTEXT): Use external gettext.
16045 (AC_OUTPUT): Remove intl/Makefile.
16046
16047 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16048
16049 * data/glr.c: Include string.h, for strlen.
16050 (yyreportParseError): Use size_t for yysize.
16051 (yy_yypstack): No longer nested inside yypstates, as nested
16052 functions are not portable. Do not assume size_t is the
16053 same width as int.
16054 (yypstates): Do not assume that ptrdiff_t is the same width
16055 as int, and similarly for yyposn and YYINDEX.
16056
16057 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16058
16059 * lib/Makefile.am (INCLUDES): Do not include from the intl
16060 directory, which has been removed.
16061 * src/Makefile.am (INCLUDES): Likewise.
16062
16063 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16064 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16065 New vars.
16066
16067 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16068 * tests/Makefile.am (EXTRA_DIST): Likewise.
16069
16070 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16071 Do not assume that bitset_windex is the same width as unsigned.
16072
16073 * lib/abitset.c (abitset_unused_clear): Do not assume that
16074 bitset_word is the same width as int.
16075 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16076 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16077 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16078 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16079 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16080
16081 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16082 portability to one's complement hosts!).
16083 * lib/ebitset.c (ebitset_op1): Likewise.
16084 * lib/lbitset.c (lbitset_op1): Likewise.
16085
16086 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16087 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16088 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16089 Sync with fileutils.
16090 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16091 lib/gettext.h: Sync with diffutils.
16092
16093 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16094 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16095
16096 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16097 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16098 check for void *.
16099
16100 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16101 size_t; the old version tried to do this but casted improperly.
16102 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16103 (bitset_test): Now returns int, not unsigned long.
16104
16105 * lib/bitset_stats.c: Include "gettext.h".
16106 (_): New macro.
16107 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16108 name locals "index", as it generates unnecessary warnings on some
16109 hosts that have an "index" function.
16110
16111 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16112 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16113 they need translation.
16114 * src/LR0.c (state_list_append, new_itemsets, get_state,
16115 append_states, generate_states): Likewise.
16116 * src/assoc.c (assoc_to_string): Likewise.
16117 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16118 * src/gram.c (grammar_dump): Likewise.
16119 * src/injections.c (injections_compute): Likewise.
16120 * src/lalr.c (lookaheads_print): Likewise.
16121 * src/relation.c (relation_transpose): Likewise.
16122 * src/scan-gram.l: Likewise.
16123 * src/tables.c (table_grow, pack_vector): Likewise.
16124
16125 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16126 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16127 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16128 * m4/mbstate_t.m4: Sync with fileutils.
16129 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16130
16131 * po/LINGUAS: Add pt_BR.
16132 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16133 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16134 lib/timevar.c.
16135 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16136 manual recommends.
16137 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16138
16139 * src/complain.c (strerror_r): Remove decl; not needed.
16140 (strerror): Use same pattern as ../lib/error.c.
16141
16142 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16143
16144 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16145
16146 * src/main.c (main): Cast result of bindtextdomain and textdomain
16147 to void, to avoid a GCC warning when --disable-nls is in effect.
16148
16149 * src/scan-gram.l: Use strings rather than escapes when possible,
16150 to minimize the number of warnings from xgettext.
16151 (handle_action_dollar, handle_action_at): Don't use isdigit,
16152 as it mishandles negative chars and it may not work as expected
16153 outside the C locale.
16154
16155 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16156 this is a GCC extension and is not portable to other compilers.
16157
16158 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16159 Do not include <ctype.h>; no longer needed.
16160 Do not include <malloc.h>; no longer needed (and generates
16161 warnings on OpenBSD 3.0).
16162
16163 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16164 it's not portable.
16165
16166 * tests/regression.at: Do not use 'cc -c input.c -o input';
16167 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16168
16169 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16170 exit status as failure, not just exit status 1. Sun C exits
16171 with status 2 sometimes.
16172
16173 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16174 Use it for the two large tests.
16175
16176 2002-08-02 Akim Demaille <akim@epita.fr>
16177
16178 * src/conflicts.c (conflicts_output): Don't output rules never
16179 reduced here, since anyway that computation doesn't work.
16180 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16181 (rule_useless_p, rule_never_reduced_p): New.
16182 (grammar_rules_partial_print): Use a filter instead of a range.
16183 Display the title only if needed.
16184 (grammar_rules_print): Adjust.
16185 (grammar_rules_never_reduced_report): New.
16186 * src/tables.c (action_row): Move the computation of rules never
16187 reduced to...
16188 (token_actions): here.
16189 * src/main.c (main): Make the parser before making the report, so
16190 that rules never reduced are computed.
16191 Call grammar_rules_never_reduced_report.
16192 * src/print.c (print_results): Report rules never reduced.
16193 * tests/conflicts.at, tests/reduce.at: Adjust.
16194
16195 2002-08-01 Akim Demaille <akim@epita.fr>
16196
16197 Instead of attaching lookaheads and duplicating the rules being
16198 reduced by a state, attach the lookaheads to the reductions.
16199
16200 * src/state.h (state_t): Remove the `lookaheads',
16201 `lookaheads_rule' member.
16202 (reductions_t): Add a `lookaheads' member.
16203 Use a regular array for the `rules'.
16204 * src/state.c (reductions_new): Initialize the lookaheads member
16205 to 0.
16206 (state_rule_lookaheads_print): Adjust.
16207 * src/state.h, src/state.c (state_reductions_find): New.
16208 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16209 (count_rr_conflicts): Adjust.
16210 * src/lalr.c (LArule): Remove.
16211 (add_lookback_edge): Adjust.
16212 (state_lookaheads_count): New.
16213 (states_lookaheads_initialize): Merge into...
16214 (initialize_LA): this.
16215 (lalr_free): Adjust.
16216 * src/main.c (main): Don't free nullable and derives too early: it
16217 is used by --verbose.
16218 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16219
16220 2002-08-01 Akim Demaille <akim@epita.fr>
16221
16222 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16223 `rule_number_t**'.
16224 (set_derives, free_derives): Rename as...
16225 (derives_compute, derives_free): this.
16226 Adjust all dependencies.
16227 * src/nullable.c (set_nullable, free_nullable): Rename as...
16228 (nullable_compute, nullable_free): these.
16229 (rule_list_t): Store rule_t *, not rule_number_t.
16230 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16231 pointers, instead of their numbers.
16232 * src/main.c (main): Call nullable_free, and derives_free earlier,
16233 as they were lo longer used.
16234
16235 2002-08-01 Akim Demaille <akim@epita.fr>
16236
16237 * lib/timevar.c (get_time): Include children time.
16238 * src/lalr.h (LA, LArule): Don't export them: used with the
16239 state_t.
16240 * src/lalr.c (LA, LArule): Static.
16241 * src/lalr.h, src/lalr.c (lalr_free): New.
16242 * src/main.c (main): Call it.
16243 * src/tables.c (pack_vector): Check whether loc is >= to the
16244 table_size, not >.
16245 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16246 (tables_generate): do it, since that's also it which allocates
16247 them.
16248 Don't free LA and LArule, main does.
16249
16250 2002-07-31 Akim Demaille <akim@epita.fr>
16251
16252 Separate parser tables computation and output.
16253
16254 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16255 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16256 (yydefgoto, yydefact, high): Move to...
16257 * src/tables.h, src/tables.c: here.
16258 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16259 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16260 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16261 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16262 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16263 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16264 (action_row, save_row, token_actions, save_column, default_goto)
16265 (goto_actions, sort_actions, matching_state, pack_vector)
16266 (table_ninf_remap, pack_table, prepare_actions): Move to...
16267 * src/tables.c: here.
16268 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16269 * src/output.c (token_actions, output_base, output_conflicts)
16270 (output_check): Merge into...
16271 (prepare_actions): this.
16272 (actions_output): Rename as...
16273 (user_actions_output): this.
16274 * src/main.c (main): Call tables_generate and tables_free.
16275
16276 2002-07-31 Akim Demaille <akim@epita.fr>
16277
16278 Steal GCC's --time-report support.
16279
16280 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16281 stolen/adjusted from GCC.
16282 * m4/stage.m4: Remove time related checks.
16283 * m4/timevar.m4: New.
16284 * configure.in: Adjust.
16285 * src/system.h: Adjust to using timevar.h.
16286 * src/getargs.h, src/getargs.c: Support trace_time for
16287 --trace=time.
16288 * src/main.c (stage): Remove.
16289 (main): Replace `stage' invocations with timevar calls.
16290 * src/output.c: Insert pertinent timevar calls.
16291
16292 2002-07-31 Akim Demaille <akim@epita.fr>
16293
16294 Let --trace have arguments.
16295
16296 * src/getargs.h (enum trace_e): New.
16297 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16298 (long_options, short_options): --trace/-T takes an optional
16299 argument.
16300 Change all the uses of trace_flag to reflect the new flags.
16301 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16302
16303 Strengthen `stage' portability.
16304
16305 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16306 * configure.in: Use it.
16307 Don't check for malloc.h and sys/times.h.
16308 * src/system.h: Include them when appropriate.
16309 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16310 times and struct tms are available.
16311
16312 2002-07-30 Akim Demaille <akim@epita.fr>
16313
16314 In verbose parse error message, don't report `error' as an
16315 expected token.
16316 * tests/actions.at (Printers and Destructors): Adjust.
16317 * tests/calc.at (Calculator $1): Adjust.
16318 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16319 error message, do not report the parser accepts the error token in
16320 that state.
16321
16322 2002-07-30 Akim Demaille <akim@epita.fr>
16323
16324 Normalize conflict related messages.
16325
16326 * src/complain.h, src/complain.c (warn, complain): New.
16327 * src/conflicts.c (conflicts_print): Use them.
16328 (conflict_report_yacc): New, extracted from...
16329 (conflicts_print): here.
16330 * tests/conflicts.at, tests/existing.at: Adjust.
16331
16332 2002-07-30 Akim Demaille <akim@epita.fr>
16333
16334 Report rules which are never reduced by the parser: those hidden
16335 by conflicts.
16336
16337 * src/LR0.c (save_reductions): Don't make the final state too
16338 different: save its reduction (accept) instead of having a state
16339 without any action (no shift or goto, no reduce).
16340 Note: the final state is now a ``regular'' state, i.e., the
16341 parsers now contain `reduce 0' as default reduction.
16342 Nevertheless, since they decide to `accept' when yystate =
16343 final_state, they still will not reduce rule 0.
16344 * src/print.c (print_actions, print_reduction): Adjust.
16345 * src/output.c (action_row): Track reduced rules.
16346 (token_actions): Report rules never reduced.
16347 * tests/conflicts.at, tests/regression.at: Adjust.
16348
16349 2002-07-30 Akim Demaille <akim@epita.fr>
16350
16351 `stage' was accidently included in a previous patch.
16352 Initiate its autoconfiscation.
16353
16354 * configure.in: Look for malloc.h and sys/times.h.
16355 * src/main.c (stage): Adjust.
16356 Report only when trace_flag.
16357
16358 2002-07-29 Akim Demaille <akim@epita.fr>
16359
16360 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16361 state_number_t.
16362 (errs_t): symbol_t*, not symbol_number_t.
16363 (reductions_t): rule_t*, not rule_number_t.
16364 (FOR_EACH_SHIFT): New.
16365 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16366 * src/print.c, src/print_graph.c: Adjust.
16367
16368 2002-07-29 Akim Demaille <akim@epita.fr>
16369
16370 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16371
16372 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16373 (endtoken, accept): these.
16374 * src/reader.c (reader): Set endtoken's default tag to "$end".
16375 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16376 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16377 Adjust.
16378
16379 2002-07-29 Akim Demaille <akim@epita.fr>
16380
16381 * src/reduce.c (reduce_grammar): When the language is empty,
16382 complain about the start symbol, not the axiom.
16383 Use its location.
16384 * tests/reduce.at (Empty Language): New.
16385
16386 2002-07-26 Akim Demaille <akim@epita.fr>
16387
16388 * src/reader.h, src/reader.c (gram_error): ... can't get
16389 yycontrol without making too strong assumptions on the parser
16390 itself.
16391 * src/output.c (prepare_tokens): Use the real 0th value of
16392 token_translations instead of `0'.
16393 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16394 visible here.
16395 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16396 for the time being: %locations ought to provide it to yyerror.
16397
16398 2002-07-25 Akim Demaille <akim@epita.fr>
16399
16400 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16401 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16402 * tests/regression.at (Web2c Actions): Adjust.
16403
16404 2002-07-25 Akim Demaille <akim@epita.fr>
16405
16406 Stop storing rules from 1 to nrules + 1.
16407
16408 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16409 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16410 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16411 Iterate from 0 to nrules.
16412 Use rule_number_as_item_number and item_number_as_rule_number.
16413 Adjust to `derive' now containing possibly 0.
16414 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16415 Handle the `- 1' part in rule numbers from/to item numbers.
16416 * src/conflicts.c (log_resolution): Fix the message which reversed
16417 shift and reduce.
16418 * src/output.c (action_row): Initialize default_rule to -1.
16419 (token_actions): Adjust.
16420 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16421 expected output.
16422 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16423
16424 2002-07-25 Akim Demaille <akim@epita.fr>
16425
16426 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16427 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16428 (b4_c_knr_arg_decl): New.
16429 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16430 yyreport_parse_error.
16431
16432 2002-07-25 Akim Demaille <akim@epita.fr>
16433
16434 * data/yacc.c (yyreport_parse_error): New, extracted from...
16435 (yyparse): here.
16436 (yydestruct, yysymprint): Move above yyparse.
16437 Be K&R compliant.
16438
16439 2002-07-25 Akim Demaille <akim@epita.fr>
16440
16441 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16442 replace...
16443 (b4_sint_type, b4_uint_type): these.
16444 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16445 * tests/regression.at (Web2c Actions): Adjust.
16446
16447 2002-07-25 Akim Demaille <akim@epita.fr>
16448
16449 * src/gram.h (TIEM_NUMBER_MAX): New.
16450 (item_number_of_rule_number, rule_number_of_item_number): Rename
16451 as...
16452 (rule_number_as_item_number, item_number_as_rule_number): these.
16453 Adjust dependencies.
16454 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16455 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16456 (symbol_number_to_vector_number): New.
16457 (order): Of vector_number_t* type.
16458 (base_t, BASE_MAX, BASE_MIN): New.
16459 (froms, tos, width, pos, check): Of base_t type.
16460 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16461 (actrow): Of action_number_t type.
16462 (conflrow): Of unsigned int type.
16463 (table_ninf, base_ninf): New.
16464 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16465 (muscle_insert_int_table, muscle_insert_base_table)
16466 (muscle_insert_rule_number_table): New.
16467 (prepare_tokens): Output `toknum' as int_table.
16468 (action_row): Returns a rule_number_t.
16469 Use ACTION_MIN, not SHRT_MIN.
16470 (token_actions): yydefact is rule_number_t*.
16471 (table_ninf_remap): New.
16472 (pack_table): Use it for `base' and `table'.
16473 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16474 replaced with...
16475 (YYPACT_NINF, YYTABLE_NINF): these.
16476 (yypact, yytable): Compute their types instead of hard-coded
16477 `short'.
16478 * tests/regression.at (Web2c Actions): Adjust.
16479
16480 2002-07-19 Akim Demaille <akim@epita.fr>
16481
16482 * src/scan-gram.l (id): Can start with an underscore.
16483
16484 2002-07-16 Akim Demaille <akim@epita.fr>
16485
16486 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16487 Adjust all former `associativity' dependencies.
16488 * src/symtab.c (symbol_new): Default associativity is `undef', not
16489 `right'.
16490 (symbol_check_alias_consistence): Adjust.
16491
16492 2002-07-09 Akim Demaille <akim@epita.fr>
16493
16494 * doc/bison.texinfo: Properly set the ``header'' part.
16495 Use @dircategory ``GNU programming tools'' as per Texinfo's
16496 documentation.
16497 Use @copying.
16498
16499 2002-07-09 Akim Demaille <akim@epita.fr>
16500
16501 * lib/quotearg.h: Protect against multiple inclusions.
16502 * src/location.h (location_t): Add a `file' member.
16503 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16504 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16505 `error_one_per_line' support.
16506
16507 2002-07-09 Akim Demaille <akim@epita.fr>
16508
16509 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16510 * src/reader.c (lineno): Remove.
16511 Adjust all dependencies.
16512 (get_merge_function): Take a location and use complain_at.
16513 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16514 * tests/regression.at (Invalid inputs, Mixing %token styles):
16515 Adjust.
16516
16517 2002-07-09 Akim Demaille <akim@epita.fr>
16518
16519 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16520 recovery rule, and forbid extensions when --yacc.
16521 (gram_error): Use complain_at.
16522 * src/reader.c (reader): Exit if there were parse errors.
16523
16524 2002-07-09 Akim Demaille <akim@epita.fr>
16525
16526 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16527 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16528 Reported by R Blake <blakers@mac.com>.
16529
16530 2002-07-09 Akim Demaille <akim@epita.fr>
16531
16532 * data/yacc.c: Output the copyright notive in the header.
16533
16534 2002-07-03 Akim Demaille <akim@epita.fr>
16535
16536 * src/output.c (froms, tos): Are state_number_t.
16537 (save_column): sp, sp1, and sp2 are state_number_t.
16538 (prepare): Rename `final' as `final_state_number', `nnts' as
16539 `nterms_number', `nrules' as `rules_number', `nstates' as
16540 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16541 unused.
16542 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16543 * data/lalr1.cc (nsym_): Remove, unused.
16544
16545 2002-07-03 Akim Demaille <akim@epita.fr>
16546
16547 * src/lalr.h, src/lalr.c (goto_number_t): New.
16548 * src/lalr.c (goto_list_t): New.
16549 Propagate them.
16550 * src/nullable.c (rule_list_t): New.
16551 Propagate.
16552 * src/types.h: Remove.
16553
16554 2002-07-03 Akim Demaille <akim@epita.fr>
16555
16556 * src/closure.c (print_fderives): Use rule_rhs_print.
16557 * src/derives.c (print_derives): Use rule_rhs_print.
16558 (rule_list_t): New, replaces `shorts'.
16559 (set_derives): Add comments.
16560 * tests/sets.at (Nullable, Firsts): Adjust.
16561
16562 2002-07-03 Akim Demaille <akim@epita.fr>
16563
16564 * src/output.c (prepare_actions): Free `tally' and `width'.
16565 (prepare_actions): Allocate and free `order'.
16566 * src/symtab.c (symbols_free): Free `symbols'.
16567 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16568 * src/output.c (m4_invoke): Move to...
16569 * src/scan-skel.l: here.
16570 (<<EOF>>): Close yyout, and free its name.
16571
16572 2002-07-03 Akim Demaille <akim@epita.fr>
16573
16574 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16575
16576 * src/LR0.c (new_state): Merge into...
16577 (state_list_append): this.
16578 (new_states): Merge into...
16579 (generate_states): here.
16580 (set_states): Don't ensure a proper `errs' state member here, do it...
16581 * src/conflicts.c (conflicts_solve): here.
16582 * src/state.h, src/state.c: Comment changes.
16583 (state_t): Rename member `shifts' as `transitions'.
16584 Adjust all dependencies.
16585 (errs_new): For consistency, also take the values as argument.
16586 (errs_dup): Remove.
16587 (state_errs_set): New.
16588 (state_reductions_set, state_transitions_set): Assert that no
16589 previous value was assigned.
16590 (state_free): New.
16591 (states_free): Use it.
16592 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16593 temporary storage: use `errs' and `nerrs' as elsewhere.
16594 (set_conflicts): Allocate and free this `errs'.
16595
16596 2002-07-02 Akim Demaille <akim@epita.fr>
16597
16598 * lib/libiberty.h: New.
16599 * lib: Update the bitset implementation from upstream.
16600 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16601 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16602 * src/main.c: Adjust bitset stats calls.
16603
16604 2002-07-01 Paul Eggert <eggert@twinsun.com>
16605
16606 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16607 char, so that negative chars don't collide with $.
16608
16609 2002-06-30 Akim Demaille <akim@epita.fr>
16610
16611 Have the GLR tests be `warning' checked, and fix the warnings.
16612
16613 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16614 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16615 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16616 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16617 (yyaddDeferredAction): static.
16618 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16619 (yyreportParseError): yyprefix is const.
16620 yytokenp is used only when verbose.
16621 (yy__GNUC__): Replace with __GNUC__.
16622 (yypdumpstack): yyi is size_t.
16623 (yypreference): Un-yy local variables and arguments, to avoid
16624 clashes with `yyr1'. Anyway, we are not in the user name space.
16625 (yytname_size): be an int, as is compared with ints.
16626 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16627 Use them.
16628 * tests/cxx-gram.at: Use quotation to protect $1.
16629 Use AT_COMPILE to enable warnings hunts.
16630 Prototype yylex and yyerror.
16631 `Use' argc.
16632 Include `string.h', not `strings.h'.
16633 Produce and prototype stmtMerge only when used.
16634 yylex takes a location.
16635
16636 2002-06-30 Akim Demaille <akim@epita.fr>
16637
16638 We spend a lot of time in quotearg, in particular when --verbose.
16639
16640 * src/symtab.c (symbol_get): Store a quoted version of the key.
16641 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16642 Adjust all callers.
16643
16644 2002-06-30 Akim Demaille <akim@epita.fr>
16645
16646 * src/state.h (reductions_t): Rename member `nreds' as num.
16647 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16648 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16649
16650 2002-06-30 Akim Demaille <akim@epita.fr>
16651
16652 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16653 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16654 (shifts_to): Rename as...
16655 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16656 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16657 (TRANSITION_IS_DISABLED, transitions_to): these.
16658
16659 2002-06-30 Akim Demaille <akim@epita.fr>
16660
16661 * src/print.c (print_shifts, print_gotos): Merge into...
16662 (print_transitions): this.
16663 (print_transitions, print_errs, print_reductions): Align the
16664 lookaheads columns.
16665 (print_core, print_transitions, print_errs, print_state,
16666 print_grammar): Output empty lines separator before, not after.
16667 (state_default_rule_compute): Rename as...
16668 (state_default_rule): this.
16669 * tests/conflicts.at (Defaulted Conflicted Reduction),
16670 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16671 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16672
16673 2002-06-30 Akim Demaille <akim@epita.fr>
16674
16675 Display items as we display rules.
16676
16677 * src/gram.h, src/gram.c (rule_lhs_print): New.
16678 * src/gram.c (grammar_rules_partial_print): Use it.
16679 * src/print.c (print_core): Likewise.
16680 * tests/conflicts.at (Defaulted Conflicted Reduction),
16681 (Unresolved SR Conflicts): Adjust.
16682 (Unresolved SR Conflicts): Adjust and rename as...
16683 (Resolved SR Conflicts): this, as was meant.
16684 * tests/regression.at (Web2c Report): Adjust.
16685
16686 2002-06-30 Akim Demaille <akim@epita.fr>
16687
16688 * src/print.c (state_default_rule_compute): New, extracted from...
16689 (print_reductions): here.
16690 Pessimize, but clarify the code.
16691 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16692
16693 2002-06-30 Akim Demaille <akim@epita.fr>
16694
16695 * src/output.c (action_row): Let default_rule be always a rule
16696 number.
16697
16698 2002-06-30 Akim Demaille <akim@epita.fr>
16699
16700 * src/closure.c (print_firsts, print_fderives, closure):
16701 Use BITSET_EXECUTE.
16702 * src/lalr.c (lookaheads_print): Likewise.
16703 * src/state.c (state_rule_lookaheads_print): Likewise.
16704 * src/print_graph.c (print_core): Likewise.
16705 * src/print.c (print_reductions): Likewise.
16706 * src/output.c (action_row): Likewise.
16707 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16708
16709 2002-06-30 Akim Demaille <akim@epita.fr>
16710
16711 * src/print_graph.c: Use report_flag.
16712
16713 2002-06-30 Akim Demaille <akim@epita.fr>
16714
16715 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16716 to...
16717 * src/relation.h, src/relation.c (traverse, relation_digraph)
16718 (relation_print, relation_transpose): New.
16719
16720 2002-06-30 Akim Demaille <akim@epita.fr>
16721
16722 * src/state.h, src/state.c (shifts_to): New.
16723 * src/lalr.c (build_relations): Use it.
16724
16725 2002-06-30 Akim Demaille <akim@epita.fr>
16726
16727 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16728 (item_number_of_rule_number, rule_number_of_item_number): New.
16729 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16730 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16731 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16732 Propagate their use.
16733 Much remains to be done, in particular wrt `shorts' from types.h.
16734
16735 2002-06-30 Akim Demaille <akim@epita.fr>
16736
16737 * src/symtab.c (symbol_new): Initialize the `printer' member.
16738
16739 2002-06-30 Akim Demaille <akim@epita.fr>
16740
16741 * src/LR0.c (save_reductions): Remove, replaced by...
16742 * src/state.h, src/state.c (state_reductions_set): New.
16743 (reductions, errs): Rename as...
16744 (reductions_t, errs_t): these.
16745 Adjust all dependencies.
16746
16747 2002-06-30 Akim Demaille <akim@epita.fr>
16748
16749 * src/LR0.c (state_list_t, state_list_append): New.
16750 (first_state, last_state): Now symbol_list_t.
16751 (this_state): Remove.
16752 (new_itemsets, append_states, save_reductions): Take a state_t as
16753 argument.
16754 (set_states, generate_states): Adjust.
16755 (save_shifts): Remove, replaced by...
16756 * src/state.h, src/state.c (state_shifts_set): New.
16757 (shifts): Rename as...
16758 (shifts_t): this.
16759 Adjust all dependencies.
16760 * src/state.h (state_t): Remove the `next' member.
16761
16762 2002-06-30 Akim Demaille <akim@epita.fr>
16763
16764 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16765 escaped in slot 0.
16766
16767 2002-06-30 Akim Demaille <akim@epita.fr>
16768
16769 Use hash.h for the state hash table.
16770
16771 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16772 (allocate_storage): Use state_hash_new.
16773 (free_storage): Use state_hash_free.
16774 (new_state, get_state): Adjust.
16775 * src/lalr.h, src/lalr.c (states): Move to...
16776 * src/states.h (state_t): Remove the `link' member, no longer
16777 used.
16778 * src/states.h, src/states.c: here.
16779 (state_hash_new, state_hash_free, state_hash_lookup)
16780 (state_hash_insert, states_free): New.
16781 * src/states.c (state_table, state_compare, state_hash): New.
16782 * src/output.c (output_actions): Do not free states now, since we
16783 still need to know the final_state number in `prepare', called
16784 afterwards. Do it...
16785 * src/main.c (main): here: call states_free after `output'.
16786
16787 2002-06-30 Akim Demaille <akim@epita.fr>
16788
16789 * src/state.h, src/state.c (state_new): New, extracted from...
16790 * src/LR0.c (new_state): here.
16791 * src/state.h (STATE_ALLOC): Move to...
16792 * src/state.c: here.
16793 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16794 * src/state.h, src/state.c: here.
16795
16796 2002-06-30 Akim Demaille <akim@epita.fr>
16797
16798 * src/reader.c (gensym): Rename as...
16799 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16800 (getsym): Rename as...
16801 (symbol_get): this.
16802
16803 2002-06-30 Akim Demaille <akim@epita.fr>
16804
16805 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16806 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16807 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16808 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16809
16810 2002-06-30 Akim Demaille <akim@epita.fr>
16811
16812 Make the test suite pass with warnings checked.
16813
16814 * tests/actions.at (Printers and Destructors): Improve.
16815 Avoid unsigned vs. signed issues.
16816 * tests/calc.at: Don't exercise the scanner here, do it...
16817 * tests/input.at (Torturing the Scanner): here.
16818
16819 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16820
16821 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16822 reorganize first lines parallel to yacc.c.
16823
16824 2002-06-28 Akim Demaille <akim@epita.fr>
16825
16826 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16827 (b4_token_enum, b4_token_defines): New, factored from...
16828 * data/lalr1.cc, data/yacc.c, glr.c: here.
16829
16830 2002-06-28 Akim Demaille <akim@epita.fr>
16831
16832 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16833 unused variables.
16834 * src/output.c (merger_output): static.
16835
16836 2002-06-28 Akim Demaille <akim@epita.fr>
16837
16838 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16839 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16840 pacify GCC.
16841 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16842
16843 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16844
16845 Accumulated changelog for new GLR parsing features.
16846
16847 * src/conflicts.c (count_total_conflicts): Change name to
16848 conflicts_total_count.
16849 * src/conflicts.h: Ditto.
16850 * src/output.c (token_actions): Use the new name.
16851 (output_conflicts): Change conflp => conflict_list_heads, and
16852 confl => conflict_list for better readability.
16853 * data/glr.c: Use the new names.
16854 * NEWS: Add self to GLR announcement.
16855
16856 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16857
16858 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16859 Akim Demaille.
16860
16861 * data/bison.glr: Change name to glr.c
16862 * data/glr.c: Renamed from bison.glr.
16863 * data/Makefile.am: Add glr.c
16864
16865 * src/getargs.c:
16866
16867 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16868 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16869
16870 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16871
16872 * data/bison.glr: Be sure to restore the
16873 current #line when returning to the skeleton contents after having
16874 exposed the input file's #line.
16875
16876 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16877
16878 * data/bison.glr: Bring up to date with changes to bison.simple.
16879
16880 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16881
16882 * data/bison.glr: Correct definitions that use b4_prefix.
16883 Various reformatting.
16884 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16885 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16886 yytokenp argument; now part of stack.
16887 (yychar): Define to behave as documented.
16888 (yyclearin): Ditto.
16889
16890 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16891
16892 * src/reader.h: Add declaration for free_merger_functions.
16893
16894 * src/reader.c (merge_functions): New variable.
16895 (get_merge_function): New function.
16896 (free_merger_functions): New function.
16897 (readgram): Check for %prec that is not followed by a symbol.
16898 Handle %dprec and %merge declarations.
16899 (packgram): Initialize dprec and merger fields in rules array.
16900
16901 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16902 conflict_list_cnt, conflict_list_free): New variables.
16903 (table_grow): Also grow conflict_table.
16904 (prepare_rules): Output dprec and merger tables.
16905 (conflict_row): New function.
16906 (action_row): Output conflict lists for GLR parser. Don't use
16907 default reduction in conflicted states for GLR parser so that there
16908 are spaces for the conflict lists.
16909 (save_row): Also save conflict information.
16910 (token_actions): Allocate conflict list.
16911 (merger_output): New function.
16912 (pack_vector): Pack conflict table, too.
16913 (output_conflicts): New function to output yyconflp and yyconfl.
16914 (output_check): Allocate conflict_tos.
16915 (output_actions): Output conflict tables, also.
16916 (output_skeleton): Output b4_mergers definition.
16917 (prepare): Output b4_max_rhs_length definition.
16918 Use 'bison.glr' as default skeleton for GLR parsers.
16919
16920 * src/gram.c (glr_parser): New flag.
16921 (grammar_free): Call free_merger_functions.
16922
16923 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16924 all pairs of conflicting reductions, rather than just all tokens
16925 causing conflicts. Needed to size conflict tables.
16926 (conflicts_output): Modify call to count_rr_conflicts for new
16927 interface.
16928 (conflicts_print): Ditto.
16929 (count_total_conflicts): New function.
16930
16931 * src/reader.h (merger_list): New type.
16932 (merge_functions): New variable.
16933
16934 * src/lex.h (tok_dprec, tok_merge): New token types.
16935
16936 * src/gram.h (rule_s): Add dprec and merger fields.
16937 (glr_parser): New flag.
16938
16939 * src/conflicts.h (count_total_conflicts): New function.
16940
16941 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16942
16943 * doc/bison.texinfo (Generalized LR Parsing): New section.
16944 (GLR Parsers): New section.
16945 (Language and Grammar): Mention GLR parsing.
16946 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16947 Correct typo ("tge" -> "the").
16948
16949 * data/bison.glr: New skeleton for GLR parsing.
16950
16951 * tests/cxx-gram.at: New tests for GLR parsing.
16952
16953 * tests/testsuite.at: Include cxx-gram.at.
16954
16955 * tests/Makefile.am: Add cxx-gram.at.
16956
16957 * src/parse-gram.y:
16958
16959 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16960
16961 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16962
16963 2002-06-27 Akim Demaille <akim@epita.fr>
16964
16965 * src/options.h, src/options.c: Remove.
16966 * src/getargs.c (short_options, long_options): New.
16967
16968 2002-06-27 Akim Demaille <akim@epita.fr>
16969
16970 * data/bison.simple, data/bison.c++: Rename as...
16971 * data/yacc.c, data/lalr1.cc: these.
16972 * doc/bison.texinfo (Environment Variables): Remove.
16973
16974 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16975
16976 * src/getargs.c (report_argmatch): Initialize strtok().
16977
16978 2002-06-20 Akim Demaille <akim@epita.fr>
16979
16980 * data/bison.simple (b4_symbol_actions): New, replaces...
16981 (b4_symbol_destructor, b4_symbol_printer): these.
16982 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16983 user token numbers.
16984
16985 2002-06-20 Akim Demaille <akim@epita.fr>
16986
16987 * data/bison.simple (yydestructor): Rename as...
16988 (yydestruct): this.
16989
16990 2002-06-20 Akim Demaille <akim@epita.fr>
16991
16992 * src/symtab.h, src/symtab.c (symbol_type_set)
16993 (symbol_destructor_set, symbol_precedence_set): The location is
16994 the last argument.
16995 Adjust all callers.
16996
16997 2002-06-20 Akim Demaille <akim@epita.fr>
16998
16999 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17000 internals.
17001 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17002 Takes a location.
17003 * src/symtab.h, src/symtab.c (symbol_class_set)
17004 (symbol_user_token_number_set): Likewise.
17005 Adjust all callers.
17006 Promote complain_at.
17007 * tests/input.at (Type Clashes): Adjust.
17008
17009 2002-06-20 Akim Demaille <akim@epita.fr>
17010
17011 * data/bison.simple (YYLEX): Fix the declaration when
17012 %pure-parser.
17013
17014 2002-06-20 Akim Demaille <akim@epita.fr>
17015
17016 * data/bison.simple (yysymprint): Don't print the token number,
17017 just its name.
17018 * tests/actions.at (Destructors): Rename as...
17019 (Printers and Destructors): this.
17020 Also exercise %printer.
17021
17022 2002-06-20 Akim Demaille <akim@epita.fr>
17023
17024 * data/bison.simple (YYDSYMPRINT): New.
17025 Use it to remove many of the #if YYDEBUG/if (yydebug).
17026
17027 2002-06-20 Akim Demaille <akim@epita.fr>
17028
17029 * src/symtab.h, src/symtab.c (symbol_t): printer and
17030 printer_location are new members.
17031 (symbol_printer_set): New.
17032 * src/parse-gram.y (PERCENT_PRINTER): New token.
17033 Handle its associated rule.
17034 * src/scan-gram.l: Adjust.
17035 (handle_destructor_at, handle_destructor_dollar): Rename as...
17036 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17037 * src/output.c (symbol_printers_output): New.
17038 (output_skeleton): Call it.
17039 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17040 since there are already many grammar files with a user `yyprint'.
17041 Replace the calls to YYPRINT to calls to yysymprint.
17042 * tests/calc.at: Adjust.
17043 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17044 taking advantage of parser very internal details (stack size!).
17045
17046 2002-06-20 Akim Demaille <akim@epita.fr>
17047
17048 * src/scan-gram.l: Complete the scanner with the missing patterns
17049 to pacify Flex.
17050 Use `quote' and `symbol_tag_get' where appropriate.
17051
17052 2002-06-19 Akim Demaille <akim@epita.fr>
17053
17054 * tests/actions.at (Destructors): Augment to test locations.
17055 * data/bison.simple (yydestructor): Pass it the current location
17056 if locations are enabled.
17057 Prototype only when __STDC__ or C++.
17058 Change the argument names to move into the yy name space: there is
17059 user code here.
17060
17061 2002-06-19 Akim Demaille <akim@epita.fr>
17062
17063 * data/bison.simple (b4_pure_if): New.
17064 Use it instead of #ifdef YYPURE.
17065
17066 2002-06-19 Akim Demaille <akim@epita.fr>
17067
17068 * data/bison.simple (b4_location_if): New.
17069 Use it instead of #ifdef YYLSP_NEEDED.
17070
17071 2002-06-19 Akim Demaille <akim@epita.fr>
17072
17073 Prepare @$ in %destructor, but currently don't bind it in the
17074 skeleton, as %location use is not cleaned up yet.
17075
17076 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17077 (handle_action_at): New.
17078 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17079 a braced_code_t and a location as additional arguments.
17080 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17081 unquote one when outputting `b4_dollar_dollar'.
17082 Adjust callers.
17083 * data/bison.simple (b4_eval): Remove.
17084 (b4_symbol_destructor): Adjust.
17085 * tests/input.at (Invalid @n): Adjust.
17086
17087 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17088
17089 * doc/bison.texinfo: Document ability to have multiple
17090 prologue sections.
17091
17092 2002-06-18 Akim Demaille <akim@epita.fr>
17093
17094 * src/files.c (compute_base_names): When computing the output file
17095 names from the input file name, strip the directory part.
17096
17097 2002-06-18 Akim Demaille <akim@epita.fr>
17098
17099 * data/bison.simple.new: Comment changes.
17100 Reported by Andreas Schwab.
17101
17102 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17103
17104 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17105 there are no `label `yyoverflowlab' defined but not used' warnings
17106 when yyoverflow is defined.
17107
17108 2002-06-18 Akim Demaille <akim@epita.fr>
17109
17110 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17111 new member.
17112 (symbol_destructor_set): Adjust.
17113 * src/output.c (symbol_destructors_output): Output the destructor
17114 locations.
17115 Output the symbol name.
17116 * data/bison.simple (b4_symbol_destructor): Adjust.
17117
17118 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17119 and Akim Demaille <akim@epita.fr>
17120
17121 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17122 what's left on the stack when the error recovery hits EOF.
17123 * tests/actions.at (Destructors): Complete to exercise this case.
17124
17125 2002-06-17 Akim Demaille <akim@epita.fr>
17126
17127 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17128 arguments is really empty, not only equal to `[]'.
17129 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17130 member.
17131 (symbol_destructor_set): New.
17132 * src/output.c (symbol_destructors_output): New.
17133 * src/reader.h (brace_code_t, current_braced_code): New.
17134 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17135 (handle_dollar): Rename as...
17136 (handle_action_dollar): this.
17137 (handle_destructor_dollar): New.
17138 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17139 (grammar_declaration): Use it.
17140 * data/bison.simple (yystos): Is always defined.
17141 (yydestructor): New.
17142 * tests/actions.at (Destructors): New.
17143 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17144
17145 2002-06-17 Akim Demaille <akim@epita.fr>
17146
17147 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17148 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17149 rule_length only when needed.
17150 * src/output.c (actions_output, token_definitions_output): Output
17151 the full M4 block.
17152 * src/symtab.c: Don't access directly to the symbol tag, use
17153 symbol_tag_get.
17154 * src/parse-gram.y: Use symbol_list_free.
17155
17156 2002-06-17 Akim Demaille <akim@epita.fr>
17157
17158 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17159 (symbol_list_prepend, get_type_name): Move to...
17160 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17161 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17162 Adjust all callers.
17163 (symbol_list_free): New.
17164 * src/scan-gram.l (handle_dollar): Takes a location.
17165 * tests/input.at (Invalid $n): Adjust.
17166
17167 2002-06-17 Akim Demaille <akim@epita.fr>
17168
17169 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17170 (symbol_list_prepend): New.
17171 * src/parse-gram.y (%union): `list' is a new member.
17172 (symbols.1): New, replaces...
17173 (terms_to_prec.1, nterms_to_type.1): these.
17174 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17175 Take a location as additional argument.
17176 Adjust all callers.
17177
17178 2002-06-15 Akim Demaille <akim@epita.fr>
17179
17180 * src/parse-gram.y: Move %token in the declaration section so that
17181 we don't depend upon CVS Bison.
17182
17183 2002-06-15 Akim Demaille <akim@epita.fr>
17184
17185 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17186 * src/print.c (print_core): Use it.
17187
17188 2002-06-15 Akim Demaille <akim@epita.fr>
17189
17190 * src/conflicts.c (log_resolution): Accept the rule involved in
17191 the sr conflicts instead of the lookahead number that points to
17192 that rule.
17193 (flush_reduce): Accept the current lookahead vector as argument,
17194 instead of the index in LA.
17195 (resolve_sr_conflict): Accept the current number of lookahead
17196 bitset to consider for the STATE, instead of the index in LA.
17197 (set_conflicts): Adjust.
17198 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17199
17200 2002-06-15 Akim Demaille <akim@epita.fr>
17201
17202 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17203 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17204 Adjust all dependencies.
17205 * src/lalr.c (initialize_lookaheads): Split into...
17206 (states_lookaheads_count, states_lookaheads_initialize): these.
17207 (lalr): Adjust.
17208
17209 2002-06-15 Akim Demaille <akim@epita.fr>
17210
17211 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17212 out of...
17213 (grammar_rules_print): here.
17214 * src/reduce.c (reduce_output): Use it.
17215 * tests/reduce.at (Useless Rules, Reduced Automaton)
17216 (Underivable Rules): Adjust.
17217
17218 2002-06-15 Akim Demaille <akim@epita.fr>
17219
17220 Copy BYacc's nice way to report the grammar.
17221
17222 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17223 New.
17224 Don't print the rules' location, it is confusing and useless.
17225 (rule_print): Use grammar_rhs_print.
17226 * src/print.c (print_grammar): Use grammar_rules_print.
17227
17228 2002-06-15 Akim Demaille <akim@epita.fr>
17229
17230 Complete and rationalize `useless thing' warnings.
17231
17232 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17233 (symbol_tag_print): New.
17234 Use them everywhere in place of accessing directly the tag member.
17235 * src/gram.h, src/gram.c (rule_print): New.
17236 Use it where a rule used to be printed `by hand'.
17237 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17238 (reduce_grammar_tables): Report the useless rules.
17239 (reduce_print): Useless things are a warning, not an error.
17240 Report it as such.
17241 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17242 (Reduced Automaton, Underivable Rules): Adjust.
17243 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17244 * tests/conflicts.at (Unresolved SR Conflicts)
17245 (Solved SR Conflicts): Adjust.
17246
17247 2002-06-15 Akim Demaille <akim@epita.fr>
17248
17249 Let symbols have a location.
17250
17251 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17252 (getsym): Adjust.
17253 Adjust all callers.
17254 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17255 Use location_t, not int.
17256 * src/symtab.c (symbol_check_defined): Take advantage of the
17257 location.
17258 * tests/regression.at (Invalid inputs): Adjust.
17259
17260 2002-06-15 Akim Demaille <akim@epita.fr>
17261
17262 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17263 (input): Don't try to initialize yylloc here, do it in the
17264 scanner.
17265 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17266 * src/gram.h (rule_t): Change line and action_line into location
17267 and action_location, of location_t type.
17268 Adjust all dependencies.
17269 * src/location.h, src/location.c (empty_location): New.
17270 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17271 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17272 (grammar_current_rule_symbol_append)
17273 (grammar_current_rule_action_append): Expect a location as argument.
17274 * src/reader.c (grammar_midrule_action): Adjust to attach an
17275 action's location as dummy symbol location.
17276 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17277 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17278 the line numbers.
17279
17280 2002-06-14 Akim Demaille <akim@epita.fr>
17281
17282 Grammar declarations may be found in the grammar section.
17283
17284 * src/parse-gram.y (rules_or_grammar_declaration): New.
17285 (declarations): Each declaration may end with a semicolon, not
17286 just...
17287 (grammar_declaration): `"%union"'.
17288 (grammar): Branch to rules_or_grammar_declaration.
17289
17290 2002-06-14 Akim Demaille <akim@epita.fr>
17291
17292 * src/main.c (main): Invoke scanner_free.
17293
17294 2002-06-14 Akim Demaille <akim@epita.fr>
17295
17296 * src/output.c (m4_invoke): Extracted from...
17297 (output_skeleton): here.
17298 Free tempfile.
17299
17300 2002-06-14 Akim Demaille <akim@epita.fr>
17301
17302 * src/parse-gram.y (directives, directive, gram)
17303 (grammar_directives, precedence_directives, precedence_directive):
17304 Rename as...
17305 (declarations, declaration, grammar, grammar_declaration)
17306 (precedence_declaration, precedence_declarator): these.
17307 (symbol_declaration): New.
17308
17309 2002-06-14 Akim Demaille <akim@epita.fr>
17310
17311 * src/files.c (action_obstack): Remove, unused.
17312 (output_obstack): Remove it, and all its dependencies, as it is no
17313 longer needed.
17314 * src/reader.c (epilogue_set): Build the epilogue in the
17315 muscle_obstack.
17316 * src/output.h, src/output.c (muscle_obstack): Move to...
17317 * src/muscle_tab.h, src/muscle_tab.h: here.
17318 (muscle_init): Initialize muscle_obstack.
17319 (muscle_free): New.
17320 * src/main.c (main): Call it.
17321
17322 2002-06-14 Akim Demaille <akim@epita.fr>
17323
17324 * src/location.h: New, extracted from...
17325 * src/reader.h: here.
17326 * src/Makefile.am (noinst_HEADERS): Merge into
17327 (bison_SOURCES): this.
17328 Add location.h.
17329 * src/parse-gram.y: Use location_t instead of Bison's.
17330 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17331 Use location_t instead of ints.
17332
17333 2002-06-14 Akim Demaille <akim@epita.fr>
17334
17335 * data/bison.simple, data/bison.c++: Be sure to restore the
17336 current #line when returning to the skeleton contents after having
17337 exposed the input file's #line.
17338
17339 2002-06-12 Akim Demaille <akim@epita.fr>
17340
17341 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17342 eager.
17343 * tests/actions.at (Exotic Dollars): New.
17344
17345 2002-06-12 Akim Demaille <akim@epita.fr>
17346
17347 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17348 ['"/] too eagerly.
17349 * tests/input.at (Torturing the Scanner): New.
17350
17351 2002-06-11 Akim Demaille <akim@epita.fr>
17352
17353 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17354 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17355 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17356 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17357 * src/reader.c (reader): Use it.
17358
17359 2002-06-11 Akim Demaille <akim@epita.fr>
17360
17361 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17362 Adjust all callers.
17363 (scanner_last_string_free): New.
17364
17365 2002-06-11 Akim Demaille <akim@epita.fr>
17366
17367 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17368 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17369 (last_string, YY_OBS_FREE): New.
17370 Use them when returning an ID.
17371
17372 2002-06-11 Akim Demaille <akim@epita.fr>
17373
17374 Have Bison grammars parsed by a Bison grammar.
17375
17376 * src/reader.c, src/reader.h (prologue_augment): New.
17377 * src/reader.c (copy_definition): Remove.
17378
17379 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17380 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17381 (grammar_current_rule_prec_set, grammar_current_rule_check)
17382 (grammar_current_rule_symbol_append)
17383 (grammar_current_rule_action_append): Export.
17384 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17385 (symbol_list_action_append): Remove.
17386 Hook the routines from reader.
17387 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17388 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17389
17390 * src/reader.c (read_declarations): Remove, unused.
17391
17392 * src/parse-gram.y: Handle the epilogue.
17393 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17394 (grammar_start_symbol_set): this.
17395 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17396 * src/reader.c (readgram): Remove, unused.
17397 (reader): Adjust to insert eoftoken and axiom where appropriate.
17398
17399 * src/reader.c (copy_dollar): Replace with...
17400 * src/scan-gram.h (handle_dollar): this.
17401 * src/parse-gram.y: Remove `%thong'.
17402
17403 * src/reader.c (copy_at): Replace with...
17404 * src/scan-gram.h (handle_at): this.
17405
17406 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17407 New.
17408
17409 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17410 time being.
17411
17412 * src/reader.h, src/reader.c (grammar_rule_end): New.
17413
17414 * src/parse.y (current_type, current_class): New.
17415 Implement `%nterm', `%token' support.
17416 Merge `%term' into `%token'.
17417 (string_as_id): New.
17418 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17419 type name.
17420
17421 * src/parse-gram.y: Be sure to handle properly the beginning of
17422 rules.
17423
17424 * src/parse-gram.y: Handle %type.
17425 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17426
17427 * src/parse-gram.y: More directives support.
17428 * src/options.c: No longer handle source directives.
17429
17430 * src/parse-gram.y: Fix %output.
17431
17432 * src/parse-gram.y: Handle %union.
17433 Use the prologue locations.
17434 * src/reader.c (parse_union_decl): Remove.
17435
17436 * src/reader.h, src/reader.c (epilogue_set): New.
17437 * src/parse-gram.y: Use it.
17438
17439 * data/bison.simple, data/bison.c++: b4_stype is now either not
17440 defined, then default to int, or to the contents of %union,
17441 without `union' itself.
17442 Adjust.
17443 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17444
17445 * src/output.c (actions_output): Don't output braces, as they are
17446 already handled by the scanner.
17447
17448 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17449 characters to themselves.
17450
17451 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17452 that the epilogue has a proper #line.
17453
17454 * src/parse-gram.y: Handle precedence/associativity.
17455
17456 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17457 a terminal.
17458 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17459 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17460 at all to define terminals that cannot be emitted.
17461
17462 * src/scan-gram.l: Escape M4 characters.
17463
17464 * src/scan-gram.l: Working properly with escapes in user
17465 strings/characters.
17466
17467 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17468 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17469 grammar.
17470 Use more modest sizes, as for the time being the parser does not
17471 release memory, and therefore the process swallows a huge amount
17472 of memory.
17473
17474 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17475 stricter %token grammar.
17476
17477 * src/symtab.h (associativity): Add `undef_assoc'.
17478 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17479 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17480
17481 * tests/regression.at (Invalid %directive): Remove, as it is now
17482 meaningless.
17483 (Invalid inputs): Adjust to the new error messages.
17484 (Token definitions): The new grammar doesn't allow too many
17485 eccentricities.
17486
17487 * src/lex.h, src/lex.c: Remove.
17488 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17489 (copy_character, copy_string2, copy_string, copy_identifier)
17490 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17491 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17492 (parse_action): Remove.
17493 * po/POTFILES.in: Adjust.
17494
17495 2002-06-11 Akim Demaille <akim@epita.fr>
17496
17497 * src/reader.c (parse_action): Don't store directly into the
17498 rule's action member: return the action as a string.
17499 Don't require `rule_length' as an argument: compute it.
17500 (grammar_current_rule_symbol_append)
17501 (grammar_current_rule_action_append): New, eved out from
17502 (readgram): here.
17503 Remove `action_flag', `rulelength', unused now.
17504
17505 2002-06-11 Akim Demaille <akim@epita.fr>
17506
17507 * src/reader.c (grammar_current_rule_prec_set).
17508 (grammar_current_rule_check): New, eved out from...
17509 (readgram): here.
17510 Remove `xaction', `first_rhs': useless.
17511 * tests/input.at (Type clashes): New.
17512 * tests/existing.at (GNU Cim Grammar): Adjust.
17513
17514 2002-06-11 Akim Demaille <akim@epita.fr>
17515
17516 * src/reader.c (grammar_midrule_action): New, Eved out from
17517 (readgram): here.
17518
17519 2002-06-11 Akim Demaille <akim@epita.fr>
17520
17521 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17522 New.
17523 (readgram): Use them as replacement of inlined code, crule and
17524 crule1.
17525
17526 2002-06-11 Akim Demaille <akim@epita.fr>
17527
17528 * src/reader.c (grammar_end, grammar_symbol_append): New.
17529 (readgram): Use them.
17530 Make the use of `p' as local as possible.
17531
17532 2002-06-10 Akim Demaille <akim@epita.fr>
17533
17534 GCJ's parser requires the tokens to be defined before the prologue.
17535
17536 * data/bison.simple: Output the token definition before the user's
17537 prologue.
17538 * tests/regression.at (Braces parsing, Duplicate string)
17539 (Mixing %token styles): Check the output from bison.
17540 (Early token definitions): New.
17541
17542 2002-06-10 Akim Demaille <akim@epita.fr>
17543
17544 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17545 assigning twice the same user number to a token, so that we can
17546 use it in...
17547 * src/lex.c (lex): here.
17548 Also use `symbol_class_set' instead of hand written code.
17549 * src/reader.c (parse_assoc_decl): Likewise.
17550
17551 2002-06-10 Akim Demaille <akim@epita.fr>
17552
17553 * src/symtab.c, src/symtab.c (symbol_class_set)
17554 (symbol_user_token_number_set): New.
17555 * src/reader.c (parse_token_decl): Use them.
17556 Use a switch instead of ifs.
17557 Use a single argument.
17558
17559 2002-06-10 Akim Demaille <akim@epita.fr>
17560
17561 Remove `%thong' support as it is undocumented, unused, duplicates
17562 `%token's job, and creates useless e-mail traffic with people who
17563 want to know what it is, why it is undocumented, unused, and
17564 duplicates `%token's job.
17565
17566 * src/reader.c (parse_thong_decl): Remove.
17567 * src/options.c (option_table): Remove "thong".
17568 * src/lex.h (tok_thong): Remove.
17569
17570 2002-06-10 Akim Demaille <akim@epita.fr>
17571
17572 * src/symtab.c, src/symtab.c (symbol_type_set)
17573 (symbol_precedence_set): New.
17574 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17575 (value_components_used): Remove, unused.
17576
17577 2002-06-09 Akim Demaille <akim@epita.fr>
17578
17579 Move symbols handling code out of the reader.
17580
17581 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17582 (axiom): Move to...
17583 * src/symtab.h, src/symtab.c: here.
17584
17585 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17586 * src/reader.c (startval): Rename as...
17587 * src/symtab.h, src/symtab.c (startsymbol): this.
17588 * src/reader.c: Adjust.
17589
17590 * src/reader.c (symbol_check_defined, symbol_make_alias)
17591 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17592 (token_translations_init)
17593 Move to...
17594 * src/symtab.c: here.
17595 * src/reader.c (packsymbols): Move to...
17596 * src/symtab.h, src/symtab.c (symbols_pack): here.
17597 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17598 argument.
17599
17600 2002-06-03 Akim Demaille <akim@epita.fr>
17601
17602 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17603 then statements.
17604
17605 2002-06-03 Akim Demaille <akim@epita.fr>
17606
17607 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17608 structs with non literals.
17609 * src/scan-skel.l: never-interactive.
17610 * src/conflicts.c (enum conflict_resolution_e): No trailing
17611 comma.
17612 * src/getargs.c (usage): Split long literal strings.
17613 Reported by Hans Aberg.
17614
17615 2002-05-28 Akim Demaille <akim@epita.fr>
17616
17617 * data/bison.c++: Use C++ ostreams.
17618 (cdebug_): New member.
17619
17620 2002-05-28 Akim Demaille <akim@epita.fr>
17621
17622 * src/output.c (output_skeleton): Be sure to allocate enough room
17623 for `/' _and_ for `\0' in full_skeleton.
17624
17625 2002-05-28 Akim Demaille <akim@epita.fr>
17626
17627 * data/bison.c++: Catch up with bison.simple:
17628 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17629 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17630 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17631 and popping traces.
17632
17633 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17634
17635 * src/output.c (output_skeleton): Put an explicit path in front of
17636 the skeleton file name, rather than relying on the -I directory,
17637 to partially alleviate effects of having a skeleton file lying around
17638 in the current directory.
17639
17640 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17641
17642 * src/conflicts.c (log_resolution): Correct typo:
17643 obstack_printf should be obstack_fgrow1.
17644
17645 2002-05-26 Akim Demaille <akim@epita.fr>
17646
17647 * src/state.h (state_t): `solved_conflicts' is a new member.
17648 * src/LR0.c (new_state): Set it to 0.
17649 * src/conflicts.h, src/conflicts.c (print_conflicts)
17650 (free_conflicts, solve_conflicts): Rename as...
17651 (conflicts_print, conflicts_free, conflicts_solve): these.
17652 Adjust callers.
17653 * src/conflicts.c (enum conflict_resolution_e)
17654 (solved_conflicts_obstack): New, used by...
17655 (log_resolution): this.
17656 Adjust to attach the conflict resolution to each state.
17657 Complete the description with the precedence/associativity
17658 information.
17659 (resolve_sr_conflict): Adjust.
17660 * src/print.c (print_state): Output its solved_conflicts.
17661 * tests/conflicts.at (Unresolved SR Conflicts)
17662 (Solved SR Conflicts): Exercise --report=all.
17663
17664 2002-05-26 Akim Demaille <akim@epita.fr>
17665
17666 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17667 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17668 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17669 (token_number_t, item_number_as_token_number)
17670 (token_number_as_item_number, muscle_insert_token_number_table):
17671 Rename as...
17672 (symbol_number_t, item_number_as_symbol_number)
17673 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17674 these, since it is more appropriate.
17675
17676 2002-05-26 Akim Demaille <akim@epita.fr>
17677
17678 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17679 `Error:' lines.
17680 * data/bison.simple (yystos) [YYDEBUG]: New.
17681 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17682 error recovery.
17683 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17684
17685 2002-05-25 Akim Demaille <akim@epita.fr>
17686
17687 * doc/bison.texinfo (Debugging): Split into...
17688 (Tracing): this new section, its former contents, and...
17689 (Understanding): this new section.
17690 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17691 by...
17692 (report_flag): this.
17693 Adjust all dependencies.
17694 (report_args, report_types, report_argmatch): New.
17695 (usage, getargs): Report/support -r, --report.
17696 * src/options.h
17697 (struct option_table_struct): Rename as..,
17698 (struct option_table_s): this.
17699 Rename the `set_flag' member to `flag' to match with getopt_long's
17700 struct.
17701 * src/options.c (option_table): Split verbose into an entry for
17702 %verbose, and another for --verbose.
17703 Support --report/-r, so remove -r from the obsolete --raw.
17704 * src/print.c: Attach full item sets and lookaheads reports to
17705 report_flag instead of trace_flag.
17706 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17707
17708 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17709 and Paul Eggert <eggert@twinsun.com>
17710
17711 * data/bison.simple (yyparse): Correct error handling to conform to
17712 POSIX and yacc. Specifically, after syntax error is discovered,
17713 do not reduce further before shifting the error token.
17714 Clean up the code a bit by removing the labels yyerrdefault,
17715 yyerrhandle, yyerrpop.
17716 * NEWS: Document the above.
17717
17718 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17719
17720 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17721 type; it isn't always big enough, since it doesn't necessarily
17722 include non-terminals.
17723 (yytranslate): Expand definition of yy_token_number_type, so that
17724 the latter can be removed.
17725 (yy_token_number_type): Remove, only one use.
17726 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17727 don't use TokenNumberType as element type.
17728
17729 * tests/regression.at: Modify expected output to agree with change
17730 to yyr1 and yytranslate.
17731
17732 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17733
17734 * src/reader.c (parse_action): Use copy_character instead of
17735 obstack_1grow.
17736
17737 2002-05-13 Akim Demaille <akim@epita.fr>
17738
17739 * tests/regression.at (Token definitions): Prototype yylex and
17740 yyerror.
17741
17742 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17743
17744 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17745 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17746 32-bit arithmetic.
17747 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17748
17749 2002-05-07 Akim Demaille <akim@epita.fr>
17750
17751 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17752 avoid GCC warnings.
17753
17754 2002-05-07 Akim Demaille <akim@epita.fr>
17755
17756 Kill GCC warnings.
17757
17758 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17759 over the RHS of each rule.
17760 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17761 * src/state.h (state_t): Member `nitems' is unsigned short.
17762 * src/LR0.c (get_state): Adjust.
17763 * src/reader.c (packgram): Likewise.
17764 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17765 `Type'.
17766 (muscle_insert_int_table): Remove, unused.
17767 (prepare_rules): Remove `max'.
17768
17769 2002-05-06 Akim Demaille <akim@epita.fr>
17770
17771 * src/closure.c (print_firsts): Display of the symbol tags.
17772 (bitmatrix_print): Move to...
17773 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17774 here.
17775 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17776
17777 2002-05-06 Akim Demaille <akim@epita.fr>
17778
17779 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17780 hash_do_for_each.
17781
17782 2002-05-06 Akim Demaille <akim@epita.fr>
17783
17784 * src/LR0.c (new_state, get_state): Instead of using the global
17785 `kernel_size' and `kernel_base', have two new arguments:
17786 `core_size' and `core'.
17787 Adjust callers.
17788
17789 2002-05-06 Akim Demaille <akim@epita.fr>
17790
17791 * src/reader.c (packgram): No longer end `ritem' with a 0
17792 sentinel: it is not used.
17793
17794 2002-05-05 Akim Demaille <akim@epita.fr>
17795
17796 New experimental feature: display the lookaheads in the report and
17797 graph.
17798
17799 * src/print (print_core): When --trace-flag, display the rules
17800 lookaheads.
17801 * src/print_graph.c (print_core): Likewise.
17802 Swap the arguments.
17803 Adjust caller.
17804
17805 2002-05-05 Akim Demaille <akim@epita.fr>
17806
17807 * tests/torture.at (Many lookaheads): New test.
17808
17809 2002-05-05 Akim Demaille <akim@epita.fr>
17810
17811 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17812 (GENERATE_MUSCLE_INSERT_TABLE): this.
17813 (output_int_table, output_unsigned_int_table, output_short_table)
17814 (output_token_number_table, output_item_number_table): Replace with...
17815 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17816 (muscle_insert_short_table, muscle_insert_token_number_table)
17817 (muscle_insert_item_number_table): these.
17818 Adjust all callers.
17819 (prepare_tokens): Don't free `translations', since...
17820 * src/reader.h, src/reader.c (grammar_free): do it.
17821 Move to...
17822 * src/gram.h, src/gram.c (grammar_free): here.
17823 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17824 b4_translate_max.
17825
17826 2002-05-05 Akim Demaille <akim@epita.fr>
17827
17828 * src/output.c (output_unsigned_int_table): New.
17829 (prepare_rules): `i' is unsigned.
17830 `prhs', `rline', `r2' are unsigned int.
17831 Rename muscle `rhs_number_max' as `rhs_max'.
17832 Output muscles `prhs_max', `rline_max', and `r2_max'.
17833 Free rline and r1.
17834 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17835 to compute types instead of constant types.
17836 * tests/regression.at (Web2c Actions): Adjust.
17837
17838 2002-05-04 Akim Demaille <akim@epita.fr>
17839
17840 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17841 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17842 Adjust dependencies.
17843 * src/output.c (token_definitions_output): Be sure not to output a
17844 `#define 'a'' when fed with `%token 'a' "a"'.
17845 * tests/regression.at (Token definitions): New.
17846
17847 2002-05-03 Paul Eggert <eggert@twinsun.com>
17848
17849 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17850 for K&R C.
17851
17852 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17853
17854 * Makefile.am (SUBDIRS): Remove intl.
17855 (EXTRA_DIST): Add config/config.rpath.
17856
17857 2002-05-03 Akim Demaille <akim@epita.fr>
17858
17859 * data/bison.simple (m4_if): Don't output empty enums.
17860 And actually, output valid enum definitions :(.
17861
17862 2002-05-03 Akim Demaille <akim@epita.fr>
17863
17864 * configure.bat: Remove, completely obsolete.
17865 * Makefile.am (EXTRA_DIST): Adjust.
17866 Don't distribute config.rpath...
17867 * config/Makefile.am (EXTRA_DIST): Do it.
17868
17869 2002-05-03 Akim Demaille <akim@epita.fr>
17870
17871 * configure.in (GETTEXT_VERSION): New.
17872 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17873
17874 2002-05-03 Akim Demaille <akim@epita.fr>
17875
17876 * data/bison.simple (b4_token_enum): New.
17877 (b4_token_defines): Use it to output tokens both as #define and
17878 enums.
17879 Suggested by Paul Eggert.
17880 * src/output.c (token_definitions_output): Don't output spurious
17881 white spaces.
17882
17883 2002-05-03 Akim Demaille <akim@epita.fr>
17884
17885 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17886
17887 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17888
17889 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17890 Update the stack class, give a try to deque as the default container.
17891
17892 2002-05-02 Akim Demaille <akim@epita.fr>
17893
17894 * data/bison.simple (yyparse): Do not implement @$ = @1.
17895 (YYLLOC_DEFAULT): Adjust to do it.
17896 * doc/bison.texinfo (Location Default Action): Fix.
17897
17898 2002-05-02 Akim Demaille <akim@epita.fr>
17899
17900 * src/reader.c (parse_braces): Merge into...
17901 (parse_action): this.
17902
17903 2002-05-02 Akim Demaille <akim@epita.fr>
17904
17905 * configure.in (ALL_LINGUAS): Remove.
17906 * po/LINGUAS, hr.po: New.
17907
17908 2002-05-02 Akim Demaille <akim@epita.fr>
17909
17910 Remove the so called hairy (semantic) parsers.
17911
17912 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17913 * src/gram.h, src/gram.c (semantic_parser): Remove.
17914 (rule_t): Remove the guard and guard_line members.
17915 * src/lex.h (token_t): remove tok_guard.
17916 * src/options.c (option_table): Remove %guard and %semantic_parser
17917 support.
17918 * src/output.c, src/output.h (guards_output): Remove.
17919 (prepare): Adjust.
17920 (token_definitions_output): Don't output the `T'
17921 tokens (???).
17922 (output_skeleton): Don't output the guards.
17923 * src/files.c, src/files.c (attrsfile): Remove.
17924 * src/reader.c (symbol_list): Remove the guard and guard_line
17925 members.
17926 Adjust dependencies.
17927 (parse_guard): Remove.
17928 * data/bison.hairy: Remove.
17929 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17930 BISON_HAIRY.
17931
17932 2002-05-02 Akim Demaille <akim@epita.fr>
17933
17934 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17935 (parse_guard): Rename the formal argument `stack_offset' as
17936 `rule_length', which is more readable.
17937 Adjust callers.
17938 (copy_at, copy_dollar): Instead of outputting the hard coded
17939 values of $$, $n and so forth, output invocation to b4_lhs_value,
17940 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17941 Note: this patch partially drops `semantic-parser' support: it
17942 always does `rule_length - n', where semantic parsers ought to
17943 always use `-n'.
17944 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17945 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17946
17947 2002-05-02 Akim Demaille <akim@epita.fr>
17948
17949 * configure.in (AC_INIT): Bump to 1.49b.
17950 (AM_INIT_AUTOMAKE): Short invocation.
17951
17952 2002-05-02 Akim Demaille <akim@epita.fr>
17953
17954 Version 1.49a.
17955
17956 2002-05-01 Akim Demaille <akim@epita.fr>
17957
17958 * src/skeleton.h: Remove.
17959
17960 2002-05-01 Akim Demaille <akim@epita.fr>
17961
17962 * src/skeleton.h: Fix the #endif.
17963 Reported by Magnus Fromreide.
17964
17965 2002-04-26 Paul Eggert <eggert@twinsun.com>
17966
17967 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17968 Define if we define YYSTYPE and YYLTYPE, respectively.
17969 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17970
17971 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17972
17973 * src/scan-skel.l: Postprocess quadrigraphs.
17974
17975 * src/reader.c (copy_character): New function, used to output
17976 single characters while replacing `[' and `]' with quadrigraphs, to
17977 avoid troubles with M4 quotes.
17978 (copy_comment): Output characters with copy_character.
17979 (read_additionnal_code): Likewise.
17980 (copy_string2): Likewise.
17981 (copy_definition): Likewise.
17982
17983 * tests/calc.at: Exercise M4 quoting.
17984
17985 2002-04-25 Akim Demaille <akim@epita.fr>
17986
17987 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17988 between `!' and the command.
17989 Reported by Paul Eggert.
17990
17991 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17992
17993 * tests/calc.at: Exercise prologue splitting.
17994
17995 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17996 `b4_post_prologue' instead of `b4_prologue'.
17997
17998 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17999 muscles.
18000 (output): Free pre_prologue_obstack and post_prologue_obstack.
18001 * src/files.h, src/files.c (attrs_obstack): Remove.
18002 (pre_prologue_obstack, post_prologue_obstack): New.
18003 * src/reader.c (copy_definition): Add a parameter to specify the
18004 obstack to fill, instead of using attrs_obstack unconditionally.
18005 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18006 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18007
18008 2002-04-23 Paul Eggert <eggert@twinsun.com>
18009
18010 * data/bison.simple: Remove unnecessary commentary and white
18011 space differences from 1_29-branch.
18012 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18013
18014 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18015 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18016 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18017 constructors or destructors.
18018
18019 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18020
18021 2002-04-23 Akim Demaille <akim@epita.fr>
18022
18023 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18024 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18025 location with columns.
18026 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18027 All reported by Paul Eggert.
18028
18029 2002-04-22 Akim Demaille <akim@epita.fr>
18030
18031 * src/reduce.c (dump_grammar): Move to...
18032 * src/gram.h, src/gram.c (grammar_dump): here.
18033 Be sure to separate long item numbers.
18034 Don't read the members of a rule's prec if its nil.
18035
18036 2002-04-22 Akim Demaille <akim@epita.fr>
18037
18038 * src/output.c (table_size, table_grow): New.
18039 (MAXTABLE): Remove, replace uses with table_size.
18040 (pack_vector): Instead of dying when the table is too big, grow it.
18041
18042 2002-04-22 Akim Demaille <akim@epita.fr>
18043
18044 * data/bison.simple (yyr1): Its type is that of a token number.
18045 * data/bison.c++ (r1_): Likewise.
18046 * tests/regression.at (Web2c Actions): Adjust.
18047
18048 2002-04-22 Akim Demaille <akim@epita.fr>
18049
18050 * src/reader.c (token_translations_init): 256 is now the default
18051 value for the error token, i.e., it will be assigned another
18052 number if the user assigned 256 to one of her tokens.
18053 (reader): Don't force 256 to error.
18054 * doc/bison.texinfo (Symbols): Adjust.
18055 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18056 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18057 etc. instead of 10, 20, 30 (which was used to `jump' over error
18058 (256) and undefined (2)).
18059
18060 2002-04-22 Akim Demaille <akim@epita.fr>
18061
18062 Propagate more token_number_t.
18063
18064 * src/gram.h (token_number_as_item_number)
18065 (item_number_as_token_number): New.
18066 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18067 Use it to create output_item_number_table and
18068 output_token_number_table.
18069 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18070 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18071 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18072 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18073
18074 2002-04-22 Akim Demaille <akim@epita.fr>
18075
18076 * src/output.h, src/output.c (get_lines_number): Remove.
18077
18078 2002-04-19 Akim Demaille <akim@epita.fr>
18079
18080 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18081 as Lex/Flex'.
18082 (Debugging): More details about enabling the debugging features.
18083 (Table of Symbols): Describe $$, $n, @$, and @n.
18084 Suggested by Tim Josling.
18085
18086 2002-04-19 Akim Demaille <akim@epita.fr>
18087
18088 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18089
18090 2002-04-10 Akim Demaille <akim@epita.fr>
18091
18092 * src/system.h: Rely on HAVE_LIMITS_H.
18093 Suggested by Paul Eggert.
18094
18095 2002-04-09 Akim Demaille <akim@epita.fr>
18096
18097 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18098 full stderr, and strip it according to the bison options, instead
18099 of composing the error message from different bits.
18100 This makes it easier to check for several error messages.
18101 Adjust all the invocations.
18102 Add an invocation exercising the error token.
18103 Add an invocation demonstrating a stupid error message.
18104 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18105 Adjust the tests.
18106 Error message are for stderr, not stdout.
18107
18108 2002-04-09 Akim Demaille <akim@epita.fr>
18109
18110 * src/gram.h, src/gram.c (error_token_number): Remove, use
18111 errtoken->number.
18112 * src/reader.c (reader): Don't specify the user token number (2)
18113 for $undefined, as it uselessly prevents using it.
18114 * src/gram.h (token_number_t): Move to...
18115 * src/symtab.h: here.
18116 (state_t.number): Is a token_number_t.
18117 * src/print.c, src/reader.c: Use undeftoken->number instead of
18118 hard coded 2.
18119 (Even though this 2 is not the same as above: the number of the
18120 undeftoken remains being 2, it is its user token number which
18121 might not be 2).
18122 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18123 `user_token_number_max'.
18124 Output `undef_token_number'.
18125 * data/bison.simple, data/bison.c++: Use them.
18126 Be sure to map invalid yylex return values to
18127 `undef_token_number'. This saves us from gratuitous SEGV.
18128
18129 * tests/conflicts.at (Solved SR Conflicts)
18130 (Unresolved SR Conflicts): Adjust.
18131 * tests/regression.at (Web2c Actions): Adjust.
18132
18133 2002-04-08 Akim Demaille <akim@epita.fr>
18134
18135 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18136 Adding #line.
18137 Remove the duplicate `typedefs'.
18138 (RhsNumberType): Fix the declaration and various other typos.
18139 Use __ofile__.
18140 * data/bison.simple: Use __ofile__.
18141 * src/scan-skel.l: Handle __ofile__.
18142
18143 2002-04-08 Akim Demaille <akim@epita.fr>
18144
18145 * src/gram.h (item_number_t): New, the type of item numbers in
18146 RITEM. Note that it must be able to code symbol numbers as
18147 positive number, and the negation of rule numbers as negative
18148 numbers.
18149 Adjust all dependencies (pretty many).
18150 * src/reduce.c (rule): Remove this `short *' pointer: use
18151 item_number_t.
18152 * src/system.h (MINSHORT, MAXSHORT): Remove.
18153 Include `limits.h'.
18154 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18155 (shortcpy): Remove.
18156 (MAXTABLE): Move to...
18157 * src/output.c (MAXTABLE): here.
18158 (prepare_rules): Use output_int_table to output rhs.
18159 * data/bison.simple, data/bison.c++: Adjust.
18160 * tests/torture.at (Big triangle): Move the limit from 254 to
18161 500.
18162 * tests/regression.at (Web2c Actions): Ajust.
18163
18164 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18165 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18166 passes, but produces negative #line number, once fixed, GCC is
18167 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18168 C), it passes.
18169 * src/state.h (state_h): Code input lines on ints, not shorts.
18170
18171 2002-04-08 Akim Demaille <akim@epita.fr>
18172
18173 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18174 and then the grammar.
18175
18176 2002-04-08 Akim Demaille <akim@epita.fr>
18177
18178 * src/system.h: No longer using strndup.
18179
18180 2002-04-07 Akim Demaille <akim@epita.fr>
18181
18182 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18183 * src/output.c (output_table_data): Return the longest number.
18184 (prepare_tokens): Output `token_number_max').
18185 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18186 New.
18187 Use them to define yy_token_number_type/TokenNumberType.
18188 Use this type for yytranslate.
18189 * tests/torture.at (Big triangle): Push the limit from 124 to
18190 253.
18191 * tests/regression.at (Web2c Actions): Adjust.
18192
18193 2002-04-07 Akim Demaille <akim@epita.fr>
18194
18195 * tests/torture.at (Big triangle): New.
18196 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18197 * tests/existing.at: here.
18198
18199 2002-04-07 Akim Demaille <akim@epita.fr>
18200
18201 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18202 nritems.
18203 Adjust dependencies.
18204
18205 2002-04-07 Akim Demaille <akim@epita.fr>
18206
18207 * src/reader.c: Normalize increments to prefix form.
18208
18209 2002-04-07 Akim Demaille <akim@epita.fr>
18210
18211 * src/reader.c, symtab.c: Remove debugging code.
18212
18213 2002-04-07 Akim Demaille <akim@epita.fr>
18214
18215 Rename all the `bucket's as `symbol_t'.
18216
18217 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18218 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18219 * src/symtab.c, src/symtab.h (bucket): Rename as...
18220 (symbol_t): this.
18221 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18222 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18223 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18224 (buckets_new, buckets_free, buckets_do): Rename as...
18225 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18226 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18227 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18228 (symbols_new, symbols_free, symbols_do): these.
18229
18230 2002-04-07 Akim Demaille <akim@epita.fr>
18231
18232 Use lib/hash for the symbol table.
18233
18234 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18235 EOF.
18236 * src/lex.c (lex): Set the `number' member of new terminals.
18237 * src/reader.c (bucket_check_defined, bucket_make_alias)
18238 (bucket_check_alias_consistence, bucket_translation): New.
18239 (reader, grammar_free, readgram, token_translations_init)
18240 (packsymbols): Adjust.
18241 (reader): Number the predefined tokens.
18242 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18243 for predefined tokens.
18244 * src/symtab.h (bucket): Remove all the hash table related
18245 members.
18246 * src/symtab.c (symtab): Replace by...
18247 (bucket_table): this.
18248 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18249 (buckets_new, buckets_do): New.
18250
18251 2002-04-07 Akim Demaille <akim@epita.fr>
18252
18253 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18254 (start_symbol, max_user_token_number, semantic_parser)
18255 (error_token_number): Initialize.
18256 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18257 Initialize.
18258 (reader): Don't.
18259 (errtoken, eoftoken, undeftoken, axiom): Extern.
18260
18261 2002-04-07 Akim Demaille <akim@epita.fr>
18262
18263 * src/gram.h (rule_s): prec and precsym are now pointers
18264 to the bucket giving the priority/associativity.
18265 Member `associativity' removed: useless.
18266 * src/reduce.c, src/conflicts.c: Adjust.
18267
18268 2002-04-07 Akim Demaille <akim@epita.fr>
18269
18270 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18271 Properly escape the symbols' TAG when outputting them.
18272
18273 2002-04-07 Akim Demaille <akim@epita.fr>
18274
18275 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18276
18277 2002-04-07 Akim Demaille <akim@epita.fr>
18278
18279 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18280 (LArule): this, which is an array to rule_t*.
18281 * src/print.c, src/conflicts.c: Adjust.
18282
18283 2002-04-07 Akim Demaille <akim@epita.fr>
18284
18285 * src/gram.h (rule_t): Rename `number' as `user_number'.
18286 `number' is a new member.
18287 Adjust dependencies.
18288 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18289
18290 2002-04-07 Akim Demaille <akim@epita.fr>
18291
18292 As a result of the previous patch, it is no longer needed
18293 to reorder ritem itself.
18294
18295 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18296
18297 2002-04-07 Akim Demaille <akim@epita.fr>
18298
18299 Be sure never to walk through RITEMS, but use only data related to
18300 the rules themselves. RITEMS should be banished.
18301
18302 * src/output.c (output_token_translations): Rename as...
18303 (prepare_tokens): this.
18304 In addition to `translate', prepare the muscles `tname' and
18305 `toknum', which were handled by...
18306 (output_rule_data): this.
18307 Remove, and move the remainder of its outputs into...
18308 (prepare_rules): this new routines, which also merges content from
18309 (output_gram): this.
18310 (prepare_rules): Be sure never to walk through RITEMS.
18311 (output_stos): Rename as...
18312 (prepare_stos): this.
18313 (output): Always invoke prepare_states, after all, just don't use it
18314 in the output if you don't need it.
18315
18316 2002-04-07 Akim Demaille <akim@epita.fr>
18317
18318 * src/LR0.c (new_state): Display `nstates' as the name of the
18319 newly created state.
18320 Adjust to initialize first_state and last_state if needed.
18321 Be sure to distinguish the initial from the final state.
18322 (new_states): Create the itemset of the initial state, and use
18323 new_state.
18324 * src/closure.c (closure): Now that the initial state has its
18325 items properly set, there is no need for a special case when
18326 creating `ruleset'.
18327
18328 As a result, now the rule 0, reducing to $axiom, is visible in the
18329 outputs. Adjust the test suite.
18330
18331 * tests/conflicts.at (Solved SR Conflicts)
18332 (Unresolved SR Conflicts): Adjust.
18333 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18334 * tests/conflicts.at (S/R in initial): New.
18335
18336 2002-04-07 Akim Demaille <akim@epita.fr>
18337
18338 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18339 the RHS of the rules.
18340 * src/output.c (output_gram): Likewise.
18341
18342 2002-04-07 Akim Demaille <akim@epita.fr>
18343
18344 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18345 bucket.
18346 Adjust all dependencies.
18347 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18348 `number' of the buckets too.
18349 * src/gram.h: Include `symtab.h'.
18350 (associativity): Move to...
18351 * src/symtab.h: here.
18352 No longer include `gram.h'.
18353
18354 2002-04-07 Akim Demaille <akim@epita.fr>
18355
18356 * src/gram.h, src/gram.c (rules_rhs_length): New.
18357 (ritem_longest_rhs): Use it.
18358 * src/gram.h (rule_t): `number' is a new member.
18359 * src/reader.c (packgram): Set it.
18360 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18361 the end of `rules', and count them out of `nrules'.
18362 (reduce_output, dump_grammar): Adjust.
18363 * src/print.c (print_grammar): It is no longer needed to check for
18364 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18365 * tests/reduce.at (Reduced Automaton): New test.
18366
18367 2002-04-07 Akim Demaille <akim@epita.fr>
18368
18369 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18370 lacking `+ 1' to nrules, Bison reported as useless a token if it
18371 was used solely to set the precedence of the last rule...
18372
18373 2002-04-07 Akim Demaille <akim@epita.fr>
18374
18375 * data/bison.c++, data/bison.simple: Don't output the current file
18376 name in #line, to avoid useless diffs between two identical
18377 outputs under different names.
18378
18379 2002-04-07 Akim Demaille <akim@epita.fr>
18380
18381 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18382 Normalize loops to using `< nrules + 1', not `<= nrules'.
18383
18384 2002-04-07 Akim Demaille <akim@epita.fr>
18385
18386 * TODO: Update.
18387
18388 2002-04-07 Akim Demaille <akim@epita.fr>
18389
18390 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18391 bucket.value as bucket.number.
18392
18393 2002-04-07 Akim Demaille <akim@epita.fr>
18394
18395 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18396 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18397 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18398 RHS, instead of being an index in RITEMS.
18399
18400 2002-04-04 Paul Eggert <eggert@twinsun.com>
18401
18402 * doc/bison.texinfo: Update copyright date.
18403 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18404 (Symbols): Warn about running Bison in one character set,
18405 but compiling and/or running in an incompatible one.
18406 Warn about character code 256, too.
18407
18408 2002-04-03 Paul Eggert <eggert@twinsun.com>
18409
18410 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18411 YYERROR_VERBOSE is nonzero, not whether it is defined.
18412
18413 Merge changes from bison-1_29-branch.
18414
18415 2002-03-20 Paul Eggert <eggert@twinsun.com>
18416
18417 Merge fixes from Debian bison_1.34-1.diff.
18418
18419 * configure.in (AC_PREREQ): 2.53.
18420
18421 2002-03-20 Akim Demaille <akim@epita.fr>
18422
18423 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18424
18425 2002-03-19 Paul Eggert <eggert@twinsun.com>
18426
18427 * src/bison.simple (YYCOPY): New macro.
18428 (YYSTACK_RELOCATE): Use it.
18429 Remove Type arg; no longer needed. All callers changed.
18430 (yymemcpy): Remove; no longer needed.
18431
18432 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18433 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18434
18435 2002-03-19 Akim Demaille <akim@epita.fr>
18436
18437 Test and fix the #line outputs.
18438
18439 * tests/atlocal.at (GCC): New.
18440 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18441 (Prologue synch line, %union synch line, Postprologue synch line)
18442 (Action synch line, Epilogue synch line): New tests.
18443 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18444 * data/bison.simple, data/bison.c++: Use it.
18445
18446 2002-03-19 Akim Demaille <akim@epita.fr>
18447
18448 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18449 (Solved SR Conflicts, %expect not enough, %expect right)
18450 (%expect too much): Move to...
18451 * tests/conflicts.at: this new file.
18452
18453 2002-03-19 Akim Demaille <akim@epita.fr>
18454
18455 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18456 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18457 that we can move to enums for instance.
18458 * src/output.c (token_definitions_output): Output a list of
18459 `token-name, token-number' instead of the #define.
18460 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18461
18462 2002-03-14 Akim Demaille <akim@epita.fr>
18463
18464 Use Gettext 0.11.1.
18465
18466 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18467
18468 * data/bison.c++: Make the user able to add members to the generated
18469 parser by subclassing.
18470
18471 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18472
18473 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18474 a character.
18475 Reported by Nicolas Tisserand and Nicolas Burrus.
18476
18477 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18478
18479 * src/reader.c: Warn about lacking semi-colons, do not complain.
18480
18481 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18482
18483 * data/bison.c++: Remove a debug line.
18484
18485 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18486
18487 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18488 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18489 provide a default implementation.
18490
18491 2002-03-04 Akim Demaille <akim@epita.fr>
18492
18493 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18494 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18495 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18496 * tests/semantic.at (Parsing Guards): Similarly.
18497 * src/reader.at (readgram): Complain if the last rule is not ended
18498 with a semi-colon.
18499
18500 2002-03-04 Akim Demaille <akim@epita.fr>
18501
18502 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18503 * src/closure.c: here.
18504 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18505 RTC.
18506 * src/warshall.h, src/warshall.c: Remove.
18507 * tests/sets.at (Broken Closure): Adjust.
18508
18509 2002-03-04 Akim Demaille <akim@epita.fr>
18510
18511 * src/output.c (output_skeleton): tempdir is const.
18512 bytes_read is unused.
18513
18514 2002-03-04 Akim Demaille <akim@epita.fr>
18515
18516 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18517 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18518 Update.
18519 From Michael Hayes.
18520
18521 2002-03-04 Akim Demaille <akim@epita.fr>
18522
18523 * src/closure.c (closure): `r' is unused.
18524
18525 2002-03-04 Akim Demaille <akim@epita.fr>
18526
18527 * tests/sets.at (Broken Closure): Add the ending `;'.
18528 * src/reader.at (readgram): Complain if a rule is not ended with a
18529 semi-colon.
18530
18531 2002-03-04 Akim Demaille <akim@epita.fr>
18532
18533 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18534 (count_sr_conflicts): Use bitset_count.
18535 * src/reduce.c (inaccessable_symbols): Ditto.
18536 (bits_size): Remove.
18537 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18538
18539 2002-03-04 Akim Demaille <akim@epita.fr>
18540
18541 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18542 * src/reduce.c: Remove the `bitset_zero's following the
18543 `bitset_create's, as now it is performed by the latter.
18544
18545 2002-03-04 Akim Demaille <akim@epita.fr>
18546
18547 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18548 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18549 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18550 latest sources from Michael.
18551
18552 2002-03-04 Akim Demaille <akim@epita.fr>
18553
18554 * src/output.c (output): Don't free the grammar.
18555 * src/reader.c (grammar_free): New.
18556 * src/main.c (main): Call it and don't free symtab here.
18557
18558 2002-03-04 Akim Demaille <akim@epita.fr>
18559
18560 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18561 before returning.
18562 Reported by Benoit Perrot.
18563
18564 2002-03-04 Akim Demaille <akim@epita.fr>
18565
18566 Use bitset operations when possible, not loops over bits.
18567
18568 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18569 bitset_or.
18570 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18571 * src/reduce.c (useless_nonterminals): Formatting changes.
18572 * src/warshall.c (TC): Use bitset_or.
18573
18574 2002-03-04 Akim Demaille <akim@epita.fr>
18575
18576 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18577 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18578 Ditto.
18579
18580 2002-03-04 Akim Demaille <akim@epita.fr>
18581
18582 * src/lalr.c (F): Now a bitset*.
18583 Adjust all dependencies.
18584
18585 2002-03-04 Akim Demaille <akim@epita.fr>
18586
18587 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18588 Adjust all dependencies.
18589
18590 2002-03-04 Akim Demaille <akim@epita.fr>
18591
18592 * src/L0.c, src/LR0.h (nstates): Be size_t.
18593 Adjust comparisons (signed vs unsigned).
18594 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18595 bitset*.
18596 Adjust all dependencies.
18597
18598 2002-03-04 Akim Demaille <akim@epita.fr>
18599
18600 * src/closure.c (firsts): Now, also a bitset.
18601 Adjust all dependencies.
18602 (varsetsize): Remove, now unused.
18603 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18604
18605 2002-03-04 Akim Demaille <akim@epita.fr>
18606
18607 * src/print.c: Convert to use bitset.h, not hand coded iterations
18608 over ints.
18609
18610 2002-03-04 Akim Demaille <akim@epita.fr>
18611
18612 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18613
18614 2002-03-04 Akim Demaille <akim@epita.fr>
18615
18616 * src/closure.c (ruleset): Be a bitset.
18617 (rulesetsize): Remove.
18618
18619 2002-03-04 Akim Demaille <akim@epita.fr>
18620
18621 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18622 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18623 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18624 * src/closure.c (fderives): Be an array of bitsets.
18625
18626 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18627
18628 * data/bison.c++: Merge the two generated headers. Insert a copyright
18629 notice in each output file.
18630
18631 2002-02-28 Akim Demaille <akim@epita.fr>
18632
18633 * data/bison.c++: Copy the prologue of bison.simple to fetch
18634 useful M4 definitions, such as b4_header_guard.
18635
18636 2002-02-25 Akim Demaille <akim@epita.fr>
18637
18638 * src/getargs.c (version): Give the name of the authors, and use a
18639 translator friendly scheme for the bgr
18640 copyright notice.
18641
18642 2002-02-25 Akim Demaille <akim@epita.fr>
18643
18644 * src/output.c (header_output): Remove, now handled completely via
18645 M4.
18646
18647 2002-02-25 Akim Demaille <akim@epita.fr>
18648
18649 * m4/m4.m4: New, from CVS Autoconf.
18650 * configure.in: Invoke it.
18651 * src/output.c (output_skeleton): Use its result instead of the
18652 hard coded name.
18653
18654 2002-02-25 Akim Demaille <akim@epita.fr>
18655
18656 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18657 Fileutils 4.1.5.
18658 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18659 * src/output.c (output_skeleton): Use mkstemp to create a real
18660 temporary file.
18661 Move the filling of `skeleton' and its muscle to...
18662 (prepare): here.
18663 (output): Move the definition of the prologue muscle to...
18664 (prepare): here.
18665 * src/system.h (DEFAULT_TMPDIR): New.
18666
18667 2002-02-14 Paul Eggert <eggert@twinsun.com>
18668
18669 Remove the support for C++ namespace cleanliness; it was
18670 causing more problems than it was curing, since it didn't work
18671 properly on some nonstandard C++ compilers. This can wait
18672 for a proper C++ parser.
18673
18674 * NEWS: Document this.
18675 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18676 of C++, as it's treated like C now.
18677 * src/bison.simple (YYSTD): Remove.
18678 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18679 Treat C++ just like Standard C instead of trying to support
18680 namespace cleanliness.
18681
18682 2002-02-14 Akim Demaille <akim@epita.fr>
18683
18684 * tests/regression.at (else): Adjust to Andreas' change.
18685
18686 2002-02-14 Akim Demaille <akim@epita.fr>
18687
18688 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18689
18690 2002-02-13 Andreas Schwab <schwab@suse.de>
18691
18692 * src/output.c (output_rule_data): Don't output NULL, it might
18693 not be defined yet.
18694
18695 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18696
18697 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18698 (Copyright notice): Update.
18699
18700 2002-02-11 Akim Demaille <akim@epita.fr>
18701
18702 * tests/regression.at (%nonassoc and eof): Don't include
18703 nonportable headers.
18704
18705 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18706
18707 * data/bison.c++: Correct error recovery. Make the user able to
18708 initialize the starting location.
18709
18710 2002-02-07 Akim Demaille <akim@epita.fr>
18711
18712 * tests/input.at: New.
18713
18714 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18715
18716 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18717 more consistent when naming methods and variables. Put preprocessor
18718 directives around tables only needed for debugging.
18719
18720 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18721
18722 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18723 C++ parsers.
18724 (yy::b4_name::parse): Use print_.
18725
18726 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18727
18728 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18729
18730 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18731
18732 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18733 C++ parsers.
18734 (yy::b4_name::parse): Build verbose error messages, and use error_.
18735
18736 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18737
18738 * data/bison.c++: Fix m4 quoting in comments.
18739
18740 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18741
18742 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18743 not expanded by m4.
18744
18745 2002-02-05 Akim Demaille <akim@epita.fr>
18746
18747 * data/bison.c++: Adjust to the M4 back end.
18748 More is certainly needed.
18749
18750 2002-02-05 Akim Demaille <akim@epita.fr>
18751
18752 Give a try to M4 as a back end.
18753
18754 * lib/readpipe.c: New, from wdiff.
18755 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18756 BISON_HAIRY.
18757 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18758 specific values. Now it is m4 that performs the lookup.
18759 * src/parse-skel.y: Remove.
18760 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18761 * src/output.c (actions_output, guards_output)
18762 (token_definitions_output): No longer keeps track of the output
18763 line number, hence remove the second argument.
18764 (guards_output): Check against the guard member of a rule, not the
18765 action member.
18766 Adjust callers.
18767 (output_skeleton): Don't look for the skeleton location, let m4 do
18768 that.
18769 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18770 file will be used.
18771 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18772 (prepare): Given that for the time being changesyntax is not
18773 usable in M4, rename the muscles using `-' to `_'.
18774 Define `defines_flag', `output_parser_name' and `output_header_name'.
18775 * src/output.h (actions_output, guards_output)
18776 (token_definitions_output): Adjust prototypes.
18777 * src/scan-skel.l: Instead of scanning the skeletons, it now
18778 processes the output of m4: `__oline__' and `#output'.
18779 * data/bison.simple: Adjust to be used by M4(sugar).
18780 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18781 to date.
18782 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18783 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18784 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18785 shamelessly stolen from CVS Autoconf.
18786
18787 2002-02-05 Akim Demaille <akim@epita.fr>
18788
18789 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18790 * configure.in: Check for the declarations of free and malloc.
18791 * src/muscle_tab.c: Adjust.
18792
18793 2002-02-05 Akim Demaille <akim@epita.fr>
18794
18795 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18796 which have no values.
18797
18798 2002-02-05 Akim Demaille <akim@epita.fr>
18799
18800 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18801 * data/: here.
18802
18803 2002-01-29 Paul Eggert <eggert@twinsun.com>
18804
18805 * src/bison.simple (YYSIZE_T): Do not define merely because
18806 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18807 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18808
18809 2002-01-27 Akim Demaille <akim@epita.fr>
18810
18811 Fix `%nonassoc and eof'.
18812
18813 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18814 which were not properly copied! Replace
18815 memcpy (res->errs, src->errs, src->nerrs);
18816 with
18817 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18818 !!!
18819 * tests/regression.at (%nonassoc and eof): Adjust to newest
18820 Autotest: `.' is not in the PATH.
18821
18822 2002-01-27 Akim Demaille <akim@epita.fr>
18823
18824 * tests/sets.at (AT_EXTRACT_SETS): New.
18825 (Nullable): Use it.
18826 (Firsts): New.
18827
18828 2002-01-26 Akim Demaille <akim@epita.fr>
18829
18830 * tests/actions.at, tests/calc.at, tests/headers.at,
18831 * tests/torture.at: Adjust to the newest Autotest which no longer
18832 forces `.' in the PATH.
18833
18834 2002-01-25 Akim Demaille <akim@epita.fr>
18835
18836 * tests/regression.at (%nonassoc and eof): New.
18837 Suggested by Robert Anisko.
18838
18839 2002-01-24 Akim Demaille <akim@epita.fr>
18840
18841 Bison dumps core when trying to complain about broken input files.
18842 Reported by Cris van Pelt.
18843
18844 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18845 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18846 into...
18847 (Invalid inputs): Strengthen: exercise parse_percent_token.
18848
18849 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18850
18851 * src/Makefile.am: Add bison.c++.
18852 * src/bison.c++: New skeleton.
18853
18854 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18855
18856 * po/it.po: New.
18857
18858 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18859
18860 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18861
18862 2002-01-20 Marc Autret <marc@gnu.org>
18863
18864 * src/files.c (compute_output_file_names): Fix
18865
18866 2002-01-20 Marc Autret <marc@gnu.org>
18867
18868 * tests/output.at: New test.
18869 * src/files.c (compute_base_names): Don't map extensions when
18870 the YACC flag is set, use defaults.
18871 Reported by Evgeny Stambulchik.
18872
18873 2002-01-20 Marc Autret <marc@gnu.org>
18874
18875 * src/system.h: Need to define __attribute__ away for non-GCC
18876 compilers as well (i.e., the vendor C compiler).
18877 Suggested by Albert Chin-A-Young.
18878
18879 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18880
18881 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18882 canonical definition.
18883 * src/system.h: Use the canonical definition for PARAMS (avoids
18884 a conflict with the macro from lib/hash.h).
18885
18886 2002-01-11 Akim Demaille <akim@epita.fr>
18887
18888 * configure.in: Use AC_FUNC_STRNLEN.
18889 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18890
18891 2002-01-09 Akim Demaille <akim@epita.fr>
18892
18893 * src/files.c, src/files.h (output_infix): New.
18894 (tab_extension): Remove.
18895 (compute_base_names): Compute the former, drop the latter.
18896 * src/output.c (prepare): Insert the muscles `output-infix', and
18897 `output-suffix'.
18898 * src/parse-skel.y (string, string.1): New.
18899 (section.header): Use it.
18900 (section.yacc): Remove.
18901 (prefix): Remove too.
18902 * src/scan-skel.l: Adjust.
18903 * src/bison.simple, src/bison.hairy: Adjust.
18904
18905 2002-01-09 Akim Demaille <akim@epita.fr>
18906
18907 * configure.in (WERROR_CFLAGS): Compute it.
18908 * src/Makefile.am (CFLAGS): Pass it.
18909 * tests/atlocal.in (CFLAGS): Idem.
18910 * src/files.c: Fix a few warnings.
18911 (get_extension_index): Remove, unused.
18912
18913 2002-01-08 Akim Demaille <akim@epita.fr>
18914
18915 * src/getargs.c (AS_FILE_NAME): New.
18916 (getargs): Use it to convert DOSish file names.
18917 * src/files.c (base_name): Rename as full_base_name to avoid
18918 clashes with `base_name ()'.
18919 (filename_split): New.
18920 (compute_base_names): N-th rewrite, using filename_split.
18921
18922 2002-01-08 Akim Demaille <akim@epita.fr>
18923
18924 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18925 New, stolen from the Fileutils 4.1.
18926 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18927 * configure.in: Check for the presence of memrchr, and of its
18928 prototype.
18929
18930 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18931
18932 * lib/hash.h (__P): Added definition for this macro.
18933 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18934 BUILT_SOURCES, to ensure they are generated first.
18935 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18936 %error-verbose to allow bootstrapping with bison 1.30x.
18937
18938 2002-01-06 Akim Demaille <akim@epita.fr>
18939
18940 * src/reader.c (parse_braces): Don't fetch the next char, the
18941 convention is to fetch on entry.
18942 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18943 'switch' without a following semicolon.
18944 * tests/regression.at (braces parsing): New.
18945
18946 2002-01-06 Akim Demaille <akim@epita.fr>
18947
18948 Bison is dead wrong in its RR conflict reports.
18949
18950 * tests/torture.at (GNU Cim Grammar): New.
18951 * src/conflicts.c (count_rr_conflicts): Fix.
18952
18953 2002-01-06 Akim Demaille <akim@epita.fr>
18954
18955 Creating package.m4 from configure.ac causes too many problems.
18956
18957 * tests/Makefile.am (package.m4): Create it by hand,
18958 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18959
18960 2002-01-06 Akim Demaille <akim@epita.fr>
18961
18962 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18963 skeleton.h.
18964
18965 2002-01-04 Paul Eggert <eggert@twinsun.com>
18966
18967 * doc/bison.texinfo (Debugging):
18968 Remove YYSTDERR; it's no longer defined or used.
18969 Also, s/cstdio.h/cstdio/.
18970
18971 2002-01-03 Akim Demaille <akim@epita.fr>
18972
18973 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18974
18975 2002-01-03 Akim Demaille <akim@epita.fr>
18976
18977 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18978 tracing code to --trace, wait for a better --trace option, with
18979 args.
18980
18981 2002-01-03 Akim Demaille <akim@epita.fr>
18982
18983 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18984 The ISO C++ standard is extremely clear about it: stderr is
18985 considered a macro, not a regular symbol (see table 94 `Header
18986 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18987 Therefore std:: does not apply to it. It still does with fprintf.
18988 Also, s/cstdio.h/cstdio/.
18989
18990 2002-01-03 Akim Demaille <akim@epita.fr>
18991
18992 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18993 for non system headers.
18994
18995 2002-01-02 Akim Demaille <akim@epita.fr>
18996
18997 Equip the skeleton chain with location tracking, runtime trace,
18998 pure parser and scanner.
18999
19000 * src/parse-skel.y: Request a pure parser, locations, and prefix
19001 renaming.
19002 (%union): Having several members with the same type does not help
19003 type mismatches, simplify.
19004 (YYPRINT, yyprint): New.
19005 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19006 (skel_error): this.
19007 Handle locations.
19008 * src/scan-skel.l: Adjust to these changes.
19009 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19010 (LOCATION_PRINT, skel_control_t): New.
19011
19012 2001-12-30 Akim Demaille <akim@epita.fr>
19013
19014 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19015 replace `gb' with BLANKS.
19016 * src/scan-skel.l: Adjust.
19017
19018 2001-12-30 Akim Demaille <akim@epita.fr>
19019
19020 * src/system.h: We don't need nor want bcopy.
19021 Throw away MS-DOS crap: we don't need getpid.
19022 * configure.in: We don't need strndup. It was even causing
19023 problems: because Flex includes the headers *before* us,
19024 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19025 not visible.
19026 * lib/xstrndup.c: New.
19027 * src/scan-skel.l: Use it.
19028 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19029 * src/parse-skel.y: Use %directives instead of #defines.
19030
19031 2001-12-30 Akim Demaille <akim@epita.fr>
19032
19033 * src/skeleton.h: New.
19034 * src/output.c (output_parser, output_master_parser): Remove, dead
19035 code.
19036 * src/output.h (get_lines_number, actions_output, guards_output)
19037 (token_definitions_output): Prototype them.
19038 * src/parse-skel.y: Add the license notice.
19039 Include output.h and skeleton.h.
19040 (process_skeleton): Returns void, and takes a single parameter.
19041 * src/scan-skel.l: Add the license notice.
19042 Include skeleton.h.
19043 Don't use %option yylineno: it seems that then Flex imagines
19044 REJECT has been used, and therefore it won't reallocate its
19045 buffers (which makes no other sense to me than a bug). It results
19046 in warnings for `unused: yy_flex_realloc'.
19047
19048 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19049
19050 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19051 (MUSCLE_INSERT_PREFIX): ...to there.
19052 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19053 (MUSCLE_INSERT_PREFIX): Move from here...
19054
19055 * src/bison.hairy: Add a section directive. Put braces around muscle
19056 names. This parser skeleton is still broken, but Bison should not
19057 choke on a bad muscle 'syntax'.
19058 * src/bison.simple: Add a section directive. Put braces around muscle
19059 names.
19060
19061 * src/files.h (strsuffix, stringappend): Add declarations.
19062 (tab_extension): Add declaration.
19063 (short_base_name): Add declaration.
19064
19065 * src/files.c (strsuffix, stringappend): No longer static. These
19066 functions are used in the skeleton parser.
19067 (tab_extension): New.
19068 (compute_base_names): Use the computations done in this function
19069 to guess if the generated parsers should have '.tab' in their
19070 names.
19071 (short_base_name): No longer static.
19072
19073 * src/output.c (output_skeleton): New.
19074 (output): Disable call to output_master_parser, and give a try to
19075 a new skeleton handling system.
19076 (guards_output, actions_output): No longer static.
19077 (token_definitions_output, get_lines_number): No longer static.
19078
19079 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19080
19081 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19082 parse-skel.y.
19083
19084 * src/parse-skel.y: New file.
19085 * src/scan-skel.l: New file.
19086
19087 2001-12-29 Akim Demaille <akim@epita.fr>
19088
19089 %name-prefix is broken.
19090
19091 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19092 Adjust all dependencies.
19093 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19094 %name-prefix.
19095
19096 Renaming yylval but not yylloc is not consistent. Now we do.
19097
19098 * src/bison.simple: Prefix yylloc if used.
19099 * doc/bison.texinfo (Decl Summary): Document that.
19100
19101 2001-12-29 Akim Demaille <akim@epita.fr>
19102
19103 * doc/bison.texinfo: Promote `%long-directive' over
19104 `%long_directive'.
19105 Remove all references to fixed-output-files, yacc is enough.
19106
19107 2001-12-29 Akim Demaille <akim@epita.fr>
19108
19109 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19110 user prologue. These are defaults.
19111 * tests/actions.at (Mid-rule actions): Make sure the user can
19112 define YYDEBUG and YYERROR_VERBOSE.
19113
19114 2001-12-29 Akim Demaille <akim@epita.fr>
19115
19116 * src/output.c (header_output): Don't forget to export YYLTYPE and
19117 yylloc.
19118 * tests/headers.at (export YYLTYPE): New, make sure it does.
19119 * tests/regression.at (%union and --defines, Invalid CPP headers):
19120 Move to...
19121 * tests/headers.at: here.
19122
19123 2001-12-29 Akim Demaille <akim@epita.fr>
19124
19125 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19126
19127 2001-12-29 Akim Demaille <akim@epita.fr>
19128
19129 * tests/actions.at (Mid-rule actions): Output on a single line
19130 instead of several.
19131
19132 2001-12-29 Akim Demaille <akim@epita.fr>
19133
19134 * doc/bison.texinfo: Formatting changes.
19135
19136 2001-12-29 Akim Demaille <akim@epita.fr>
19137
19138 Don't store the token defs in a muscle, just be ready to output it
19139 on command. Now possible via `symbols'. Fixes a memory leak.
19140
19141 * src/output.c (token_definitions_output): New.
19142 (output_parser, header_output): Use it.
19143 * src/reader.c (symbols_save): Remove.
19144
19145 2001-12-29 Akim Demaille <akim@epita.fr>
19146
19147 * src/bison.simple: Do not provide a default for YYSTYPE and
19148 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19149 default.
19150
19151 2001-12-29 Akim Demaille <akim@epita.fr>
19152
19153 Mid-rule actions are simply... ignored!
19154
19155 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19156 the empty-rule associated to the dummy symbol, not to the host
19157 rule.
19158 * tests/actions.at (Mid-rule actions): New.
19159
19160 2001-12-29 Akim Demaille <akim@epita.fr>
19161
19162 Memory leak.
19163
19164 * src/reader.c (reader): Free grammar.
19165
19166 2001-12-29 Akim Demaille <akim@epita.fr>
19167
19168 Memory leak.
19169
19170 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19171 since it allocates it for each state, although only one is needed.
19172 (allocate_storage): Do it here.
19173
19174 2001-12-29 Akim Demaille <akim@epita.fr>
19175
19176 * src/options.h, src/options.c (create_long_option_table): Rename
19177 as...
19178 (long_option_table_new): this, with a clearer prototype.
19179 (percent_table): Remove, unused,
19180 * src/getargs.c (getargs): Adjust.
19181
19182 2001-12-29 Akim Demaille <akim@epita.fr>
19183
19184 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19185 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19186 as states.
19187
19188 2001-12-29 Akim Demaille <akim@epita.fr>
19189
19190 * src/lalr.c (build_relations): Rename `states' as `states1'.
19191 Sorry, I don't understand exactly what it is, no better name...
19192
19193 2001-12-29 Akim Demaille <akim@epita.fr>
19194
19195 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19196 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19197 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19198 as rules.
19199
19200 2001-12-29 Akim Demaille <akim@epita.fr>
19201
19202 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19203 ago.
19204
19205 2001-12-29 Akim Demaille <akim@epita.fr>
19206
19207 * src/reader.c, src/reader.h (user_toknums): Remove.
19208 Adjust all users to use symbols[i]->user_token_number.
19209
19210 2001-12-29 Akim Demaille <akim@epita.fr>
19211
19212 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19213 Adjust all users to use symbols[i]->prec or ->assoc.
19214
19215 2001-12-29 Akim Demaille <akim@epita.fr>
19216
19217 * src/reader.c, src/reader.h (tags): Remove.
19218 Adjust all users to use symbols[i]->tag.
19219
19220 2001-12-29 Akim Demaille <akim@epita.fr>
19221
19222 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19223 and rule_table.
19224 * src/reader.c (packsymbols): Fill this table.
19225 Drop sprec.
19226 * src/conflicts.c (resolve_sr_conflict): Adjust.
19227 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19228 single table.
19229 Use symbols[i]->tag instead of tags[i].
19230
19231 2001-12-29 Akim Demaille <akim@epita.fr>
19232
19233 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19234 In addition, put a comment in there, to replace...
19235 * tests/regression.at (%union and C comments): Remove.
19236
19237 2001-12-29 Akim Demaille <akim@epita.fr>
19238
19239 * tests/regression.at (Web2c Actions): Blindly move the actual
19240 output as expected output. The contents *seem* right to me, but I
19241 can't pretend reading perfectly parser tables... Nonetheless, all
19242 the other tests pass correctly, the table look OK, even though the
19243 presence of `$axiom' is to be noted: AFAICS it is useless (but
19244 harmless).
19245
19246 2001-12-29 Akim Demaille <akim@epita.fr>
19247
19248 * src/reader.c (readgram): Don't add the rule 0 if there were no
19249 rules read. In other words, add it _after_ having performed
19250 grammar sanity checks.
19251 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19252
19253 2001-12-29 Akim Demaille <akim@epita.fr>
19254
19255 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19256 visible, and some states have now a different number.
19257
19258 2001-12-29 Akim Demaille <akim@epita.fr>
19259
19260 * src/reader.c (readgram): Bind the initial rule's lineno to that
19261 of the first rule.
19262 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19263 (Solved SR Conflicts): Adjust rule 0's line number.
19264
19265 2001-12-29 Akim Demaille <akim@epita.fr>
19266
19267 Fix the `GAWK Grammar' failure.
19268
19269 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19270 the reductions of the first state which was mistakenly confused
19271 with the final state because precisely final_state was initialized
19272 to 0.
19273 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19274 now noticed by Bison.
19275 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19276 have a reduction on $default.
19277
19278 2001-12-29 Akim Demaille <akim@epita.fr>
19279
19280 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19281 rule line numbers.
19282 * src/closure.c (print_closure): Likewise.
19283 * src/derives.c (print_derives): Likewise.
19284 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19285 now.
19286
19287 2001-12-29 Akim Demaille <akim@epita.fr>
19288
19289 * src/lalr.c (lookaheads_print): New.
19290 (lalr): Call it when --trace-flag.
19291 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19292 are dumped.
19293
19294 2001-12-29 Akim Demaille <akim@epita.fr>
19295
19296 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19297 when walking through ritem, even via rule->rhs.
19298 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19299 (useful_production, useless_nonterminals): Likewise.
19300 (reduce_grammar_tables): Likewise, plus update nritems.
19301 * src/nullable.c (set_nullable): Likewise.
19302 * src/lalr.c (build_relations): Likewise.
19303 * tests/sets.at (Nullable): Adjust.
19304 Fortunately, now, the $axiom is no longer nullable.
19305
19306 2001-12-29 Akim Demaille <akim@epita.fr>
19307
19308 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19309 the 0-sentinel.
19310 * src/gram.c (ritem_longest_rhs): Likewise.
19311 * src/reduce.c (nonterminals_reduce): Likewise.
19312 * src/print_graph.c (print_graph): Likewise.
19313 * src/output.c (output_rule_data): Likewise.
19314 * src/nullable.c (set_nullable): Likewise.
19315
19316 2001-12-29 Akim Demaille <akim@epita.fr>
19317
19318 * src/output.c: Comment changes.
19319
19320 2001-12-27 Paul Eggert <eggert@twinsun.com>
19321
19322 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19323 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19324 Sparc, as they were causing more porting problems than the
19325 (minor) performance improvement was worth.
19326
19327 Also, catch up with 1.31's YYSTD.
19328
19329 2001-12-27 Akim Demaille <akim@epita.fr>
19330
19331 * src/output.c (output_gram): Rely on nritems, not the
19332 0-sentinel. See below.
19333 Use -1 as separator, not 0.
19334 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19335 Rely on -1 as separator in yyrhs, instead of 0.
19336 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19337 twice `Now at end of input', therefore there are two lines less to
19338 expect.
19339
19340 2001-12-27 Akim Demaille <akim@epita.fr>
19341
19342 * tests/regression.at (Unresolved SR Conflicts):
19343 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19344 below.
19345
19346 2001-12-27 Akim Demaille <akim@epita.fr>
19347
19348 * src/LR0.c (new_state): Recognize the final state by the fact it
19349 is reached by eoftoken.
19350 (insert_start_shifting_state, insert_eof_shifting_state)
19351 (insert_accepting_state, augment_automaton): Remove, since now
19352 these states are automatically computed from the initial state.
19353 (generate_states): Adjust.
19354 * src/print.c: When reporting a rule number to the user, substract
19355 1, so that the axiom rule is rule 0, and the first user rule is 1.
19356 * src/reduce.c: Likewise.
19357 * src/print_graph.c (print_core): For the time being, just as for
19358 the report, depend upon --trace-flags to dump the full set of
19359 items.
19360 * src/reader.c (readgram): Once the grammar read, insert the rule
19361 0: `$axiom: START-SYMBOL $'.
19362 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19363 number of the states has changed (the final state is no longer
19364 necessarily the last), catch up.
19365
19366 2001-12-27 Akim Demaille <akim@epita.fr>
19367
19368 Try to make the use of the eoftoken valid. Given that its value
19369 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19370 is used instead of > 0 where appropriate, (ii), depend upon nritems
19371 instead of the 0-sentinel.
19372
19373 * src/gram.h, src/gram.c (nritems): New.
19374 Expected to be duplication of nitems, but for the time being...
19375 * src/reader.c (packgram): Assert nritems and nitems are equal.
19376 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19377 * src/closure.c (print_closure, print_fderives): Likewise.
19378 * src/gram.c (ritem_print): Likewise.
19379 * src/print.c (print_core, print_grammar): Likewise.
19380 * src/print_graph.c: Likewise.
19381
19382 2001-12-27 Akim Demaille <akim@epita.fr>
19383
19384 * src/main.c (main): If there are complains after grammar
19385 reductions, then output the report anyway if requested, then die.
19386 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19387 * src/reader.c (eoftoken): New.
19388 (parse_token_decl): If the token being defined has value `0', it
19389 is the eoftoken.
19390 (packsymbols): No longer hack `tags' to insert `$' by hand.
19391 Be sure to preserve the value of the eoftoken.
19392 (reader): Make sure eoftoken is defined.
19393 Initialize nsyms to 0: now eoftoken is created just like the others.
19394 * src/print.c (print_grammar): Don't special case the eof token.
19395 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19396 lie anyway, albeit pleasant.
19397 * tests/calc.at: Exercise error messages with eoftoken.
19398 Change the grammar so that empty input is invalid.
19399 Adjust expectations.
19400 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19401
19402 2001-12-27 Akim Demaille <akim@epita.fr>
19403
19404 * configure.in: Check the protos of strchr ans strspn.
19405 Replace strchr if needed.
19406 * src/system.h: Provide the protos of strchr, strspn and memchr if
19407 missing.
19408 * lib/strchr.c: New.
19409 * src/reader.c (symbols_save): Use strchr.
19410
19411 2001-12-27 Akim Demaille <akim@epita.fr>
19412
19413 * src/print.c, src/print_graph.c (escape): New.
19414 Use it to quote the TAGS outputs.
19415 * src/print_graph.c (print_state): Now errors are in red, and
19416 reductions in green.
19417 Prefer high to wide: output the state number on a line of its own.
19418
19419 2001-12-27 Akim Demaille <akim@epita.fr>
19420
19421 * src/state.h, src/state.c (reductions_new): New.
19422 * src/LR0.c (set_state_table): Let all the states have a
19423 `reductions', even if reduced to 0.
19424 (save_reductions): Adjust.
19425 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19426 * src/print.c (print_reductions, print_actions): Adjust.
19427 * src/output.c (action_row): Adjust.
19428
19429 2001-12-27 Akim Demaille <akim@epita.fr>
19430
19431 * src/state.h, src/state.c (errs_new, errs_dup): New.
19432 * src/LR0.c (set_state_table): Let all the states have an errs,
19433 even if reduced to 0.
19434 * src/print.c (print_errs, print_reductions): Adjust.
19435 * src/output.c (output_actions, action_row): Adjust.
19436 * src/conflicts.c (resolve_sr_conflict): Adjust.
19437
19438 2001-12-27 Akim Demaille <akim@epita.fr>
19439
19440 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19441
19442 2001-12-27 Akim Demaille <akim@epita.fr>
19443
19444 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19445 * src/print.c: here.
19446 (lookaheadset, shiftset): New, used as additional storage by
19447 print_reductions.
19448 (print_results): Adjust.
19449 (print_shifts, print_gotos, print_errs): New, extracted from...
19450 (print_actions): here.
19451 * src/print_graph.c (print_actions): Remove dead code.
19452
19453 2001-12-27 Akim Demaille <akim@epita.fr>
19454
19455 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19456 `$n' and `@n'.
19457
19458 2001-12-27 Akim Demaille <akim@epita.fr>
19459
19460 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19461 (build_relations): Adjust.
19462
19463 2001-12-27 Akim Demaille <akim@epita.fr>
19464
19465 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19466 duplication.
19467
19468 2001-12-27 Akim Demaille <akim@epita.fr>
19469
19470 * src/reader.c (packgram): Catch nitems overflows.
19471
19472 2001-12-27 Akim Demaille <akim@epita.fr>
19473
19474 * src/files.c, src/files.h (guard_obstack): Remove.
19475 * src/output.c (output): Adjust.
19476 * src/reader.c (parse_braces): New, factoring...
19477 (copy_action, copy_guard): these two which are renamed as...
19478 (parse_action, parse_guard): these.
19479 As a voluntary consequence, using braces around guards is now
19480 mandatory.
19481
19482 2001-12-27 Akim Demaille <akim@epita.fr>
19483
19484 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19485 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19486 members.
19487 (symbol_list_new): Adjust.
19488 (copy_action): action_line is the first line, not the last.
19489 (copy_guard): Just as for actions, store the `action' only, not
19490 the switch/case/break flesh.
19491 Don't parse the user action that might follow the guard, let...
19492 (readgram): do it, i.e., now, there can be an action after a
19493 guard.
19494 In other words the guard is just explicitly optional.
19495 (packgram): Adjust.
19496 * src/output.c (guards_output): New.
19497 (output_parser): Call it when needed.
19498 (output): Also free the guard and attrs obstacks.
19499 * src/files.c, src/files.h (obstack_save): Remove.
19500 (output_files): Remove.
19501 As a result, if one needs the former `.act' file, using an
19502 appropriate skeleton which requires actions and guards is now
19503 required.
19504 * src/main.c (main): Adjust.
19505 * tests/semantic.at: New.
19506 * tests/regression.at: Use `input.y' as input file name.
19507 Avoid 8+3 problems by requiring input.c when the test needs the
19508 parser.
19509
19510 2001-12-27 Akim Demaille <akim@epita.fr>
19511
19512 * src/reader.c (symbol_list_new): Be sure to initialize all the
19513 fields.
19514
19515 2001-12-27 Akim Demaille <akim@epita.fr>
19516
19517 All the hacks using a final pseudo state are now useless.
19518
19519 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19520 * src/lalr.c (nLA): New.
19521 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19522 instead of lookaheadsp from the pseudo state (nstate + 1).
19523
19524 2001-12-27 Akim Demaille <akim@epita.fr>
19525
19526 * src/output.c (action_row, token_actions): Use a state_t instead
19527 of a integer, and nlookaheads instead of the following state's
19528 lookaheadsp.
19529
19530 2001-12-27 Akim Demaille <akim@epita.fr>
19531
19532 * src/conflicts.c (log_resolution, flush_shift)
19533 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19534 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19535 (conflicts_print, print_reductions): Use a state_t instead of an
19536 integer when referring to a state.
19537 As much as possible, depend upon nlookaheads, instead of the
19538 `lookaheadsp' member of the following state (since lookaheads of
19539 successive states are successive, the difference between state n + 1
19540 and n served as the number of lookaheads for state n).
19541 * src/lalr.c (add_lookback_edge): Likewise.
19542 * src/print.c (print_core, print_actions, print_state)
19543 (print_results): Likewise.
19544 * src/print_graph.c (print_core, print_actions, print_state)
19545 (print_graph): Likewise.
19546 * src/conflicts.h: Adjust.
19547
19548 2001-12-27 Akim Demaille <akim@epita.fr>
19549
19550 * src/bison.hairy: Formatting/comment changes.
19551 ANSIfy.
19552 Remove `register' indications.
19553 Add plenty of `static'.
19554
19555 2001-12-27 Akim Demaille <akim@epita.fr>
19556
19557 * src/output.c (prepare): Drop the muscle `ntbase' which
19558 duplicates ntokens.
19559 * src/bison.simple: Formatting/comment changes.
19560 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19561 is an undocumented synonym.
19562
19563 2001-12-22 Akim Demaille <akim@epita.fr>
19564
19565 * src/output.c (output_table_data): Change the prototype to use
19566 `int' for array ranges: some invocations do pass an int, not a
19567 short.
19568 Reported by Wayne Green.
19569
19570 2001-12-22 Akim Demaille <akim@epita.fr>
19571
19572 Some actions of web2c.y are improperly triggered.
19573 Reported by Mike Castle.
19574
19575 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19576 * tests/regression.at (Web2c): Rename as...
19577 (Web2c Report): this.
19578 (Web2c Actions): New.
19579
19580 2001-12-22 Akim Demaille <akim@epita.fr>
19581
19582 Reductions in web2c.y are improperly reported.
19583 Reported by Mike Castle.
19584
19585 * src/conflicts.c (print_reductions): Fix.
19586 * tests/regression.at (Web2c): New.
19587
19588 2001-12-18 Akim Demaille <akim@epita.fr>
19589
19590 Some host fail on `assert (!"foo")', which expands to
19591 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19592 Reported by Nelson Beebee.
19593
19594 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19595 `#define it_succeeded 0' and `assert (it_succeeded)'.
19596
19597 2001-12-17 Marc Autret <autret_m@epita.fr>
19598
19599 * src/bison.simple: Don't hard code the skeleton line and filename.
19600 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19601 New line counter 'skeleton_line' (skeleton-line muscle).
19602
19603 2001-12-17 Paul Eggert <eggert@twinsun.com>
19604
19605 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19606 YYDEBUG must be defined to a nonzero value.
19607
19608 * src/bison.simple (yytname): Do not assume that the user defines
19609 YYDEBUG to a properly parenthesized expression.
19610
19611 2001-12-17 Akim Demaille <akim@epita.fr>
19612
19613 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19614 nlookaheads is a new member.
19615 Adjust all users.
19616 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19617 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19618 state.
19619
19620 2001-12-17 Akim Demaille <akim@epita.fr>
19621
19622 * src/files.h, src/files.c (open_files, close_files): Remove.
19623 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19624 let...
19625 * src/reader.c (reader): Do it.
19626
19627 2001-12-17 Akim Demaille <akim@epita.fr>
19628
19629 * src/conflicts.c (print_reductions): Formatting changes.
19630
19631 2001-12-17 Akim Demaille <akim@epita.fr>
19632
19633 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19634 (flush_reduce): New.
19635 (resolve_sr_conflict): Adjust.
19636
19637 2001-12-17 Akim Demaille <akim@epita.fr>
19638
19639 * src/output.c (output_obstack): Be static and rename as...
19640 (format_obstack): this, to avoid any confusion with files.c's
19641 output_obstack.
19642 * src/reader.h (muscle_obstack): Move to...
19643 * src/output.h: here, since it's defined in output.c.
19644
19645 2001-12-17 Akim Demaille <akim@epita.fr>
19646
19647 * src/output.c (action_row, save_column, default_goto)
19648 (sort_actions, matching_state, pack_vector): Better variable
19649 locality.
19650
19651 2001-12-17 Akim Demaille <akim@epita.fr>
19652
19653 * src/output.c: Various formatting changes.
19654
19655 2001-12-17 Akim Demaille <akim@epita.fr>
19656
19657 * src/files.c (output_files): Free the output_obstack.
19658 * src/main.c (main): Call print and print_graph conditionally.
19659 * src/print.c (print): Work unconditionally.
19660 * src/print_graph.c (print_graph): Work unconditionally.
19661 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19662
19663 2001-12-16 Marc Autret <autret_m@epita.fr>
19664
19665 * src/output.c (actions_output): Fix. When we use %no-lines,
19666 there is one less line per action.
19667
19668 2001-12-16 Marc Autret <autret_m@epita.fr>
19669
19670 * src/bison.simple: Remove a useless #line directive.
19671 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19672 * src/output.c (get_lines_number): New.
19673 (output_parser): Adjust, now takes care about the lines of a
19674 output muscles.
19675 Fix line numbering.
19676 (actions_output): Computes the number of lines taken by actions.
19677 (output_master_parser): Insert new skeleton which is the name of
19678 the output parser file name.
19679
19680 2001-12-15 Marc Autret <autret_m@epita.fr>
19681
19682 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19683
19684 2001-12-15 Marc Autret <autret_m@epita.fr>
19685
19686 * src/output.c (output_gram): Keep track of the hairy one.
19687
19688 2001-12-15 Akim Demaille <akim@epita.fr>
19689
19690 Make `make distcheck' work.
19691
19692 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19693 system.h which uses libgettext.h.
19694
19695 2001-12-15 Akim Demaille <akim@epita.fr>
19696
19697 * src/nullable.c (set_nullable): Useless rules must be skipped,
19698 otherwise, since we range over their symbols, we might look at a
19699 nonterminal which no longer ``exists'', i.e., it is not counted in
19700 `nvars', hence we overflow our arrays.
19701
19702 2001-12-15 Akim Demaille <akim@epita.fr>
19703
19704 The header can also be produced directly, without any obstack!
19705 Yahoo!
19706
19707 * src/files.c, src/files.h (defines_obstack): Remove.
19708 (compute_header_macro): Global.
19709 (defines_obstack_save): Remove.
19710 * src/reader.c (parse_union_decl): No longer output to
19711 defines_obstack: its content can be found in the `stype' muscle
19712 anyway.
19713 (output_token_translations): Merge into...
19714 (symbols_output): this.
19715 Rename as...
19716 (symbols_save): this.
19717 (reader): Adjust.
19718 * src/output.c (header_output): New.
19719 (output): Call it.
19720
19721 2001-12-15 Akim Demaille <akim@epita.fr>
19722
19723 * src/reader.c (parse_union_decl): Instead of handling two obstack
19724 simultaneously, use one to define the `stype' muscle, and use the
19725 value of the latter to fill defines_obstack.
19726 (copy_comment): Remove.
19727 (copy_comment2): Work for a single obstack.
19728 Rename as...
19729 (copy_comment): this.
19730
19731 2001-12-15 Akim Demaille <akim@epita.fr>
19732
19733 * src/lex.c, src/lex.h (xgetc): No longer static.
19734 * src/reader.c (parse_union_decl): Revamp.
19735
19736 2001-12-15 Akim Demaille <akim@epita.fr>
19737
19738 Still making progress in separating Bison into (i) input, (ii)
19739 process, (iii) output: now we can directly output the parser file
19740 without using table_obstack at all.
19741
19742 * src/files.c, src/files.h (table_obstack): Bye bye.
19743 (parser_file_name): New.
19744 * src/files.c (compute_output_file_names): Compute it.
19745 * src/output.c (actions_output, output_parser)
19746 (output_master_parser): To a file instead of an obstack.
19747
19748 2001-12-15 Akim Demaille <akim@epita.fr>
19749
19750 Attach actions to rules, instead of pre-outputting them to
19751 actions_obstack.
19752
19753 * src/gram.h (rule_t): action and action_line are new members.
19754 * src/reader.c (symbol_list): Likewise.
19755 (copy_action): Save the actions within the rule.
19756 (packgram): Save them in rule_table.
19757 * src/output.c (actions_output): New.
19758 (output_parser): Use it on `%%actions'.
19759 (output_rule_data): Don't free rule_table.
19760 (output): Do it.
19761 (prepare): Don't save the `action' muscle.
19762 * src/bison.simple: s/%%action/%%actions/.
19763
19764 2001-12-15 Akim Demaille <akim@epita.fr>
19765
19766 * src/reader.c (copy_action): When --yacc, don't append a `;'
19767 to the user action: let it fail if lacking.
19768 Suggested by Arnold Robbins and Tom Tromey.
19769
19770 2001-12-14 Akim Demaille <akim@epita.fr>
19771
19772 * src/lex.c (literalchar): Simply return the char you decoded, non
19773 longer mess around with obstacks and int pointers.
19774 Adjust all callers.
19775
19776 2001-12-14 Akim Demaille <akim@epita.fr>
19777
19778 * src/lex.c (literalchar): Don't escape the special characters,
19779 just decode them, and keep them as char (before, eol was output as
19780 the 2 char string `\n' etc.).
19781 * src/output.c (output_rule_data): Use quotearg to output the
19782 token strings.
19783
19784 2001-12-13 Paul Eggert <eggert@twinsun.com>
19785
19786 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19787 Do not infringe on the global user namespace when using C++.
19788 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19789 All uses of `fprintf' and `stderr' changed.
19790
19791 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19792
19793 2001-12-13 Akim Demaille <akim@epita.fr>
19794
19795 The computation of nullable is broken: it doesn't handle empty
19796 RHS's properly.
19797
19798 * tests/torture.at (GNU AWK Grammar): New.
19799 * tests/sets.at (Nullable): New.
19800 * src/nullable.c (set_nullable): Instead of blindly looping over
19801 `ritems', loop over the rules, and then over their rhs's.
19802
19803 Work around Autotest bugs.
19804
19805 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19806 frame, because Autotest understand lines starting with a `+' as
19807 traces from the shell. Then, they are not processed properly.
19808 Admittedly an Autotest bug, but we don't have time to wait for
19809 Autotest to catch up.
19810 * tests/regression.at (Broken Closure): Adjust to the new table
19811 frames.
19812 Move to...
19813 * tests/sets.at: here.
19814
19815 2001-12-13 Akim Demaille <akim@epita.fr>
19816
19817 * src/closure.c (closure): Use nrules instead of playing tricks
19818 with BITS_PER_WORD.
19819
19820 2001-12-13 Akim Demaille <akim@epita.fr>
19821
19822 * src/print.c (print_actions): Output the handling of `$' as the
19823 traces do: shifting the token EOF. Before EOF was treated as a
19824 nonterminal.
19825 * tests/regression.at: Adjust some tests.
19826 * src/print_graph.c (print_core): Complete the set of items via
19827 closure. The next-to-final and final states are still unsatisfying,
19828 but that's to be addressed elsewhere.
19829 No longer output the rule numbers, but do output the state number.
19830 A single loop for the shifts + gotos is enough, but picked a
19831 distinct color for each.
19832 (print_graph): Initialize and finalize closure.
19833
19834 2001-12-13 Akim Demaille <akim@epita.fr>
19835
19836 * src/reader.c (readgram): Remove dead code, an strip useless
19837 braces.
19838 (get_type): Remove, unused.
19839
19840 2001-12-12 Akim Demaille <akim@epita.fr>
19841
19842 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19843 on that of lib/error.c.
19844
19845 2001-12-12 Akim Demaille <akim@epita.fr>
19846
19847 Some hosts don't like `/' in includes.
19848
19849 * src/system.h: Include libgettext.h without qualifying the path.
19850 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19851 $(top_srcdir).
19852
19853 2001-12-11 Marc Autret <autret_m@epita.fr>
19854
19855 * src/output.c (output_parser): Remove useless muscle.
19856
19857 2001-12-11 Marc Autret <autret_m@epita.fr>
19858
19859 * src/bison.simple: Remove #line just before %%epilogue. It
19860 is now handled in ...
19861 * src/reader.c (read_additionnal_code): Add the output of a
19862 #line for the epilogue.
19863
19864 2001-12-10 Marc Autret <autret_m@epita.fr>
19865
19866 * src/reader.c (copy_definition): Re-use CPP-outed code which
19867 replace precedent remove.
19868 * src/bison.simple: Remove #line before %%prologue because
19869 %%input-line is wrong at this time.
19870
19871 2001-12-10 Marc Autret <autret_m@epita.fr>
19872
19873 * src/reader.c (symbols_output): Clean up.
19874 * src/output.c (output_gram, output): Clean up.
19875
19876 2001-12-10 Akim Demaille <akim@epita.fr>
19877
19878 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19879 * src/LR0.c (set_state_table): here.
19880 * src/lalr.c (lalr): Call it.
19881
19882 2001-12-10 Akim Demaille <akim@epita.fr>
19883
19884 * src/state.h (shifts): Remove the `number' member: shifts are
19885 attached to state, hence no longer need to be labelled with a
19886 state number.
19887
19888 2001-12-10 Akim Demaille <akim@epita.fr>
19889
19890 Now that states have a complete set of members, the linked list of
19891 shifts is useless: just fill directly the state's shifts member.
19892
19893 * src/state.h (shifts): Remove the `next' member.
19894 * src/LR0.c (first_state, last_state): Remove.
19895 Adjust the callers.
19896 (augment_automaton): Don't look for the shifts that must be added
19897 a shift on EOF: it is those of the state we looked for! But now,
19898 since shifts are attached, it is no longer needed to looking
19899 merely by its id: its number.
19900
19901 2001-12-10 Akim Demaille <akim@epita.fr>
19902
19903 * src/LR0.c (augment_automaton): Better variable locality.
19904 Remove an impossible branch: if there is a state corresponding to
19905 the start symbol being shifted, then there is shift for the start
19906 symbol from the initial state.
19907
19908 2001-12-10 Akim Demaille <akim@epita.fr>
19909
19910 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19911 only when appropriate: when insert_start_shifting_state' is not
19912 invoked.
19913 * tests/regression.at (Rule Line Numbers): Adjust.
19914
19915 2001-12-10 Akim Demaille <akim@epita.fr>
19916
19917 * src/LR0.c (augment_automaton): Now that all states have shifts,
19918 merge the two cases addition shifts to the initial state.
19919
19920 2001-12-10 Akim Demaille <akim@epita.fr>
19921
19922 * src/lalr.c (set_state_table): Move to...
19923 * src/LR0.c: here.
19924 * src/lalr.c (lalr): Don't call it...
19925 * src/LR0.c (generate_states): do it.
19926 * src/LR0.h (first_state): Remove, only the table is used.
19927
19928 2001-12-10 Akim Demaille <akim@epita.fr>
19929
19930 * src/LR0.h (first_shift, first_reduction): Remove.
19931 * src/lalr.c: Don't use first_shift: find shifts through the
19932 states.
19933
19934 2001-12-10 Akim Demaille <akim@epita.fr>
19935
19936 * src/LR0.c: Attach shifts to states as soon as they are
19937 computed.
19938 * src/lalr.c (set_state_table): Instead of assigning shifts to
19939 state, just assert that the mapping was properly done.
19940
19941 2001-12-10 Akim Demaille <akim@epita.fr>
19942
19943 * src/LR0.c (insert_start_shift): Rename as...
19944 (insert_start_shifting_state): this.
19945 (insert_eof_shifting_state, insert_accepting_state): New.
19946 (augment_automaton): Adjust.
19947 Better locality of the variables.
19948 When looking if the start_symbol is shifted from the initial
19949 state, using `while (... symbol != start_symbol ...)' sounds
19950 better than `while (... symbol < start_symbol ...)': If fail
19951 to see how the order between symbols could be relevant!
19952
19953 2001-12-10 Akim Demaille <akim@epita.fr>
19954
19955 * src/getargs.h: Don't declare `spec_name_prefix' and
19956 `spec_file_prefix', declared by src/files.h.
19957 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19958 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19959 * src/output.c (prepare): Adjust.
19960 * src/reader.c (symbols_output): Likewise.
19961 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19962
19963 2001-12-10 Akim Demaille <akim@epita.fr>
19964
19965 * src/muscle_tab.c (muscle_init): NULL is a better default than
19966 `"0"'.
19967
19968 2001-12-10 Akim Demaille <akim@epita.fr>
19969
19970 * src/reader.c (reader): Calling symbols_output once is enough.
19971
19972 2001-12-10 Akim Demaille <akim@epita.fr>
19973
19974 Now that states have a complete set of members, the linked list of
19975 reductions is useless: just fill directly the state's reductions
19976 member.
19977
19978 * src/state.h (struct reductions): Remove member `number' and
19979 `next'.
19980 * src/LR0.c (first_reduction, last_reduction): Remove.
19981 (save_reductions): Don't link the new reductions, store them in
19982 this_state.
19983 * src/lalr.c (set_state_table): No need to attach reductions to
19984 states, it's already done.
19985 * src/output.c (output_actions): No longer free the shifts, then
19986 the reductions, then the states: free all the states and their
19987 members.
19988
19989 2001-12-10 Akim Demaille <akim@epita.fr>
19990
19991 * src/options.c (OPTN, DRTV, BOTH): New.
19992 (option_table): Use them.
19993
19994 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19995 the job of system.h.
19996 * src/options.c: Don't include stdio.h and xalloc.h for the same
19997 reasons.
19998
19999 2001-12-10 Akim Demaille <akim@epita.fr>
20000
20001 * src/output.c (output, prepare): Make sure the values of the
20002 muscles `action' and `prologue' are 0-terminated.
20003
20004 2001-12-10 Akim Demaille <akim@epita.fr>
20005
20006 Clean up GCC warnings.
20007
20008 * src/reader.c (copy_action): `buf' is not used.
20009 (parse_skel_decl): Be static.
20010 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20011 * src/options.h (create_long_option_table): Have a real prototype.
20012 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20013 (hash_delete_at): Return const void *.
20014 Adjust casts to preserve the const.
20015
20016 2001-12-10 Akim Demaille <akim@epita.fr>
20017
20018 * configure.in: Require 2.52g.
20019 M4 is not needed, but AUTOM4TE is.
20020 * m4/m4.m4: Remove.
20021 * tests/Makefile.am: Adjust.
20022
20023 2001-12-10 Akim Demaille <akim@epita.fr>
20024
20025 One structure for states is enough, even though theoretically
20026 there are LR(0) states and LALR(1) states.
20027
20028 * src/lalr.h (state_t): Remove.
20029 (state_table): Be state_t **, not state_t *.
20030 * src/state.h (core, CORE_ALLOC): Rename as...
20031 (state_t, STATE_ALLOC): this.
20032 Add the LALR(1) members: shifts, reductions, errs.
20033 * src/LR0.c (state_table): Rename as...
20034 (state_hash): this, to avoid name clashes with the global
20035 `state_table'.
20036 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20037 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20038
20039 2001-12-10 Akim Demaille <akim@epita.fr>
20040
20041 Bison dumps core on bash.y.
20042 Reported by Pascal Bart.
20043
20044 * src/warshall.c (bitmatrix_print): New.
20045 (TC): Use it.
20046 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20047 j must be the outer loop.
20048 * tests/regression.at (Broken Closure): New.
20049
20050 2001-12-05 Akim Demaille <akim@epita.fr>
20051
20052 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20053 its argument.
20054 Reported by Peter Hamorsky.
20055
20056 2001-12-05 Akim Demaille <akim@epita.fr>
20057
20058 * src/conflicts.c (err_table): Remove.
20059 (resolve_sr_conflict): Adjust.
20060 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20061 Rename as...
20062 (state_t.reductions, state_t.shifts): this.
20063
20064 2001-12-05 Akim Demaille <akim@epita.fr>
20065
20066 * src/reduce.c (reduce_grammar_tables): No longer disable the
20067 removal of useless rules via CPP but via `if (0)', so that the
20068 compiler still check the code is valid.
20069 For instance, it should have noticed `rline' no longer exists: use
20070 the `line' member of rule_t.
20071 * src/gram.c (dummy, rline): Remove, unused.
20072
20073 2001-12-05 Akim Demaille <akim@epita.fr>
20074
20075 * src/output.c (pack_vector): Use assert, not berror.
20076 * src/main.c (berror): Remove, unused.
20077
20078 2001-12-05 Akim Demaille <akim@epita.fr>
20079
20080 New experimental feature: if --verbose --trace output all the
20081 items of a state, not only its kernel.
20082
20083 * src/print.c (print_core): If `trace_flag', then invoke closure
20084 before outputting the items of the state (print_core is no longer
20085 a correct name them).
20086 (print_results): Invoke new_closure/free_closure if needed.
20087
20088 2001-12-05 Akim Demaille <akim@epita.fr>
20089
20090 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20091 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20092 (nitemset): for consistency with the rest of the project.
20093
20094 2001-12-05 Akim Demaille <akim@epita.fr>
20095
20096 * src/closure.c (print_closure): Improve.
20097 (closure): Use it for printing input and output.
20098
20099 2001-12-05 Akim Demaille <akim@epita.fr>
20100
20101 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20102 indexed by nonterminals.
20103
20104 2001-12-05 Akim Demaille <akim@epita.fr>
20105
20106 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20107 what it was!).
20108 * src/warshall.h: Remove accidental duplication of the content.
20109
20110 2001-12-05 Akim Demaille <akim@epita.fr>
20111
20112 * src/closure.c (set_fderives): De-obfuscate.
20113
20114 2001-12-05 Akim Demaille <akim@epita.fr>
20115
20116 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20117
20118 2001-12-05 Akim Demaille <akim@epita.fr>
20119
20120 * src/closure.c (set_firsts): De-obfuscate.
20121
20122 2001-12-05 Akim Demaille <akim@epita.fr>
20123
20124 * src/output.c (action_row): De-obfuscate
20125 using the good o' techniques: arrays not pointers, variable
20126 locality, BITISSET, RESETBIT etc.
20127
20128 2001-12-05 Akim Demaille <akim@epita.fr>
20129
20130 Pessimize the code to simplify it: from now on, all the states
20131 have a valid SHIFTS, which NSHIFTS is possibly 0.
20132
20133 * src/LR0.c (shifts_new): Be global and move to..
20134 * src/state.c, src/state.h: here.
20135 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20136 * src/print_graph: Adjust.
20137
20138 2001-12-05 Akim Demaille <akim@epita.fr>
20139
20140 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20141 * src/conflicts.c: Use it.
20142 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20143 incorrectly ``simplified''.
20144
20145 2001-12-05 Akim Demaille <akim@epita.fr>
20146
20147 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20148 using the good o' techniques: arrays not pointers, variable
20149 locality, BITISSET, RESETBIT etc.
20150
20151 2001-12-05 Akim Demaille <akim@epita.fr>
20152
20153 * src/state.h (SHIFT_SYMBOL): New.
20154 * src/conflicts.c: Use it to deobfuscate.
20155
20156 2001-12-05 Akim Demaille <akim@epita.fr>
20157
20158 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20159 (print_reductions): De-obfuscate using the good o' techniques:
20160 arrays not pointers, variable locality, BITISSET.
20161
20162 2001-12-05 Akim Demaille <akim@epita.fr>
20163
20164 * src/conflicts.c (print_reductions): Arrays, not pointers.
20165 Use BITISSET.
20166
20167 2001-12-05 Akim Demaille <akim@epita.fr>
20168
20169 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20170
20171 2001-12-05 Akim Demaille <akim@epita.fr>
20172
20173 * src/conflicts.c (print_reductions): Improve variable locality.
20174
20175 2001-12-05 Akim Demaille <akim@epita.fr>
20176
20177 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20178
20179 2001-12-05 Akim Demaille <akim@epita.fr>
20180
20181 * src/conflicts.c (print_reductions): Improve variable locality.
20182
20183 2001-12-05 Akim Demaille <akim@epita.fr>
20184
20185 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20186 * src/lalr.c: Use them.
20187
20188 2001-12-05 Akim Demaille <akim@epita.fr>
20189
20190 * src/LR0.c (augment_automaton): Formatting changes.
20191 Better variable locality.
20192
20193 2001-12-05 Akim Demaille <akim@epita.fr>
20194
20195 * src/lalr.c (matrix_print): New.
20196 (transpose): Use it.
20197 Use arrays instead of pointers.
20198
20199 2001-12-05 Akim Demaille <akim@epita.fr>
20200
20201 * src/lalr.c (maxrhs): Move to...
20202 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20203 * src/lalr.c (build_relations): Adjust.
20204
20205 2001-12-05 Akim Demaille <akim@epita.fr>
20206
20207 * src/lalr.c (transpose): Free the memory allocated to the
20208 argument, as it is replaced by the results by the unique caller.
20209 (build_relations): Merely invoke transpose: it handles the memory
20210 deallocation.
20211 Improve variable locality.
20212 Avoid variables used as mere abbreviations.
20213 (compute_lookaheads): Use arrays instead of pointers.
20214
20215 2001-12-05 Akim Demaille <akim@epita.fr>
20216
20217 * src/lalr.c (initialize_F): Improve variable locality.
20218 Avoid variables used as mere abbreviations.
20219
20220 2001-12-05 Akim Demaille <akim@epita.fr>
20221
20222 * src/derives.c (print_derives): Display the ruleno.
20223 * src/lalr.c (initialize_F, transpose): Better variable locality
20224 to improve readability.
20225 Avoid variables used as mere abbreviations.
20226
20227 2001-12-05 Akim Demaille <akim@epita.fr>
20228
20229 * src/lalr.c (traverse): Use arrays instead of pointers.
20230
20231 2001-12-05 Akim Demaille <akim@epita.fr>
20232
20233 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20234 the handling of squeue.
20235 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20236
20237 2001-12-05 Akim Demaille <akim@epita.fr>
20238
20239 Because useless nonterminals are now kept alive (instead of being
20240 `destroyed'), we now sometimes examine them, and store information
20241 related to them. Hence we need to know their number, and adjust
20242 memory allocations.
20243
20244 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20245 static.
20246 * src/LR0.c (allocate_itemsets): The memory allocated to
20247 `symbol_count' was used for two different purpose: once to count
20248 the number of occurrences of each symbol, and later reassigned to
20249 `shift_symbol', containing the symbol that can be shifted from a
20250 given state.
20251 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20252 only, and...
20253 (new_itemsets): Allocate `shift_symbol' here.
20254 (allocate_itemsets): symbol_count includes useless nonterminals.
20255 Make room for them.
20256 (free_storage): Use `free', not `XFREE', for pointers that cannot
20257 be null.
20258
20259 2001-12-05 Akim Demaille <akim@epita.fr>
20260
20261 * src/nullable.c (set_nullable): Deobfuscate the handling of
20262 ritem.
20263 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20264
20265 2001-12-05 Akim Demaille <akim@epita.fr>
20266
20267 * src/gram.c, src/gram.h (ritem_print): New.
20268 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20269 (This useless function was defined only to work around VMS linkers
20270 that can't handle compilation units with variables only).
20271 * src/reduce.c (dump_grammar): Use it to trace the construction of
20272 ritem.
20273
20274 2001-12-04 Paul Eggert <eggert@twinsun.com>
20275
20276 * src/bison.simple (union yyalloc): Change member names
20277 to be the same as the stack names.
20278 (yyparse): yyptr is now union yyalloc *, not char *.
20279 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20280 and may generate better code on some machines.
20281 (yystpcpy): Use prototype if __STDC__ is defined, not just
20282 if __cplusplus is defined.
20283
20284 2001-11-30 Akim Demaille <akim@epita.fr>
20285
20286 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20287 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20288 Gettext doesn't compile cleanly, and dies with -Werror.
20289 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20290 Include WARNING_CFLAGS here.
20291 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20292 before being defined.
20293
20294 2001-11-27 Paul Eggert <eggert@twinsun.com>
20295
20296 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20297 First arg is int, not unsigned.
20298 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20299 (SIZE_MAX, UINT_MAX): New macros.
20300 (quotearg_n_options): Abort if N is negative.
20301 Avoid overflow check on hosts where size_t is 64 bits and int
20302 is 32 bits, as overflow is impossible there.
20303 Fix off-by-one typo that caused unnecessary reallocation.
20304
20305 2001-11-29 Paul Eggert <eggert@twinsun.com>
20306
20307 Name space cleanup in generated parser.
20308
20309 * doc/bison.texinfo (Bison Parser): Discuss system headers
20310 and their effect on the user name space.
20311
20312 * src/bison.simple:
20313 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20314 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20315 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20316
20317 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20318 on user names when possible.
20319
20320 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20321 Simplify test for whather <alloca.h> exists.
20322
20323 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20324
20325 (<stdio.h>): Include if YYDEBUG.
20326
20327 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20328 ! defined (yyoverflow) && ! defined (yymemcpy).
20329
20330 (yymemcpy, yyparse): Rename local variables as needed so that
20331 they all begin with 'yy'.
20332
20333 (yystrlen, yystpcpy): New functions.
20334
20335 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20336 All uses changed.
20337
20338 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20339 instead of relying on string.h functions. Use YYSTACK_ALLOC
20340 and YYSTACK_FREE instead of malloc and free.
20341
20342 2001-11-30 Akim Demaille <akim@epita.fr>
20343
20344 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20345 before their first uses.
20346 (YYBISON, YYPURE): Move to the top of the output.
20347
20348 2001-11-30 Akim Demaille <akim@epita.fr>
20349
20350 * tests/reduce.at (Useless Nonterminals): Fix.
20351
20352 2001-11-30 Akim Demaille <akim@epita.fr>
20353
20354 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20355 if body instead of `;' to pacify GCC's warnings.
20356
20357 2001-11-30 Akim Demaille <akim@epita.fr>
20358
20359 Instead of mapping the LHS of unused rules to -1, keep the LHS
20360 valid, but flag the rules as invalid.
20361
20362 * src/gram.h (rule_t): `useful' is a new member.
20363 * src/print.c (print_grammar): Adjust.
20364 * src/derives.c (set_derives): Likewise.
20365 * src/reader.c (packgram, reduce_output): Likewise.
20366 * src/reduce.c (reduce_grammar_tables): Likewise.
20367 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20368
20369 2001-11-30 Akim Demaille <akim@epita.fr>
20370
20371 * src/reduce.c (reduce_output): Formatting changes.
20372 * src/print.c (print_results, print_grammar): Likewise.
20373 * tests/regression.at (Rule Line Numbers)
20374 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20375
20376 2001-11-30 Akim Demaille <akim@epita.fr>
20377
20378 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20379 useless nonterminals, move them at the end of the symbol arrays.
20380 (reduce_output): Adjust.
20381 * tests/reduce.at (Useless Nonterminals): Adjust.
20382
20383 2001-11-30 Akim Demaille <akim@epita.fr>
20384
20385 * src/reduce.c: Various comment/formatting changes.
20386 (nonterminals_reduce): New, extracted from...
20387 (reduce_grammar_tables): here.
20388 (reduce_grammar): Call nonterminals_reduce.
20389
20390 2001-11-29 Paul Eggert <eggert@twinsun.com>
20391
20392 * src/bison.simple (YYSTACK_REALLOC): Remove.
20393 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20394 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20395 New macros.
20396 (union yyalloc): New type.
20397 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20398 an arbitrary restriction on hosts where size_t is wider than int.
20399
20400 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20401 a parser stack overflow. Allocate just one block of memory for all
20402 three stacks, instead of allocating three blocks; this typically is
20403 faster and reduces fragmentation.
20404
20405 Do not limit the number of items in the stack to a value that fits
20406 in 'int', as this is an arbitrary limit on hosts with 64-bit
20407 size_t and 32-bit int.
20408
20409 2001-11-29 Marc Autret <autret_m@epita.fr>
20410
20411 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20412 of defining YYERROR_VERBOSE.
20413 [AT_DATA]: $4 is now out of C declarations in the prologue.
20414
20415 2001-11-28 Marc Autret <autret_m@epita.fr>
20416
20417 * src/reader.c (parse_dquoted_param): New.
20418 (parse_skel_decl): Use it.
20419 * src/lex.h: Add its prototype.
20420 * src/lex.c (literalchar): Become not static.
20421
20422 2001-11-28 Marc Autret <autret_m@epita.fr>
20423
20424 * src/output.h: And put its extern declaration here.
20425 * src/output.c (error_verbose): Define here.
20426 (prepare): Echo name modification.
20427 * src/getargs.h: Clean its extern declaration.
20428 * src/getargs.c (error_verbose_flag): Remove.
20429 (getargs): Remove case 'e'.
20430 * src/options.c (option_table): 'error-verbose' is now seen as simple
20431 percent option.
20432 Include output.h.
20433
20434 * src/reader.c (read_declarations): Remove case tok_include.
20435 (parse_include_decl): Remove.
20436 * src/lex.h (token_t): Remove tok_include.
20437 * src/options.c (option_table): 'include' is now a simple command line
20438 option.
20439
20440 2001-11-28 Marc Autret <autret_m@epita.fr>
20441
20442 * src/bison.simple: Adjust muscle names.
20443 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20444 * src/output.c (prepare): s/_/-/ for the muscles names.
20445 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20446
20447 2001-11-28 Marc Autret <autret_m@epita.fr>
20448
20449 * src/bison.simple: Fix debug.
20450 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20451
20452 2001-11-28 Akim Demaille <akim@epita.fr>
20453
20454 * src/LR0.c (shifts_new): New.
20455 (save_shifts, insert_start_shift, augment_automaton): Use it.
20456
20457 2001-11-28 Akim Demaille <akim@epita.fr>
20458
20459 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20460 keep ruleno only.
20461
20462 2001-11-28 Akim Demaille <akim@epita.fr>
20463
20464 * src/closure.c (closure): Instead of looping over word in array
20465 then bits in words, loop over bits in array.
20466
20467 2001-11-28 Akim Demaille <akim@epita.fr>
20468
20469 * src/closure.c (closure): No longer optimize the special case
20470 where all the bits of `ruleset[r]' are set to 0, to make the code
20471 clearer.
20472
20473 2001-11-28 Akim Demaille <akim@epita.fr>
20474
20475 * src/closure.c (closure): `r' and `c' are new variables, used to
20476 de-obfuscate accesses to RULESET and CORE.
20477
20478 2001-11-28 Akim Demaille <akim@epita.fr>
20479
20480 * src/reduce.c (reduce_print): Use ngettext.
20481 (dump_grammar): Improve the trace accuracy.
20482
20483 2001-11-28 Akim Demaille <akim@epita.fr>
20484
20485 * src/reduce.c (dump_grammar): Don't translate trace messages.
20486
20487 2001-11-28 Akim Demaille <akim@epita.fr>
20488
20489 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20490 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20491 as all tags are free'ed afterwards.
20492 From Enrico Scholz.
20493
20494 2001-11-27 Paul Eggert <eggert@twinsun.com>
20495
20496 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20497 use alloca when we didn't want to, and vice versa.
20498
20499 2001-11-27 Marc Autret <autret_m@epita.fr>
20500
20501 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20502 initialization.
20503 * src/output.c (prepare): Remove its update.
20504
20505 2001-11-27 Marc Autret <autret_m@epita.fr>
20506
20507 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20508 Use %error-verbose.
20509
20510 2001-11-27 Marc Autret <autret_m@epita.fr>
20511
20512 * src/bison.simple: Remove YYERROR_VERBOSE using.
20513 Use %%error_verbose.
20514 (yyparse): Likewise.
20515 * src/output.c (prepare): Give its final value.
20516 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20517 * src/getargs.h: Add its extern declaration.
20518 * src/getargs.c (error_verbose_flag): New int.
20519 (getargs): Update to catch new case.
20520 * src/options.c (option_table): 'error-verbose' is a new option.
20521 (shortopts): Update.
20522
20523 2001-11-27 Akim Demaille <akim@epita.fr>
20524
20525 * src/system.h: Use intl/libgettext.h.
20526 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20527
20528 2001-11-27 Akim Demaille <akim@epita.fr>
20529
20530 * tests/torture.at (Exploding the Stack Size with Malloc):
20531 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20532
20533 2001-11-27 Akim Demaille <akim@epita.fr>
20534
20535 * src/files.c: Include error.h.
20536 Reported by Hans Aberg.
20537
20538 2001-11-26 Marc Autret <autret_m@epita.fr>
20539
20540 * src/reader.c (parse_include_decl): New, not yet implemented.
20541 (read_declarations): Add case tok_include.
20542 * src/getargs.h (include): Add its extern definition.
20543 * src/getargs.c (include): New const char *.
20544 (getargs): Add case '-I'.
20545 * src/options.c (option_table): Add include as command line and
20546 percent option.
20547 * src/lex.h (token_t): Add tok_include.
20548
20549 2001-11-26 Akim Demaille <akim@epita.fr>
20550
20551 * src/reader.c (readgram): Make sure rules for mid-rule actions
20552 have a lineno equal to that of their host rule.
20553 Reported by Hans Aberg.
20554 * tests/regression.at (Rule Line Numbers): New.
20555
20556 2001-11-26 Akim Demaille <akim@epita.fr>
20557
20558 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20559 size_ts.
20560
20561 2001-11-26 Akim Demaille <akim@epita.fr>
20562
20563 * src/complain.c, src/complain.h (error): Remove, provided by
20564 lib/error.[ch].
20565
20566 2001-11-26 Akim Demaille <akim@epita.fr>
20567
20568 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20569 issue an error message.
20570 * tests/regression.at (Invalid %directive): New.
20571 Reported by Hans Aberg.
20572
20573 2001-11-26 Akim Demaille <akim@epita.fr>
20574
20575 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20576 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20577
20578 2001-11-26 Akim Demaille <akim@epita.fr>
20579
20580 * src/conflicts.c (conflicts_print): Don't complain at all when
20581 there are no reduce/reduce conflicts, and as many shift/reduce
20582 conflicts as expected.
20583 * tests/regression.at (%expect right): Adjust.
20584
20585 2001-11-23 Akim Demaille <akim@epita.fr>
20586
20587 * lib/alloca.c: Update, from fileutils.
20588
20589 2001-11-23 Akim Demaille <akim@epita.fr>
20590
20591 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20592
20593 2001-11-23 Akim Demaille <akim@epita.fr>
20594
20595 * src/system.h: Include alloca.h.
20596 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20597
20598 2001-11-23 Akim Demaille <akim@epita.fr>
20599
20600 * src/print_graph.c (print_actions): Remove `rule', unused.
20601 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20602 pacify GCC's signed < unsigned warnings.
20603 * src/closure.c (itemsetsize): Likewise.
20604 * src/reader.c (symbol_list_new): Static.
20605
20606 2001-11-23 Akim Demaille <akim@epita.fr>
20607
20608 Attaching lineno to buckets is stupid, since only one copy of each
20609 symbol is kept, only the line of the first occurrence is kept too.
20610
20611 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20612 * src/reader.c (rline_allocated): Remove, unused.
20613 (symbol_list): Have a `line' member.
20614 (symbol_list_new): New.
20615 (readgram): Use it.
20616 * src/print.c (print_grammar): Output the rule line numbers.
20617 * tests/regression.at (Solved SR Conflicts)
20618 (Unresolved SR Conflicts): Adjust.
20619 Reported by Hans Aberg.
20620
20621 2001-11-22 Marc Autret <autret_m@epita.fr>
20622
20623 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20624
20625 2001-11-22 Marc Autret <autret_m@epita.fr>
20626
20627 * src/muscle_tab.c (muscle_init): Remove initialization of
20628 skeleton muscle.
20629 * src/output.c (output_master_parser): Do it here.
20630
20631 2001-11-20 Akim Demaille <akim@epita.fr>
20632
20633 * po/sv.po: New.
20634 * configure.in (ALL_LINGUAS): Adjust.
20635 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20636 longer contains strings to translate.
20637
20638 2001-11-19 Akim Demaille <akim@epita.fr>
20639
20640 * src/conflicts.c (conflicts_print): Add a missing \n.
20641
20642 2001-11-19 Akim Demaille <akim@epita.fr>
20643
20644 * src/nullable.c (nullable_print): New.
20645 (set_nullable): Call it when tracing.
20646 Better locality of variables.
20647
20648 2001-11-19 Akim Demaille <akim@epita.fr>
20649
20650 * src/print.c (print_actions): Better locality of variables.
20651
20652 2001-11-19 Akim Demaille <akim@epita.fr>
20653
20654 * src/derives.c (print_derives): Fix and enrich.
20655 * src/closure.c (print_fderives): Likewise.
20656
20657 2001-11-19 Akim Demaille <akim@epita.fr>
20658
20659 * src/closure.c (itemsetend): Remove, replaced with...
20660 (itemsetsize): new.
20661
20662 2001-11-19 Akim Demaille <akim@epita.fr>
20663
20664 * src/LR0.c (kernel_end): Remove, replaced with...
20665 (kernel_size): new.
20666
20667 2001-11-19 Akim Demaille <akim@epita.fr>
20668
20669 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20670 to clarify.
20671
20672 2001-11-19 Akim Demaille <akim@epita.fr>
20673
20674 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20675
20676 2001-11-19 Akim Demaille <akim@epita.fr>
20677
20678 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20679 trace messages.
20680 * src/LR0.c: Likewise.
20681 (allocate_itemsets): Use arrays instead of pointers to clarify.
20682
20683 2001-11-19 Akim Demaille <akim@epita.fr>
20684
20685 * src/getargs.c (statistics_flag): Replace with...
20686 (trace_flag): New.
20687 (longopts): Accept --trace instead of --statistics.
20688 * src/getargs.h, src/options.c: Adjust.
20689 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20690 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20691
20692 2001-11-19 Akim Demaille <akim@epita.fr>
20693
20694 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20695 pointers to clarify the code.
20696 (save_reductions, save_shifts): Factor common parts of alternatives.
20697
20698 2001-11-19 Akim Demaille <akim@epita.fr>
20699
20700 * src/LR0.c (new_state, get_state): Complete TRACE code.
20701 * src/closure.c: Include `reader.h' to get `tags', needed by the
20702 trace code.
20703 Rename the conditional DEBUG as TRACE.
20704 Output consistently TRACEs to stderr, not stdout.
20705 * src/derives.c: Likewise.
20706 * src/reduce.c: (inaccessable_symbols): Using if is better style
20707 than goto.
20708 Use `#if TRACE' instead of `#if 0' for tracing code.
20709
20710 2001-11-19 Akim Demaille <akim@epita.fr>
20711
20712 * src/system.h (LIST_FREE, shortcpy): New.
20713 * src/LR0.c: Use them.
20714 * src/output.c (free_itemsets, free_reductions, free_shifts):
20715 Remove, replaced by LIST_FREE.
20716
20717 2001-11-19 Akim Demaille <akim@epita.fr>
20718
20719 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20720 (REDUCTIONS_ALLOC): New.
20721 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20722 allocation.
20723
20724 2001-11-19 Akim Demaille <akim@epita.fr>
20725
20726 * src/LR0.c (new_state): Complete trace code.
20727 * src/nullable.c (set_nullable): Don't translate traces.
20728
20729 2001-11-19 Akim Demaille <akim@epita.fr>
20730
20731 * src/print_graph.c (print_core): Better locality of variables.
20732 * src/print.c (print_core): Likewise.
20733
20734 2001-11-19 Akim Demaille <akim@epita.fr>
20735
20736 * src/vcg.c: You do the output, so you are responsible of the
20737 handling of VCG syntax, in particular: use quotearg.
20738 * src/print_graph.c: Don't.
20739 (print_actions): Don't output the actions as part of the nodes,
20740 since that's the job of the edges.
20741 (print_state): Don't output by hand: fill the node description,
20742 and ask for its output.
20743
20744 2001-11-19 Akim Demaille <akim@epita.fr>
20745
20746 * src/bison.simple (yyparse): When verbosely reporting an error,
20747 no longer put additional quotes around token names.
20748 * tests/calc.at: Adjust.
20749
20750 2001-11-19 Akim Demaille <akim@epita.fr>
20751
20752 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20753 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20754 * src/output.c: Adjust.
20755
20756 2001-11-19 Akim Demaille <akim@epita.fr>
20757
20758 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20759 (rule_t): this.
20760 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20761
20762 2001-11-19 Akim Demaille <akim@epita.fr>
20763
20764 * src/gram.h (rule_t): New.
20765 (rule_table): New.
20766 (rrhs, rlhs): Remove, part of state_t.
20767 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20768 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20769 * src/reader.c, src/reduce.c: Adjust.
20770
20771 2001-11-19 Akim Demaille <akim@epita.fr>
20772
20773 * src/reader.c (symbols_output): New, extracted from...
20774 (packsymbols): Here.
20775 (reader): Call it.
20776
20777 2001-11-19 Akim Demaille <akim@epita.fr>
20778
20779 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20780 (maxrhs): this new function.
20781
20782 2001-11-19 Akim Demaille <akim@epita.fr>
20783
20784 * src/lalr.c (F): New macro to access the variable F.
20785 Adjust.
20786
20787 2001-11-19 Akim Demaille <akim@epita.fr>
20788
20789 * src/lalr.h (LA): New macro to access the variable LA.
20790 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20791 * src/lalr.c: Adjust.
20792
20793 2001-11-19 Akim Demaille <akim@epita.fr>
20794
20795 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20796 (set_state_table): handle the `lookaheads' members.
20797
20798 2001-11-19 Akim Demaille <akim@epita.fr>
20799
20800 * src/lalr.h (lookaheads): Removed array, whose contents is now
20801 a member of...
20802 (state_t): this structure.
20803 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20804 Adjust.
20805
20806 2001-11-19 Akim Demaille <akim@epita.fr>
20807
20808 * src/lalr.h (consistent): Removed array, whose contents is now
20809 a member of...
20810 (state_t): this structure.
20811 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20812 Adjust.
20813
20814 2001-11-19 Akim Demaille <akim@epita.fr>
20815
20816 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20817 contents are now members of...
20818 (state_t): this structure.
20819 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20820 Adjust.
20821
20822 2001-11-19 Akim Demaille <akim@epita.fr>
20823
20824 * src/lalr.h (state_t): New.
20825 (state_table): Be a state_t * instead of a core **.
20826 (accessing_symbol): Remove, part of state_t.
20827 * src/lalr.c: Adjust.
20828 (set_accessing_symbol): Merge into...
20829 (set_state_table): this.
20830 * src/print_graph.c, src/conflicts.c: Adjust.
20831
20832 2001-11-14 Akim Demaille <akim@epita.fr>
20833
20834 * tests/calc.at, tests/output.at, tests/regression.at,
20835 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20836 now the tests are run in private dirs, therefore AC_CLEANUP and
20837 family can be simplified to 0-ary.
20838 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20839 use abs. path to find config.h.
20840 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20841 stderr, there can be way too much random noise.
20842 Instead pass -Werror to GCC and rely on the exit status.
20843 Reported by Wolfram Wagner.
20844
20845 2001-11-14 Akim Demaille <akim@epita.fr>
20846
20847 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20848 defined only if yyoverflow is defined, to avoid `warning: unused
20849 variable `yyvs1''.
20850 Reported by The Test Suite.
20851
20852 2001-11-14 Akim Demaille <akim@epita.fr>
20853
20854 * src/print.c: Include reduce.h.
20855 Reported by Hans Aberg.
20856
20857 2001-11-14 Akim Demaille <akim@epita.fr>
20858
20859 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20860 Revert a previous patch: these are really const.
20861 * src/conflicts.c (conflict_report): Additional useless pair of
20862 braces to pacify GCC's warnings for `if () if () {} else {}'.
20863 * src/lex.c (parse_percent_token): Replace equal_offset with
20864 arg_offset.
20865 arg is const.
20866 Be sure to strdup `arg' when used, since there is no reason for
20867 token_buffer not to change.
20868
20869 2001-11-14 Akim Demaille <akim@epita.fr>
20870
20871 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20872 definition.
20873 * src/main.c (main): Use them.
20874 Suggested by Hans Aberg.
20875
20876 2001-11-12 Akim Demaille <akim@epita.fr>
20877
20878 * src/system.h (ngettext): Now that we use ngettext, be sure to
20879 provide a default definition when NLS are not used.
20880
20881 2001-11-12 Akim Demaille <akim@epita.fr>
20882
20883 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20884 Use @kbd to denote user input.
20885 (Language and Grammar): ANSIfy the example.
20886 Adjust its layout for info/notinfo.
20887 (Location Tracking Calc): Output error messages to stderr.
20888 Output locations in a more GNUtically correct way.
20889 Fix a couple of Englishos.
20890 Adjust @group/@end group pairs.
20891
20892 2001-11-12 Akim Demaille <akim@epita.fr>
20893
20894 %expect was not functioning at all.
20895
20896 * src/conflicts.c (expected_conflicts): Set to -1.
20897 (conflict_report): Use ngettext.
20898 (conflicts_print): Check %expect and make its violation an error.
20899 * doc/bison.texinfo (Expect Decl): Adjust.
20900 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20901 * tests/regression.at (%expect not enough, %expect right)
20902 (%expect too much): New.
20903
20904 2001-11-12 Akim Demaille <akim@epita.fr>
20905
20906 * tests/regression.at (Conflicts): Rename as...
20907 (Unresolved SR Conflicts): this.
20908 (Solved SR Conflicts): New.
20909
20910 2001-11-12 Akim Demaille <akim@epita.fr>
20911
20912 * src/reduce.c (print_results): Rename as...
20913 (reduce_output): This.
20914 Output to OUT, passed as argument, instead of output_obstack.
20915 (dump_grammar): Likewise.
20916 (reduce_free): New.
20917 Also free V1.
20918 (reduce_grammar): No longer call reduce_output, since...
20919 * src/print.c (print_results): do it.
20920 * src/main.c (main): Call reduce_free;
20921
20922 2001-11-12 Akim Demaille <akim@epita.fr>
20923
20924 * src/conflicts.c (print_reductions): Accept OUT as argument.
20925 Output to it, not to output_obstack.
20926 * src/print.c (print_actions): Adjust.
20927
20928 2001-11-12 Akim Demaille <akim@epita.fr>
20929
20930 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20931 the result instead of using...
20932 (src_total, rrc_total, src_count, rrc_count): Remove.
20933 (any_conflicts): Remove.
20934 (print_conflicts): Split into...
20935 (conflicts_print, conflicts_output): New.
20936 * src/conflicts.h: Adjust.
20937 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20938 * src/print.c (print_grammar): Issue `\n' between two rules.
20939 * tests/regression.at (Conflicts): New.
20940 Reported by Tom Lane.
20941
20942 2001-11-12 Akim Demaille <akim@epita.fr>
20943
20944 * tests/regression.at (Invalid input): Remove, duplicate with
20945 ``Invalid input: 1''.
20946
20947 2001-11-12 Akim Demaille <akim@epita.fr>
20948
20949 * tests/torture.at (AT_DATA_STACK_TORTURE)
20950 (Exploding the Stack Size with Alloca)
20951 (Exploding the Stack Size with Malloc): New.
20952
20953 2001-11-12 Akim Demaille <akim@epita.fr>
20954
20955 * src/bison.simple (YYSTACK_REALLOC): New.
20956 (yyparse) [!yyoverflow]: Use it and free the old stack.
20957 Reported by Per Allansson.
20958
20959 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20960
20961 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20962 define CPP macro, which substitute YYSTYPE by yystype.
20963 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20964 with yyltype/YYLTYPE. This allows inclusion of the generated
20965 header within the parser if the compiler, such as GGC, accepts
20966 multiple equivalent #defines.
20967 From Akim.
20968
20969 2001-11-05 Akim Demaille <akim@epita.fr>
20970
20971 * src/reader.c (symbols_output): New, extracted from...
20972 (packsymbols): here.
20973 (reader): Adjust.
20974
20975 2001-11-05 Akim Demaille <akim@epita.fr>
20976
20977 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20978
20979 2001-11-05 Akim Demaille <akim@epita.fr>
20980
20981 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20982 pattern.
20983
20984 2001-11-05 Akim Demaille <akim@epita.fr>
20985
20986 * src/options.h (struct option_table_struct): set_flags is void*.
20987 * src/options.c (longopts): Support `--output' and `%output'.
20988 (usage): Adjust.
20989 * src/lex.h (tok_setopt): Remove, replaced with...
20990 (tok_intopt, tok_stropt): these new guys.
20991 * src/lex.c (getopt.h): Not needed.
20992 (token_buffer, unlexed_token_buffer): Not const.
20993 (percent_table): Promote `-' over `_' in directive names.
20994 Active `%name-prefix', `file-prefix', and `output'.
20995 (parse_percent_token): Accept possible arguments to directives.
20996 Promote `-' over `_' in directive names.
20997
20998 2001-11-04 Akim Demaille <akim@epita.fr>
20999
21000 * doc/bison.texinfo (Decl Summary): Split the list into
21001 `directives for grammars' and `directives for bison'.
21002 Sort'em.
21003 Add description of `%name-prefix', `file-prefix', and `output'.
21004 Promote `-' over `_' in directive names.
21005 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21006 Simplify the description of `--name-prefix'.
21007 Promote `-' over `_' in directive names.
21008 Promote `--output' over `--output-file'.
21009 Fix the description of `--defines'.
21010 * tests/output.at: Exercise %file-prefix and %output.
21011
21012 2001-11-02 Akim Demaille <akim@epita.fr>
21013
21014 * doc/refcard.tex: Update.
21015
21016 2001-11-02 Akim Demaille <akim@epita.fr>
21017
21018 * src/symtab.h (SUNDEF): New.
21019 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21020 stand for `uninitialized', instead of 0.
21021 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21022 * src/lex.c (lex): Adjust.
21023
21024 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21025 Number it 0.
21026 Let yylex return it instead of a plain 0.
21027 Reported by Dick Streefland.
21028
21029 2001-11-02 Akim Demaille <akim@epita.fr>
21030
21031 * tests/regression.at (Mixing %token styles): New test.
21032
21033 2001-11-02 Akim Demaille <akim@epita.fr>
21034
21035 * src/reader.c (parse_thong_decl): Formatting changes.
21036 (token_translations_init): New, extracted from...
21037 (packsymbols): Here.
21038 Adjust.
21039
21040 2001-11-01 Akim Demaille <akim@epita.fr>
21041
21042 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21043 Check that `9foo.y' produces correct cpp guards.
21044 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21045 guards.
21046 Reported by Wwp.
21047
21048 2001-11-01 Akim Demaille <akim@epita.fr>
21049
21050 * tests/regression.at (Invalid input: 2): New.
21051 * src/lex.c (unlexed_token_buffer): New.
21052 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21053 too.
21054 Reported by Wwp.
21055
21056 2001-11-01 Akim Demaille <akim@epita.fr>
21057
21058 * tests/calc.at: Catch up with 1.30.
21059 * configure.in: Bump to 1.49a.
21060 Adjust to newer Autotest.
21061
21062 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21063
21064 * src/conflicts.c: Move global variables rrc_total and src_total ...
21065 (print_conflicts): here.
21066 * src/output.c (output): Free global variable user_toknums.
21067 * src/lex.c (token_obstack): Become static.
21068
21069 2001-10-18 Akim Demaille <akim@epita.fr>
21070
21071 * tests/atlocal.in (GCC): Add.
21072 * tests/calc.at: s/m4_match/m4_bmatch/.
21073 s/m4_patsubst/m4_bpatsubst/.
21074 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21075 * configure.in: AC_SUBST(GCC).
21076
21077 2001-10-14 Marc Autret <autret_m@epita.fr>
21078
21079 * src/options.c (create_long_option_table): Fix.
21080
21081 2001-10-10 Akim Demaille <akim@epita.fr>
21082
21083 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21084
21085 2001-10-04 Akim Demaille <akim@epita.fr>
21086
21087 * src/reader.c (parse_union_decl): Push the caracters in
21088 union_obstack, not attrs_obstack.
21089
21090 2001-10-04 Akim Demaille <akim@epita.fr>
21091
21092 Merge in the branch 1.29.
21093
21094 * src/reader.c (packsymbols): Use a temporary obstack for
21095 `%%tokendef', since output_stack is already used elsewhere.
21096
21097 2001-10-02 Akim Demaille <akim@epita.fr>
21098
21099 Bump 1.29d.
21100
21101 2001-10-02 Akim Demaille <akim@epita.fr>
21102
21103 Version 1.29c.
21104
21105 2001-10-02 Akim Demaille <akim@epita.fr>
21106
21107 * tests/regression.at (Invalid CPP headers): New.
21108 From Alexander Belopolsky.
21109 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21110
21111 2001-10-02 Akim Demaille <akim@epita.fr>
21112
21113 * tests/regression.at (Invalid input): New.
21114 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21115 Reported by Shura.
21116
21117 2001-10-02 Akim Demaille <akim@epita.fr>
21118
21119 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21120
21121 2001-10-02 Akim Demaille <akim@epita.fr>
21122
21123 * src/output.c (output_parser): Assert `skeleton'.
21124 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21125 systems.
21126 From Shura.
21127
21128 2001-10-01 Marc Autret <autret_m@epita.fr>
21129
21130 * src/lex.h: Echo modifications.
21131 * src/lex.c (unlex): Parameter is now token_t.
21132 From Hans Aberg.
21133
21134 2001-10-01 Marc Autret <autret_m@epita.fr>
21135
21136 * src/main.c: Include lex.h.
21137 From Hans Aberg.
21138
21139 2001-09-29 Akim Demaille <akim@epita.fr>
21140
21141 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21142
21143 2001-09-28 Akim Demaille <akim@epita.fr>
21144
21145 * tests/testsuite.at: Update to newer Autotest.
21146 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21147
21148 2001-09-27 Akim Demaille <akim@epita.fr>
21149
21150 Position independent wrapper.
21151
21152 * tests/bison: Remove.
21153 * tests/bison.in: New.
21154 * configure.in: Adjust.
21155
21156 2001-09-27 Paul Eggert <eggert@twinsun.com>
21157
21158 Port quotearg fixes from tar 1.13.24.
21159
21160 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21161 tm to be declared.
21162 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21163 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21164
21165 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21166 * m4/mbrtowc.m4: New file.
21167 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21168 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21169
21170 2001-09-27 Akim Demaille <akim@epita.fr>
21171
21172 Bump to 1.29c.
21173
21174 2001-09-27 Akim Demaille <akim@epita.fr>
21175
21176 Version 1.29b.
21177
21178 2001-09-25 Akim Demaille <akim@epita.fr>
21179
21180 * src/system.h: Include `xalloc.h'.
21181 Remove it from the C files.
21182 * src/files.c (output_files): Free the obstacks.
21183 * src/lex.c (init_lex): Rename as...
21184 (lex_init): this.
21185 (lex_free): New.
21186 * src/main.c (main): Use it.
21187
21188 2001-09-24 Marc Autret <autret_m@epita.fr>
21189
21190 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21191 to output informations in fout (FILE*).
21192 (open_graph, close_graph): Likewise.
21193 (output_graph, output_edge, output_node): Likewise.
21194 * src/vcg.h: Update function prototypes.
21195 * src/print_graph.c (print_graph): Open output graph file.
21196 (print_actions): Adjust.
21197 * src/files.h: Remove extern declaration.
21198 * src/files.c: Remove graph_obstack declaration.
21199 (open_files): Remove graph_obstack initialization.
21200 (output_files): Remove graph_obstack saving.
21201
21202 2001-09-24 Marc Autret <autret_m@epita.fr>
21203
21204 * src/files.c (compute_output_file_names): Fix.
21205
21206 2001-09-24 Marc Autret <autret_m@epita.fr>,
21207 Akim Demaille <akim@epita.fr>
21208
21209 * src/reader.c (reader): Remove call to free_symtab ().
21210 * src/main.c (main): Call it here.
21211 Include symtab.h.
21212 * src/conflicts.c (initialize_conflicts): Rename as...
21213 (solve_conflicts): this.
21214 * src/print.c (print_core, print_actions, print_state)
21215 (print_grammar): Dump to a file instead a `output_obstack'.
21216 (print_results): Dump `output_obstack', and then proceed with the
21217 FILE *.
21218 * src/files.c (compute_output_file_names, close_files): New.
21219 (output_files): Adjust.
21220 * src/main.c (main): Adjust.
21221
21222 2001-09-23 Marc Autret <autret_m@epita.fr>
21223
21224 * src/files.c (compute_header_macro): Computes header macro name
21225 from spec_defines_file when given.
21226
21227 2001-09-23 Marc Autret <autret_m@epita.fr>
21228
21229 * src/files.c (output_files): Add default extensions.
21230
21231 2001-09-22 Akim Demaille <akim@epita.fr>
21232
21233 * src/conflicts.c (finalize_conflicts): Rename as...
21234 (free_conflicts): this.
21235
21236 2001-09-22 Akim Demaille <akim@epita.fr>
21237
21238 * src/gram.c (gram_free): Rename back as...
21239 (dummy): this.
21240 (output_token_translations): Free `token_translations'.
21241 * src/symtab.c (free_symtab): Free the tag field.
21242
21243 2001-09-22 Akim Demaille <akim@epita.fr>
21244
21245 Remove `translations' as it is always set to true.
21246
21247 * src/gram.h: Adjust.
21248 * src/reader.c (packsymbols, parse_token_decl): Adjust
21249 * src/print.c (print_grammar): Adjust.
21250 * src/output.c (output_token_translations): Adjust.
21251 * src/lex.c (lex): Adjust.
21252 * src/gram.c: Be sure the set pointers to NULL.
21253 (dummy): Rename as...
21254 (gram_free): this.
21255
21256 2001-09-22 Akim Demaille <akim@epita.fr>
21257
21258 * configure.in: Invoke AM_LIB_DMALLOC.
21259 * src/system.h: Use dmalloc.
21260 * src/LR0.c: Be sure to have pointers initialized to NULL.
21261 (allocate_itemsets): Allocate kernel_items only if needed.
21262
21263 2001-09-22 Akim Demaille <akim@epita.fr>
21264
21265 * configure.in: Bump to 1.29b.
21266 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21267 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21268 need xmalloc.c in calc.y.
21269 From Pascal Bart.
21270
21271 2001-09-21 Akim Demaille <akim@epita.fr>
21272
21273 Version 1.29a.
21274 * Makefile.maint, config/config.guess, config/config.sub,
21275 * config/missing: Update from masters.
21276 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21277 upon package.m4.
21278 * configure.in (ALL_LINGUAS): Add `tr'.
21279
21280 2001-09-21 Akim Demaille <akim@epita.fr>
21281
21282 * tests/Makefile.am (package.m4): Move to...
21283 ($(srcdir)/$(TESTSUITE)): here.
21284
21285 2001-09-20 Akim Demaille <akim@epita.fr>
21286
21287 * src/complain.c: No longer try to be standalone: use system.h.
21288 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21289 * src/complain.h: Likewise.
21290 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21291 Remove the unused variable `n'.
21292 From Albert Chin-A-Young.
21293
21294 2001-09-18 Marc Autret <autret_m@epita.fr>
21295
21296 * doc/bison.1: Update.
21297 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21298 descriptions.
21299 (Option Cross Key): Update.
21300 Add --graph.
21301
21302 2001-09-18 Marc Autret <autret_m@epita.fr>
21303
21304 * tests/regression.at: New test (comment in %union).
21305
21306 2001-09-18 Marc Autret <autret_m@epita.fr>
21307
21308 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21309 do that.
21310 Reported by Keith Browne.
21311
21312 2001-09-18 Marc Autret <autret_m@epita.fr>
21313
21314 * tests/output.at: Add tests for --defines and --graph.
21315
21316 2001-09-18 Marc Autret <autret_m@epita.fr>
21317
21318 * tests/output.at: Removes tests of %{header,src}_extension features.
21319
21320 2001-09-18 Akim Demaille <akim@epita.fr>
21321
21322 * tests/Makefile.am (package.m4): New.
21323 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21324 (_AT_CHECK_CALC_ERROR): Likewise.
21325 Factor the `, ' part of verbose error messages.
21326
21327 2001-09-18 Marc Autret <autret_m@epita.fr>
21328
21329 * src/getargs.c (longopts): Declare --defines and --graph as options
21330 with optional arguments.
21331 * src/files.h: Add extern declarations.
21332 * src/files.c (spec_graph_file, spec_defines_file): New.
21333 (output_files): Update.
21334 Remove CPP-outed code.
21335
21336 2001-09-18 Marc Autret <autret_m@epita.fr>
21337
21338 Turn off %{source,header}_extension feature.
21339
21340 * src/files.c (compute_exts_from_gf): Update.
21341 (compute_exts_from_src): Update.
21342 (output_files): CPP-out useless code.
21343 * src/files.h: Remove {header,source}_extension extern declarations.
21344 * src/reader.c (parse_dquoted_param): CPP-out.
21345 (parse_header_extension_decl): Remove.
21346 (parse_source_extension_decl): Remove.
21347 (read_declarations): Remove cases tok_{hdrext,srcext}.
21348 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21349 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21350
21351 2001-09-10 Akim Demaille <akim@epita.fr>
21352
21353 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21354 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21355 (AT_CHECK_OUTPUT): this.
21356 Merely check ls' exit status, its output is useless.
21357
21358 2001-09-10 Akim Demaille <akim@epita.fr>
21359
21360 * tests/calc.at: Use m4_match.
21361 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21362
21363 2001-09-10 Marc Autret <autret_m@epita.fr>,
21364 Akim Demaille <akim@epita.fr>
21365
21366 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21367 enum color_e.
21368 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21369 to `normal'.
21370 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21371 * src/lex.h: Adjust prototype.
21372 (token_t): Add `tok_undef'.
21373 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21374 (parse_percent_token): Now returns token_t.
21375 Add default statement in switch.
21376 (lex): Separate `c' as an input variable, from the token_t result
21377 part.
21378 (unlexed): Is a token_t.
21379
21380 2001-09-10 Akim Demaille <akim@epita.fr>
21381
21382 * configure.in: Bump to 1.29a.
21383
21384 2001-09-07 Akim Demaille <akim@epita.fr>
21385
21386 Version 1.29.
21387
21388 2001-08-30 Akim Demaille <akim@epita.fr>
21389
21390 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21391 * m4/atconfig.m4: Remove.
21392 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21393 * tests/bison: New.
21394 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21395 m4_if, m4_patsubst, and m4_regexp.
21396 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21397 `input' file instead of echo.
21398
21399 2001-08-29 Akim Demaille <akim@epita.fr>
21400
21401 Bump to 1.28e.
21402
21403 2001-08-29 Akim Demaille <akim@epita.fr>
21404
21405 Version 1.28d.
21406
21407 2001-08-29 Paul Eggert <eggert@twinsun.com>
21408
21409 * src/bison.simple (yyparse): Don't take the address of an
21410 item before the start of an array, as that doesn't conform to
21411 the C Standard.
21412
21413 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21414
21415 * doc/bison.texinfo (Location Tracking Calc): New node.
21416
21417 2001-08-29 Paul Eggert <eggert@twinsun.com>
21418
21419 * src/output.c (output): Do not define const, as this now
21420 causes more problems than it cures.
21421
21422 2001-08-29 Akim Demaille <akim@epita.fr>
21423
21424 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21425 the nodes.
21426 Be sure to tag the `detailmenu'.
21427
21428 2001-08-29 Akim Demaille <akim@epita.fr>
21429
21430 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21431 download in a tmp dir.
21432
21433 2001-08-28 Marc Autret <autret_m@epita.fr>
21434
21435 * config/depcomp: New file.
21436
21437 2001-08-28 Marc Autret <autret_m@epita.fr>
21438
21439 * doc/bison.1 (mandoc): Adjust.
21440 From Juan Manuel Guerrero.
21441
21442 2001-08-28 Marc Autret <autret_m@epita.fr>
21443
21444 * src/print_graph.c (print_state): Fix.
21445
21446 2001-08-27 Marc Autret <autret_m@epita.fr>
21447
21448 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21449 char * members.
21450 Echo modifications to the functions prototypes.
21451 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21452
21453 2001-08-27 Marc Autret <autret_m@epita.fr>
21454
21455 * src/vcg.c: Include `xalloc.h'.
21456 (add_colorentry): New.
21457 (add_classname): New.
21458 (add_infoname): New.
21459 * src/vcg.h: Add new prototypes.
21460
21461 2001-08-27 Akim Demaille <akim@epita.fr>
21462
21463 * Makefile.maint: Sync. again with CVS Autoconf.
21464
21465 2001-08-27 Akim Demaille <akim@epita.fr>
21466
21467 * Makefile.maint: Formatting changes.
21468 (po-update, cvs-update, update): New targets.
21469 (AMTAR): Remove.
21470
21471 2001-08-27 Akim Demaille <akim@epita.fr>
21472
21473 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21474 * Makefile.maint: Sync. with CVS Autoconf.
21475
21476 2001-08-27 Marc Autret <autret_m@epita.fr>
21477
21478 * src/vcg.h (struct infoname_s): New.
21479 (struct colorentry_s): New.
21480 (graph_s): New fields {vertical,horizontal}_order in structure.
21481 Add `infoname' field.
21482 Add `colorentry' field;
21483 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21484 (G_HORIZONTAL_ORDER): New.
21485 (G_INFONAME): New.
21486 (G_COLORENTRY): New.
21487 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21488 Add output of `infoname'.
21489 Add output of `colorentry'.
21490
21491 2001-08-27 Marc Autret <autret_m@epita.fr>
21492
21493 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21494 This one shadowed a global parameter.
21495
21496 2001-08-24 Marc Autret <autret_m@epita.fr>
21497
21498 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21499 instead of `unsigned'.
21500 (print_state): Do not call obstack_object_size () in obstack_grow ()
21501 to avoid macro variables shadowing.
21502
21503 2001-08-23 Marc Autret <autret_m@epita.fr>
21504
21505 * src/lex.c (percent_table): Typo: s/naem/name/.
21506 Add graph option.
21507 Normalize new options declarations.
21508
21509 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21510
21511 * tests/suite.at: Exercise %header_extension and %source_extension.
21512
21513 2001-08-16 Marc Autret <autret_m@epita.fr>
21514
21515 * src/reader.c (parse_dquoted_param): New.
21516 (parse_header_extension_decl): Use it.
21517 (parse_source_extension_decl): Likewise.
21518
21519 2001-08-16 Marc Autret <autret_m@epita.fr>
21520
21521 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21522 (get_xxxx_str): Use assert () instead of complain ().
21523 Remove return invokations in default cases.
21524 (get_decision_str): Modify default behaviour. Remove second argument.
21525 Echo modifications on calls.
21526 (output_graph): Fix.
21527
21528 2001-08-16 Marc Autret <autret_m@epita.fr>
21529
21530 * src/getargs.c (usage): Update with ``-g, --graph''.
21531
21532 2001-08-16 Marc Autret <autret_m@epita.fr>
21533
21534 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21535 (Option Cross Key): Likewise.
21536 * doc/bison.1: Update.
21537
21538 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21539
21540 * src/output.c (output_master_parser): Don't finish action_obstack.
21541 (output_parser): Don't care about the muscle action, here.
21542 (prepare): Copy the action_obstack in the action muscle.
21543 (output): Free action_obstack.
21544
21545 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21546
21547 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21548 will contain `%union' declaration.
21549 (parse_union_decl): Delete #line directive output.
21550 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21551 informations about %union.
21552 (parse_union_decl): Copy the union_obstack in the muscle stype.
21553 * src/bison.simple: Add new #line directive.
21554 Add typdef %%stype YYSTYPE.
21555
21556 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21557
21558 * src/bison.simple: Add new `#line' directive.
21559
21560 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21561
21562 * src/bison.simple: New `#line' directive.
21563 * src/output.c (output_parser): Support new dynamic muscle input_line.
21564
21565 2001-09-22 Marc Autret <autret_m@epita.fr>
21566
21567 * src/output.c (output_master_parser): New.
21568 (output_parser): Be more re-entrant.
21569
21570 2001-09-21 Marc Autret <autret_m@epita.fr>
21571
21572 * src/reader.c (copy_definition, parse_union_decl): Update and use
21573 `linef' muscle.
21574 (copy_action): Likewise.
21575 Use obstack_1grow ().
21576 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21577
21578 2001-09-21 Marc Autret <autret_m@epita.fr>
21579
21580 * src/options.c (option_table): Adjust.
21581 * src/lex.c (parse_percent_token): Fix.
21582
21583 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21584
21585 * src/options.c (symtab.h): Include it, need by lex.h.
21586
21587 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21588
21589 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21590 is now an option_table_struct*.
21591 (option_strcmp): New function option_strcmp.
21592 (parse_percent_token): Call option_strcmp.
21593 * src/getargs.c (xalloc.h, options.h): Include it.
21594 (getargs): Call create_long_option_table.
21595 (getargs): Free longopts at the end of the function.
21596 (shortopts): Move in options.c.
21597 * src/options.c (create_long_option_table): New function. Convert
21598 information from option_table to option structure.
21599 * src/reader.c (options.h): Include it.
21600
21601 * src/Makefile.am: Adjust.
21602 * src/options.c (option_table): Create from longopts and percent_table.
21603 * src/getargs.c (longopts): Delete.
21604 * src/lex.c (struct percent_table_struct): Delete.
21605 (percent_table): Delete.
21606 (options.h): Include it.
21607 * src/options.c: Create.
21608 * src/options.h: Create.
21609 Declare enum opt_access_e.
21610 Define struct option_table_struct.
21611
21612 2001-09-20 Marc Autret <autret_m@epita.fr>
21613
21614 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21615 sections of Bison.
21616
21617 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21618
21619 * src/bison.simple: s/%%filename/%%skeleton.
21620 * src/muscle_tab.c (getargs.h): Include it.
21621 (muscle_init): Insert new muscle skeleton.
21622
21623 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21624
21625 * src/output.c (output_parser): Delete unused variable actions_dumped.
21626
21627 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21628
21629 * src/output.c (output): Delete call to reader_output_yylsp.
21630 * src/reader.c (reader): Likewise.
21631 * src/reader.h: Delete declaration of reader_output_yylsp.
21632
21633 2001-09-02 Marc Autret <autret_m@epita.fr>
21634
21635 * src/reader.c: Include muscle_tab.h.
21636 (parse_union_decl): Update.
21637 (parse_macro_decl): Rename parse_muscle_decl.
21638 Update to use renamed functions and variable.
21639 (read_declarations, copy_action, read_additionnal_code, : Updated
21640 with correct variables and functions names.
21641 (packsymbols, reader): Likewise.
21642
21643 * src/reader.h (muscle_obstack): Extern declaration update.
21644
21645 * src/output.c: Include muscle_tab.h
21646 In all functions using macro_insert, change by using muscle_insert ().
21647 (macro_obstack): Rename muscle_obstack.
21648 Echo modifications in the whole file.
21649 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21650 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21651 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21652
21653 * src/muscle_tab.h: Update double inclusion macros.
21654 (macro_entry_s): Rename muscle_entry_s.
21655 Update prototypes.
21656
21657 * src/muscle_tab.c: Include muscle_tab.h.
21658 Rename macro_tabble to muscle_table.
21659 (mhash1, mhash2, mcmp): Use muscle_entry.
21660 (macro_init): Rename muscle_init. Update.
21661 (macro_insert): Rename muscle_insert. Update.
21662 (macro_find): Rename muscle_find. Update.
21663
21664 * src/main.c: Include muscle_tab.h.
21665 (main): Call muscle_init ().
21666 * src/Makefile.am (bison_SOURCES): Echo modifications.
21667
21668 2001-09-02 Marc Autret <autret_m@epita.fr>
21669
21670 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21671
21672 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21673
21674 2001-09-02 Marc Autret <autret_m@epita.fr>
21675
21676 * src/macrotab.c, src/macrotab.h: Remove.
21677
21678 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21679
21680 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21681 filename.
21682
21683 2001-09-01 Marc Autret <autret_m@epita.fr>
21684
21685 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21686 to an explicit value to activate the feature. We do it here.
21687
21688 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21689
21690 * src/output.c (prepare): Delete the `filename' muscule insertion.
21691 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21692 (parse_union_decl): Likewise.
21693 * src/macrotab.c (macro_init): Initialize filename by infile.
21694
21695 2001-08-31 Marc Autret <autret_m@epita.fr>
21696
21697 * src/bison.simple (YYLSP_NEEDED): New definition.
21698 * src/output.c (prepare): Add macro insertion of `locations_flag'
21699
21700 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21701
21702 * src/output.c (prepare): Delete insertion of previous muscles,
21703 and insert the `prefix' muscles.
21704 * src/macrotab.c (macro_init): Likewise.
21705 (macro_init): Initialization prefix directive by `yy'.
21706 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21707 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21708 yylval, yydebug, yyerror, yynerrs and yyparse.
21709 New directive `#define' to substitute yydebug, ... with option
21710 name_prefix.
21711
21712 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21713
21714 * src/main.c (main): Standardize.
21715 * src/output.c (output_table_data, output_parser): Likewise.
21716 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21717
21718 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21719
21720 * src/reader.c (read_additionnal_code): Rename %%user_code to
21721 %%epilogue.
21722 * src/output.c (output): Rename %%declarations to %%prologue.
21723 * src/bison.simple: Echo modifications.
21724
21725 2001-08-31 Marc Autret <autret_m@epita.fr>
21726
21727 * src/reader.c (readgram): CleanUp.
21728 (output_token_defines): Likewise.
21729 (packsymbols): Likewise.
21730 (reader): Likewise.
21731 * src/output.c (output): CPP-out useless code.
21732
21733 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21734
21735 * src/reader.c (reader): Delete obsolete call to function
21736 output_trailers and output_headers.
21737 * src/output.h: Remove obsolete functions prototypes of output_headers
21738 and output_trailers.
21739
21740 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21741
21742 * src/main.c: Include macrotab.h.
21743 * src/macrotab.h (macro_entry_s): Constify fields.
21744 Adjust functions prototypes.
21745 * src/macrotab.c (macro_insert): Constify key and value.
21746 (macro_find): Constify key.
21747 (macro_insert): Include 'xalloc.h'
21748 (macro_insert): Use XMALLOC.
21749 (macro_find): Constify return value.
21750 * src/output.c (output_table_data): Rename table to table_data.
21751 (output_parser): Constify macro_key, macro_value.
21752
21753 2001-08-30 Marc Autret <autret_m@epita.fr>
21754
21755 * src/reader.c (parse_skel_decl): New.
21756 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21757 * src/lex.h (token_t): New token `tok_skel'.
21758 * src/lex.c (percent_table): Add skeleton option entry.
21759 Standardize.
21760
21761 2001-08-29 Marc Autret <autret_m@epita.fr>
21762
21763 * src/bison.simple: Add %%user_code directive at the end.
21764 * src/reader.c (read_additionnal_code): New.
21765 (reader): Use it.
21766 * src/output.c (output_program): Remove.
21767 (output): Update.
21768
21769 2001-08-28 Marc Autret <autret_m@epita.fr>
21770
21771 * src/output.c (output_actions): Clean up.
21772 (output_gram): CPP-out useless code.
21773 * src/reader.c (reader): Clean up, CPP-out useless code.
21774
21775 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21776
21777 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21778 directive.
21779 * src/bison.simple: Add `%%definitions'.
21780
21781 2001-08-28 Marc Autret <autret_m@epita.fr>
21782
21783 * config/depcomp: New file.
21784
21785 2001-08-27 Paul Eggert <eggert@twinsun.com>
21786
21787 * src/bison.simple (yyparse): Don't take the address of an
21788 item before the start of an array, as that doesn't conform to
21789 the C Standard.
21790
21791 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21792
21793 * src/output.c (output): Remove the initialization of the macro
21794 obstack. It was done too late here.
21795
21796 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21797 completely wrong.
21798 (reader): Initialize the macro obstack here, since we need it to grow
21799 '%define' directives.
21800
21801 * src/reader.h: Declare the macro obstack as extern.
21802
21803 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21804
21805 * src/output.c (output_parser): Fix. Store single '%' characters in
21806 the output obstack instead of throwing them away.
21807
21808 2001-08-27 Akim Demaille <akim@epita.fr>
21809
21810 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21811
21812 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21813
21814 * lib/Makefile.am: Adjust.
21815
21816 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21817
21818 * src/bison.simple: Update and add '%%' directives.
21819
21820 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21821
21822 * src/reader.c (reader): Remove calls to 'output_headers' and
21823 'output_trailers'. Remove some C output.
21824 (readgram): Disable a piece of code that was writing a default
21825 definition for 'YYSTYPE'.
21826 (reader_output_yylsp): Remove.
21827 (packsymbols): Output token defintions to a macro.
21828 (copy_definition): Disable C output.
21829
21830 * src/reader.c (parse_macro_decl): New function used to parse macro
21831 declarations.
21832 (copy_string2): Put the body of copy_string into this new function.
21833 Add a parameter to let the caller choose whether he wants to copy the
21834 string delimiters or not.
21835 (copy_string): Be a simple call to copy_string2 with the last argument
21836 bound to true.
21837 (read_declarations): Add case for macro definition.
21838 (copy_identifier): New.
21839 (parse_macro_decl): Read macro identifiers using copy_identifier
21840 rather than lex.
21841
21842 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21843
21844 * src/output.c (prepare): Add prefixed names.
21845 (output_parser): Output semantic actions.
21846 (output_parser): Fix bug on '%%line' directives.
21847
21848 * src/output.c (output_headers): Remove. The C code printed by this
21849 function should now be in the skeletons.
21850 (output_trailers): Remove.
21851 (output): Disable call to 'reader_output_yylsp'.
21852 (output_rule_data): Do not output tables to the table obstack.
21853
21854 * src/output.c: Remove some C dedicated output.
21855 Improve the use of macro and output obstacks.
21856 (output_defines): Remove.
21857
21858 * src/output.c (output_token_translations): Associate 'translate'
21859 table with a macro. No output to the table obstack.
21860 (output_gram): Same for 'rhs' and 'prhs'.
21861 (output_stos): Same for 'stos'.
21862 (output_rule_data): Same for 'r1' and 'r2'.
21863 (token_actions): Same for 'defact'.
21864 (goto_actions): Same for 'defgoto'.
21865 (output_base): Same for 'pact' and 'pgoto'.
21866 (output_table): Same for 'table'.
21867 (output_check): Same for 'check'.
21868
21869 * src/output.c (output_table_data): New function.
21870 (output_short_table): Remove.
21871 (output_short_or_char_table): Remove.
21872
21873 * src/output.c (output_parser): Replace most of the skeleton copy code
21874 with something new. Skeletons are now processed character by character
21875 rather than line by line, and Bison looks for '%%' macros. This is the
21876 first step in making Bison's output process (a lot) more flexible.
21877 (output_parser): Use the macro table.
21878
21879 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21880
21881 * src/main.c (main): Initialize the macro table.
21882
21883 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21884
21885 * src/lex.c (percent_table): Add tok_define.
21886 * src/lex.h: Add tok_define.
21887
21888 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21889
21890 * src/macrotab.c: New file.
21891 * src/macrotab.h: New file.
21892 * src/Makefile.am: Update.
21893
21894 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21895
21896 * lib/hash.c: New file.
21897 * lib/hash.h: New file.
21898 * lib/Makefile.am: Update.
21899
21900 2001-08-15 Akim Demaille <akim@epita.fr>
21901
21902 Version 1.28c.
21903
21904 2001-08-15 Marc Autret <autret_m@epita.fr>
21905
21906 * src/reader.c (readgram): Indent output macro YYSTYPE.
21907 (packsymbols): Likewise.
21908 (output_token_defines): Likewise.
21909 * src/files.c: Standardize.
21910 (compute_header_macro): New.
21911 (defines_obstack_save): New. Use compute_header_macro.
21912 (output_files): Update. Use defines_obstack_save.
21913
21914 2001-08-15 Akim Demaille <akim@epita.fr>
21915
21916 * doc/bison.texinfo (Table of Symbols): Document
21917 YYSTACK_USE_ALLOCA.
21918
21919 2001-08-15 Akim Demaille <akim@epita.fr>
21920
21921 * missing: Update from CVS Automake.
21922 * config/config.guess, config/config.sub, config/texinfo.tex:
21923 Update from gnu.org.
21924
21925 2001-08-15 Akim Demaille <akim@epita.fr>
21926
21927 * Makefile.maint: Sync with CVS Autoconf.
21928
21929 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21930
21931 * doc/bison.texinfo: Include GNU Free Documentation License from
21932 `fdl.texi'.
21933 * doc/fdl.texi: Add to package.
21934
21935 2001-08-14 Marc Autret <autret_m@epita.fr>
21936
21937 Turn on %{source,header}_extension features.
21938
21939 * src/lex.c (percent_table): Un-CPP out header_extension and
21940 source_extension.
21941 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21942 (compute_exts_from_src): Remove conditions. It restores priorities
21943 between options.
21944
21945 2001-08-14 Marc Autret <autret_m@epita.fr>
21946
21947 * src/files.c (compute_base_names): Add extensions computing when
21948 `--file-prefix' used.
21949 Standardize function calls.
21950
21951 2001-08-13 Marc Autret <autret_m@epita.fr>
21952
21953 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21954 defining it (defined but null disables alloca).
21955
21956 2001-08-13 Marc Autret <autret_m@epita.fr>
21957
21958 * src/bison.simple (_yy_memcpy): CPP reformat.
21959
21960 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21961
21962 * tests/atconfig.in (CPPFLAGS): Fix.
21963
21964 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21965
21966 * doc/bison.texinfo: Include GNU General Public License from
21967 `gpl.texi'.
21968 * doc/gpl.texi: Add to package.
21969
21970 2001-08-10 Marc Autret <autret_m@epita.fr>
21971
21972 * src/print_graph.h: Fix.
21973 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21974
21975 2001-08-10 Akim Demaille <akim@epita.fr>
21976
21977 * src/system.h: Provide default declarations for stpcpy, strndup,
21978 and strnlen.
21979
21980 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21981
21982 * doc/bison.texinfo (Locations): Update @$ stuff.
21983
21984 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21985
21986 * src/bison.simple (YYLLOC_DEFAULT): Update.
21987 (yyparse): Adjust.
21988
21989 2001-08-08 Marc Autret <autret_m@epita.fr>
21990
21991 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21992 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21993 Reported by Fabrice Bauzac.
21994
21995 2001-08-08 Marc Autret <autret_m@epita.fr>
21996
21997 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21998 * src/vcg.c (output_node): Fix.
21999 * src/vcg.h: Cleanup.
22000 * src/print_graph.c: Add comments.
22001 (node_output_size): New global variable. Simplify the formatting of
22002 the VCG graph output.
22003 (print_actions): Unused code is now used. It notifies the final state
22004 and no action states in the VCG graph. It also give the reduce actions.
22005 The `shift and goto' edges are red and the `go to state' edges are
22006 blue.
22007 Get the current node name and node_obstack by argument.
22008 (node_obstack): New variable.
22009 (print_state): Manage node_obstack.
22010 (print_core): Use node_obstack given by argument.
22011 A node is not only computed here but in print_actions also.
22012 (print_graph): CPP out useless code instead of commenting it.
22013
22014 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22015
22016 * tests/atconfig.in (CPPFLAGS): Fix.
22017
22018 2001-08-07 Akim Demaille <akim@epita.fr>
22019
22020 * src/print_graph.c (quote): New.
22021 (print_core): Use it.
22022
22023 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22024
22025 * src/vcg.c (complain.h): Include it.
22026 Unepitaize `return' invocations.
22027 [NDEBUG] (main): Remove.
22028 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22029 * src/files.c (open_files): Initialize graph_obstack.
22030 * src/print_graph.c (print_actions): CPP out useless code.
22031 (print_core): Don't output the last `\n' in labels.
22032 Use `quote'.
22033 * src/files.c (output_files): Output the VCG file.
22034 * src/main.c (main): Invoke print_graph ();
22035
22036 2001-08-06 Marc Autret <autret_m@epita.fr>
22037
22038 Automaton VCG graph output.
22039 Using option ``-g'' or long option ``--graph'', you can generate
22040 a gram_filename.vcg file containing a VCG description of the LALR (1)
22041 automaton of your grammar.
22042
22043 * src/main.c: Call to print_graph() function.
22044 * src/getargs.h: Update.
22045 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22046 (graph_flag): New flag.
22047 (longopts): Update.
22048 (getargs): Add case `g'.
22049 * src/files.c (graph_obstack): New obstack struct.
22050 (open_files): Initialize new obstack.
22051 (output_files): Saves graph_obstack if required.
22052 * src/files.h (graph_obstack): New extern declaration.
22053 * src/Makefile.am: Add new source files.
22054
22055 2001-08-06 Marc Autret <autret_m@epita.fr>
22056
22057 * src/print_graph.c, src/print_graph.h (graph): New.
22058 * src/vcg.h: New file.
22059 * src/vcg.c: New file, VCG graph handling.
22060
22061 2001-08-06 Marc Autret <autret_m@epita.fr>
22062
22063 Add of %source_extension and %header_extension which specify
22064 the source or/and the header output file extension.
22065
22066 * src/files.c (compute_base_names): Remove initialisation of
22067 src_extension and header_extension.
22068 (compute_exts_from_gf): Update.
22069 (compute_exts_from_src): Update.
22070 (output_files): Update.
22071 * src/reader.c (parse_header_extension_decl): New.
22072 (parse_source_extension_decl): New.
22073 (read_declarations): New case statements for the new tokens.
22074 * src/lex.c (percent_table): Add entries for %source_extension
22075 and %header_extension.
22076 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22077
22078 2001-08-06 Marc Autret <autret_m@epita.fr>
22079
22080 * configure.in: Bump to 1.28c.
22081 * doc/bison.texinfo: Texinfo thingies.
22082
22083 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22084
22085 * tests/atconfig.in (CPPFLAGS): Add.
22086 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22087
22088 2001-08-03 Akim Demaille <akim@epita.fr>
22089
22090 Version 1.28b.
22091
22092 2001-08-03 Akim Demaille <akim@epita.fr>
22093
22094 * tests/Makefile.am (check-local): Ship testsuite.
22095 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22096 Include `string.h'.
22097
22098 2001-08-03 Akim Demaille <akim@epita.fr>
22099
22100 * configure.in: Try using -Wformat when compiling.
22101
22102 2001-08-03 Akim Demaille <akim@epita.fr>
22103
22104 * configure.in: Bump to 1.28b.
22105
22106 2001-08-03 Akim Demaille <akim@epita.fr>
22107
22108 * src/complain.c: Adjust strerror_r portability issues.
22109
22110 2001-08-03 Akim Demaille <akim@epita.fr>
22111
22112 Version 1.28a.
22113
22114 2001-08-03 Akim Demaille <akim@epita.fr>
22115
22116 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22117 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22118 * src/getargs.c: Include complain.h.
22119 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22120 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22121
22122 2001-08-03 Akim Demaille <akim@epita.fr>
22123
22124 * src/reader.c (readgram): Display hidden chars in error messages.
22125
22126 2001-08-03 Akim Demaille <akim@epita.fr>
22127
22128 Update to gettext 0.10.39.
22129
22130 2001-08-03 Akim Demaille <akim@epita.fr>
22131
22132 * lib/strspn.c: New.
22133
22134 2001-08-01 Marc Autret <autret_m@epita.fr>
22135
22136 * doc/bison.texinfo: Update.
22137 * doc/bison.1 (mandoc): Update.
22138 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22139 * src/files.c: Support output files extensions computing.
22140 (src_extension): New static variable.
22141 (header_extension): New static variable.
22142 (tr): New function.
22143 (get_extension_index): New function, gets the index of an extension
22144 filename in a string.
22145 (compute_exts_from_gf): New function, computes extensions from the
22146 grammar file extension.
22147 (compute_exts_from_src): New functions, computes extensions from the
22148 C source file extension, file given by ``-o'' option.
22149 (compute_base_names): Update.
22150 (output_files): Update.
22151
22152 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22153
22154 * doc/bison.texi: Document @$.
22155 (Locations): New section.
22156
22157 2001-07-18 Akim Demaille <akim@epita.fr>
22158
22159 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22160 * config/prev-version.txt, config/move-if-change: New.
22161 * Makefile.am: Adjust.
22162
22163 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22164
22165 * src/bison.simple (yyparse): Suppress warning `comparaison
22166 between signed and unsigned'.
22167
22168 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22169
22170 * src/getargs.h (raw_flag): Remove.
22171 * src/getargs.c: Die on `-r'/`--raw'.
22172 * src/lex.c (parse_percent_token): Die on `%raw'.
22173 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22174 * tests/calc.at: Suppress test with option `--raw'.
22175
22176 2001-07-14 Akim Demaille <akim@epita.fr>
22177
22178 * config/: New.
22179 * configure.in: Require Autoconf 2.50.
22180 Update to gettext 0.10.38.
22181
22182 2001-03-16 Akim Demaille <akim@epita.fr>
22183
22184 * doc/bison.texinfo: ANSIfy the examples.
22185
22186 2001-03-16 Akim Demaille <akim@epita.fr>
22187
22188 * getargs.c (skeleton): New variable.
22189 (longopts): --skeleton is a new option.
22190 (shortopts, getargs): -S is a new option.
22191 * getargs.h: Declare skeleton.
22192 * output.c (output_parser): Use it.
22193
22194 2001-03-16 Akim Demaille <akim@epita.fr>
22195
22196 * m4/strerror_r.m4: New.
22197 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22198 * lib/error.h, lib/error.c: Update.
22199
22200 2001-03-16 Akim Demaille <akim@epita.fr>
22201
22202 * src/getargs.c (longopts): Clean up.
22203
22204 2001-02-21 Akim Demaille <akim@epita.fr>
22205
22206 * src/reader.c (gensym): `gensym_count' is your own.
22207 Use a static buf to create the symbol name, as token_buffer is no
22208 longer a buffer.
22209
22210 2001-02-08 Akim Demaille <akim@epita.fr>
22211
22212 * src/conflicts.c (conflict_report): Be sure not to append to res
22213 between two calls, which could happen if both first sprintf were
22214 skipped, but not the first cp += strlen.
22215
22216 2001-02-08 Akim Demaille <akim@epita.fr>
22217
22218 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22219 New, from fileutils 4.0.37.
22220 * configure.in: Require Autoconf 2.49c. I took some time before
22221 making this decision. This is the only way out for portability
22222 issues in Bison, it would mean way too much duplicate effort to
22223 import in Bison features implemented in 2.49c since 2.13.
22224 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22225
22226 2001-02-02 Akim Demaille <akim@epita.fr>
22227
22228 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22229 * lib/xalloc.h, lib/xmalloc.c: Update.
22230
22231 2001-01-19 Akim Demaille <akim@epita.fr>
22232
22233 Get rid of the ad hoc handling of token_buffer in the scanner: use
22234 the obstacks.
22235
22236 * src/lex.c (token_obstack): New.
22237 (init_lex): Initialize it. No longer call...
22238 (grow_token_buffer): this. Remove it.
22239 Adjust all the places which used it to use the obstack.
22240
22241 2001-01-19 Akim Demaille <akim@epita.fr>
22242
22243 * src/lex.h: Rename all the tokens:
22244 s/\bENDFILE\b/tok_eof/g;
22245 s/\bIDENTIFIER\b/tok_identifier/g;
22246 etc.
22247 Let them be enums, not #define, to ease debugging.
22248 Adjust all the code.
22249
22250 2001-01-18 Akim Demaille <akim@epita.fr>
22251
22252 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22253 * src/lex.c (maxtoken, grow_token_buffer): Static.
22254
22255 2001-01-18 Akim Demaille <akim@epita.fr>
22256
22257 Since we now use obstacks, more % directives can be enabled.
22258
22259 * src/lex.c (percent_table): Also accept `%yacc',
22260 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22261 `%debug'.
22262 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22263 instead of returning a token.
22264 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22265 * src/reader.c (read_declarations): Adjust.
22266 * src/files.c (open_files): Don't call `compute_base_names', don't
22267 compute `attrsfile' since they depend upon data which might be
22268 *in* the input file now.
22269 (output_files): Do it here.
22270 * src/output.c (output_headers): Document the fact that this patch
22271 introduces a guaranteed SEGV for semantic parsers.
22272 * doc/bison.texinfo: Document them.
22273 * tests/suite.at: Exercise these %options.
22274
22275 2000-12-20 Akim Demaille <akim@epita.fr>
22276
22277 Also handle the output file (--verbose) with obstacks.
22278
22279 * files.c (foutput): Remove.
22280 (output_obstack): New.
22281 Adjust all dependencies.
22282 * src/conflicts.c: Return a string.
22283 * src/system.h (obstack_grow_string): Rename as...
22284 (obstack_sgrow): this. Be ready to work with non literals.
22285 (obstack_fgrow4): New.
22286
22287 2000-12-20 Akim Demaille <akim@epita.fr>
22288
22289 * src/files.c (open_files): Fix the computation of short_base_name
22290 in the case of `-o foo.tab.c'.
22291
22292 2000-12-20 Akim Demaille <akim@epita.fr>
22293
22294 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22295 (copy_dollar): Now that everything uses obstacks, get rid of the
22296 FILE * parameters.
22297
22298 2000-12-20 Akim Demaille <akim@epita.fr>
22299
22300 * src/files.c (open_files): Actually the `.output' file is based
22301 on the short_base_name, not base_name.
22302 * tests/suite.at (Checking output file names): Adjust.
22303
22304 2000-12-20 Akim Demaille <akim@epita.fr>
22305
22306 * src/bison.s1: Remove, we now use directly...
22307 * src/bison.simple: this.
22308 * src/Makefile.am: Use pkgdata instead of data.
22309
22310 2000-12-20 Akim Demaille <akim@epita.fr>
22311
22312 * src/files.c (guard_obstack): New.
22313 (open_files): Initialize it.
22314 (output_files): Dump it...
22315 * src/files.h: Export it.
22316 * src/reader.c (copy_guard): Use it.
22317
22318 2000-12-19 Akim Demaille <akim@epita.fr>
22319
22320 * src/files.c (outfile, defsfile, actfile): Removed as global
22321 vars.
22322 (open_files): Don't compute them.
22323 (output_files): Adjust.
22324 (base_name, short_base_name): Be global.
22325 Adjust dependencies.
22326
22327 2000-12-19 Akim Demaille <akim@epita.fr>
22328
22329 * src/files.c (strsuffix): New.
22330 (stringappend): Be just like strcat but allocate.
22331 (base_names): Eve out from open_files.
22332 Try to simplify the rather hairy computation of base_name and
22333 short_base_name.
22334 (open_files): Use it.
22335 * tests/suite.at (Checking output file names): New test.
22336
22337 2000-12-19 Akim Demaille <akim@epita.fr>
22338
22339 * src/system.h (obstack_grow_literal_string): Rename as...
22340 (obstack_grow_string): this.
22341 * src/output.c (output_parser): Recognize `%% actions' instead of
22342 `$'.
22343 * src/bison.s1: s/$/%% actions/.
22344 * src/bison.hairy: Likewise.
22345
22346 2000-12-19 Akim Demaille <akim@epita.fr>
22347
22348 * src/output.c (output_parser): Compute the `#line' lines when
22349 there are.
22350 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22351 Suggested by Hans Aberg.
22352
22353 2000-12-19 Akim Demaille <akim@epita.fr>
22354
22355 Let the handling of the skeleton files be local to the procedures
22356 that use it.
22357
22358 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22359 longer static.
22360 (fparser, open_extra_files): Remove.
22361 (open_files, output_files): Don't take care of fparser.
22362 * src/files.h: Adjust.
22363 * src/output.c (output_parser): Open and close the file to the
22364 skeleton.
22365 * src/reader.c (read_declarations): When %semantic_parser, open
22366 fguard.
22367
22368 2000-12-19 Akim Demaille <akim@epita.fr>
22369
22370 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22371 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22372
22373 2000-12-19 Akim Demaille <akim@epita.fr>
22374
22375 * src/files.c (open_files): Yipee! We no longer need all the code
22376 looking for `/tmp' since we have no tmp file.
22377
22378 2000-12-19 Akim Demaille <akim@epita.fr>
22379
22380 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22381 New macros.
22382 * src/files.c (open_files): Less dependency on MSDOS etc.
22383
22384 2000-12-14 Akim Demaille <akim@epita.fr>
22385
22386 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22387 Provide a default definition.
22388 Use it when executing the default @ action.
22389 * src/reader.c (reader_output_yylsp): No longer include
22390 `timestamp' and `text' in the default YYLTYPE.
22391
22392 2000-12-12 Akim Demaille <akim@epita.fr>
22393
22394 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22395 (copy_guard): Quote the file names.
22396 Reported by Laurent Mascherpa.
22397
22398 2000-12-12 Akim Demaille <akim@epita.fr>
22399
22400 * src/output.c (output_headers, output_program, output): Be sure
22401 to escape special characters when outputting filenames.
22402 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22403 (output_headers): Don't depend on them, Use ACTSTR.
22404
22405 2000-11-17 Akim Demaille <akim@epita.fr>
22406
22407 * lib/obstack.h: Formatting changes.
22408 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22409 prevents type checking.
22410 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22411 cast the value to (void *): assigning a `foo *' to a `void *'
22412 variable is valid.
22413 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22414 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22415 append characters.
22416
22417 2000-11-17 Akim Demaille <akim@epita.fr>
22418
22419 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22420 as...
22421 (suite.m4, regression.m4, calc.m4): these.
22422 * tests/atgeneral.m4: Update from CVS Autoconf.
22423
22424 2000-11-17 Akim Demaille <akim@epita.fr>
22425
22426 * tests/regression.m4 (%union and --defines): New test,
22427 demonstrating a current bug in the obstack implementation.
22428
22429 2000-11-17 Akim Demaille <akim@epita.fr>
22430
22431 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22432 macros.
22433 Use them to declare the variables which are global or local to
22434 `yyparse'.
22435
22436 2000-11-17 Akim Demaille <akim@epita.fr>
22437
22438 * acconfig.h: Remove, no longer used.
22439
22440 2000-11-07 Akim Demaille <akim@epita.fr>
22441
22442 * src: s/Copyright (C)/Copyright/g.
22443
22444 2000-11-07 Akim Demaille <akim@epita.fr>
22445
22446 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22447 defining.
22448 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22449
22450 2000-11-07 Akim Demaille <akim@epita.fr>
22451
22452 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22453 Merge in a single CPP if/else.
22454
22455 2000-11-07 Akim Demaille <akim@epita.fr>
22456
22457 * src/output.c (output): Remove useless variables.
22458 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22459 argument `data' for consistency with the prototypes.
22460 Qualify it `const'.
22461 (obstack_copy, obstack_copy0): Rename the second argument as
22462 `address' for consistency. Qualify it `const'.
22463 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22464 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22465 `const' their input argument (`data' or `address').
22466 Adjust the corresponding macros to include `const' in casts.
22467
22468 2000-11-03 Akim Demaille <akim@epita.fr>
22469
22470 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22471 s/PFILE1/BISON_HAIRY/.
22472 Adjust dependencies.
22473
22474 2000-11-03 Akim Demaille <akim@epita.fr>
22475
22476 For some reason, this was not applied.
22477
22478 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22479 `unlink': it's no longer used.
22480
22481 2000-11-03 Akim Demaille <akim@epita.fr>
22482
22483 * src/files.c (skeleton_find): New function, eved out of...
22484 (open_files, open_extra_files): here.
22485
22486 2000-11-03 Akim Demaille <akim@epita.fr>
22487
22488 Don't use `atexit'.
22489
22490 * src/files.c (obstack_save): New function.
22491 (done): Rename as...
22492 (output_files): this.
22493 Use `obstack_save'.
22494 * src/main.c (main): Don't use `atexit' to register `done', since
22495 it no longer has to remove tmp files, just call `output_files'
22496 when there are no errors.
22497
22498 2000-11-02 Akim Demaille <akim@epita.fr>
22499
22500 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22501 `unlink': it's no longer used.
22502 * src/files.h: Formatting changes.
22503
22504 2000-11-02 Akim Demaille <akim@epita.fr>
22505
22506 Remove the last uses of mktemp and unlink/delete.
22507
22508 * src/files.c (fdefines, ftable): Removed.
22509 (defines_ostack, table_obstack): New.
22510 Adjust dependencies of the former into uses of the latter.
22511 * src/output.c (output_short_or_char_table, output_short_table):
22512 Convert to using obstacks.
22513 * src/reader.c (copy_comment2): Accept one FILE * and two
22514 obstacks.
22515 (output_token_defines, reader_output_yylsp): Use obstacks.
22516 * src/system.h (obstack_fgrow3): New.
22517 * po/POTFILES.in: Adjust.
22518
22519 2000-11-01 Akim Demaille <akim@epita.fr>
22520
22521 Change each use of `fattrs' into a use of `attrs_obstack'.
22522
22523 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22524 * src/files.c (fattrs): Remove.
22525 (attrs_obstack): New.
22526 Adjust all dependencies.
22527 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22528
22529 2000-11-01 Akim Demaille <akim@epita.fr>
22530
22531 Introduce obstacks.
22532 Change each use of `faction' into a use of `action_obstack'.
22533
22534 * lib/obstack.h, lib/obstack.c: New files.
22535 * src/files.c (faction): Remove.
22536 (action_obstack): New.
22537 Adjust all dependencies.
22538
22539 2000-10-20 Akim Demaille <akim@epita.fr>
22540
22541 * lib/quote.h (PARAMS): New macro. Use it.
22542
22543 2000-10-16 Akim Demaille <akim@epita.fr>
22544
22545 * src/output.c (output_short_or_char_table): New function.
22546 (output_short_table, output_token_translations): Use it.
22547 (goto_actions): Use output_short_table.
22548
22549 2000-10-16 Akim Demaille <akim@epita.fr>
22550
22551 * src/symtab.c (bucket_new): New function.
22552 (getsym): Use it.
22553
22554 * src/output.c (output_short_table): New argument to display the
22555 comment associated with the table.
22556 Adjust dependencies.
22557 (output_gram): Use it.
22558 (output_rule_data): Nicer output layout for YYTNAME.
22559
22560 2000-10-16 Akim Demaille <akim@epita.fr>
22561
22562 * src/lex.c (read_typename): New function.
22563 (lex): Use it.
22564 * src/reader.c (copy_dollar): Likewise.
22565
22566 2000-10-16 Akim Demaille <akim@epita.fr>
22567
22568 * src/reader.c (copy_comment2): Expect the input stream to be on
22569 the `/' which is suspected to open a comment, instead of being
22570 called after `//' or `/*' was read.
22571 (copy_comment, copy_definition, parse_union_decl, copy_action)
22572 (copy_guard): Adjust.
22573
22574 2000-10-16 Akim Demaille <akim@epita.fr>
22575
22576 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22577 `read_signed_integer'.
22578
22579 2000-10-16 Akim Demaille <akim@epita.fr>
22580
22581 * src/reader.c (copy_dollar): New function.
22582 (copy_guard, copy_action): Use it.
22583
22584 2000-10-16 Akim Demaille <akim@epita.fr>
22585
22586 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22587 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22588 New files, from Fileutils 4.0.27.
22589 * src/main.c (printable_version): Remove.
22590 * src/lex.c, src/reader.c: Use `quote'.
22591
22592 2000-10-04 Akim Demaille <akim@epita.fr>
22593
22594 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22595
22596 2000-10-04 Akim Demaille <akim@epita.fr>
22597
22598 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22599
22600 2000-10-04 Akim Demaille <akim@epita.fr>
22601
22602 When a literal string is used to define two different tokens,
22603 `bison -v' segfaults.
22604 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22605
22606 * tests/regression.m4: New file.
22607 Include the core of the sample provided by Piotr Gackiewicz.
22608 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22609 properly.
22610
22611 2000-10-04 Akim Demaille <akim@epita.fr>
22612
22613 * src/reader.c (parse_expect_decl): Keep `count' within the size
22614 of `buffer'.
22615 From Neil Booth.
22616
22617 2000-10-02 Paul Eggert <eggert@twinsun.com>
22618
22619 * bison.s1 (yyparse): Assign the default value
22620 unconditionally, to avoid a GCC warning and make the parser a
22621 tad smaller.
22622
22623 2000-10-02 Akim Demaille <akim@epita.fr>
22624
22625 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22626 options.
22627
22628 2000-10-02 Akim Demaille <akim@epita.fr>
22629
22630 * src/derives.c, src/print.c, src/reduce.c: To ease the
22631 translation, move some `\n' out of the translated strings.
22632
22633 2000-10-02 Akim Demaille <akim@epita.fr>
22634
22635 The location tracking mechanism is precious for parse error
22636 messages. Nevertheless, it is enabled only when `@n' is used in
22637 the grammar, which is a different issue (you can use it in error
22638 message, but not in the grammar per se). Therefore, there should
22639 be another means to enable it.
22640
22641 * src/getargs.c (getargs): Support `--locations'.
22642 (usage): Report it.
22643 * src/getargs.h (locationsflag): Export it.
22644 * src/lex.c (percent_table): Support `%locations'.
22645 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22646 with `locationsflag'.
22647 * doc/bison.texinfo: Document `--locations' and `%locations'.
22648 Sort the options.
22649 * tests/calc.m4: Test it.
22650
22651 For regularity of the names, replace each
22652 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22653 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22654 In addition replace each `flag' with `_flag'.
22655
22656 2000-10-02 Akim Demaille <akim@epita.fr>
22657
22658 Also test parse error messages, including with YYERROR_VERBOSE.
22659
22660 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22661 associative).
22662 Use it to check the computations.
22663 Use it to check `nonassoc' is honored.
22664 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22665 `--yyerror-verbose'.
22666 (_AT_CHECK_CALC): Adjust to this option.
22667 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22668
22669 2000-10-02 Akim Demaille <akim@epita.fr>
22670
22671 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22672 the latter demonstrates a flaw in the handling of non debugging
22673 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22674 was used in order to simplify:
22675
22676 #if YYDEBUG
22677 if (yydebug)
22678 {
22679 ...
22680 }
22681 #endif
22682
22683 into
22684
22685 if (yydebug)
22686 {
22687 ...
22688 }
22689
22690 unfortunately this leads to a CPP conflict when
22691 `--name-prefix=foo' is used since it produces `#define yydebug
22692 foodebug'.
22693
22694 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22695 (YYDPRINTF): New macro.
22696 Spread its use.
22697 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22698 the bison options.
22699 Also test `--verbose', `--defines' and `--name-prefix'.
22700
22701 2000-10-02 Akim Demaille <akim@epita.fr>
22702
22703 Improve the readability of the produced parsers.
22704
22705 * src/bison.s1: Formatting changes.
22706 Improve the comment related to the `$' mark.
22707 (yydefault): Don't fall through to `yyresume': `goto' there.
22708 * src/output.c (output_parser): When the `$' is met, skip the end
22709 of its line.
22710 New variable, `number_of_dollar_signs', to check there's exactly
22711 one `$' in the parser skeleton.
22712
22713 2000-10-02 Akim Demaille <akim@epita.fr>
22714
22715 * lib/xstrdup.c: New file, from the fileutils.
22716 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22717 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22718 instead of strlen + xmalloc + strcpy.
22719 * src/symtab.c (copys): Remove, use xstrdup instead.
22720
22721 2000-10-02 Akim Demaille <akim@epita.fr>
22722
22723 * src/gram.h (associativity): New enum type which replaces the
22724 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22725 `right_assoc', `left_assoc' and `non_assoc'.
22726 Adjust all dependencies.
22727 * src/reader.c: Formatting changes.
22728 (LTYPESTR): Don't define it, use it as a literal in
22729 `reader_output_yylsp'.
22730 * src/symtab.h (symbol_class): New enum type which replaces the
22731 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22732 `sunknown', `stoken and `snterm'.
22733
22734 2000-10-02 Akim Demaille <akim@epita.fr>
22735
22736 * src/getargs.c (fixed_outfiles): Rename as...
22737 (yaccflag): for consistency and accuracy.
22738 Adjust dependencies.
22739
22740 2000-10-02 Akim Demaille <akim@epita.fr>
22741
22742 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22743 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22744 difficult and introduced a lot of core dump. It turns out that
22745 Bison used an implementation of `xmalloc' based on `calloc', and
22746 at various places it does depend upon the initialization to 0. I
22747 have not tried to isolate the pertinent places, and all the former
22748 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22749 someone should address this issue.
22750
22751 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22752 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22753 files.
22754 Adjust dependencies.
22755 * src/warshall.h: New file.
22756 Propagate.
22757
22758 2000-10-02 Akim Demaille <akim@epita.fr>
22759
22760 Various anti-`extern in *.c' changes.
22761
22762 * src/system.h: Include `assert.h'.
22763
22764 2000-10-02 Akim Demaille <akim@epita.fr>
22765
22766 * src/state.h (nstates, final_state, first_state, first_shift)
22767 (first_reduction): Move their exportation from here...
22768 * src/LR0.h: to here.
22769 Adjust dependencies.
22770 * src/getargs.c (statisticsflag): New variable.
22771 Add support for `--statistics'.
22772 Adjust dependencies.
22773
22774 Remove a lot of now useless `extern' statements in most files.
22775
22776 2000-10-02 Akim Demaille <akim@epita.fr>
22777
22778 * src/LR0.h: New file.
22779 Propagate its use.
22780
22781 2000-10-02 Akim Demaille <akim@epita.fr>
22782
22783 * src/print.h: New file.
22784 Propagate its use.
22785 * src/print.c: Formatting and ordering changes.
22786 (verbose, terse): Replace with...
22787 (print_results): this new function.
22788 Adjust dependencies.
22789
22790 2000-10-02 Akim Demaille <akim@epita.fr>
22791
22792 * src/conflicts.c (conflict_report): New function.
22793 (conflict_log, verbose_conflict_log): Replace with...
22794 (print_conflicts): this function.
22795 Adjust dependencies.
22796 * src/conflicts.h: New file.
22797 Propagate its inclusion.
22798
22799 2000-10-02 Akim Demaille <akim@epita.fr>
22800
22801 * src/nullable.h: New file.
22802 Propagate its inclusion.
22803 * src/nullable.c: Formatting changes.
22804
22805 2000-10-02 Akim Demaille <akim@epita.fr>
22806
22807 * src/reduce.h: New file.
22808 Propagate its inclusion.
22809 * src/reduce.c: Topological sort and other formatting changes.
22810 (bool, TRUE, FALSE): Move their definition to...
22811 * src/system.h: here.
22812
22813 2000-10-02 Akim Demaille <akim@epita.fr>
22814
22815 * src/files.c: Formatting changes.
22816 (tryopen, tryclose, openfiles): Rename as...
22817 (xfopen, xfclose, open_files): this.
22818 (stringappend): static.
22819 * src/files.h: Complete the list of exported symbols.
22820 Propagate its use.
22821
22822 2000-10-02 Akim Demaille <akim@epita.fr>
22823
22824 * src/reader.h: New file.
22825 Propagate its use instead of tedious list of `extern' and
22826 prototypes.
22827 * src/reader.c: Formatting changes, topological sort,
22828 s/register//.
22829
22830 2000-10-02 Akim Demaille <akim@epita.fr>
22831
22832 * src/lex.h: Prototype `lex.c' exported functions.
22833 * src/reader.c: Adjust.
22834 * src/lex.c: Formatting changes.
22835 (safegetc): Rename as...
22836 (xgetc): this.
22837
22838 2000-10-02 Akim Demaille <akim@epita.fr>
22839
22840 * src/lalr.h: New file.
22841 Propagate its inclusion instead of prototypes and `extern'.
22842 * src/lalr.c: Formatting changes, topological sorting etc.
22843
22844 2000-10-02 Akim Demaille <akim@epita.fr>
22845
22846 * src/output.c (token_actions): Introduce a temporary array,
22847 YYDEFACT, that makes it possible for this function to use
22848 output_short_table.
22849
22850 2000-10-02 Akim Demaille <akim@epita.fr>
22851
22852 `user_toknums' is output as a `short[]' in `output.c', while it is
22853 defined as a `int[]' in `reader.c'. For consistency with the
22854 other output tables, `user_toknums' is now defined as a table of
22855 shorts.
22856
22857 * src/reader.c (user_toknums): Be a short table instead of an int
22858 table.
22859 Adjust dependencies.
22860
22861 Factor the short table outputs.
22862
22863 * src/output.c (output_short_table): New function.
22864 * src/output.c (output_gram, output_stos, output_rule_data)
22865 (output_base, output_table, output_check): Use it.
22866
22867 2000-10-02 Akim Demaille <akim@epita.fr>
22868
22869 * src/output.c (output): Topological sort of the functions, in
22870 order to get rid of the `static' prototypes.
22871 No longer use `register'.
22872 * src/output.h: New file.
22873 Propagate its inclusion in files explicitly prototyping functions
22874 from output.c.
22875
22876 2000-09-21 Akim Demaille <akim@epita.fr>
22877
22878 * src/atgeneral.m4: Update from Autoconf.
22879
22880 2000-09-21 Akim Demaille <akim@epita.fr>
22881
22882 * src/closure.h: New file.
22883 * src/closure.c: Formatting changes, topological sort over the
22884 functions, use of closure.h.
22885 (initialize_closure, finalize_closure): Rename as...
22886 (new_closure, free_closure): these. Adjust dependencies.
22887 * src/LR0.c: Formatting changes, topological sort, use of
22888 cloture.h.
22889 (initialize_states): Rename as...
22890 (new_states): this.
22891 * src/Makefile.am (noinst_HEADERS): Adjust.
22892
22893 2000-09-20 Akim Demaille <akim@epita.fr>
22894
22895 * src/acconfig.h: Don't protect config.h against multiple
22896 inclusion.
22897 Don't define PARAMS.
22898 * src/system.h: Define PARAMS.
22899 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22900 purpose of config.h. system.h must not try to fix wrong
22901 definitions in config.h.
22902
22903 2000-09-20 Akim Demaille <akim@epita.fr>
22904
22905 * src/derives.h: New file.
22906 * src/main.c, src/derives.h: Use it.
22907 Formatting changes.
22908 * src/Makefile.am (noinst_HEADERS): Adjust.
22909
22910 2000-09-20 Akim Demaille <akim@epita.fr>
22911
22912 * tests/atgeneral.m4: Update from Autoconf.
22913 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22914 (AT_CHECK_CALC): New macros.
22915 Use these macros to test bison with options `', `--raw',
22916 `--debug', `--yacc', `--yacc --debug'.
22917
22918 2000-09-19 Akim Demaille <akim@epita.fr>
22919
22920 * src/output.c: Formatting changes.
22921 * src/machine.h: Remove, leaving its contents in...
22922 * src/system.h: here.
22923 Include stdio.h.
22924 Adjust all dependencies on stdio.h and machine.h.
22925 * src/getargs.h: New file.
22926 Let all `extern' declarations about getargs.c be replaced with
22927 inclusion of `getargs.h'.
22928 * src/Makefile.am (noinst_HEADERS): Adjust.
22929
22930 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22931 scope.
22932 (yyerror): Returns void, not int.
22933 * doc/bison.texinfo: Formatting changes.
22934
22935 2000-09-19 Akim Demaille <akim@epita.fr>
22936
22937 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22938 portable.
22939
22940 2000-09-18 Akim Demaille <akim@epita.fr>
22941
22942 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22943 * src/Makefile.am (INCLUDES): Don't.
22944 Be ready to fetch headers in lib/.
22945
22946 2000-09-18 Akim Demaille <akim@epita.fr>
22947
22948 * doc/bison.texinfo: Update the copyright.
22949 ANSIfy and GNUify the examples.
22950 Remove the old menu.
22951
22952 2000-09-18 Akim Demaille <akim@epita.fr>
22953
22954 First set of tests: use the `calc' example from the documentation.
22955
22956 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22957 is defined only when YYDEBUG is.
22958 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22959 * src/files.c (tryopen, tryclose): Formatting changes.
22960 Move to the top and be static.
22961 * src/reader.c (read_signed_integer): Likewise.
22962 * tests/calc.m4: New file.
22963 * Makefile.am, suite.m4: Adjust.
22964 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22965
22966 2000-09-18 Akim Demaille <akim@epita.fr>
22967
22968 Add support for an Autotest test suite for Bison.
22969
22970 * m4/m4.m4, m4/atconfig.m4: New files.
22971 * m4/Makefile.am (EXTRA_DIST): Adjust.
22972 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22973 files.
22974 * src/getargs.c: Display a more standard --version message.
22975 * src/reader.c (reader): Formatting changes.
22976 No longer depend upon VERSION_STRING.
22977 * configure.in: No longer use `dnl'.
22978 Set up the test suite and the new directory `tests/.
22979 (VERSION_STRING): Remove.
22980
22981 2000-04-14 Akim Demaille <akim@epita.fr>
22982
22983 * src/reader.c (copy_comment2): New function, same as former
22984 `copy_comment', but outputs into two FILE *.
22985 (copy_comment): Use it.
22986 (parse_union_decl): Use it.
22987 (get_type, parse_start_decl): Use the same `invalid' message.
22988 (parse_start_decl, parse_union_decl): Use the same `multiple'
22989 message.
22990 (parse_union_decl, copy_guard, copy_action): Use the same
22991 `unmatched' message.
22992 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22993
22994 2000-03-31 Akim Demaille <akim@epita.fr>
22995
22996 * src/files.c (tryopen, tryclose): Move to the top.
22997 Be static.
22998
22999 2000-03-31 Akim Demaille <akim@epita.fr>
23000
23001 * src/main.c (main): Don't call `done', exit does it.
23002
23003 2000-03-31 Akim Demaille <akim@epita.fr>
23004
23005 * allocate.c: s/return (foo)/return foo/.
23006 * lalr.c: Likewise.
23007 * LR0.c: Likewise.
23008 * output.c: Likewise.
23009 * reader.c: Likewise.
23010 * symtab.c: Likewise.
23011 * vmsgetargs.c: Likewise.
23012
23013 2000-03-31 Akim Demaille <akim@epita.fr>
23014
23015 Clean up the error reporting functions.
23016
23017 * src/report.c: New file.
23018 * src/report.h: Likewise.
23019 * src/Makefile.am: Adjust.
23020 * m4/error.m4: New file.
23021 * m4/Makefile.am: Adjust.
23022 * configure.in (jm_PREREQ_ERROR): Call it.
23023 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23024 Remove.
23025 (fatal, fatals): Remove. All callers use complain.c::fatal.
23026 (warn, warni, warns, warnss, warnss): Remove. All callers use
23027 complain.c::complain.
23028 (toomany): Remove, use fatal instead.
23029 * src/files.c (done): No argument, use complain_message_count.
23030 * src/main.c (main): Register `done' to `atexit'.
23031
23032 * src/getargs.c (usage): More `fputs', less `fprintf'.
23033
23034 2000-03-28 Akim Demaille <akim@epita.fr>
23035
23036 * lib/: New directory.
23037 * Makefile.am (SUBDIRS): Adjust.
23038 * configure.in: Adjust.
23039 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23040 useless.
23041 * src/alloca.c: Moved to lib/.
23042 * src/getopt.c: Likewise.
23043 * src/getopt1.c: Likewise.
23044 * src/getopt.h: Likewise.
23045 * src/ansi2knr.c: Likewise.
23046 * src/ansi2knr.1: Likewise.
23047 * src/Makefile.am: Adjust.
23048 * lib/Makefile.am: New file.
23049
23050 2000-03-28 Akim Demaille <akim@epita.fr>
23051
23052 * src/getargs.c (usage): Refresh the help message.
23053
23054 2000-03-17 Akim Demaille <akim@epita.fr>
23055
23056 * src/getopt1.c: Updated from textutils 2.0e
23057 * src/getopt.c: Likewise.
23058 * src/getopt.h: Likewise.
23059
23060 2000-03-17 Akim Demaille <akim@epita.fr>
23061
23062 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23063 the file name, not the whole `#line LINE FILE'.
23064
23065 2000-03-17 Akim Demaille <akim@epita.fr>
23066
23067 On syntax errors, report the token on which we choked.
23068
23069 * src/bison.s1 (yyparse): In the label yyerrlab, when
23070 YYERROR_VERBOSE, add yychar in msg.
23071
23072 2000-03-17 Akim Demaille <akim@epita.fr>
23073
23074 * src/reader.c (copy_at): New function.
23075 (copy_guard): Use it.
23076 (copy_action): Use it.
23077
23078 2000-03-17 Akim Demaille <akim@epita.fr>
23079
23080 Be kind to translators, save some useless translations.
23081
23082 * src/main.c (banner): New function.
23083 (fatal_banner): Use it.
23084 (warn_banner): Use it.
23085
23086 2000-03-17 Akim Demaille <akim@epita.fr>
23087
23088 * src/reader.c (copy_definition): Use copy_string and
23089 copy_comment. Removed now unused `match', `ended',
23090 `cplus_comment'.
23091 (copy_comment, copy_string): Moved, to be visible from
23092 copy_definition.
23093
23094 2000-03-17 Akim Demaille <akim@epita.fr>
23095
23096 * src/reader.c (copy_string): Declare `static inline'. No
23097 problems with inline, since it is checked by configure.
23098 (copy_comment): Likewise.
23099
23100 2000-03-17 Akim Demaille <akim@epita.fr>
23101
23102 * src/reader.c (packsymbols): Formatting changes.
23103
23104 2000-03-17 Akim Demaille <akim@epita.fr>
23105
23106 * src/reader.c (copy_comment): New function, factored out from:
23107 (copy_action): Use it. Removed now unused `match', `ended',
23108 `cplus_comment'.
23109 (copy_guard): Likewise.
23110
23111 2000-03-17 Akim Demaille <akim@epita.fr>
23112
23113 * src/reader.c (copy_string): New function, factored out from:
23114 (copy_action): Use it.
23115 (copy_guard): Likewise.
23116
23117 2000-03-17 Akim Demaille <akim@epita.fr>
23118
23119 Change the handling of @s so that they behave exactly like $s.
23120 There is now a pseudo variable @$ (readble and writable), location
23121 of the lhs of the rule (by default ranging from the location of
23122 the first symbol of the rhs, to the location of the last symbol,
23123 or, if the rhs is empty, YYLLOC).
23124
23125 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23126 yyval.
23127 (yyparse): When providing a default semantic action, provide a
23128 default location action.
23129 (after the $): No longer change `*YYLSP', just stack YYLOC the
23130 same way you stack YYVAL.
23131 * src/reader.c (read_declarations): Use warns.
23132 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23133 (copy_action, case '@'): Likewise.
23134 Use a standard error message, to save useless work from
23135 translators.
23136
23137 2000-03-17 Akim Demaille <akim@epita.fr>
23138
23139 * src/bison.s1: Formatting and cosmetics changes.
23140 * src/reader.c: Likewise.
23141 Update the Copyright notice.
23142
23143 2000-03-17 Akim Demaille <akim@epita.fr>
23144
23145 * src/bison.s1 (#line): All set to `#line' only, since the
23146 Makefile now handles them.
23147
23148 2000-03-16 Akim Demaille <akim@epita.fr>
23149
23150 * src/output.c (output_rule_data): Output the documentation of
23151 some of the tables.
23152 (Copyright notice): Update.
23153 Formatting changes.
23154
23155 2000-03-16 Akim Demaille <akim@epita.fr>
23156
23157 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23158 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23159 One `#if YYDEBUG' remains, since it uses variables which are
23160 defined only if `YYDEBUG != 0'.
23161
23162 2000-03-16 Akim Demaille <akim@epita.fr>
23163
23164 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23165 and related variables so that the similarities are highlighted.
23166
23167 2000-03-16 Akim Demaille <akim@epita.fr>
23168
23169 * src/bison.s1: Properly indent CPP directives.
23170
23171 2000-03-16 Akim Demaille <akim@epita.fr>
23172
23173 * src/bison.s1: Properly indent the `alloca' CPP section.
23174
23175 2000-03-16 Akim Demaille <akim@epita.fr>
23176
23177 Do not hard code values of directories in `configure.in'.
23178 Update the `configure' tool chain.
23179
23180 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23181 src/makefile.am.
23182 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23183 (AC_OUTPUT): Add m4/Makefile.
23184 Bump to bison 1.28a, 1.29 has never been released.
23185 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23186 handled via src/Makefile.am.
23187 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23188 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23189 autoheader.
23190 * Makefile.am (SUBDIRS): Add m4.
23191 (ACLOCAL_AM_FLAGS): New variable.
23192 (AUTOMAKE_OPTIONS): Add check-news.
23193 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23194 the proper line number and file name.
23195 (DEFS): Propagate the location of bison library files and of the
23196 locale files.
23197 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23198 builddir.
23199 * acinclude.m4: Remove, replaced by the directory m4.
23200 * m4/Makefile.am (EXTRA_DIST): New variable.
23201 * m4/gettext.m4: New file, from the fileutils.
23202 * m4/lcmessage.m4: Likewise
23203 * m4/progtest.m4: Likewise.
23204 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23205
23206 2000-03-10 Akim Demaille <akim@epita.fr>
23207
23208 * src/closure.c:
23209 Formatting changes of various comments.
23210 Respect the GNU coding standards at various places.
23211 Don't use `_()' when no translation is needed.
23212
23213 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23214
23215 * src/files.c:
23216 OS/2 honors TMPDIR environment variable.
23217
23218 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23219
23220 * doc/bison.texinfo: Tweaked spelling and grammar.
23221 Updated ISBN.
23222 Removed reference to price of printed copy.
23223 Mention BISON_SIMPLE and BISON_HAIRY.
23224
23225 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23226
23227 * configure.in, NEWS:
23228 Bison 1.29 released.
23229
23230 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23231
23232 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23233 Added reference card.
23234
23235 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23236
23237 * po/ru.po: Added Russian translation.
23238
23239 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23240
23241 * configure.in: Added Russian translation.
23242
23243 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23244
23245 * configure.in, NEWS, README:
23246 Released version 1.28.
23247
23248 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23249
23250 * src/system.h:
23251 Squashed redefinition warning on some systems.
23252
23253 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23254 Have configure build version string instead of relying on ANSI string
23255 concatentation.
23256
23257 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23258
23259 * po/POTFILES.in: Got rid of version.c.
23260
23261 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23262
23263 * acconfig.h, configure.in:
23264 Have configure build version string instead of relying on ANSI string
23265 concatentation.
23266
23267 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23268
23269 * doc/bison.1:
23270 Dropped mention of `+' for long-named options.
23271
23272 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23273
23274 * src/files.c: Added <unistd.h> for unlink().
23275
23276 * src/Makefile.am, src/system.h:
23277 I18n fixes.
23278
23279 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23280
23281 * README: Added a FAQ list.
23282
23283 * configure.in, acconfig.h:
23284 I18n fixes.
23285
23286 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23287
23288 * doc/FAQ, doc/Makefile.am:
23289 Added a FAQ list.
23290
23291 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23292
23293 * src/alloc.h, src/symtab.h, src/version.c:
23294 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23295
23296 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23297
23298 * src/.cvsignore, src/Makefile.am:
23299 Reorganized: sources in `src', documentation in `doc'.
23300
23301 * src/lex.c (literalchar):
23302 fixed the code for escaping double quotes (thanks
23303 Jonathan Czisny.)
23304
23305 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23306
23307 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23308 Adjusted paths to reflect directory reorganization.
23309
23310 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23311
23312 * doc/.cvsignore, doc/Makefile.am:
23313 Reorganized: sources in `src', documentation in `doc'.
23314
23315 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23316
23317 * configure.in:
23318 Updated AC_INIT file to reflect directory reorganization.
23319
23320 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23321 Reorganized: sources in `src', documentation in `doc'.
23322
23323 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23324
23325 * src/allocate.c:
23326 Don't declare calloc() and realloc() if not necessary.
23327
23328 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23329
23330 * configure.in, acconfig.h, acinclude.m4:
23331 Don't declare calloc() and realloc() if not necessary.
23332
23333 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23334
23335 * po/.cvsignore: Added i18n support.
23336
23337 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23338
23339 * acconfig.h, configure.in, Makefile.am:
23340 Added i18n support.
23341
23342 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23343
23344 * src/bison.s1: Fixed #line numbers.
23345
23346 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23347
23348 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23349 Added PO files from Translation Project.
23350
23351 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23352
23353 * Makefile.am:
23354 Added support for non-ANSI compilers (ansi2knr).
23355
23356 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23357
23358 * configure.in: Bumped version number to 1.27.
23359
23360 * Makefile.am:
23361 Added `bison.simple' to list of files removed by `make distclean'.
23362
23363 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23364
23365 * src/files.c, src/files.h:
23366 Defined locations of parser files in config.h instead of Makefile.
23367
23368 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23369
23370 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23371 Defined locations of parser files in config.h instead of Makefile.
23372
23373 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23374
23375 * Makefile.am:
23376 Removed inappropriate use of $< macro.
23377
23378 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23379
23380 * po/Makefile.in.in, po/POTFILES.in:
23381 Add `po' directory skeleton.
23382
23383 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23384
23385 * README: Document help-bison list.
23386
23387 * configure.in: Add check for mkstemp().
23388
23389 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23390
23391 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23392 Hush a few compiler warnings.
23393
23394 * src/files.c:
23395 Add tryclose(), which verifies that fclose was successful.
23396 Hush a couple of compiler warnings.
23397
23398 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23399
23400 * Makefile.am, OChangeLog:
23401 ChangeLog is now automatically generated. Include the old version as
23402 OChangeLog.
23403
23404 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23405
23406 * 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:
23407 Update FSF address.
23408
23409 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23410
23411 * doc/bison.texinfo: Fix formatting glitch.
23412
23413 * doc/bison.texinfo: Update FSF address.
23414
23415 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23416
23417 * acconfig.h: Update FSF address.
23418
23419 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23420
23421 * src/system.h:
23422 Don't define PACKAGE here, since config.h defines it.
23423
23424 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23425
23426 * src/reader.c: Update copyright date.
23427
23428 * src/main.c:
23429 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23430 favor of output directly to stderr (avoids buffer overruns).
23431
23432 * src/reader.c: Some checks for premature EOF.
23433
23434 * 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:
23435 Use prototypes if the compiler understands them.
23436
23437 * src/files.c: Honor TMPDIR on Unix hosts.
23438 Use prototypes if the compiler understands them.
23439
23440 * src/reader.c:
23441 Fix a couple of buffer overrun bugs.
23442 Use prototypes if the compiler understands them.
23443
23444 * src/system.h: Include unistd.h and ctype.h.
23445 Use #ifdef instead of #if for NLS symbols.
23446
23447 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23448
23449 * doc/bison.texinfo:
23450 Delete comment "consider using @set for edition number, etc..." since
23451 we now are doing so.
23452
23453 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23454
23455 * configure.in:
23456 Use prototypes if the compiler understands them.
23457
23458 * NEWS: Document 1.26 highlights.
23459
23460 * Makefile.am: Require Automake 1.3 or later.
23461
23462 * acconfig.h:
23463 Use prototypes if the compiler understands them.
23464
23465 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23466
23467 * src/version.c:
23468 Use VERSION symbol from automake for version number.
23469
23470 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23471
23472 * acconfig.h, configure.in, version.cin:
23473 Use VERSION symbol from automake for version number.
23474
23475 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23476
23477 * Makefile.am:
23478 Distribute original version of simple parser (bison.s1), not built
23479 version (bison.simple).
23480
23481 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23482
23483 * doc/bison.texinfo: Add info dir entry.
23484
23485 * doc/bison.texinfo:
23486 Let automake put version number into documentation.
23487
23488 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23489
23490 * src/bison.cld, src/build.com, src/vmshlp.mar:
23491 Add non-RCS files from /gd/gnu/bison.
23492
23493 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23494
23495 * doc/bison.1:
23496 Document the BISON_HAIRY and BISON_SIMPLE variables.
23497
23498 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23499
23500 * src/version.c: Build version.c automatically.
23501
23502 * src/reader.c:
23503 Fix token numbering (used to start at 258, not 257).
23504
23505 * src/system.h: Include config.h.
23506
23507 * src/getargs.c: Update bug report address.
23508
23509 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23510 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23511
23512 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23513
23514 * Makefile.am:
23515 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23516
23517 * configure.in, version.cin:
23518 Build version.c automatically.
23519
23520 * AUTHORS: Add AUTHORS file.
23521
23522 * README: Update bug report address.
23523
23524 * bison.simple:
23525 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23526
23527 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23528 Add automake stuff.
23529
23530 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23531
23532 * doc/bison.texinfo: Clean up some formatting.
23533
23534 1998-05-05 Richard Stallman <rms@gnu.org>
23535
23536 * doc/bison.texinfo:
23537 Explain better why to make a pure parser.
23538
23539 1998-01-05 Richard Stallman <rms@gnu.org>
23540
23541 * src/files.c (openfiles):
23542 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23543 find a temporary directory, if possible. Do not unlink files while
23544 they are open.
23545
23546 1997-08-25 Richard Stallman <rms@gnu.org>
23547
23548 * src/reader.c (stack_offset;):
23549 Change some warni to warns.
23550
23551 * src/lex.c (literalchar): Use warns, not warni.
23552
23553 1997-06-28 Richard Stallman <rms@gnu.org>
23554
23555 * src/bison.s1: Add a Bison version comment.
23556
23557 * src/main.c (fatal, warn, berror):
23558 Use program_name.
23559
23560 1997-06-28 Richard Stallman <rms@gnu.org>
23561
23562 * Makefile.in (bison_version): New variable.
23563 (dist): Use that variable.
23564 (bison.s1): Substitute the Bison version into bison.simple.
23565
23566 * bison.simple: Add a Bison version comment.
23567
23568 1997-06-18 Richard Stallman <rms@gnu.org>
23569
23570 * src/main.c (fatal, warn, berror):
23571 Make error messages standard.
23572 (toomany): Improve error message text.
23573
23574 * 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:
23575 new.h renamed to alloc.h.
23576
23577 1997-06-18 Richard Stallman <rms@gnu.org>
23578
23579 * Makefile.in: new.h renamed to alloc.h.
23580
23581 1997-05-24 Richard Stallman <rms@gnu.org>
23582
23583 * src/lex.c (literalchar):
23584 Fix the code for escaping \, " and '.
23585
23586 (lex): Avoid trouble when there are many chars
23587 to discard in a char literal with just several chars in it.
23588
23589 1997-05-17 Richard Stallman <rms@gnu.org>
23590
23591 * src/bison.s1:
23592 Use malloc, if using alloca is troublesome.
23593 (YYSTACK_USE_ALLOCA): New flag macro.
23594 Define it for some systems and compilers.
23595 (YYSTACK_ALLOC): New macro.
23596 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23597 If it was malloc'd, free it.
23598
23599 1997-05-17 Richard Stallman <rms@gnu.org>
23600
23601 * bison.simple:
23602 Use malloc, if using alloca is troublesome.
23603 (YYSTACK_USE_ALLOCA): New flag macro.
23604 Define it for some systems and compilers.
23605 (YYSTACK_ALLOC): New macro.
23606 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23607 If it was malloc'd, free it.
23608
23609 1997-04-23 Richard Stallman <rms@gnu.org>
23610
23611 * src/bison.s1:
23612 (alloca) [__hpux]: Always define as __builtin_alloca.
23613
23614 1997-04-23 Richard Stallman <rms@gnu.org>
23615
23616 * bison.simple:
23617 (alloca) [__hpux]: Always define as __builtin_alloca.
23618
23619 1997-04-22 Richard Stallman <rms@gnu.org>
23620
23621 * src/bison.s1:
23622 [__hpux]: Include alloca.h (right for HPUX 10)
23623 instead of declaring alloca (right for HPUX 9).
23624
23625 * src/bison.s1 (__yy_memcpy):
23626 Declare arg `count' as unsigned int.
23627 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23628
23629 1997-04-22 Richard Stallman <rms@gnu.org>
23630
23631 * bison.simple:
23632 [__hpux]: Include alloca.h (right for HPUX 10)
23633 instead of declaring alloca (right for HPUX 9).
23634
23635 * bison.simple (__yy_memcpy):
23636 Declare arg `count' as unsigned int.
23637 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23638
23639 1997-01-03 Richard Stallman <rms@gnu.org>
23640
23641 * src/allocate.c: [__STDC__ or _MSC_VER]:
23642 Declare calloc and realloc to return void *.
23643
23644 1997-01-02 Richard Stallman <rms@gnu.org>
23645
23646 * src/system.h:
23647 [_MSC_VER]: Include stdlib.h and process.h.
23648 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23649
23650 * src/main.c (main): Return FAILURE as a value.
23651 (printable_version): Declare arg as int, not char.
23652
23653 1997-01-02 Richard Stallman <rms@gnu.org>
23654
23655 * Makefile.in (dist):
23656 Explicitly check for symlinks, and copy them.
23657
23658 1996-12-19 Richard Stallman <rms@gnu.org>
23659
23660 * src/files.c:
23661 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23662
23663 1996-12-18 Paul Eggert <eggert@gnu.org>
23664
23665 * src/bison.s1 (yyparse):
23666 If __GNUC__ and YYPARSE_PARAM are both defined,
23667 declare yyparse to have a void * argument.
23668
23669 1996-12-18 Paul Eggert <eggert@gnu.org>
23670
23671 * bison.simple (yyparse):
23672 If __GNUC__ and YYPARSE_PARAM are both defined,
23673 declare yyparse to have a void * argument.
23674
23675 1996-12-17 Richard Stallman <rms@gnu.org>
23676
23677 * src/reduce.c (nbits): Add some casts.
23678
23679 1996-08-12 Richard Stallman <rms@gnu.org>
23680
23681 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23682
23683 1996-08-12 Richard Stallman <rms@gnu.org>
23684
23685 * bison.simple: Test _MSDOS as well as _MSDOS_.
23686
23687 1996-07-31 Richard Stallman <rms@gnu.org>
23688
23689 * src/bison.s1:
23690 [__sun && __i386]: Include alloca.h.
23691
23692 1996-07-31 Richard Stallman <rms@gnu.org>
23693
23694 * bison.simple:
23695 [__sun && __i386]: Include alloca.h.
23696
23697 1996-07-30 Richard Stallman <rms@gnu.org>
23698
23699 * src/bison.s1: Comment change.
23700
23701 * src/bison.s1: Test _MSDOS_, not MSDOS.
23702
23703 1996-07-30 Richard Stallman <rms@gnu.org>
23704
23705 * bison.simple: Comment change.
23706
23707 * bison.simple: Test _MSDOS_, not MSDOS.
23708
23709 1996-06-01 Richard Stallman <rms@gnu.org>
23710
23711 * 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:
23712 Insert `_' macro around many string constants.
23713
23714 * src/main.c:
23715 Insert `_' macro around many string constants.
23716
23717 (main): Call setlocale, bindtextdomain and textdomain.
23718
23719 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23720 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23721 [ENABLE_NLS]: Include libintl.h.
23722 [ENABLE_NLS] (gettext): Define.
23723 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23724 (N_, PACKAGE, LOCALEDIR): New macros.
23725
23726 1996-06-01 Richard Stallman <rms@gnu.org>
23727
23728 * POTFILES.in: New file.
23729
23730 * Makefile.in (allocate.o):
23731 Define target explicitly.
23732
23733 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23734 (LDFLAGS): Set to @LDFLAGS@.
23735 (configure): Run autoconf only if preceding `cd' succeeds.
23736 (bison.s1): Redirect output to temporary file then move the
23737 temporary to the target, rather than redirecting directly to bison.s1.
23738 (clean): Remove config.status and config.log.
23739 (distclean): Don't remove config.status here.
23740
23741 1996-05-12 Richard Stallman <rms@gnu.org>
23742
23743 * src/bison.s1:
23744 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23745
23746 1996-05-12 Richard Stallman <rms@gnu.org>
23747
23748 * bison.simple:
23749 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23750
23751 1996-05-11 Richard Stallman <rms@gnu.org>
23752
23753 * src/bison.s1 (__yy_memcpy):
23754 Really reorder the args, as was supposedly done on Feb 14 1995.
23755 (yyparse): Calls changed accordingly.
23756
23757 1996-05-11 Richard Stallman <rms@gnu.org>
23758
23759 * Makefile.in (dist): Don't use $(srcdir).
23760
23761 * bison.simple (__yy_memcpy):
23762 Really reorder the args, as was supposedly done on Feb 14 1995.
23763 (yyparse): Calls changed accordingly.
23764
23765 1996-01-27 Richard Stallman <rms@gnu.org>
23766
23767 * src/output.c (output_rule_data):
23768 Test YYERROR_VERBOSE in the conditional
23769 around the definition of ttyname.
23770
23771 1995-12-29 Richard Stallman <rms@gnu.org>
23772
23773 * src/bison.s1:
23774 Fix line numbers in #line commands.
23775
23776 1995-12-29 Richard Stallman <rms@gnu.org>
23777
23778 * bison.simple:
23779 Fix line numbers in #line commands.
23780
23781 1995-12-27 Richard Stallman <rms@gnu.org>
23782
23783 * src/bison.s1 (YYPARSE_PARAM_DECL):
23784 In C++, make it always null.
23785 (YYPARSE_PARAM_ARG): New macro.
23786 (yyparse): Use YYPARSE_PARAM_ARG.
23787
23788 1995-12-27 Richard Stallman <rms@gnu.org>
23789
23790 * bison.simple (YYPARSE_PARAM_DECL):
23791 In C++, make it always null.
23792 (YYPARSE_PARAM_ARG): New macro.
23793 (yyparse): Use YYPARSE_PARAM_ARG.
23794
23795 1995-11-29 Richard Stallman <rms@gnu.org>
23796
23797 * doc/bison.texinfo:
23798 Describe literal string tokens, %raw, %no_lines, %token_table.
23799
23800 1995-11-29 Daniel Hagerty <hag@gnu.org>
23801
23802 * doc/bison.texinfo: Fixed update date
23803
23804 1995-10-16 Richard Stallman <rms@gnu.org>
23805
23806 * src/version.c: Version 1.25.
23807
23808 1995-10-16 Richard Stallman <rms@gnu.org>
23809
23810 * NEWS: *** empty log message ***
23811
23812 1995-10-16 Richard Stallman <rms@gnu.org>
23813
23814 * doc/bison.1, doc/bison.rnh:
23815 Add new options.
23816
23817 1995-10-15 Richard Stallman <rms@gnu.org>
23818
23819 * src/vmsgetargs.c, src/getargs.c:
23820 Added -n, -k, and -raw switches.
23821 (noparserflag, toknumflag, rawtoknumflag): New variables.
23822
23823 * src/symtab.h (SALIAS):
23824 New #define for adding aliases to %token.
23825 (struct bucket): Added `alias' field.
23826
23827 * src/reduce.c (reduce_grammar):
23828 Revise error message.
23829 (print_notices): Remove final `.' from error message.
23830
23831 * src/reader.c (reader_output_yylsp):
23832 New function.
23833 (readgram): Use `#if 0' around code that accepted %command
23834 inside grammar rules: The documentation doesn't allow it,
23835 and it will fail since the %command processors scan for the next %.
23836 (parse_token_decl): Extended the %token
23837 declaration to allow a multi-character symbol as an alias.
23838 (parse_thong_decl): New function.
23839 (read_declarations): Added %thong declarations.
23840 (read_declarations): Handle NOOP to deal with allowing
23841 % declarations as another means to specify the flags.
23842 (readgram): Allow %prec prior to semantics embedded in a rule.
23843 (skip_to_char, read_declarations, copy_definition)
23844 (parse_token_decl, parse_start_decl, parse_type_decl)
23845 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23846 (get_type_name, copy_guard, copy_action, readgram)
23847 (get_type, packsymbols): Revised most error messages.
23848 Changed `fatal' to `warnxxx' to avoid aborting for error.
23849 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23850 (read_declarations): Improve the error message for
23851 an invalid character. Do not abort.
23852 (read_declarations, copy_guard, copy_action): Use
23853 printable_version to avoid unprintable characters in printed output.
23854 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23855 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23856 Allow the type of a non-terminal can be given
23857 more than once, as long as all specifications give the same type.
23858
23859 * src/output.c:
23860 (output_headers, output_trailers, output, output_gram)
23861 (output_rule_data): Implement noparserflag variable.
23862 Implement toknumflag variable.
23863 (output): Call reader_output_yylsp to output LTYPESTR.
23864
23865 * src/main.c (main):
23866 If reader sees an error, don't process the grammar.
23867 (fatals): Updated to not use VARARGS1.
23868 (printable_version, int_to_string, warn, warni, warns, warnss)
23869 (warnsss): New error reporting functions. Avoid abort for error.
23870
23871 * src/lex.h:
23872 Added THONG and NOOP for alias processing.
23873 Added SETOPT for the new code that allows setting options with %flags.
23874
23875 * src/lex.c:
23876 Include getopt.h. Add some extern decls.
23877 (safegetc): New function to deal with EOF gracefully.
23878 (literalchar); new function to deal with reading \ escapes.
23879 (lex): Use literalchar.
23880 (lex): Implemented "..." tokens.
23881 (literalchar, lex, parse_percent_token): Made tokenbuffer
23882 always contain the token. This includes growing the token
23883 buffer while reading an integer.
23884 (parse_percent_token): Replaced if-else statement with percent_table.
23885 (parse_percent_token): Added % declarations as another
23886 way to specify the flags -n, -l, and -r. Also added hooks for
23887 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23888 major changes to files.c.
23889 (lex) Retain in the incoming stream a character following
23890 an incorrect '/'.
23891 (skip_white_space, lex): Revised most error messages
23892 and changed fatal to warn to avoid aborting.
23893 (percent_table): Added %thong declarations.
23894
23895 * src/gram.h: Comment changes.
23896
23897 * src/files.c (openfiles, open_extra_files, done):
23898 Add faction flag
23899 and actfile file. Handle noparserflag. Both for -n switch.
23900
23901 * src/conflicts.c (resolve_sr_conflict):
23902 Remove use of alloca.
23903
23904 1995-06-01 Jim Meyering <meyering@gnu.org>
23905
23906 * doc/bison.texinfo: *** empty log message ***
23907
23908 1995-05-06 Richard Stallman <rms@gnu.org>
23909
23910 * src/bison.s1: Comment change.
23911
23912 1995-05-06 Richard Stallman <rms@gnu.org>
23913
23914 * bison.simple: Comment change.
23915
23916 1995-05-03 Richard Stallman <rms@gnu.org>
23917
23918 * src/version.c: Version now 1.24.
23919
23920 * src/bison.s1: Change distribution terms.
23921
23922 * src/version.c: Version now 1.23.
23923
23924 1995-05-03 Richard Stallman <rms@gnu.org>
23925
23926 * doc/bison.texinfo:
23927 Rewrite "Conditions for Using Bison".
23928 Update version to 1.24.
23929
23930 1995-05-03 Richard Stallman <rms@gnu.org>
23931
23932 * bison.simple: Change distribution terms.
23933
23934 1995-02-23 Richard Stallman <rms@gnu.org>
23935
23936 * src/files.c: Test __VMS_POSIX as well as VMS.
23937
23938 1995-02-14 Jim Meyering <meyering@gnu.org>
23939
23940 * src/bison.s1 (__yy_memcpy):
23941 Renamed from __yy_bcopy to avoid
23942 confusion. Reverse FROM and TO arguments to be consistent with
23943 those of memcpy.
23944
23945 1995-02-14 Jim Meyering <meyering@gnu.org>
23946
23947 * bison.simple (__yy_memcpy):
23948 Renamed from __yy_bcopy to avoid
23949 confusion. Reverse FROM and TO arguments to be consistent with
23950 those of memcpy.
23951
23952 1994-11-10 David J. MacKenzie <djm@gnu.org>
23953
23954 * NEWS: reformat
23955
23956 * NEWS: New file.
23957
23958 * Makefile.in (DISTFILES): Include NEWS.
23959
23960 * Makefile.in (DISTFILES):
23961 Include install-sh, not install.sh.
23962
23963 * configure.in: Update to Autoconf v2 macro names.
23964
23965 1994-10-05 David J. MacKenzie <djm@gnu.org>
23966
23967 * Makefile.in: fix typo
23968
23969 * Makefile.in (prefix, exec_prefix):
23970 Let configure set them.
23971
23972 1994-09-28 David J. MacKenzie <djm@gnu.org>
23973
23974 * Makefile.in: Set datadir to $(prefix)/share.
23975
23976 1994-09-15 Richard Stallman <rms@gnu.org>
23977
23978 * src/bison.s1:
23979 Update copyright notice and GPL version.
23980
23981 1994-09-15 Richard Stallman <rms@gnu.org>
23982
23983 * bison.simple:
23984 Update copyright notice and GPL version.
23985
23986 1994-07-12 Richard Stallman <rms@gnu.org>
23987
23988 * src/reduce.c, src/reader.c:
23989 entered into RCS
23990
23991 1994-05-05 David J. MacKenzie <djm@gnu.org>
23992
23993 * Makefile.in: entered into RCS
23994
23995 1994-03-26 Richard Stallman <rms@gnu.org>
23996
23997 * src/bison.s1: entered into RCS
23998
23999 1994-03-26 Richard Stallman <rms@gnu.org>
24000
24001 * bison.simple: entered into RCS
24002
24003 1994-03-25 Richard Stallman <rms@gnu.org>
24004
24005 * src/main.c: entered into RCS
24006
24007 1994-03-24 Richard Stallman <rms@gnu.org>
24008
24009 * src/conflicts.c: entered into RCS
24010
24011 1994-01-02 Richard Stallman <rms@gnu.org>
24012
24013 * Makefile.in: *** empty log message ***
24014
24015 1993-11-21 Richard Stallman <rms@gnu.org>
24016
24017 * src/bison.s1: *** empty log message ***
24018
24019 1993-11-21 Richard Stallman <rms@gnu.org>
24020
24021 * doc/bison.texinfo: entered into RCS
24022
24023 * doc/bison.texinfo: *** empty log message ***
24024
24025 1993-11-21 Richard Stallman <rms@gnu.org>
24026
24027 * bison.simple: *** empty log message ***
24028
24029 1993-10-25 David J. MacKenzie <djm@gnu.org>
24030
24031 * doc/bison.texinfo: *** empty log message ***
24032
24033 1993-10-19 Richard Stallman <rms@gnu.org>
24034
24035 * src/bison.s1: *** empty log message ***
24036
24037 1993-10-19 Richard Stallman <rms@gnu.org>
24038
24039 * bison.simple: *** empty log message ***
24040
24041 1993-10-14 Richard Stallman <rms@gnu.org>
24042
24043 * src/bison.s1: *** empty log message ***
24044
24045 1993-10-14 Richard Stallman <rms@gnu.org>
24046
24047 * bison.simple: *** empty log message ***
24048
24049 1993-09-14 David J. MacKenzie <djm@gnu.org>
24050
24051 * doc/bison.texinfo: *** empty log message ***
24052
24053 1993-09-13 Noah Friedman <friedman@gnu.org>
24054
24055 * Makefile.in: *** empty log message ***
24056
24057 1993-09-10 Richard Stallman <rms@gnu.org>
24058
24059 * src/conflicts.c: *** empty log message ***
24060
24061 * src/system.h: entered into RCS
24062
24063 1993-09-10 Richard Stallman <rms@gnu.org>
24064
24065 * doc/bison.1: entered into RCS
24066
24067 1993-09-06 Noah Friedman <friedman@gnu.org>
24068
24069 * src/version.c: entered into RCS
24070
24071 1993-09-06 Noah Friedman <friedman@gnu.org>
24072
24073 * Makefile.in: *** empty log message ***
24074
24075 1993-07-30 David J. MacKenzie <djm@gnu.org>
24076
24077 * Makefile.in: *** empty log message ***
24078
24079 1993-07-24 Richard Stallman <rms@gnu.org>
24080
24081 * src/bison.s1: *** empty log message ***
24082
24083 1993-07-24 Richard Stallman <rms@gnu.org>
24084
24085 * bison.simple: *** empty log message ***
24086
24087 1993-07-08 David J. MacKenzie <djm@gnu.org>
24088
24089 * Makefile.in: *** empty log message ***
24090
24091 1993-07-04 Richard Stallman <rms@gnu.org>
24092
24093 * src/bison.s1: *** empty log message ***
24094
24095 1993-07-04 Richard Stallman <rms@gnu.org>
24096
24097 * bison.simple: *** empty log message ***
24098
24099 1993-06-26 David J. MacKenzie <djm@gnu.org>
24100
24101 * src/getargs.c: entered into RCS
24102
24103 1993-06-26 David J. MacKenzie <djm@gnu.org>
24104
24105 * doc/bison.texinfo: *** empty log message ***
24106
24107 * doc/bison.1: New file.
24108
24109 1993-06-25 Richard Stallman <rms@gnu.org>
24110
24111 * src/getargs.c: New file.
24112
24113 1993-06-16 Richard Stallman <rms@gnu.org>
24114
24115 * src/bison.s1: *** empty log message ***
24116
24117 1993-06-16 Richard Stallman <rms@gnu.org>
24118
24119 * bison.simple: *** empty log message ***
24120
24121 1993-06-03 Richard Stallman <rms@gnu.org>
24122
24123 * src/bison.s1: New file.
24124
24125 1993-06-03 Richard Stallman <rms@gnu.org>
24126
24127 * doc/bison.texinfo: *** empty log message ***
24128
24129 1993-06-03 Richard Stallman <rms@gnu.org>
24130
24131 * bison.simple: New file.
24132
24133 1993-05-19 Richard Stallman <rms@gnu.org>
24134
24135 * doc/bison.texinfo: New file.
24136
24137 1993-05-07 Noah Friedman <friedman@gnu.org>
24138
24139 * Makefile.in: *** empty log message ***
24140
24141 1993-04-28 Noah Friedman <friedman@gnu.org>
24142
24143 * src/reader.c: *** empty log message ***
24144
24145 1993-04-23 Noah Friedman <friedman@gnu.org>
24146
24147 * src/alloc.h: entered into RCS
24148
24149 1993-04-20 David J. MacKenzie <djm@gnu.org>
24150
24151 * src/version.c: *** empty log message ***
24152
24153 * src/files.c, src/allocate.c:
24154 entered into RCS
24155
24156 * src/reader.c: *** empty log message ***
24157
24158 * src/lex.c: entered into RCS
24159
24160 * src/conflicts.c: New file.
24161
24162 * src/symtab.c: entered into RCS
24163
24164 * src/alloc.h: New file.
24165
24166 * src/LR0.c: entered into RCS
24167
24168 1993-04-18 Noah Friedman <friedman@gnu.org>
24169
24170 * src/reader.c: New file.
24171
24172 * src/version.c: *** empty log message ***
24173
24174 1993-04-18 Noah Friedman <friedman@gnu.org>
24175
24176 * Makefile.in: *** empty log message ***
24177
24178 1993-04-17 Noah Friedman <friedman@gnu.org>
24179
24180 * Makefile.in: *** empty log message ***
24181
24182 1993-04-15 Richard Stallman <rms@gnu.org>
24183
24184 * src/main.c, src/files.c:
24185 New file.
24186
24187 1993-04-15 Noah Friedman <friedman@gnu.org>
24188
24189 * configure.in: entered into RCS
24190
24191 * configure.in: *** empty log message ***
24192
24193 * configure.in: New file.
24194
24195 1993-04-14 Richard Stallman <rms@gnu.org>
24196
24197 * Makefile.in: New file.
24198
24199 1993-04-13 Richard Stallman <rms@gnu.org>
24200
24201 * src/version.c: New file.
24202
24203 1993-03-25 Richard Stallman <rms@gnu.org>
24204
24205 * src/output.c: entered into RCS
24206
24207 1992-09-25 Richard Stallman <rms@gnu.org>
24208
24209 * configure.bat: entered into RCS
24210
24211 1992-06-22 Richard Stallman <rms@gnu.org>
24212
24213 * src/vmsgetargs.c: entered into RCS
24214
24215 1992-06-22 Richard Stallman <rms@gnu.org>
24216
24217 * doc/bison.rnh: entered into RCS
24218
24219 1992-04-20 David J. MacKenzie <djm@gnu.org>
24220
24221 * README: entered into RCS
24222
24223 1992-01-22 Richard Stallman <rms@gnu.org>
24224
24225 * src/machine.h: entered into RCS
24226
24227 1991-12-21 Richard Stallman <rms@gnu.org>
24228
24229 * src/lalr.c, src/closure.c:
24230 entered into RCS
24231
24232 1991-12-20 Richard Stallman <rms@gnu.org>
24233
24234 * src/state.h: entered into RCS
24235
24236 1991-12-18 Richard Stallman <rms@gnu.org>
24237
24238 * src/print.c, src/nullable.c, src/derives.c:
24239 entered into RCS
24240
24241 1991-11-03 David J. MacKenzie <djm@gnu.org>
24242
24243 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24244 entered into RCS
24245
24246 1988-09-09 Richard Stallman <rms@gnu.org>
24247
24248 * src/bison.hairy: entered into RCS
24249
24250 1987-12-16 Richard Stallman <rms@gnu.org>
24251
24252 * REFERENCES: entered into RCS
24253
24254
24255 -----
24256
24257 Copyright (C) 1987-1988, 1991-2012 Free Software Foundation,
24258 Inc.
24259
24260 Copying and distribution of this file, with or without
24261 modification, are permitted provided the copyright notice and this
24262 notice are preserved.