]> git.saurik.com Git - bison.git/blob - ChangeLog
maint: avoid "the the"
[bison.git] / ChangeLog
1 2012-01-15 Jim Meyering <meyering@redhat.com>
2
3 maint: avoid "the the"
4 * djgpp/README.in: s/the the/the/
5 * src/parse-gram.c (lloc_default): Likewise.
6 * src/parse-gram.y (lloc_default): Likewise, and remove a
7 trailing space.
8
9 2012-01-13 Jim Meyering <meyering@redhat.com>
10
11 build: avoid warning from coverity about lbitset_elt_find
12 * lib/lbitset.c (lbitset_elt_find): Remove unnecessary test of "elt",
13 at a point where we know it is non-NULL, due to prior dereference.
14
15 2012-01-13 Akim Demaille <akim@lrde.epita.fr>
16
17 maint: factor copyright year.
18 * configure.ac: Use $PACKAGE_COPYRIGHT_YEAR instead of repeating it.
19
20 2012-01-13 Akim Demaille <akim@lrde.epita.fr>
21
22 maint: catch missing gnulib macros.
23 * configure.ac: Add m4_pattern_forbid.
24
25 2012-01-11 Tim Landscheidt <tim@tim-landscheidt.de>
26
27 java: remove used variable.
28 * data/lalr1.java (yyresult): remove, unused.
29
30 2012-01-11 Akim Demaille <demaille@gostai.com>
31
32 scanner: fix typo.
33 * src/scan-skel.l (@`): s/emtpy/empty/.
34 Reported by Tim Landscheidt.
35
36 2012-01-06 Jim Meyering <meyering@redhat.com>
37
38 build: avoid warnings about set-but-not-used variables
39 * lib/bitset_stats.c (bitset_stats_list): Remove declaration
40 and set of unused local, "type".
41 * lib/ebitset.c (ebitset_init): Likewise, for "size".
42 * lib/lbitset.c (lbitset_not): Likewise, for "elt".
43
44 2011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
45
46 tests: add -pedantic for --enable-gcc-warnings.
47 This should help to avoid some portability problems. For example,
48 it would have revealed the empty unions fixed by the last patch
49 * configure.ac (WARN_CFLAGS_TESTS, WARN_CXXFLAGS_TEST): Implement.
50 * tests/synclines.at (AT_TEST_SYNCLINE): Avoid -pedantic warning
51 about an empty translation unit.
52
53 2011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
54
55 tests: fix empty unions.
56 Empty unions are not accepted by the ISO C99 grammar or by at
57 least some versions of Sun Studio. Reported by Wolfgang S. Kechel
58 at
59 <http://lists.gnu.org/archive/html/bug-bison/2011-08/msg00003.html>.
60 * NEWS (2.5.1): Document fix.
61 * THANKS (Wolfgang S. Kechel): Add.
62 * tests/existing.at (GNU Cim Grammar)
63 (GNU pic (Groff 1.18.1) Grammar.): Remove empty %union.
64
65 2011-07-10 Joel E. Denny <joeldenny@joeldenny.org>
66
67 build: avoid YACC typo inherited from Autoconf.
68 The typo shows up in the `configure --help' output. Reported by
69 W.C.A. Wijngaards and Paul Eggert at
70 <http://lists.gnu.org/archive/html/bug-bison/2011-07/msg00000.html>.
71 * README-hacking (Release Procedure): Remind about updating
72 maintainer tools before a release.
73 * THANKS (W.C.A. Wijngaards): Add.
74 * configure.ac (AC_PREREQ): Set to 2.68, which fixes the YACC
75 typo.
76
77 2011-07-10 Joel E. Denny <joeldenny@joeldenny.org>
78
79 build: create xz instead of bzip2 tarballs.
80 Suggested by Jim Meyering at
81 <http://lists.gnu.org/archive/html/bug-bison/2011-06/msg00012.html>.
82 * README-hacking (Release Procedure): Update example.
83 * configure.ac (AM_INIT_AUTOMAKE): Replace dist-bzip2 with
84 dist-xz.
85
86 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
87
88 doc: clean up references to `Locations Overview'.
89 * doc/bison.texinfo (Locations Overview): Rename node to...
90 (Locations): ... this, which is its section name. Update menus to
91 match that and not to use the title `Tracking Locations', which is
92 a different section.
93
94 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
95
96 doc: clean up references to `Tracking Locations'.
97 * doc/bison.texinfo (Locations): Rename node to...
98 (Tracking Locations): ... this, which is its section name, and
99 update all cross references. The trouble is that there is another
100 node about locations. Its section name is `Locations', which was
101 easily confused with the node name of this node. Moreover, its
102 node name is `Locations Overview', which was mistakenly used to
103 label some cross references to this node.
104
105 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
106
107 doc: clean up `Named References' a little.
108 * doc/bison.texinfo (Named References): Rename section to match
109 the node name, and update all cross references. Don't use the
110 acronyms RHS and LHS given that we don't expand them anywhere in
111 the manual. Try to use @samp and @code properly. Mention that
112 named references are experimental as we've already stated in NEWS.
113 (Destructor Decl): Expand the only remaining use of RHS or LHS.
114
115 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
116
117 doc: motivate named references.
118 Suggested by Hans Aberg at
119 <http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
120 * doc/bison.texinfo (Named References): Explain briefly how
121 they're better than the traditional positional references.
122
123 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
124
125 doc: discuss named references after locations.
126 Reported by Hans Aberg at
127 <http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
128 * NEWS (2.5.1): Document.
129 * doc/bison.texinfo (Named References): Because it discusses
130 locations in addition to semantic values, move this subsection out
131 of the section `Defining Language Semantics', where locations have
132 not yet been introduced, to be a new section after the following
133 section, `Tracking Locations'.
134
135 2011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
136
137 Prepare for the possibility of a 2.5.1 release.
138 * NEWS (2.5.1): New heading.
139
140 2011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
141
142 Version 2.5.
143 * NEWS (2.5): Set date.
144
145 2011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
146
147 Don't use IF_LINT in Bison sources.
148 It creates unnecessary differences between the sources that Bison
149 maintainers build and test (given that maintainers normally
150 configure with --enable-gcc-warnings) and the sources that Bison
151 users build. Instead, use PACIFY_CC, which doesn't. This change
152 fixes compiler warnings reported by Tys Lefering at
153 <http://lists.gnu.org/archive/html/bison-patches/2011-05/msg00004.html>.
154 * configure.ac: Don't AC_DEFINE lint regardless of the configure
155 options. This change affects imported gnulib sources, where
156 IF_LINT still appears and depends on lint.
157 * src/scan-gram.l, src/scan-skel.l: Replace uses of IF_LINT with
158 PACIFY_CC.
159 * src/system.h (IF_LINT): Remove cpp macro.
160 (PACIFY_CC): New cpp macro.
161
162 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
163
164 Fix precedence for end token.
165 Since Bison 2.3b, which restored the ability of precedence
166 directives to assign user token numbers, doing so for user token
167 number 0 has produced an assertion failure.
168 * NEWS (2.5): Document fix.
169 * src/symtab.c (symbol_user_token_number_set): In the case of the
170 end token, don't decrement ntokens if it was never incremented.
171 * tests/regression.at (Token number in precedence declaration):
172 Extend.
173
174 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
175
176 Prepare for 2.5 release.
177 * NEWS (2.5_rc1): Rename back to...
178 (2.5): ... this, and unset date.
179
180 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
181
182 Version 2.5_rc1.
183 * NEWS (2.5): Rename to...
184 (2.5_rc1): ... this, and set date.
185
186 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
187
188 Pacify -DGNULIB_POSIXCHECK.
189 * bootstrap.conf (gnulib_modules): Add all modules suggested by
190 -DGNULIB_POSIXCHECK.
191 * src/files.c (file_name_split)
192 * src/getargs.c (getargs)
193 * src/location.c (boundary_set_from_string)
194 * src/output.c (token_definitions_output, output_skeleton)
195 * src/parse-gram.y (prologue_declaration)
196 * src/scan-gram.l (handle_syncline)
197 * src/symtab.c (symbol_new): Use mbschr and mbsrchr instead of
198 strchr and strrchr. In the cases of command-line options, file
199 names, and thus locations, functionality may be improved. In the
200 case of symbol names, there should be no functional difference as
201 all characters are ASCII, so the intended benefit is just warning
202 suppression.
203
204 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
205
206 * NEWS (2.5): Fix minor typos.
207
208 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
209
210 doc: clean up quotation style in NEWS.
211 * NEWS (2.5): For multi-character tokens in example grammar rules,
212 use "token" not 'token'. In English, use a consistent quotation
213 style; we might as well follow the precedent seen in info pages:
214 `quote' not "quote".
215
216 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
217
218 tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
219 Reported by Jim Meyering at
220 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
221 * tests/actions.at
222 (Default %printer and %destructor for mid-rule values): Define
223 YYLLOC_DEFAULT so that it uses its Rhs argument.
224
225 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
226
227 glr.c: omit yyresolveLocations when locations are disabled.
228 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
229 about yyresolveLocations's local yyrhsloc. When locations are
230 enabled, there's no such warning because YYLLOC_DEFAULT then uses
231 yyrhsloc. Reported by Jim Meyering at
232 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
233 * data/glr.c (yyresolveLocations): Omit definition when locations
234 are disabled.
235 (yyresolveValue): Omit yyresolveLocations invocation when
236 locations are disabled.
237
238 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
239
240 gnulib, autoconf: update.
241 * README-hacking (Updating a submodule): Give advice on how to
242 determine the versions of gnulib and autoconf to which we should
243 update.
244 (Release Procedure): Note that submodules should be updated.
245 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
246 suggested in updated gnulib NEWS.
247 * gnulib: Choose a stable snapshot according to advice in Bison's
248 README-hacking.
249 * po/POTFILES.in (lib/pipe.c): Rename to...
250 (lib/spawn-pipe.c): ... this.
251 * src/output.c: Update to include spawn-pipe.h.
252 * submodules/autoconf: Update to latest for improvement in m4.m4
253 that excludes M4 with buggy strstr. The only other changes to
254 files that we use are copyright updates.
255
256 2011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
257
258 Fix missing updates to GPLv3.
259 Reported by Tys Lefering at
260 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
261 * src/print-xml.c, src/print-xml.h: In these files.
262
263 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
264
265 Add -Wconflicts-sr and -Wconflicts-rr.
266 Thus, conflict reports are now affected by -Werror and -Wnone
267 (unless %expect or %expect-rr is specified). Reported by George
268 Neuner at
269 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
270 * NEWS (2.5): Document.
271 * doc/bison.texinfo (Bison Options): Document.
272 * src/complain.c, src/complain.h (set_warning_issued): Export
273 function.
274 * src/conflicts.c (conflicts_print): Suppress conflict report
275 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
276 conflicts as errors if -Werror.
277 * src/getargs.c (warnings_flag): Initialize with
278 warnings_conflicts_sr and warnings_conflicts_rr as well.
279 (warnings_args, warnings_types): Add entries for
280 warnings_conflicts_sr and warnings_conflicts_rr.
281 (usage): Update.
282 * src/getargs.h (enum warnings): Add entries for
283 warnings_conflicts_sr and warnings_conflicts_rr.
284 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
285 group.
286 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
287 conflict report can produce a "warnings being treated as errors"
288 message. Also, check that stderr is now fully scrubbed by -Wnone
289 when the exit status is 0.
290
291 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
292
293 Pacify maintainer-check-posix.
294 Adding command-line options after the grammar file name is not
295 permitted, so disable checks that do that when
296 maintainer-check-posix is running.
297 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
298 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
299 remove an unnecessary m4_if.
300
301 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
302
303 Add -Wother so -Wnone suppresses all warnings.
304 Reported by George Neuner at
305 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
306 * NEWS (2.5): Document.
307 * THANKS (George Neuner): Add.
308 * doc/bison.texinfo (Bison Options): Document.
309 * src/complain.c, src/complain.h
310 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
311 (midrule_value_at): New warning function, similar to yacc_at in
312 that it's controlled by its own warning category.
313 * src/getargs.c (warnings_flag): Initialize to warnings_other.
314 (warnings_args, warnings_types): Add entry for warnings_other.
315 (usage): Update.
316 * src/getargs.h (enum warnings): Add entry for warnings_other.
317 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
318 don't print useless rules.
319 * src/reader.c (symbol_should_be_used): Rather than adjusting the
320 return value based on whether midrule value warnings are enabled,
321 accept a new parameter for telling the caller whether true is
322 being returned for a potential midrule warning.
323 (grammar_rule_check): Use midrule_value_at for midrule value
324 warnings, and continue to use warn_at for all other warnings. Let
325 them check whether the warnings are enabled.
326 * tests/local.at (AT_BISON_CHECK): Update documentation.
327 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
328 disable all warnings exercised in the test suite.
329
330 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
331
332 Don't let -Wnone disable -Werror.
333 Discussed at
334 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
335 * NEWS (2.5): Document.
336 * src/getargs.c (flags_argmatch): Accept a new argument that
337 specifies what flags "all" and thus "none" affect.
338 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
339 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
340 New test group.
341
342 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
343
344 * NEWS (2.5): Document fix for -Wno-CATEGORY.
345
346 2008-11-21 Di-an Jan <dianj@freeshell.org>
347
348 Implement no-XXX arguments for --warnings, --report, --trace.
349 * src/getargs.c (flags_argmatch): Handles no-XXX.
350 Fix typo in doxygen comment.
351
352 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
353
354 doc: fix confusing citation of LAC publication.
355 Suggested by Akim Demaille.
356 * doc/bison.texinfo (LAC): Here.
357
358 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
359
360 lr.default-reductions: rename "full" value to "most".
361 Unlike "consistent" and "accepting", "full" doesn't answer the
362 question of "which states".
363 * doc/bison.texinfo (%define Summary): Update.
364 (Default Reductions): Update.
365 * src/print.c (print_reductions): Update.
366 * src/reader.c (prepare_percent_define_front_end_variables):
367 Update.
368 * src/tables.c (action_row): Update.
369 * tests/input.at (%define enum variables): Update.
370 * tests/reduce.at (%define lr.default-reductions): Update.
371
372 2011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
373
374 * src/parse-gram.c, src/parse-gram.h: Regenerate.
375
376 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
377
378 named references: fix double free.
379 In `rhs[name]: "a" | "b"', do not free "name" twice.
380 Reported by Tys Lefering.
381 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
382 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
383 * src/parse-gram.y (current_lhs): Rename as...
384 (current_lhs_symbol): this.
385 (current_lhs): New function. Use it to free the current lhs
386 named reference.
387 * src/reader.c: Bind lhs to a copy of the current named reference.
388 * src/symlist.c: Rely on free (0) being valid.
389 * tests/named-refs.at: Test this.
390
391 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
392
393 tests: style changes.
394 * tests/named-refs.at (Redundant words in LHS brackets)
395 (Unresolved references): here.
396
397 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
398
399 java: fix parser tracing bug.
400 * NEWS (2.5): Document.
401 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
402 element.
403
404 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
405
406 java: finish fixing parser stack popping bug.
407 * NEWS (2.5): Document.
408 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
409 in clearing the location stack. Also fix pop function that
410 accepts no arguments.
411
412 2011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
413
414 java: fix parser stack popping bug.
415 Reported at
416 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
417 * THANKS (Angelo Borsotti): Add.
418 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
419 in clearing the value stack. Previously, the top element of the
420 stack wasn't cleared and so the value was not garbage collected.
421
422 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
423
424 doc: cite publication for LAC.
425 * doc/bison.texinfo (LAC): Here.
426
427 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
428
429 doc: clean up terminology for mysterious conflicts.
430 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
431 (Mysterious Conflicts): ... this, which is already the section
432 title and the name used in the index. Update all cross-references
433 to this node. Also, don't imply that R/R conflicts are the only
434 kind of mysterious conflict.
435
436 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
437
438 lr.default-reductions: rename "all" value to "full".
439 States that shift the error token do not have default reductions,
440 and GLR disables some default reductions, so "all" was a misnomer.
441 * doc/bison.texinfo (%define Summary): Update.
442 (Default Reductions): Update.
443 * src/print.c (print_reductions): Update.
444 * src/reader.c (prepare_percent_define_front_end_variables):
445 Update.
446 * src/tables.c (action_row): Update.
447 * tests/input.at (%define enum variables): Update.
448 * tests/reduce.at (%define lr.default-reductions): Update.
449
450 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
451
452 doc: create a new Tuning LR section in the manual.
453 And clean up all other documentation of the features described
454 there.
455 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
456 bit, update the cross-references to the manual, and point out that
457 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
458 That is, as the referenced section in the manual documents, LAC
459 does not fix infinite parsing loops on syntax errors.
460 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
461 IELR, and LR in @cindex.
462 (%define Summary): Condense the entries for lr.default-reductions,
463 lr.keep-unreachable-states, lr.type, and parse.lac into brief
464 summaries, and cross-reference the appropriate subsections of
465 Tuning LR. For parse.lac, mention that it's only implemented for
466 deterministic parsers in C.
467 (Error Reporting): When mentioning %error-verbose, mention LAC,
468 and add cross-reference to the LAC section.
469 (Tuning LR): New section with an extended version of the
470 documentation removed from %define Summary. Change all
471 cross-references in the manual to point here instead of there.
472 (Calc++ Parser): When mentioning %error-verbose, mention LAC, and
473 add cross-reference to the LAC section.
474 (Table of Symbols): In %error-verbose and YYERROR_VERBOSE entries,
475 add cross-references to Error Reporting.
476 (Glossary): Capitalize entry titles consistently. Add definitions
477 for "defaulted state" and "unreachable state". Expand IELR
478 acronym in IELR's entry.
479
480 2011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
481
482 doc: add bibliography to manual.
483 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
484 bibliography instead of citing publications directly.
485 (Generalized LR Parsing): Likewise.
486 (Bibliography): New section. Not all entries are cross-referenced
487 yet, but that will come in future patches.
488
489 2011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
490
491 java: test and document previous bug fix.
492 * NEWS (2.5): Document it.
493 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
494 invocations, pass a location that spans multiple tokens. Change
495 yyerror to report all of a location rather than just the begin
496 position. Extend yylex and Position to count tokens on a line.
497 Remove getHashCode as it's unused. Update all expected output.
498
499 2011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
500
501 java: fix location handling bug.
502 Reported at
503 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
504 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
505 reversed access to location stack.
506 * THANKS (Bernd Kiefer): Add.
507
508 2010-05-11 Akim Demaille <demaille@gostai.com>
509
510 doc: please Emacs.
511 * doc/bison.texinfo (Local Variables): Move this after the
512 LocalWords, since the latter are looked for in the whole document,
513 while the former are looked for only at its end.
514 Require american spell checking.
515
516 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
517
518 doc: clean up new subsections in manual.
519 * doc/bison.texinfo (%define Summary): Reword so it reads well as
520 a separate section. For example, add an intro, and move most of
521 the text outside of the @deffn so it is not indented so far.
522 (%code Summary): Likewise.
523 (Table of Symbols): Reword %code entry to match the %code entry in
524 Decl Summary.
525
526 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
527
528 doc: finish splitting apart the manual's Decl Summary section.
529 Suggested by Akim Demaille at
530 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
531 * doc/bison.texinfo (Decl Summary): Extract most of the %define
532 entry into...
533 (%define Summary): ... this new subsection, and update all
534 cross-references. For readability of the patches, rewriting of
535 the text so it makes sense as a separate subsection will come in a
536 later patch. Moreover, the majority of the text describing the
537 various new LR features should likely move to another new section
538 somewhere.
539
540 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
541
542 doc: begin to split apart the manual's Decl Summary section.
543 Discussed in thread starting at
544 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
545 * doc/bison.texinfo (Decl Summary): Extract most of the %code
546 entry into...
547 (%code Summary): ... this new subsection, and update all
548 cross-references. For readability of the patches, rewriting of
549 the text so it makes sense as a separate subsection will come in a
550 later patch.
551
552 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
553
554 doc: clean up naming of various Bison files.
555 The Bison manual's names for various files associated with a Bison
556 parser has devolved into inconsistency. This patch makes the
557 naming consistent for the most important files. First, it chooses
558 "grammar file" over "input file". The former appears to be more
559 traditional in the Bison manual, and Bison has other input
560 files (skeletons). Second, it chooses "parser implementation
561 file" over names like "parser file", "parser source file", "parser
562 source code file", and "parser output file". The new name makes
563 it clearer where Bison generates the main parser implementation,
564 and it is easily distinguishable from "parser header file".
565 * doc/bison.texinfo: Implement throughout.
566
567 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
568
569 doc: give credit to more of Bison's developers.
570 * doc/bison.texinfo (Introduction): Don't imply that only Robert
571 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
572 Bison. However, I don't have time to write a full history, so
573 just point readers to THANKS and ChangeLog.
574
575 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
576
577 doc: document experimental features better.
578 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
579 LR(1) are experimental. Mention Java. Normally experimental
580 features probably shouldn't be mentioned in the introduction.
581 However, if Bison's limitations to LALR(1), C, and C++ are so
582 important that they should be mentioned here, then it's important
583 to point out that Bison is beginning to escape those limitations.
584 Moreover, these particular experimental features have very little
585 chance of being removed.
586 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
587 experimental.
588
589 2011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
590
591 Do not allow identifiers that start with a dash.
592 This cleans up our previous fixes for a bug whereby Bison
593 discarded `.field' in `$-1.field'. The previous fixes were less
594 restrictive about where a dash could appear in an identifier, but
595 the restrictions were hard to explain. That bug was reported and
596 this final fix was originally suggested by Paul Hilfinger. This
597 also fixes a remaining bug reported by Paul Eggert whereby Bison
598 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
599 identifier. Now, `-' cannot be an identifier. Discussed in
600 threads beginning at
601 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
602 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
603 * NEWS (2.5): Update entry describing the dash extension to
604 grammar symbol names. Also, move that entry before the named
605 references entry because the latter mentions the former.
606 * doc/bison.texinfo (Symbol): Update documentation for symbol
607 names. As suggested by Paul Eggert, mention the effect of periods
608 and dashes on named references.
609 (Decl Summary): Update documentation for unquoted %define values,
610 which, as a side effect, can no longer start with dashes either.
611 * src/scan-code.l (id): Implement.
612 * src/scan-gram.l (id): Implement.
613 * tests/actions.at (Exotic Dollars): Extend test group to exercise
614 bug reported by Paul Hilfinger.
615 * tests/input.at (Symbols): Update test group, and extend to
616 exercise bug reported by Paul Eggert.
617 * tests/named-refs.at (Stray symbols in brackets): Update test
618 group.
619 ($ or @ followed by . or -): Likewise.
620 * tests/regression.at (Invalid inputs): Likewise.
621
622 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
623
624 * data/yacc.c: Fix last apostrophe warning from xgettext.
625
626 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
627
628 Fix minor problems encountered by a fresh bootstrap.
629 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
630 as they confuse xgettext, which tries to parse them as C character
631 constants in a preprocessor directive.
632 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
633 that expression might not promote to int on some platforms.
634 * src/parse-gram.c, src/parse-gram.h: Regenerate.
635
636 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
637
638 Improve error messages for `$' or `@' followed by `.' or `-'.
639 Previously, for this special case of an invalid reference, the
640 usual "symbol not found in production:" was printed. However,
641 because the symbol name was parsed as the empty string, that
642 message was followed immediately by a newline instead of a symbol
643 name. In reality, this is a syntax error, so the reference is
644 invalid regardless of the symbols actually appearing in the
645 production. Discussed at
646 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
647 * src/scan-code.l (parse_ref): Report the above case as a syntax
648 error. Other than that, continue to handle this case like any
649 other invalid reference that Bison manages to parse because
650 "possibly meant" messages can still be helpful to the user.
651 * tests/named-refs.at ($ or @ followed by . or -): New test group.
652
653 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
654
655 doc: don't use @acronym.
656 Lately, many GNU packages are dropping it. See
657 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
658 * doc/bison.texinfo: Remove all uses.
659
660 2011-01-05 Alex Rozenman <rozenman@gmail.com>
661
662 Do not allow identifiers that start with a negative number.
663 Reported by Paul Hilfinger as a side effect of named references
664 support at
665 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
666 Suggested by Paul Eggert.
667 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
668 * src/scan-gram.l ({letter}, {id}): Likewise.
669
670 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
671
672 * ChangeLog (2011-01-02): improve description.
673
674 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
675
676 maint: don't update copyright years in bootstrap.
677 * .x-update-copyright: Add entry for bootstrap.
678 * bootstrap: Remove 2011 from copyright years. The bootstrap
679 version we're currently using comes from an older version of
680 gnulib.
681 * bootstrap.conf (bootstrap_sync): Add comments explaining this
682 issue.
683
684 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
685
686 maint: run "make update-copyright".
687
688 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
689
690 maint: prepare to use year ranges in copyright notices.
691 * README (Copyright statements): New section explaining the range
692 notation. The GNU maintainers document requires this explanation:
693 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
694 I copied our explanation from coreutils.
695 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
696 disabled Bison's automated use of ranges.
697 * cfg.mk (update-copyright-env): Likewise.
698
699 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
700
701 Correct my email address.
702 * ChangeLog: In all recent entries.
703 * THANKS (Joel E. Denny): Here.
704
705 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
706
707 doc: cleanup.
708 * NEWS (2.5): Try to sort entries according to how interesting
709 users might find them.
710
711 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
712
713 doc: cleanup.
714 * NEWS (2.5): Make some minor improvements to wording, and format
715 entries more consistently.
716 * doc/bison.texinfo (Language and Grammar): Point out that IELR
717 and canonical LR are experimental features.
718 (Decl Summary): In list of %define variables, make wording more
719 consistent. Improve discussion of using LALR for GLR.
720
721 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
722
723 parse.lac: document.
724 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
725 other corrections to verbose syntax error messages.
726 * doc/bison.texinfo (Decl Summary): Rewrite entries for
727 lr.default-reductions and lr.type to be clearer, to mention
728 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
729 for parse.lac.
730 (Glossary): Add entry for LAC.
731
732 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
733
734 parse.lac: implement exploratory stack reallocations.
735 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
736 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
737 with values of "failures" (default) or "full".
738 (b4_declare_parser_state_variables): Add yyesa, yyes, and
739 yyes_capacity variables.
740 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
741 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
742 LAC requested.
743 (YYCOPY_NEEDED): New cpp macro.
744 (YYCOPY): Define if LAC requested.
745 (yy_lac_stack_realloc): New function implementing stack
746 reallocations. Use YYMAXDEPTH for maximum stack size given that
747 the stack should never need to grow larger than the main state
748 stack needs to grow without LAC.
749 (YY_LAC_ESTABLISH): Update yy_lac invocation.
750 (yy_lac): Add arguments for exploratory stack memory data
751 recorded in the main parser. Invoke yy_lac_stack_realloc when
752 reallocation is necessary.
753 (yysyntax_error): Add the same new arguments and pass them to
754 yy_lac.
755 (yypstate_delete): Free yyes if necessary.
756 (yyesa, yyes, yyes_capacity): #define these to yypstate members
757 in the case of push parsing.
758 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
759 Update yysyntax_error invocations. At yyreturn, free yyes if
760 necessary.
761 * src/parse-gram.y: %define parse.lac full.
762 * tests/input.at (LAC: errors for %define): Extend for
763 parse.lac-memory-trace.
764 * tests/regression.at (LAC: Exploratory stack): Extend to check
765 that stack reallocs happen when expected.
766 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
767 parse.lac.es-capacity-initial.
768
769 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
770
771 parse.lac: implement as %define variable.
772 LAC = lookahead correction. See discussion at
773 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
774 However, one point there must be corrected: because of %nonassoc,
775 LAC is *not* always redundant for lr.type=canonical-lr.
776 * data/yacc.c: Accept values of "none" (default) or "full" for
777 parse.lac. Accept %define parse.lac.es-capacity to specify
778 capacity of LAC's temporary exploratory stack. It defaults to 20
779 and, for now, will not grow dynamically.
780 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
781 parse.lac!=none.
782 (YYBACKUP): Invoke YY_LAC_DISCARD.
783 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
784 yy_lac and track when it needs to be invoked
785 (yy_lac): New function that, given the current stack, determines
786 whether a token can eventually be shifted. Return status mimics
787 yyparse return status.
788 (yysyntax_error): Change yystate argument to yyssp so stack top
789 can be passed to yy_lac. If LAC is requested, build expected
790 token list by invoking yy_lac for every token instead of just
791 checking the current state for lookaheads. Return 2 if yy_lac
792 exhausts memory.
793 (yyparse, yypush_parse): Use local variable yy_lac_established and
794 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
795 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
796 is requested.
797 * tests/conflicts.at (%nonassoc and eof): Extend to check the
798 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
799 (%error-verbose and consistent errors): Likewise.
800 (LAC: %nonassoc requires splitting canonical LR states): New test
801 group demonstrating how LAC can fix canonical LR.
802 * tests/input.at (LAC: Errors for %define): New test group.
803 * tests/regression.at (LAC: Exploratory stack): New test group.
804 (LAC: Memory exhaustion): New test group.
805
806 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
807
808 build: use gnulib's new bootstrap_sync option.
809 Now, whenever we update bison's copy of gnulib, bootstrap will
810 update itself the next time it's run.
811 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
812 * bootstrap.conf (bootstrap_sync): Set to true.
813 * gnulib: Update to latest so bootstrap is in sync now.
814
815 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
816
817 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
818 On master, there is no yychar in lalr1.cc, but there is on
819 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
820 manipulation in user semantic actions" wasn't adjusted for that
821 difference.
822 * data/lalr1.cc (yy::parser::parse): Translate yychar before
823 every use of yytoken, and add comments explaining this approach.
824 * tests/conflicts.at (%error-verbose and consistent errors):
825 Extend to test yychar manipulation with lalr1.cc.
826
827 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
828
829 yysyntax_error: fix for consistent error with lookahead.
830 * NEWS (2.5): Document.
831 * data/yacc.c (yysyntax_error): In a verbose syntax error
832 message while in a consistent state with a default action (which
833 must be an error action given that yysyntax_error is being
834 invoked), continue to drop the expected token list, but don't
835 drop the unexpected token unless there actually is no lookahead.
836 Moreover, handle that internally instead of returning 1 to tell
837 the caller to do it. With that meaning of 1 gone, renumber
838 return codes more usefully.
839 (yyparse, yypush_parse): Update yysyntax_error usage. Most
840 importantly, set yytoken to YYEMPTY when there's no lookahead.
841 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
842 unexpected token unless there actually is no lookahead.
843 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
844 set yytoken to yyempty_ before invoking yysyntax_error_.
845 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
846 token unless there actually is no lookahead.
847 * data/lalr1.java (YYParser::parse): If there's no lookahead,
848 set yytoken to yyempty_ before invoking yysyntax_error.
849 (YYParser::yysyntax_error): Again, don't drop the unexpected
850 token unless there actually is no lookahead.
851 * tests/conflicts.at (%error-verbose and consistent
852 errors): Extend test group to further reveal how the previous
853 use of the simple "syntax error" message was too general. Test
854 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
855 failure.
856 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
857 to...
858 * tests/local.at: ... here.
859 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
860 (AT_BISON_OPTION_POPDEFS): Pop it.
861 (AT_FULL_COMPILE): Extend to handle Java.
862
863 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
864
865 yysyntax_error: more preparation for readability of next patch.
866 There are no behavioral changes here.
867 * data/glr.c (yyreportSyntaxError): Reorganize.
868 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
869 * tests/conflicts.at (%error-verbose and consistent errors):
870 Reorganize.
871
872 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
873
874 yysyntax_error: prepare for readability of next patches.
875 These are purely whitespace changes that result in ugly code
876 but that make the next couple of patches much easier to read.
877 * data/glr.c (yyreportSyntaxError): Reindent.
878 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
879 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
880 * data/yacc.c (yysyntax_error): Reindent.
881
882 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
883
884 yysyntax_error: improve invocation readability.
885 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
886 invocation, get rid of the while loop, which is misleading
887 because there are really at most two iterations.
888
889 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
890
891 * ChangeLog: Correct some errors in previous entries.
892
893 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
894
895 maint: re-anchor all .gitignore entries.
896 * bootstrap: Copy from gnulib's latest for the fix to
897 automatically anchor entries it constructs.
898 * gnulib: Update to latest just so it has the same bootstrap.
899 * .gitignore, build-aux/.gitignore, doc/.gitignore:
900 * lib/.gitignore, m4/.gitignore, po/.gitignore:
901 * runtime-po/.gitignore: Re-anchor all entries.
902
903 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
904
905 Fix portability problem on OpenBSD 4.7.
906
907 Jim Meyering reported this in
908 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
909 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
910 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
911 for quite some time.
912 * src/parse-gram.c, src/parse-gram.h: Regenerate.
913 * tests/regression.at: Tamper with the renamed witness.
914
915 Adjust to recent changes to gnulib bootstrap.
916
917 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
918 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
919 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
920 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
921 anymore and don't know of anybody else who does. If someone needs
922 these files, they can resurrect them.
923 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
924 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
925 Omit leading '/', since bootstrap omits it.
926 Adjust file names to match current contents better.
927 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
928 installed just for us.
929 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
930 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
931 needed somehow. Don't have time to look into why.
932 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
933 the GNU malloc behavior, where malloc (0) != NULL unless we're
934 out of storage? If not, we can omit malloc-gnu; but for now I left
935 it in to be safe.
936 (vc_ignore): Remove.
937 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
938 uses that convention.
939
940 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
941
942 Version 2.4.3.
943 * NEWS (2.4.3): Set date.
944
945 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
946
947 maint: add gettext version to release announcements.
948 Suggested by Paul Hilfinger at
949 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
950 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
951 * cfg.mk (bootstrap-tools): Add gettext.
952
953 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
954
955 doc: fix -W and %expect documentation some.
956 * NEWS (2.4.3): Mention that there are documentation fixes.
957 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
958 turns conflicts into errors not warnings.
959 (Shift/Reduce): Likewise.
960 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
961
962 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
963
964 -Werror: fix for rules useless in parser after conflicts.
965 * NEWS (2.4.3): Document fix.
966 * src/complain.c (error_message): Extend to handle incomplete
967 error messages so warn and warn_at can be used in more cases.
968 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
969 -Werror is always obeyed.
970 * src/reduce.c (reduce_print): Use warn so that the "warnings
971 being treated as errors" message is printed consistently before
972 the first warning message. This makes testing easier.
973 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
974 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
975 --warnings=error when warnings appear in bison's stderr.
976
977 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
978
979 maint: enable gnits only at stable releases.
980 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
981 version string should disable gnits. Explain in comments.
982
983 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
984
985 i18n: update.
986 * po/POTFILES.in: Add src/graphviz.c.
987
988 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
989
990 i18n: fix for gnulib.
991 * po/POTFILES.in: Add remaining gnulib files that have
992 translatable strings.
993
994 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
995
996 maint: use announce-gen's new --mail-headers.
997 * HACKING (Announce): Update instructions.
998 * cfg.mk (announcement_Cc_): Define.
999 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
1000 required by latest gnulib.
1001 * gnulib: Update to latest.
1002
1003 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
1004
1005 tests: handle Valgrind that complains about >&-.
1006 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
1007 (Output files: -dv >&-): Skip test group if running
1008 maintainer-check-valgrind.
1009
1010 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
1011
1012 Update from GFDL GFDL 1.2 to 1.3.
1013 * doc/bison.texinfo: Update GFDL version number.
1014 * doc/fdl.texi: Update to version 1.3, taken from:
1015 http://www.gnu.org/licenses/fdl.texi
1016
1017 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
1018
1019 Do not use date ranges in copyright notices.
1020 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
1021
1022 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
1023 * TODO, bootstrap, bootstrap.conf:
1024 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
1025 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
1026 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
1027 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
1028 * data/lalr1.java, data/location.cc:
1029 * data/xslt/bison.xsl:
1030 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
1031 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
1032 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
1033 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
1034 * djgpp/subpipe.c, djgpp/subpipe.h:
1035 * djgpp/testsuite.sed, doc/bison.texinfo:
1036 * doc/refcard.tex, etc/README, etc/bench.pl.in:
1037 * examples/calc++/Makefile.am, examples/extexi:
1038 * lib/abitset.c, lib/abitset.h:
1039 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1040 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1041 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1042 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1043 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1044 * lib/libiberty.h, lib/main.c, lib/timevar.c:
1045 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
1046 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
1047 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
1048 * src/AnnotationList.c, src/AnnotationList.h:
1049 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
1050 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
1051 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
1052 * src/complain.h, src/conflicts.c, src/conflicts.h:
1053 * src/derives.c, src/derives.h, src/files.c, src/files.h:
1054 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
1055 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
1056 * src/ielr.h, src/lalr.c, src/lalr.h:
1057 * src/location.c, src/location.h, src/main.c:
1058 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
1059 * src/named-ref.h, src/nullable.c, src/nullable.h:
1060 * src/output.c, src/output.h, src/parse-gram.y:
1061 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
1062 * src/print_graph.c, src/print_graph.h, src/reader.c:
1063 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
1064 * src/relation.h, src/scan-code.h, src/scan-code.l:
1065 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1066 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1067 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1068 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1069 * tests/actions.at, tests/atlocal.in, tests/c++.at:
1070 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1071 * tests/existing.at, tests/glr-regression.at:
1072 * tests/headers.at, tests/input.at, tests/java.at:
1073 * tests/local.at, tests/named-refs.at:
1074 * tests/output.at, tests/push.at, tests/reduce.at:
1075 * tests/regression.at, tests/sets.at, tests/skeletons.at:
1076 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
1077 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
1078 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
1079 * etc/Makefile.am:
1080 Don't use date ranges in copyright notices.
1081
1082 2010-05-11 Akim Demaille <demaille@gostai.com>
1083
1084 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
1085 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
1086 header file to the implementation file, after the user %code
1087 sections.
1088 * NEWS (2.5): Document this.
1089
1090 2010-05-07 Akim Demaille <demaille@gostai.com>
1091
1092 c++: use YYRHSLOC.
1093 * data/lalr1.cc (YYRHSLOC): New.
1094 (YYLLOC_DEFAULT): Use it.
1095 * data/glr.cc: If location_type was user defined, do not include
1096 location.hh, and do not produce location.hh and position.hh.
1097 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
1098 Check that glr.cc supports user defined location_type.
1099 * NEWS: Document this.
1100
1101 2010-05-10 Akim Demaille <demaille@gostai.com>
1102
1103 doc: fix lalr1.cc documentation.
1104 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
1105 (C++ Bison Interface): Fix lalr1.cc skeleton name.
1106 (C++ Parser Interface): Fix semantic_type and location_type names.
1107 Document yy::parser::token.
1108 Reported by Jerry Quinn.
1109
1110 2010-05-04 Akim Demaille <demaille@gostai.com>
1111
1112 lalr1.cc: don't generate location.hh when location_type is defined
1113 * data/bison.m4 (b4_percent_define_use): New.
1114 (b4_percent_define_get): Use it.
1115 Accept a default value.
1116 * data/c++.m4: Do not provide a default value for the %define
1117 variable location_type, rather, use b4_percent_define_get with a
1118 default argument where its value is needed.
1119 * data/lalr1.cc: Do not load location.cc (which outputs both
1120 location.hh and position.hh) if the user defined location_type.
1121 Do not include location.hh either.
1122 * data/glr.cc: Likewise.
1123
1124 2010-05-04 Akim Demaille <demaille@gostai.com>
1125
1126 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
1127 * tests/calc.at (Span): Instead of begin/end, as in the built-in
1128 location class, use first and last.
1129 Define YYLLOC_DEFAULT to adjust to these changes.
1130 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
1131 location_type changes.
1132
1133 2010-05-04 Akim Demaille <demaille@gostai.com>
1134
1135 tests: enhance AT_SYNCLINES_COMPILE.
1136 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
1137 into...
1138 (AT_SYNCLINES_COMPILE): here.
1139 Add more distcc patterns.
1140
1141 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1142
1143 tests: fix maintainer-xml-check.
1144 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
1145 Update output to include comments now produced by --graph.
1146 (xsl:template match="automaton"): As for --graph, name the
1147 digraph after the grammar file.
1148 * src/print-xml.c (escape_bufs): Enlarge array.
1149 (print_xml): Add bug-report and url attributes to
1150 bison-xml-report element.
1151
1152 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1153
1154 In DOT output, convert from "/*" comments to "//" comments.
1155 This handles the possibility that a "*/" might appear in
1156 variable portions of those comments at some point in the future.
1157 * src/graphviz.c (start_graph): Implement.
1158
1159 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1160
1161 Document that undefined %prec identifier warnings will remain.
1162 * NEWS (2.4.3): Here.
1163 (2.4.2): Here.
1164
1165 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1166
1167 Revert 2009-12-30 change for undefined %prec token complaints.
1168 That is, keep them as warnings because that should be sufficient
1169 to satisfy POSIX without creating backward compatibility issues.
1170 Suggested by Richard Stallman at
1171 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
1172 * NEWS (2.5): Remove mention of complaint.
1173 * src/reader.c (grammar_rule_check): Convert complaint back to
1174 warning.
1175 * tests/input.at (%prec's token must be defined): Update.
1176
1177 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1178
1179 build: don't require src/bison during bootstrap.
1180 Suggested by Eric Blake at
1181 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
1182 * bootstrap.conf (bootstrap_epilogue): New function to make sure
1183 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
1184
1185 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1186
1187 i18n: fix untranslatable string.
1188 Reported by Goran Uddeborg at
1189 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
1190 * src/muscle-tab.c (muscle_percent_define_insert): Here.
1191
1192 2010-04-13 Akim Demaille <demaille@gostai.com>
1193
1194 tests: calc: minor refactoring.
1195 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
1196
1197 2010-04-13 Akim Demaille <demaille@gostai.com>
1198
1199 tests: calc: simplify location management.
1200 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
1201 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
1202 define the appropriate AT_LOC accessors.
1203 * tests/calc.at: Use AT_LOC accessors.
1204
1205 2010-04-13 Akim Demaille <demaille@gostai.com>
1206
1207 test location_type.
1208 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1209 Define AT_LOCATION_TYPE_IF.
1210 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1211 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1212 used, provide a user location type and use it.
1213 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1214
1215 2010-04-13 Akim Demaille <demaille@gostai.com>
1216
1217 tests: check fclose's return value.
1218 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1219
1220 2010-04-13 Akim Demaille <demaille@gostai.com>
1221
1222 tests: don't depend on the actual location type.
1223 * tests/calc.at: Use yy::parser::location_type rather than
1224 yy::location, since the former is always right, and might point to
1225 another type than the latter.
1226
1227 2010-04-13 Akim Demaille <demaille@gostai.com>
1228
1229 formatting changes.
1230 * tests/calc.at: Formatting changes.
1231
1232 2010-04-13 Akim Demaille <demaille@gostai.com>
1233
1234 lalr1.cc: remove useless forward declaration.
1235 * data/lalr1.cc: Include location.hh before stack.hh.
1236 Remove the useless forward declarations of position and location.
1237 Reported by Chris Morley.
1238 * data/glr.cc: Likewise.
1239
1240 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1241
1242 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1243
1244 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1245
1246 tests: fix for newer Sun Studio C++.
1247 Reported by Dagobert Michelsen at
1248 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1249 * THANKS (Dagobert Michelsen): Add.
1250 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1251 Autoconf macro for handling the restrict keyword.
1252 * gnulib: Update to latest, which no longer overrides that macro
1253 from Autoconf.
1254
1255 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1256
1257 portability: fix pointer arithmetic to conform to C standard.
1258 Reported by Tys Lefering at
1259 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1260 This fix is already implemented in glr.c and does not apply to
1261 lalr1.java.
1262 * data/lalr1.cc (yy::parser::parse): Increase size of
1263 yyerror_range and adjust subscripting so you don't have to
1264 subtract one from the beginning of the array.
1265 * data/yacc.c (b4_declare_parser_state_variables,
1266 yyparse, yypush_parse): Likewise.
1267
1268 2010-04-05 Akim Demaille <demaille@gostai.com>
1269
1270 remove useless include.
1271 * src/graphviz.h: Don't include stdbool.h.
1272
1273 2010-04-05 Akim Demaille <demaille@gostai.com>
1274
1275 graph: sign the output file.
1276 * src/graphviz.c (start_graph): Issue comments about Bison.
1277 Suggested by Tys Lefering.
1278
1279 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1280
1281 portability: fix test suite for GCC 4.5's new #error message.
1282 Reported by Tys Lefering at
1283 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1284 * NEWS (2.4.3): Mention.
1285 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1286
1287 2010-03-30 Akim Demaille <demaille@gostai.com>
1288
1289 fix comments.
1290 * src/graphviz.h: Add missing license notice.
1291 Document.
1292
1293 2010-03-25 Akim Demaille <demaille@gostai.com>
1294
1295 tests: fix 250: parse.error=verbose overflow.
1296 * tests/regression.at (parse.error=verbose overflow): Avoid the
1297 double inclusion of stdlib.h as it triggers hard errors.
1298
1299 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1300
1301 portability: fix for BSD make.
1302 Reported by Johan van Selst at
1303 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1304 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
1305 this dependency list as in package.m4's target rule.
1306
1307 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1308
1309 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1310 Reported by Johan van Selst at
1311 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1312 * NEWS (2.4.3): New.
1313 * THANKS (Johan van Selst): Add.
1314 * gnulib: Update to latest.
1315
1316 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1317
1318 maint: update for changes to gnulib's announce-gen.
1319 * HACKING (Announce): RELEASE_TYPE=major must now be written
1320 RELEASE_TYPE=stable.
1321
1322 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1323
1324 Version 2.4.2.
1325 * NEWS (2.4.2): Set version and date. For the recent test suite
1326 portability fixes, don't be so optimistic about their success
1327 given the lack of feedback on the affected platforms.
1328
1329 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1330
1331 tests: fix maintainer-xml-check for recent changes.
1332 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1333 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1334 output file whose name conflicts with a previous output file
1335 is now never generated.
1336
1337 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1338
1339 portability: fix several issues with M4 subprocess.
1340
1341 M4's output pipe was not being drained upon fatal errors during
1342 scan_skel. As a result, broken-pipe messages from M4 were seen
1343 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1344 failure in the test suite. The problem was that, on platforms
1345 where the default disposition for SIGPIPE is ignore instead of
1346 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1347 then reported it. However, there's some sort of race condition,
1348 because the new test group occasionally succeeded.
1349 Reported by Albert Chin at
1350 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1351
1352 There were also problems with the test suite livelocking on
1353 Tru64 5.1b. Reported by Didier Godefroy at
1354 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1355 Switching to create_pipe_bidi suggested by Akim Demaille.
1356
1357 To attempt to solve both of these problems, switch to gnulib's
1358 create_pipe_bidi and register M4 process as a slave. Along the
1359 way, clean up file name conflict handling, which was affected by
1360 the broken-pipe problem before the switch.
1361 * NEWS (2.4.2): Document.
1362 * THANKS (Didier Godefroy): Add.
1363 * bootstrap.conf (gnulib_modules): Add pipe.
1364 * gnulib: Update to latest to make sure we have all the latest
1365 fixes.
1366 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
1367 subpipe.c.
1368 * po/POTFILES.in (lib/subpipe.c): Remove.
1369 * src/files.c (compute_output_file_names): Update invocations
1370 of output_file_name_check.
1371 (output_file_name_check): In the case that the grammar file
1372 would be overwritten, use complain instead of fatal, but replace
1373 the output file name with /dev/null. Use the /dev/null solution
1374 for the case of two conflicting output files as well because it
1375 seems safer in case Bison one day tries to open both files at
1376 the same time.
1377 * src/files.h (output_file_name_check): Update prototype.
1378 * src/output.c (output_skeleton): Use create_pipe_bidi and
1379 wait_subprocess. Assert that scan_skel completely drains the
1380 pipe.
1381 * src/scan-skel.l (at_directive_perform): Update
1382 output_file_name_check invocation.
1383 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1384 grammar file actually isn't overwritten.
1385 (Conflicting output files: -o foo.y): Update expected output.
1386 * tests/skeletons.at (Fatal errors but M4 continues producing
1387 output): New test group.
1388
1389 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1390
1391 Update POTFILES.
1392 * HACKING (Release Procedure): Add reminder about keeping
1393 POTFILES files up-to-date.
1394 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1395
1396 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
1397
1398 Code cleanup.
1399 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1400 which is already defined in atconfig.
1401
1402 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1403
1404 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1405
1406 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1407
1408 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1409 * HACKING (Release Procedure): Update notes on copyright years.
1410 * Makefile.am (update-package-copyright-year): New target rule.
1411 * build-aux/update-package-copyright-year: New file.
1412 * cfg.mk (update-copyright): Add update-package-copyright-year
1413 as a dependency.
1414
1415 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1416
1417 * bootstrap: Import improvements from latest gnulib.
1418
1419 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1420
1421 build: require Automake 1.11.1 to avoid a security flaw.
1422 * HACKING (Release Procedure): Don't document Automake security
1423 flaw here.
1424 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1425 why here.
1426
1427 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1428
1429 gnulib: update to latest.
1430
1431 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1432
1433 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1434
1435 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
1436
1437 Thank the developer of the initial push parser implementation.
1438 This unfortunate oversight is several years old.
1439 * THANKS (Odd Arild Olsen): Add.
1440
1441 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1442
1443 Fix some comments concerning LR(0) versus LALR(1).
1444
1445 Stop equating LR(0) with nondeterminism and LALR(1) with
1446 determinism. That is, if all states are consistent, then LR(0)
1447 tables are deterministic. On the other hand, LALR(1) tables
1448 might be nondeterministic before conflict resolution, and GLR
1449 permits LALR(1) tables to remain nondeterministic.
1450 * src/LR0.c, src/LR0.h: Here.
1451 * src/lalr.c, src/lalr.h: Here.
1452 * src/main.c (main): Here.
1453 * src/state.c, src/state.h: Here.
1454
1455 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1456 parser tables.
1457
1458 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1459
1460 maint: run "make update-copyright"
1461
1462 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1463
1464 POSIX: complain if %prec's token was not defined.
1465 * NEWS (2.5): Document.
1466 * src/reader.c (grammar_rule_check): Convert warning to
1467 complaint.
1468 * tests/input.at (%prec's token must be defined): Update.
1469
1470 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1471
1472 POSIX: warn if %prec's token was not defined.
1473 Reported by Florian Krohm at
1474 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1475 * NEWS (2.4.2): Document.
1476 * src/reader.c (grammar_rule_check): Implement.
1477 (grammar_current_rule_prec_set): Add comments explaining that we
1478 here assume a %prec identifier is a token, but we still manage
1479 to support POSIX.
1480 * tests/input.at (%prec's token must be defined): New test
1481 group.
1482
1483 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
1484
1485 * HACKING (Release Procedure): Recommend a secure automake.
1486
1487 2008-12-11 Akim Demaille <demaille@gostai.com>
1488
1489 Propagate i18n changes into glr.c.
1490 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1491 building the error message format dynamically.
1492 * data/lalr1.java: Formatting changes.
1493
1494 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1495
1496 Port small part of master's 11707b2b so future ports are easier.
1497 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
1498
1499 2008-12-11 Akim Demaille <demaille@gostai.com>
1500
1501 Simplify the i18n of the error messages.
1502 * data/lalr1.cc: Comment changes.
1503
1504 2008-11-11 Akim Demaille <demaille@gostai.com>
1505
1506 Prefer M4 to CPP.
1507 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1508 YYERROR_VERBOSE.
1509
1510 2008-11-11 Akim Demaille <demaille@gostai.com>
1511
1512 Support i18n of the parse error messages.
1513 * TODO (lalr1.cc/I18n): Remove.
1514 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1515 error messages, as done in yacc.c.
1516 Stay within the yy* pseudo namespace.
1517
1518 2009-12-22 Joel E. Denny <jdenny@clemson.edu>
1519
1520 Port small part of master's 8901f32e so future ports are easier.
1521 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1522 argument, but name it in the function definition only when
1523 verbose error messages are enabled and it'll thus be used.
1524 (yy::parser::parse): Update use of yysyntax_error_.
1525
1526 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1527
1528 portability: `<' and `>' are not always defined on addresses.
1529 Specifically, don't sort objects by their memory addresses when
1530 they're not allocated in the same array or other object. Though
1531 I haven't found a test case where that fails on my platform, C
1532 says the behavior is undefined.
1533 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1534 FIXME. Use new id field of InadequacyList nodes rather than
1535 their memory addresses when sorting.
1536 (AnnotationList__compute_from_inadequacies): Add
1537 inadequacy_list_node_count argument to pass to
1538 InadequacyList__new_conflict.
1539 * src/AnnotationList.h
1540 (AnnotationList__compute_from_inadequacies): Update prototype
1541 and documentation for new argument.
1542 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1543 node_count argument and use it to assign a unique ID.
1544 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1545 (InadequacyList): Add id field.
1546 (InadequacyList__new_conflict): Update prototype and
1547 documentation for new argument.
1548 * src/ielr.c (ielr_compute_annotation_lists): Update
1549 AnnotationList__compute_from_inadequacies invocation.
1550
1551 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1552
1553 Fix handling of yychar manipulation in user semantic actions.
1554 The problem was that yacc.c didn't always update the yychar
1555 translation afterwards. However, other skeletons appear to be
1556 fine. glr.c appears to already translate yychar before every
1557 use. lalr1.cc does not define yychar and does not document its
1558 replacement, yyla, for users. It does provide yyclearin, but
1559 that does not manipulate yyla and thus requires no translation
1560 update. In lalr1.java, yychar is out of scope during semantic
1561 actions.
1562 * NEWS (2.5): Document.
1563 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1564 yytoken here.
1565 (yyparse, yypush_parse): Instead, translate before every use of
1566 yytoken, and add comments explaining this approach.
1567 * tests/actions.at (Destroying lookahead assigned by semantic
1568 action): New test group checking that translation happens before
1569 lookahead destructor calls at parser return. Previously,
1570 incorrect destructors were called.
1571 * tests/conflicts.at (%error-verbose and consistent
1572 errors): New test group checking that translation happens at
1573 syntax error detection before the associated verbose error
1574 message and the associated lookahead destructor calls. While
1575 the destructor call is fixed by this patch, the verbose error
1576 message is currently incorrect due to another bug (see
1577 comments in test group), so this is an expected failure for now.
1578
1579 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1580
1581 YYFAIL: warn about uses and remove from lalr1.java.
1582 * NEWS (2.5): Document.
1583 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1584 and make it private. Update all uses.
1585 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1586
1587 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1588
1589 YYFAIL: deprecate.
1590 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1591 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1592 deprecation.
1593 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1594 YYFAIL from GCC cpp's -Wunused-macros.
1595 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1596 documentation.
1597 (LocalWords): Remove YYFAIL.
1598
1599 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1600
1601 Code cleanup.
1602 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1603 function, which is no longer used.
1604
1605 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1606
1607 Add gcc's -Wundef to test suite and fix another warning from it.
1608 * NEWS (2.4.2): Update description of -Wundef fix.
1609 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1610 (WARN_CFLAGS_TEST): New substitution.
1611 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1612 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1613 WARN_CFLAGS.
1614 (NO_WERROR_CFLAGS): Likewise.
1615 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1616
1617 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1618
1619 * data/yacc.c: Reformat m4 a little.
1620
1621 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1622
1623 Document gcc -Wundef fix.
1624 * NEWS (2.4.2): Here.
1625 * THANKS (Jonathan Nieder): Add.
1626
1627 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1628
1629 Simplify y.tab.c when location tracking is disabled.
1630 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1631 tracking is not enabled. Instead, unconditionally define
1632 YY_LOCATION_PRINT as a no-op for backward compatibility.
1633
1634 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1635
1636 Avoid warnings from gcc -Wundef y.tab.c.
1637 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1638 defined before using them.
1639 * data/lalr1.cc: Likewise.
1640 * data/yacc.c: Likewise.
1641
1642 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1643
1644 autoconf: update to latest for fix of M4 detection.
1645 Reported by Eric Blake.
1646 * submodules/autoconf: Update.
1647
1648 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1649
1650 portability: use -DGNULIB_POSIXCHECK.
1651 Reported by Eric Blake. See discussions at
1652 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1653 and
1654 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1655 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1656 * bootstrap.conf (gnulib_modules): Add all the printf modules
1657 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1658 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1659 (excluded_files): Remove m4/printf-posix.m4.
1660 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1661 lib/libbison.a so gnulib libraries can be linked.
1662
1663 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1664
1665 Enable assertion output and --disable-assert for configure.
1666 * bootstrap.conf (gnulib_modules): Add assert module.
1667 * src/system.h (aver): Define as assert, and summarize the
1668 discussion on this issue.
1669
1670 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1671
1672 Expand GLR acronym in summary of Bison.
1673 Based on discussion with Akim Demaille starting at
1674 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1675 * doc/bison.texinfo (Introduction): Here.
1676 * src/getargs.c (usage): Here.
1677
1678 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1679
1680 Document named references.
1681 * doc/bison.texinfo (Actions): Add new example and xref to
1682 Using Named References node.
1683 (Using Named References): New node.
1684
1685 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1686
1687 cleanup.
1688 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1689 of char*.
1690 (Sbitset__isEmpty): Use Sbitset instead of char*.
1691 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1692 instead of char. This helps to avoid casting errors.
1693 (Sbitset__or): Use Sbitset instead of char*.
1694
1695 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1696
1697 portability: don't assume 8-bit bytes.
1698 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1699 * src/Sbitset.h (Sbitset__nbytes): Here.
1700 (Sbitset__byteAddress): Here.
1701 (Sbitset__bit_mask): Here.
1702 (Sbitset__last_byte_mask): Here.
1703 (Sbitset__ones): Here.
1704 (SBITSET__FOR_EACH): Here.
1705
1706 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1707
1708 portability: use va_start and va_end in the same function.
1709 * src/complain.c (error_message): Move va_end from here...
1710 (ERROR_MESSAGE): ... to here.
1711
1712 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1713
1714 * data/bison.m4: Update comments for rename to muscle-tab.h.
1715
1716 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1717
1718 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1719 * src/Makefile.am (bison_SOURCES): Update.
1720 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1721 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1722 src/tables.c: Update include.
1723 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1724 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1725 include.
1726
1727 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1728
1729 Minor code cleanup.
1730 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1731 replace all uses with UNIQSTR_CONCAT.
1732 * src/uniqstr.c (uniqstr_vsprintf): New function.
1733 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1734 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1735 macros.
1736
1737 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1738
1739 Minor code cleanup.
1740 * src/parse-gram.y: Clean up sorting of declarations.
1741 Use types to simplify %printer declarations where possible.
1742 Provide %printer for BRACKETED_ID and symbol.prec.
1743 * src/symtab.c: Whitespace change.
1744
1745 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1746
1747 tests: skip tests of file names that platform does not support.
1748 Reported by Michael Raskin at
1749 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1750 * THANKS (Michael Raskin): Add.
1751 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1752 to fail at least for file names containing ":" or "\".
1753
1754 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1755
1756 yysyntax_error: avoid duplicate lookahead collection.
1757 Except when memory reallocation is required, this change
1758 eliminates the need to invoke yysyntax_error twice and thus to
1759 repeat the collection of lookaheads. It also prepares for
1760 future extensions that will make those repetitions more
1761 expensive and that will require additional memory management in
1762 yysyntax_error. Finally, it fixes an obscure bug already
1763 exercised in the test suite.
1764 * data/yacc.c (yysyntax_error): Add arguments for message
1765 buffer variables stored in the parser. Instead of size, return
1766 status similar to yyparse status but indicating success of
1767 message creation. Other than the actual reallocation of the
1768 message buffer, import and clean up memory management code
1769 from...
1770 (yyparse, yypush_parse): ... here.
1771 * tests/regression.at (%error-verbose overflow): No longer an
1772 expected failure.
1773
1774 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1775
1776 yysyntax_error: test memory management more.
1777 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1778 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1779 New test group.
1780 (%error-verbose overflow): New test group that reveals an
1781 obscure bug. Expected fail for now.
1782
1783 2008-12-11 Akim Demaille <demaille@gostai.com>
1784
1785 Pass the token type to yysyntax_error.
1786 * data/yacc.c (yysyntax_error): Take the transated token instead
1787 of the raw number.
1788 Adjust callers.
1789
1790 2008-12-11 Akim Demaille <demaille@gostai.com>
1791
1792 Simplify the i18n of the error messages.
1793 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1794 of building dynamically the format string.
1795
1796 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1797
1798 Remove dead code.
1799 * src/symtab.c (symbol_pack): Here because every symbol's number
1800 is always defined by this time.
1801
1802 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1803
1804 Add additional space after periods in NEWS.
1805 * NEWS (2.5): here.
1806
1807 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1808
1809 Use the correct conversion specifier for size_t.
1810 Reported by Jim Meyering.
1811 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1812 because Sbitset__Index is size_t.
1813 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1814
1815 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1816
1817 tests: don't abuse AT_BISON_CHECK.
1818 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1819 additional shell commands outside of AT_BISON_CHECK.
1820
1821 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1822
1823 tests: check that parse-gram.y's IELR and LALR are identical.
1824 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1825 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1826 group.
1827
1828 2009-09-16 Akim Demaille <demaille@gostai.com>
1829
1830 doc: comment changes.
1831 * doc/bison.texinfo: Comment changes.
1832
1833 2009-09-16 Akim Demaille <demaille@gostai.com>
1834
1835 doc: spell checking.
1836 * doc/bison.texinfo: here.
1837
1838 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1839
1840 Keep sub-messages aligned. Fix strings for translation.
1841 * src/location.h (location_print): Add return value.
1842 * src/location.c (location_print): Return number of printed
1843 characters.
1844 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1845 new functions.
1846 * src/complain.cpp (indent_ptr): New static variable.
1847 (error_message, complain_at_indent, warn_at_indent): Implement
1848 the alignment mechanism.
1849 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1850 for translations. Use new alignment mechanism.
1851 * tests/named-ref.at: Adjust test-cases.
1852 * NEWS (2.5): Add an announcement about named references.
1853
1854 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1855
1856 tests: clean up push.at test group titles.
1857 * tests/push.at: Remove "Push Parsing: " from test group titles
1858 because these are already under the banner "Push Parsing Tests".
1859
1860 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1861
1862 Provide an additional sub-message for clarity.
1863 Add "symbol not found in production" error message when
1864 an "invalid reference" is detected in named references
1865 resolution.
1866 * src/scan-code.l: Update "invalid reference" case.
1867 * tests/named-ref.at: Adjust test-cases.
1868
1869 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1870
1871 Clean up yacc.c a little.
1872 * data/yacc.c: Clean up M4 for readability, and make output
1873 whitespace more consistent. For the main parse function
1874 comment, instead of saying "yyparse or yypush_parse", say either
1875 "yyparse" or "yypush_parse" depending on which it actually is.
1876
1877 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1878
1879 Complain about unused %define variables and %code qualifiers.
1880 * NEWS (2.5): Document.
1881 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1882 * doc/bison.texinfo (Decl Summary): Document complaint, and
1883 improve %define documentation a little otherwise.
1884 * tests/input.at (Reject unused %code qualifiers): Update.
1885 (%define errors): Update.
1886 (%define, --define, --force-define): Update.
1887 (%define backward compatibility): Update.
1888 (Unused %define api.pure): Update.
1889 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1890
1891 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1892
1893 Use aver not assert.
1894 * src/output.c: Don't include assert.h.
1895 (output_skeleton): Use aver not assert.
1896 * src/system.h (aver): In documentation of why, add links to
1897 Paul Eggert's explanations in the mailing lists.
1898
1899 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1900
1901 Use "Unresolved reference" error message when no symbols were found
1902 in a symbolic reference resolution. Remove .expr and -expr from
1903 the shown reference when the reference is unresolved.
1904 * src/scan-code.l: Change the error message, adjust location columns,
1905 rename variable "exact_mode" to "explicit_bracketing".
1906 * tests/named-ref.at: Adjust existing tests and add a new one.
1907
1908 2009-09-03 Akim Demaille <demaille@gostai.com>
1909
1910 * NEWS (2.4.2): Add "Internationalization" item.
1911
1912 2009-09-03 Akim Demaille <demaille@gostai.com>
1913
1914 bootstrap: fix/improve find_tool.
1915 * bootstrap (find_tool): Improve error messages.
1916 Fix typo about find_tool_names.
1917
1918 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1919
1920 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1921 See
1922 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1923 * src/scan-code.h (code_props_rule_action_init): Rename
1924 named_ref arg to name so it doesn't shadow named_ref type. This
1925 makes it consistent with the function definition in scan-code.l
1926 anyway.
1927
1928 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1929
1930 %define: accept unquoted values.
1931 * NEWS (2.5): Group all %define changes together, and document
1932 this one. Remove quotes in IELR and canonical LR entry.
1933 * doc/bison.texinfo: Remove quotes in most examples throughout.
1934 (Decl Summary): Update %define documentation.
1935 (Table of Symbols): Likewise.
1936 * src/ielr.c (LrType): Update documentation.
1937 * src/parse-gram.y (content.opt): Add production for ID.
1938 * tests/calc.at: Remove quotes in most tests.
1939 * tests/existing.at: Likewise.
1940 * tests/input.at: Likewise.
1941 * tests/local.at: Likewise.
1942 * tests/push.at: Likewise.
1943 * tests/reduce.at: Likewise.
1944 * tests/torture.at: Likewise.
1945
1946 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1947
1948 %define lr.type: make values lowercase IDs.
1949 That is, "LALR" => "lalr", "IELR" => "ielr", and
1950 "canonical LR" => "canonical-lr".
1951 * NEWS (2.5): Update documentation.
1952 * doc/bison.texinfo (Decl Summary): Likewise.
1953 * src/ielr.c (ielr): Use new values.
1954 * src/ielr.h (ielr): Update documentation.
1955 * src/reader.c (prepare_percent_define_front_end_variables): Use
1956 and validate new values.
1957 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1958 grammars.
1959 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1960
1961 2009-08-27 Eric Blake <ebb9@byu.net>
1962
1963 scan-gram: avoid portability trap with ctype usage.
1964 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1965 Avoid compiler warning.
1966
1967 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1968
1969 tests: use perl for printing special sequences to files.
1970 And skip tests if perl is not available. This is better than
1971 playing tricks with shell portability. Suggested by Akim
1972 Demaille.
1973 * tests/input.at (Bad character literals): Use it here for
1974 omitting final newlines.
1975 (Bad escapes in literals): Use it here for special characters.
1976
1977 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1978
1979 tests: show a use of %define lr.default-reductions "consistent"
1980 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1981 prevents the omission of expected tokens for %error-verbose.
1982
1983 2009-08-26 Akim Demaille <demaille@gostai.com>
1984
1985 tests: portability fix.
1986 * tests/input.at (Bad escapes in literals): Don't expect "echo
1987 '\0'" to output \ then 0.
1988
1989 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
1990
1991 Actually handle the yytable zero value correctly this time.
1992 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1993 mention zero values in the YYTABLE comments.
1994 * data/glr.c (yytable_value_is_error): Don't check for zero
1995 value.
1996 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1997 * data/yacc.c (yytable_value_is_error): Likewise.
1998 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1999 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
2000 * src/tables.h: In header comments, explain why it's useless to
2001 check for a zero value in yytable.
2002
2003 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2004
2005 More fixes related to last two patches.
2006 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
2007 defined.
2008 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
2009 yytable comments: zero indicates syntax error not default
2010 action.
2011 * data/glr.c (yyis_pact_ninf): Rename to...
2012 (yypact_value_is_default): ... this.
2013 (yyisDefaultedState): Update for rename.
2014 (yyis_table_ninf): Rename to...
2015 (yytable_value_is_error): ... this, and check for value zero
2016 besides just YYTABLE_NINF.
2017 (yygetLRActions): Check for default value from yypact. It
2018 appears that this check is always performed before this function
2019 is invoked, and so adding the check here is probably redundant.
2020 However, the code may evolve after this subtlety is forgotten.
2021 Also, update for rename to yytable_value_is_error. Because that
2022 macro now checks for zero, a different but equivalent branch of
2023 the if-then-else here is evaluated.
2024 (yyreportSyntaxError): Update for rename to
2025 yytable_value_is_error. The zero condition was mishandled
2026 before.
2027 (yyrecoverSyntaxError): Update for renames. No behavioral
2028 changes.
2029 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
2030 New function.
2031 (yy_table_value_is_error_): New function.
2032 (parse): Use new functions where possible. No behavioral
2033 changes.
2034 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
2035 The zero condition was mishandled before.
2036 * data/yacc.c (yyis_pact_ninf): Rename to...
2037 (yypact_value_is_default): ... this.
2038 (yyis_table_ninf): Rename to...
2039 (yytable_value_is_error): ... this, and check for value zero
2040 besides just YYTABLE_NINF.
2041 (yysyntax_error): Update for rename to yytable_value_is_error.
2042 The zero condition was mishandled before.
2043 (yyparse): Update for renames. No behavioral changes.
2044 * src/tables.h: Improve comments about yypact, yytable, etc.
2045 more. Most importantly, say yytable value of zero means syntax
2046 error not default action.
2047
2048 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2049
2050 Fix %error-verbose for conflicts resolved by %nonassoc.
2051 * NEWS (2.5): Document.
2052 * data/glr.c (yyreportSyntaxError): Fix this by checking
2053 yyis_table_ninf.
2054 * data/yacc.c (yysyntax_error): Likewise.
2055 * data/lalr1.cc (yysyntax_error_): Fix this by checking
2056 yytable_ninf_.
2057 * data/lalr1.java (yysyntax_error): Likewise.
2058 * tests/conflicts.at (%nonassoc and eof): Update expected output
2059 and remove FIXME.
2060
2061 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2062
2063 Some code and documentation improvements.
2064 * data/c.m4 (b4_table_value_equals): New macro to capture
2065 some repeated code.
2066 * data/glr.c (yyis_pact_ninf): Use it here.
2067 (yyis_table_ninf): Likewise.
2068 (yyreportSyntaxError): Improve internal comments.
2069 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
2070 Use it everywhere possible.
2071 (yyis_table_ninf): Likewise.
2072 (yysyntax_error): Improve internal comments.
2073 * data/lalr1.cc (yysyntax_error_): Likewise.
2074 * data/lalr1.java (yysyntax_error): Likewise.
2075 * src/tables.h: Improve comments about yypact, yytable, etc.
2076
2077 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
2078
2079 Use locale when quoting.
2080 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
2081 quote rather than implementing quoting here.
2082
2083 2009-08-20 Eric Blake <ebb9@byu.net>
2084
2085 Make previous patch more robust.
2086 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
2087 argmatch.h.
2088 (output_skeleton): Use it.
2089 Suggested by Akim Demaille.
2090
2091 Import latest m4/m4.m4.
2092 * submodules/autoconf: Update to autoconf 2.64.
2093 * configure.ac (M4_GNU_OPTION): New define.
2094 * src/output.c (output_skeleton): Use it to resolve FIXME.
2095 * NEWS: Mention this.
2096
2097 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
2098
2099 Fix complaints about escape sequences.
2100 Discussed starting at
2101 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
2102 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
2103 For a \0 and similar escape sequences meaning the null
2104 character, report an invalid escape sequence instead of an
2105 invalid null character because the latter does not actually
2106 appear in the user's input.
2107 In all escape sequence complaints, don't escape the initial
2108 backslash, and don't quote when the sequence appears at the end
2109 of the complaint line unless there's whitespace that quotearg
2110 won't escape.
2111 Consistently say "invalid" not "unrecognized".
2112 Consistently prefer "empty character literal" over "extra
2113 characters in character literal" warning for invalid escape
2114 sequences; that is, consistently discard those sequences.
2115 * tests/input.at (Bad escapes in literals): New.
2116
2117 2009-08-19 Akim Demaille <demaille@gostai.com>
2118
2119 doc: fixes.
2120 * doc/bison.texinfo: Fix minor Texinfo errors.
2121
2122 2009-08-19 Akim Demaille <demaille@gostai.com>
2123
2124 doc: %initial-action to initialize yylloc.
2125 Reported by Bill Allombert.
2126 * doc/bison.texinfo: Set fill-column to 76.
2127 (Location Type): Document the use of %initial-action to initialize
2128 yylloc.
2129
2130 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
2131
2132 maint: update for gnulib's recent update-copyright changes
2133 * gnulib: Update.
2134 * .x-update-copyright (COPYING): Add as it's no longer implied
2135 when .x-update-copyright is present.
2136 * cfg.mk (update-copyright-local): Remove, now ignored.
2137 (update-copyright): Declare update-b4-copyright as a dependency.
2138
2139 2009-08-17 Akim Demaille <demaille@gostai.com>
2140
2141 build: require gettext 0.17.
2142
2143 Suggested by Bruno Haible.
2144 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
2145 * configure.ac: require gettext 0.17 to ensure compatibility with
2146 gnulib.
2147
2148 2009-08-17 Akim Demaille <demaille@gostai.com>
2149
2150 build: lower gettext requirements.
2151
2152 Bison was uselessly requiring the formatstring macros from
2153 gettext, which resulted in mo files not being installed on systems
2154 that perfectly supported Bison mo files. Lower the requirement.
2155 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
2156
2157 * configure.ac: Require need-ngettext instead of
2158 need-formatstring-macros.
2159 Reported by Martin Jabocs.
2160 Suggested by Bruno Haible.
2161 * INSTALL: Restructure.
2162 (Internationalization): New.
2163
2164 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
2165
2166 maint: fix use of copyright year intervals.
2167 * gnulib: Update.
2168 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
2169 as now recommended in gnulib/NEWS.
2170 * build-aux/update-b4-copyright: Fix.
2171 * cfg.mk (update-copyright-env): Configure update-copyright.
2172
2173 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
2174
2175 Make it easier to write deterministic tests.
2176 Continues Akim's work from his 2009-06-10 commits.
2177 * src/reader.c (check_and_convert_grammar): Don't add any
2178 symbols after the first symbols_do invocation.
2179 * src/symtab.c (symbols_sorted): New static global.
2180 (user_token_number_redeclaration): Update comments.
2181 (symbol_from_uniqstr): If a new symbol is being created, assert
2182 that symbols_sorted hasn't been allocated yet.
2183 (symbols_free): Free symbols_sorted.
2184 (symbols_cmp, symbols_cmp_qsort): New functions.
2185 (symbols_do): Sort symbol_table into symbols_sorted on first
2186 invocation.
2187 * tests/input.at (Numbered tokens): Recombine tests now that the
2188 output should be deterministic across multiple numbers.
2189
2190 2009-08-12 Akim Demaille <demaille@gostai.com>
2191
2192 distcheck: fix.
2193
2194 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
2195
2196 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2197
2198 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
2199
2200 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2201
2202 Miscellaneous code readability improvements.
2203
2204 * src/reader.c (reader): Move %define front-end variable
2205 defaults and checking into...
2206 (prepare_percent_define_front_end_variables): ... this new
2207 function.
2208
2209 * src/scan-gram.l (INITIAL): For consistency with string
2210 literals, don't store open quote on character literal. It's
2211 discarded before returning anyway.
2212 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2213 Make length test more readable, and make the character stored
2214 for an empty literal more obvious while consistent with the
2215 previous behavior.
2216
2217 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2218 USER_NUMBER_HAS_STRING_ALIAS throughout.
2219 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2220 that is repeated in symtab.h. Improve argument names to make it
2221 clear which side of the symbol-string alias pair is which.
2222 (symbol_check_alias_consistency): Improve local variable names
2223 for the same purpose.
2224 * src/symtab.h (struct symbol): Make comments about aliases
2225 clearer.
2226 (symbol_make_alias): Improve comments and argument name.
2227 * src/output.c (token_definitions_output): Update for rename to
2228 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2229
2230 2009-08-08 Alex Rozenman <rozenman@gmail.com>
2231
2232 Convert "misleading reference" messages to warnings.
2233 * src/scan-code.l: New function 'show_sub_messages', more
2234 factoring.
2235 * tests/named-ref.at: Adjust tests.
2236
2237 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2238
2239 maint: run "make update-copyright"
2240
2241 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2242
2243 maint: make update-b4-copyright easier to use
2244 * build-aux/update-b4-copyright: In warnings, report line
2245 numbers rather than character positions.
2246 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2247 that update-copyright runs it.
2248 * gnulib: Update.
2249
2250 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
2251
2252 maint: clean up update-b4-copyright code
2253 * build-aux/update-b4-copyright: Do not accept 2-digit
2254 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2255 Don't accept a `[' in a b4_copyright argument.
2256 Format code more consistently.
2257 Don't assume b4*copyright never occurs.
2258
2259 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2260
2261 maint: automate b4_copyright updates.
2262 * Makefile.am (update-b4-copyright): New target rule.
2263 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
2264 * build-aux/update-b4-copyright: New.
2265 * data/yacc.c: Remove stray characters around b4_copyright
2266 invocations.
2267
2268 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2269
2270 maint: automate annual package-wide copyright-year update.
2271 * .x-update-copyright: New.
2272 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2273 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2274 update-copyright. Remove gnumakefile, which is implied by
2275 maintainer-makefile.
2276 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2277 * gnulib: Update.
2278 * maint.mk: Remove, now copied from gnulib.
2279 * examples/extexi: Add missing "(C)" in copyright statement so
2280 update-copyright can recognize it.
2281 * src/LR0.h: Likewise.
2282 * src/print.h: Likewise.
2283 * src/print_graph.h: Likewise.
2284 * src/gram.c: Add missing comma in copyright statement.
2285 * src/gram.h: Likewise.
2286
2287 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2288
2289 Fix "make distcheck".
2290 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2291 of just calc.stamp.
2292
2293 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
2294
2295 Pacify "gcc -Wunused" for the input function from Flex.
2296 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2297 and later.
2298 * src/scan-code.l: Add "%option noinput", which I cannot find in
2299 the Flex manual, but which Flex has supported since at least as
2300 far back as 2.5.4. However, if any of our developers still use
2301 Flex 2.5.4, they'll need to stop configuring with
2302 --enable-gcc-warnings because "%option noinput" didn't work
2303 correctly until Flex 2.5.6.
2304 * src/scan-gram.l: Likewise.
2305 * src/scan-skel.l: Likewise.
2306
2307 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2308
2309 Fix --enable-gcc-warnings problems.
2310 * src/reader.c: Adjust variable names.
2311 * src/scan-code.l: Fix prototypes and adjust names.
2312 * src/named-ref.c: Remove redundant "if".
2313
2314 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2315
2316 Fix a --enable-gcc-warnings problem.
2317 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2318 variable.
2319
2320 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2321
2322 Fix some memory leaks.
2323 * src/named-ref.c: Add a pointer check (named_ref_free).
2324 * src/scan-code.l: New function (variant_table_free). Called in
2325 code_scanner_free.
2326 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2327
2328 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2329
2330 Warn about character literals not of length one.
2331 * NEWS (2.5): Document.
2332 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2333 the length.
2334 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2335 * tests/input.at (Bad character literals): New test group.
2336
2337 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2338
2339 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2340
2341 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2342
2343 Some M4 cleanup in the testsuite.
2344 Suggested by Eric Blake at
2345 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2346 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2347 complicate the code by distinguishing between a missing value
2348 and an empty string value for an optional argument. This fix is
2349 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2350 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2351 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2352 arguments are not needed because of the following changes.
2353 Fix stale comments.
2354 Bison developers should use GNU M4 and should not use
2355 POSIXLY_CORRECT when building the test suite, so do not
2356 complicate the code by avoiding $10 and above.
2357 Do not quote an empty string value for an optional argument, and
2358 do not distinguish between a missing value and an empty string
2359 value.
2360
2361 2009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
2362
2363 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
2364
2365 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2366
2367 Revert unnecessary column realignment in --help output.
2368 Reported by Akim Demaille at
2369 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2370 * src/getargs.c (usage): Here.
2371
2372 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2373
2374 Alphabetical order in src/Makefile.am.
2375 * src/Makefile.am: Adjust.
2376
2377 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2378
2379 Style changes and factoring.
2380 * src/named-ref.h: Add comments.
2381 * src/parse-gram.y: Readability and style changes.
2382 * src/reader.c: Factoring: assign_named_ref function.
2383 * src/scan-code.l: Factoring and style changes. Rename
2384 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2385 Use "unsigned" type for variant index. Improve readablity.
2386 * src/scan-gram.l: Change error messages and add comments.
2387 * src/symlist.h: symbol_list_null: New function decl.
2388 * src/symlist.c: symbol_list_null: Implement here.
2389 * tests/named-refs.at: Adjust for new error messages.
2390
2391 2009-06-29 Eric Blake <ebb9@byu.net>
2392
2393 scan-code: avoid compiler warnings
2394 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2395
2396 2009-06-29 Akim Demaille <demaille@gostai.com>
2397
2398 build: avoid concurrent extraction of calc++.
2399 * examples/calc++/Makefile.am (calc.stamp): New.
2400 Depend on it to create the sources of calc++ so that concurrent
2401 builds don't launch several "extexi" in parallel.
2402 Not only this is inefficient, this also builds incorrect sources
2403 with several extractions mixed together.
2404
2405 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2406
2407 Implement support for named symbol references.
2408 * src/parse-gram.y: Add new syntax (named_ref.opt).
2409 * src/reader.c: Store named refs in symbol lists.
2410 * src/reader.h: New argument for symbol_append and
2411 action_append functions.
2412 * src/scan-code.h: Add new field (named_ref) into
2413 code_props data structure. Keeps named ref of midrule
2414 actions.
2415 * src/scan-code.l: Support for named refs in semantic
2416 action code. New function 'parse_named_ref'.
2417 * src/scan-gram.l: Support bracketed id.
2418 * src/symlist.c: Store named refs in symbol lists.
2419 * src/symlist.h: New field in symbol list: named_ref.
2420 * src/named-ref.h: New file, a struct for named_ref.
2421 * src/named-ref.cp: New file, named_ref_new function.
2422 * src/local.mk: Add two new files.
2423 * tests/testsuite.at: Include new test group:
2424 * tests/named-refs.at: this new file.
2425
2426 2009-06-25 Akim Demaille <demaille@gostai.com>
2427
2428 hash: check insertion for memory exhaustion.
2429 * src/uniqstr.c (uniqstr_new): New.
2430
2431 2009-06-11 Akim Demaille <demaille@gostai.com>
2432
2433 style changes.
2434 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2435 * src/print-xml.c: Style changes.
2436 * tests/conflicts.at: Comment changes.
2437
2438 2009-06-11 Akim Demaille <demaille@gostai.com>
2439
2440 xml: beware of user strings used to give a %prec to rules.
2441 * tests/conflicts.at (%prec with user strings): New.
2442 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2443 XML output.
2444
2445 2009-06-11 Akim Demaille <demaille@gostai.com>
2446
2447 hash: check insertion for memory exhaustion.
2448 * src/muscle-tab.c (muscle_insert, muscle_grow)
2449 * src/state.c (state_hash_insert): Check the return value of
2450 hash_insert.
2451
2452 2009-06-10 Akim Demaille <demaille@gostai.com>
2453
2454 deterministic test suite.
2455 Some consistency checks on symbols are performed after all the
2456 symbols were read, by an iteration over the symbol table. This
2457 traversal is nondeterministic, which can be a problem for test
2458 cases.
2459 Avoid this.
2460 Addresses another form of nondeterminism reported by Joel E. Denny.
2461 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2462
2463 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2464 test in two.
2465 Use different file names for the three tests to make the
2466 maintenance easier.
2467
2468 2009-06-10 Akim Demaille <demaille@gostai.com>
2469
2470 deterministic user-token-number redeclaration errors.
2471 Address nondeterminism reported by Joel E. Denny.
2472 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2473
2474 * src/uniqstr.h: Comment changes.
2475 * src/location.h (boundary_cmp, location_cmp): New.
2476 * src/symtab.c (user_token_number_redeclaration): New.
2477 (symbol_translation): Use it.
2478 * tests/input.at (Numbered tokens): Adjust the expected output.
2479
2480 2009-05-25 Akim Demaille <demaille@gostai.com>
2481
2482 gnulib: update.
2483 * gnulib: Update to latest.
2484 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2485 * m4/.gitignore: Regen.
2486 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2487 Call xalloc_die on hash_insert failures.
2488 Requested by the new __warn_unused_result__ attribute of
2489 hash_insert.
2490
2491 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2492
2493 Convert multiple variable definition warnings to complaints.
2494 * NEWS (2.5): Add a new entry for that change.
2495 * doc/bison.texinfo (Decl Summary): Update %define entry.
2496 (Bison Options): Update -D/--define/-F/--force-define entry.
2497 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
2498 * src/muscle_tab.h (muscle_percent_define_insert): Update
2499 comments.
2500 * tests/input.at (`%define errors'): Update.
2501 (`%define, --define, --force-define'): Update.
2502
2503 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2504
2505 -F/--force-define and relative %define/-D/--define priorities.
2506 * NEWS (2.5): Add documentation to -D/--define entry.
2507 * build-aux/cross-options.pl: Hard-code association of
2508 --force-define with %define.
2509 * doc/bison.texinfo (Decl Summary): In %define entry,
2510 cross-reference command-line options.
2511 (Bison Options): Add documentation to -D/--define entry.
2512 (Option Cross Key): Widen column for --force-define row.
2513 * src/getargs.c (usage): Document -F/--force-define. Realign
2514 options in output.
2515 (short_options, long_options, getargs): Parse -F/--force-define,
2516 and update muscle_percent_define_insert invocation.
2517 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2518 (muscle_percent_define_insert): Add argument with that type.
2519 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2520 -F/--force-define behavior and priorities.
2521 * src/parse-gram.y (prologue_declaration): Update
2522 muscle_percent_define_insert invocations.
2523 * tests/input.at (`%define, --define'): Rename to...
2524 (`%define, --define, --force-define'): ... this and extend.
2525
2526 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2527
2528 Update some comments to make sense for -D.
2529 * data/bison.m4 (b4_check_user_names): In header comments, say
2530 "user occurrence" instead of "grammar occurrence".
2531 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2532 (muscle_percent_code_grow): Likewise just for consistency.
2533
2534 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2535
2536 * data/c++.m4: Update copyright year.
2537
2538 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2539
2540 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2541
2542 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2543
2544 Handle a trailing `:' in a user-supplied C++ namespace better.
2545 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2546 among the closing braces here. This fix might make the
2547 generated code easier to debug, but otherwise it should be
2548 insignificant because a trailing `:' is a C++ error already.
2549
2550 2009-05-19 Akim Demaille <demaille@gostai.com>
2551
2552 remove useless variable.
2553 * src/getargs.c (skeleton_arg): Remove now useless variable.
2554 Should help the compiler see that this printf-like call is sane.
2555
2556 2009-05-11 Akim Demaille <demaille@gostai.com>
2557
2558 doc: use C++ headers.
2559 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2560 headers.
2561
2562 2009-05-05 Akim Demaille <demaille@gostai.com>
2563
2564 fix hexadecimal token number support.
2565 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2566
2567 2009-05-05 Akim Demaille <demaille@gostai.com>
2568
2569 tests: check token numbers.
2570 * tests/input.at (Numbered tokens): New.
2571
2572 2009-05-04 Akim Demaille <demaille@gostai.com>
2573
2574 bison: catch bad symbol names.
2575 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2576 * tests/input.at: Adjust.
2577
2578 2009-05-04 Akim Demaille <demaille@gostai.com>
2579
2580 space changes.
2581 * src/scan-gram.l: Untabify to be robust to zealous editors.
2582
2583 2009-05-04 Akim Demaille <demaille@gostai.com>
2584
2585 identifiers: dashes are letters.
2586 Dashes can now start identifiers (symbols and directives).
2587
2588 * src/scan-gram.l ({letter}): Add dash.
2589 ({id}): Remove it.
2590 * tests/input.at (Symbols): Adjust.
2591 Remove stray comment.
2592 * tests/regression.at (Invalid inputs): Adjust error message.
2593 * doc/bison.texinfo (Symbols): Update.
2594
2595 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2596
2597 Declare %code to be a permanent feature.
2598 * NEWS (2.4.2): Here.
2599 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2600 experimental.
2601 (Decl Summary): Likewise.
2602
2603 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2604
2605 Convert underscores to dashes in some %define variable names.
2606 For now, just api.push-pull and lr.keep-unreachable-states.
2607 Maintain old names for backward compatibility.
2608 * NEWS (2.5): Document.
2609 * data/c.m4 (b4_identification): Update comment.
2610 * data/yacc.c: Update access.
2611 * doc/bison.texinfo: Update.
2612 * etc/bench.pl.in (bench_grammar): Update use.
2613 * src/files.c (tr): Move to...
2614 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2615 think of a better place to expose it. My logic is that, for all
2616 uses of tr so far, command-line arguments can be involved, and
2617 getargs.h is already included.
2618 * src/main.c (main): Update access.
2619 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2620 variable names to new variable names before assigning value.
2621 * src/reader.c (reader): Update setting default.
2622 * tests/calc.at: Update uses.
2623 * tests/conflicts.at (Unreachable States After Conflict
2624 Resolution): Update use.
2625 * tests/input.at (%define enum variables): Update use.
2626 (%define backward compatibility): New test group.
2627 * tests/push.at: Update uses.
2628 * tests/reduce.at: Update uses.
2629 * tests/torture.at: Update uses.
2630
2631 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2632
2633 Set all front-end %define defaults in one place.
2634 * src/main.c (main): Move lr.keep_unreachable_states default...
2635 * src/reader.c (reader): ... to here.
2636
2637 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2638
2639 Rename lr.default_reductions to lr.default-reductions.
2640 * NEWS (2.5): Here.
2641 * doc/bison.texinfo: Here.
2642 * src/lalr.c (initialize_LA): Here.
2643 * src/print.c (print_reductions): Here.
2644 * src/reader.c (reader): Here.
2645 * src/tables.c (action_row): Here.
2646 * tests/input.at (%define enum variables): Here.
2647 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2648
2649 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2650
2651 Pacify ./configure --enable-gcc-warnings.
2652 * tests/input.at (Symbols): Prototype yyerror and yylex.
2653
2654 2009-04-21 Akim Demaille <demaille@gostai.com>
2655
2656 tests: check the use of dashes and periods in symbols.
2657 * tests/input.at (Symbol): New test group.
2658
2659 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2660
2661 Document how `%define "var" "value"' is not M4-friendly.
2662 * src/parse-gram.y (variable): In comments here.
2663
2664 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2665
2666 Add copyright updates missed during previous cherry pick.
2667 * src/output.c: Here.
2668 * src/parse-gram.y: Here.
2669 * src/scan-gram.l: Here.
2670
2671 2009-04-20 Akim Demaille <demaille@gostai.com>
2672
2673 variables: accept dashes.
2674 * src/scan-gram.l ({id}): Also accept dashes after the initial
2675 letter.
2676 ({directive}): Use {id}.
2677 * src/parse-gram.y: Comment and formatting changes.
2678 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2679 symbols.
2680 * src/complain.h, src/complain.c (yacc_at): New.
2681 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2682 symbol names.
2683 * src/output.c (token_definitions_output): Do not #define token
2684 names with dashes.
2685
2686 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2687
2688 Clean up recent patches a little.
2689 Reported by Akim Demaille.
2690 * doc/bison.texinfo (Understanding): Fix typos.
2691 * src/print.c (print_reductions): Don't use negated variable.
2692
2693 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2694
2695 List accepted values for a %define enum variable with an invalid value.
2696 Suggested by Akim Demaille at
2697 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2698 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2699 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2700 * tests/input.at (%define lr.default_reductions invalid values): Merge
2701 into...
2702 (%define enum variables): ... here, and update output.
2703
2704 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2705
2706 Rename "default rule" to "default reduction".
2707 This includes changing variable names in code, changing
2708 comments, and renaming %define lr.default_rules to %define
2709 lr.default_reductions.
2710 * NEWS (2.5): Update IELR documentation.
2711 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2712 Adjust YYDEFACT and yydefact_ documentation.
2713 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2714 and lr.type documentation. Make some other wording
2715 improvements.
2716 (Glossary): Adjust cross-references and Default Reduction
2717 definition.
2718 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2719 Remove a confusing comment pointed out by Akim Demaille.
2720 (initialize_LA): Adjust code.
2721 * src/print-xml.c (print_reductions): Adjust code.
2722 * src/print.c (print_reductions): Adjust code.
2723 * src/reader.c (reader): Adjust code.
2724 * src/tables.c (action_row): Adjust code.
2725 (token_actions): Adjust code.
2726 * src/tables.h: Adjust YYDEFACT documentation.
2727 * tests/input.at (%define lr.default_rules invalid values):
2728 Rename test group to...
2729 (%define lr.default_reductions invalid values): ... this, and
2730 update grammar file and expected output.
2731 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2732 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2733
2734 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2735
2736 Document %define lr.type and lr.default_rules.
2737 * NEWS (2.5): Add an entry.
2738 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2739 besides just LALR(1) and GLR(1).
2740 * doc/bison.texinfo (Introduction): Likewise.
2741 (Language and Grammar): Bison is no longer limited to LALR(1)
2742 restrictions.
2743 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2744 when trying to distinguish from GLR. Talk about LR(1) grammars
2745 rather than LALR(1) grammars.
2746 (Decl Summary): In %define api.push_pull entry, say it applies
2747 to deterministic parsers in C rather than LALR(1) parsers in C.
2748 Add lr.default_rules entry.
2749 Add lr.type entry.
2750 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2751 restrictions.
2752 (Generalized LR Parsing): Same changes as for the previous GLR
2753 section.
2754 (Memory Management): Say deterministic rather than LALR(1).
2755 (Understanding): Correct some bison output.
2756 Index discussion of "accepting state".
2757 Say deterministic rather than LALR(1).
2758 (Bison Options): In --yacc entry, say deterministic rather than
2759 LALR(1).
2760 In --report, --graph, and --xml entries, just don't mention
2761 LALR(1).
2762 (C++ Parsers): Say deterministic rather than LALR(1).
2763 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2764 (Glossary): Add Accepting State, Consistent State, Default Rule,
2765 and IELR(1) definitions.
2766 In Generalized LR (GLR) definition, make same changes as in
2767 previous GLR sections.
2768 In LALR(1) definition, say Bison uses LALR(1) by default rather
2769 than implying Bison is limited to LALR(1).
2770 (LocalWords): Add IELR.
2771
2772 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2773
2774 Finish implementing %define lr.type.
2775 Its value can be "LALR", "IELR", or "canonical LR".
2776 * lib/timevar.def (TV_IELR_PHASE1): New var.
2777 (TV_IELR_PHASE2): New var.
2778 (TV_IELR_PHASE3): New var.
2779 (TV_IELR_PHASE4): New var.
2780 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2781 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2782 Sbitset.h, ielr.h, and ielr.c.
2783 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2784 trace_types): Add trace_ielr.
2785 * src/lalr.h, src/lalr.c (ngotos): Export it.
2786 (F): Rename to...
2787 (goto_follows): ... this, update all uses, and export it.
2788 (set_goto_map): Export it.
2789 (map_goto): Export it.
2790 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2791 handled in ielr.
2792 (initialize_LA): Export it. Move lookback allocation to...
2793 (lalr): ... here because, for canonical LR, initialize_LA must
2794 be invoked but lookback and much of the rest of LALR isn't
2795 needed.
2796 * main.c (main): Instead of lalr, invoke ielr, which invokes
2797 lalr.
2798 * src/reader.c (reader): Default lr.type to "LALR".
2799 Default lr.default_rules to "accepting" if lr.type is "canonical
2800 LR". Leave the default as "all" otherwise.
2801 Check for a valid lr.type value.
2802 * src/state.h, src/state.c (struct state_list): Add state_list
2803 member.
2804 (state_new): Initialize state_list member to NULL.
2805 (state_new_isocore): New function, exported.
2806 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2807 exercises all values of lr.type.
2808 (GNU AWK Grammar): Rename test group to...
2809 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2810 AT_TEST_EXISTING_GRAMMAR.
2811 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2812 (GNU pic Grammar): Rename test group to...
2813 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2814 AT_TEST_EXISTING_GRAMMAR.
2815 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2816 all values of lr.type.
2817 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2818 (Lane Split): Likewise.
2819 (Complex Lane Split): Likewise.
2820 (Split During Added Lookahead Propagation): Likewise.
2821
2822 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2823
2824 Add new files for IELR and canonical LR implementation.
2825 * src/AnnotationList.c: New.
2826 * src/AnnotationList.h: New.
2827 * src/InadequacyList.c: New.
2828 * src/InadequacyList.h: New.
2829 * src/Sbitset.c: New.
2830 * src/Sbitset.h: New.
2831 * src/ielr.c: New.
2832 * src/ielr.h: New.
2833
2834 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2835
2836 Implement %define lr.default_rules.
2837 Its value describes the states that are permitted to contain
2838 default rules: "all", "consistent", or "accepting".
2839 * src/reader.c (reader): Default lr.default_rules to "all".
2840 Check for a valid lr.default_rules value.
2841 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2842 is "accepting", then only mark the accepting state as
2843 consistent.
2844 (initialize_LA): Tell state_lookahead_tokens_count whether
2845 lr.default_rules is "accepting".
2846 * src/tables.c (action_row): If lr.default_rules is not "all",
2847 then disable default rules in inconsistent states.
2848 * src/print.c (print_reductions): Use this opportunity to
2849 perform some assertions about whether lr.default_rules was
2850 obeyed correctly.
2851 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2852 helps with checking the parser tables for a grammar.
2853 * tests/input.at (%define lr.default_rules invalid values): New
2854 test group.
2855 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2856 AT_TEST_TABLES_AND_PARSE.
2857 (`no %define lr.default_rules'): New test group generated by
2858 AT_TEST_LR_DEFAULT_RULES.
2859 (`%define lr.default_rules "all"'): Likewise.
2860 (`%define lr.default_rules "consistent"'): Likewise.
2861 (`%define lr.default_rules "accepting"'): Likewise.
2862
2863 2009-04-20 Akim Demaille <demaille@gostai.com>
2864
2865 Consistently refer to Yacc, not YACC.
2866 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2867
2868 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2869
2870 Pacify make maintainer-check-posix.
2871 * tests/input.at (%define, --define): Move bison command-line
2872 options before grammar file name.
2873
2874 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2875
2876 Document semicolon warnings.
2877 * NEWS (2.5): Here.
2878
2879 2008-12-08 Akim Demaille <demaille@gostai.com>
2880
2881 Fix portability issue in the test suite.
2882 * tests/local.at (AT_MATCHES_CHECK): New.
2883 Based on Perl instead of Sed. Sed has too many portability
2884 pitfalls, not ever Sed is GNU Sed.
2885 * tests/actions.at (Fix user actions without a trailing semicolon):
2886 Use it.
2887
2888 2008-12-07 Di-an Jan <dianj@freeshell.org>
2889
2890 Implement the FIXME that ends an user action with a semicolon
2891 if it seems necessary.
2892 * src/scan-code.l (flex rules section): Flag cpp directive from
2893 any `#' to the first unescaped end-of-line. Semicolon is not
2894 needed after `;', `{', '}', or cpp directives and is needed after
2895 any other token (whitespaces and comments have no effect).
2896 * tests/actions.at (Fix user actions without a trailing semicolon):
2897 New test.
2898 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2899 to make user actions complete statements.
2900 Adjust column numbers in error messages.
2901 * tests/regression.at (Fix user actions without a trailing semicolon):
2902 Remove. Covered by new test.
2903
2904 2009-04-14 Akim Demaille <demaille@gostai.com>
2905
2906 doc: minor fixes.
2907 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2908 (Table of Symbols): Remove duplicate entry for %debug.
2909
2910 2009-04-10 Eric Blake <ebb9@byu.net>
2911
2912 submodules: update to latest
2913 * submodules/autoconf: Use latest upstream Autoconf.
2914
2915 2009-04-06 Eric Blake <ebb9@byu.net>
2916
2917 Work around autoconf 2.63b bug in testsuite.
2918 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2919 autoconf bug related to # in test.
2920
2921 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2922
2923 * NEWS (2.5): Describe new -D/--define feature.
2924
2925 2008-11-10 Akim Demaille <demaille@gostai.com>
2926
2927 --trace=muscles
2928 * src/getargs.h, src/getargs.c (trace_muscle): New.
2929 (trace_types, trace_args): Support it.
2930 * src/output.c (output_skeleton): Use it.
2931
2932 2008-11-10 Akim Demaille <demaille@gostai.com>
2933
2934 muscles_output.
2935 * src/output.c (muscles_output): New, extracted from...
2936 (output_skeleton): here.
2937 Adjust.
2938
2939 2008-11-21 Akim Demaille <demaille@gostai.com>
2940
2941 Display the changes in cross-options.texi.
2942 * build-aux/cross-options.pl ($sep): New, to separate items.
2943 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2944 the changes.
2945
2946 2008-11-20 Di-an Jan <dianj@freeshell.org>
2947
2948 Improves options in the manual.
2949 * doc/bison.texinfo (-g, -x): Add space before argument.
2950 (Option Cross Key): Implement FIXME: listing directives also.
2951 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2952 (Short Option): Special case -d. Put arguments inside @option.
2953 (Bison Directive): Add column, automatically extracted from
2954 src/scan-gram.l (actual name passed as the first argument)
2955 with special case for %define.
2956 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2957 to build-aux/cross-options.pl.
2958 * src/getargs.c (usage): Document limitations of cross-options.pl.
2959 * src/scan-gram.l: Likewise.
2960
2961 2009-02-25 Akim Demaille <demaille@gostai.com>
2962
2963 Copyright years.
2964 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2965
2966 2008-12-08 Akim Demaille <demaille@gostai.com>
2967
2968 Install autoconf as a submodule to get m4sugar.
2969 * .gitmodules: Add submodules/autoconf.
2970 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2971 submodules/autoconf.
2972
2973 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2974
2975 Simplify last patch slightly.
2976 * src/getargs.c (getargs): Here.
2977
2978 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2979
2980 Fix last warning from --enable-gcc-warnings.
2981 * src/getargs.c (getargs): Don't assign const address to non-const
2982 pointer.
2983
2984 2008-11-17 Di-an Jan <dianj@freeshell.org>
2985
2986 Handle --enable-gcc-warnings.
2987 * src/getargs.c (command_line_location): Set parameters to void.
2988
2989 2008-11-11 Akim Demaille <demaille@gostai.com>
2990
2991 AT_FULL_COMPILE.
2992 * tests/actions.at, tests/regression.at: Use it.
2993
2994 2008-11-07 Akim Demaille <demaille@gostai.com>
2995
2996 Pass command line location to skeleton_arg and language_argmatch.
2997 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2998 The location argument is now mandatory.
2999 Adjust all dependencies.
3000 (getargs): Use command_line_location.
3001
3002 2008-11-07 Akim Demaille <demaille@gostai.com>
3003
3004 -D, --define.
3005 * src/getargs.c (usage): Document -D.
3006 Fix help string for --locations.
3007 (command_line_location): New.
3008 (short_options, long_options, getargs): Support -D, --define.
3009 (getargs): Move -d support at the right place.
3010 * doc/bison.texinfo (Bison Options): Update.
3011 * tests/input.at (%define, --define): New.
3012
3013 2008-11-07 Akim Demaille <demaille@gostai.com>
3014
3015 Initialize the muscle table before parsing the command line.
3016 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
3017 (getargs): Define file_name.
3018 * src/main.c (main): Initialize muscle_tab before calling
3019 getargs.
3020 * src/muscle_tab.c (muscle_init): No longer define file_name, as
3021 its value is not available yet.
3022
3023 2008-11-09 Akim Demaille <demaille@gostai.com>
3024
3025 Require the generation of parse-gram.output.
3026 * src/Makefile.am (YACC): Pass --report=all.
3027
3028 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3029
3030 * NEWS (2.5): New stub.
3031
3032 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3033
3034 Fix options documentation.
3035 * build-aux/cross-options.pl: As in --help output, write optional
3036 arguments as [=ARG] not =[ARG].
3037 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
3038
3039 2008-11-07 Akim Demaille <demaille@gostai.com>
3040
3041 Fix --help.
3042 * src/getargs.c (usage): Fix help string for -W.
3043
3044 2008-11-07 Akim Demaille <demaille@gostai.com>
3045
3046 Handle more general types of option arguments.
3047 * build-aux/cross-options.pl: The argument ends at the first
3048 space, not the first non-symbol character.
3049 Use @var for each word appearing the argument description.
3050
3051 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3052
3053 Remove spurious initial empty lines.
3054 * data/location.cc: End the @output lines with an @.
3055
3056 2008-11-04 Akim Demaille <demaille@gostai.com>
3057
3058 Remove spurious initial empty lines.
3059 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3060 * data/yacc.c: End the @output lines with an @.
3061
3062 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3063
3064 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
3065 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
3066 requirements for a correct m4 are stricter.
3067 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
3068 * configure.ac: Update to use AC_PROG_GNU_M4.
3069 Reported by Eric Blake.
3070
3071 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3072
3073 Help with updating web manual.
3074 * HACKING: Incorporate instructions from gnulib/doc/README.
3075 * bootstrap.conf (gnulib_modules): Add gendocs.
3076
3077 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3078
3079 Fix strange %define locations for default values.
3080 Reported by Akim Demaille at
3081 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
3082 and discussed again starting at
3083 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
3084 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
3085 because location information is bogus.
3086 Use angle brackets to delimit fake file name because square brackets
3087 look like underexpanded m4. Choose a better fake file name.
3088 Use negative line numbers.
3089 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
3090 * src/location.c (location_print): If line for a boundary is negative,
3091 only print that boundary's file name.
3092 * src/location.h: Document that.
3093 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3094 defaults): Update output.
3095
3096 2008-11-07 Akim Demaille <demaille@gostai.com>
3097
3098 Locations without columns for command line arguments.
3099 * src/location.c (location_print): Don't display negative columns.
3100 * src/location.h: Document this.
3101
3102 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3103
3104 Add reminder about uploading public key to keys.gnupg.net.
3105 * HACKING (Release Procedure): Here.
3106
3107 2009-03-31 Akim Demaille <demaille@gostai.com>
3108
3109 bootstrap: --help to stdout.
3110 * bootstrap (usage): Don't send --help to stderr.
3111 Use a here doc instead of a long string.
3112
3113 2009-03-31 Akim Demaille <demaille@gostai.com>
3114
3115 bootstrap: README-hacking no longer exists
3116 * bootstrap (checkout_only_file): Set to HACKING.
3117
3118 2009-03-26 Akim Demaille <demaille@gostai.com>
3119
3120 doc: merge HACKING and README-hacking.
3121 Two files is confusing.
3122 Reported by Alexandre Duret-Lutz.
3123
3124 * README-hacking: Merge into...
3125 * HACKING (Working from the repository): here.
3126
3127 2009-03-26 Akim Demaille <demaille@gostai.com>
3128
3129 doc: update README-hacking.
3130 * README-hacking: We now use git and git submodules.
3131 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
3132
3133 2009-03-26 Akim Demaille <demaille@gostai.com>
3134
3135 lalr1.cc: avoid GCC 4.3 warnings.
3136 GCC 4.3 now warns about "a || b && c" and asks for explicit
3137 parentheses.
3138 Reported by Alexandre Duret-Lutz.
3139 * data/location.cc: Update copyright years.
3140 (Position::operator==): Use parens to make precedence explicit.
3141 Compare lines and columns first, as they are more likely to be
3142 different, and they are faster to compare.
3143
3144 2009-03-26 Akim Demaille <demaille@gostai.com>
3145
3146 gnulib: update.
3147 * gnulib: Update to latest.
3148 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
3149 use +=.
3150
3151 2009-01-08 Akim Demaille <demaille@gostai.com>
3152
3153 Fix grep portability issues.
3154 Grep on Solaris does not support -q.
3155 Reported by Summum Bonum.
3156
3157 * NEWS: Add a stub for 2.4.2.
3158 * THANKS: Add Summum Bonum.
3159 * tests/atlocal.in (EGREP): New.
3160 (CC, CXX, XSLTPROC): Make it possible to override them via
3161 envvars.
3162 * tests/java.at: Use $EGREP instead of egrep.
3163 Use AT_CHECK's ignore instead of grep's -q.
3164
3165 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
3166
3167 Version 2.4.1.
3168 * NEWS: Set version and date.
3169 * lib/Makefile.am: Update copyright year.
3170 * tests/atlocal.in: Update copyright year.
3171
3172 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
3173
3174 Semicolon feature removal is not about future language support.
3175 * NEWS: The semicolon feature is no longer active for newer languages,
3176 so don't claim that it causes trouble for them.
3177
3178 2008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
3179
3180 * gnulib: Update submodule to HEAD.
3181
3182 2008-12-09 Akim Demaille <demaille@gostai.com>
3183
3184 Update data/README.
3185 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3186
3187 2008-12-05 Eric Blake <ebb9@byu.net>
3188
3189 Build testsuite with newer autoconf.
3190 * tests/output.at (m4_expand): Don't override in newer autoconf,
3191 where the underlying implementation changed.
3192 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3193 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3194 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3195 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3196 since some of them contain unbalanced ')'.
3197
3198 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
3199
3200 * NEWS: Clarify a little.
3201
3202 2008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
3203
3204 * NEWS: Update for recent changes.
3205
3206 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3207
3208 Fix unexpanded macros in GLR defines file.
3209 Reported by Csaba Raduly at
3210 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3211 * THANKS (Csaba Raduly): Add.
3212 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3213 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3214 lexer in a separate module that includes the defines file.
3215 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
3216 source.
3217 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3218 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3219 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3220 (AT_DATA_SOURCE_PROLOGUE): New.
3221 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3222 (AT_DATA_SOURCE): New.
3223 (AT_FULL_COMPILE): New, copied from master branch and extended to
3224 support an additional source file.
3225
3226 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3227
3228 Don't let maintainer-*-check targets force a version update.
3229 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3230 handled.
3231
3232 2008-11-17 Di-an Jan <dianj@freeshell.org>
3233
3234 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3235 Align menus. Adjust word wrapping. Use node names for menu names.
3236 (Examples): Don't abbreviate node names.
3237 (LocalWords): Remove abbreviations.
3238 (Copying): Make description a sentence.
3239 (Java Action Features): Remove period to match the rest of menu.
3240
3241 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
3242
3243 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3244 * configure.ac: Adjust usage.
3245 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3246 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3247 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3248
3249 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3250
3251 Don't add a semicolon to actions for %skeleton or %language.
3252 It breaks Java test cases as reported by Akim Demaille.
3253 * src/scan-code.l: Implement.
3254
3255 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3256
3257 Clean up %skeleton and %language priority implementation.
3258 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3259 remove static qualifier because others will soon need to see it.
3260 (language_prio): Likewise.
3261 (getargs): Use command_line_prio rather than 0.
3262 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3263 enum fields.
3264 (skeleton_prio): Extern it.
3265 (language_prio): Extern it.
3266 * src/parse-gram.y: Use grammar_prio rather than 1.
3267
3268 2008-11-04 Akim Demaille <demaille@gostai.com>
3269
3270 * NEWS: Mention the trailing semicolon in action.
3271
3272 2008-11-04 Akim Demaille <demaille@gostai.com>
3273
3274 Reformat NEWS.
3275 * NEWS: Use more outline-mode markup.
3276 Suggested by Jim Meyering.
3277
3278 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3279
3280 Fix user actions without a trailing semicolon.
3281 Reported by Sergei Steshenko at
3282 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3283 * THANKS (Sergei Steshenko): Add.
3284 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3285 * tests/regression.at (Fix user actions without a trailing semicolon):
3286 New test case.
3287
3288 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3289
3290 Initiate further development.
3291 * NEWS: Create an empty section for new entries.
3292 * gnulib: Update submodule to HEAD.
3293
3294 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3295
3296 * NEWS: Version 2.4.
3297
3298 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3299
3300 Prepare for next release.
3301 * NEWS: Briefly mention changes since 2.3b.
3302 * README: Say GNU m4 1.4.6, which we've been requiring in release
3303 announcements already, not 1.4.3, which breaks the build.
3304
3305 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3306
3307 Say %language is experimental.
3308 We're thinking of extending it's effect on output file naming. See the
3309 thread at
3310 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3311 * NEWS: Say it's experimental.
3312 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3313 recommend it over %skeleton for now.
3314 (Bison Options): Likewise.
3315 (C++ Bison Interface): Use %skeleton not %language.
3316 (Calc++ Parser): Use %skeleton not %language.
3317 * src/getargs.c (usage): Say it's experimental.
3318
3319 2008-11-01 Di-an Jan <dianj@freeshell.org>
3320 Paolo Bonzini <bonzini@gnu.org>
3321
3322 Support all Java parser class modifiers.
3323 * data/java.m4 (b4_percent_define_get3): New.
3324 (b4_final_if, b4_strictfp_if): New.
3325 * data/lalr1.java (final, strictfp, extends, implements): Support.
3326 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3327 documentation.
3328 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3329 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3330 (AT_CHECK_JAVA_GREP): New.
3331 (Java parser class modifiers): New test.
3332 (Java parser class extends and implements): New test.
3333
3334 Model exception propagation better with throws and lex_throws.
3335 * data/java.m4 (b4_list2): New.
3336 (throws): Change default.
3337 * data/lalr1.java (yyaction): Add throws.
3338 (parse): Add lex_throws in addition to throws.
3339 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3340 * tests/java.at (Java throws specifications): New test.
3341
3342 Improve documentation for Java parsers.
3343 * doc/bison.texinfo (Java Parsers): Add subsections.
3344 Don't quote first argument of %define.
3345 (Java Bison Interface): Document output files. Move documentation
3346 of parser class and merge into Java Parser Interface. Document
3347 features that error out. Document directives with no effect.
3348 Move note about Javadoc higher.
3349 (Java Semantic Values): Explicitly mention stype.
3350 Document that generic types cannot be used.
3351 (Java Location Values): Use @deftypeivar. Document constructors.
3352 Correct return value for toString.
3353 (Java Parser Interface): List undocumented constants/fields.
3354 Move documentation of fields added by %parse-param closer to list
3355 of members. Document that token names are added as fields.
3356 Document constructors accurately. Remove error method.
3357 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3358 Interface. Describe %code lexer and yylex accutately.
3359 Remove documentation that does not match the code.
3360 (Java Action Features): New.
3361 (Java Differences): Add reference. Add item on semantic values.
3362 Add note about @{ ... @}. Clarify %% epilogue placement.
3363 (Java Declarations Summary): New.
3364
3365 Fix Java skeleton.
3366 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3367 (b4_remove_comma): Quote test argument.
3368 (b4_identification): Remove "bison" field.
3369 * tests/java.at (Java parser class and package names): New test.
3370 (Java %parse-param and %lex-param): New test.
3371 (Java stype, position_class and location_class): New test.
3372
3373 2008-10-31 Di-an Jan <dianj@freeshell.org>
3374
3375 * data/lalr1.jave: Update copyright years.
3376 (YYParser): Correct name of "generated from" file in Javadoc:
3377 use b4_file_name instead of @ofile@.
3378 (Location constructor): Correct Javadoc parameter name.
3379 (yylloc): Add missing opening m4 quote after b4_location_if.
3380 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3381 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3382 (YYParser constructor): Correct Javadoc parameter name.
3383
3384 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3385
3386 Always put auxiliary code files in the same dir as other output files.
3387 * src/files.c (compute_file_name_parts): When the user specifies
3388 --output but not --file-prefix, extract the directory prefix from the
3389 file prefix not from the grammar file name. This affects the location
3390 of files like location.hh generated by the C++ skeleton. The includes
3391 in the other output files require this fix.
3392 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3393 for expected output files.
3394 (Output files): Add a test for the above.
3395
3396 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3397
3398 * gnulib: Update submodule to HEAD.
3399
3400 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3401
3402 Update copyright year.
3403 * src/files.c: Here.
3404
3405 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3406
3407 Don't overwrite the input file.
3408 * src/files.c (output_file_name_check): Fatal error if using input file
3409 for output.
3410 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3411 argument.
3412 (Conflicting output files): Add test.
3413
3414 2008-10-28 Akim Demaille <demaille@gostai.com>
3415
3416 Space changes.
3417 * data/lalr1.cc: Formatting changes.
3418
3419 2008-10-28 Akim Demaille <demaille@gostai.com>
3420
3421 Don't define debugging functions when !YYDEBUG.
3422 * data/lalr1.cc (debug_stream, set_debug_stream)
3423 (debug_level_type, debug_level, set_debug_level): Don't
3424 declare them when YYDEBUG is not defined.
3425 The implementation are already YYDEBUG-aware.
3426
3427 2008-10-28 Akim Demaille <demaille@gostai.com>
3428
3429 Prefer "continue" for empty loop bodies.
3430 * etc/bench.pl.in: Use "continue" instead of {}.
3431
3432 2008-10-28 Akim Demaille <demaille@gostai.com>
3433
3434 Space and comments changes.
3435 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3436 * data/c.m4, data/lalr1.cc: Space changes.
3437
3438 2008-10-28 Akim Demaille <demaille@gostai.com>
3439
3440 Make gnulib a submodule.
3441 * gnulib: New.
3442 * .gitmodules (gnulib): New.
3443
3444 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3445
3446 Fix yyerror_range for user-defined location type in C++. Reported by
3447 Georg Sauthoff at
3448 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3449 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3450 * THANKS (Georg Sauthoff): Add.
3451
3452 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3453
3454 Update several administrative files mainly to facilitate releasing.
3455 * HACKING (Administrivia): Make the git-merge-changelog notes more
3456 helpful.
3457 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3458 (Release Procedure): Update for git and add numerous details that were
3459 previously missing.
3460 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3461 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3462 that announcements don't claim we bootstrapped with whatever bison
3463 happened to be in PATH. Add flex as a bootstrap tool.
3464 * Makefile.maint: Remove, previously replaced by maint.mk.
3465 * Makefile.cfg: Remove, and migrate settings to...
3466 * cfg.mk: ... here for the sake of `make announcement'.
3467 * bootstrap.conf (gnulib_modules): Add announce-gen.
3468 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3469 Berry.
3470
3471 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3472
3473 Small but important bugfixes for the Java skeleton.
3474 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3475 (yy_symbol_print): Call toString on yyvaluep.
3476
3477 2008-08-29 Akim Demaille <demaille@gostai.com>
3478
3479 Clarify UPDATED use.
3480 * doc/bison.texinfo: It refers to the last edition of this file,
3481 not to the release date of Bison.
3482 Reported by Joel E. Denny.
3483
3484 2008-08-29 Akim Demaille <demaille@gostai.com>
3485
3486 * README: Update FAQ pointer.
3487 Reported by Joel E. Denny.
3488
3489 2008-08-27 Eric Blake <ebb9@byu.net>
3490
3491 Resync m4sugar from autoconf.
3492 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3493 (m4_init): Adjust to latest m4.git changes.
3494 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3495 effects.
3496 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3497 (_m4_list_cmp): Reduce side effects.
3498
3499 2008-08-27 Akim Demaille <demaille@gostai.com>
3500
3501 Check yyerrok in calc.at.
3502 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3503 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3504 expected.
3505
3506 2008-08-27 Akim Demaille <demaille@gostai.com>
3507
3508 Support yyerrok in lalr1.cc.
3509 YYBACKUP is still to import back into lalr1.cc.
3510 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3511
3512 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3513
3514 For maintainer-check*, don't recompile for a $(VERSION) update.
3515 * cfg.mk: New file.
3516 (_is-dist-target): Override the one in GNUmakefile.
3517 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3518
3519 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3520
3521 Update for recent change to gnulib.
3522 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3523 string.h now.
3524
3525 2008-08-15 Eric Blake <ebb9@byu.net>
3526
3527 Remaining m4sugar merge from autoconf.
3528 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3529 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3530 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3531 * src/output.c (output_skeleton): Tell m4 how to find it.
3532
3533 Partial m4sugar merge from autoconf: m4_map.
3534 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3535 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3536 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3537 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3538 for empty list.
3539 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3540 Likewise.
3541 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3542 declares it.
3543
3544 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3545
3546 Keep .version and PACKAGE_VERSION in sync.
3547 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3548 dependency, and add comments justifying this in more detail. Discussed
3549 starting at
3550 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3551
3552 2008-08-06 Eric Blake <ebb9@byu.net>
3553
3554 Partial m4sugar merge from autoconf: m4_shiftn.
3555 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3556 (m4_shift2, m4_shift3): New macros.
3557 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3558 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3559 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3560 * data/java.m4 (b4_remove_comma): Likewise.
3561
3562 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3563 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3564 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3565 (m4_init): Consolidate wrapped text into single m4_wrap.
3566 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3567 in wrapped text.
3568
3569 2008-08-05 Eric Blake <ebb9@byu.net>
3570
3571 Partial m4sugar merge from autoconf: builtins, version.m4.
3572 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3573 (m4_prepend): Remove, as it is unused and inherently quadratic,
3574 whereas m4_append is linear in newer m4.
3575 (m4_mkstemp): New builtin.
3576 (m4_symbols): Make rename conditional.
3577 (m4_version_prereq): Ensure fatal error if used in bison, which
3578 intentionally lacks version.m4.
3579
3580 Fix comments in m4sugar.
3581 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3582
3583 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3584
3585 Update for recent .gitignore fix in Gnulib.
3586 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3587 anchored .gitignore entries.
3588
3589 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3590
3591 Set gnu or gnits strictness.
3592 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3593 development and gnits strictness for releases. Based on Eric Blake's
3594 suggestion at
3595 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3596
3597 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3598
3599 * NEWS: Clarify documentation of %language.
3600
3601 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3602
3603 Support usage of git-merge-changelog.
3604 * .gitattributes: New.
3605 * HACKING: Document usage of git-merge-changelog.
3606 * bootstrap: Install git-merge-changelog entries in .git/config
3607 if appropriate.
3608
3609 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3610
3611 Remove remaining dependence on CVS Id keyword.
3612 * ChangeLog: For the sake of people still using CVS, don't use dollars
3613 when mentioning Id.
3614 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3615 unusual anyway.
3616 * data/xslt/xml2dot.xsl: Likewise.
3617 * data/xslt/xml2text.xsl: Likewise.
3618 * data/xslt/xml2xhtml.xsl: Likewise.
3619 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3620 * doc/Makefile.am (neutralize): Remove, no longer needed.
3621 (.x.1): Don't use neutralize.
3622 (edit): Don't substitute for ID.
3623 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3624
3625 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3626
3627 Fix dependence on computed configure variables.
3628 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3629 $(top_srcdir)/configure.ac so that changes to computed variables, such
3630 as PACKAGE_VERSION, are seen.
3631 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3632
3633 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3634
3635 Update copyright dates for recent changes.
3636 * Makefile.am: Here.
3637 * src/Makefile.am: Here.
3638 * src/reduce.c: Here.
3639 * tests/reduce.at: Here.
3640
3641 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3642
3643 Use git-version-gen for version names between releases.
3644 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3645 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3646 * .prev-version: New.
3647 * .version.in: Remove.
3648 * ChangeLog: Remove the Id previously used for capturing the CVS
3649 revision.
3650 * GNUmakefile: Remove, now copied from Gnulib.
3651 * Makefile.am: Add code suggested by comments in
3652 build-aux/git-version-gen.
3653 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3654 .prev-version, and .version.
3655 * NEWS (2.3b+): Rename to...
3656 (?.?): ... this because we're dropping the "+" version naming scheme,
3657 but, in general, we still can't be sure of our next release name.
3658 * bootstrap: Add a quick hack to remove from .gitignore the
3659 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3660 entry. This should really be fixed in gnulib instead.
3661 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3662 * configure.ac (AC_INIT): Set version name by invoking
3663 build-aux/git-version-gen.
3664 (AC_CONFIG_FILES): Remove .version, now generated by
3665 build-aux/git-version-gen.
3666 * maint.mk: New, copied from coreutils.
3667 * doc/.cvsignore (bison.1): Add.
3668 * doc/.gitignore (/bison.1): Add.
3669 * doc/bison.1: Remove, generated.
3670 * src/.cvsignore (revision.c): Remove.
3671 * src/.gitignore (/revision.c): Remove.
3672 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3673 (BUILT_SOURCES): Remove revision.c.
3674 (revision.c): Remove.
3675 * src/getargs.c (version): Don't print revision after the VERSION.
3676 * src/revision.h: Remove.
3677
3678 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3679
3680 Fix untranslatable composition of sentences. Reported by Goran
3681 Uddeborg at
3682 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3683 * THANKS (Goran Uddeborg): Add.
3684 * src/reduce.c (reduce_print): Report the number of nonterminals and
3685 rules useless in the grammar in separate sentences.
3686 * tests/reduce.at (Useless Rules): Update output.
3687 (Reduced Automaton): Likewise.
3688 (Underivable Rules): Likewise.
3689 (Empty Language): Likewise.
3690
3691 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3692
3693 Fix some .gitignore and .cvsignore problems.
3694 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3695 (insert_vc_ignore): ... this new function, which prepends `/' to all
3696 .gitignore entries before passing them to insert_sorted_if_absent.
3697 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3698 .cvsignore files are maintained even though Bison developers run
3699 bootstrap while using Git.
3700 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3701 unneeded by Bison.
3702 (gnulib): Add.
3703 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3704 unneeded. Reported by Eric Blake.
3705 * lib/.gitignore (/*~): Add.
3706 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3707 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3708 Blake.
3709 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3710
3711 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3712
3713 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3714 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3715 * bootstrap.conf (gnulib_modules): Add unsetenv.
3716 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3717 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3718 (/setenv.m4): Add.
3719 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3720 the first argument because it may become position-dependent, and unset
3721 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3722 Add comments explaining these issues in more detail.
3723
3724 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3725
3726 Add .gitignore everywhere based on .cvsignore.
3727 * .gitignore: New.
3728 * build-aux/.gitignore: New.
3729 * data/.gitignore: New.
3730 * doc/.gitignore: New.
3731 * etc/.gitignore: New.
3732 * examples/.gitignore: New.
3733 * examples/calc++/.gitignore: New.
3734 * lib/.gitignore: New.
3735 * m4/.gitignore: New.
3736 * po/.gitignore: New.
3737 * runtime-po/.gitignore: New.
3738 * src/.gitignore: New.
3739 * tests/.gitignore: New.
3740
3741 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3742
3743 * NEWS (2.3b+): New section, empty for now.
3744 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3745
3746 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3747
3748 * NEWS (2.3b): Update release date since there has been a delay in
3749 getting the announcements and tarballs out.
3750
3751 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3752
3753 * NEWS: Version 2.3b.
3754 * configure.ac (AC_INIT): Likewise.
3755 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3756
3757 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3758
3759 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3760 been doing it for years.
3761 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3762 (Release Procedure): Add FIXME about make alpha being unmaintained.
3763
3764 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3765
3766 * data/yacc.c: Reformat m4 a little for readability.
3767 * src/lalr.c (build_relations): Correct comment.
3768
3769 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3770
3771 DJGPP specific issue.
3772 * djgpp/config.sed: Fixes required to run configure scripts generated
3773 by autoconf 2.62.
3774
3775 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3776
3777 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3778 coordinator@translationproject.org.
3779
3780 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3781
3782 * THANKS: Add Eric Blake.
3783
3784 2008-04-23 Eric Blake <ebb9@byu.net>
3785
3786 Revert prior patch, by working around autoconf regression.
3787 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3788 ("Output file name: ("): Uncomment test.
3789 ("Output file name: )"): Likewise.
3790 Based on an idea from Noah Misch.
3791
3792 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3793
3794 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3795 2.61. Reported by Juan Manuel Guerrero at
3796 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3797 * tests/output.at ("Output file name: ("): Comment out test case for
3798 now.
3799 ("Output file name: )"): Likewise.
3800
3801 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3802
3803 * GNUmakefile: Update git-version-gen invocation so make dist
3804 succeeds.
3805
3806 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3807
3808 Update to the current gnulib CVS repository, and fix trigraph handling
3809 in Bison.
3810 * bootstrap: Update gnulib CVS repository URL.
3811 (symlink_to_dir): Encapsulate the code that guarantees the destination
3812 directory exists into...
3813 (check_dst_dir): ... this new function, and...
3814 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3815 fail when copying files into lib/uniwidth/.
3816 * src/output.c (prepare_symbols): When writing yytname muscles, where
3817 symbol names will be encoded in C-string literals, tell quotearg to
3818 escape trigraphs. This used to be the default in gnulib.
3819 * tests/regression.at (Token definitions): Because of the change in
3820 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3821 escapes trigraphs in symbol names. Thus, yytname no longer has
3822 trigraphs unnecessarily doubly escaped. Update test case output.
3823 Extend test case to be sure Bison's own error messages will no longer
3824 have trigraphs in symbol names unnecessarily escaped once.
3825
3826 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3827
3828 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3829 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3830 * .cvsignore: Add .version.
3831 * .version.in: New.
3832 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3833 * configure.ac (AC_CONFIG_FILES): Add .version.
3834 * build-aux/.cvsignore: Add git-version-gen.
3835
3836 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3837
3838 * NEWS (2.3a+): Mention that -g now takes an argument.
3839 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3840 consistency. Update the -g and -x entries now that they take
3841 arguments. Use brackets to indicate optional arguments.
3842 * src/getargs.c (usage): Explain the relationship between arguments of
3843 long and short options more completely. Document --defines and -d
3844 separately since the former takes an argument but, for POSIX Yacc, the
3845 latter does not.
3846 (short_options): Let -W take an optional argument like --warnings.
3847 (getargs): Sort cases.
3848
3849 2008-02-28 Akim Demaille <demaille@gostai.com>
3850
3851 * doc/bison.texinfo: Fix a few typos.
3852
3853 2008-02-28 Akim Demaille <akim@epita.fr>
3854
3855 * doc/bison.texinfo (Bison Options): Document -W.
3856 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3857
3858 2008-02-28 Akim Demaille <akim@epita.fr>
3859
3860 * src/getargs.c (short_options): Split and sort for readability.
3861 -g and -x take optional arguments, just like their long options.
3862 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3863 understand.
3864 Fix the handling of $opt which resulted in all the argument to be
3865 considered as optional.
3866
3867 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3868
3869 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3870 say its interface is experimental.
3871 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3872 Java.
3873 (Bison Options): In the -L and --language entry, mention Java.
3874 (Java Bison Interface): Say the interface is experimental.
3875 * src/getargs.c (usage): Mention -L and --language.
3876
3877 * NEWS (2.3a+): Say the push parsing interface is experimental.
3878 * doc/bison.texinfo (Push Decl): Likewise.
3879 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3880 (Push Parser Function): Likewise.
3881 (Pull Parser Function): Likewise.
3882 (Parser Create Function): Likewise.
3883 (Parser Delete Function): Likewise.
3884 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3885 yypull_parse, and yypush_parse entries.
3886
3887 * NEWS (2.3a+): Mention XML support, and say the schema is
3888 experimental.
3889 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3890 * src/getargs.c (usage): Say the XML schema is experimental.
3891
3892 * NEWS (2.3a+): Say option instead of flag.
3893
3894 2008-02-21 Wojciech Polak <polak@gnu.org>
3895
3896 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3897 text.
3898
3899 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3900
3901 Fix impure push parser compile error reported by Bob Rossi at
3902 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3903 * data/yacc.c: Clean up whitespace in the output a little.
3904 (yypstate_allocated): Define for impure push parsers regardless of
3905 whether the pull interface is also requested.
3906 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3907 check impure push parsers without the pull interface.
3908
3909 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3910 yyerror takes arguments specified by %parse-param while yypstate_new
3911 does not.
3912 * doc/bison.texinfo (Parser Create Function): Document that
3913 yypstate_new returns 0 for multiple impure parser instances.
3914 * tests/push.at (Push Parsing: Multiple impure instances): Update
3915 expected stderr output.
3916
3917 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3918
3919 * runtime-po/POTFILES.in (push.c): Remove.
3920
3921 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3922
3923 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3924 * data/push.c: Rename to...
3925 * data/yacc.c: ... this, overwriting it.
3926 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3927 `%push-pull-parser' -> `%define api.push_pull "both"'.
3928 Remove old yacc.c tests, and update push.c tests to yacc.c.
3929
3930 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3931
3932 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3933 `"%code top" blocks' instead of `%code "top" blocks'.
3934 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3935 Clean up whitespace in the output a little.
3936
3937 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3938
3939 Fix documentation problems reported by Tim Josling at
3940 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3941 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3942 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3943 integers. Explain the effect of literal string aliases on error
3944 messages. Copy token 0 documentation from the C++ skeleton
3945 documentation.
3946
3947 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3948
3949 Accept a token number in a %left, %right, or %nonassoc for POSIX
3950 conformance. Reported by Tim Josling at
3951 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3952 * NEWS (2.3a+): Mention.
3953 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3954 and code numbers are treated by precedence declarations.
3955 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3956 of symbols.1.
3957 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3958 of symbol.
3959 (symbol.prec): New, just like symbol but allows INT.
3960 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3961 longer holds.
3962 * tests/regression.at (Token number in precedence declaration): New
3963 test case.
3964
3965 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3966
3967 DJGPP specific issues.
3968 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3969 be changed. Copyright timestamp adjusted.
3970 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3971 be changed. Copyright timestamp adjusted.
3972 * djgpp/config.site: Copyright timestamp adjusted.
3973 * djgpp/config_h.sed: Copyright timestamp adjusted.
3974 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3975 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3976 filename translation list.
3977 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3978 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3979 files shall be created. Before trying to use the temp dir where the
3980 environment variable points to check that the dir really exists. If
3981 not default to the cwd as temp dir. Copyright timestamp adjusted.
3982 * djgpp/subpipe.h: Copyright timestamp adjusted.
3983 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3984
3985 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3986
3987 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3988
3989 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3990
3991 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3992 Problem reported by Claudio Saavedra in
3993 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3994
3995 2008-01-05 Wojciech Polak <polak@gnu.org>
3996
3997 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3998 document's title with the input grammar file name.
3999
4000 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
4001
4002 Automate regression testing of the XML/XSLT implementation. Discussed
4003 starting at
4004 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4005 * configure.ac (XSLTPROC): New substitution.
4006 * Makefile.am (maintainer-xml-check): New phony target invoking...
4007 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4008 invoking make maintainer-check with BISON_TEST_XML=1.
4009 * tests/atlocal.in (XSLTPROC): New.
4010 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4011 not to report reachable memory when Bison is expected to have a
4012 non-zero exit status and (2) to compare XML/XSLT output with --graph
4013 and --report=all output for every working grammar when
4014 BISON_TEST_XML=1.
4015 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4016 (AT_BISON_CHECK_XML): New.
4017 (AT_QUELL_VALGRIND): New.
4018 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4019 (AT_CHECK): ... don't redefine this since this was the old way to
4020 quell Valgrind.
4021 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4022 AT_BISON_CHECK invocations.
4023 * tests/c++.at: Likewise.
4024 * tests/calc.at: Likewise.
4025 * tests/conflicts.at: Likewise.
4026 * tests/cxx-type.at: Likewise.
4027 * tests/existing.at: Likewise.
4028 * tests/glr-regression.at: Likewise.
4029 * tests/headers.at: Likewise.
4030 * tests/input.at: Likewise.
4031 * tests/java.at: Likewise.
4032 * tests/output.at: Likewise.
4033 * tests/push.at: Likewise.
4034 * tests/reduce.at: Likewise.
4035 * tests/regression.at: Likewise.
4036 * tests/sets.at: Likewise.
4037 * tests/skeletons.at: Likewise.
4038 * tests/synclines.at: Likewise.
4039 * tests/torture.at: Likewise.
4040 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4041 tends to hang xsltproc.
4042 (Big horizontal): Likewise.
4043
4044 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4045
4046 In XML output, remove redundant class attribute on symbol element.
4047 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4048 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4049 look up a symbol to determine whether it's a nonterminal or terminal.
4050 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4051 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4052
4053 Add prec/assoc information to XML output.
4054 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4055 %prec, add a percent_prec attribute.
4056 * src/print-xml.c (print_grammar): For each terminal that has a
4057 precedence or associativity, add a prec or assoc attribute.
4058 (xml_indent): New.
4059 (xml_puts): Use xml_indent.
4060 (xml_printf): Use xml_indent.
4061 * src/print-xml.h (xml_indent): Prototype.
4062
4063 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4064 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4065
4066 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4067
4068 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4069 (bison:ruleByNumber): ... this for clarity.
4070 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4071 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4072 (xsl:template match="reduction"): Update.
4073 (xsl:template match="item"): Update.
4074 (xsl:template match="reduction"): Update.
4075
4076 In the XML output, don't print the list of rules where symbols appear.
4077 Compute it in XSLT instead. Discussed at
4078 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4079 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4080 (bison:ruleByRhs): New.
4081 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4082 bison:ruleByRhs.
4083 (xsl:template match="terminal/rule"): Remove.
4084 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4085 bison:ruleByRhs.
4086 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4087 Remove.
4088 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4089 bison:ruleByRhs and mode="number-link" for rule template.
4090 (xsl:template match="terminal/rule"): Remove.
4091 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4092 bison:ruleByRhs and mode="number-link" for rule template.
4093 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4094 Rewrite as...
4095 (xsl:template match="rule" mode="number-link"): ... this.
4096 * src/print-xml.c (print_grammar): Don't print the list of rules.
4097
4098 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4099
4100 Don't let --report affect XML output; always print all information.
4101 Discussed at
4102 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4103 * src/conflicts.c (log_resolution): Implement.
4104 * src/print-xml.c (print_core): Implement.
4105 (print_state): Implement.
4106 (print_xml): Implement.
4107
4108 * NEWS (2.3a+): Fix quotes.
4109 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4110 don't let %verbose clear the list specified by --report.
4111
4112 2007-11-26 Akim Demaille <akim@epita.fr>
4113
4114 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4115
4116 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4117
4118 In the XML output, list useless and unused symbols and rules with the
4119 useful ones and add a "usefulness" attribute. Discussed starting at
4120 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4121 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4122 (grammar_rules_print_xml): Print all rules instead of just those
4123 useful in the grammar, and add a "usefulness" attribute.
4124 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4125 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4126 (print_grammar): Print all nonterminals instead of just useful ones,
4127 and add a "usefulness" attribute to nonterminals and terminals.
4128 (print_xml): Don't print a separate "reductions" or
4129 "rules-useless-in-parser" element.
4130 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4131 (reduce_xml): Remove.
4132 (reduce_token_unused_in_grammar): New.
4133 (reduce_nonterminal_useless_in_grammar): New.
4134 * src/reduce.h (reduce_xml): Remove prototype.
4135 (reduce_token_unused_in_grammar): Add prototype.
4136 (reduce_nonterminal_useless_in_grammar): Add prototype.
4137 * data/xslt/xml2text.xsl: Update for XML changes.
4138 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4139 * tests/reduce.at (Useless Terminals): Update output.
4140 (Useless Rules): Update output.
4141 (Reduced Automaton): Update output.
4142
4143 Say "Terminals unused in grammar" instead of "Unused terminals".
4144 * NEWS (2.3a+): Update.
4145 * doc/bison.texinfo (Understanding): Update example output.
4146 * src/reduce.c (reduce_output): Implement.
4147 * data/xslt/xml2text.xsl: Implement.
4148 * data/xslt/xml2xhtml.xsl: Implement.
4149
4150 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4151
4152 Accept --report-file=FILE to override the default `.output' filename.
4153 * NEWS (2.3a+): Mention.
4154 * doc/bison.texinfo (Bison Options): Add an entry.
4155 * src/files.c (compute_output_file_names): Don't override
4156 spec_verbose_file if already set.
4157 * src/getargs.c (usage): Document --report-file.
4158 (REPORT_FILE_OPTION): New anonymous enum member.
4159 (long_options): Add entry for it.
4160 (getargs): Add case for it setting spec_verbose_file.
4161
4162 * build-aux/cross-options.pl: Don't record a short option just because
4163 there's an arg.
4164 * doc/.cvsignore: Add yacc.1.
4165
4166 2007-11-14 Akim Demaille <akim@epita.fr>
4167
4168 * doc/yacc.1.in: New.
4169 * configure.ac, doc/Makefile.am: Adjust.
4170 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4171 config.h symbol.
4172 Use AC_SUBST for assignments too.
4173 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4174
4175 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4176
4177 * src/gram.c: Remove comments that duplicate comments in gram.h.
4178
4179 When reporting useless rules and nonterminals, say "useless in grammar"
4180 instead of "useless", and say "useless in parser" instead of "never
4181 reduced". Discussed starting at
4182 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4183 * NEWS (2.3a+): Mention this change.
4184 * data/xslt/xml2text.xsl: Update output text and expected input XML
4185 element names to match changes below.
4186 * data/xslt/xml2xhtml.xsl: Likewise.
4187 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4188 Contents: "Rules useless in parser due to conflicts".
4189 * doc/bison.texinfo (Decl Summary): Reword a little.
4190 (Understanding): Update example output for changes below.
4191 * src/gram.c: (rule_useful_p): Rename to...
4192 (rule_useful_in_grammar_p): ... this.
4193 (rule_useless_p): Rename to...
4194 (rule_useless_in_grammar_p): ... this.
4195 (rule_never_reduced_p): Rename to...
4196 (rule_useless_in_parser_p): ... this.
4197 (grammar_rules_print): Update for renames.
4198 (grammar_rules_print_xml): Update for renames.
4199 (grammar_rules_never_reduced_report): Rename to...
4200 (grammar_rules_useless_report): ... this since it is used for either
4201 kind of useless rule.
4202 * src/gram.h: Reword comments and update function names in prototypes.
4203 * src/main.c (main): Say "rule useless in parser due to conflicts".
4204 * src/print-xml.c (print_rules_never_reduced): Rename to...
4205 (print_rules_useless_in_parser): ... this, and rename output XML
4206 element "rules-never-reduced" to "rules-useless-in-parser".
4207 (print_xml): Update for rename.
4208 * src/print.c (print_results): Say "Rules useless in parser due to
4209 conflicts".
4210 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4211 (nonterminals_reduce): Say "nonterminal useless in grammar".
4212 (reduce_output): Say "Nonterminals useless in grammar".
4213 Say "Rules useless in grammar".
4214 (reduce_xml): Rename output XML element "useless" to
4215 "useless-in-grammar".
4216 (reduce_print): Don't report the count of grammatically useless rules
4217 as "rules never reduced" just because %yacc is specified.
4218 In the correct report of this count, say nonterminal(s) and rule(s)
4219 "useless in grammar".
4220 * tests/conflicts.at (S/R in initial): Update expected output.
4221 (Defaulted Conflicted Reduction): Likewise.
4222 (Unreachable States After Conflict Resolution): Likewise.
4223 * tests/existing.at (GNU pic Grammar): Likewise.
4224 * tests/reduce.at (Useless Nonterminals): Likewise.
4225 (Useless Rules): Likewise.
4226 (Reduced Automaton): Likewise.
4227 (Underivable Rules): Likewise.
4228 (Empty Language): Likewise.
4229
4230 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4231
4232 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4233 here document and before the EOF so that BSD's implementation of Bourne
4234 shell doesn't parse the delimiter as part of the here document.
4235 * doc/.cvsignore: Add cross-options.texi.
4236 * src/getargs.c (usage): Add a blank line after the warning categories.
4237
4238 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
4239
4240 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4241
4242 2007-11-05 Akim Demaille <akim@epita.fr>
4243
4244 Remove Id: from bison.1.
4245 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4246 (perl -0777 -pi -e 's/\.PP\nId): New.
4247 (.x.1): Use it to ignore the version control revision.
4248
4249 2007-11-05 Akim Demaille <demaille@gostai.com>
4250
4251 * build-aux/Makefile.am: Ship cross-options.pl.
4252 * doc/Makefile.am: Always refer to cross-options.texi with
4253 $(srcdir).
4254 (MAINTAINERCLEANFILES): Add it.
4255
4256 2007-11-04 Akim Demaille <demaille@gostai.com>
4257
4258 Generate the long/short option cross-table.
4259 * build-aux/cross-options.pl: New.
4260 * doc/Makefile.am (cross-options.texi): New.
4261 * doc/bison.texinfo: Use it.
4262
4263 2007-11-04 Akim Demaille <demaille@gostai.com>
4264
4265 Generate bison.1 using help2man.
4266 * doc/common.x, doc/bison.x: New.
4267 * doc/Makefile.am (bison.1, .x.1): New.
4268 The code is taken from autoconf-2.61/man/Makefile.am.
4269 * configure.ac: Look for help2man.
4270
4271 2007-11-04 Akim Demaille <demaille@gostai.com>
4272
4273 Complete --help.
4274 * src/getargs.c (usage): Document -W, make it clear that -d,
4275 -g and -x have optional arguments.
4276
4277 2007-11-04 Akim Demaille <demaille@gostai.com>
4278
4279 Find sha1sum when named gsha1sum.
4280 * bootstrap (find_tool): New.
4281 ($SHA1SUM): New.
4282
4283 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4284
4285 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4286 at
4287 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4288 * NEWS (2.3a+): Mention.
4289 * data/bison.m4 (b4_pure_if): Don't define it here.
4290 * data/c.m4 (b4_identification): Depend on individual skeletons to
4291 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4292 values of the %define variables api.pure or api.push_pull. Define
4293 YYPURE, YYPUSH, and YYPULL accordingly.
4294 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4295 glr.cc has already defined b4_pure_flag.
4296 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4297 Remove YYPUSH and YYPULL since they're back in b4_identification again.
4298 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
4299 * doc/bison.texinfo (Pure Decl): Update.
4300 (Push Decl): Update.
4301 (Decl Summary): Add api.pure to %define entry.
4302 In %pure-parser entry, say it's deprecated and reference %define.
4303 (Pure Calling): Update.
4304 (Error Reporting): Update.
4305 (C++ Scanner Interface): Update.
4306 (How Can I Reset the Parser): Update.
4307 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4308 reference %define.
4309 * src/getargs.c (pure_parser): Remove global variable.
4310 * src/getargs.h (pure_parser): Remove extern.
4311 * src/output.c (prepare): Don't define pure_flag muscle.
4312 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4313 wrapper around `%define api.pure'.
4314 * tests/calc.at (Simple LALR Calculator): Update.
4315 (Simple GLR Calculator): Update.
4316 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4317 Update.
4318 (GLR: Resolve ambiguity, pure, locations): Update.
4319 (GLR: Merge conflicting parses, pure, no locations): Update.
4320 (GLR: Merge conflicting parses, pure, locations): Update.
4321 * tests/glr-regression.at (Uninitialized location when reporting
4322 ambiguity): Update
4323 * tests/input.at (Unused %define api.pure): New test case.
4324 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4325 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4326 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4327
4328 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4329
4330 %define push_pull -> %define api.push_pull. Discussed starting at
4331 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4332 * data/push.c: Expect the new name.
4333 * data/yacc.c: Likewise.
4334 * doc/bison.texinfo (Push Decl): Update.
4335 (Decl Summary): Update %define entry.
4336 (Push Parser Function): Update.
4337 (Pull Parser Function): Update.
4338 (Parser Create Function): Update.
4339 (Parser Delete Function): Update.
4340 * tests/calc.at (Simple LALR Calculator): Update.
4341 * tests/input.at (%define enum variables): Update.
4342 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4343 (Push Parsing: Multiple impure instances): Update.
4344 (Push Parsing: Unsupported Skeletons): Update.
4345 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4346 (Exploding the Stack Size with Malloc): Update.
4347
4348 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4349 other entries some.
4350
4351 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4352
4353 For the XML output's terminal element, rename @number to @token-number,
4354 and add @symbol-number. In the nonterminal element, rename @number to
4355 @symbol-number. Discussed starting at
4356 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4357 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4358 renames.
4359 (xsl:template match="nonterminal"): Likewise.
4360 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4361 (xsl:template match="nonterminal"): Likewise.
4362 * src/print-xml.c (print_grammar): Implement.
4363
4364 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4365
4366 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4367 2007-10-11 change, the child elements here are items not rules.
4368 (xsl:template match="item"): New.
4369 (xsl:template match="rule"): Update for new reduced itemset.
4370 (xsl:template match="point"): Remove.
4371 (xsl:template match="empty"): For consistency with --graph, don't
4372 output "/* empty */".
4373 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4374 line-wrap, don't pass a negative value as first-line-length since this
4375 won't work with the following changes.
4376 (xsl:template name="line-wrap"): Simplify slightly.
4377 (xsl:template name="ws-search"): Eliminate recursion.
4378 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4379 set next to an item whose dot is not at the end of the RHS even if it
4380 happens to be associated with the same rule.
4381
4382 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4383
4384 Add %define lr.keep_unreachable_states.
4385 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4386 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4387 * src/main.c (main): Implement it.
4388 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4389 Extend to test it, and fix a typo.
4390
4391 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4392
4393 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
4394 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4395 the example .output text.
4396 * tests/regression.at (Extra lookahead sets in report): Improve wording
4397 of comments.
4398
4399 2007-10-17 Wojciech Polak <polak@gnu.org>
4400
4401 * src/print-xml.c (print_grammar): Renamed
4402 <terminal> and <nonterminal> attributes:
4403 "type" to "number" and "symbol" to "name".
4404 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4405 Use new attribute names.
4406 (xsl:template match="nonterminal"): Likewise.
4407 * data/xslt/xml2xhtml.xsl: Likewise.
4408
4409 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4410
4411 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4412 (Option Cross Key): Likewise.
4413
4414 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4415 next to an item whose dot is not at the end of the RHS even if it
4416 happens to be associated with the same rule.
4417 * src/print.c (print_core): Likewise.
4418 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4419 (Resolved SR Conflicts): Update output.
4420 * tests/regression.at (Extra lookahead sets in report): New test case.
4421
4422 2007-10-11 Wojciech Polak <polak@gnu.org>
4423
4424 * src/print-xml.c (print_core): Remove item set
4425 redundancy.
4426 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4427 Improve processing time. Suggested by Joel E. Denny.
4428 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4429 Write xsl:param "required" attribute as comment.
4430 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4431 (xsl:template match="rule"): Support new reduced itemset.
4432 (xsl:template match="point"): Remove.
4433 * data/xslt/xml2xhtml.xsl: Likewise.
4434
4435 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4436
4437 * src/getargs.c (version): Update copyright year.
4438
4439 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4440
4441 Make xml2dot.xsl and --graph produce the same output.
4442 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4443 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4444 escaped later.
4445 (xsl:template name="output-node"): Use the new escape template instead
4446 of the string-replace template directly.
4447 (xsl:template name="output-edge"): Likewise.
4448 (xsl:template name="escape"): New, escapes backslashes and newlines in
4449 addition to quotation marks.
4450 * src/graphviz.c (start_graph, output_node, output_edge): Add
4451 whitespace to output for legibility.
4452
4453 Make xml2text.xsl and --report produce the same output, and remove the
4454 XML "conflicts" element since a conflict summary is easily extracted
4455 from the automaton.
4456 * data/xslt/bison.xsl: New.
4457 (xsl:template match="state" mode="bison:count-conflicts): New.
4458 * data/xslt/xml2text.xsl: Import bison.xsl.
4459 (xsl:template match="bison-xml-report"): Instead of styling the
4460 "conflicts" element, style the "automaton" element with mode
4461 "conflicts". Unlike the former, the latter lists S/R and R/R
4462 conflicts for a state on the same line.
4463 (xsl:template match="conflicts"): Remove.
4464 (xsl:template match="conflict"): Remove.
4465 (xsl:template match="terminal"): Line-wrap the list of rules in which
4466 the terminal is used.
4467 (xsl:template match="nonterminal"): Likewise for nonterminals.
4468 (xsl:template match="automaton" mode="conflicts"): New.
4469 (xsl:template match="state" mode="conflicts"): New.
4470 (xsl:template name="line-wrap"): New.
4471 (xsl:template name="ws-search"): New.
4472 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4473 (xsl:template match="bison-xml-report"): Instead of styling the
4474 "conflicts" element, style the "automaton" element with mode
4475 "conflicts."
4476 (xsl:template match="conflicts"): Remove.
4477 (xsl:template match="conflict"): Remove.
4478 (xsl:template match="automaton" mode="conflicts"): New.
4479 (xsl:template match="state" mode="conflicts): New.
4480 * src/conflicts.c (conflicts_output_xml): Remove.
4481 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4482 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4483 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4484 the corresponding XSLT is easier. Also, never wrap between a word and
4485 the comma that follows it.
4486
4487 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4488
4489 Improve C++ namespace support. Discussed starting at
4490 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4491 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4492 b4_namespace_close): New macros that interpret the %define variable
4493 "namespace" so its value can contain "::" to indicate nested
4494 namespaces.
4495 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4496 the above macros.
4497 * data/lalr1.cc (b4_namespace): Likewise.
4498 * data/location.cc (b4_namespace): Likewise.
4499 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4500 inside a new table in the general %define entry. Document `%define
4501 namespace' there as well. Point the %name-prefix entry to it since it
4502 explains it more completely in the case of C++.
4503 (C++ Bison Interface): Mention `%define namespace' instead of
4504 %name-prefix.
4505 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4506 entry suffices.
4507 * tests/c++.at (Relative namespace references): New test case.
4508 (Absolute namespace references): New test case.
4509 (Syntactically invalid namespace references): New test case.
4510 * tests/input.at (C++ namespace reference errors): New test case.
4511
4512 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4513
4514 Add syncline support and location accessor to internal %define
4515 interfaces.
4516 * data/bison.m4 (b4_percent_define_get_loc): New.
4517 (b4_percent_define_get_syncline): New.
4518 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4519 (b4_percent_define_default): Record defining location as line 1 rather
4520 than 0 for the sake of synchronizing #line's, and define
4521 b4_percent_define_syncline(VARIABLE).
4522 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4523 * src/muscle_tab.c (muscle_syncline_grow): New.
4524 (muscle_code_grow): Use muscle_syncline_grow.
4525 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4526 define b4_percent_define_syncline(VARIABLE).
4527 (muscle_percent_define_get_loc): New.
4528 (muscle_percent_define_get_syncline): New.
4529 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4530 remove some unused variables.
4531 (muscle_percent_define_default): Record defining location as line 1
4532 rather than 0 for the sake of synchronizing #line's, and define
4533 b4_percent_define_syncline(VARIABLE).
4534 (muscle_percent_define_check_values): Use
4535 muscle_percent_define_get_loc.
4536 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4537 (muscle_percent_define_get_syncline): Prototype.
4538 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4539 defaults): Update output for location change.
4540 (Complaining during macro argument expansion): Extend to test
4541 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4542
4543 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4544
4545 Fix some error-reporting macro bugs.
4546 * data/bison.m4 (b4_cat): New.
4547 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4548 to stdout so they don't become arguments to other macros. Update
4549 comments and add examples.
4550 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4551 add examples.
4552 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4553 after printing the error directive so that M4 doesn't report subsequent
4554 problems that are induced by this problem.
4555 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4556 instead of just in them. Recognize @\n in both places. Both expand to
4557 the empty string. Needed by b4_cat.
4558 * tests/skeletons.at (Complaining during macro argument expansion):
4559 New test case.
4560 (Fatal errors make M4 exit immediately): New test case.
4561
4562 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4563
4564 Implement --print-datadir.
4565 * src/getargs.c (usage): Mention.
4566 (PRINT_DATADIR_OPTION): New anonymous enum member.
4567 (long_options): Add entry for it.
4568 (getargs): Add case for it calling compute_pkgdatadir.
4569 * src/output.c (output_skeleton): Encapsulate data directory
4570 computation from here...
4571 (prepare): ... and from here...
4572 (compute_pkgdatadir): ... into this new function.
4573 * src/output.h (compute_pkgdatadir): Prototype.
4574
4575 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4576
4577 * src/print-xml.c (escape_bufs): New static global variable
4578 replacing...
4579 (xml_escape_n): ... the static local variable buf here.
4580 (print_xml): Free memory for escape_bufs.
4581 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4582
4583 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4584
4585 Replace `%push-parser' and `%push-pull-parser' with
4586 `%define push_pull "push"' and `%define push_pull "both"'.
4587 `%define push_pull "pull"' is the default.
4588 * doc/bison.texinfo (Push Decl, Push Parser Function,
4589 Pull Parser Function, Parser Create Function, Parser Delete Function):
4590 Update declarations.
4591 (Decl Summary, Table of Symbols): Replace %push-parser and
4592 %push-pull-parser entries with a %define push_pull entry.
4593 * data/bison.m4 (b4_percent_define_check_values): New macro.
4594 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4595 definitions...
4596 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4597 definitions...
4598 * data/push.c: ... to here and compute them from the value of the
4599 %define variable push_pull.
4600 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4601 parsing requests here...
4602 * data/yacc.c: ... hack this to switch to push.c any time
4603 b4_use_push_pull_flag or the %define variable push_pull is set. This
4604 will go away when we mv push.c yacc.c.
4605 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4606 push parsing is not supported since unused %define variables are
4607 reported anyway.
4608 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4609 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4610 comments for consistency with b4_percent_define_check_values.
4611 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4612 muscles.
4613 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4614 Remove.
4615 (prologue_declaration): Remove %push-parser and %push-pull-parser
4616 rules.
4617 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4618 * tests/calc.at: Update declarations.
4619 * tests/input.at (%define enum variables): New test case.
4620 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4621 declaration.
4622 (Push Parsing: Multiple impure instances): Update declaration.
4623 (Push Parsing: Unsupported Skeletons): New test case.
4624 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4625 declaration.
4626 (Exploding the Stack Size with Malloc): Update declaration.
4627
4628 2007-09-24 Wojciech Polak <polak@gnu.org>
4629
4630 Add XSLT transformations.
4631
4632 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4633 * data/xslt/xml2text.xsl: Transform XML into plain text.
4634 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4635 * data/Makefile.am (xsltdir): New variable.
4636 (dist_xslt_DATA): Add xslt/*.xsl files.
4637
4638 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4639
4640 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4641 Problem reported by Wojciech Polak.
4642 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4643 (xml_printf): Undo change I made on 21 September; that is,
4644 indent 2 spaces, not 1.
4645
4646 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4647
4648 Pacify ./configure --enable-gcc-warnings.
4649 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4650 `char const *' instead of `char *'.
4651 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4652 local variable `sep'.
4653
4654 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4655
4656 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4657 elsewhere.
4658 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4659 (xml_printf): Indent just 1 space for level.
4660 (e_char, xlate_char): Remove.
4661 (xml_escape_string): Rewrite to avoid undefined behavior (used
4662 storage that was freed from the stack).
4663 (xml_escape_n): Don't bother checking for subscript error.
4664
4665 2007-09-21 Wojciech Polak <polak@gnu.org>
4666
4667 Add Bison XML Automaton Report.
4668
4669 Add support for an -x option to generate an XML report.
4670 It is not documented yet.
4671 * src/print-xml.c: New file.
4672 * src/print-xml.h: Likewise.
4673 * lib/timevar.def (TV_XML): New var.
4674 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4675 * src/conflicts.c: Include print-xml.h.
4676 (solved_conflicts_xml_obstack): New var.
4677 (log_resolution, conflicts_solve, conflicts_free):
4678 Add support for XML report.
4679 (conflicts_output_val): New function.
4680 * src/conflicts.h (conflicts_output_val): New decl.
4681 * src/files.c (spec_xml_file): New var.
4682 (compute_output_file_names, output_file_names_free): Add XML support.
4683 * src/files.h (spec_xml_file): New decl.
4684 * src/getargs.c (xml_flag): New var.
4685 (usage, short_options, long_options, getargs): Add XML support.
4686 * src/getargs.h (xml_flag): New decl.
4687 * src/gram.c: Include print-xml.h.
4688 (rule_lhs_print_xml, rule_rhs_print_xml):
4689 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4690 New functions.
4691 * src/gram.h: Declare external ones.
4692 * src/main.c: Include print-xml.h.
4693 (main): Add XML support.
4694 * src/reduce.c: Include print-xml.h.
4695 (reduce_xml): New function.
4696 * src/reduce.h: Declare it.
4697 * src/state.c: Include print-xml.h.
4698 (state_new): Add XML support.
4699 (state_rule_lookahead_tokens_print_xml): New function.
4700 * src/state.h: Declare it.
4701 (struct state): New member solved_conflicts_xml.
4702 * src/symtab.c (symbol_class_get_string): New function.
4703 * src/symtab.h: Declare it.
4704
4705 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4706
4707 * GNUmakefile: Switch to coreutils's version.
4708 * bootstrap: Likewise.
4709 * Makefile.cfg: Adjust to new GNUmakefile.
4710 * README-hacking: Likewise.
4711
4712 Import from gnulib:
4713
4714 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4715 Bruno Haible <bruno@clisp.org>
4716
4717 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4718 and is a script that invokes bison. Tighten the code. Add comments.
4719
4720 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4721
4722 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4723 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4724 * doc/bison.texinfo (Decl Summary): Fix.
4725 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4726 * tests/input.at (Boolean %define variables): Update output.
4727 * tests/skeletons.at (%define boolean variables: invalid skeleton
4728 defaults): Rename to...
4729 (%define Boolean variables: invalid skeleton defaults): ... this and
4730 update output.
4731
4732 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4733
4734 In impure push mode, don't allow more than one yypstate to be allocated
4735 since multiple impure parsers would corrupt yynerrs.
4736 * data/push.c (yypstate_allocated): New static global variable
4737 initialized to 0.
4738 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4739 exhaustion if yypstate_allocated is 1, but still return 2.
4740 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4741 already 1. Otherwise, set it to 1.
4742 (yypstate_delete): Set it to 0.
4743 * tests/push.at (Push Parsing: Multiple impure instances): New test
4744 case.
4745
4746 2007-08-17 Bob Rossi <bob@brasko.net>
4747
4748 * doc/bison.texinfo (Push Decl): Document the push parser.
4749 (Table of Symbols): Ditto.
4750 (Pure Decl): Ditto.
4751 (Decl Summary): Ditto.
4752 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4753 Parser Create Function, Parser Delete Function):
4754 Add new push parser symbols.
4755 (Table of Symbols): Document push-parser, push-pull-parser,
4756 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4757
4758 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4759
4760 Update to GPLv3.
4761 * doc/gpl-3.0.texi: New file.
4762 * doc/gpl.texi: Remove.
4763 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4764 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4765 * README-hacking, TODO, bootstrap, bootstrap.conf:
4766 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4767 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4768 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4769 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4770 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4771 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4772 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4773 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4774 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4775 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4776 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4777 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4778 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4779 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4780 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4781 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4782 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4783 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4784 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4785 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4786 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4787 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4788 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4789 * src/complain.c, src/complain.h, src/conflicts.c:
4790 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4791 * src/files.h, src/flex-scanner.h, src/getargs.c:
4792 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4793 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4794 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4795 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4796 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4797 * src/print.c, src/print.h, src/print_graph.c:
4798 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4799 * src/reduce.h, src/relation.c, src/relation.h:
4800 * src/revision.h, src/scan-code.h, src/scan-code.l:
4801 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4802 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4803 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4804 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4805 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4806 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4807 * tests/existing.at, tests/glr-regression.at:
4808 * tests/headers.at, tests/input.at, tests/java.at:
4809 * tests/local.at, tests/output.at, tests/push.at:
4810 * tests/reduce.at, tests/regression.at, tests/sets.at:
4811 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4812 * tests/torture.at:
4813 Update to GPLv3.
4814
4815 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4816
4817 Get rid of broken %no-parser, -n, and --no-parser implementation and
4818 documentation.
4819 * TODO: Don't mention them.
4820 * doc/bison.1: Likewise.
4821 * doc/bison.texinfo (Decl Summary): Likewise.
4822 (Bison Options): Likewise.
4823 (Option Cross Key): Likewise.
4824 * src/getargs.c (no_parser_flag): Remove global variable.
4825 (usage): Don't print description of -n and --no-parser.
4826 (long_options): Remove --no-parser entry here.
4827 (getargs): Remove -n case in the switch here.
4828 * src/getargs.h (no_parser_flag): Remove extern.
4829 * tests/regression.at (Web2c Actions): Remove comment that mentions
4830 --no-parser.
4831
4832 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4833
4834 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4835 name user variables starting with `yy'. Just pass NULL instead of a
4836 dummy local &yylval to yypush_parse.
4837 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4838 starting with `yy'.
4839
4840 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4841
4842 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4843 true since it's then always used regardless of whether yyoverflow is
4844 defined. Reported by Christian Burger at
4845 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4846 * THANKS: Add Christian Burger.
4847
4848 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4849 node names: say "Decl Summary" not "Bison Declaration Summary".
4850
4851 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4852
4853 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4854 determine whether this function has already complained about an invalid
4855 value for a %define boolean variable, don't check whether Bison has
4856 ever examined the value. As written, the check was a tautology.
4857 Instead, record and check for this complaint using a separate muscle.
4858
4859 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4860
4861 Fix push parsing memory leak reported by Brandon Lucia at
4862 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4863 * THANKS: Add Brandon Lucia.
4864 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4865 but the parse never completed and thus freed it.
4866 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4867 * tests/testsuite.at: Include push.at.
4868 * test/push.at: New.
4869 (Push Parsing: Memory Leak for Early Deletion): New test case.
4870
4871 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4872
4873 Improve handling of multiple S/R conflicts in the same state and of S/R
4874 conflicts involving multiple reductions.
4875 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4876 set for a state here or Bison will abort if it is reassigned on a
4877 later conflicted reduction in the same state.
4878 Similarly, don't finalize and assign the solved conflicts report here
4879 or it will be lost if it is reassigned on a later conflicted reduction
4880 in the same state.
4881 (set_conflicts): Instead, assign them both here after all S/R conflicts
4882 in the state have been fully examined.
4883 * src/print.c (shift_set): Rename to...
4884 (no_reduce_set): ... this.
4885 (print_reductions): Update for rename, and add %nonassoc error action
4886 tokens to no_reduce_set so that, when printing the first remaining
4887 reduction on an error action token, the reduction is enclosed in
4888 brackets.
4889 (print_results): Update for rename.
4890 * tests/conflicts.at (Solved conflicts report for multiple reductions
4891 in a state): New test case.
4892 (%nonassoc error actions for multiple reductions in a state): New test
4893 case.
4894
4895 * src/main.c (main): Don't depend on C99 features.
4896
4897 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4898
4899 * build-aux/.cvsignore: Add compile.
4900 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4901 uniwidth.
4902
4903 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4904
4905 * bootstrap (slurp): Create target directories that don't exist.
4906 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4907
4908 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4909
4910 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4911 than item number.
4912 * closure.c (closure): Likewise.
4913 * state.h (reductions): Comment sorting of rules.
4914 (state): Comment sorting of items.
4915
4916 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4917
4918 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4919 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4920 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4921 definition in order to avoid Gnulib headers since we don't use config.h
4922 here.
4923 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4924 rather than AT_DATA so that config.h is included.
4925
4926 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4927
4928 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4929 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4930 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4931 and so that YYFPRINTF is guaranteed to be defined here.
4932
4933 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4934
4935 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4936 with...
4937 (muscle_percent_define_check_values): ... this more helpful function.
4938 Again, it's not used yet, but it will be.
4939 * src/muscle_tab.h: Likewise.
4940
4941 Improve some comments in parser table construction.
4942 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4943 (generate_states): Don't mention ruleset, which is internal to closure.
4944 * src/closure.c (closure): Explain sorting of core and itemset, which
4945 is required for this function to behave correctly.
4946 * src/closure.h (closure): Mention sorting.
4947
4948 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4949
4950 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4951 move the check for disabled transitions to an aver since conflict
4952 resolution hasn't happened yet.
4953
4954 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4955 labels a state as inconsistent just because it has error transitions.
4956 The original form of this check appeared in revision 1.1 of lalr.c,
4957 which was committed on 1991-12-21. Now (at least), changing the
4958 consistency label on such a state appears to have no useful effect in
4959 any of the places it is examined, which I enumerate below. The key
4960 point to understanding each item in this enumeration is that a state
4961 with an error transition is labelled consistent in the first place only
4962 if it has no rules, so the check cannot matter for states that have
4963 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4964 to try to identify its conflicts, and a state must have *rules* to have
4965 conflicts. (2) Labelling a state as inconsistent will affect how
4966 action_row sets the default *rule* for the state. (3) Labelling a
4967 state as inconsistent will cause build_relations to add lookback edges
4968 to *rules* in that state.
4969 * src/state.h (struct state): Word the comment for member consistent
4970 more carefully.
4971
4972 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4973
4974 Don't depend on C99 features.
4975 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4976 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4977 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4978 * src/state.c (state_mark_reachable_states): Fix for-loop.
4979 (state_remove_unreachable_states): Fix for-loop.
4980
4981 Don't widen struct state with member reachable just to temporarily
4982 record reachability. Instead, use a local bitset.
4983 * src/state.h (struct state): Remove member.
4984 * src/state.c (state_new): Don't initialize it.
4985 (state_mark_reachable_states): Rename to...
4986 (state_record_reachable_states): ... this, and use bitset.
4987 (state_remove_unreachable_states): Use bitset.
4988
4989 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4990
4991 * src/Makefile.am (yacc): Quote target action commands properly so
4992 that the yacc script isn't corrupt. Reported by Hans Aberg at
4993 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4994
4995 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4996 the case of pure parsers. Reported by Frans Englich at
4997 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4998 * THANKS: Add Frans Englich.
4999
5000 * NEWS (2.3a+): In the %code entry, reference section `Bison
5001 Declaration Summary' from the manual now since the %code summary has
5002 moved there.
5003 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5004 in the rules section must be terminated by semicolons.
5005
5006 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5007
5008 Extend the front-end API for %define variables to more completely
5009 mirror the back-end. This will be useful in the future.
5010 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5011 Update comments to mention the new front-end counterparts of these
5012 macros.
5013 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5014 for muscle_string_decode and muscle_location_decode.
5015 (muscle_string_decode): New static function.
5016 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5017 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5018 functions.
5019 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5020 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5021 implementation more closely.
5022 (muscle_percent_define_invalid_value): New function.
5023 * src/muscle_tab.h (muscle_percent_define_get,
5024 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5025 Prototype.
5026
5027 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5028
5029 * NEWS (2.3a+): Mention yesterday's state-removal change.
5030 (2.3a): Remove the %language entry, which was added after 2.3a.
5031 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5032 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5033 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5034 tests/existing.at: Update copyright date.
5035
5036 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5037
5038 If conflict resolution makes states unreachable, remove those states,
5039 report rules that are then unused, and don't report conflicts in those
5040 states.
5041 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5042 New global function.
5043 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5044 function.
5045 * src/main.c (main): After conflict resolution, remove the unreachable
5046 states and update all data structures that reference states by number.
5047 * src/state.c (state_new): Initialize each state's reachable member to
5048 false.
5049 (state_mark_reachable_states): New static function.
5050 (state_remove_unreachable_states): New global function.
5051 * src/state.h (struct state): Add member bool reachable.
5052 (state_remove_unreachable_states): Prototype.
5053 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5054 New test case.
5055 * tests/existing.at (GNU pic Grammar): Update test case output now that
5056 an unused rule is discovered.
5057
5058 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5059
5060 Minor code cleanup in parser table construction.
5061 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5062 (new_itemsets, save_reductions): Update for rename to nitemset.
5063 * src/closure.c (nritemset): Rename to...
5064 (nitemset): ... this since the "r" appears to meaningless and isn't
5065 used in the comments.
5066 (closure): Update for rename.
5067 * src/closure.h (nritemset): Update extern to...
5068 (nitemset): ... this.
5069 * src/lalr.c (LA): Fix a typo in comments.
5070 * src/print.c (print_core): Update for rename to nitemset.
5071 * src/print_graph.c (print_graph): Likewise.
5072 * src/state.h: Fix some typos in header comments.
5073
5074 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5075
5076 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5077 still sticks to ASCII. Sorry!
5078
5079 * README-hacking: New file, taken mostly from coreutils, with changes
5080 for Bison. Contains much of the contents of:
5081 * README-cvs: Remove.
5082 * bootstrap: Sync from gnulib.
5083 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5084 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5085
5086 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5087
5088 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5089 Setzer.
5090 (Java Differences): Fix some typos.
5091 * THANKS: Add Sebastian Setzer.
5092
5093 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
5094
5095 * data/java.m4 (b4_single_class_if): Remove.
5096 (b4_abstract_if): Look at "%define abstract".
5097 (b4_lexer_if): New.
5098 (b4_union_name): Rename...
5099 (b4_yystype): ... to this. Map to "%define stype".
5100 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5101 b4_maybe_throws): Fix quoting.
5102 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5103 * data/lalr1.java (Lexer interface): Always define.
5104 (Lexer interface within parser class): Remove.
5105 (YYLexer class): New, used when "%code lexer" is present.
5106 (constructor): When "%code lexer" is used, pass %lex-param
5107 to the lexer constructor.
5108 (yylex, yyparse): Remove %lex-param from method invocations
5109 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5110
5111 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5112 abstract". Rename "%define union_name" to "%define stype".
5113 Rename method names according to previous patch.
5114 (Java Scanner Interface): Describe "%code lexer" instead of
5115 "%pure-parser" and "%define single_class".
5116 (Java Differences): Mention "%code lexer".
5117
5118 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5119 Include scanner here, using macros from tests/local.at.
5120 (AT_DATA_CALC_Y): Remove final argument.
5121 (_AT_CHECK_JAVA_CALC): Likewise.
5122 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5123 of %locations and %error-verbose.
5124 (main): Test with and without %lex-param.
5125 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5126 (AT_BISON_OPTION_POPDEFS): Pop it.
5127
5128 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5129
5130 DJGPP spefic issue. Inhibit the use of disallowed characters for
5131 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5132 and concern testsuite case 46.
5133 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5134 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5135 * djgpp/config.bat: Inhibit the use of disallowed characters.
5136
5137 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5138
5139 Miscellaneous %define and %code cleanup.
5140 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5141 values are interpreted.
5142 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5143 documentation a little more.
5144 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5145 muscle_percent_define_insert, muscle_percent_code_grow): New
5146 functions/macros.
5147 * src/muscle_tab.h (muscle_percent_define_insert,
5148 muscle_percent_code_grow): Prototype.
5149 * src/parse-gram.y (prologue_declaration): Use
5150 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5151 %define and %code directives.
5152
5153 Make it easy to share %define boolean variables between the front-end
5154 and back-end. Though not used yet, this will be useful in the future.
5155 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5156 Bison uses of names rather than just skeleton uses of names.
5157 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5158 b4_percent_define_skeleton_variables(VARIABLE) to
5159 b4_percent_define_bison_variables(VARIABLE).
5160 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5161 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5162 b4_percent_code_bison_qualifiers(QUALIFIER).
5163 (b4_check_user_names_wrap): Update for renames.
5164 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5165 muscle_percent_define_default): New functions mimicking
5166 b4_percent_define_flag_if and b4_percent_define_default.
5167
5168 For %define variables, report locations for invalid values and
5169 redefinitions.
5170 * data/bison.m4 (b4_percent_define_flag_if): Read
5171 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5172 value for VARIABLE.
5173 (b4_percent_define_default): Save a special location in
5174 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5175 must later be reported as invalid.
5176 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5177 functions.
5178 (muscle_percent_define_insert): Record the location of VARIABLE in
5179 muscle percent_define_loc(VARIABLE), and use it to report the previous
5180 location for a redefinition.
5181 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5182 (muscle_percent_define_default): Update like b4_percent_define_default.
5183 (muscle_grow_user_name_list): Rename to...
5184 (muscle_user_name_list_grow): ... this for consistency and use
5185 muscle_location_grow.
5186 * src/muscle_tab.h (muscle_location_grow): Prototype.
5187 * tests/input.at (%define errors): Update expected output.
5188 * tests/skeletons.at (%define boolean variables: invalid skeleton
5189 defaults): New test case.
5190
5191 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5192
5193 * src/print.c (lookahead_set, state_default_rule): Remove.
5194 (print_reductions): Replace state_default_rule invocation with
5195 equivalent use of yydefact, which was computed in token_actions in
5196 tables.c.
5197 (print_results): Don't allocate lookahead_set.
5198
5199 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
5200
5201 * data/lalr1.java: Prefix all private members with yy.
5202
5203 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5204
5205 Use YYFPRINTF instead of fprintf where appropriate. Reported by
5206 Sebastien Fricker at
5207 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
5208 * THANKS: Add Sebastien Fricker.
5209 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5210 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5211 accept a variable number of arguments.
5212
5213 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5214
5215 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5216
5217 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5218
5219 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5220 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5221 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5222
5223 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5224
5225 Undo my 2007-02-07 change, switching back to the c-strcase module
5226 introduced in the 2007-02-03 change. Bruno Haible reported that
5227 the 2007-02-07 change would be dangerous in Turkish if we add a
5228 language whose name contains "i", since "i" is not lowercase "I"
5229 in Turkish.
5230 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5231 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5232 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5233 * m4/.cvsignore: Remove strcase.m4.
5234 * src/getargs.c: Revert 2007-02-07 change, as follows.
5235 Include c-strcase.h.
5236 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5237
5238 2007-02-11 Bruno Haible <bruno@clisp.org>
5239
5240 Enable the Java related testsuite tests when the only Java compiler
5241 found is a gcj < 4.3. Discussed at
5242 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5243 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5244
5245 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5246
5247 * data/Makefile.am: Update copyright date.
5248 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5249 yypstate_new returns NULL.
5250 (yypstate_new): Return NULL if malloc does.
5251 * src/reader.c (packgram): Move translation of rule actions from the
5252 beginning of packgram to...
5253 (check_and_convert_grammar): ... here right before packgram is invoked
5254 so it's easier to write more complete comments, and remove redundant
5255 code.
5256
5257 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5258
5259 As in semantic actions, make @$ in %initial-action, %destructor, and
5260 %printer imply %locations.
5261 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5262 scanning @$.
5263 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5264 (@$ in %initial-action implies %locations,
5265 @$ in %destructor implies %locations,
5266 @$ in %printer implies %locations): ... these new test cases.
5267
5268 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5269
5270 Undo most of the 2007-02-03 change, switching to the strcase module
5271 now that gnulib strcase has been fixed.
5272 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5273 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5274 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5275 * m4/.cvsignore: Add strcase.m4.
5276 * src/getargs.c: Revert 2007-02-03 change, as follows.
5277 Don't include c-strcase.h.
5278 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5279 strcasecmp has "unspecified behavior" outside the POSIX locale,
5280 but it works fine in practice if at least one argument is ASCII,
5281 as is the case in Bison.
5282
5283 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
5284
5285 * tests/java.at: Skip tests if only one of javac/java is present.
5286 Reported by Joel E. Denny.
5287 * tests/atlocal.in: Adjust copyright years.
5288
5289 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5290
5291 * data/lalr1.java (Stack): Work around old verifiers that disallow
5292 access to the private fields of an inner class, from the outer class.
5293 We can make Stack's fields public because user code doesn't have access
5294 to the instance of Stack used by parse(). Reported by Paul Eggert.
5295
5296 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5297
5298 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5299 the right spot for these files?
5300 * bootstrap.conf (gnulib_modules): Add c-strcase.
5301 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5302 c-strncasecmp.c.
5303 * src/getargs.c: Include c-strcase.h.
5304 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5305 to avoid unspecified behavior.
5306
5307 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5308
5309 * doc/bison.texinfo (Decl Summary): Correct typo.
5310
5311 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
5312
5313 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5314 Complain if the value does not match empty, "true" or "false".
5315 * data/c++.m4: Adjust default definitions of %define variables.
5316 * data/java.m4: Adjust default definitions of %define variables.
5317 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5318 to above behavior.
5319 * tests/input.at (Boolean %define variables): Test new behavior.
5320
5321 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
5322
5323 * NEWS: Mention java.
5324 * TODO: Remove things that are done.
5325 * bootstrap.conf: Add javacomp-script and javaexec-script.
5326 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5327
5328 * data/Makefile.am: Add new files.
5329 * data/java-skel.m4: New.
5330 * data/java.m4: New.
5331 * data/lalr1.java: New.
5332
5333 * doc/bison.texinfo: Put "A Complete C++ Example" under
5334 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5335 under Other Languages.
5336
5337 * src/getargs.c (valid_languages): Add Java.
5338 * src/getargs.h (struct bison_language): Update size of string fields.
5339
5340 * tests/Makefile.am: Add java.at.
5341 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5342 * tests/java.at: New.
5343 * tests/testsuite.at: Include it.
5344
5345 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5346
5347 Clean up.
5348 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5349 at_directive_argv arguments so these no longer have to be global
5350 variables. Also, update the implementation for the following changes.
5351 (fail_for_at_directive_too_many_args,
5352 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5353 (at_directive_name): Remove as at_directive_argv[0] will be used for
5354 this now.
5355 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5356 for the directive name.
5357 (at_directive_argc, at_directive_argv): Make these local within
5358 skel_lex instead of global.
5359 (INITIAL): Update directive start action for above changes.
5360 (SC_AT_DIRECTIVE_ARG): Rename to...
5361 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5362 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5363 (scan_skel): Move yylex_destroy to...
5364 (skel_scanner_free): ... here.
5365 * tests/skeletons.at (installed skeleton file name): Rename to...
5366 (installed skeleton file names): ... this.
5367
5368 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5369
5370 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5371 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5372 Summary" not "Directives".
5373 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5374 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5375 since the former is now the more complete one.
5376 (Prologue Alternatives): Likewise and do the same for %defines.
5377 (Table of Symbols): Add summary of %code, add summary of %define, and
5378 move full %code documentation to...
5379 (Decl Summary): ... here for consistency with other entries in these
5380 sections.
5381 Move %define entry in order to keep this list alphabetized.
5382 Reword %define entry a little to put less emphasis on the skeleton
5383 concept, which most users shouldn't have to think about.
5384
5385 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5386
5387 Adjust to recent gnulib changes.
5388 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5389 Add string.h, string_.h, unistd_.h, wchar_.h.
5390 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5391 * src/system.h: Don't include <stpcpy.h>; this is now done by
5392 <string.h>.
5393
5394 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
5395
5396 Simplify implementation of unqualified %code, implement macros for
5397 uniform treatment of boolean %define flags. Document %define.
5398 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5399 b4_percent_code_ifdef): New.
5400 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5401 * data/c++.m4: Define default value for global_tokens_and_yystype.
5402 * data/glr.cc: Likewise.
5403 * data/location.cc: Use b4_percent_define_flag_if.
5404
5405 * doc/bison.texinfo (Decl Summary): Document %define.
5406
5407 * src/parse-gram.y (Unqualified %code): Change muscle name to
5408 b4_percent_code().
5409 (content.opt): Default to empty.
5410
5411 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5412
5413 Implement support for relative and absolute skeleton file names.
5414 Discussed starting at
5415 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5416 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5417 (Bison Options): Document in --skeleton entry.
5418 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5419 full_skeleton can't necessarily hold all of pkgdatadir.
5420 If the specified skeleton file name contains a `/', don't prepend
5421 pkgdatadir.
5422 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5423 file name contains a `/', prepend the grammar file directory.
5424 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5425 * skeletons.at: New file.
5426 (relative skeleton file names): New test case.
5427 (installed skeleton file names): New test case.
5428 * tests/testsuite.at: Include skeletons.at.
5429
5430 * bootstrap: Update copyright to 2007.
5431
5432 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
5433
5434 * bootstrap: Remove occurrences of .#bootmp from the files.
5435
5436 2007-01-17 Akim Demaille <akim@epita.fr>
5437
5438 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5439 nonterminals.
5440 Use per-type %printer.
5441
5442 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5443
5444 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5445 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5446 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5447 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5448 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5449 tests/glr-regression.at, tests/input.at, tests/local.at,
5450 tests/output.at, tests/torture.at: Update copyright to 2007.
5451
5452 2007-01-16 Akim Demaille <akim@epita.fr>
5453
5454 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5455 error code.
5456 (Calc++ Scanner): Exit with failure if we can't open the input
5457 file.
5458 Accept "-" standing for stdin.
5459 (Calc++ Top Level): Print the result only if the parsing was
5460 successful.
5461
5462 2007-01-16 Akim Demaille <akim@epita.fr>
5463
5464 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5465
5466 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
5467 and Joel E. Denny <jdenny@ces.clemson.edu>
5468
5469 Clean up %define and %code implementation in M4 some. Most
5470 importantly, rename all related macros to be in the b4_percent_define
5471 and b4_percent_code namespaces. Also, complete support for `.' in
5472 %define variable names and %code qualifiers.
5473 * data/bison.m4 (b4_check_user_names): Check for special
5474 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5475 m4_foreach loops.
5476 (b4_get_percent_define, b4_get_percent_code): Rename to...
5477 (b4_percent_define_get, b4_percent_code_get): ... these.
5478 Extend documentation with examples.
5479 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5480 b4_percent_define_skeleton_variables and
5481 b4_percent_code_skeleton_qualifiers.
5482 Expect any value for the %define variable `foo' to be stored in the
5483 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5484 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5485 expect any unqualified %code blocks to be stored in a macro named
5486 `b4_percent_code_unqualified'.
5487 Use m4_indir so that %define variable names and %code qualifiers can
5488 contain `.', which is allowed by the grammar parser.
5489 (b4_percent_define_default): New macro to set a default value for a
5490 %define variable.
5491 (m4_wrap): Update wrapped code, and fix some underquoting.
5492 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5493 Expect grammar uses of %define variables and %code qualifiers to be
5494 defined in b4_percent_define_user_variables and
5495 b4_percent_code_user_qualifiers.
5496 * data/c++.m4: Use b4_percent_define_default rather than
5497 m4_define_default. Fix some underquoting. Skeleton usage of %define
5498 variable define_location_comparison now implies skeleton usage of
5499 %define variable filename_type.
5500 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5501 data/push.c, data/yacc.c: Update macro names.
5502 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5503 muscle names.
5504
5505 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5506
5507 DJGPP specific issues.
5508
5509 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5510 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5511
5512 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5513
5514 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5515 run parsers in all tests so that Valgrind is invoked during
5516 maintainer-check-valgrind.
5517 (Duplicate representation of merged trees): Free all semantic values.
5518 (Duplicated user destructor for lookahead): Likewise.
5519
5520 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5521
5522 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5523 command-line prefix.
5524 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5525 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5526 miss Valgrind messages.
5527 (Exploding the Stack Size with Malloc): Likewise.
5528
5529 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5530
5531 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5532 locals. Reported by Juan Manuel Guerrero at
5533 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5534 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5535 Fix some indentation also.
5536 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5537 explaining this issue.
5538
5539 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5540 and Joel E. Denny <jdenny@ces.clemson.edu>
5541
5542 Simplify union and prologue handling, and escape union and lex/parse
5543 params with digraphs.
5544 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5545 values to the empty string since these are no longer guaranteed
5546 initialized by the front-end.
5547 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5548 braces around b4_user_stype since this is no longer done by the
5549 front-end.
5550 * src/files.c, src/files.h (pre_prologue_obstack,
5551 post_prologue_obstack): Remove.
5552 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5553 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5554 with digraphs. This fixes lex params and parse params.
5555 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5556 * src/output.c (prepare): Remove muscle insertion of the prologues.
5557 (output): Remove freeing of pre_prologue_obstack and
5558 post_prologue_obstack.
5559 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5560 than prologue_augment for prologue parsing so you don't need prologue
5561 obstacks.
5562 (grammar_declaration): For %union RHS, use `braceless' instead of
5563 "{...}" so that braces are already stripped and code is escaped with
5564 digraphs.
5565 * src/reader.c (prologue_augment): Remove.
5566 (reader): Remove initialization of pre_prologue_obstack and
5567 post_prologue_obstack.
5568 * src/reader.h (prologue_augment): Remove.
5569
5570 * data/c.m4: Remove stray parenthesis.
5571
5572 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5573
5574 Remove quotes from variables names in %define directives and from
5575 qualifiers in %code directives, and restrict the characters that are
5576 allowed in them to M4-friendly ones. For %define, continue to support
5577 the quoted form as a deprecated feature. Discussed starting at
5578 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5579 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5580 %code.
5581 * doc/bison.texinfo (Prologue Alternatives): Update.
5582 (Decl Summary): In %defines entry, update mention of `%code requires'
5583 and `%code provides'.
5584 (C++ Location Values): Update %define uses.
5585 (Calc++ Parser Interface): Likewise.
5586 (Calc++ Parser): Likewise, and update `%code requires' uses.
5587 (Table of Symbols): Update %code documentation.
5588 * src/parse-gram.y (prologue_declaration): For %define variables, use
5589 `variable' instead of `STRING'.
5590 (grammar_declaration): For %code qualifiers, use `ID' instead of
5591 `STRING'.
5592 (variable): New nonterminal that takes an `ID' or a `STRING'.
5593 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5594 and %define uses.
5595 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5596 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5597 (%define errors): Update %define uses.
5598
5599 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5600
5601 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5602 instead of muscle_insert for %define values so that M4-special
5603 characters are replaced with digraphs.
5604 * tests/input.at (%define errors): Extend to check weird values.
5605
5606 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5607
5608 Instead of having skeletons declare all valid %define variables and
5609 %code qualifiers, provide macros that retrieve the associated values
5610 and build these lists automatically. Thus Bison will now warn when a
5611 variable or qualifier is not used by the skeleton in the current
5612 invocation regardless of whether it might sometimes be used by that
5613 skeleton in other invocations. Also, move all %define value macros to
5614 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5615 form, which is replaced by %code.
5616 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5617 (b4_check_user_names): ... this, and change the series of valid name
5618 arguments to a single list argument for names used in the skeleton
5619 similar to the existing list argument for names used in the grammar.
5620 Warn instead of complaining.
5621 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5622 values and %code code, to format %code code properly, and to build
5623 lists of all %define variables and %code qualifiers used in the
5624 skeleton: b4_skeleton_percent_define_variables and
5625 b4_skeleton_percent_code_qualifiers.
5626 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5627 Remove, and...
5628 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5629 the skeleton names lists can finish building first. In place of
5630 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5631 expect the lists b4_user_percent_define_variables and
5632 b4_user_percent_code_qualifiers.
5633 * data/c++.m4: Where setting default values for b4_parser_class_name,
5634 b4_location_type, b4_filename_type, b4_namespace, and
5635 b4_define_location_comparison, update their names to the
5636 b4_percent_define_ namespace.
5637 * data/glr.c: Don't use b4_check_percent_define_variables and
5638 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5639 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5640 (b4_parser_class_name, b4_namespace): Define these using
5641 b4_get_percent_define for parser_class_name and namespace.
5642 * data/location.cc: Use b4_get_percent_define.
5643 * data/push.c: Don't use b4_check_percent_define_variables and
5644 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5645 * data/yacc.c: Likewise, and don't call m4_exit in
5646 b4_use_push_for_pull_if or m4_wrap code will never execute.
5647 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5648 Rename to...
5649 (muscle_grow_user_name_list): ... this for consistency with the
5650 terminology used in bison.m4.
5651 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5652 %define variable names, and rename muscle used_percent_define_variables
5653 to user_percent_define_variables.
5654 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5655 user_percent_code_qualifiers.
5656 (content): Remove.
5657 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5658 {CODE} form is no longer accepted.
5659 * tests/input.at (Reject bad %code qualifiers): Rename to...
5660 (Reject unused %code qualifiers): ... this, and update test output.
5661 (%define error): Update test output.
5662
5663 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5664
5665 Check for unrecognized %define variables similar to checking for
5666 unrecognized %code qualifiers. Check for redefined %define variables.
5667 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5668 generalizes...
5669 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5670 (b4_check_percent_define_variables): New, also wraps it.
5671 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5672 variables using b4_check_percent_define_variables.
5673 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5674 all those exercised in the test suite and all those listed in the
5675 `Default values' section of c++.m4. Are there others?
5676 * data/push.c, data/yacc.c: Declare no valid %define variables.
5677 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5678 similar to muscle_find, but it works even when the muscle stores a
5679 const value.
5680 (muscle_grow_used_name_list): New function for constructing the used
5681 name list muscles that b4_check_for_unrecognized_names requires.
5682 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5683 %define'd more than once. Define the b4_used_percent_define_variables
5684 muscle with muscle_grow_used_name_list.
5685 (grammar_declaration): Abbreviate %code code with
5686 muscle_grow_used_name_list.
5687 * tests/input.at (%define errors): New.
5688
5689 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5690
5691 Provide warn_at, complain_at, and fatal_at function callbacks to the
5692 skeletons, and use this for %code qualifier complaints.
5693 * data/bison.m4 (b4_error_at): New, invoked by...
5694 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5695 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5696 @fatal_at(...@) directives.
5697 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5698 qualifiers in b4_used_percent_code_qualifiers and to use
5699 b4_complain_at.
5700 * src/location.c, src/location.h (boundary_set_from_string): New global
5701 function.
5702 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5703 function.
5704 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5705 to b4_used_percent_code_qualifiers.
5706 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5707 function.
5708 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5709 (lineno): Rename to...
5710 (out_lineno): ... this so I don't misunderstand it again.
5711 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5712 here; these newlines are in the input but not the output file.
5713 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5714 (at_directive_perform): ... this new static function, and add handling
5715 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5716 directives.
5717 * tests/input.at (Reject bad %code qualifiers): Update test output with
5718 locations and extend.
5719
5720 * tests/output.at (Output file name: [, Output file name: ]): Remove
5721 bogus comment about these tests failing.
5722
5723 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5724
5725 Clean up b4_check_percent_code_qualifiers a little.
5726 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5727 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5728 documentation and add examples.
5729 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5730 qualifiers here.
5731
5732 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5733
5734 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5735 unreliable -- especially when they're hidden inside another macro.
5736 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5737 data/c.m4: Remove m4_divert(-1).
5738 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5739 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5740 m4_divert_push(0) and m4_divert_pop(0).
5741 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5742 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5743 pushed and popped by m4sugar, should be first on the stack.
5744
5745 Provide warn, complain, and fatal function callbacks to the skeletons.
5746 This provides more flexibility than m4_fatal, improves the error
5747 message format, and captures messages for translation. Discussed
5748 starting at
5749 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5750 * data/bison.m4 (b4_error): New, invoked by...
5751 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5752 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5753 directives. Because these M4 macros might be called when the current
5754 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5755 the previous removal of uses of m4_divert, which caused trouble.
5756 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5757 m4_fatal to report unrecognized %code qualifiers.
5758 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5759 push parser requests.
5760 * data/glr.c: Use b4_complain instead of m4_fatal to report
5761 non-deterministic push parser requests.
5762 Update @output usage to @output(...@) form.
5763 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5764 report missing %defines. Update @output usage to @output(...@) form.
5765 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5766 @output(...@) form.
5767 * src/main.c (main): Invoke skel_scanner_free.
5768 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5769 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5770 obstack_for_string from flex-scanner.h.
5771 (YY_DECL): Use to declare skel_lex static.
5772 (decode_at_digraphs): Remove; now handled in the new
5773 SC_AT_DIRECTIVE_ARG start condition.
5774 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5775 functions.
5776 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5777 at_directive_argv): New static globals.
5778 (INITIAL): Use fail_for_invalid_at.
5779 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5780 recognize the start of a generalized `@directive(...@)' form and
5781 start...
5782 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5783 directive args (using the new obstack_for_string), to decode the
5784 contained @ diagraphs, and to perform the directive. It recognizes
5785 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5786 @output(...@).
5787 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5788 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5789 `@,'.
5790 (scan_skel): Initialize obstack_for_string on the first call.
5791 (skel_scanner_free): New function to free obstack_for_string.
5792 * tests/input.at (Reject bad %code qualifiers): Update test output.
5793
5794 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5795
5796 Consolidate the 4 prologue alternative directives (%code, %requires,
5797 %provides, and %code-top) into a single %code directive with an
5798 optional qualifier field. Discussed at
5799 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5800 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5801 alternatives.
5802 * doc/bison.texinfo (Prologue Alternatives): Update.
5803 (Decl Summary): Update to %code "requires" and %code "provides".
5804 (Calc++ Parser): Update to %code "requires".
5805 (Table of Symbols): Remove entries for %requires, %provides, and
5806 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5807 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5808 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5809 which are skeleton-specific.
5810 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5811 declare what %code qualifiers it supports and to complain if any other
5812 qualifiers were used in the grammar.
5813 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5814 and b4_user_code([b4_percent_code_provides]) in place of
5815 b4_user_requires and b4_user_provides.
5816 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5817 Add b4_user_code([b4_percent_code_top]) and
5818 b4_user_code([b4_percent_code]).
5819 Invoke b4_check_percent_code_qualifiers.
5820 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5821 PERCENT_REQUIRES): Remove.
5822 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5823 %requires. Rewrite the %code RHS as the unqualified form defining the
5824 muscle b4_percent_code. Add another RHS for the qualified %code form,
5825 which defines muscles of the form b4_percent_code_QUALIFIER and the
5826 b4_used_percent_code_qualifiers muscle.
5827 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5828 PERCENT_REQUIRES): Remove.
5829 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5830 %code "requires" and %code "provides".
5831 * tests/input.at (Reject bad %code qualifiers): New.
5832
5833 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5834
5835 Use the new code_props interface for destructors and printers.
5836 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5837 printer_location members, and change the type of the destructor and
5838 printer members to code_props.
5839 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5840 symbol_printer_get, semantic_type_destructor_set,
5841 semantic_type_printer_set, default_tagged_destructor_set,
5842 default_tagless_destructor_set, default_tagged_printer_set,
5843 default_tagless_printer_set): Use code_props in arguments and return
5844 types in place of char const * and location.
5845 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5846 since the locations are now contained in the return of
5847 symbol_destructor_get and symbol_printer_get.
5848 * src/output.c (symbol_destructors_output, symbol_printers_output):
5849 Replace with...
5850 (symbol_code_props_output): ... this to eliminate duplicate code.
5851 (output_skeleton): Update to use symbol_code_props_output.
5852 * src/reader.c (symbol_should_be_used): Update use of
5853 symbol_destructor_get.
5854 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5855 Update uses of the various _destructor_set and _printer_set functions.
5856 * src/symtab.c: (default_tagged_destructor_location,
5857 default_tagless_destructor_location, default_tagged_printer_location,
5858 default_tagless_printer_location): Remove since we...
5859 (default_tagged_destructor, default_tagless_destructor,
5860 default_tagged_printer, default_tagless_printer): ... change the type
5861 of these to code_props.
5862 (symbol_new, semantic_type_new, symbol_destructor_set,
5863 semantic_type_destructor_set, symbol_destructor_get,
5864 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5865 symbol_check_alias_consistency, default_tagged_destructor_set,
5866 default_tagless_destructor_set, default_tagged_printer_set,
5867 default_tagless_printer_set): Update.
5868 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5869 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5870 code_props members.
5871 (symbol_print): Use SYMBOL_CODE_PRINT.
5872
5873 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5874
5875 Use the new code_props interface for rule actions.
5876 * src/symlist.h (symbol_list): Replace action, action_location, and
5877 used members with a code_props action_props member.
5878 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5879 grammar_midrule_action, grammar_current_rule_merge_set,
5880 grammar_current_rule_symbol_append, packgram): Update.
5881 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5882 * src/scan-code.l (handle_action_dollar): Update.
5883 (translate_rule_action): Remove, no longer used.
5884 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5885
5886 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5887
5888 Use the new code_props interface in parse-gram.y.
5889 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5890 Update all uses of translate_* functions to use the new code_props
5891 interface and to use gram_scanner_last_string_free and
5892 code_scanner_last_string_free where possible.
5893 (grammar_declaration): symbol_list_destructor_set and
5894 symbol_list_printer_set now perform the translation, so don't do it
5895 here. Use gram_scanner_last_string_free where possible.
5896 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5897 translate_code): Remove, no longer used.
5898 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5899 symbol_list_printer_set): Perform code translation here rather than
5900 depending on the caller to do so.
5901
5902 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5903 * src/scan-gram.h (gram_last_string): Remove declaration.
5904 * src/scan-gram.l (last_string): Declare it static.
5905
5906 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5907
5908 Encapsulate code properties and related functionality for the various
5909 destructors, printers, and actions into a code_props structure and
5910 interface. This patch merely implements code_props in scan-code.h and
5911 scan-code.l. Future patches will rewrite other modules to use it.
5912 Discussed starting at
5913 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5914 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5915 consistently initialize const structs that have an empty location
5916 field.
5917 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5918 to ensure consistency.
5919 * src/scan-code.h (code_props): New structure.
5920 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5921 function, macro, and const global variable for initializing a
5922 code_props with no code.
5923 (code_props_plain_init, code_props_symbol_action_init,
5924 code_props_rule_action_init, code_props_translate_code): The rest of
5925 the new code_props functional interface. Among other things, the init
5926 functions set the code_props kind field so that
5927 code_props_translate_code will know whether to behave like
5928 translate_symbol_action, translate_rule_action, or translate_code.
5929 These old translate functions must remain until all other modules are
5930 updated to use the new code_props interface.
5931 (code_scanner_last_string_free): New function similar to
5932 gram_scanner_last_string_free.
5933 (code_scanner_free): Add documentation.
5934 * src/scan-code.l: Implement the new interface.
5935 (code_lex): Make it static, add a code_props* argument, and remove the
5936 rule argument.
5937 (last_string): New static global similar to the one in scan-gram.l.
5938 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5939 instead of rule.
5940 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5941 code_props since Bison may one day use this information for destructors
5942 and printers.
5943 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5944 (handle_action_dollar): Use symbol_list_n_get and set used flag
5945 directly since symbol_list_n_used_set is removed.
5946 (translate_action): Add a code_props* argument and remove the rule,
5947 action, and location arguments. Pass the code_props* on to code_lex.
5948 (translate_rule_action, translate_symbol_action, translate_code):
5949 Rewrite as wrappers around the new code_props interface.
5950 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5951 it would eventually need to break the encapsulation of code_props.
5952
5953 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5954
5955 * etc/.cvsignore: New.
5956
5957 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5958
5959 Add maintainer-push-check to run maintainer-check using push parsing in
5960 place of pull parsing where available.
5961 * Makefile.am (maintainer-push-check): New.
5962 * data/bison.m4 (b4_use_push_for_pull_if): New.
5963 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5964 appropriately based on their existing values.
5965 (yypush_parse): Don't print push-parser-specific diagnostics if push
5966 parsing is being used in place of pull parsing.
5967 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5968 push.c.
5969 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5970 variable, and insert b4_use_push_for_pull_flag into muscles.
5971 * tests/Makefile.am (maintainer-push-check): New.
5972
5973 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5974
5975 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5976 (whether successful or failed) so that yypush_parse can be invoked
5977 again to start a new parse using the same yypstate.
5978 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5979 check multiple yypull_parse invocations on the same yypstate. For pull
5980 mode, extend to check multiple yyparse invocations.
5981 (Exploding the Stack Size with Alloca): Extend to try with
5982 %push-pull-parser.
5983 (Exploding the Stack Size with Malloc): Likewise.
5984
5985 * tests/calc.at (Simple LALR Calculator): Don't specify
5986 %skeleton "push.c" since %push-pull-parser implies that now.
5987 * tests/headers.at (export YYLTYPE): Don't check for the push
5988 declarations. Otherwise, this test case can't be used to see if push
5989 mode can truly emulate pull mode.
5990 * tests/input.at (Torturing the Scanner): Likewise.
5991 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5992 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5993 AT_YACC_IF, which now includes the case of push mode since %skeleton
5994 need not be used for push mode. This will be more intuitive once
5995 push.c is renamed to yacc.c.
5996
5997 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5998
5999 For push mode, convert yyparse from a macro to a function, invoke yylex
6000 instead of passing a yylexp argument to yypull_parse, and don't
6001 generate yypull_parse or yyparse unless %push-pull-parser is declared.
6002 Discussed starting at
6003 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6004 * data/bison.m4 (b4_pull_if): New.
6005 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6006 * data/push.c: Improve M4 quoting a little.
6007 (b4_generate_macro_args, b4_parenthesize): Remove.
6008 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6009 any time a pull parser is requested.
6010 Don't #define this as a wrapper around yypull_parse. Instead, when
6011 both push and pull are requested, make it a function that does that
6012 same thing.
6013 (yypull_parse): If there's a b4_prefix, #define this to
6014 b4_prefix[pull_parse] when both push and pull are requested.
6015 Don't define this as a function unless both push and pull are
6016 requested.
6017 Remove the yylexp argument and hard-code yylex invocation instead.
6018 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6019 %push-parser.
6020 * src/getargs.c (pull_parser): New global initialized to true.
6021 * getargs.h (pull_parser): extern it.
6022 * src/output.c (prepare): Insert pull_flag muscle.
6023 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6024 (prologue_declaration): Set both push_parser and pull_parser = true for
6025 %push-pull-parser. Set push_parser = true and pull_parser = false for
6026 %push-parser.
6027 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6028 %push-parser since there's no backward-compatibility concern here.
6029 Scan %push-pull-parser.
6030 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6031 instead of %push-parser.
6032 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6033 prototype it in the module that calls yyparse.
6034 * tests/input.at (Torturing the Scanner): Likewise.
6035 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6036
6037 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6038
6039 Update etc/bench.pl. Optimize push mode a little (the yyn change
6040 deserves most of the credit).
6041 * Makefile.am (SUBDIRS): Add etc subdirectory.
6042 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6043 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6044 yytoken, yyval, and yyloc declarations to...
6045 (yyparse or yypush_parse): ... here to improve performance. For
6046 yypush_parse invocations after the first, be sure to assign yyn its old
6047 value again.
6048 (yypstate_new): Don't bother initializing the yyresult field since the
6049 initial value isn't used.
6050 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6051 remove the #define that, in push mode, set it to yyps->NAME.
6052 * etc/Makefile.am: New.
6053 * etc/bench.pl: Remove and build it instead from...
6054 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6055 "tests/bison" from the build directory by default rather than just
6056 invoking "bison" from $PATH.
6057 (calc_grammar): Update push parser code: don't declare yylval globally,
6058 don't define yyparse_wrapper, and don't #define yyparse.
6059 (bench_grammar): Update to check all working combinations of yacc.c,
6060 push.c, impure, pure, pull, and push.
6061
6062 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6063
6064 For push mode, add pull wrappers around yypush_parse.
6065 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6066 (yypull_parse): New function wrapping yypush_parse.
6067 (yyparse): New #define wrapping yypull_parse.
6068 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6069 is declared.
6070 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6071 prototype yylex in the module that calls yyparse, and don't prototype
6072 yyparse there. Otherwise, the yyparse expansion won't compile.
6073 * tests/input.at (Torturing the Scanner): Likewise.
6074
6075 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6076
6077 Enable push parsers to operate in impure mode. Thus, %push-parser no
6078 longer implies %pure-parser. The point of this change is to move
6079 towards being able to test the push parser code by running the entire
6080 test suite as if %push-parser had been declared.
6081 * data/push.c (yypush_parse): For impure mode, remove the
6082 yypushed_char, yypushed_val, and yypushed_loc arguments.
6083 Instead, declare these as local variables initialized to the global
6084 yychar, yylval, and yylloc.
6085 For the first yypush_parse invocation only, restore the initial values
6086 of these global variables when it's time to read a token since they
6087 have been overwritten.
6088 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6089 %push-parser.
6090 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6091 %pure-parser along with %push-parser since this test case was designed
6092 for pure push parsers.
6093 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6094 (AT_YACC_OR_PUSH_IF): New.
6095 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6096 add a note that it's still wrong for some cases (as it has been for a
6097 while).
6098 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6099 %push-parser no longer implies %pure-parser.
6100
6101 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6102
6103 Remove some unnecessary differences between the pull parser code and
6104 the push parser code. This patch enables yynerrs in push mode.
6105 * data/push.c: Reformat M4 a little.
6106 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6107 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6108 because push mode is on. Instead, if pure mode is on, move yynerrs
6109 to...
6110 (b4_declare_parser_state_variables): ... here.
6111 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6112 to yyps->NAME so it can be used in yypush_parse.
6113 (yypush_parse): Don't omit uses of yynerrs in push mode.
6114
6115 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6116
6117 Fix bug such that the first pushed token's value and location are
6118 sometimes overwritten (sometimes by %initial-action) before being used.
6119 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6120 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6121 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6122 more closely mimic the pull parser logic.
6123 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6124 time to read a token, which is after any initialization of yylval and
6125 yylloc.
6126 (gottoken): Rename label to...
6127 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6128 user namespace.
6129
6130 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6131
6132 Rearrange initialization of the parser state variables so that the
6133 skeleton doesn't have to have a copy for pull mode and another for push
6134 mode. This patch also fixes at least a bug such that yylloc was not
6135 initialized (with b4_location_initial_line and
6136 b4_location_initial_column) upon calling yypush_parse. However, that
6137 initialization now overwrites the first token's location;
6138 %initial-action assigning @$ already did the same thing, and both bugs
6139 will be fixed in a later patch.
6140 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6141 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6142 yyss, yyvs, yyls, and yystacksize.
6143 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6144 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6145 yylsp.
6146 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6147 yyps->NAME so it can be used in yypush_parse.
6148 (yyparse or yypush_parse): For yypush_parse, don't print the
6149 "Starting parse" diagnostic for invocations after the first.
6150 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6151 yypush_parse, only do it for the first invocation.
6152 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6153 initialization to occur in yypush_parse but only on the first
6154 invocation.
6155
6156 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6157
6158 * data/push.c: Add CPP guards around push parser declarations in both
6159 the header and the code file.
6160 In the code file, move the push parser declarations to the same place
6161 they appear in the header file.
6162 Clean up the M4 some, especially the inconsistent underquoting in
6163 some b4_c_function_def and b4_c_function_decl uses.
6164
6165 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6166
6167 Encapsulate the push parser state variables into an M4 macro so the
6168 push skeleton doesn't have to list them again for pull mode's yyparse.
6169 For push mode, remove yypush_parse's local equivalents of these
6170 variables to eliminate unnecessary copying between the two sets at
6171 run-time. This patch also fixes at least a bug related to multiple
6172 %initial-action invocations in push mode.
6173 * data/push.c (b4_declare_parser_variables): Rename to...
6174 (b4_declare_scanner_communication_variables): ... this for clarity and
6175 update both uses.
6176 (b4_declare_yyparse_variables): Remove and move its contents to the one
6177 spot where it was invoked.
6178 (b4_declare_parser_state_variables): New macro containing the parser
6179 state variables required by push mode.
6180 (struct yypstate): Replace all fields but yynew with
6181 b4_declare_parser_state_variables.
6182 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6183 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6184 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6185 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6186 parser state variable declarations with
6187 b4_declare_parser_state_variables.
6188 Don't initialize parser state variables when calling yypush_parse since
6189 yypstate_new already does that.
6190 Invoke the user's initial action only upon the first yypush_parse
6191 invocation.
6192 Remove all code that copies between the local parser state variables
6193 and the yypstate.
6194
6195 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6196
6197 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6198 prevent a name collision in a future patch where these names will
6199 sometimes be #define'd.
6200 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6201 since it no longer has the same name as the existing argument.
6202 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6203
6204 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
6205 and Joel E. Denny <jdenny@ces.clemson.edu>
6206
6207 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6208 that the argument is case-insensitive, and there's no `=' here.
6209 For the %skeleton entry, mention that %language is better.
6210 (Bison Options): Likewise for --language and --skeleton. Move the
6211 --skeleton entry so that the `Tuning the parser' section is sorted
6212 alphabetically on long options.
6213 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6214 %language directive in detail here; cross-reference the %language
6215 documentation instead.
6216 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6217 `%require "2.3b"' so that the example is always up-to-date.
6218 (Table of Symbols): Add entries for %language and %skeleton.
6219 * examples/extexi (normalize): Instead of replacing every %require
6220 argument with the current Bison version, just substitute for
6221 `@value{VERSION}'. This guarantees that we're testing what actually
6222 appears in the documentation.
6223 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6224 rather than `@VERSION@'.
6225
6226 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6227
6228 * NEWS: Reword the %language news a bit, and put it earlier.
6229
6230 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6231 Rewrite to simplify the logic.
6232 (language_argmatch): Likewise.
6233 (program_name): We now own this var.
6234 * src/getargs.h (struct bison_language): Use char[] rather than
6235 const char *.
6236
6237 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6238 Java is supported.
6239 * src/complain.c (program_name): Remove decl; no longer needed.
6240 * src/main.c (program_name): Remove; now belongs to getargs.
6241
6242 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
6243
6244 * NEWS: Document %language.
6245
6246 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6247
6248 * data/c-skel.m4, data/c++-skel.m4: New files.
6249 * data/glr.c: Complain on push parsers.
6250
6251 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6252 over %skeleton.
6253 (Decl Summary): Document %language and %skeleton.
6254 (Command line): Document -L.
6255
6256 * examples/extexi: Rewrite %require directive.
6257 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6258
6259 * src/files.c (compute_exts_from_gc): Look in language structure
6260 for .y extension.
6261 (compute_file_name_parts): Check whether .tab should be added.
6262 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6263 (language, skeleton_arg, language_argmatch): New.
6264 (long_options): Add --language.
6265 (getargs): Use skeleton_arg, add -L/--language.
6266 * src/getargs.h: Include location.h.
6267 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6268 * src/output.c (prepare): Pick default skeleton from struct language.
6269 Don't dispatch C skeletons here.
6270 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6271 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6272 * src/scan-gram.l ("%language"): New rule.
6273
6274 * tests/calc.at: Test %skeleton and %language.
6275 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6276 (AT_GLR_IF): Look for %skeleton "glr.cc".
6277 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6278 (AT_YACC_IF): Reject %language.
6279
6280 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6281
6282 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6283 since it wasn't used; only the typedef name 'semantic_type' is needed.
6284 Also, omit trailing white space.
6285
6286 * bootstrap: Sync from coreutils.
6287 (gnulib_extra_files): Add build-aux/announce.gen.
6288 (slurp): Adjust .gitignore files like .cvsignore files.
6289 * build-aux/announce-gen: Remove from CVS, since bootstrap
6290 now creates this.
6291
6292 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6293
6294 Make %push-parser imply %pure-parser. This fixes several bugs; see
6295 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6296 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6297 pure_parser = true.
6298 * data/push.c: Don't bother testing b4_push_if when deciding whether
6299 to expand b4_declare_parser_variables globally.
6300 (yypush_parse): Likewise in here.
6301
6302 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6303 (yy_reduce_print): Reformat M4 for readability.
6304
6305 2006-12-15 Bob Rossi <bob@brasko.net>
6306 and Joel Denny <jdenny@ces.clemson.edu>
6307
6308 * data/push.c (yypstate): Add typedef, and update all uses of
6309 struct yypstate to just yypstate.
6310 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6311
6312 2006-12-14 Bob Rossi <bob@brasko.net>
6313
6314 * data/push.c (yypush_parse): Declare prototype regardless of
6315 %locations option.
6316
6317 2006-12-14 Bob Rossi <bob@brasko.net>
6318
6319 * data/push.c (yyparse): Remove the prototype and the #define when in
6320 push-parser mode.
6321
6322 2006-12-13 Bob Rossi <bob@brasko.net>
6323
6324 * data/push.c (yypstate_init): Rename to...
6325 (yypstate_new): ... this and use b4_c_function_def.
6326 (yypstate_delete): New.
6327 (yypush_parse): Change parameters yynval and yynlloc to be const.
6328 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6329 yypstate_delete functions.
6330
6331 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6332
6333 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6334 strange test case titles. Reported by Bob Rossi.
6335
6336 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6337
6338 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6339 of potential ambiguities in GLR grammers.
6340
6341 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6342
6343 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6344 `bison ', use m4_index instead of m4_substr since chopping up a string
6345 containing M4-special characters causes problems here.
6346
6347 Fix a couple of bugs related to special characters in user-specified
6348 file names, and make it easier for skeletons to compute output file
6349 names with the same file name prefix as Bison-computed output file
6350 names.
6351 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6352 b4_parser_file_name and b4_spec_defines_file instead of
6353 @output_parser_name@ and @output_header_name@, which are now redundant.
6354 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6355 b4_parser_file_name, b4_spec_defines_file, and the new
6356 @basename(FILENAME@) instead of @output_parser_name@ and
6357 @output_header_name@, which inappropriately escaped the file names as
6358 C string literals.
6359 * src/files.c (all_but_ext): Remove static qualifier.
6360 (compute_output_file_names): Move `free (all_but_ext)' to...
6361 (output_file_names_free): ... here since all_but_ext is needed later.
6362 * src/files.h (all_but_ext): Extern.
6363 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6364 exactly what MUSCLE_INSERT_STRING used to do.
6365 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6366 characters are escaped properly.
6367 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6368 all_but_ext.
6369 For pkgdatadir muscle, maintain previous functionality by using
6370 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6371 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6372 digraphs would never be expanded. Hopefully no one has M4-special
6373 characters in his Bison installation path.
6374 * src/scan-skel.l: Don't parse @output_header_name@ and
6375 @output_parser_name@ anymore since they're now redundant.
6376 In @output, use decode_at_digraphs.
6377 Parse a new @basename command that invokes last_component.
6378 (decode_at_digraphs): New.
6379 (BASE_QPUTS): Remove unused.
6380 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6381 (Output file name): New tests.
6382
6383 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6384
6385 Warn about output files that are generated by the skeletons and that
6386 conflict with other output files.
6387 * data/glr.c: Don't generate the header file here when glr.cc does.
6388 * src/files.c (file_names, file_names_count): New static globals.
6389 (compute_output_file_names): Invoke output_file_name_check for files
6390 not generated by the skeletons and remove existing checks.
6391 (output_file_name_check): New function that warns about conflicting
6392 output file names.
6393 (output_file_names_free): Free file_names.
6394 * src/files.h (output_file_name_check): Declare.
6395 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6396 the skeletons.
6397 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6398 (Conflicting output files): New tests.
6399
6400 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6401
6402 * doc/bison.texinfo: Fix a couple of typos.
6403
6404 2006-12-08 Bob Rossi <bob@brasko.net>
6405
6406 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6407 Rename to...
6408 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6409 update all uses.
6410 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6411 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6412 local pv.
6413 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6414 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6415
6416 2006-12-07 Bob Rossi <bob@brasko.net>
6417 and Joel Denny <jdenny@ces.clemson.edu>
6418
6419 * data/push.c (yypvarsinit): Change return type from void* to struct
6420 yypvars*. No longer cast to void* on return.
6421 (struct yypvars): Remove yylen since it need not be remembered between
6422 yypushparse invocations.
6423 (yypushparse): Don't copy between yylen and pv->yylen.
6424
6425 2006-12-05 Bob Rossi <bob@brasko.net>
6426
6427 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6428 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6429 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6430 (struct yypvars): Remove b4_declare_parser_variables.
6431 (yypvarsinit): Remove init code for removed variables.
6432 (global scope): Do not declare b4_declare_parser_variables if
6433 push or pure mode.
6434 (yypushparse): Add b4_declare_parser_variables.
6435 Init new local variables, and remove init code for removed
6436 yypvars variables.
6437 (yyparse): Delete.
6438 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6439 and yyparse for other modes.
6440 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6441 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6442 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6443 (AT_PURE_LEX_IF): True if pure or push parser.
6444
6445 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6446
6447 Document Yacc prologue alternatives and default %destructor's and
6448 %printer's as experimental. Don't mention Java yet. Discussed at
6449 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6450 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6451 (2.3a): Annotate this entry to say the old forms of these features were
6452 also experimental.
6453 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
6454 Table of Symbols): Say they're experimental. Comment out any mention
6455 of Java (we'll want this back eventually).
6456
6457 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6458
6459 Support a file name argument to %defines. Deprecate `=' in
6460 %file-prefix, %name-prefix, and %output. Discussed at
6461 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6462 * NEWS (2.3a+): Mention.
6463 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
6464 form of %defines, and remove `=' from entries for %file-prefix,
6465 %name-prefix, and %output.
6466 * src/parse-gram.y (prologue_declaration): Implement.
6467 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6468 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6469 all but one occurrence of %name-prefix.
6470 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6471 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6472 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6473 occurrence of each of %file-prefix and %output. Add check for %defines
6474 with argument.
6475 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6476 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6477 Remove the `=' from %output.
6478
6479 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6480
6481 Don't escape $ in test case titles since Autoconf 2.61 now does that
6482 correctly.
6483 * tests/actions.at (Default %printer and %destructor are not for error
6484 or $undefined): Here.
6485 (Default %printer and %destructor are not for $accept): Here.
6486 * tests/input.at (Invalid $n and @n): Here.
6487
6488 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6489
6490 Rename <!> to <>. Discussed starting at
6491 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6492 * NEWS (2.3a+): Update.
6493 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
6494 Update.
6495 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6496 * src/scan-gram.l (INITIAL): Implement.
6497 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6498 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6499 comment.
6500 * tests/actions.at (Default tagless %printer and %destructor,
6501 Default tagged and per-type %printer and %destructor,
6502 Default %printer and %destructor are not for error or $undefined,
6503 Default %printer and %destructor are not for $accept,
6504 Default %printer and %destructor for mid-rule values): Update.
6505 * tests/input.at (Default %printer and %destructor redeclared,
6506 Unused values with default %destructor): Update.
6507
6508 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6509
6510 Don't let %prec take a nonterminal.
6511 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6512 token.
6513 * tests/input.at (%prec takes a token): New test checking that %prec
6514 won't take a nonterminal.
6515
6516 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6517
6518 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6519 it was double-quoted.
6520 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6521 grammar is maintained with Bison's highest standards.
6522 * src/getargs.c: Fix some typos in Doxygen comments.
6523
6524 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6525
6526 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6527 later. Reported by Paul Eggert in
6528 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6529 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6530 * src/scan-code.l (translate_action): Don't bother invoking
6531 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6532 (code_scanner_free): Instead of invoking
6533 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6534 which frees more.
6535 * src/scan-gram.l (gram_scanner_free): Likewise.
6536 * src/scan-skel.l (scan_skel): Likewise.
6537
6538 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6539
6540 * src/files.c (tr): Change return type to void.
6541 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6542 has been called previously for the same key.
6543 (muscle_find): Return storage instead of value so that
6544 --enable-gcc-warnings doesn't produce warnings that the return discards
6545 const. aver that the value and storage are the same since storage
6546 could potentially be NULL when value is not.
6547 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6548 same as 0.
6549
6550 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6551
6552 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6553 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6554 us a slightly cleaner distribution, and also works.
6555 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6556 gnulib changes.
6557
6558 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6559 and Paul Eggert <eggert@cs.ucla.edu>
6560
6561 Don't let Bison leak memory except when it complains.
6562 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6563 (spec_defines_file, dir_prefix): Now char *, not const char *,
6564 since they are freed.
6565 * src/files.c: Likewise.
6566 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6567 Likewise.
6568 (tr): Now operates in-place. All uses changed.
6569 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6570 values.
6571 (compute_file_name_parts, compute_output_file_names): Don't store
6572 read-only data in variables that will be freed.
6573 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6574 src_extension, and header_extension.
6575 (output_file_names_free): New public function to free
6576 spec_verbose_file, spec_graph_file, spec_defines_file,
6577 parser_file_name, and dir_prefix.
6578 * src/getargs.c (getargs): Don't store read-only data in variables that
6579 will be freed.
6580 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6581 (which previously existed but was unused), and quotearg_free.
6582 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6583 * src/muscle_tab.c: Likewise.
6584 (muscle_entry): Make the value char const *,
6585 and add a new storage member that is char * and can be freed.
6586 (muscle_entry_free): New private function.
6587 (muscle_init): Use it instead of free.
6588 (muscle_insert, muscle_grow): Update and use new storage member.
6589 (muscle_code_grow): Free the string passed to muscle_grow
6590 since it's not needed anymore.
6591 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6592 add a new `char *code' member.
6593 ("{...}"): Declare semantic type as code.
6594 * src/scan-code.h (translate_rule_action):
6595 (translate_symbol_action, translate_code, translate_action): Return
6596 `char const *' rather than `char *' since external code should not free
6597 these strings.
6598 * src/scan-code.l: Likewise.
6599 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6600 which is "{...}" in the parser.
6601 * tests/Makefile.am (maintainer-check-valgrind): Set
6602 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6603 Valgrind.
6604 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6605 complain.
6606 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6607 expecting a non-zero exit status sets --leak-check=summary and
6608 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6609 this case, and we don't want to hear about it.
6610
6611 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6612
6613 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6614 instead of from the template, to simplify configuration a bit.
6615 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6616 and m4/wint_t.m4, as they are needed with the latest gnulib.
6617
6618 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6619
6620 Disable unset/unused mid-rule value warnings by default, and recognize
6621 --warnings=midrule-values to enable them. Discussed starting at
6622 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6623 * NEWS (2.3a+): Mention.
6624 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6625 warnings): Add entry for midrule-values subargument.
6626 * src/reader.c (symbol_should_be_used): Don't return true just because
6627 the value is a set/used mid-rule value unless
6628 --warnings=midrule-values was specified.
6629 * tests/input.at (Unused values, Unused values before symbol
6630 declarations): Run tests with and without --warnings=midrule-values.
6631
6632 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6633 than LIST_FREE directly.
6634
6635 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6636
6637 Finish implementing --warnings=error, which should not be implied by
6638 --warnings=all (or by its synonyms -W and --warnings without
6639 subarguments).
6640 * src/complain.c (set_warning_issued): New function to report that
6641 warnings are being treated as errors and to record an error if so.
6642 Invoke...
6643 (warn_at, warn): ... here.
6644 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6645 "error - warnings are errors" does not appear above "all - all of the
6646 above".
6647 (getargs): For -W and --warnings without subarguments, don't let
6648 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6649 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6650
6651 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6652
6653 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6654 empty subargument list. For example: `bison --warnings= parser.y'.
6655
6656 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6657
6658 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6659 the parser header file so that gcc doesn't warn.
6660
6661 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6662
6663 Split the default %destructor/%printer into two kinds: <*> and <!>.
6664 Discussed starting at
6665 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6666 * NEWS (2.3a+): Mention.
6667 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6668 previous change today related to mid-rules.
6669 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6670 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6671 (TYPE_TAG_ANY): Add as <*>.
6672 (TYPE_TAG_NONE): Add as <!>.
6673 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6674 for <*> and <!>.
6675 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6676 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6677 * src/symlist.c (symbol_list_default_new): Split into tagged and
6678 tagless versions.
6679 (symbol_list_destructor_set, symbol_list_printer_set): Split
6680 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6681 SYMLIST_DEFAULT_TAGLESS.
6682 * src/symlist.h: Update symbol_list_default*_new prototypes.
6683 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6684 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6685 * src/symtab.c (default_destructor, default_destructor_location,
6686 default_printer, default_printer_location): Split each into tagged and
6687 tagless versions.
6688 (symbol_destructor_get, symbol_destructor_location_get,
6689 symbol_printer_get, symbol_printer_location_get): Implement tagged
6690 default and tagless default cases.
6691 (default_destructor_set, default_printer_set): Split each into tagged
6692 and tagless versions.
6693 * src/symtab.h: Update prototypes.
6694 * tests/actions.at (Default %printer and %destructor): Rename to...
6695 (Default tagless %printer and %destructor): ... this, and extend.
6696 (Per-type %printer and %destructor): Rename to...
6697 (Default tagged and per-type %printer and %destructor): ... this, and
6698 extend.
6699 (Default %printer and %destructor for user-defined end token): Extend.
6700 (Default %printer and %destructor are not for error or $undefined):
6701 Update.
6702 (Default %printer and %destructor are not for $accept): Update.
6703 (Default %printer and %destructor for mid-rule values): Extend.
6704 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6705 (Unused values with default %destructor): Extend.
6706
6707 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6708
6709 Don't apply the default %destructor/%printer to an unreferenced midrule
6710 value. Mentioned at
6711 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6712 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6713 like $@n instead of just @n so that the default %destructor/%printer
6714 logic doesn't see them as user-defined symbols.
6715 (symbol_is_dummy): Check for both forms of the name.
6716 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6717 name for which the midrule value is referenced in any action.
6718 * tests/actions.at (Default %printer and %destructor for mid-rule
6719 values): New test.
6720 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6721 for change to dummy symbol names.
6722
6723 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6724
6725 Warn about unset midrule $$ if the corresponding $n is used.
6726 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6727 $n usage.
6728 (packgram): Before invoking grammar_rule_check on any rule, make sure
6729 all actions have already been scanned in order to set `used' flags.
6730 Otherwise, checking that a midrule's $$ is set will not always work
6731 properly because the midrule check must forward-reference the midrule's
6732 parent rule.
6733 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6734 warning.
6735
6736 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6737
6738 More improvements to the documentation of the prologue alternatives:
6739 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6740 Bison manual.
6741 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6742 some text to clarify the relative importance of the new directives and
6743 to show how these directives may be viewed as code labels.
6744
6745 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6746
6747 Similar to the recently removed %before-header, add %code-top as the
6748 alternative to the pre-prologue. Mentioned at
6749 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6750 Also, let the prologue alternatives appear in the grammar section.
6751 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6752 (prologue_declaration): Move the existing prologue alternatives to...
6753 (grammar_declaration): ... here and add %code-top.
6754 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6755
6756 Clean up and extend documentation for the prologue alternatives.
6757 * NEWS (2.3a+): Describe prologue alternatives.
6758 * doc/bison.texinfo (Prologue): Move discussion of prologue
6759 alternatives to...
6760 (Prologue Alternatives): ... this new section, and extend it to discuss
6761 all 4 directives in detail.
6762 (Table of Symbols): Clean up discussion of prologue alternatives and
6763 add %code-top.
6764
6765 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6766
6767 DJGPP specific issues.
6768
6769 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6770 config.bat accordingly.
6771 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6772 * djgpp/config.site: Likewise.
6773
6774 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6775
6776 Replace %*-header with %provides, %requires, %code. See discussion at
6777 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6778
6779 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6780 (b4_user_start_header): Remove.
6781 * data/glr.c: Use new macros instead of b4_*start_header
6782 and b4_*end_header.
6783 * data/glr.cc: Likewise.
6784 * data/lalr1.cc: Likewise.
6785 * data/push.c: Likewise.
6786 * data/yacc.c: Likewise.
6787
6788 * doc/bison.texinfo: Remove %before-header, rename
6789 %{start,end,after}-header to %requires, %provides, %code.
6790
6791 * src/parse-gram.y: Likewise (also rename token names accordingly).
6792 * src/scan-gram.l: Likewise.
6793 * tests/actions.at: Likewise.
6794
6795 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6796
6797 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6798 Problem reported by Joel E. Denny.
6799
6800 2006-10-14 Jim Meyering <jim@meyering.net>
6801
6802 (Sync from coreutils.)
6803 Work also when the working directory (with e.g. coreutils sources)
6804 is version controlled with git, rather than CVS.
6805 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6806 rather than CVS.
6807 In messages and comments, say e.g., "checked-out sources",
6808 rather than "CVS sources".
6809 (version_controlled_file): New function. Work for git as well as
6810 for CVS. Don't use grep's -q option.
6811 (slurp): Call it here, in place of CVS-specific code.
6812
6813 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6814
6815 Fix testsuite for ./configure --enable-gcc-warnings:
6816 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6817 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6818 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6819 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6820 * test/regression.at (Diagnostic that expects two alternatives):
6821 Likewise.
6822
6823 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6824
6825 * bootstrap.conf (gnulib_modules): Add config-h.
6826 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6827 worry about HAVE_CONFIG_H.
6828 * lib/abitset.c: Likewise.
6829 * lib/bitset.c: Likewise.
6830 * lib/bitset_stats.c: Likewise.
6831 * lib/bitsetv-print.c: Likewise.
6832 * lib/bitsetv.c: Likewise.
6833 * lib/ebitset.c: Likewise.
6834 * lib/get-errno.c: Likewise.
6835 * lib/lbitset.c: Likewise.
6836 * lib/subpipe.c: Likewise.
6837 * lib/timevar.c: Likewise.
6838 * lib/vbitset.c: Likewise.
6839 * lib/bitset.c: Include "bitset.h" first, to test interface.
6840 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6841 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6842 * lib/bitsetv.c: Include "bitsetv.h" first.
6843 * lib/get-errno.c: Include "get-errno.h" first.
6844 * m4/.cvsignore: Add config-h.m4.
6845 * tests/actions.at (Default %printer and %destructor for ...):
6846 Adjust expected line numbers in output to reflect removal of #if
6847 HAVE_CONFIG_H lines.
6848 * tests/glr-regression.at (Missed %merge type warnings when ...):
6849 Likewise.
6850 * tests/regression.at (Braced code in declaration in rules section):
6851 Likewise.
6852 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6853 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6854 Include <config.h> unconditionally.
6855
6856 * bootstrap: Sync from coreutils, as follows:
6857
6858 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6859
6860 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6861 variable was sometimes used without being initialized. This
6862 messed up the installation of the INSTALL file in some cases.
6863
6864 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6865
6866 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6867 --copy. Inspired by a suggestion from Bruno Haible.
6868
6869 2006-10-03 Jim Meyering <jim@meyering.net>
6870
6871 * bootstrap: Undo last change to this file, since now gnulib-tool
6872 sticks with the automake default in generating dependencies.
6873
6874 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6875
6876 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6877 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6878
6879 * doc/bison.1: Add copyright notice.
6880
6881 * data/glr.c: Don't include <stdarg.h>; not used.
6882
6883 * NEWS: The -g and --graph options now output graphs in Graphviz
6884 DOT format, not VCG format.
6885 * doc/bison.1: Likewise.
6886 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6887 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6888 of this change in
6889 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6890 * TODO: Remove Graphviz entry.
6891 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6892 remove vcg.c, vcg.h, vcg_defaults.h.
6893 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6894 * src/graphviz.c, src/graphviz.h: New files.
6895 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6896 * src/files.h: Make comment more generic.
6897 * src/main.c (main): Likewise.
6898 * src/print_graph.h: Likewise.
6899 * src/getargs.c (usage): Make usage description more generic.
6900 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6901 (static_graph, fgraph): Remove. All uses changed to pass
6902 arguments instead of sharing a static var.
6903 (print_core, print_actions, print_state, print_graph):
6904 Output graphviz format rather than VCG format.
6905 * tests/.cvsignore: Remove *.vcg; add *.dot.
6906 * tests/output.at: Expect *.dot files, not *.vcg files.
6907
6908 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6909 accommodates the 2006-10-08 change.
6910
6911 2006-10-11 Bob Rossi <bob@brasko.net>
6912
6913 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6914 (b4_yyssa, b4_yyerror_range): New macros.
6915 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6916 (yypvarsinit): Remove init of removed fields.
6917 (yypushparse): Remove use of removed fields; use new macros instead.
6918
6919 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6920
6921 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6922 in a push parser. Reindent slightly to match yacc.c better.
6923
6924 2006-10-11 Bob Rossi <bob@brasko.net>
6925
6926 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6927 yymsg_alloc fields.
6928 (yypvarsinit, yypushparse): Remove init of removed fields.
6929 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6930
6931 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6932
6933 * THANKS: Add Paolo Bonzini and Bob Rossi.
6934
6935 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6936
6937 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6938 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6939 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6940 b4_define_user_cde and uses): Remove.
6941 (b4_comment, b4_prefix, b4_sync_start): New.
6942 * data/bison.m4: New file, with most of the content removed from c.m4.
6943 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6944 * src/output.c (output_skeleton): Pass bison.m4.
6945 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6946 only if specified.
6947
6948 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6949
6950 Fix test failure reported by Tom Lane in
6951 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6952 and try to make such failures easier to catch in the future.
6953 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6954 that's now the caller's responsibility.
6955 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6956 Set yychar = YYEOF if it's negative.
6957 * tests/actions.at (yylex): Abort if asked to read past EOF.
6958 * tests/conflicts.at (yylex): Likewise.
6959 * tests/cxx-type.at (yylex): Likewise.
6960 * tests/glr-regression.at (yylex): Likewise.
6961 * tests/input.at (yylex): Likewise.
6962 * tests/regression.at (yylex): Likewise.
6963 * tests/torture.at (yylex): Likewise.
6964
6965 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6966
6967 Fix problems with translating English-language diagnostics.
6968 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6969 respect to bison-runtime pot generation. The YY_ stuff
6970 wasn't being captured.
6971 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6972 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6973 * runtime-po/POTFILES.in: Add data/push.c.
6974
6975 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6976
6977 Merge bootstrap changes from coreutils.
6978
6979 2006-09-28 Jim Meyering <jim@meyering.net>
6980
6981 Automatically generated dependencies are important even
6982 when all of the sources in a directory come from gnulib.
6983 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6984 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6985
6986 2006-09-23 Jim Meyering <jim@meyering.net>
6987
6988 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6989
6990 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6991
6992 * bootstrap: Add support for --force.
6993 (usage): New function. Describe usage less tersely.
6994 (CVS_only_file): New var.
6995
6996 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6997
6998 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6999 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
7000 Adjust white space and comments to match GNU style better.
7001
7002 2006-09-20 Bob Rossi <bob@brasko.net>
7003
7004 * data/push.c (yyresult_get): Remove function.
7005 (YYPUSH_MORE): Add #define.
7006 (yypushparse): Modify return value.
7007
7008 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7009
7010 * stamp-h.in: Remove; no longer needed.
7011 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7012 Remove config.h, config.hin, intl (no longer created).
7013 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7014 stamp-h1.
7015
7016 Sync bootstrap from coreutils, as follows:
7017
7018 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7019
7020 * bootstrap (symlink_to_gnulib): New function.
7021 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7022 to copies-of-gnulib.
7023 (cp_mark_as_generated, slurp, gnulib_files):
7024 Avoid making a copy if it's the same as the old version.
7025 (gnulib_files): Add support for this variable (used by Bison).
7026
7027 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7028
7029 * src/getargs.c (usage): Rework to use conventions similar to
7030 coreutils, to make translation a bit easier and the code a bit
7031 smaller. Problem reported by Tim Van Holder.
7032
7033 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7034
7035 Use some of gnulib's new modules, taken from coreutils.
7036
7037 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7038 * bootstrap.conf: New file.
7039 (gnulib_modules): Add configmake, inttypes, unistd.
7040 (XGETTEXT_OPTIONS): Add complain, complain_at,
7041 fatal, fatal_at, warn, warn_at, unexpected_end.
7042 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7043 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7044 (gl_EARLY): Add.
7045 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7046 (gl_INIT): Add
7047 (GNULIB_AUTOCONF_SNIPPET): Remove.
7048 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7049 the pickiest.
7050 * lib/.cvsignore: Add inttypes_.h.
7051 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7052 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7053 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7054 no-longer-necessary initializations.
7055 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7056 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7057 use the unistd module.
7058 * src/system.h: Likewise.
7059 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7060 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7061 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7062 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7063 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7064 * src/system.h: Include inttypes.h unconditionally, now that we
7065 use the inttypes module. Don't bother to include stdint.h, since
7066 inttypes.h now does that for us.
7067 (LOCALEDIR): Remove, now that we use the configmake module.
7068 * src/getargs.c: Include configmake.h.
7069 * src/main.c: Likewise.
7070 * src/output.c: Likewise.
7071 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7072 not from $abs_top_builddir, since config.h moved.
7073
7074
7075 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7076 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7077
7078 * src/parse-gram.y (symbol_declaration): Don't put statements
7079 before declarations; it's not portable to C89.
7080 * src/scan-code.l (handle_action_at): Likewise.
7081
7082 * src/scan-code.l: Always initialize braces_level; the old code
7083 left it uninitialized and therefore had undefined behavior.
7084
7085 Don't attempt to redefine 'assert', since it runs afoul of
7086 systems where standard headers (mistakenly) include <assert.h>.
7087 Instead, define and use our own alternative, called 'aver'.
7088 * src/reader.c: Don't include assert.h, since we no longer
7089 use assert.
7090 * src/scan-code.l: Likewise.
7091 * src/system.h (assert): Remove, replacing with....
7092 (aver): New function, taking a bool arg. All uses changed.
7093 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7094 not merely an integer.
7095
7096 2006-09-15 Bob Rossi <bob@brasko.net>
7097
7098 Add support for push parsing. Based on the original work of
7099 Odd Arild Olsen <oao@fibula.no>.
7100 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7101 * data/c.m4 (YYPUSH): New.
7102 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7103 * data/push.c: New file.
7104 * src/getargs.c (push_parser): New var.
7105 * src/getargs.h (push_parser): New declaration.
7106 * src/output.c (prepare): Add macro insertion of `push_flag'.
7107 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7108 (prologue_declaration): Parse %push-parser.
7109 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7110 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7111 list of removed lines from the traces observed.
7112 (AT_CHECK_CALC_LALR): Added push parser tests.
7113
7114 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7115
7116 * NEWS: Version 2.3a.
7117 * configure.ac (AC_INIT): Likewise.
7118
7119 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7120 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7121 due to header ordering dependencies. I don't know why the #define
7122 was there.
7123
7124 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7125 runtime cost when YYDEBUG is not defined, and so that some tests
7126 that used to fail now work. Problem and initial suggestion by
7127 Paolo Bonzini.
7128 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7129 * data/glr.cc (b4_parser_class_name):
7130 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7131 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7132 (yydebug_) [YYDEBUG]: New member.
7133 (yycdebug_): Now defined only if YYDEBUG.
7134 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7135 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7136 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7137 if YYYDEBUG.
7138 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7139 Define only if YYDEBUG.
7140 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7141 set_debug_level.
7142 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7143 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7144 AT_CHECK_CALC_GLR_CC that are working now.
7145
7146 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7147
7148 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7149 We don't need them in glr.cc, and glr.c defines them.
7150 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7151 assumes that defining it to anything is the same as defining
7152 it to 1. Problem reported by Paolo Bonzini.
7153
7154 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7155
7156 * data/c.m4 (b4_null, b4_case): Define.
7157 * src/output.c (prepare_symbols): Use b4_null.
7158 (user_actions_output): Use b4_case.
7159
7160 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7161
7162 * data/glr.c (b4_shared_declarations): Put start-header first,
7163 before any #includes that we generate, so that feature-test
7164 macros work. Problem reported by Michael Deutschmann in
7165 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7166 * data/lalr1.cc: Likewise.
7167 * doc/bison.texinfo (Prologue): Document that feature-test macros
7168 should be defined before any Bison declarations.
7169 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7170 that depend on location.hh after, not before, Bison decls, since
7171 we now include location.hh after the first user prologue.
7172
7173 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7174 Sander Brandenburg in
7175 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7176 Also, fix minor white space and comment issues.
7177 (Prologue): Mention that it's better to define feature-test macros
7178 before Bison declarations. Problem reported by Michael Deutschmann.
7179
7180 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7181 by Jim Meyering.
7182 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7183 This adjusts to recent gnulib changes.
7184
7185 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7186
7187 Finish implementation of per-type %destructor/%printer. Discussed
7188 starting at
7189 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7190 and
7191 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7192 * NEWS (2.3+): Add a description of this feature to the default
7193 %destructor/%printer description.
7194 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7195 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7196 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7197 list node contains a semantic type.
7198 * src/symtab.c, src/symtab.h: Extend with a table that associates
7199 semantic types with their %destructor's and %printer's.
7200 (semantic_type_from_uniqstr, semantic_type_get,
7201 semantic_type_destructor_set, semantic_type_printer_set): New functions
7202 composing the public interface of that table.
7203 (symbol_destructor_get, symbol_destructor_location_get,
7204 symbol_printer_get, symbol_printer_location_get): If there's no
7205 per-symbol %destructor/%printer, look up the per-type before trying
7206 the default.
7207 * tests/actions.at (Per-type %printer and %destructor): New test case.
7208 * tests/input.at (Default %printer and %destructor redeclared):
7209 Extend to check that multiple occurrences of %symbol-default in a
7210 single %destructor/%printer declaration is an error.
7211 (Per-type %printer and %destructor redeclared, Unused values with
7212 per-type %destructor): New test cases.
7213
7214 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7215
7216 Require default %destructor/%printer to be declared using
7217 %symbol-default instead of an empty symbol list, and start working on
7218 new per-type %destructor/%printer. Discussed at
7219 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7220 * NEWS (2.3+): Add %symbol-default to example.
7221 * bison.texinfo (Freeing Discarded Symbols): Likewise.
7222 (Table of Symbols): Add entry for %symbol-default.
7223 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7224 (generic_symlist, generic_symlist_item): New nonterminals for creating
7225 a list in which each item is a symbol, semantic type, or
7226 %symbol-default.
7227 (grammar_declaration): Use generic_symlist in %destructor and %printer
7228 declarations instead of symbols.1 or an empty list.
7229 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7230 for changes to symbol_list.
7231 * src/reader.c: Update for changes to symbol_list.
7232 * src/scan-code.l: Likewise.
7233 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7234 * src/symlist.c, src/symlist.h: Extend such that a list node may
7235 represent a semantic type or a %symbol-default in addition to just an
7236 ordinary symbol. Add switched functions for setting %destructor's and
7237 %printer's.
7238 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7239 %destructor/%printer declarations.
7240
7241 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7242
7243 Whether the default %destructor/%printer applies to a particular symbol
7244 isn't a question of whether the user *declares* that symbol (in %token,
7245 for example). It's a question of whether the user by any means
7246 *defines* the symbol at all (by simply using a char token, for
7247 example). $end is defined by Bison whereas any other token with token
7248 number 0 is defined by the user. The error token is always defined by
7249 Bison regardless of whether the user declares it with %token, but we
7250 may one day let the user define error as a nonterminal instead.
7251 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7252 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7253 the meaning of "user-defined".
7254 * tests/actions.at (Default %printer and %destructor for user-declared
7255 end token): Rename to...
7256 (Default %printer and %destructor for user-defined end token): ...
7257 this.
7258
7259 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7260 computation of whether to apply the default, don't maintain a list of
7261 every Bison-defined symbol. Instead, just check for a first character
7262 of '$', which a user symbol cannot have, and check for the error token.
7263
7264 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7265
7266 Don't apply the default %destructor or %printer to the error token,
7267 $undefined, or $accept. This change fits the general rule that the
7268 default %destructor and %printer are only for user-declared symbols,
7269 and it solves several difficulties that are described in the new test
7270 cases listed below.
7271 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7272 * tests/actions.at (Default %printer and %destructor are not for error
7273 or $undefined, Default %printer and %destructor are not for $accept):
7274 New test cases.
7275
7276 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7277
7278 Allow %start after the first rule.
7279 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7280 when parsing the first rule.
7281 (check_and_convert_grammar): Search for it here after all grammar
7282 declarations have been parsed. Skip midrules, which have dummy LHS
7283 nonterminals.
7284 * src/symtab.c (symbol_is_dummy): New function.
7285 * src/symtab.h (symbol_is_dummy): Declare it.
7286 * tests/input.at (%start after first rule): New test.
7287
7288 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7289
7290 Redo some of the previous commit: add back the ability to use
7291 non-aliased/undeclared string literals since it might be useful to
7292 those declaring %token-table.
7293 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7294 commit: don't worry about complaints from symbols_pack.
7295 * src/symtab.c (symbol_new, symbol_class_set,
7296 symbol_check_alias_consistency): Undo changes in previous commit: count
7297 each string literal as a new symbol and token, assign it a symbol
7298 number, and don't complain about non-aliased string literals.
7299 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7300 and token counts but does still set aliased tokens to the same number,
7301 symbol_pack_processor now leaves empty slots in the symbols array.
7302 Remove those slots.
7303 * tests/regression.at (Undeclared string literal): Remove test case
7304 added in previous commit since non-aliased string literals are allowed
7305 again.
7306 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7307 remove unnecessary string literal declarations.
7308 * tests/sets.at (Firsts): Likewise.
7309
7310 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7311
7312 Don't allow an undeclared string literal, but allow a string literal to
7313 be used before its declaration.
7314 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7315 symbols_pack complained.
7316 * src/symtab.c (symbol_new): Don't count a string literal as a new
7317 symbol.
7318 (symbol_class_set): Don't count a string literal as a new token, and
7319 don't assign it a symbol number since symbol_make_alias does that.
7320 (symbol_make_alias): It's not necessary to decrement the symbol and
7321 token counts anymore. Don't assume that an alias declaration occurs
7322 before any uses of the identifier or string, and thus don't assert that
7323 one of them has the highest symbol number so far.
7324 (symbol_check_alias_consistency): Complain if there's a string literal
7325 that wasn't declared as an alias.
7326 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7327 symbol_pack asserts that every token has been assigned a symbol number
7328 although undeclared string literals have not.
7329 * tests/regression.at (String alias declared after use, Undeclared
7330 string literal): New test cases.
7331 (Characters Escapes, Web2c Actions): Declare string literals as
7332 aliases.
7333 * tests/sets.at (Firsts): Likewise.
7334
7335 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7336
7337 In the grammar scanner, STRING_FINISH unclosed constructs and return
7338 them to the parser in order to improve error messages.
7339 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7340 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7341 * tests/input.at (Unclosed constructs): New test case.
7342 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7343 seen.
7344
7345 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7346 unused global.
7347
7348 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7349
7350 Handle string aliases for character tokens correctly.
7351 * src/symtab.c (symbol_user_token_number_set): If the token has an
7352 alias, check and set its alias's user token number instead of its own,
7353 which is set to indicate the alias. Previously, every occurrence of
7354 the character token in the grammar overwrote that alias indicator with
7355 the character code.
7356 * tests/input.at (String aliases for character tokens): New test.
7357
7358 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7359
7360 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7361
7362 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7363
7364 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7365 to prevent failures when building on older platforms.
7366 Check for autopoint failure.
7367 Set XGETTEXT_OPTIONS to values that check for C format strings,
7368 so that translators are warned about them (this also helps
7369 prevent core dumps).
7370
7371 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7372 function, since it simplifies our code a bit.
7373
7374 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7375 rather than -W, so we don't get bogus warnings about sign comparisons.
7376 Add -Wpointer-arith, since that warning is useful (it reports code
7377 that does not conform to C89 and that some compilers reject).
7378 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7379 since it's no longer needed.
7380
7381 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7382
7383 Clean up scanners a bit.
7384 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7385 definitions so gcc won't warn when obstack_for_string is unused.
7386 * src/scan-code.l: config.h and system.h are already #include'd by
7387 scan-code-c.c, so get rid of them here.
7388 * src/scan-gram.l: Likewise.
7389 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7390 definitions rather than duplicating the rest of it.
7391 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7392
7393 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7394
7395 Suppress signed/unsigned comparison warnings for yycheck.
7396 * data/c.m4 (b4_safest_int_type): New macro.
7397 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7398 a signed int type, cast it to b4_safest_int_type first.
7399 * data/yacc.c: Likewise.
7400 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7401 also overwritten.
7402
7403 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7404
7405 * doc/bison.texinfo: Fix some typos.
7406
7407 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7408
7409 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7410 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7411
7412 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7413 the latest gnulib does this a different way.
7414 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7415 translation was patched, so stop omitting it.
7416
7417 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7418
7419 Enable declaration of default %printer/%destructor. Make the parser
7420 use these for all user-declared grammar symbols for which the user does
7421 not declare a specific %printer/%destructor. Thus, the parser uses it
7422 for token 0 if the user declares it but not if Bison generates it as
7423 $end. Discussed starting at
7424 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7425 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7426 and
7427 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7428 * NEWS (2.3+): Mention.
7429 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7430 declare a %destructor for a mid-rule's semantic value. It's just
7431 impossible to declare one specific to it.
7432 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7433 code. Describe default %destructor form.
7434 * src/parse-gram.y (grammar_declaration): Parse default
7435 %printer/%destructor declarations.
7436 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7437 and symbol_destructor_location_get rather than accessing the destructor
7438 and destructor_location members of struct symbol.
7439 (symbol_printers_output): Likewise but for %printer's.
7440 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7441 again.
7442 * src/symtab.c (default_destructor, default_destructor_location,
7443 default_printer, default_printer_location): New static global
7444 variables to record the default %destructor and %printer.
7445 (symbol_destructor_get, symbol_destructor_location_get,
7446 symbol_printer_get, symbol_printer_location_get): New functions to
7447 compute the appropriate %destructor and %printer for a symbol.
7448 (default_destructor_set, default_printer_set): New functions to set the
7449 default %destructor and %printer.
7450 * src/symtab.h: Prototype all those new functions.
7451 * tests/actions.at (Default %printer and %destructor): New test to
7452 check that the right %printer and %destructor are called, that they're
7453 not called for $end, and that $$ and @$ work correctly.
7454 (Default %printer and %destructor for user-declared end token): New
7455 test to check that the default %printer and %destructor are called for
7456 a user-declared end token.
7457 * tests/input.at (Default %printer and %destructor redeclared, Unused
7458 values with default %destructor): New tests to check related grammar
7459 warnings and errors.
7460
7461 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7462
7463 Clean up handling of %destructor for the end token (token 0).
7464 Discussed starting at
7465 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7466 and
7467 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7468
7469 Make the skeletons consistent in how they pop the end token and invoke
7470 its %destructor.
7471 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7472 state, which has token number 0, since this would invoke the
7473 %destructor for the end token.
7474 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7475 until after shifting the end token, or else it won't be popped.
7476 * data/yacc.c (yyparse): Likewise.
7477
7478 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7479 it's the end token. Upon termination, destroy an unshifted lookahead
7480 even when it's the end token.
7481 * data/lalr1.cc (yy::parser::parse): Likewise.
7482 * data/yacc.c (yyparse): Likewise.
7483
7484 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7485 value warnings for the end token when the user gives the end token a
7486 %destructor.
7487
7488 * tests/actions.at (Printers and Destructors): Test all the above.
7489
7490 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7491
7492 Update to latest gnulib and gettext versions.
7493 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7494 Add fopen-safer.
7495 (gnulib_files): Add m4/warning.m4. Don't worry about files
7496 overwritten by autopoint.
7497 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7498 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7499 rejects them.
7500 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7501 so that we can remove the intl files at a better time.
7502 (intl_files_to_remove): Remove aclocal.m4, since it gets
7503 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7504 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7505 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7506 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7507 Remove datarootdir hack; no longer needed.
7508 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7509 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7510 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7511 strdup.h.
7512 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7513 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7514
7515 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7516
7517 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7518 it with --assume-autoconf='latest-stable'.
7519
7520 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7521
7522 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7523 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7524 YYSTYPE' and `{'.
7525 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7526 those from muscle_tab.c since the old ones are misleading.
7527
7528 2006-07-13 Akim Demaille <akim@epita.fr>
7529
7530 Support %define "KEY" {VALUE}.
7531 * src/scan-code.h, src/scan-code.l (translate_action)
7532 (translate_rule_action, translate_symbol_action, translate_code):
7533 Return char *, not const char *.
7534 * src/parse-gram.y (declaration): Rename as...
7535 (prologue_declaration): this.
7536 (string_content): Remove this nonterminal, use STRING.
7537 (braceless, content, content.opt): New nonterminal.
7538 Use them.
7539 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7540 as value.
7541 * src/scan-gram.l (getargs.h): Don't include it.
7542
7543 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7544
7545 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7546 rather than a for-loop that declares a local bool variable. This
7547 should work around a compatibility problem with a Cray x1e C++
7548 compiler reported by Hung Nguyen in
7549 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7550 The for-loop was introduced in the 2004-11-17 change but I don't
7551 know why it was needed.
7552
7553 2006-07-12 Akim Demaille <akim@epita.fr>
7554
7555 * data/c.m4: Comment changes.
7556
7557 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7558
7559 * src/complain.c (error_message, ERROR_MESSAGE): New.
7560 To factor...
7561 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7562 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7563
7564 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7565
7566 * NEWS: Instead of %union, you can define and use your own union type
7567 YYSTYPE if your grammar contains at least one <type> tag.
7568 Your YYSTYPE need not be a macro; it can be a typedef.
7569 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7570 (Union Decl, Decl Summary): Document this.
7571 * data/glr.c (YYSTYPE): Implement this.
7572 * data/glr.cc (YYSTYPE): Likewise.
7573 * data/lalr1.cc (YYSTYPE): Likewise.
7574 * data/yacc.c (YYSTYPE): Likewise.
7575 * src/output.c (prepare): Output tag_seen_flag.
7576 * src/parse-gram.y (declaration, grammar_declaration):
7577 Use 'union_seen' rather than 'typed' to determine whether
7578 %union has been seen, since grammars can now be typed without
7579 %union.
7580 (symbol_declaration, type.opt, symbol_def):
7581 Keep track of whether a tag has been seen.
7582 * src/reader.c (union_seen, tag_seen): New vars.
7583 (typed): remove.
7584 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7585 * src/scan-code.l (untyped_var_seen): New variable.
7586 (handle_action_dollar): Adjust to above changes.
7587 (handle_action_dollar, handle_action_at):
7588 Improve overflow checking for outlandish numbers.
7589 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7590 avoid new diagnostics generated by above changes.
7591 * tests/regression.at (YYSTYPE typedef): Add test to check
7592 for type tags without %union.
7593
7594 * src/symlist.c (symbol_list_length): Return int, not unsigned
7595 int, since callers expect int. This may need to get revisited
7596 once we have proper integer overflow checking.
7597
7598 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7599 object is now static.
7600
7601 * src/getargs.c (flags_argmatch): Return void, not int,
7602 to pacify ./configure --enable-gcc-warnings.
7603
7604 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7605 since last_string is already defined to FLEX_PREFIX (last_string).
7606
7607 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7608
7609 Implement --warnings/-W.
7610 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7611 replaced by...
7612 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7613 Adjust callers.
7614 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7615 (warnings_args, warnings_types): New.
7616 (getargs, short_options, long_options): Accept -W/--warnings.
7617 Sort the options by alphabetical order, upper case letter right
7618 before its lower case.
7619
7620 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7621
7622 Change %merge result type clash warnings to errors. Discussed at
7623 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7624 * src/reader.c (record_merge_function_type): Use complain_at.
7625 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7626 declared later): Update test case results.
7627
7628 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7629
7630 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7631 to be in alphabetical order.
7632 (trace_args): Spelling fixes.
7633
7634 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7635
7636 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7637 so they don't collide with user-defined macros.
7638 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7639 this was never guaranteed, and now that we're using gnulib stdint,
7640 which defines int_fast16_t to long int, the problem is exposed.
7641
7642 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7643
7644 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7645 need the full POSIX semantics (and weren't implementing them
7646 anyway).
7647
7648 Adjust to Autoconf 2.60 and today's gnulib.
7649 * bootstrap (gnulib_modules): Add stdint.
7650 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7651 no longer copies it.
7652 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7653 since stdint needs the former and wcwidth (which is now required
7654 by mbswidth) needs the latter.
7655 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7656 work around a compatibility glitch between gettext 0.14.6 and
7657 Autoconf 2.60.
7658 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7659 Do not check for uintptr_t, since new stdint module does the right
7660 thing.
7661 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7662 Add stdint.h, stdint_.h, wcwidth.h.
7663 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7664 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7665 stdint.m4, wchar_t.m4, wcwidth.m4.
7666 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7667 usual order for ../lib/*.h files.
7668 (file_name_split): Use last_component, not base_name, to adjust
7669 to gnulib changes.
7670 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7671 for ../lib/*.h files.
7672 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7673 Define unconditionally, since we now assume the stdint module.
7674 * src/scan-skel.l: Include <dirname.h>.
7675 (BASE_QPUTS): Use last_component, not base_name.
7676 * src/system.h: Include <unlocked-io.h> in the usual order
7677 for ../lib/*.h files. Include <stdint.h> unconditionally,
7678 since we now use the stdint module.
7679 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7680 HAVE_UINTPTR_T, since we now use the stdint module.
7681 (base_name): Remove decl, since files now include <dirname.h>
7682 to get the decl.
7683
7684 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7685
7686 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7687 New, default to 1.
7688 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7689 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7690 default.
7691 * tests/calc.at: Adjust.
7692
7693 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7694
7695 * data/c.m4 (b4_basename): New.
7696 (b4_syncline): Also output the location of its invocation (from
7697 the skeleton).
7698 (b4_user_action, b4_define_user_action, b4_user_actions)
7699 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7700 (b4_user_stype): New.
7701 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7702
7703 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7704
7705 In the grammar file, the first column is 1 not 0 on the first line as
7706 on every other line.
7707 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7708 * tests/input.at (Torturing the Scanner): Update output.
7709
7710 * src/scan-gram.l (scanner_cursor): Declare it static.
7711
7712 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7713
7714 In warnings, say "previous declaration" rather than "first
7715 declaration".
7716 * src/symtab.c (redeclaration): Do that here.
7717 * src/reader.c (record_merge_function_type): In the case of a result
7718 type clash, report the previous declaration rather than the very first
7719 one in the grammar file.
7720 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7721 declared later): Add a third declaration to check this behavior.
7722 * tests/input.at (Incompatible Aliases): Update output.
7723
7724 2006-06-27 Akim Demaille <akim@epita.fr>
7725
7726 * doc/Doxyfile.in: New.
7727 * doc/Makefile.am: Use it.
7728 * src/lalr.h, src/symtab.h: Initial doxygenation.
7729
7730 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7731
7732 Don't miss %merge result type warnings just because the LHS types are
7733 declared after the %merge. This continues the effort of the previous
7734 patch.
7735 * src/reader.c (get_merge_function): Don't set the merger type yet.
7736 (record_merge_function_type): New function for setting the merger type
7737 and checking for clashes.
7738 (grammar_current_rule_merge_set): Set the location of the %merge for
7739 the current rule.
7740 (packgram): Invoke record_merge_function_type for each rule now that
7741 all symbol type declarations have been parsed.
7742 * src/reader.h (merger_list.type_declaration_location): New member
7743 storing the location of the first %merge from which the type for this
7744 merging function was derived.
7745 * src/symlist.h (symbol_list.merger_declaration_location): New member
7746 storing the location of a rule's %merge, if any.
7747 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7748 declared later): New test to catch the error fixed by the above patch.
7749
7750 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7751
7752 Get action warnings (grammar_rule_check) right even when symbol
7753 declarations appear after the rules. Discussed at
7754 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7755 and
7756 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7757 Don't mistake the type of $$ in a midrule to be that of its parent
7758 rule's $$.
7759 * src/reader.c (grammar_current_rule_end): Don't invoke
7760 grammar_rule_check yet since not all symbol declarations may have been
7761 parsed yet.
7762 (grammar_midrule_action): Likewise.
7763 Don't record whether the midrule's $$ has been used yet since actions
7764 haven't been translated yet.
7765 Record the midrule's parent rule and its RHS index within the parent
7766 rule.
7767 (grammar_current_rule_action_append): Don't translate the action yet
7768 since not all symbol declarations may have been parsed yet and, thus,
7769 warnings about types for $$, $n, @$, and @n can't be reported yet.
7770 (packgram): Translate the action and invoke grammar_rule_check now that
7771 all symbol declarations have been parsed.
7772 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7773 after parsing the entire grammar file, the symbol list here in the case
7774 of a midrule is actually the midrule's empty RHS, so reference its
7775 parent rule's RHS where necessary.
7776 On the other hand, now that you can already know it's a midrule, you
7777 aren't forced to think $$ has the same type as its parent rule's $$.
7778 (handle_action_at): In the case of a midrule, reference the parent rule
7779 where necessary.
7780 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7781 members.
7782 (symbol_list_length): Now that this is invoked after all rules have
7783 been parsed, a NULL symbol (rather than a NULL symbol list node)
7784 terminates a rule. symbol_list_print already does this correctly.
7785 * src/symlist.h (symbol_list.midrule_parent_rule,
7786 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7787 remember their relationships with their parents.
7788 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7789 fixed by the above patch.
7790 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7791 implementing...
7792 (Unused values): ... this old test case and...
7793 (Unused values before symbol declarations): ... this new test case.
7794 This one is the same as `Unused values' except that all symbol
7795 declarations appear after the rules in order to catch the rest of the
7796 errors fixed by the above patch.
7797
7798 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7799
7800 More cleanup.
7801 * src/reader.c (current_rule): Declare it static since it's no longer
7802 used outside this file.
7803 (grammar_current_rule_action_append): Remove redundant arguments from
7804 translate_rule_action invocation.
7805 * src/reader.h (current_rule): Remove this unused extern.
7806 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7807 * src/scan-code.l (translate_rule_action): Likewise.
7808
7809 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7810
7811 Clean up yesterday's patch.
7812 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7813 to...
7814 * src/reader.c (grammar_current_rule_action_append): ... here for
7815 consistency with grammar_current_rule_symbol_append.
7816 * tests/regression.at (Braced code in declaration in rules section):
7817 Make yyerror and yylex static as usual.
7818
7819 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7820
7821 Fix bug that mistakes braced code in a declaration in the rules section
7822 to be a rule action. Mentioned at
7823 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7824 * src/scan-gram.l: Move midrule action detection from the start of the
7825 scanning of any braced code to...
7826 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7827 action. For readability, use $2 and @2 rather than the equivalent
7828 global variables.
7829 * tests/regression.at (Braced code in declaration in rules section):
7830 New test to catch the error fixed by the above patch.
7831
7832 Work on code readability some.
7833 * src/scan-code.l (current_rule): Get rid of this misleading and
7834 redundant declaration: it's actually extern'ed in reader.h.
7835 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7836 translate_action): Add a rule argument and use it instead of the global
7837 current_rule.
7838 (translate_rule_action): This already receives current_rule through an
7839 argument, so pass it on to translate_action instead of assigning
7840 current_rule to current_rule.
7841 (translate_symbol_action, translate_code): Pass rule = NULL to
7842 translate_action.
7843
7844 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7845
7846 Rename %before-definitions to %start-header and %after-definitions to
7847 %end-header. Don't use these declarations to separate pre-prologue
7848 blocks from post-prologue blocks. Add new order-independent
7849 declarations %before-header and %after-header as alternatives to the
7850 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7851 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7852 * NEWS (2.3+): Update for these changes.
7853 * data/glr.c (b4_before_definitions): Update to...
7854 (b4_start_header): ... this.
7855 (b4_after_definitions): Update to...
7856 (b4_end_header): ... this.
7857 * data/glr.cc: Likewise.
7858 * data/lalr1.cc: Likewise.
7859 * data/yacc.c: Likewise.
7860 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7861 prologue blocks with %*-header declarations.
7862 (Calc++ Parser): Likewise.
7863 (Decl Summary): Update names.
7864 (Table of Symbols): Update description.
7865 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7866 (PERCENT_END_HEADER): ... this.
7867 (PERCENT_BEFORE_DEFINITIONS): Update to...
7868 (PERCENT_START_HEADER): ... this.
7869 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7870 (declaration): Update token names and m4 macro names.
7871 When parsing %end-header and %start-header, invoke translate_code
7872 before muscle_code_grow, and no longer set global booleans to remember
7873 whether these declarations have been seen.
7874 Parse new %after-header and %before-header.
7875 * src/reader.c (before_definitions, after_definitions): Remove.
7876 (prologue_augment): Accept a new bool argument to specify whether to
7877 augment the pre-prologue or post-prologue.
7878 * src/reader.h (before_definitions, after_definitions): Remove these
7879 extern's.
7880 (prologue_augment): Add new bool argument.
7881 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7882 (PERCENT_END_HEADER): ... this.
7883 (PERCENT_BEFORE_DEFINITIONS): Update to...
7884 (PERCENT_START_HEADER): ... this.
7885 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7886 * tests/actions.at (Printers and Destructors): Update names.
7887
7888 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7889
7890 Add comparison operators for C++ location classes. Discussed at
7891 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7892 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7893 declaration indicating whether filename_type has an operator==. If
7894 filename_type is `std::string', it defaults to `1', `0' otherwise.
7895 * data/location.cc: Iff b4_define_location_comparison is `1', add
7896 operator== and operator!= for class position and for class location.
7897
7898 Some minor fixes.
7899 * src/scan-action.l: Remove unused file.
7900 * src/symtab.c (symbol_printer_set): Use printer_location not
7901 destructor_location.
7902 * src/symtab.h (struct symbol): Replace incorrect source comment for
7903 printer members.
7904 * tests/input.at (Incompatible Aliases): Update output with correct
7905 printer location.
7906
7907 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7908
7909 Don't put the pre-prologue in the header file. For the yacc.c code
7910 file and the glr.c header and code files, move the pre-prologue before
7911 the token definitions. Add new %before-definitions and
7912 %after-definitions to declare code that will go in both the header file
7913 and code file. Discussed at
7914 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7915 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7916 and
7917 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7918 * NEWS (2.3+): Describe these changes.
7919 * data/glr.c (b4_pre_prologue): Move from within to before...
7920 (b4_shared_declarations): ... this.
7921 Add new b4_before_definitions before b4_token_enums.
7922 Add new b4_after_definitions at the end.
7923 * data/glr.cc (b4_pre_prologue): Replace with...
7924 (b4_before_definitions): ... this in the header file.
7925 (b4_after_definitions): New near the end of the header file.
7926 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7927 code file right before including the header file.
7928 (b4_before_definitions): New in the previous position of
7929 b4_pre_prologue in the header file.
7930 (b4_after_definitions): New near the end of the header file.
7931 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7932 (b4_token_enums_defines): In the code file, move to right before
7933 YYSTYPE for consistency with the header file.
7934 (b4_before_definitions): New right before b4_token_enums_defines in
7935 both the header and code file.
7936 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7937 header and code file.
7938 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7939 of prologues for %union dependencies.
7940 (Decl Summary): In %defines description, mention the effect of
7941 %before-definitions and %after-definitions on the header file.
7942 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7943 than in the pre-prologue so that make check succeeds.
7944 (Table of Symbols): Add entries for %before-definitions and
7945 %after-definitions.
7946 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7947 %before-definitions.
7948 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7949 (declaration): Parse those declarations and append to
7950 b4_before_definitions and b4_after_definitions, respectively.
7951 * src/reader.c (before_definitions, after_definitions): New bools to
7952 track whether those declarations have been seen.
7953 (prologue_augment): Add to the post-prologue if %union,
7954 %before-definitions, or %after-definitions has been seen.
7955 * src/reader.h (before_definitions, after_definitions): New extern's.
7956 * src/scan-gram.l: Scan the new declarations.
7957 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7958 prologue block in a %before-definitions or a %after-definitions based
7959 on whether the %union is declared.
7960 * tests/regression.at (Early token definitions with --yacc, Early token
7961 definitions without --yacc): Move tests for token definitions into the
7962 post-prologue since token names are no longer defined in the
7963 pre-prologue.
7964
7965 2006-06-20 Akim Demaille <akim@epita.fr>
7966
7967 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7968 (symbol_get): Use it.
7969 * src/parse-gram.y: Use it.
7970
7971 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7972
7973 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7974 build succeeds when configured with --enable-gcc-warnings.
7975
7976 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7977
7978 * src/parse-gram.y (char_name): New function.
7979 (CHAR, STRING, string_content): For %printer, properly escape.
7980 (ID): Prefer fputs to fprintf.
7981 (id): Reindent to be consistent with other rules.
7982 Properly quote char.
7983
7984 The Translation Project changed its way of publishing translations
7985 to maintainers. I haven't received any responses to my request
7986 for supporting the old way, or for documenting the new way. I
7987 have modified 'bootstrap' to use screen scraping
7988 (in this case, HTML scraping). This is unreliable and inelegant,
7989 but I don't see any better way. Yuck.
7990 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7991 (get_translations): New function, which uses HTML scraping to
7992 deduce locations of latest translations.
7993 Use this function to grab both bison and bison-runtime .po files.
7994 Don't bother priming the pump for the runtime-po domain any more,
7995 as it's now translated better than bison is.
7996
7997 2006-06-19 Akim Demaille <akim@epita.fr>
7998
7999 * src/scan-gram.l: No longer "parse" things after `%union' until
8000 `{'. Rather, return a single "%union" token.
8001 No longer make symbols: return strings, and leave the conversion
8002 to symbols to the parser.
8003 (SC_PRE_CODE, token_type): Remove.
8004 * src/parse-gram.y (%union): New field `character'.
8005 Sort tokens.
8006 (CHAR): New token.
8007 (ID, ID_COLON): Now that the scanner no longer makes them
8008 identifiers, adjust all uses to invoke symbol_get.
8009 (id_colon): New, wraps the conversion from string to symbol.
8010 (%union): Accept a possible union_name.
8011 (symbol): Now can be a char.
8012 * data/c.m4 (b4_union_name): Leave a default value.
8013 * data/glr.c, data/yacc.c: Use it.
8014
8015 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8016
8017 For associating token numbers with token names for "yacc.c", don't use
8018 #define statements unless `--yacc' is specified; always use enum
8019 yytokentype. Most important discussions start at:
8020 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8021 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8022 and
8023 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8024 * NEWS (2.3+): Mention.
8025 * data/c.m4 (b4_yacc_if): New.
8026 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8027 token #define's.
8028 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8029 on token name definitions.
8030 * src/getargs.c (usage): Capitalize `Yacc' in English.
8031 * src/output.c (prepare): Define b4_yacc_flag.
8032 * tests/regression.at (Early token definitions): Test that tokens names
8033 are defined before the pre-prologue not just before the post-prologue.
8034 Remove this test case and copy to...
8035 (Early token definitions with --yacc): ... this to test #define's.
8036 (Early token definitions without --yacc): ... and this to test enums.
8037
8038 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8039
8040 * NEWS: Reword the post-2.3 change to not be so optimistic about
8041 removing the old "look-ahead" spelling.
8042 Update previous look-ahead/lookahead change reports.
8043 * REFERENCES: look-ahead -> lookahead (since that's
8044 what he actually wrote).
8045 * doc/refcard.tex: look ahead -> lookahead,
8046 look-ahead -> lookahead
8047
8048 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8049
8050 For consistency, use `lookahead' instead of `look-ahead' or
8051 `look_ahead'. Discussed starting at
8052 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8053 and then at
8054 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8055 * NEWS: For the next release, note the change to `--report'.
8056 * TODO, doc/bison.1: Update English.
8057 * doc/bison.texinfo: Update English.
8058 (Understanding Your Parser, Bison Options): Document as
8059 `--report=lookahead' rather than `--report=look-ahead'.
8060 * src/conflicts.c: Update English in comments.
8061 (lookahead_set): Rename from look_ahead_set.
8062 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8063 (resolve_sr_conflict): Rename local look_ahead_tokens to
8064 lookahead_tokens, and update other uses.
8065 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8066 count_rr_conflicts, conflicts_free): Update uses.
8067 * src/getargs.c (report_args): Move "lookahead" before alternate
8068 spellings.
8069 (report_types): Update uses.
8070 (usage): For `--report' usage description, state `lookahead' spelling
8071 rather than `look-ahead'.
8072 * src/getargs.h (report.report_lookahead_tokens): Rename from
8073 report_look_ahead_tokens.
8074 * src/lalr.c: Update English in comments.
8075 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8076 (state_lookahead_tokens_count): Rename from
8077 state_look_ahead_tokens_count.
8078 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8079 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8080 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8081 Update other uses.
8082 Update English in output.
8083 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8084 * src/print.c: Update English in comments.
8085 (lookahead_set): Rename from look_ahead_set.
8086 (print_reduction): Rename argument lookahead_token from
8087 look_ahead_token.
8088 (print_core, state_default_rule, print_reductions, print_results):
8089 Update uses.
8090 * src/print_graph.c: Update English in comments.
8091 (print_core): Update uses.
8092 * src/state.c: Update English in comments.
8093 (reductions_new): Update uses.
8094 (state_rule_lookahead_tokens_print): Rename from
8095 state_rule_look_ahead_tokens_print, and update other uses.
8096 * src/state.h: Update English in comments.
8097 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8098 (state_rule_lookahead_tokens_print): Rename from
8099 state_rule_look_ahead_tokens_print.
8100 * src/tables.c: Update English in comments.
8101 (conflict_row, action_row): Update uses.
8102 * tests/glr-regression.at
8103 (Incorrect lookahead during deterministic GLR,
8104 Incorrect lookahead during nondeterministic GLR): Rename
8105 print_look_ahead to print_lookahead.
8106 * tests/torture.at: Update English in comments.
8107 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8108 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8109 (Many lookahead tokens): Update uses.
8110 * data/glr.c: Update English in comments.
8111 * lalr1.cc: Likewise.
8112 * yacc.c: Likewise.
8113 * src/conflicts.h: Likewise.
8114 * src/lalr.h: Likewise.
8115 * src/main.c: Likewise.
8116 * src/output.c: Likewise.
8117 * src/parse-gram.c: Likewise.
8118 * src/tables.h: Likewise.
8119 * tests/calc.at: Likewise.
8120
8121 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8122
8123 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8124
8125 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8126
8127 * TODO: Add request from Nelson H. F. Beebe to be able to install
8128 Bison without installing the yacc script.
8129
8130 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8131
8132 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8133 and yytext if they're already #define'd.
8134 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8135 * src/scan-code-c.c: ... here.
8136 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8137 <config.h>.
8138
8139 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8140
8141 Get Bison to build again when configured with --enable-gcc-warnings.
8142 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8143 missing #include's.
8144 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8145 loc argument as it shadows a global.
8146 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8147 invocation.
8148
8149 * src/.cvsignore: Add scan-code.c.
8150
8151 2006-06-07 Akim Demaille <akim@epita.fr>
8152
8153 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8154 to...
8155 * src/scan-code.l: here.
8156 * tests/input.at (Torturing the Scanner): Fix another location
8157 error.
8158
8159 2006-06-07 Akim Demaille <akim@epita.fr>
8160
8161 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8162
8163 2006-06-06 Akim Demaille <akim@epita.fr>
8164
8165 Extract the parsing of user actions from the grammar scanner.
8166 As a consequence, the relation between the grammar scanner and
8167 parser is much simpler. We can also split "composite tokens" back
8168 into simple tokens.
8169 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8170 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8171 rename as...
8172 * src/location.h, src/location.c (add_column_width)
8173 (location_compute): these.
8174 Fix the column count: the initial column is 0.
8175 (location_print): Be robust to ending column being 0.
8176 * src/location.h (boundary_set): New.
8177 * src/main.c: Adjust to scanner_free being renamed as
8178 gram_scanner_free.
8179 * src/output.c: Include scan-code.h.
8180 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8181 Use boundary_set.
8182 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8183 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8184 which is now, again, a separate token.
8185 Adjust all dependencies.
8186 Whereever actions with $ and @ are used, use translate_code.
8187 (action): Remove this nonterminal which is now useless.
8188 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8189 (grammar_current_rule_action_append): Use translate_code.
8190 (packgram): Bound check ruleno, itemno, and rule_length.
8191 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8192 (last_string, last_braced_code_loc, max_left_semantic_context)
8193 (scanner_initialize, scanner_free, scanner_last_string_free)
8194 (gram_out, gram_lineno, YY_DECL_): Move to...
8195 * src/scan-gram.h: this new file.
8196 (YY_DECL): Rename as...
8197 (GRAM_DECL): this.
8198 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8199 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8200 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8201 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8202 Move these declarations, and...
8203 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8204 these to...
8205 * src/flex-scanner.h: this new file.
8206 * src/scan-gram.l (rule_length, rule_length_overflow)
8207 (increment_rule_length): Remove.
8208 (last_braced_code_loc): Rename as...
8209 (gram_last_braced_code_loc): this.
8210 Adjust to the changes of the parser.
8211 Move all the handling of $ and @ into...
8212 * src/scan-code.l: here.
8213 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8214 (handle_action_dollar, handle_action_at): Move to...
8215 * src/scan-code.l: here.
8216 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8217 scan-code.h, scan-code-c.c, scan-gram.h.
8218 (EXTRA_bison_SOURCES): Add scan-code.l.
8219 (BUILT_SOURCES): Add scan-code.c.
8220 (yacc): Be robust to white spaces.
8221
8222 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8223 * tests/regression.at: Adjust the column numbers.
8224 * tests/regression.at: Adjust the error message.
8225
8226 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8227
8228 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8229 Use Akim's wording from
8230 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8231
8232 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8233
8234 Between Bison releases, manually append `+' to the previous Bison
8235 release number, and use that as a signal to automatically print the
8236 ChangeLog's CVS Id keyword from --version. Discussed starting at
8237 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8238 * ChangeLog: Add Id header.
8239 * configure.ac (AC_INIT): Append `+' to `2.3'.
8240 * src/.cvsignore: Add revision.c.
8241 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8242 (BUILT_SOURCES): Add revision.c.
8243 (revision.c): New target rule. This file defines a new global variable
8244 named revision. It initializes it with either the Id from ChangeLog
8245 or, if VERSION doesn't contain `+', with the empty string.
8246 * src/getargs.c (version): Print the value of revision.
8247 * src/revision.h: Extern revision.
8248
8249 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8250
8251 * NEWS: Version 2.3.
8252 * configure.ac (AC_INIT): Likewise.
8253
8254 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8255
8256 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8257 with no arguments, not as an object-like macro. This is for
8258 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8259 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8260 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8261 Document this.
8262
8263 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8264
8265 * src/getargs.c (usage): Back out yesterday's modification of the
8266 --help output so that we don't have to wait for translation before
8267 releasing 2.3.
8268
8269 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8270
8271 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8272 Problem reported by Akim Demaille.
8273
8274 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8275
8276 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8277
8278 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8279
8280 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8281 generated source code. Problem reported by Frans Englich in
8282 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8283
8284 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8285
8286 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8287 shell, not within 'make', so that 'make' by an ordinary builder
8288 (using GNU make) does not worry about configuring gzip. This also
8289 works around a bug reported independently by Keith Thompson and by
8290 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8291 stderr rather than stdout, messing up the build logs.
8292
8293 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8294
8295 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8296 to make sure that YYID will never be unused. This fixes a 'make
8297 maintainer-check' failure caused by the recent changes to the 'Trivial
8298 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8299 not used.
8300 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8301
8302 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8303
8304 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8305 state before an empty RHS is always resolved here. Only the location
8306 of that state is guaranteed to be resolved, and that's enough. This
8307 fixes the remaining bug reported by Derek M. Jones in
8308 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8309 * tests/glr-regression.at (Uninitialized location when reporting
8310 ambiguity): Test the above case.
8311 Also, the embedded comments in this test case claim it checks the case
8312 of an empty RHS that has inherited the initial location. However, the
8313 corresponding LHS was already resolved, so yyresolveLocations didn't
8314 actually have reason to modify it. Fix this by forcing
8315 nondeterministic operation at the beginning of the parse.
8316
8317 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8318
8319 * data/c.m4 (b4_yy_symbol_print_generate):
8320 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8321 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8322 of the bugs reported today by Derek M Jones in
8323 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8324 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8325 defined to be a type name without parens or brackets.
8326 (Location Type): Similarly for YYLTYPE.
8327 * tests/regression.at (Trivial grammars): Put in a test for this
8328 bug that will be caught by 'make maintainer-check' (though not,
8329 alas, by 'make check' unless your compiler is picky).
8330
8331 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8332
8333 * NEWS: Version 2.2.
8334 * configure.ac (AC_INIT): Likewise.
8335
8336 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8337
8338 * data/glr.c (yyreportTree): Make room in yystates for the state
8339 preceding the RHS. This fixes the segmentation fault reported by Derek
8340 M. Jones in
8341 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8342 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8343 to the user. Reported for yyreportTree by Derek M. Jones later in the
8344 same thread.
8345 * THANKS: Add Derek M. Jones.
8346 Update my email address.
8347 Fix typo in Steve Murphy's name.
8348
8349 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8350
8351 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8352 checking against YYLAST that caused the parser to miss a potential
8353 alternative in its diagnostic.
8354 Problem reported by Maria Jose Moron Fernandez in
8355 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8356 * data/lalr1.cc (yysyntax_error_): Likewise.
8357 * data/yacc.c (yysyntax_error): Likewise.
8358 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8359 tokens, in case we run into an older C compiler.
8360 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8361 Use them to check for the off-by-one error fixed above.
8362
8363 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8364 YYSIZE_T, not size_t.
8365 * tests/regression.at (Trivial grammars): New test, to catch
8366 the error fixed by the above patch.
8367
8368 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8369
8370 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8371 scheme.
8372 Reported by Steve Murphy.
8373
8374 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8375
8376 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8377 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8378
8379 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8380
8381 Implement --trace=m4.
8382 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8383 * src/output.c (output_skeleton): When set, pass -dV to m4.
8384
8385 Factor the handling of flags in m4.
8386 * src/output.c (prepare): Rename the muscle names debug, defines,
8387 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8388 * data/c.m4: Adjust.
8389 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8390 Use b4_define_flag_if to define other b4_FLAG_if macros.
8391 (b4_location_if): As a consequence, rename as...
8392 (b4_locations_if): this, for consistency.
8393 Adjust all the skeletons.
8394
8395 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8396
8397 * etc/bench.pm: Shorten bench names.
8398
8399 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
8400
8401 * src/output.h, src/output.c (error_verbose): Move to...
8402 * src/getargs.h, src/getargs.c: here.
8403 Sort the flags.
8404 Adjust dependencies.
8405
8406 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8407
8408 * data/c.m4 (b4_copyright): Put the special exception for Bison
8409 skeletons here, so we don't have to put it in each skeleton. All
8410 uses changed. Suggested by Akim Demaille. Also, wrap the
8411 copyright notice, in case it is longer than 80 columns. Replace
8412 comma by newline after title.
8413
8414 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8415
8416 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8417 incompatibility, not a bug. Mention that it wasn't fixed as of
8418 flex 2.5.33.
8419
8420 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8421
8422 * examples/extexi: Enforce the precedence of concatenation over
8423 >>.
8424 Reported by Tommy Nordgren.
8425
8426 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
8427
8428 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8429 with the member "token".
8430 Reported by Martin Nylin.
8431
8432 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8433
8434 * data/glr.c: Switch to Bison 2.2 special-exception language in
8435 the copyright notice. Use more-regular format for titles and
8436 copyright notices.
8437 * data/glr.cc: Likewise.
8438 * data/location.cc: Likewise.
8439 * data/yacc.cc: Likewise.
8440 * doc/bison.texinfo (Conditions): Document this.
8441 * NEWS: likewise. Upgrade version to 2.2.
8442
8443 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
8444
8445 * data/glr.cc: Remove dead code.
8446
8447 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8448
8449 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8450 that variable and the line breaks the bootstrap. Problem reported
8451 by Juan M. Guerrero.
8452
8453 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8454
8455 * doc/bison.texinfo (Multiple start-symbols): New.
8456
8457 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
8458
8459 * etc/README, etc/bench.pl: New.
8460
8461 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
8462
8463 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8464 rule.
8465 Reported by Mickael Labau.
8466 * tests/input.at (Torturing the Scanner): Test it.
8467
8468 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8469
8470 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8471 Problem reported by Bob Rossi.
8472
8473 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8474
8475 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8476 and didn't really work.
8477 For the index, use @ifnotinfo, not @iftex.
8478 Minor cleanups of spacing and terminology.
8479
8480 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8481
8482 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8483 of AT_NAME_PREFIX when %name-prefix is not used.
8484
8485 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
8486
8487 Apply --prefix to C++ skeletons too: they change the namespace.
8488 The test suite already exercize these cases.
8489 * data/c++.m4 (b4_namespace): New.
8490 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8491 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8492 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8493 * doc/bison.texinfo: Document it.
8494 (Option Cross Key): Use @multitable in all formats. It looks
8495 nicer, even in TeX outputs.
8496 (Rules): Use the same code whatever the output type is.
8497 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8498 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8499 * tests/calc.at: Use it, instead of hard coding `yy'.
8500
8501 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8502
8503 * TODO: Remove dead items.
8504
8505 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8506
8507 * doc/FAQ: Remove, merged into...
8508 * doc/bison.texinfo (FAQ): this.
8509 * doc/Makefile.am (EXTRA_DIST): Adjust.
8510
8511 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8512
8513 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8514 even if empty.
8515 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8516 * doc/bison.texinfo (Calc++ Scanner): Use it.
8517
8518 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8519
8520 Fix two nits reported by twlevo, plus one more that I discovered.
8521
8522 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8523 this is the usual Bison style.
8524 * src/location.h (location_print): Likewise.
8525
8526 * src/reader.h (token_name): Likewise.
8527
8528 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8529
8530 Fix some nits reported by twlevo.
8531 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8532 and "POSIX". Use more-modern syntax for URLs. Mention C++
8533 and ask for Java. Don't hardwire OS version numbers. Add
8534 copyright notice.
8535 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8536 * src/conflicts.c (solved_conflicts_obstack): Now static.
8537
8538 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8539
8540 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8541 page. Say "you can use it" not "you may use it" as on the web page;
8542 we're describing capabilities not granting permission.
8543
8544 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8545
8546 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8547 shadowing warnings. Use usual patter for iterating through RHS.
8548 * tests/glr-regression.at
8549 (Uninitialized location when reporting ambiguity):
8550 Modify yylex so that it uses its argument, rather than trying
8551 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8552 const char -> char const.
8553
8554 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8555 Don't use tabs inside commands; it messes up 'ps'.
8556 Problem reported by twlevo.
8557
8558 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8559
8560 * tests/glr-regression.at (Uninitialized location when reporting
8561 ambiguity): New test case.
8562 * data/glr.c (yyresolveLocations): New function, which uses
8563 YYLLOC_DEFAULT.
8564 (yyresolveValue): Invoke yyresolveLocations before reporting an
8565 ambiguity.
8566 * doc/bison.texinfo (Default Action for Locations): Note
8567 YYLLOC_DEFAULT's usage for ambiguity locations.
8568 (GLR Semantic Actions): Cross-reference those notes.
8569
8570 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8571
8572 * tests/glr-regression.at (Leaked semantic values when reporting
8573 ambiguity): Remove unnecessary union and type declarations.
8574 (Leaked lookahead after nondeterministic parse syntax error): New test
8575 case.
8576 * data/glr.c (yyparse): Check for zero stacks remaining before
8577 attempting to shift the lookahead so that you don't lose it.
8578
8579 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8580
8581 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8582 * tests/glr-regression.at (Leaked semantic values when reporting
8583 ambiguity): New test case.
8584 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8585 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8586 now unnecessary yystackp parameter.
8587 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8588 destructors can be called.
8589
8590 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8591 in existing testcases.
8592
8593 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8594
8595 Don't leak semantic values for parent RHS when a user action cuts the
8596 parser, and clean up related code a bit.
8597 * tests/glr-regression.at (Leaked merged semantic value if user action
8598 cuts parse): Rename to...
8599 (Leaked semantic values if user action cuts parse): ... this. Add check
8600 for leaked parent RHS values.
8601 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8602 between an unresolved state (non-empty chain of semantic options) and
8603 an incomplete one (signaled by an empty chain).
8604 (yyresolveStates): Document the interface. Move all manipulation of a
8605 successfully or unsuccessfully resolved yyGLRState to...
8606 (yyresolveValue): ... here so that yyresolveValue always leaves a
8607 yyGLRState with consistent data and thus is easier to understand.
8608 Remove the yyvalp and yylocp parameters since they are always just
8609 taken from the yys parameter. When reporting a discarded merged value
8610 in debugging output, note that it is incompletely merged. Document the
8611 interface.
8612 (yyresolveAction): If resolving any of the RHS states fails, destroy
8613 them all rather than leaking them. Thus, as long as user actions are
8614 written to clean up the RHS correctly, yyresolveAction always cleans up
8615 the RHS of a semantic option. Document the interface.
8616
8617 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8618
8619 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8620 led to a segmentation fault in GNU Pascal. Problem reported
8621 by Waldek Hebisch.
8622
8623 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8624
8625 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8626 mid-rule action inside a nonterminal symbol in order to declare a
8627 destructor for its semantic value.
8628
8629 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8630
8631 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8632 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8633 __cplusplus && ! defined _STDLIB_H && !
8634 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8635 defined free))]: Include <stdlib.h> rather than rolling our own
8636 declarations of malloc and free, to avoid problems with
8637 incompatible declarations (using 'throw') C++'s stdlib.h. This
8638 should fix Debian bug 340012
8639 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8640 reported by Guillaume Melquiond.
8641
8642 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8643
8644 * NEWS: Clarify symbols versus types in unused-value warnings.
8645
8646 * configure.ac (AC_INIT): Bump version number.
8647
8648 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8649
8650 * NEWS: Version 2.1a.
8651 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8652 since C99 requires this.
8653
8654 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8655
8656 * m4/c-working.m4: New file.
8657 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8658
8659 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8660
8661 * Makefile.maint: Merge from coreutils.
8662
8663 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8664
8665 More portability fixes for problems summarized by Nelson H. F. Beebe.
8666
8667 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8668 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8669 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8670 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8671 messes up because C++ code is compiled in 32-bit mode but linked
8672 in 64-bit mode.
8673
8674 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8675
8676 More portability fixes for problems summarized by Nelson H. F. Beebe.
8677
8678 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8679 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8680
8681 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8682 nodist_PROGRAMS, since we don't need to actually compile the
8683 example if we're just doing a plain 'make'. This avoids bothering
8684 the installer unnecessarily about problems due to weird C++
8685 compilers.
8686
8687 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8688
8689 More portability fixes for problems summarized by Nelson H. F. Beebe.
8690
8691 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8692 than #include "...", and compile with -I'.'. The old method was
8693 not portable, according to Posix and the C standard, and it does
8694 not work with Sun C 5.7, where previous #line directives affect
8695 the working directory used in later #include "..." directives.
8696
8697 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8698
8699 Various DJGGP specific issues in /djgpp
8700
8701 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8702
8703 More portability fixes for problems summarized by Nelson H. F. Beebe.
8704
8705 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8706 '#include <map>' works and that you can apply ++ to iterators.
8707
8708 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8709
8710 Work around portability problems summarized by Nelson H. F. Beebe in
8711 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8712
8713 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8714 that '#include <string>' works.
8715
8716 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8717 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8718 "warning: sorry: semantics of inline function static data `const
8719 unsigned char translate_table[262]' are wrong (you'll wind up with
8720 multiple copies)".
8721
8722 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8723 or, xor to not_, and_, or_, and xor_, respectively. This works
8724 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8725 random system header somewhere that includes the equivalent of
8726 <iso646.h>.
8727
8728 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8729 -E" works; it apparently doesn't work with PathScale EKO Compiler
8730 Suite Version 2.0.
8731
8732 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8733
8734 During deterministic GLR operation, user actions should be able to
8735 influence the parse by changing yychar. To make this easier to fix and
8736 to make glr.c easier to evolve in general, don't maintain yytoken in
8737 parallel with yychar; just compute yytoken when needed.
8738 * tests/glr-regression.at (Incorrect lookahead during deterministic
8739 GLR): Check that setting yychar in a user action has the intended
8740 effect.
8741 * data/glr.c (yyGLRStack): Remove yytokenp member.
8742 (yyclearin): Don't set *yytokenp.
8743 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8744 yychar rather than *yytokenp to determine the current lookahead.
8745 Compute yytoken locally when needed.
8746 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8747 point to.
8748
8749 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8750 after `--report' documentation.
8751
8752 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8753
8754 * src/parse-gram.y (grammar_declaration): Location of printer
8755 symbol is @1, not list->location. Bug reported by twlevo.
8756 * tests/input.at (Incompatible Aliases): Adjust to above change.
8757
8758 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8759
8760 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8761 all the test at once. This makes the output easier to read in the
8762 normal case.
8763
8764 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8765 got from <http://bro-ids.org/download.html>. The bug is that
8766 when two actions appeared in succession, the second one was
8767 scanned before the first one was added to the grammar rule
8768 as a midrule action. Bison then output the incorrect warning
8769 "parse.y:905.17-906.36: warning: unused value: $3".
8770 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8771 associated with a value.
8772 (rhs): Don't invoke grammar_current_rule_action_append.
8773 (action): Invoke it here instead.
8774 * src/reader.c (grammar_midrule_action): Now extern.
8775 (grammar_current_rule_action_append): Don't invoke
8776 grammar_midrule_action; that is now the scanner's job.
8777 * src/reader.h (last_string, last_braced_code_loc):
8778 (grammar_midrule_action): New decls.
8779 * src/scan-gram.l (last_string): Now extern, sigh.
8780 (last_braced_code_loc): New extern variable.
8781 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8782 rule already has an action.
8783 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8784 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8785 Add some tests to check that the above changes fixed the bug.
8786
8787 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8788
8789 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8790 All used changed. Check whether the symbol has a destructor,
8791 not whether it is typed.
8792 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8793 that the values are still reported as unused. All line numbers
8794 adjusted.
8795
8796 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8797
8798 Work around a bug in bro 0.8, which underparenthesizes its
8799 definition of YYLLOC_DEFAULT.
8800 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8801 their arguments.
8802 * data/lalr1.cc: Likewise.
8803 * data/yacc.cc: Likewise.
8804
8805 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8806
8807 Work around a bug in Pike 7.0, and give the Pike folks a
8808 better way to override the usual int widths.
8809 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8810 user can override the types.
8811 (short): #undef, to work around a bug in Pike 7.0.
8812 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8813 (union yyalloc.yyss): Use yytype_int16 rather than short.
8814 All uses changed.
8815 (yysigned_char): Remove.
8816 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8817 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8818 * tests/regression.at (Web2c Actions): Adjust to above changes.
8819
8820 * src/reader.c (check_and_convert_grammar): New function.
8821 (reader): Close the input file even if something went wrong during
8822 parsing. Minor file descriptor leak reported by twlevo.
8823
8824 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8825 to pacify gcc -Wswitch-default.
8826 * src/scan-gram.l (adjust_location): Use a default: break; case
8827 to pacify gcc -Wswitch-default.
8828 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8829 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8830 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8831 Move these decls to scan-skel.l, since they don't need to be
8832 visible elsewhere.
8833 * src/scan-skel.l: Accept the above decls.
8834 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8835 is used.
8836
8837 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8838
8839 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8840 since we don't want to insist on a version number at the start
8841 of the changelog every time.
8842 * Makefile.maint: Sync from coreutils a bit better.
8843 (sc_trailing_blank): Renamed from sc_trailing_space.
8844 All uses changed.
8845 (sc_no_if_have_config_h, sc_require_config_h):
8846 (sc_prohibit_assert_without_use): New rules.
8847 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8848 (sc_dd_max_sym_length): Fix leading spaces in rule.
8849 (sc_system_h_headers): Prefix with @.
8850 (sc_useless_cpp_parens, m4-check): Output line numbers.
8851 (changelog-check): Allow version only in head.
8852 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8853 satisfy new Makefile.maint rule.
8854 * data/glr.c: Likewise.
8855 * data/glr.cc: Likewise.
8856 * data/lalr1.cc: Likewise.
8857 * data/yacc.c: Likewise.
8858 * lib/ebitsetv.c: Likewise.
8859 * lib/lbitset.c: Likewise.
8860 * lib/subpipe.c: Likewise.
8861 * lib/timevar.c: Likewise.
8862 * src/system.h: Likewise.
8863 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8864 * djgpp/Makefile.maint: Add copyright notice.
8865 * djgpp/README.in: Likewise.
8866 * djgpp/config.bat: Likewise.
8867 * djgpp/config.site: Likewise.
8868 * djgpp/config_h.sed: Likewise.
8869 * djgpp/djunpack.bat: Likewise.
8870 * djgpp/config.sed: Fix copyright notice to match standard format.
8871 * djgpp/subpipe.h: Likewise.
8872 * lib/bitsetv-print.c: Likewise.
8873 * lib/bitsetv.c: Likewise.
8874 * lib/subpipe.h: Likewise.
8875 * lib/timevar.c: Likewise.
8876 * lib/timevar.h: Likewise.
8877 * djgpp/subpipe.c: Use standard recipe for config.h.
8878 * lib/abitset.c: Likewise.
8879 * lib/bitset.c: Likewise.
8880 * lib/bitset_stats.c: Likewise.
8881 * lib/bitsetv-print.c: Likewise.
8882 * lib/bitsetv.c: Likewise.
8883 * lib/ebitsetv.c: Likewise.
8884 * lib/get-errno.c: Likewise.
8885 * lib/lbitset.c: Likewise.
8886 * lib/subpipe.c: Likewise.
8887 * lib/timevar.c: Likewise.
8888 * lib/vbitset.c: Likewise.
8889 * tests/local.at: Likewise.
8890 * src/scan-gram.l: Don't include verify.h, since system.h does
8891 that for us.
8892 * .x-sc_require_config_h: New file.
8893 * .x-sc_unmarked_diagnostics: New file.
8894
8895 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8896
8897 Be a bit more systematic about using 'abort'.
8898 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8899 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8900 Put 'default: abort ();' before some other case, to satisfy older
8901 pedantic compilers.
8902 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8903 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8904 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8905 * src/conflicts.c (resolve_sr_conflict): Likewise.
8906 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8907 (get_decision_str, get_orientation_str, get_node_alignment_str):
8908 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8909 (get_linestyle_str, get_arrowstyle_str): Likewise.
8910 * src/conflicts.c (resolve_sr_conflict):
8911 Use a default case rather than one for the one remaining enum
8912 value, to catch invalid enum values as well.
8913 * src/lalr.c (set_goto_map, map_goto):
8914 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8915 * src/nullable.c (nullable_compute, token_definitions_output):
8916 Likewise.
8917 * src/reader.c (packgram, reader): Likewise.
8918 * src/state.c (transitions_to, state_new, state_reduction_find):
8919 Likewise.
8920 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8921 (symbol_pack): Likewise.
8922 * src/tables.c (conflict_row, pack_vector): Likewise.
8923 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8924 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8925 * src/system.h: Don't include <assert.h>.
8926 (assert): New macro.
8927
8928 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8929 (Destructor Decl, Parser Function, Pure Calling):
8930 Describe rules for braces inside C code more carefully.
8931
8932 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8933
8934 Fix some porting glitches found by Nelson H. F. Beebe.
8935 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8936 compilers that don't understand that abort () does not return.
8937 * src/state.c (transitions_to): Likewise.
8938 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8939 that '#include <cstdlib>' works.
8940 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8941 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8942 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8943 for the benefit of some pre-C99 compilers.
8944
8945 * bootstrap: Undo changes to gnulib files that autoreconf made.
8946
8947 Minor fixups to get 'make maintainer-check' to work.
8948 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8949 with the new verify.h implementation.
8950 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8951 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8952 * data/yacc.c (YYUSE): Likewise.
8953 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8954 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8955 * src/parse-gram.y (declaration): Don't pass a string constant
8956 to a function that expects char *, since GCC might complain
8957 about the constant value.
8958 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8959 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8960 before #defining them.
8961 * tests/glr-regression.at
8962 (Incorrectly initialized location for empty right-hand side in GLR):
8963 In yyerror, use the msg arg.
8964 (Corrupted semantic options if user action cuts parse):
8965 (Incorrect lookahead during deterministic GLR):
8966 (Incorrect lookahead during nondeterministic GLR):
8967 Don't name a local var 'index'; it shadows string.h's 'index'.
8968
8969 2006-01-19 Akim Demaille <akim@epita.fr>
8970
8971 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8972 location, not just parts of it.
8973
8974 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8975
8976 * NEWS: Document the fact that multiple %unions are now allowed.
8977 * doc/bison.texinfo (Union Decl): Likewise.
8978 * TODO: This feature is now implemented, so remove it from
8979 the wishlist.
8980
8981 * Makefile.maint: Merge with coreutils Makefile.maint.
8982 (CVS_LIST): Use build-aux version if available.
8983 (VERSION_REGEXP): New macro.
8984 (syntax-check-rules): Add sc_no_if_have_config_h,
8985 sc_prohibit_assert_without_use, sc_require_config_h,
8986 sc_useless_cpp_parens.
8987 (sc_obsolete_symbols): Check for O_NDELAY.
8988 (sc_dd_max_sym_length): Track coreutils.
8989 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8990 (sc_useless_cpp_parens): New rule.
8991 (news-date-check): Look for version or today's date.
8992 (changelog-check): Don't require version number near head.
8993 (copyright-check): Use current year instead of hardwiring 2005.
8994 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8995 (announcement): Add --gpg-key-ID.
8996
8997 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8998 with "file system".
8999
9000 Avoid undefined behavior that addressed just before the start of an
9001 array. Problem reported by twlevo.
9002 * src/reader.c (packgram): Prepend a new sentinel before ritem.
9003 * src/lalr.c (build_relations): Rely on new sentinel.
9004 * src/gram.c (gram_free): Adjust to new sentinel.
9005
9006 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9007
9008 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9009 yylookaheadNeeds. All uses updated.
9010 (yysplitStack): Rename local yynewLookaheadStatuses to
9011 yynewLookaheadNeeds.
9012 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9013 GLR): In comments, change `lookahead status' to `lookahead need'.
9014
9015 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9016
9017 * data/glr.c (yysplitStack): A little stylistic rewrite.
9018
9019 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9020
9021 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9022
9023 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9024
9025 * doc/bison.texinfo: Fix some typos.
9026 (GLR Semantic Actions): New subsection discussing special
9027 considerations because GLR semantic actions might be deferred.
9028 (Actions): Mention look-ahead usage of yylval.
9029 (Actions and Locations): Mention look-ahead usage of yylloc.
9030 (Special Features for Use in Actions): Add YYEOF entry and mention it
9031 in the yychar entry.
9032 In the yychar entry, remove mention of the local yychar case (pure
9033 parser) since this is irrelevant information when writing semantic
9034 actions and since it's already discussed in `Table of Symbols' where
9035 yychar is otherwise described as an external variable.
9036 In the yychar entry, don't call it the `current' look-ahead since it
9037 isn't when semantic actions are deferred.
9038 In the yychar and yyclearin entries, add note about deferred semantic
9039 actions.
9040 Add yylloc and yylval entries discussing look-ahead usage.
9041 (Look-Ahead Tokens): When discussing yychar, don't call it the
9042 `current' look-ahead, and do mention yylval and yylloc.
9043 (Error Recovery): Cross-reference `Action Features' when mentioning
9044 yyclearin.
9045 (Table of Symbols): In the yychar entry, don't call it the `current'
9046 look-ahead.
9047 In the yylloc and yylval entries, mention look-ahead usage.
9048
9049 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
9050
9051 * tests/glr-regression.at: Update copyright year to 2006.
9052
9053 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9054
9055 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9056 use during nondeterministic operation to track which stacks have
9057 actually needed the current lookahead.
9058 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9059 Allocate, deallocate, resize, and otherwise shuffle space for
9060 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9061 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9062 appropriately during nondeterministic operation.
9063 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9064 members to store the current lookahead to be used by the deferred
9065 user action.
9066 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9067 from which the RHS is taken. Set the lookahead members of the new
9068 yySemanticOption according to the lookahead status for stack yyk.
9069 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9070 yyaddDeferredAction.
9071 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9072 members of yySemanticOption before invoking yyuserAction, and then set
9073 them back to their current values afterward.
9074 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9075 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9076 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9077 titles for consistency.
9078 (Leaked merged semantic value if user action cuts parse): In order to
9079 suppress lint warnings, use arguments in merge function, and assign
9080 char value < 128 in main.
9081 (Incorrect lookahead during deterministic GLR): New test case.
9082 (Incorrect lookahead during nondeterministic GLR): New test case.
9083
9084 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9085
9086 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
9087 !yyvaluep as signal that no semantic value is available to print.
9088 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9089 to print a semantic value.
9090
9091 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9092
9093 * tests/glr-regression.at: For consistency with my newer test cases,
9094 don't thank myself.
9095
9096 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9097
9098 * data/glr.c (yyresolveValue): When merging semantic options, if at
9099 least one user action succeeds but a later one cuts the parse, then
9100 destroy the semantic value before returning rather than leaking it.
9101 (yyresolveStates): If a user action cuts the parse and thus
9102 yyresolveValue fails, ignore the (unset) semantic value rather than
9103 corrupting the yyGLRState, and empty the semantic options list since
9104 the user actions should have called all necessary destructors.
9105 Simplify code with YYCHK.
9106 * tests/glr-regression.at (Corrupted semantic options if user action
9107 cuts parse): New test case.
9108 (Undesirable destructors if user action cuts parse): New test case.
9109 Before applying any of this patch, this test case never actually failed
9110 for me... but only because the corrupted semantic options usually
9111 masked this bug.
9112 (Leaked merged semantic value if user action cuts parse): New test
9113 case.
9114
9115 2006-01-05 Akim Demaille <akim@epita.fr>
9116
9117 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9118
9119 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9120
9121 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9122 _MSC_VER. Problem reported by Cenzato Marco.
9123 (b4_c_function_def): Use it.
9124 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9125 b4_c_modern.
9126 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9127 than rolling our own.
9128
9129 2006-01-04 Akim Demaille <akim@epita.fr>
9130
9131 Also warn about non-used mid-rule values.
9132 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9133 member.
9134 (symbol_list_new): Adjust.
9135 * src/reader.c (symbol_typed_p): New.
9136 (grammar_rule_check): Use it.
9137 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9138 Check its rule.
9139 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9140 Use it.
9141 * tests/actions.at (Exotic Dollars): Adjust.
9142
9143 2006-01-04 Akim Demaille <akim@epita.fr>
9144
9145 * src/reader.c (grammar_midrule_action): If $$ is set in a
9146 mid-rule, move the `used' bit to its lhs.
9147 * tests/input.at (Unused values): New.
9148 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9149
9150 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9151
9152 * doc/bison.texinfo (Bison Options): Say more accurately what
9153 --yacc does.
9154 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9155 about declarations in the grammar when in Yacc mode, as POSIX does
9156 not require a diagnostic when the grammar uses extensions.
9157
9158 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9159
9160 Warn about dubious constructions like "%token T T".
9161 Reported by twlevo.
9162 * src/symtab.h (struct symbol.declared): New member.
9163 * src/symtab.c (symbol_new): Initialize it to false.
9164 (symbol_class_set): New arg DECLARING, specifying whether
9165 this is a declaration that we want to warn about, if there
9166 is more than one of them. All uses changed.
9167
9168 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9169 Allow multiple %union directives, whose contents concatenate.
9170 * src/parse-gram.y (grammar_declaration): Likewise.
9171 Use muscle_code_grow, so that we don't need stype_line any more.
9172 All uses changed.
9173
9174 * src/muscle_tab.c (muscle_grow): Fix comment.
9175
9176 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9177 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9178 Update copyright year to 2006.
9179
9180 2006-01-03 Akim Demaille <akim@epita.fr>
9181
9182 Have glr.cc pass (some of) the calc.at tests.
9183 * data/glr.cc (b4_parse_param_orig): New.
9184 (b4_parse_param): Improve its definition, and bound it more
9185 clearly in the skeleton.
9186 (b4_epilogue): Append, instead of prepending, in order to keep
9187 #line consistency.
9188 Simplify the generation of auxiliary functions: locations and
9189 purity are mandated.
9190 (b4_global_tokens_and_yystype): Honor it.
9191 * data/location.cc (c++.m4): Don't include it.
9192 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9193 and AT_SKEL_CC_IF.
9194 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9195 AT_LALR1_CC_IF.
9196 Be sure to initialize the first position's filename.
9197 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9198 mandated anyway.
9199 (AT_CHECK_CALC_GLR_CC): New.
9200 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9201
9202 2006-01-02 Akim Demaille <akim@epita.fr>
9203
9204 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9205 c.m4.
9206 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
9207 * data/glr.cc: Do not include stack.hh.
9208
9209 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9210
9211 * data/glr.c: Reformat whitespace with tabs.
9212 (b4_lpure_formals): Remove this unused m4 macro.
9213 * tests/cxx-type.at: Reformat whitespace with tabs.
9214 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9215 since it's a member. Rename type to isNterm for clarity.
9216
9217 2005-12-29 Akim <akim@sulaco.local>
9218
9219 Let glr.cc catch up with symbol_value_print.
9220 * data/glr.cc (b4_yysymprint_generate): Replace by...
9221 (b4_yy_symbol_print_generate): this.
9222 (yy_symbol_print, yy_symbol_value_print): Declare them.
9223
9224 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9225
9226 * src/location.h (boundary): Note that a line or column equal
9227 to INT_MAX indicates an overflow.
9228 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9229 (rule_length_overflow, increment_rule_length, add_column_width):
9230 New functions.
9231 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9232 (<SC_BRACED_CODE>"}"):
9233 Use increment_rule_length rather than incrementing it by hand.
9234 (adjust_location, handle_syncline): Diagnose overflow.
9235 (handle_action_dollar, handle_action_at):
9236 Fix bug with monstrosities like $-2147483648.
9237 Remove now-unnecessary checks.
9238 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9239 (convert_ucn_to_byte): Verify assumptions.
9240 (handle_syncline): New arg LOC. All callers changed.
9241 Don't store through a value derived from char const * pointer.
9242
9243 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9244 GCC warnings.
9245
9246 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9247
9248 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9249 Remove unnecessary forward static decls.
9250
9251 2005-12-27 Akim Demaille <akim@epita.fr>
9252
9253 * src/reader.c (grammar_current_rule_check): Also check that $$
9254 is used.
9255 Take the rule to check as argument, hence rename as...
9256 (grammar_rule_check): this.
9257 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9258 Rename as...
9259 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9260 (grammar_midrule_action, grammar_symbol_append): Now static.
9261 * tests/torture.at (input): Don't rely on the default action
9262 being always performed.
9263 * tests/calc.at: "Set" $$ even when the action is "cut" with
9264 YYERROR or other.
9265 * tests/actions.at (Exotic Dollars): Instead of using unused
9266 values, check that the warning is issued.
9267
9268 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9269
9270 * NEWS: Improve wording for unused-value warnings.
9271
9272 2005-12-22 Akim Demaille <akim@epita.fr>
9273
9274 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9275 (b4_yysymprint_generate): Rename as...
9276 (b4_yy_symbol_print_generate): this.
9277 Generate yy_symbol_print instead of yysymprint.
9278 Generate also yy_symbol_value_print, and use it.
9279
9280 2005-12-22 Akim Demaille <akim@epita.fr>
9281
9282 * NEWS: Warn about unused values.
9283 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9284 a `used' member.
9285 (symbol_list_n_get, symbol_list_n_used_set): New.
9286 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9287 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9288 * src/reader.c (grammar_current_rule_check): Check that values are
9289 used.
9290 * src/symtab.c (symbol_print): Accept 0.
9291 * tests/existing.at: Remove the type information.
9292 Empty the actions.
9293 Remove useless actions (beware of mid-rule actions: perl -000
9294 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9295 * tests/actions.at (Exotic Dollars): Use unused values.
9296 * tests/calc.at: Likewise.
9297 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9298 Likewise.
9299
9300 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9301 rule_useful_p.
9302
9303 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9304
9305 Undo 2005-12-01 tentative license wording change. The wording is
9306 still being reviewed by the lawyers, and we don't want to wait for
9307 them before publishing a test release. For now, revert to the
9308 previous wording.
9309 * NEWS: Undo 2005-12-01 change.
9310 * data/glr.c: Revert to previous license wording.
9311 * data/glr.cc: Likewise.
9312 * data/lalr1.cc: Likewise.
9313 * data/location.cc: Likewise.
9314 * data/yacc.c: Likewise.
9315
9316 * NEWS: Reword %destructor vs YYABORT etc.
9317 * data/glr.c: Use American spacing, for consistency.
9318 * data/glr.cc: Likewise.
9319 * data/lalr1.cc: Likewise.
9320 * data/yacc.c: Likewise.
9321 * data/yacc.c: Reformat comments slightly.
9322 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9323 for consistency. Fix some spelling errors and reword recently-included
9324 text slightly.
9325 * tests/cxx-type.at: Cast results of malloc, for C++.
9326
9327 2005-12-21 Joel E. Denny <address@hidden>
9328
9329 * tests/cxx-type.at: Construct a tree, count the parents of shared
9330 nodes, and free each node once and only once. Previously, the memory
9331 for semantic values was leaked instead.
9332
9333 2005-12-21 Joel E. Denny <address@hidden>
9334
9335 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9336 (yylval, yylloc): If pure, #define to yystackp->yyval and
9337 yystackp->yyloc similar to yychar and yynerrs.
9338 (yyparse): If pure, remove local yylval and yylloc. Add local
9339 yystackp to accommodate pure definitions of yylval and yylloc.
9340 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9341 yylvalp and yyllocp to &yylval and &yylloc.
9342 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9343 namespace. Previously, nerrs and char were missing, but lval and lloc
9344 weren't necessary.
9345 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9346 yylvalp and yyllocp parameters since, if pure, these are now always
9347 accessible through yystackp. If not pure, they are still accessible
9348 globally.
9349 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9350 `if (YYID (N))' to pacify lint.
9351
9352 2005-12-21 Akim Demaille <akim@epita.fr>
9353
9354 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9355 destroy the RHS symbols of a rule.
9356 * data/yacc.c (yylen): Initialize to 0.
9357 Keep its value to the number of items to possibly shift.
9358 In particular, a regular successful parse that ends on YYFINAL by
9359 a (internal) YYACCEPT must not have yylen != 0.
9360 (yyerrorlab, yyreturn): Pop the RHS.
9361 Reorder a bit to emphasize the `shifting' bits of code.
9362 (YYPOPSTACK): Now accept a number of items to pop.
9363 * data/lalr1.cc: Likewise.
9364 * data/glr.c: Formatting changes.
9365 Use goto instead of fall through.
9366 * doc/bison.texinfo (Destructor Decl): Complete.
9367
9368 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9369
9370 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9371 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9372 * djgpp/config.bat: Replace every occurence of the file name
9373 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9374 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9375 * djgpp/config.sed: Replace every occurence of the file name
9376 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9377 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9378 * djgpp/djunpack.bat: DJGPP specific file.
9379 * djgpp/fnchange.lst: DJGPP specific file.
9380 * djgpp/README.in: Add new information about how to unpack the bison
9381 source on MSDOS and other systems which have 8.3 file name restrictions
9382 using djunpack.bat and fnchange.lst.
9383
9384 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9385
9386 * bootstrap (build_cvs_prefix): Remove; unused.
9387 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9388 when getting gnulib.
9389
9390 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9391
9392 * data/glr.c: Reorder typedef declarations for structs to match order
9393 of struct declarations.
9394 Rename yystack everywhere to yystackp except in yyparse where it's not
9395 a pointer.
9396 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9397 consistency.
9398 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9399 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9400 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9401 lint.
9402
9403 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9404
9405 * tests/sets.at (Accept): Fix typos in regular expression used to
9406 sed out the final state number.
9407
9408 Work around portability problem on Solaris 10: flex-generated
9409 files include <stdio.h> before <config.h>, which messes up
9410 because the latter defines __EXTENSIONS__. Address the problem
9411 by creating two new little files that include <config.h> first,
9412 then include the flex-generated files. Rewrite everyone else
9413 to include <config.h> first, as well.
9414 * lib/timevar.c: Always include "config.h".
9415 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9416 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9417 (EXTRA_bison_SOURCES): New macro.
9418 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9419 * src/system.h: Don't include config.h.
9420 * src/LR0.c: Include <config.h> first.
9421 * src/assoc.c: Likewise.
9422 * src/closure.c: Likewise.
9423 * src/complain.c: Likewise.
9424 * src/conflicts.c: Likewise.
9425 * src/derives.c: Likewise.
9426 * src/files.c: Likewise.
9427 * src/getargs.c: Likewise.
9428 * src/gram.c: Likewise.
9429 * src/lalr.c: Likewise.
9430 * src/location.c: Likewise.
9431 * src/main.c: Likewise.
9432 * src/muscle_tab.c: Likewise.
9433 * src/nullable.c: Likewise.
9434 * src/output.c: Likewise.
9435 * src/parse-gram.y: Likewise.
9436 * src/print.c: Likewise.
9437 * src/print_graph.c: Likewise.
9438 * src/reader.c: Likewise.
9439 * src/reduce.c: Likewise.
9440 * src/relation.c: Likewise.
9441 * src/state.c: Likewise.
9442 * src/symlist.c: Likewise.
9443 * src/symtab.c: Likewise.
9444 * src/tables.c: Likewise.
9445 * src/uniqstr.c: Likewise.
9446 * src/vcg.c: Likewise.
9447
9448 * src/parse-gram.y: Fix minor problems uncovered by lint.
9449 (current_lhs, current_lhs_location): Now static.
9450 (current_assoc): Remove unused variable.
9451
9452 Cleanups so that Bison-generated parsers have less lint.
9453 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9454 Prepend /*ARGSUSED*/, for lint's sake.
9455 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9456 definition if 'lint' is defined.
9457 (YYID): New macro (or function, if lint).
9458 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9459 * data/yacc.c: Likewise.
9460 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9461 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9462 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9463 is C++ only.
9464 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9465 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9466 Use YYID(0) rather than 0, for lint.
9467 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9468 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9469
9470 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9471
9472 * tests/glr-regression.at
9473 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9474 Close memory leak reported by twlevo.
9475
9476 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9477
9478 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9479 all stacks.
9480 (yyparse): Iterate another stack in order to call user destructors.
9481 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9482 New test case.
9483 (Duplicated user destructor for lookahead): This test now is expected
9484 to succeed.
9485
9486 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9487
9488 * NEWS: Document the following change.
9489 * data/yacc.c: Say "parser skeleton" rather than "file", since
9490 it's no longer just a file.
9491 * data/glr.c: Grant a special exception for C GLR parsers, that
9492 reads like the already-existing exception for C LALR(1) parsers.
9493 * data/glr.cc: Likewise.
9494 * data/lalr1.cc: Likewise.
9495 * data/location.cc: Likewise.
9496 * data/yacc.c: Reword the "written by" statement to clarify that
9497 it was the parser skeleton, not the entire output file.
9498 * data/glr.c: Written by Paul Hilfinger.
9499 * data/glr.cc: Written by Akim Demaille.
9500 * data/lalr1.cc: Likewise.
9501
9502 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9503
9504 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9505 Fix typos in previous change that broke 'make check'.
9506 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9507 supported in C.
9508 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9509 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9510 We can revert this once things settle down.
9511
9512 * src/conflicts.c (conflicts_print): Don't print file name twice
9513 when %expect fails because there were no conflicts.
9514 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9515 change.
9516 * tests/conflicts.at (%expect not enough, %expect too much):
9517 (%expect with reduce conflicts): Adjust to new behavior.
9518
9519 2005-11-18 Akim Demaille <akim@epita.fr>
9520
9521 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9522 errors.
9523 * NEWS: Document this.
9524 * doc/bison.texinfo (Expect Decl): Likewise.
9525
9526 2005-11-16 Akim Demaille <akim@epita.fr>
9527
9528 Generalize the display of semantic values and locations in traces.
9529 * data/glr.c (yy_reduce_print): Fix indices (again).
9530 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9531 literal integers.
9532 * data/lalr1.cc (yyreduce_print): Rename as...
9533 (yy_reduce_print): this.
9534 Display values and locations.
9535 * data/yacc.c (yy_reduce_print): Likewise.
9536 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9537 (yysymprint): Move higher to be visible from yy_reduce_print).
9538 (yyparse): Adjust.
9539 * tests/calc.at: Adjust the expected length of the traces.
9540
9541 2005-11-14 Akim Demaille <akim@epita.fr>
9542
9543 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9544 from 1 to N, while values and location start at 0.
9545 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9546
9547 2005-11-14 Akim Demaille <akim@epita.fr>
9548
9549 * data/glr.c (yy_reduce_print): Fix the $ number.
9550
9551 2005-11-14 Akim Demaille <akim@epita.fr>
9552
9553 "Use" parse parameters.
9554 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9555 * data/glr.c, data/glr.cc: Use them.
9556 * data/glr.c (YYUSE): Have a C++ definition that supports
9557 non-pointer types.
9558
9559 2005-11-14 Akim Demaille <akim@epita.fr>
9560
9561 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9562
9563 2005-11-14 Akim Demaille <akim@epita.fr>
9564
9565 * data/glr.cc: New.
9566 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9567
9568 2005-11-12 Akim Demaille <akim@epita.fr>
9569
9570 Let position and location be PODs.
9571 * data/location.cc (position::initialize, location::initialize): New.
9572 (position::position, location::location): Define only if
9573 b4_location_constructors is defined.
9574 * data/lalr1.cc (b4_location_constructors): Define it for backward
9575 compatibility.
9576 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9577
9578 2005-11-12 Akim Demaille <akim@epita.fr>
9579
9580 * data/lalr1.cc: Move the body of the ctor and dtor into the
9581 parser file (instead of the header).
9582 Wrap the implementations in a "namespace yy".
9583
9584 2005-11-12 Akim Demaille <akim@epita.fr>
9585
9586 Have glr.c include its header file when created.
9587 * data/glr.c (b4_shared_declarations): New.
9588 Output them verbatim in the parser if !%defines, otherwise
9589 output then in the header file, and include it instead.
9590
9591 2005-11-11 Akim Demaille <akim@epita.fr>
9592
9593 * data/glr.c: Comment changes.
9594
9595 2005-11-11 Akim Demaille <akim@epita.fr>
9596
9597 When yydebug, report semantic and location values for reductions.
9598 * data/glr.c (yy_reduce_print): Report the semantic values and the
9599 locations.
9600 (YY_REDUCE_PRINT): Adjust.
9601 (yyglrReduce): Use them.
9602 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9603 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9604 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9605 traces.
9606
9607 2005-11-10 Akim Demaille <akim@epita.fr>
9608
9609 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9610 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9611 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9612
9613 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9614
9615 * m4/cxx.m4, examples/Makefile.am: Don't build
9616 examples/calc++ if no C++ compiler is available. (trivial change)
9617
9618 2005-11-09 Akim Demaille <akim@epita.fr>
9619
9620 * src/scan-skel.l: Use a couple of asserts.
9621
9622 2005-11-03 Akim Demaille <akim@epita.fr>
9623
9624 In some (weird) cases, the final state number is incorrect.
9625 Reported by Alexandre Duret-Lutz.
9626 * src/LR0.c (state_list_append): Remove the computation of
9627 final_state.
9628 (save_reductions): Do it here.
9629 (get_state): Alpha conversion.
9630 (generate_states): Use a for loop.
9631 * src/gram.h (item_number_is_rule_number)
9632 (item_number_is_symbol_number): New.
9633 * src/state.c: Use assert.
9634 * src/system.h: Include assert.h.
9635 * tests/sets.at (Accept): New.
9636
9637 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9638
9639 * data/glr.c (yyfill): Adjust comment.
9640 (yyresolveAction): Initialize default location properly
9641 for empty right-hand sides.
9642 (yydoAction): Ditto.
9643 Add comment explaining apparently dead code.
9644 * tests/glr-regression.at
9645 (Incorrectly initialized location for empty right-hand side in GLR):
9646 New test.
9647
9648 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9649
9650 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9651 gnulib when interrupted. This fixes some race conditions and
9652 works around some portability problems (one noted by Paul
9653 Hilfinger).
9654
9655 2005-10-22 Akim <akim@epita.fr>
9656
9657 * Makefile.cfg: Adjust to config -> build-aux.
9658 Reported by twledo.
9659
9660 2005-10-21 Akim Demaille <akim@epita.fr>
9661
9662 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9663 the %parse-params.
9664 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9665 * data/yacc.c (b4_Pure_if): Rename as...
9666 (b4_yacc_pure_if): this.
9667 (YY_SYMBOL_PRINT, yyparse): Adjust.
9668 * doc/bison.texinfo: Formatting changes.
9669
9670 2005-10-21 Akim Demaille <akim@epita.fr>
9671
9672 Finish the transition config -> build-aux.
9673 * configure.ac, Makefile.am: Use build-aux.
9674 * config/prev-version, config/announce-gen, config/Makefile.am:
9675 Move to...
9676 * build-aux/prev-version, build-aux/announce-gen,
9677 * build-aux/Makefile.am: here.
9678
9679 2005-10-14 Akim Demaille <akim@epita.fr>
9680
9681 * examples/calc++/test: Use set -x only when VERBOSE.
9682
9683 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9684
9685 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9686 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9687
9688 2005-10-13 Akim Demaille <akim@epita.fr>
9689
9690 * src/scan-skel.l: Output the base name parts of the parser and
9691 header file names.
9692 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9693 additional checks.
9694 Use this to exercise C++ outputs in subdirs.
9695 Reported by Oleg Smolsky.
9696
9697 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9698
9699 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9700 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9701 Problem reported by John P. Hartmann.
9702 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9703 already defined it.
9704
9705 2005-10-12 Akim Demaille <akim@epita.fr>
9706
9707 * src/parse-gram.y (version_check): Exit 63 to please missing
9708 (stands for "version mismatch).
9709 * tests/input.at, doc/bison.texinfo: Adjust.
9710
9711 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9712
9713 Work around portability problems with Visual Age C compiler
9714 (xlc and xlC_r) reported by John P. Hartmann.
9715 * data/location.cc (initial_column, initial_line): Remove.
9716 All uses replaced by 0 and 1.
9717 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9718 that xlc complains about.
9719 * src/scan-skel.l (skel_wrap): Likewise.
9720 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9721 as __STDC__.
9722 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9723 __STDC_VERSION__. Use it everywhere instead of looking at
9724 __STDC__ and __cplusplus.
9725
9726 2005-10-10 Akim Demaille <akim@epita.fr>
9727
9728 * examples/calc++/test: Be quiet unless VERBOSE.
9729
9730 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9731
9732 * data/c.m4 (yydestruct, yysymprint):
9733 Use YYUSE instead of casting to void.
9734 * data/glr.c (YYUSE): New macro.
9735 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9736 Use it instead of rolling our own.
9737 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9738 (YYCHK1):
9739 Use /*CONSTCOND*/ to suppress lint warnings.
9740 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9741 (YY_STACK_PRINT): Use 'false' not '0'.
9742 (YYUSE): New macro.
9743 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9744 * data/yacc.c (YYUSE): New macro.
9745 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9746 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9747 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9748
9749
9750 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9751 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9752
9753 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9754
9755 Undo the parts of the unlocked-I/O change that substituted
9756 putc or puts for printf. This might hurt performance a bit,
9757 but some people prefer the printf style.
9758 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9759 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9760 All uses replaced by YYFPRINTF and YYDPRINTF.
9761 * data/yacc.c: Likewise.
9762 * lib/bitset.c (bitset_print): Likewise.
9763 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9764 putc and puts.
9765 * lib/lbitset.c (debug_lbitset): Likewise.
9766 * src/closure.c (print_firsts, print_fderives): Likewise.
9767 * src/gram.c (grammar_dump): Likewise.
9768 * src/lalr.c (look_ahead_tokens_print): Likewise.
9769 * src/output.c (escaped_output): Likewise.
9770 (user_actions_output): Break apart two printfs.
9771 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9772 * src/reduce.c (reduce_print): Likewise.
9773 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9774 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9775
9776 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9777 Use assignments rather than casts-to-void to suppress
9778 unused-variable warnings. This pacifies 'lint'.
9779 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9780 unused-variable warnings.
9781
9782 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9783
9784 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9785
9786 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9787
9788 Use unlocked I/O for a minor performance improvement on hosts like
9789 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9790 is to use the gnlib unlocked-io module, and to prefer putc and
9791 puts to printf when either will work (since the latter doesn't
9792 come in an unlocked flavor).
9793 * bootstrap (gnulib_modules): Add unlocked-io.
9794 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9795 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9796 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9797 and similarly for puts and putc and printf.
9798 * data/yacc.c: Likewise.
9799 * lib/bitset.c (bitset_print): Likewise.
9800 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9801 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9802 to printf.
9803 * lib/lbitset.c (debug_lbitset): Likewise.
9804 * src/closure.c (print_firsts, print_fderives): Likewise.
9805 * src/gram.c (grammar_dump): Likewise.
9806 * src/lalr.c (look_ahead_tokens_print): Likewise.
9807 * src/output.c (escaped_output): Likewise.
9808 (user_actions_output): Coalesce two printfs.
9809 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9810 * src/reduce.c (reduce_print): Likewise.
9811 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9812 * src/system.h: Include unlocked-io.h rather than stdio.h.
9813
9814 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9815 this confuses xgettext.
9816
9817 2005-10-02 Akim Demaille <akim@epita.fr>
9818
9819 * bootstrap (gnulib_modules): Add strverscmp.
9820 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9821 * m4/.cvsignore: Add strverscmp.m4.
9822 * src/parse-gram.y (%require): New token, new rule.
9823 (version_check): New.
9824 * src/scan-gram.l (%require): Adjust.
9825 * tests/input.at (AT_REQUIRE): New.
9826 Use it.
9827 * doc/bison.texinfo (Require Decl): New.
9828 (Calc++ Parser): Use %require.
9829
9830 2005-10-02 Akim Demaille <akim@epita.fr>
9831
9832 * data/location.cc: New.
9833
9834 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9835 Akim Demaille <akim@epita.fr>
9836
9837 Make sure -odir/foo.cc creates dir/location.hh etc.
9838 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9839 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9840 (spec_defines_file): Now const.
9841 (dir_prefix): New.
9842 (short_base_name): Remove.
9843 * src/files.c: Adjust.
9844 (dirname.h): Include.
9845 (base_name): Don't prototype it.
9846 (finput): Remove, duplicates gram_in.
9847 (full_base_name, short_base_name): Replace by...
9848 (all_but_ext, all_but_tab_ext): these.
9849 (compute_base_names): Rename as...
9850 (compute_file_name_parts): this.
9851 Update to compute the new variables, including dir_prefix.
9852 Adjust dependencies.
9853 * src/output.c (prepare): Output them.
9854 * src/reader.c: Adjust to use gram_in, not finput.
9855 * src/scan-skel.l (@dir_prefix@): New.
9856
9857 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9858
9859 * lib/subpipe.c: New function end_of_output_subpipe() added
9860 to allow support for non-posix systems. This is a no-op function
9861 for posix systems.
9862
9863 * lib/subpipe.h: New function end_of_output_subpipe() added
9864 to allow support for non-posix systems. This is a no-op function
9865 for posix systems.
9866
9867 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9868 handle the lack of pipe/fork functionality on non-posix systems.
9869
9870 * djgpp/Makefile.maint: DJGPP specific file.
9871
9872 * djgpp/README.in: DJGPP specific file.
9873
9874 * djgpp/config.bat: DJGPP specific configuration file.
9875
9876 * djgpp/config.sed: DJGPP specific configuration file.
9877
9878 * djgpp/config.site: DJGPP specific configuration file.
9879
9880 * djgpp/config_h.sed: DJGPP specific configuration file.
9881
9882 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9883
9884 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9885
9886 2005-10-02 Akim Demaille <akim@epita.fr>
9887
9888 * data/location.cc: New, extract from...
9889 * data/lalr1.cc: here.
9890 (location.hh): Include it after the user prologue, in case the
9891 filename type is defined by the user.
9892 Forward declation location and position before the pre-prologue.
9893 (yyresult_): Rename as...
9894 (yyresult): this, it's a local variable, not an attribute.
9895 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9896
9897 2005-10-01 Akim Demaille <akim@epita.fr>
9898
9899 * examples/extexi: Restore the #line generation.
9900
9901 2005-09-30 Akim Demaille <akim@epita.fr>,
9902 Alexandre Duret-Lutz <adl@gnu.org>
9903
9904 Move the token type and YYSTYPE in the parser class.
9905 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9906 (parser::token): New, from the moved free definition of tokens.
9907 (parser::semantic_value): Now a full definition instead of an
9908 indirection to YYSTYPE.
9909 (b4_post_prologue): No longer included in the header file, but
9910 in the implementation file.
9911 * doc/bison.texi (C+ Language Interface): Update.
9912 * src/parse-gram.y: Support unary %define.
9913 * tests/actions.at: Define global_tokens_and_yystype for backward
9914 compatibility until we update the tests.
9915 * tests/calc.at: Idem.
9916 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9917 to simplify the code.
9918
9919 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9920
9921 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9922 Ah, the good old days! Problem reported by Peter Klein.
9923 * bootstrap (gnulib_modules): Add strerror, strtoul.
9924 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9925 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9926
9927 2005-09-29 Akim Demaille <akim@epita.fr>
9928
9929 * data/c.m4 (b4_error_verbose_if): New.
9930 * data/lalr1.cc: Use it.
9931 (YYERROR_VERBOSE_IF): Remove.
9932 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9933 parser members, replaced by...
9934 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9935 local variables.
9936 (yysyntax_error_): Takes the state number as argument.
9937 (yyreduce_print_): Use the argument yyrule, not the former
9938 attribute yyn_.
9939
9940 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9941
9942 * bootstrap (gnulib_modules): Add verify.
9943 * lib/.cvsignore: Add verify.h.
9944 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9945 * src/system.h (verify): Remove.
9946 Include verify.h instead.
9947 * src/tables.c (tables_generate): Use new API for 'verify'.
9948
9949 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9950
9951 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9952 local variables whose names begin with 'yy'.
9953 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9954 Trivial changes from Joel E. Denny.
9955
9956 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9957 it itself.
9958 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9959 don't use alloca any more.
9960
9961 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9962 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9963 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9964 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9965 to match yacc.c, to test more hosts.
9966
9967 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9968
9969 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9970 doesn't affect behavior.
9971 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9972 Solaris, AIX, MSC.
9973 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9974 This works a bit better with glibc, if user code has already included
9975 stdlib.h.
9976 * doc/bison.texinfo (Bison Parser): Document that users can't
9977 arbitrarily use malloc and free for other purposes. Document
9978 that <alloca.h> and <malloc.h> might be included.
9979 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9980 user must declare alloca.
9981
9982 * HACKING (release): Forwarn the Translation Project about
9983 stable releses.
9984
9985 2005-09-20 Akim Demaille <akim@epita.fr>
9986
9987 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9988
9989 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9990
9991 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9992 (YYSTACK_ALLOC_MAXIMUM): Use it.
9993 (yysyntax_error): New function.
9994 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9995 multiple syntax errors are reported, and alloca is being used.
9996 Instead, reallocate buffers twice as big each time, so that
9997 we waste at most half the allocated memory. Start with a small
9998 (128-byte) buffer that will suffice in most cases anyway.
9999 Use yysyntax_error to do most of the work.
10000
10001 * doc/bison.texinfo (Error Reporting, Table of Symbols):
10002 yynerrs is the number of errors reported, not the number of
10003 errors encountered.
10004
10005 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10006 Mark it as expected to fail.
10007 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10008 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10009 Don't start user-code symbols with "yy", to avoid name space problems.
10010
10011 2005-09-19 Akim Demaille <akim@epita.fr>
10012
10013 Remove the traits, failed experiment.
10014 It never proved useful, and anyway because of the current
10015 definition, it was not possible to have several specialization of
10016 this traits, making it useless.
10017 * data/lalr1.cc (yy:traits): Remove.
10018 Inline its definitions in the parser class.
10019
10020 2005-09-19 Akim Demaille <akim@epita.fr>
10021
10022 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10023 least Mac OSX with a /usr/local install of gettext.
10024
10025 2005-09-19 Akim Demaille <akim@epita.fr>
10026
10027 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10028 and yytoken for similarity with the other skeletons.
10029
10030 2005-09-19 Akim Demaille <akim@epita.fr>
10031
10032 * NEWS, configure.ac: update version number to 2.1a.
10033
10034 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10035
10036 * NEWS: Version 2.1.
10037
10038 * NEWS: Remove notice of yytname change, since it was never in an
10039 official release.
10040 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10041 diagnostic.
10042 * src/output.c (prepare): Likewise.
10043 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10044 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10045 is not defined. This is an awful hack, but it's enough for now.
10046 All callers changed.
10047 * tests/glr-regression-at (make_value): Args are const pointers now,
10048 to avoid GCC warning.
10049 (Duplicated user destructor for lookahead): New test. Currently
10050 skipped. It fails on my host but I'm not sure it'll always fail.
10051
10052 2005-09-16 Akim Demaille <akim@epita.fr>
10053
10054 * src/symtab.h (struct symbol): Declare the printer and destructor
10055 as const, to avoid accidental calls to free.
10056 (symbol_destructor_set, symbol_printer_set): Adjust.
10057 * src/symtab.c: Adjust.
10058
10059 2005-09-16 Akim Demaille <akim@epita.fr>
10060
10061 * data/c.m4 (b4_token_enums): New.
10062 (b4_token_defines): Rename as...
10063 (b4_token_enums_defines): this.
10064 (b4_token_defines): New, output only the #defines.
10065 * data/yacc.c, data/glr.c: Adjust.
10066 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10067 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10068 as default values.
10069
10070 2005-09-16 Akim Demaille <akim@epita.fr>
10071
10072 * data/lalr1.cc (yylex_): Remove, inline its code.
10073 (yyreport_syntax_error_): Remove, replaced by...
10074 (yysyntax_error_): this which returns a string and leaves to the
10075 caller the call to the users' error function.
10076 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10077 Move from members of the parser object...
10078 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10079 to local variables of the parse function.
10080
10081 2005-09-16 Akim Demaille <akim@epita.fr>
10082
10083 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10084 since it's in Bison's name space.
10085
10086 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10087
10088 * data/glr.c (yyresolveValue): Add default case to pacify
10089 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10090
10091 * NEWS: Document when yyparse started to return 2.
10092 * doc/bison.texinfo (Parser Function): Document when yyparse
10093 returns 2.
10094
10095 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10096 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10097 changed.
10098 (class position): file_name -> filename (reverting). All uses changed.
10099
10100 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10101
10102 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10103 do anything if $@ exists. This reverts part of the 2005-07-07
10104 patch.
10105
10106 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10107
10108 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10109 contains obsolete information and isn't worth distributing as a
10110 separate file anyway.
10111 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10112 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10113 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10114 (yyparse): Abort if user code uses longjmp to throw an unexpected
10115 value.
10116
10117 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10118
10119 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10120 Suggested by twlevo@xs4all.nl.
10121
10122 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10123 This avoids a diagnostic from gcc -Wswitch-enum.
10124 Problem reported by twlevo@xs4all.nl.
10125
10126 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10127 standards. Use "file name" or "file" or "name", depending on
10128 the context.
10129 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10130 not to hack/foo.tab.c.
10131 (Calc++ Top Level): 2nd arg of main is not const.
10132 * data/glr.c: b4_filename -> b4_file_name.
10133 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10134 All uses changed.
10135 (class position): filename -> file_name. All uses changed.
10136 * data/yacc.c: b4_filename -> b4_file_name.
10137 * lib/bitset.h: filename -> file_name in local vars.
10138 * lib/bitset_stats.c: Likewise.
10139 * src/files.c: Likewise.
10140 * src/scan-skel.l ("@output ".*\n): Likewise.
10141 * src/files.c (file_name_split): Renamed from filename_split.
10142 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
10143
10144 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10145
10146 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10147 to accommodate latest gnulib.
10148
10149 * tests/glr-regression.at (Duplicate representation of merged trees):
10150 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10151
10152 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10153 needed.
10154
10155 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10156
10157 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10158 All uses changed. Invoke user destructor after an error during a
10159 split parse (trivial change from Joel E. Denny).
10160
10161 * tests/glr-regression.at
10162 (User destructor after an error during a split parse): New test case.
10163 Problem reported by Joel E. Denny in:
10164 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10165
10166 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10167
10168 * README-cvs: Give URLs for recommended tools.
10169 Mention Gzip version problem, and bootstrapping issues.
10170 Remove troubleshooting section, as it's somewhat obsolete.
10171
10172 * bootstrap (no_cache): New var, to accommodate different wget
10173 variants. Use it instead of '-C off'. Problem reported by
10174 twlevo@xs4all.nl.
10175
10176 * data/glr.c (yydestroyStackItem): New function.
10177 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10178 debugging information. Problem reported by Joel E. Denny.
10179
10180 2005-08-25 Akim Demaille <akim@epita.fr>
10181
10182 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10183
10184 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10185
10186 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10187 Don't invoke destructor on unresolved entries.
10188 * tests/glr-regression.at
10189 (User destructor for unresolved GLR semantic value): New test case.
10190 Problem reported by Joel E. Denny in:
10191 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10192
10193 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10194
10195 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10196 Add strnlen.c.
10197 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10198 lib-prefix.m4, po.m4.
10199
10200 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10201 in yydestruct diagnostic, since it might not be an error.
10202 Problem reported by Joel Denny near end of
10203 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10204 * data/lalr1.cc (yyerturn): Likewise.
10205 * data/yacc.c (yyreturn): Likewise.
10206 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10207
10208 * src/files.c: Remove obsolete FIXME comment.
10209
10210 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10211 with the other templates, and to fix bogus run-on messages such
10212 as the one reported at the end of
10213 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10214 All callers changed to avoid the newline.
10215 (yyprocessOneStack): Output two lines rather than one, to accommodate
10216 the above change. This changes the debug output format slightly.
10217
10218 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10219 reported by Joel E. Denny in
10220 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10221 (trivial change).
10222 * tests/glr-regression.at (Duplicate representation of merged trees):
10223 New test, from Joel E. Denny in:
10224 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10225 * THANKS: Add Joel E. Denny.
10226
10227 * configure.ac (AC_INIT): Bump to 2.0c.
10228
10229 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10230
10231 * NEWS: Version 2.0b.
10232
10233 * Makefile.am (SUBDIRS): Put examples before tests, so that
10234 "make check" doesn't finish with "All 1 tests passed".
10235
10236 * tests/regression.at (Token definitions): Don't rely on
10237 AT_PARSER_CHECK for data that contains backslashes. It currently
10238 uses 'echo', and 'echo' isn't portable if its argument contains
10239 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10240 that the byte '\0xff' is not printable in the C locale; it is,
10241 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10242 not printable, so use '\0x81' to test.
10243
10244 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10245 version of GCC, since the macro is used with non-GCC compilers.
10246
10247 Fix core dump reported by Pablo De Napoli in
10248 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10249 * tests/regression.at (Invalid inputs with {}): New test.
10250 * src/parse-gram.y (token_name): Translate type before using
10251 it as an index.
10252
10253 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10254 the user's name space. All uses changed to __attribute__
10255 ((__unused__)).
10256 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10257 Add __attribute__ ((__noreturn__)).
10258
10259 * etc/clcommit: Remove. We weren't using it, and it failed
10260 "make maintainer-distcheck".
10261 * Makefile.maint: Merge from coreutils.
10262 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10263 (syntax-check-rules): Change list of rules as described below.
10264 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10265 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10266 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10267 (sc_trailing_space): New rules.
10268 (sc_xalloc_h_in_src): Remove.
10269 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10270 (sc_space_tab, sc_error_exit_success, sc_changelog):
10271 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10272 (makefile-check, po-check, author_mark_check):
10273 (makefile_path_separator_check, copyright-check):
10274 Use grep -n, to make it easier to find violations.
10275 Use CVS_LIST and CVS_LIST_EXCEPT.
10276 (header_regexp, h_re): Remove.
10277 (dd_c): New macro.
10278 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10279 (my-distcheck): Use more-modern GCC flags.
10280 (signatures, %.asc): Remove.
10281 (rel-files, announcement): Remove signatures.
10282 Restore old updating code, even though we don't use it, so
10283 that we're the same as coreutils.
10284 (alpha, beta, major): Depend on news-date-check.
10285 Make the upload commands.
10286
10287 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10288 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10289 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10290 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10291 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10292 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10293 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10294 * tests/sets.at: Likewise.
10295
10296 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10297 we comment out the Autoconf version number.
10298 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10299 it's error-prone and "make maintainer-distcheck" rejects it.
10300
10301 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10302 Indent calls to "error" to pacify "make maintainer-distcheck",
10303 when the calls are not intended to be translated.
10304 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10305
10306 * src/Makefile.am (DEFS): Use +=, to pacify
10307 "make maintainer-distcheck".
10308 (bison_SOURCES): Add scan-skel.h.
10309 (sc_tight_scope): New rule, from coreutils.
10310
10311 * src/files.c (src_extension, header_extension):
10312 Now static, not extern.
10313 * src/getargs.c (short_options): Likewise.
10314 * src/muscle_tab.c (muscle_table): Likewise.
10315 * src/parse-gram.y (current_class, current_type, current_prec):
10316 Likewise.
10317 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10318 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10319 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10320 void, to avoid warning when NLS is disabled.
10321 * src/output.c: Include scan-skel.h.
10322 (scan_skel): Remove decl, since scan-skel.h does this.
10323 (output_skeleton):
10324 Indent calls to "error" to pacify "make maintainer-distcheck".
10325 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10326 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10327 "make maintainer-distcheck".
10328 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10329 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10330 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10331 (skel_lex_destroy, scan_skel): Move these decls to...
10332 * src/scan-skel.h: New file.
10333 * src/uniqstr.c (uniqstr_assert):
10334 Indent calls to "error" to pacify "make maintainer-distcheck".
10335
10336 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10337 not @VAR@.
10338
10339 * tests/torture.at: Revamp to avoid misuse of atoi that
10340 "make maintainer-distcheck" complained about.
10341
10342 * examples/extexi (message): Don't print a message more than once,
10343 and omit line-number decoration that makes Emacs compile think
10344 that informative messages are worth worrying about.
10345
10346 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10347
10348 * configure.ac: Update version number.
10349
10350 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10351 accidentally.
10352 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10353 autogenerated by the maintainer.
10354 * examples/calc++/.cvsignore: Add *.yy.
10355
10356 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10357 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10358 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10359
10360 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10361
10362 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10363 from maintainer-distcheck about casting the argument of 'free'.
10364
10365 * NEWS: Mention recent yytname changes.
10366 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10367
10368 * bootstrap: For translations that have not yet been upgraded to
10369 the new runtime-po domain, prime the pump by extracting the
10370 relevant strings from the obsolete translations. This code can be
10371 removed once the bison-runtime domain has been translated by each
10372 team.
10373
10374 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10375 now that token names are already quoted.
10376
10377 Fix problem reported by Anthony Heading.
10378 * data/glr.c (YYTOKEN_TABLE): New macro.
10379 (yytname): Define if YYTOKEN_TABLE.
10380 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10381 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10382 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10383 * src/output.c (prepare_symbols): Output token_table_flag.
10384
10385 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10386
10387 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10388 again if the first call fails.
10389
10390 * data/glr.c (yytnamerr): New function.
10391 (yyreportSyntaxError): Use it to dequote most string literals.
10392 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10393 with other skeletons. All uses changed.
10394 (yytnameerr_): New function.
10395 (yyreport_syntax_error): Use it to dequote most string literals.
10396 * data/yacc.c (yytnamerr): New function.
10397 (yyerrlab): Use it to decode most string literals.
10398 * doc/bison.texinfo (Decl Summary, Calling Convention):
10399 Clarify quoting convention of yytname.
10400 * src/output.c (prepare_symbols): Quote all names. This undoes
10401 the 2005-04-17 change, which is now accomplished (mostly) via
10402 changes in the parsers as described above.
10403 * tests/regression.at (Token definitions, Web2c Actions):
10404 Undo most 2005-04-17 change here, too.
10405
10406 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10407
10408 Fix more problems reported by twlevo@xs4all.nl.
10409 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10410 remove trailing spaces. This loses the exit status of ./types,
10411 and isn't needed since ./types shouldn't be emitting trailing
10412 spaces.
10413 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10414 as the stack isn't valid in that case.
10415
10416 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10417 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10418 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10419 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10420 is used.
10421 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10422 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10423 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10424 Likewise.
10425
10426 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10427 overly-picky compilers that reject 'char *foo = "bar";'.
10428
10429 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10430 to FILE * parameter, not to stderr. This fixes a typo introduced
10431 in the 2005-07-12 change.
10432
10433 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10434 warnings from GCC 4.
10435
10436 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10437 (yyglrShiftDefer, yysplitStack):
10438 Remove unused parameters b4_pure_formals. All uses changed.
10439 (yyglrShift): Remove unused parameters b4_user_formals.
10440 All uses changed.
10441 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10442
10443 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10444
10445 Destructor cleanups and regularization among the three skeletons.
10446 * NEWS: Document the behavior changes.
10447 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10448 stack before failing, as the cleanup code will do it for us now.
10449 * data/lalr1.cc (yyerrlab): Likewise.
10450 * data/glr.c (yyparse): Pop everything off the stack before
10451 freeing it, so that destructors get called properly.
10452 * data/lalr1.cc (yyreturn): Likewise.
10453 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10454 This is more consistent.
10455 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10456 why destructors might be called. 1.875 -> 2.1.
10457 (Destructor Decl, Decl Summary, Table of Symbols):
10458 Some English-language cleanups for %destructor.
10459 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10460 Add output line for destructor of start symbol.
10461 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10462 because of that same extra output line.
10463
10464 * NEWS: Document minor wording changes in diagnostics of
10465 Bison-generated parsers.
10466 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10467 Remove unused formals. All uses changed.
10468 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10469 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10470 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10471 Rename yyoverflowab to yyexhaustedlab.
10472 When memory exhaustion occurs during syntax-error reporting,
10473 report it separately rather than in a single diagnostic; this
10474 eases translation.
10475 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10476 (Memory Exhausted): Renamed from Parser Stack Overflow.
10477 Revamp wording slightly to prefer "memory exhaustion".
10478 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10479
10480 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10481
10482 Add i18n support to the GLR skeleton. Partially fix the C++
10483 skeleton; a C++ expert needs to finish this. Remove debugging
10484 msgids; there's little point to having them translated, since they
10485 can be understood only by someone who can read the
10486 (English-language) source code.
10487
10488 Generate runtime-po/bison-runtime.pot automatically, so that we
10489 don't have to worry about garbage getting in that file. We'll
10490 make sure after the next official release that old msgids don't
10491 get lost. See
10492 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10493
10494 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10495 Now auto-generated.
10496 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10497 Fix typos in explanations of the runtime file.
10498 * bootstrap: Change gettext keyword from YYI18N to YY_.
10499 Use standard Makefile.in.in in runtime-po, since we'll arrange
10500 for backward-compatible bison-runtime.po files in a different way.
10501 * data/glr.c (YY_): New macro, from yacc.c.
10502 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10503 Translate messages intended for users.
10504 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10505 the wording in the other skeletons. We don't know that the memory
10506 is virtual.
10507 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10508 Use same method that yacc.c uses.
10509 Don't translate debugging messages.
10510 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10511 it doesn't work (yet), and requires C++ expertise to fix.
10512 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10513 Move defn to a more logical place, to be consistent with other
10514 skeletons.
10515 Don't translate debugging messages.
10516 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10517 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10518 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10519 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10520
10521 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10522 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10523 void, not int.
10524 * tests/glr-regression.at (Badly Collapsed GLR States):
10525 Likewise.
10526 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10527 yylex should return 0 at EOF rather than aborting.
10528
10529 Improve tests for stack overflow in GLR parser.
10530 Problem reported by twlevo@xs4all.nl.
10531 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10532 All uses removed.
10533 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10534 can handle the problem.
10535 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10536 (yyparse): New local variable yyresult to record the result.
10537 Use result of setjmp to set it, rather than storing itinto
10538 struct.
10539 (yyDone): Remove label.
10540 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10541 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10542 if YYABORT is used).
10543 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10544 yyparse status; put status > 1 into diagnostic.
10545 Check that status==2 works.
10546 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10547 Use exit status 3 for failure to open (which shouldn't happen).
10548
10549 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10550
10551 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10552 1 on syntax error; just let yyparse do its thing.
10553 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10554 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10555 (Exploding the Stack Size with Alloca):
10556 (Exploding the Stack Size with Malloc):
10557 Expect exit status 2, not 1, since the parser is supposed to blow
10558 its stack. Problem reported by twlevo@xs4all.nl.
10559
10560 * data/glr.c (yyparse): Don't assume that the initial calls
10561 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10562 Print a stack-overflow message and fail instead.
10563 Initialize the line-number information before creating the stack,
10564 so that the stack-overflow message can report line zero safely.
10565
10566 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10567
10568 Fix problems reported by twlevo@xs4all.nl.
10569 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10570 (yyuserMerge): Provide a default case if b4_mergers is empty.
10571 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10572 * tests/glr-regression.at
10573 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10574 Add casts to pacify C++ compilers.
10575 * tests/glr-regression.at (Improper merging of GLR delayed action
10576 sets): Declare yylex before using it.
10577 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10578 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10579 test for valgrind; valgrind is independent of g++.
10580 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10581 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10582 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10583 Use a destructor, so that we can expand the stack. Change
10584 YYSTYPE to char * so that we can free it. Cast result of malloc.
10585
10586 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10587
10588 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10589 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10590
10591 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10592
10593 * PACKAGING: New file, suggested by Bruno Haible and taken from
10594 similar wording in gettext's PACKAGING file.
10595 * NEWS: Mention PACKAGING.
10596 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10597
10598 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10599
10600 * NEWS: Document recent i18n improvements.
10601 * bootstrap: Get runtime translations into runtime-po.
10602 Create runtime-po files automatically, if possible.
10603 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10604 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10605 does not infringe on the user's name space.
10606 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10607 * doc/bison.texinfo (Internationalization): Revamp the English
10608 and Texinfo syntax a bit, to try to make it clearer.
10609 (Bison Options, Option Cross Key): Mention --print-localedir.
10610 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10611 YYENABLE_NLS. Quote a bit more.
10612 * runtime-po/.cvsignore: New file.
10613 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10614 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10615 * runtime-po/quot.sed: Likewise.
10616 * runtime-po/boldquot.sed: Likewise.
10617 * runtime-po/en@quot.header: Likewise.
10618 * runtime-po/en@boldquot.header: Likewise.
10619 * runtime-po/insert-header.sin: Likewise.
10620 * runtime-po/remove-potcdate.sin: Likewise.
10621 * runtime-po/Makevars: Likewise.
10622 * runtime-po/LINGUAS: Likewise.
10623 * runtime-po/de.po: Likewise; we will rely on the translation project
10624 to maintain this, so "bootstrap" should get it.
10625 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10626 its value.
10627 * src/main.c (main): Bind the bison-runtime domain, too.
10628
10629 2005-07-12 Bruno Haible <bruno@clisp.org>
10630
10631 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10632 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10633 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10634 * runtime-po: New directory.
10635 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10636 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10637 * runtime-po/Rules-quot: New file, copied from po/.
10638 * runtime-po/quot.sed: Likewise.
10639 * runtime-po/boldquot.sed: Likewise.
10640 * runtime-po/en@quot.header: Likewise.
10641 * runtime-po/en@boldquot.header: Likewise.
10642 * runtime-po/insert-header.sin: Likewise.
10643 * runtime-po/remove-potcdate.sin: Likewise.
10644 * runtime-po/Makevars: New file.
10645 * runtime-po/POTFILES.in: New file.
10646 * runtime-po/LINGUAS: New file.
10647 * runtime-po/bison-runtime.pot: New file.
10648 * runtime-po/de.po: New file.
10649 * m4/bison.m4: New file.
10650 * Makefile.am (SUBDIRS): Add runtime-po.
10651 (aclocaldir, aclocal_DATA): New variables.
10652 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10653 Define aclocaldir.
10654 * src/getargs.c (usage): Document --print-localedir option.
10655 (PRINT_LOCALEDIR_OPTION): New enum item.
10656 (long_options): Add --print-localedir option.
10657 (getargs): Handle --print-localedir option.
10658 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10659 (Internationalization): New section.
10660
10661 2005-07-12 Akim Demaille <akim@epita.fr>
10662
10663 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10664 for consistency with the rest of the code.
10665 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10666 Add separators.
10667
10668 2005-07-12 Akim Demaille <akim@epita.fr>
10669
10670 * src/parse-gram.y: Use %printer instead of YYPRINT.
10671
10672 2005-07-12 Akim Demaille <akim@epita.fr>
10673
10674 * src/symtab.h, src/symtab.c (symbol_print): New.
10675 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10676 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10677
10678 2005-07-12 Akim Demaille <akim@epita.fr>
10679
10680 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10681 b4_at_dollar and b4_dollar_dollar.
10682
10683 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10684
10685 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10686 and Pennello's paper.
10687
10688 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10689
10690 * data/yacc.c (yyparse): Undo previous patch. Instead,
10691 set yylsp[0] and yyvsp[0] only if the initial action
10692 sets yylloc and yylval, respectively.
10693
10694 * data/yacc.c (yyparse): In the initial action, set
10695 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10696 This avoids the use of undefined variables if the initial
10697 action does not set yylloc and/or yylval.
10698
10699 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10700
10701 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10702 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10703 Remove from CVS. These files are automatically generated.
10704 * examples/extexi: Clarify that this file is now part of Bison,
10705 not GNU M4, and that it works with any POSIX-compatible Awk.
10706 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10707 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10708 so that we also get calc++-parser.yy. Geneate it.
10709 Use $(AWK), not gawk, since any conforming Awk will do.
10710 Put comment before action, since older 'make' can't handle comment
10711 in action.
10712 $(BUILT_SOURCES): List all built sources, not just some of them.
10713 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10714 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10715 $($(calc_sources_generated)): Remove unnecessary test for existence
10716 of target. (This had a shell syntax error anyway; a stray "x".)
10717 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10718 calc++-parser.yy.
10719 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10720
10721 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10722 implied by the other modules.
10723
10724 2005-07-06 Akim Demaille <akim@epita.fr>
10725
10726 Bind examples/calc++ to the package.
10727 * examples/calc++/Makefile: Remove, replaced by...
10728 * examples/calc++/Makefile.am: ... this new file.
10729 * examples/calc++/test: Remove input.
10730 * examples/calc++/compile: Remove.
10731 * examples/Makefile.am: New.
10732 * configure.ac, Makefile.am: Adjust.
10733 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10734
10735 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10736
10737 * data/glr.c (yyFail): Drastically simplify; since the format argument
10738 never had any % directives, we can simply pass it to yyerror.
10739 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10740 be modified later, as that is the usual style in glr.c.
10741 Problems reported by Paul Hilfinger.
10742
10743 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10744 and size overflow errors.
10745 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10746 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10747 (YYSIZEMAX): New macro.
10748 (yystpcpy): New function, taken from yacc.c.
10749 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10750 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10751 so that we don't have to maintain their signatures.
10752 (yyFail): Check for buffer overflow, by using vsnprintf rather
10753 than vsprintf. Allocate a bigger buffer if possible.
10754 Report an error if buffer allocation fails.
10755 (yyStackOverflow): New function.
10756 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10757 the initialization was successful. It might fail if storage was
10758 exhausted.
10759 (yyexpandGLRStack): Add more checks for storage allocation failure.
10760 Use yyStackOverflow to report failures.
10761 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10762 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10763 Don't assume stack number fits in int.
10764 (yysplitStack): Check for storage allocation failure.
10765 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10766 can print diagnostics on storage allocation failure. All callers
10767 changed.
10768 (yyresolveValue): Use yybool for boolean.
10769 (yyreportSyntaxError): Check for size-calculation overflow.
10770 This code is taken from yacc.c.
10771 (yyparse): Check for storage allocation errors when allocating
10772 the initial stack.
10773
10774 2005-07-05 Akim Demaille <akim@epita.fr>
10775
10776 Extract calc++ from the documentation.
10777 * doc/bison.texinfo (Calc++): Add the extraction marks.
10778 * examples/extexi: New, from the aborted GNU Programming 2E.
10779 Separate the different paragraph of a file with empty lines.
10780 * examples/Makefile: Use it to extract the whole calc++ example.
10781
10782 2005-06-24 Akim Demaille <akim@epita.fr>
10783
10784 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10785 class typedefs.
10786
10787 2005-06-22 Akim Demaille <akim@epita.fr>
10788
10789 * doc/bison.texinfo (C++ Language Interface): First stab.
10790 (C++ Parsers): Remove.
10791
10792 2005-06-22 Akim Demaille <akim@epita.fr>
10793
10794 * data/lalr1.cc (yylex_): Honor %lex-param.
10795
10796 2005-06-22 Akim Demaille <akim@epita.fr>
10797
10798 Start a set of simple examples.
10799 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10800 * examples/calc++/calc++-driver.hh,
10801 * examples/calc++/calc++-parser.yy,
10802 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10803 * examples/calc++/compile, examples/calc++/test: New.
10804
10805 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10806
10807 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10808 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10809 which stems from the 2005-05-27 patch.
10810
10811 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10812
10813 * data/glr.c: Modify treatment of unused parameters to permit use
10814 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10815
10816 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10817
10818 Fix infringement on user name space reported by Janos Zoltan Szabo.
10819 * data/yacc.c (yyparse): strlen -> yystrlen.
10820
10821 2005-05-30 Akim Demaille <akim@epita.fr>
10822
10823 * data/lalr1.cc (_): New.
10824 Translate the various messages.
10825
10826 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10827
10828 Fix infringement on user name space reported by Bruno Haible.
10829 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10830 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10831 the user's name space.
10832 (alloca): Include <stdlib.h> to get it, if it's not built in.
10833 (YYMALLOC, YYFREE): Define only if needed.
10834 (malloc, free): Declare, but only if needed, as this infringes on
10835 the user name space.
10836
10837 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10838
10839 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10840 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10841 with %d format.
10842 * lib/ebitset.c (min, max): Undef before defining.
10843 * lib/vbitset.c (min, max): Likewise.
10844 * lib/subpipe.c (create_subpipe): Save local variables in case
10845 vfork clobbers them.
10846
10847 2005-05-24 Bruno Haible <bruno@clisp.org>
10848
10849 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10850 error message syntax used by gcc-4.0.
10851
10852 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10853
10854 * README: Mention m4 1.4.3. Remove obsolete advice about
10855 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10856
10857 * bootstrap: Remove workaround for problem I encountered with
10858 gettext 0.14.1; it seems to be fixed now.
10859
10860 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10861
10862 * NEWS: Version 2.0a.
10863
10864 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10865 the previous change.
10866
10867 Various maintainer cleanups.
10868 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10869 conftest*, for benefit of CVS commands run at the same time as
10870 "configure". Add build-aux, since "bootstrap" now creates it and
10871 its subfiles.
10872 * Makefile.cfg (move_if_change): Remove.
10873 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10874 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10875 (po_repo, do-po-update, po-update, wget_files, get-targets):
10876 (config.guess-url_prefix, config.sub-url_prefix):
10877 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10878 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10879 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10880 Remove.
10881 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10882 this is now the recommended name.
10883 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10884 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10885 ylwrap. These files now go into build-aux.
10886 * config/move-if-change: Remove.
10887 * config/prev-version.txt: Bump from 1.75 to 2.0.
10888
10889 * bootstrap: Add stdio-safer, unistd-safer modules.
10890 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10891 we don't need it).
10892 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10893 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10894 * lib/subpipe.c: Include "unistd-safer.h".
10895 (create_subpipe): Make sure all the newly-created
10896 file descriptors are > 2, so that diagnostics don't
10897 get sent down them (which might cause Bison to hang, in theory).
10898 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10899 * src/files.c (xfopen): Use fopen_safer, not fopen.
10900
10901 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10902 yesterday's yacc.c fix.
10903
10904 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10905
10906 * data/glr.c, data/lalr1.cc: Update copyright date.
10907
10908 Fix a destructor bug reported by Wolfgang Spraul in
10909 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10910 * data/yacc.c (yyabortlab): Don't call destructor, and
10911 don't set yychar to EMPTY.
10912 (yyoverflowlab): Don't call destructor.
10913 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10914 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10915 since we no longer output the message "discarding lookahead token
10916 end of input ()".
10917
10918 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10919
10920 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10921 fix a small glitch in debugging output.
10922 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10923 after YY_SYMBOL_PRINT where needed.
10924
10925 (struct yyGLRState): Add some comments.
10926 (struct yySemanticOption): Add some comments.
10927 (union yyGLRStackItem): Add comment.
10928
10929 (yymergeOptionSets): Correct this to properly perform the union,
10930 avoiding infinite reported by Michael Rosien.
10931 Update comment.
10932
10933 * tests/glr-regression.at: Add test for GLR merging error reported
10934 by M. Rosien.
10935
10936 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10937
10938 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10939 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10940 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10941 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10942 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10943 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10944 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10945 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10946 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10947 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10948 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10949 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10950 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10951 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10952 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10953 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10954 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10955 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10956 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10957 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10958 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10959 src/output.h, src/parse-gram.c, src/parse-gram.h,
10960 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10961 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10962 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10963 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10964 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10965 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10966 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10967 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10968 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10969 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10970 tests/reduce.at, tests/regression.at, tests/sets.at,
10971 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10972 Update FSF postal mail address.
10973
10974 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10975
10976 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10977 Problem reported by Ralf Menzel.
10978
10979 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10980
10981 * tests/actions.at: Test that stack overflow invokes destructors.
10982 From Marcus Holland-Moritz.
10983 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10984 from here....
10985 (yyreturn): to here. That way, destructors are called properly
10986 even if the stack overflows, or the user calls YYACCEPT or
10987 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10988 (yyoverflowlab): Destroy the lookahead.
10989
10990 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10991
10992 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10993
10994 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10995
10996 * NEWS: Bison-generated C parsers no longer quote literal strings
10997 associated with tokens.
10998 * src/output.c (prepare_symbols): Don't escape strings,
10999 since users don't want to see C escapes.
11000 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
11001 in diagnostics.
11002 * tests/input.at (Torturing the Scanner): Likewise.
11003 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
11004
11005 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11006
11007 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11008 the data size is known to be too small and we can't increase it.
11009 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11010
11011 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11012
11013 * src/parse-gram.y: Include quotearg.h.
11014 (string_as_id): Quote $1 before using it as a key, since the
11015 lexer no longer quotes it for us.
11016 (string_content): Don't strip quotes, since lexer no longer
11017 quotes it for us.
11018 * src/scan-gram.l: Include quotearg.h.
11019 ("\""): Omit quote.
11020 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11021 a key, since the rest of the lexer doesn't quote it.
11022 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11023 * tests/regression.at (Token definitions): Check for backslashes
11024 in token strings.
11025
11026 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11027 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11028 (yyparse): Revamp code to generate long syntax error message, to
11029 make it easier to translate, and to avoid problems with arithmetic
11030 overflow. Change "virtual memory" to "memory" in diagnostic, since
11031 we don't know whether the memory is virtual.
11032
11033 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11034
11035 * NEWS: Bison-generated C parsers now use the _ macro to
11036 translate strings.
11037 * data/yacc.c (_) [!defined _]: New macro.
11038 All English strings wrapped inside this macro.
11039 * doc/bison.texinfo (Bison Parser): Document _.
11040 * po/POTFILES.in: Include src/parse-gram.c, since it now
11041 includes translateable strings that parse-gram.y doesn't.
11042
11043 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11044
11045 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11046 reverting the 2004-10-11 change to this function.
11047 (symbol_check_alias_consistency): Don't call symbol_type_set
11048 if the type name is already correct.
11049 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11050
11051 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11052
11053 * tests/regression.at (Token definitions): Don't use a token named
11054 c, as that generates a "#define c ..." that runs afoul of buggy
11055 stdlib.h that uses the identifier c as a member of struct
11056 drand48_data. Problem reported by Horst Wente.
11057
11058 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11059
11060 * bootstrap: Change translation URL from
11061 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11062 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11063 redirection glitches. Problem reported by twlevo@xs4all.nl.
11064
11065 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11066
11067 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11068 after operands; POSIX says this isn't portable for the c99 command.
11069
11070 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11071
11072 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11073 immediately if a data overrun has occurred; this may help us track
11074 down what may be a spurious failure on MacOS.
11075
11076 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11077
11078 Respond to problems reported by twlevo@xs4all.nl.
11079
11080 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11081
11082 * src/vcg.h: Comment fix.
11083 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11084 (G_CMAX): Change to -1 instead of INT_MAX.
11085
11086 * data/yacc.c (yyparse): Omit spaces before #line.
11087
11088 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11089
11090 * src/tables.c (state_number_to_vector_number): Put it inside an
11091 "#if 0", since it's not currently used. Problem reported by
11092 Roland McGrath.
11093
11094 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11095
11096 * src/output.c (escaped_output): Renamed from
11097 escaped_file_name_output, since we now use it for symbol tags as
11098 well. All uses changed.
11099 (symbol_destructors_output, symbol_printers_output):
11100 Escape symbol tags too.
11101 Problem reported by Matyas Forstner in
11102 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11103
11104 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11105 not needed.
11106 * src/output.c (user_actions_output, token_definitions_output,
11107 symbol_destructors_output, symbol_printers_output): Likewise.
11108 * src/reader.c (prologue_augment): Likewise.
11109 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11110
11111 * src/vcg.c (output_edge): Don't quote linestyle arg.
11112 Problem reported by twlevo@xs4all.nl.
11113
11114 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11115
11116 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11117 example, reported by Derek M Jones. Also, make the example even
11118 more outrageous, to better illustrate how bad the problem is.
11119
11120 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11121
11122 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11123 putsym. Typo reported by Sebastian Piping.
11124
11125 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11126
11127 * doc/bison.texinfo (Language and Grammar): some -> same
11128 (Epilogue): int he -> in the
11129 Typos reported by Sebastian Piping via Justin Pence.
11130
11131 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11132
11133 * tests/glr-regression.at (Improper handling of embedded actions
11134 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11135 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11136 with dollar signs in test names.
11137 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11138 for a similar reason.
11139
11140 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11141
11142 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11143 wants to redefine G_VIEW.
11144
11145 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11146
11147 * src/vcg.c (get_view_str): Remove case for normal_view.
11148 Problem reported by twlevo@xs4all.nl.
11149
11150 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11151
11152 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11153 Problem reported by twlevo@xs4all.nl.
11154
11155 * doc/bison.texinfo: Change @dircategory from "GNU programming
11156 tools" to "Software development". Requested by Richard Stallman
11157 via Karl Berry.
11158
11159 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11160
11161 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11162 Problem reported by twlevo@xs4all.nl.
11163
11164 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11165
11166 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11167 keyword; it's not needed with modern compilers, and it doesn't
11168 affect correctness with older compilers. Suggested by
11169 twlevo@xs4all.nl.
11170
11171 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11172
11173 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11174 gcc -Wswitch-default.
11175 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11176 * data/yacc.c (yyparse): Likewise.
11177
11178 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11179
11180 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11181 already. Let config.h define any nonstandard values.
11182
11183 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11184
11185 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11186 for the benefit of slower hosts. Problem reported by
11187 Nelson H. F. Beebe.
11188
11189 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11190
11191 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11192 being defined and not used.
11193 * data/lalr1.cc (yyparse): Likewise.
11194 Use "if (false)" rather than "if (0)".
11195
11196 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11197
11198 * TODO: Mention that we should allow NUL bytes in tokens.
11199
11200 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11201
11202 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11203 Problem reported by Hans Aberg.
11204
11205 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11206
11207 * src/getargs.c (version): Happy new year; update overall
11208 program copyright date from 2004 to 2005.
11209
11210 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11211 Problem reported by Hans Aberg.
11212 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11213 (Output file names.): Add a test for the case when standard output
11214 is closed.
11215
11216 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11217
11218 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11219 to fix an oversight in the Bison 2.0 manual.
11220
11221 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11222
11223 * NEWS: Version 2.0. Reformat the existing news items since
11224 1.875, so that related items are grouped together.
11225 * configure.ac (AC_INIT): Bump version to 2.0.
11226 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11227
11228 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11229 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11230 otherwise, we're not testing alloca. Unfortunately there's no
11231 simple way to consult HAVE_ALLOCA here.
11232
11233 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11234 for yymsg, too.
11235
11236 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11237 hand. This avoids a warning about comparing int to size_t when
11238 GCC warnings are enabled.
11239
11240 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11241
11242 * NEWS: Bison-generated parsers no longer default to using the
11243 alloca function (when available) to extend the parser stack, due
11244 to widespread problems in unchecked stack-overflow detection.
11245 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11246 responsibility to set it to a positive value. This lets the user
11247 specify a value that is not a preprocessor constant.
11248 * data/yacc.c (YYMAXDEPTH): Likewise.
11249 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11250 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11251 to be a compile-time constant. However, explain the constraints on it.
11252 Also, explain the constraints on YYINITDEPTH.
11253 (Table of Symbols): Explain that alloca is no longer the default.
11254 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11255 to 1.
11256
11257 * doc/bison.texinfo (Location Default Action): Mention that n must
11258 be zero when k is zero. Suggested by Frank Heckenbach.
11259
11260 2004-12-22 Akim Demaille <akim@epita.fr>
11261
11262 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11263 (parser::state_type, parser::semantic_type, parser::location_type):
11264 Private, not public.
11265 (parser::parse): Return ints, not bool.
11266 Returning a bool introduces a problem: 0 corresponds to false, and
11267 it seems weird to return false on success. Returning true changes
11268 the conventions for yyparse.
11269 Alternatively we could return void and send an exception.
11270 There is no clear consensus (yet?).
11271 (state_stack, semantic_stack, location_stack): Rename as...
11272 (state_stack_type, semantic_stack_type, location_stack_type): these.
11273 Private, not public.
11274 * tests/c++.at: New.
11275 * tests/testsuite.at, tests/Makefile.am: Adjust.
11276
11277 2004-12-21 Akim Demaille <akim@epita.fr>
11278
11279 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11280
11281 2004-12-21 Akim Demaille <akim@epita.fr>
11282
11283 Don't impose std::string for filenames.
11284
11285 * data/lalr1.cc (b4_filename_type): New.
11286 (position::filename): Use it.
11287 (parser.hh): Move the inclusion of stack.hh and location.hh below
11288 the user code, so that needed headers for the filename type can be
11289 included first.
11290 Forward declare them before the user code.
11291 * tests/Makefile.am (check-local, installcheck-local): Pass
11292 TESTSUITEFLAGS to the TESTSUITE.
11293
11294 2004-12-20 Akim Demaille <akim@epita.fr>
11295
11296 Use more STL like names: my_class instead of MyClass.
11297
11298 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11299 (SemanticStack, SemanticType, StateStack, StateType)
11300 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11301 (Parser::value): Rename as...
11302 (location_stack, location_type, rhs_number_type, semantic_stack)
11303 (semantic_type, state_stack, state_type, token_number_type, stack)
11304 (slice, traits, parser::yylloc, parser::yylval): these.
11305
11306 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11307
11308 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11309
11310 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11311 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11312
11313 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11314
11315 Remove uses of 'short int' and 'unsigned short int'. This raises
11316 some arbitrary limits. It uses more memory but nowadays that's
11317 not much of an issue.
11318
11319 This change does not affect the generated parsers; that's a different
11320 task, as some users will want to conserve memory there.
11321
11322 Ideally we should use size_t to represent all object counts, and
11323 something like ptrdiff_t to represent signed differences of object
11324 counts; but that will require more code-cleanup than I have the
11325 time to do right now.
11326
11327 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11328 Use size_t, not int or short int, to count objects.
11329 * src/closure.c (nritemset, closure): Likewise.
11330 * src/closure.h (nritemset, closure): Likewise.
11331 * src/nullable.c (nullable_compute): Likewise.
11332 * src/print.c (print_core): Likewise.
11333 * src/print_graph.c (print_core): Likewise.
11334 * src/state.c (state_compare, state_hash): Likewise.
11335 * src/state.h (struct state): Likewise.
11336 * src/tables.c (default_goto, goto_actions): Likewise.
11337
11338 * src/gram.h (rule_number, rule): Use int, not short int.
11339 * src/output.c (prepare_rules): Likewise.
11340 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11341 errs, reductions): Likewise.
11342 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11343 Likewise.
11344 * src/tables.c (vector_number, tally, action_number,
11345 ACTION_NUMBER_MINIMUM): Likewise.
11346 * src/output.c (muscle_insert_short_int_table): Remove.
11347
11348 2004-12-17 Akim Demaille <akim@epita.fr>
11349
11350 * data/lalr1.cc: Extensive Doxygenation.
11351 (error_): Rename as...
11352 (error): this, since it is visible to the user.
11353 Adjust callers.
11354 (Parser::message): Now an automatic variable from...
11355 (Parser::yyreport_syntax_error_): here.
11356 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11357 Parser::error.
11358 * tests/input.at: Escape $.
11359
11360 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11361
11362 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11363 Parenthesize rhs to avoid obscure problems with mistakes like
11364 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11365 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11366 b4_rhs_location): Likewise.
11367 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11368 b4_rhs_location): Likewise.
11369
11370 2004-12-16 Akim Demaille <akim@epita.fr>
11371
11372 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11373 yacc.c: be sure to stay within yycheck_.
11374 * tests/actions.at: Re-enable C++ tests.
11375
11376 2004-12-16 Akim Demaille <akim@epita.fr>
11377
11378 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11379 real.
11380
11381 2004-12-16 Akim Demaille <akim@epita.fr>
11382
11383 Use #define to handle the %name-prefix.
11384
11385 * data/glr.c, data/yacc.c: Comment changes.
11386 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11387 so that one can refer to yylex in the parser file, and have it
11388 renamed, as is the case with other skeletons.
11389
11390 2004-12-16 Akim Demaille <akim@epita.fr>
11391
11392 Move lalr1.cc internals into yy*.
11393
11394 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11395 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11396 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11397 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11398 (empty_, final_, terror_, errcode_, ntokens_)
11399 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11400 (looka_, ilooka_, error_range_, nerrs_):
11401 Rename as...
11402 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11403 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11404 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11405 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11406 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11407 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11408 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11409 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11410 these.
11411
11412 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11413
11414 Fix some problems reported by twlevo at xs4all.
11415 * src/symtab.c (symbol_new): Report an error if the input grammar
11416 contains too many symbols. This is better than calling abort() later.
11417 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11418 (struct node, struct graph):
11419 Rename member expand to stretch. All uses changed.
11420 (struct graph): Remove member layoutalgorithm. All uses removed.
11421 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11422 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11423 All uses changed.
11424 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11425
11426 2004-12-15 Akim Demaille <akim@epita.fr>
11427
11428 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11429 Add more Doxygen comments.
11430 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11431 (report_syntax_error_, translate_): Rename as...
11432 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11433 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11434
11435 2004-12-15 Akim Demaille <akim@epita.fr>
11436
11437 * data/lalr1.cc (lex_): Rename as...
11438 (yylex_): this.
11439 Move the trace here.
11440 Take the %name-prefix into account.
11441 Reported by Alexandre Duret-Lutz.
11442
11443 2004-12-15 Akim Demaille <akim@epita.fr>
11444
11445 Simplify the C++ parser constructor.
11446
11447 * data/lalr1.cc (debug_): Rename as...
11448 (yydebug_): so that the parser's internals are always in the yy*
11449 pseudo namespace.
11450 Adjust uses.
11451 (b4_parse_param_decl): Remove the leading comma as it is now only
11452 called as unique argument list.
11453 (Parser::Parser): Remove the constructor accepting a location and
11454 an initial debugging level.
11455 Remove from the other ctor the argument for the debugging level.
11456 (debug_level_type, debug_level, set_debug_level): New.
11457
11458 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11459 constructor calls.
11460
11461 2004-12-15 Akim Demaille <akim@epita.fr>
11462
11463 Remove b4_root related material: failure experiment
11464 (which goal was to allow to derive from a class).
11465
11466 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11467 definitions and uses.
11468
11469 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11470
11471 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11472 not 2, since it's not portable to subtract 1 from the start of an
11473 array. The new item 0 is never set or used. All uses changed.
11474
11475 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11476 the default definition of YYLLOC_DEFAULT. Problem reported
11477 by Frank Heckenbach.
11478
11479 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11480
11481 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11482 the normal case and one for the error case. Just use the
11483 first one uniformly. Problem reported by Frank Heckenbach.
11484 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11485 use exactly the same macro in both places.
11486 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11487 so that the normal-case YYRHSLOC works for the error case too.
11488 All uses changed.
11489 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11490 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11491 * doc/bison.texinfo (Location Default Action): Don't claim that
11492 we have an array of locations. Use the same macro for both glr
11493 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11494 the index is 0.
11495
11496 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11497
11498 * HACKING: Update email addresses to send announcements to.
11499
11500 * configure.ac (AC_INIT): Bump version to 1.875f.
11501
11502 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11503
11504 * NEWS: Version 1.875e.
11505 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11506
11507 * src/scan-skel.l: Include "complain.h", for "fatal".
11508
11509 * src/relation.h (relation_print, relation_digraph):
11510 Relation sizes are of type relation_node, not size_t (this is
11511 merely a doc fix, since the two types are equivalent).
11512 (relation_transpose): Relation sizes are of type relation_node,
11513 not int.
11514 * src/relation.c: Likewise.
11515 (top, infinity): Now of type relation_node, not int.
11516 (traverse, relation_transpose): Use relation_node, not int.
11517
11518 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11519 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11520 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11521
11522 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11523 specifying whether the test should be skipped. Use it tp
11524 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11525 fail on some hosts, and should be skipped.
11526
11527 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11528
11529 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11530 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11531 unless otherwise specified below.
11532
11533 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11534 to allocate kernel_base, kernel_items, kernel_size, since
11535 they needn't be initialized to 0.
11536 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11537 * src/closure.c (new_closure): Likewise, for itemset.
11538 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11539 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11540 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11541 (build_relations): Likewise for edge, states1, includes.
11542 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11543 * src/reader.c (packgram): Likewise, for ritem, rules.
11544 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11545 * src/relation.c (relation_digraph): Likewise for VERTICES.
11546 (relation_transpose): Likewise for new_R, end_R.
11547 * src/symtab.c (symbols_token_translations_init): Likewise for
11548 token_translations.
11549 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11550 (token_actions): Likewise for yydefact, actrow, conflrow,
11551 conflict_list.
11552 (save_column): Likewise for froms[symno], tos[symno].
11553 (goto_actions): Likewise for state_count.
11554 (pack_table): Likewise for base, pos, check.
11555 (tables_generate): Likewise for width.
11556
11557 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11558 for initial core. Just have a separate core, so we needn't worry
11559 about whether kernel_size and kernel_base are initialized.
11560
11561 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11562 kernel_size, kernel_items): Remove unnecessary initialization.
11563 * src/conflicts.c (conflicts): Likewise.
11564 * src/derives.c (derives): Likewise.
11565 * src/muscle_tablc (muscle_insert): Likewise.
11566 * src/relation.c (relation_digraph): Likewise.
11567 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11568 conflrow, conflict_table, conflict_list, table, check):
11569 Likewise.
11570
11571 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11572 This is because all callers pass unsigned int.
11573 * src/closure.h (new_closure): Likewise.
11574
11575 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11576 (build_relations): Initialize includes[i] in all cases.
11577 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11578 and rules[ruleno].precsym. Initialize members in order.
11579 * src/relation.c (relation_transpose): Always initialize new_R[i]
11580 and end_R[i].
11581 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11582
11583 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11584 conflict_list[0] was always 0, but now it isn't initialized.
11585
11586 * src/table.c (table_grow): When conflict_table grew, the grown
11587 area wasn't cleared. Fix this.
11588
11589 * lib/.cvsignore: Add strdup.c, strdup.h.
11590 * m4/.cvsignore: Add strdup.m4.
11591
11592 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11593
11594 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11595 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11596 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11597 ngotos + 1 without checking for overflow.
11598 (build_relations): Use END_NODE, not -1, to denote end of edges.
11599 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11600 build_relations): Use goto_number, not int, for goto numbers.
11601 * src/tables.c (save_column, default_goto): Likewise.
11602
11603 2004-11-23 Akim Demaille <akim@epita.fr>
11604
11605 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11606 of #defining from yystype.
11607 Don't typedef yystype, C++ does not need it.
11608 This lets it possible to forward declare it as union.
11609
11610 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11611
11612 * bootstrap (gnulib_modules): Add extensions.
11613 Problem reported by Jim Meyering.
11614
11615 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11616
11617 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11618 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11619 src/system.h, src/tables.c: XFREE -> free, to accommodate
11620 recent change to gnulib xalloc.h.
11621 Problem reported by Jim Meyering.
11622
11623 2004-11-17 Akim Demaille <akim@epita.fr>
11624
11625 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11626
11627 2004-11-17 Akim Demaille <akim@epita.fr>,
11628 Alexandre Duret-Lutz <adl@gnu.org>
11629
11630 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11631 changes.
11632 (YYCDEBUG): Adjust.
11633 Use it instead of cdebug_.
11634 (Parser::debug_stream, Parser::set_debug_stream): New.
11635 (Parser::symprint_): Define cdebug_ for temporary backward
11636 compatibility.
11637 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11638 debug_stream ().
11639
11640 2004-11-17 Akim Demaille <akim@epita.fr>
11641
11642 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11643 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11644 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11645 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11646
11647 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11648
11649 * data/glr.c (yyloc_default): Remove; not used.
11650 Problem reported by Frank Heckenbach.
11651
11652 2004-10-25 Akim Demaille <akim@epita.fr>
11653
11654 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11655 Introduce another definition to address simple location arrays.
11656 (yyGLRStack): New member: yyerror_range.
11657 (yyrecoverSyntaxError, yyparse): Update it.
11658 (yyrecoverSyntaxError): Use it when shifting the error token to
11659 have an accurate range, equivalent to the one computed by both
11660 yacc.c and lalr1.cc.
11661 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11662 that column numbers start at column 0, as per GNU Coding
11663 Standards, the others tests, and the doc.
11664 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11665 Adjust to the above change (first column is 0).
11666 And adjust the location of the "<error>", now covering the whole
11667 line.
11668
11669 2004-10-22 Akim Demaille <akim@epita.fr>
11670 and Paul Eggert <eggert@cs.ucla.edu>
11671
11672 Remove some arbitrary limits on goto numbers and relations.
11673 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11674 initial values, since they're never used.
11675 (set_goto_map): ngotos is now unsigned, so test for overflow
11676 by seeing whether it wraps around to zero.
11677 * src/lalr.h (goto_number): Now size_t, not short int.
11678 (GOTO_NUMBER_MAXIMUM): Remove.
11679 * src/relation.c (relation_print, traverse, relation_transpose):
11680 Check for END_NODE rather than looking at sign.
11681 * src/relation.h (END_NODE): New macro.
11682 (relation_node): Now size_t, not short int.
11683
11684 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11685
11686 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11687 keyword, not an identifier. Problem reported by Baron Schwartz in
11688 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11689
11690 2004-10-11 Akim Demaille <akim@epita.fr>
11691
11692 * src/symtab.c (symbol_check_alias_consistency): Also check
11693 type names, destructors, and printers.
11694 Reported by Alexandre Duret-Lutz.
11695 Recode the handling of associativity and precedence in terms
11696 of symbol_precedence_set.
11697 Accept no redeclaration at all, not even equal to the previous
11698 value.
11699 (redeclaration): New.
11700 Use it to factor redeclaration complaints.
11701 (symbol_make_alias): Don't set the type of the alias, let
11702 symbol_check_alias_consistency do it as for other features.
11703 * src/symtab.h (symbol): Add new member prec_location, and
11704 type_location.
11705 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11706 * tests/input.at (Incompatible Aliases): New.
11707
11708 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11709
11710 .cvsignore fixes to accommodate gnulib changes,
11711 and the practice of naming build directories "_build".
11712 * .cvsignore: Add "_*". Sort.
11713 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11714 * m4/.cvsignore: Add "*_gl.m4".
11715
11716 2004-10-06 Akim Demaille <akim@epita.fr>
11717
11718 * src/parse-gram.y (add_param): Fix the truncation of trailing
11719 spaces.
11720
11721 2004-10-05 Akim Demaille <akim@epita.fr>
11722
11723 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11724 whether the reducion was empty or not. This leaves room to
11725 improve the use of YYLLOC_DEFAULT in such a case.
11726 lalr1.cc is still experimental, so changing this is acceptable.
11727 And finally, there are probably not many users who changed the
11728 handling of locations in GLR, so changing is admissible too.
11729
11730 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11731 empty reduction, set @$ to an empty location ending the previously
11732 stacked symbol.
11733 Adjust uses to make sure the code is triggered on empty
11734 reductions.
11735 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11736 expected output: empty reductions have empty locations.
11737
11738 2004-09-29 Akim Demaille <akim@epita.fr>
11739
11740 * data/lalr1.cc: Move towards a more standard C++ coding style
11741 for templates: Class < T > -> Class<T>.
11742
11743 2004-09-29 Akim Demaille <akim@epita.fr>
11744
11745 * data/lalr1.cc: Reinstall the former ctor, for sake of
11746 compatibility, but warn it will be removed.
11747 Move towards a more standard C++ coding style (i.e., type *var ->
11748 type* var).
11749
11750 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11751
11752 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11753 since it's less likely to work if NULs are involved in the future.
11754
11755 2004-09-27 Akim Demaille <akim@epita.fr>
11756
11757 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11758
11759 2004-09-27 Akim Demaille <akim@epita.fr>
11760
11761 * data/lalr1.cc (b4_parse_param_decl_1): New.
11762 (b4_parse_param_decl): Use it to have different names between attribute
11763 and argument names.
11764 (b4_cc_constructor_call): Likewise.
11765
11766 2004-09-24 Akim Demaille <akim@epita.fr>
11767
11768 * src/parse-gram.y (add_param): Strip the leading and trailing
11769 blanks from a formal argument declaration.
11770 (YY_LOCATION_PRINT): New.
11771
11772 2004-09-24 Akim Demaille <akim@epita.fr>
11773
11774 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11775 after the location.
11776
11777 2004-09-24 Akim Demaille <akim@epita.fr>
11778
11779 * doc/bison.texinfo (Table of Symbols): Sort.
11780
11781 2004-09-21 Akim Demaille <akim@epita.fr>
11782
11783 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11784 the useless parentheses.
11785 Suggested by Paul Eggert.
11786
11787 2004-09-20 Akim Demaille <akim@epita.fr>
11788
11789 Let the initial-action act on the look-ahead, and use it for the
11790 "initial push" (corresponding to an hypothetical beginning-of-file).
11791 And let lalr1.cc honor %initial-action.
11792
11793 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11794 example.
11795 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11796 (Parser::Parser): Remove the ctor that used to initialize it.
11797 (Parser::parse): Like in the other skeletons, issue the "starting
11798 parse" message before any action.
11799 Honor %initial-action.
11800 Initialize the stacks with the lookahead.
11801 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11802 look-ahead.
11803 Push them in the stacks.
11804 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11805
11806 2004-09-20 Akim Demaille <akim@epita.fr>
11807
11808 * doc/bison.texinfo (Initial Action Decl): New.
11809
11810 2004-09-20 Akim Demaille <akim@epita.fr>
11811
11812 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11813 clearer criterion to define it.
11814 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11815 When reducing on an empty RHS, use the latest stacked location as
11816 location.
11817 yylloc is not always available.
11818 * data/glr.c: Likewise.
11819 Also, honor initial-actions.
11820
11821 2004-09-20 Akim Demaille <akim@epita.fr>
11822
11823 * data/yacc.c (YY_LOCATION_PRINT): New.
11824 Define when we know YYLTYPE's structure, i.e., when the default
11825 YYLLOC_DEFAULT is used.
11826 * data/c.m4 (b4_yysymprint_generate): Use it.
11827 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11828 value of the result.
11829 (error_start_): Replace with...
11830 (error_range_): this location array.
11831 This allows to replace code relying on the implementation of
11832 locations by portable code.
11833 * data/yacc.c (yylerrsp): Replace with...
11834 (yyerror_range): this.
11835 Every time a token is popped, update yyerror_range[0], to have an
11836 accurate location for the error token.
11837 * data/glr.c (YY_LOCATION_PRINT): New.
11838 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11839 deference a pointer.
11840 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11841 report the location in %printers.
11842
11843 * src/scan-skel.l: Instead of abort, report error messages to ease
11844 understanding skeleton scanning failures.
11845
11846 2004-09-16 Akim Demaille <akim@epita.fr>
11847
11848 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11849 (iterator, const_iterator): these, to be more in the C++ spirit.
11850 Also, return reverse iterators so that when displaying the stack
11851 we display its bottom first.
11852 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11853 from yacc.c.
11854 We should probably use vector here though.
11855
11856 2004-09-16 Akim Demaille <akim@epita.fr>
11857
11858 Have more complete shift traces.
11859
11860 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11861 to report Shifts instead of ad hoc YYDPRINTF invocations,
11862 including for the error token.
11863 * data/lalr1.cc (symprint_): Output the location.
11864 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11865 output the location within the %printer.
11866 Activate GLR tests, at least to make sure they compile properly.
11867 They still don't pass though.
11868 * tests/calc.at: Adjust expect verbose output, since now "Entering
11869 state..." is on a different line than the "Shifting" message.
11870
11871 2004-09-08 Akim Demaille <akim@epita.fr>
11872
11873 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11874 Bison directive from the Bison file to the invocation of this
11875 macro, so that these directives are passed to
11876 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11877 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11878 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11879 the extra Bison directives instead of the whole series.
11880 Change the grammar so that there are recoverable errors, and
11881 unrecoverable errors. Now we can have the parser give up before
11882 consuming the whole input. As a result we now can observe that
11883 the lookahead is freed when needed.
11884 Change the parser source to parse argv[1] instead of a hard coded
11885 string.
11886 Simplify yylex, and give a value and location to EOF.
11887 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11888 passed directives already coded in the file.
11889 Add some tests to check the location of "error".
11890 For some tests, the C++ parser is correct, and not yacc.c.
11891 For other tests, they provide different, but unsatisfying, values,
11892 so keep the C++ value so that at least one parser is "correct"
11893 according to the test suite.
11894 (Actions after errors): Remove, this is subsumed by the
11895 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11896
11897 2004-09-06 Akim Demaille <akim@epita.fr>
11898
11899 * data/lalr1.cc: Adjust the indentation of the labels.
11900 (Parser::pop): New.
11901 Use it.
11902
11903 2004-09-06 Akim Demaille <akim@epita.fr>
11904
11905 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11906 argument, an informative message.
11907 Call YY_SYMBOL_PRINT.
11908 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11909 * data/lalr1.cc (destruct_): Likewise.
11910 In addition, no longer depend on b4_yysymprint_generate and
11911 b4_yydestruct_generate to generate these functions, do it "by
11912 hand".
11913
11914 2004-09-03 Akim Demaille <akim@epita.fr>
11915
11916 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11917 invoked, yydestruct the lookahead.
11918 * tests/calc.at (Calculator $1): Update the expected lengths of
11919 traces: there is an added line for the discarded lookahead.
11920 * doc/bison.texinfo (Destructor Decl): Some rewording.
11921 Define "discarded" symbols.
11922
11923 2004-09-02 Akim Demaille <akim@epita.fr>
11924
11925 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11926
11927 2004-09-02 Akim Demaille <akim@epita.fr>
11928
11929 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11930 (YYDSYMPRINTF): Rename as...
11931 (YY_SYMBOL_PRINT): this.
11932 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11933 two.
11934 Use it instead of direct symprint_ calls.
11935 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11936 one.
11937
11938 2004-09-02 Akim Demaille <akim@epita.fr>
11939
11940 * data/lalr1.cc (b4_yysymprint_generate): New.
11941 (symprint_): New member function, defined when YYDEBUG.
11942 Use it consistently instead of token/nterm debugging output by
11943 hand.
11944 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11945 %printer calls to use cdebug_ when using lalr1.cc.
11946
11947 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11948
11949 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11950 with #ifdef YYDEBUG.
11951
11952 2004-08-26 Akim Demaille <akim@epita.fr>
11953
11954 * doc/bison.texinfo (Implementing Loops): Rename as...
11955 (Implementing Gotos/Loops): this.
11956
11957 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11958
11959 Adjust to latest gnulib.
11960 * bootstrap (gnulib_modules): Add xalloc-die.
11961 Set LC_ALL=C so that file names sort consistently.
11962 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11963 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11964 uintmax_t.m4, ulonglong.m4.
11965 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11966 po.m4 since we are now using _gl.m4 instead.
11967
11968 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11969
11970 * src/scan-action.l: Remove. Scanning of semantic actions is
11971 handled in scan-gram.l.
11972
11973 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11974
11975 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11976
11977 * src/location.h (struct): The file member is a uniqstr.
11978 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11979
11980 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11981
11982 Fix bug with non-%union parsers that have printers or destructors,
11983 which led to a Bison core dump. Reported by Peter Fales in
11984 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11985
11986 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11987 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11988 not to our own type.
11989 * src/output.c (symbol_destructors_output, symbol_printers_output):
11990 Don't assume %union.
11991 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11992 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11993 UNION-FLAG. All callers changed.
11994 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11995 Use type char, not unsigned int, when declaring an array of char;
11996 this lets us remove a cast.
11997 (Printers and Destructors): Add non-%union test cases.
11998
11999 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12000
12001 * doc/bison.texinfo: Minor editorial changes, mostly to the new
12002 GLR writeups. E.g., avoid frenchspacing and the future tense,
12003 change "lookahead" to "look-ahead", and change "wrt" to "with
12004 respect to".
12005
12006 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12007
12008 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12009 New sections, split off from the GLR Parsers section. Put the new
12010 Simple GLR Parser near the start of the GLR section, for clarity.
12011 Rewrite connective text.
12012
12013 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
12014
12015 * doc/bison.texinfo (Simple GLR Parsers): New section.
12016
12017 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12018
12019 * NEWS, TODO, doc/bison.texinfo:
12020 Use "look-ahead" instead of "lookahead", to be consistent.
12021 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12022 while we're fixing "look-ahead".
12023 * src/conflicts.c (shift_set): Renamed from shiftset.
12024 (look_ahead_set): Renamed from lookaheadset.
12025 * src/print.c: Likewise.
12026 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12027 name for "lookahead".
12028 (report_types, usage): Likewise.
12029 * src/getargs.h (report_look_ahead_tokens): Renamed from
12030 report_lookaheads.
12031 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12032 compute_lookaheads.
12033 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12034 (look_ahead_tokens_print): Renamed from lookaheads_print.
12035 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12036 state_rule_lookaheads_print.
12037 * src/state.h: Likewise.
12038 (reductions.look_ahead_tokens): Renamed from lookaheads.
12039 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12040 AT_DATA_LOOKAHEADS_GRAMMAR.
12041
12042 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12043
12044 * README: Update location of patched M4 distribution.
12045
12046 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12047
12048 Don't assume the C++ compiler takes the same arguments as the C compiler
12049 (trivial change).
12050 * configure.ac (O0CXXFLAGS): New var.
12051 * tests/atlocal.in (CXXFLAGS): Use it.
12052
12053 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12054
12055 Fix some "make check" problems with C++ reported by
12056 Albert Chin-A-Young for Tru64 C++ in this thread:
12057 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12058
12059 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12060 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12061 Output to a .cc file for C++, not to a .c file.
12062 * tests/calc.at (AT_CHECK_CALC): Likewise.
12063 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12064 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12065
12066 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12067
12068 * tests/calc.at, tests/actions.at: Workaround for SGI
12069 C++ compiler. (trivial change)
12070
12071 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12072
12073 Spent a few hours checking out which prerequisite versions the
12074 current sources actually require. I went all the way back to
12075 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12076 a seemingly endless set of combinations of versions more recent
12077 than that. The bottom line is that the current sources require
12078 fairly recent versions of the build tools, and it'll be some work
12079 to change this.
12080 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12081 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12082 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12083 Add comments explaining why those particular versions are
12084 currently needed.
12085
12086 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12087 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
12088 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
12089
12090 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12091 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12092
12093 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12094
12095 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12096 0.11.5. Suggested by Bruno Haible.
12097 * bootstrap: Remove gettext version checking.
12098
12099 * doc/bison.texinfo (Decl Summary): Also mention that %union
12100 can depend on prerequisite types. Problem reported by Tim
12101 Van Holder.
12102
12103 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12104
12105 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12106 * README-alpha: Don't tell people not to package this.
12107
12108 * bootstrap: Don't assume $(...) works; use `...` instead.
12109 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12110 gettext better.
12111
12112 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12113 put into the -d output file, and mention what to do if YYSTYPE is
12114 defined as a macro.
12115
12116 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12117
12118 Undo change made earlier today: it caused autopoint to not bring
12119 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12120 autopoint's.
12121
12122 * bootstrap: Check that gettext version matches what's in
12123 configure.ac. Warn users to ignore robots.txt ERROR 404.
12124 * bootstrap: Undo today's earlier change (logged below).
12125 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
12126
12127 The gettext version checking is causing more trouble than it's
12128 curing; remove it. Problem reported by Paul Hilfinger.
12129
12130 * bootstrap: Issue a warning that one can expect a message
12131 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12132 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12133
12134 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12135
12136 Ensure that the C++ compiler used for testing actually works on a
12137 simple test program; if not, skip the C++-related tests. Problem
12138 reported by Vin Shelton in:
12139 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
12140
12141 * m4/cxx.m4: New file.
12142 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12143 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12144 * tests/local.at (AT_COMPILE_CXX): Use it.
12145
12146 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12147
12148 * data/glr.c (yylloc): Output this macro even if locations are not
12149 being generated, as the GLR parser needs it even in that case.
12150 Problem reported by Troy A. Johnson
12151 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12152
12153 * configure.ac (AC_INIT): Update to 1.875e.
12154
12155 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12156
12157 * NEWS: Version 1.875d.
12158 * configure.ac (AC_INIT): Likewise.
12159 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12160
12161 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12162 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12163 lalr1.cc runs afoul of the first, and the last two are no longer
12164 supported by GCC 3.4.0.
12165 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12166 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12167
12168 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12169
12170 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12171 unsigned int, for compatibility with latest gnulib hash module.
12172 * src/state.c (state_hash, state_hasher): Likewise.
12173 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12174 * src/uniqstr.c (hash_uniqstr): Likewise.
12175
12176 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12177
12178 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12179
12180 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12181 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12182 character and string literals.
12183 (unexpected_end): New function.
12184 (unexpected_eof): Use it.
12185 (unexpected_newline): New function.
12186 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12187 actions.
12188
12189 * NEWS: Document %expect-rr.
12190
12191 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12192 Fix typo by replacing $1 with $option.
12193 Remove more 'intl'-related files.
12194 Don't DEFUN AM_INTL_SUBDIR twice.
12195
12196 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12197 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12198 strtoul.c.
12199 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12200 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12201 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12202 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12203 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12204 * src/.cvsignore: Add *.output.
12205
12206 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12207 gets copied to the output file.
12208
12209 2004-04-28 Paul Eggert <eggert@twinsun.com>
12210
12211 Get files from the gnulib and po repositories, instead of relying
12212 on them being in our CVS. Upgrade to latest versions of gnulib
12213 and Automake.
12214
12215 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12216 * bootstrap: Bootstrap from gnulib and po repositories.
12217 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12218 * README-cvs: Document these changes. Remove version numbers from
12219 mentions of build tools, since they change so often. Mention Flex.
12220
12221 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12222 (gl_USE_SYSTEM_EXTENSIONS): Add.
12223 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12224 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
12225 does this for us.
12226 (AC_ISC_POSIX): Remove; we no longer support this
12227 ancient OS, as it gets in the way of latest Autoconf & gnulib.
12228 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12229 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12230 Do not check for C89 headers, except for locale.h which is used
12231 by the Yacc library and must port to K&R hosts.
12232 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12233 Do not check for C89 functions, except for setlocale which is
12234 used by the Yacc library.
12235 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12236 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12237 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12238 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12239 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12240 AM_GNU_GETTEXT): Remove; now done by:
12241 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12242 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12243 for us.
12244
12245 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12246 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12247 Define to empty, as gnulib.mk will do the rest for us.
12248 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12249 for us.
12250 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12251 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12252
12253 * src/files.c: Include gnulib's xstrndup.h.
12254
12255 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12256 (REALLOC): Use xnrealloc, for likewise.
12257 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12258 (strnlen, memrchr): Remove decls; functions no longer used.
12259 Include <stpcpy.h>.
12260
12261 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12262 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12263 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12264 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12265 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12266 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12267 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12268 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12269 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12270 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12271 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12272 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12273 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12274 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12275 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12276 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12277 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12278 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12279 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12280 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12281 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12282 Remove, as these files are now generated automatically
12283 by bootstrap or automake.
12284
12285 * po/ChangeLog: Remove: all but one entry was a duplicate
12286 of this file, and I moved that 2000-11-02 entry here.
12287
12288 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12289 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12290 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12291 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12292 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12293 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12294 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12295 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12296 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12297 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12298 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12299 xstrndup.h.
12300 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12301 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12302 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12303 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12304 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12305 * src/.cvsignore: Remove *_.c.
12306
12307
12308 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12309 support it. (The latest stable gzip doesn't.)
12310
12311 2004-04-27 Paul Eggert <eggert@twinsun.com>
12312
12313 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12314 case, as stos_ is now used by destructors due to the 2004-02-09
12315 change.
12316
12317 Remove more K&R C support.
12318 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12319 * lib/subpipe.c (errno): Remove decl.
12320 Include <stdlib.h> unconditionally.
12321 (EXIT_FAILURE): Remove macro.
12322 * src/complain.c (vfprintf, strerror): Remove.
12323 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12324 unconditionally.
12325 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12326 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12327 (strchr, strspn, memchr): Remove decls.
12328 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12329 unconditionally. Do not declare perror.
12330 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12331 unconditionally.
12332
12333 * src/complain.c (_): Remove useless defn, as system.h defines this.
12334
12335 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12336 with latest obstack.h.
12337 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12338 to procedure types, as obstack.h now does that for us.
12339 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12340
12341 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12342 so that this include file can stand alone.
12343 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12344 does this now. Include subpipe.h first after config.h, to
12345 test whether it can stand alone.
12346
12347 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12348 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12349 unused declaration.
12350
12351 * tests/synclines.at (%union synch line): Put a dummy member in
12352 the union, because empty unions aren't allowed in C. Caught
12353 by GCC 3.4.0.
12354
12355 2004-04-13 Jim Meyering <jim@meyering.net>
12356
12357 * src/conflicts.c (conflicts_print): Correct format string typo:
12358 use `%%' to produce literal `%'. (trivial change)
12359
12360 2004-03-30 Paul Eggert <eggert@twinsun.com>
12361
12362 * src/getargs.c (version): Update copyright year to 2004.
12363
12364 * data/c.m4 (b4_int_type): Use 'short int' rather than
12365 'short', and similarly for 'long', 'unsigned', etc.
12366 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12367 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12368 yy_yypstack, yydumpstack): Likewise.
12369 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12370 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12371 Likewise.
12372 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12373 yy_stack_print, yyparse): Likewise.
12374 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12375 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12376 * lib/bitset.c (bitset_print): Likewise.
12377 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12378 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12379 * lib/bitsetv.c (bitsetv_dump): Likewise.
12380 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12381 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12382 Likewise.
12383 * src/LR0.c (allocate_itemsets): Likewise.
12384 * src/gram.h (rule_number, rule): Likewise.
12385 * src/lalr.h (goto_number): Likewise.
12386 * src/nullable.c (nullable_compute): Likewise.
12387 * src/output.c (prepare_rules): Likewise.
12388 * src/relation.c (relation_print, relation_digraph): Likewise.
12389 * src/relation.h (relation_node): Likewise.
12390 * src/state.h (state_number, transitions, errs, reductions,
12391 struct state): Likewise.
12392 * src/symtab.h (symbol_number, struct symbol): Likewise.
12393 * src/tables.c (vector_number, tally, action_number,
12394 default_goto, goto_actions): Likewise.
12395 * tests/existing.at (GNU Cim Grammar): Likewise.
12396 * tests/regression.at (Web2c Actions): Likewise.
12397
12398 * src/output.c (muscle_insert_short_int_table): Renamed from
12399 muscle_insert_short_table. All uses changed.
12400
12401 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12402
12403 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12404 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12405 Add %expect-rr rule.
12406
12407 * src/scan-gram.l: Recognize %expect-rr.
12408
12409 * src/conflicts.h (expected_sr_conflicts): Rename from
12410 expected_conflicts.
12411 (expected_rr_conflicts): Declare.
12412
12413 * src/conflicts.c (expected_sr_conflicts): Rename from
12414 expected_conflicts.
12415 (expected_rr_conflicts): Define.
12416 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12417 for GLR parsers.
12418 Use expected_sr_conflicts in place of expected_conflicts.
12419 Warn if expected_rr_conflicts used in non-GLR parser.
12420
12421 * doc/bison.texinfo: Add documentation for %expect-rr.
12422
12423 2004-03-08 Paul Eggert <eggert@gnu.org>
12424
12425 Add support for hex token numbers. Suggested by Odd Arild Olsen in
12426 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
12427
12428 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12429 in lalr1.cc.
12430 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12431 * src/scan-gram.l (scan_integer): New function.
12432 ({int}): Use it.
12433 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12434 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12435 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12436 Say "long int", not "long", for uniformity with GNU style.
12437
12438 2004-02-25 Paul Eggert <eggert@twinsun.com>
12439
12440 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12441 compilers. This fixes a problem with Intel's C++ compiler being
12442 chatty, reported by Guido Trentalancia in
12443 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
12444
12445 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12446
12447 Support %destructor and merge error locations in lalr1.cc.
12448
12449 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12450 (Parser::stos_): Define unconditionally.
12451 (Parser::destruct_): New method. Generate its body with
12452 b4_yydestruct_generate.
12453 (Parser::error_start_): New attribute.
12454 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12455 token which are discarded.
12456 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12457 error_start_ when erroneous token are discarded.
12458 (Parser::parse) <yyerrlab1>: Compute the location of the error
12459 token so that it covers all the discarded tokens.
12460 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12461 it can be called with `%skeleton "lalr1.cc"', and do that.
12462
12463 2004-02-02 Paul Eggert <eggert@twinsun.com>
12464
12465 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12466 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12467 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12468 There's no need to mention top_builddir since Automake does that
12469 for us.
12470 (INCLUDES): Remove, as Automake says it's obsolescent.
12471 Contents migrated into AM_CPPFLAGS as described above.
12472 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12473
12474 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12475
12476 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12477 (yyreportSyntaxError): Handle case where lookahead token is
12478 YYEMPTY.
12479
12480 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12481
12482 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12483 resulting parsers are compilable with C++.
12484
12485 2003-12-23 Paul Eggert <eggert@twinsun.com>
12486
12487 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12488 * src/output.c (output_skeleton): Rename local var.
12489 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12490 Bison tokens, as this runs afoul of the 2003-10-07 change that
12491 disallowed NUL bytes in character constants or string literals.
12492
12493 * tests/local.at: Require Autoconf 2.59's Autotest.
12494 * tests/testsuite.at: Don't include local.at, since we now assume
12495 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12496 including it.
12497 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12498 multiple inclusion warnings.
12499
12500 2003-12-02 Akim Demaille <akim@epita.fr>
12501
12502 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12503 conditions.
12504 From Bruno Haible.
12505
12506 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12507
12508 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12509
12510 2003-10-07 Paul Eggert <eggert@twinsun.com>
12511
12512 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12513 if testsuite doesn't exist.
12514
12515 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12516 literals, unfortunately.
12517 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12518 Complain about NUL bytes in character constants or string literals.
12519
12520 2003-10-05 Paul Eggert <eggert@twinsun.com>
12521
12522 * NEWS: Don't document %no-default-prec, as it's still
12523 too experimental.
12524 * doc/bison.texinfo: Document %no-default-prec only if
12525 the defaultprec flag is set. Normally it's not.
12526
12527 2003-10-04 Paul Eggert <eggert@twinsun.com>
12528
12529 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12530 non-modifiable lvalue, instead of a modifiable one.
12531 * doc/bison.texinfo (Actions): Document that $$ can
12532 be assigned to. Do not claim that $$ and $N are
12533 array element references: user code should not rely on this.
12534
12535 2003-10-01 Paul Eggert <eggert@twinsun.com>
12536
12537 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12538 (grammar_declaration): Use it.
12539 * src/scan-gram.l: New token %no-default-prec.
12540 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12541 * NEWS, doc/bison.texinfo: Document the above.
12542
12543 2003-10-01 Akim Demaille <akim@epita.fr>
12544
12545 VCG no longer supports long_straight_phase.
12546
12547 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12548 * src/print_graph.c (print_graph): Adjust.
12549
12550 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12551 and Paul Eggert <eggert@twinsun.com>
12552
12553 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12554 Table of Symbols): Document %default-prec.
12555 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12556 (grammar_declaration): Set default_prec on %default-prec.
12557 * src/scan-gram.l (%default-prec): New token.
12558 * src/reader.h (default_prec): New flag.
12559 * src/reader.c: Likewise.
12560 (packgram): Handle it.
12561 * tests/conflicts.at (%default-prec without %prec,
12562 %default-prec with %prec, %default-prec 1): New tests.
12563
12564 2003-09-30 Paul Eggert <eggert@twinsun.com>
12565
12566 * tests/testsuite.at: Include local.at, not input.at, fixing
12567 a typo in the 2003-08-25 patch.
12568
12569 2003-08-27 Akim Demaille <akim@epita.fr>
12570
12571 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12572 GCC warnings.
12573
12574 2003-08-26 Akim Demaille <akim@epita.fr>
12575
12576 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12577 "<\#" to avoid magic from Gnus when posting parts of this script.
12578
12579 2003-08-26 Akim Demaille <akim@epita.fr>
12580
12581 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12582 (Parser::parse): here.
12583 Adjust: nerrs and errstatus is now replaced by...
12584 (Parser::nerrs_, Parser::errstatus_): New.
12585
12586 2003-08-25 Akim Demaille <akim@epita.fr>
12587
12588 * config/announce-gen, Makefile.cfg: New.
12589 * Makefile.am: Adjust.
12590 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12591 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12592
12593 2003-08-25 Akim Demaille <akim@epita.fr>
12594
12595 When reducing initial empty rules, Bison parser read an initial
12596 location that is not defined. This results in garbage, and that
12597 affects Bison's own parser. Therefore we need (i) to extend Bison
12598 to support a means to initialize this location, and (ii) to use
12599 this CVS Bison to fix CVS Bison's parser.
12600
12601 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12602 with...
12603 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12604 * src/parse-gram.y: Adjust.
12605 (%initial-action): New.
12606 (%error-verbose): Since we require CVS Bison, there is no reason
12607 not to use it.
12608 * src/scan-gram.l: Adjust.
12609 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12610 * data/yacc.c (yyparse): Use b4_initial_action.
12611
12612 2003-08-25 Akim Demaille <akim@epita.fr>
12613
12614 * doc/bison.texinfo: Don't promote stdout for error messages.
12615
12616 2003-08-25 Akim Demaille <akim@epita.fr>
12617
12618 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12619 From Alexandre Duret-Lutz.
12620
12621 2003-08-25 Akim Demaille <akim@epita.fr>
12622
12623 Version 1.875c.
12624
12625 2003-08-25 Akim Demaille <akim@epita.fr>
12626
12627 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12628 Use them.
12629
12630 2003-08-25 Akim Demaille <akim@epita.fr>
12631
12632 * data/lalr1.cc (Parser::reduce_print_): New.
12633 Use it.
12634
12635 2003-08-25 Akim Demaille <akim@epita.fr>
12636
12637 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12638 error recovery loops. This patch is based on
12639 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12640 Also, augment the similarity between lalr1.cc and yacc.c.
12641 Note: the locations of error recovery rules are not correct yet.
12642
12643 * data/lalr1.cc: Comment changes to augment the similarity between
12644 lalr1.cc and yacc.c.
12645 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12646 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12647 yyerrlab), when hitting EOF, pop the whole stack here instead of
12648 merely falling thru the default error handling mechanism.
12649 (yyerrorlab): New label, with the old contents of YYERROR,
12650 plus the following change: pop the stack of rhs corresponding
12651 to the production that invoked YYERROR. That is how Yacc
12652 behaves (required by POSIX).
12653 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12654 fail.
12655
12656 2003-08-25 Akim Demaille <akim@epita.fr>
12657
12658 Tune local.at so that people can "autom4te -l autotest calc.at -o
12659 calc" for instance, to extract a sub test suite.
12660
12661 * tests/testsuite.at: Move the initialization, Autotest version
12662 requirement, and AT_TESTED invocation into...
12663 * tests/local.at: here.
12664 * tests/testsuite.at: Include it for compatibility with Autoconf
12665 2.57.
12666 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12667 be ignore.
12668
12669 2003-08-04 Paul Eggert <eggert@twinsun.com>
12670
12671 Rework code slightly to avoid gcc -Wtraditional warnings.
12672 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12673 The returned value is now stored in *YY0. All callers changed.
12674 * src/output.c (merge_output): Adjust to the above change.
12675
12676 2003-07-26 Paul Eggert <eggert@twinsun.com>
12677
12678 * data/glr.c (YYASSERT): New macro.
12679 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12680 yyresolveStates, yyprocessOneStack):
12681 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12682 Derived from a suggestion by Frank Heckenbach.
12683
12684 2003-07-25 Paul Eggert <eggert@twinsun.com>
12685
12686 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12687 for portability to K&R C (after ansi2knr, presumably). See
12688 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12689 by Frank Heckenbach, though I have omitted the structure-initialization
12690 part of his glr-knr.diff patch since I recall that the Portable
12691 C Compiler didn't require that change.
12692
12693 Let the user specify how to allocate and free memory.
12694 Derived from a suggestion by Frank Heckenbach in
12695 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12696 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12697 All uses of free, malloc, realloc changed to use these macros,
12698 and unnecessary casts removed.
12699 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12700
12701 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12702
12703 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12704 use s.empty() rather than s == "" to test for empty string; see
12705 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12706 (trivial change)
12707
12708 2003-06-25 Akim Demaille <akim@epita.fr>
12709
12710 * config/depcomp, config/install-sh: Update from masters.
12711
12712 2003-06-20 Paul Eggert <eggert@twinsun.com>
12713
12714 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12715 and return properly parenthesized result.
12716 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12717 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12718 Remove unnecessary parentheses from uses.
12719 * doc/bison.texinfo (Location Default Action): Describe the
12720 conventions for parentheses.
12721
12722 2003-06-19 Paul Eggert <eggert@twinsun.com>
12723
12724 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12725 yyreportTree): Do not assume that size_t is the same width as int,
12726 when printing sizes. Print sizes using an unsigned format.
12727 Problem reported by Frank Heckenbach in
12728 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12729
12730 Port to Forte Developer 7 C compiler.
12731 * data/glr.c (struct YYLTYPE): If locations are not being used,
12732 declare a single dummy member, as empty structs do not conform
12733 to the C standard.
12734 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12735 the Forte Developer 7 C compiler complains that end-of-loop
12736 code is not reached.
12737
12738 2003-06-17 Paul Eggert <eggert@twinsun.com>
12739
12740 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12741 avoid warnings from picky compilers about redefinition of PARAMS.
12742
12743 2003-06-17 Paul Eggert <eggert@twinsun.com>
12744
12745 Version 1.875b.
12746
12747 * NEWS: Document 1.875b.
12748
12749 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12750 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12751 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12752 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12753 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12754 per recent gettext manual's suggestion.
12755 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12756 Use prototypes, not old-style definitions.
12757 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12758 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12759 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12760 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12761 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12762 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12763 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12764 vbitset_or_and_cmp, vbitset_copy): Likewise.
12765
12766 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12767 Do not include <stdlib.h>.
12768 (PARAMS): Define unconditionally for C89.
12769 (ATTRIBUTE_NORETURN): Remove.
12770 (ATTRIBUTE_UNUSED): Define unconditionally.
12771
12772 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12773 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12774 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12775 * lib/vbitset.c, lib/vbitset.h: New files.
12776 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12777 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12778 from libbitset.
12779
12780 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12781 `How Can I Reset @code{yyparse}', since texinfo does not allow
12782 arbitrary @ in node names.
12783
12784 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12785 shouldn't be needed according to the gettext 0.12.1 documentation
12786 but which seem to be needed anyway: codeset.m4 glibc21.m4
12787 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12788 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12789 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12790
12791 * lib/.cvsignore: Add stdbool.h.
12792 * m4/.cvsignore: Add nls.m4, po.m4.
12793
12794 Upgrade to CVS gnulib.
12795 * stdbool_.h: File renamed from stdbool.h.in.
12796 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12797 AC_HEADER_STDBOOL.
12798 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12799 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12800 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12801 (MOSTLYCLEANFILES): New var.
12802 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12803 (stdbool.h): New rule.
12804 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12805 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12806 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12807 m4/quote.m4: Upgrade to today's gnulib.
12808
12809 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12810 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12811 the tests right now.
12812 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12813 yyerror are declared before use; C99 requires this.
12814
12815 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12816
12817 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12818 first.
12819 (yyrecoverSyntaxError): Correct the logic for setting and testing
12820 yyerrState.
12821 Correct comment on handling EOF.
12822 Allow states with only a default reduction, rather than failing
12823 (I can't quite reconstruct why these were not allowed before).
12824
12825 Fixes to avoid problem that $-N rules in GLR parsers can cause
12826 buffer overruns, corrupting state.
12827
12828 * src/output.c (prepare_rules): Output max_left_semantic_context
12829 definition.
12830 * src/reader.h (max_left_semantic_context): New variable declaration.
12831 * src/scan-gram.l (max_left_semantic_context): Define.
12832 (handle_action_dollar): Update max_left_semantic_context.
12833 * data/glr.c (YYMAXLEFT): New definition.
12834 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12835 (yyresolveAction): Ditto.
12836
12837 Fixes to problems with location handling in GLR parsers reported by
12838 Frank Heckenbach (2003/06/05).
12839
12840 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12841 (YYRHSLOC): Add parentheses, and define only if locations used.
12842 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12843 locations not used.
12844 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12845 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12846
12847 * tests/cxx-type.at: Exercise location information; update tests
12848 to differentiate output with and without locations.
12849 Remove forward declarations of yylex and yyerror---caused errors
12850 because default YYLTYPE not yet defined.
12851 Change semantic actions to compute strings, rather than printing
12852 them directly (to test proper passing of semantics values). Change
12853 output to prefix notation and update test data and expected results.
12854 (yylex): Track locations.
12855 (stmtMerge): Return value rather than printing, and include arguments
12856 in value.
12857
12858 2003-06-03 Paul Eggert <eggert@twinsun.com>
12859
12860 Avoid warnings generated by GCC 2.95.4 when Bison is
12861 configured with --enable-gcc-warnings.
12862 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12863 yy::]b4_parser_class_name[::translate_,
12864 yy::Stack::operator[] (unsigned),
12865 yy::Stack::operator[] (unsigned) const,
12866 yy::Slice::operator[] (unsigned),
12867 yy::Slice::operator[] (unsigned) const):
12868 Rename local vars to avoid warnings.
12869 * tests/glr-regression.at (Improper handling of embedded actions
12870 and $-N in GLR parsers): Remove unused local variable from yylex.
12871 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12872 (void) as arg when not pure, since we now assume C89 when building
12873 Bison. Pacify GCC by using parameter.
12874
12875 2003-06-02 Paul Eggert <eggert@twinsun.com>
12876
12877 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12878 yy::Location::lines, yy::Location::columns): Rename arguments
12879 to avoid shadowing; this removes a warning generated by GCC 3.3.
12880
12881 2003-06-01 Paul Eggert <eggert@twinsun.com>
12882
12883 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12884 to g++, as GCC 3.3 complains if you do it.
12885 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12886 everything that WARNING_CFLAGS has, except omit warnings
12887 not suitable for C++.
12888 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12889 * tests/atlocal.in (CXXFLAGS): New var.
12890 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12891
12892 Fix a GLR parser bug I reported in February; see
12893 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12894 The problem was that GLR parsers did not conform to the C standard,
12895 because actions like { $1 = $2 + $3; } expanded to expressions
12896 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12897 to a local variable. The C standard says that expressions
12898 like (var = f ()) + (var = f ()) have undefined behavior.
12899 Another problem was that GCC sometimes issues warnings that
12900 yyfill and its parameters are unused.
12901
12902 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12903 as possibly unused.
12904 (yyfill): New function.
12905 (YYFILL): Use it.
12906 (yyuserAction): Change type of yynormal to bool, so that it matches
12907 the new yyfill signature. Mark it as possibly unused.
12908
12909
12910 Follow up on a bug I reported in February, where a Bison-generated
12911 parser can loop. Provide a test case and a fix for yacc.c. I
12912 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12913 The original bug report is in:
12914 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12915
12916 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12917 macro's size was becoming unwieldy.
12918 (yyerrlab): Do not discard an empty lookahead symbol, as this
12919 might destroy garbage.
12920 (yyerrorlab): New label, with the old contents of YYERROR,
12921 plus the following change: pop the stack of rhs corresponding
12922 to the production that invoked YYERROR. That is how Yacc
12923 behaves, and POSIX requires this behavior.
12924 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12925 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12926 Define 'alarm' to do nothing if unistd.h is not available.
12927 Add a new rule "exp: '-' error;" to test the above change to
12928 data/yacc.c. Use 'alarm' to abort any test taking longer than
12929 10 seconds, as it's probably looping.
12930 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12931 Also, the new yacc.c generates two fewer diagnostics for an
12932 existing test.
12933
12934 2003-05-24 Paul Eggert <eggert@twinsun.com>
12935
12936 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12937 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12938 This fixes a problem reported by John Bowman when the Compaq/HP
12939 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12940 -ansi -Wall -gall).
12941 * data/yacc.c (union yyalloc): Likewise.
12942 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12943
12944 Switch from 'int' to 'bool' where that makes sense.
12945
12946 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12947 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12948 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12949 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12950 Return or accept bool, not int. All callers changed.
12951 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12952 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12953 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12954 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12955 bitset_or_and_cmp_): Likewise.
12956 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12957 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12958 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12959 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12960 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12961 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12962 bitset_stats_or_and_cmp): Likewise.
12963 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12964 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12965 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12966 ebitset_xor_cmp): Likewise.
12967 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12968 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12969 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12970 lbitset_xor_cmp): Likewise.
12971 * lib/bbitset.h: Include <stdbool.h>.
12972 (struct bitset_vtable): The following members now return bool, not
12973 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12974 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12975 or_and_cmp).
12976 * src/conflicts.c (count_rr_conflicts): Likewise.
12977 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12978 All uses changed.
12979 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12980 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12981 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12982 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12983 graph_flag): Likewise.
12984 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12985 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12986 graph_flag): Likewise.
12987 * src/output.c (error_verbose): Likewise.
12988 * src/output.h (error_verbose): Likewise.
12989 * src/reader.c (start_flag, typed): Likewise.
12990 * src/reader.h (typed): Likewise.
12991 * src/getargs.c (LOCATIONS_OPTION): New constant.
12992 (long_options, getargs): Use it.
12993 * src/lalr.c (build_relations): Use bool, not int.
12994 * src/nullable.c (nullable_compute): Likewise.
12995 * src/print.c (print_reductions): Likewise.
12996 * src/tables.c (action_row, pack_vector): Likewise.
12997 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12998 * src/output.c (prepare): Use it.
12999 * src/output.c (token_definitions_output,
13000 symbol_destructors_output, symbol_destructors_output): Use string,
13001 not boolean integer, to keep track of whether to output separator.
13002 * src/print_graph.c (print_core): Likewise.
13003 * src/state.c (state_rule_lookaheads_print): Likewise.
13004
13005 * config/install-sh: Sync from automake 1.7.5.
13006
13007 2003-05-14 Paul Eggert <eggert@twinsun.com>
13008
13009 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13010 semicolon after a grammar declaration, in the interest of possible
13011 future changes to the Bison input language.
13012 Do not allow a stray semicolon at the start of the grammar.
13013 (rhses.1): Allow one or more semicolons after any rule, including
13014 just before "|" as required by POSIX.
13015 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13016 grammar.
13017
13018 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13019
13020 %parse-param support for lalr1.cc.
13021
13022 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13023 b4_cc_constructor_calls, b4_cc_constructor_call,
13024 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13025 definitions.
13026 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13027 parse-param arguments.
13028 (yy::b4_parser_class_name): Declare instance variables to
13029 hold parse-param arguments.
13030 * tests/calc.at: s/value/semantic_value/ because value clashes
13031 with a member of yy::b4_parser_class_name. Adjust C++ code
13032 to handle %parse-param. Enable %parse-param test in C++.
13033
13034 2003-05-12 Paul Eggert <eggert@twinsun.com>
13035
13036 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13037 English a bit. Fix fclose typo. Change "const char" to "char
13038 const", and use ANSI C rather than K&R for "main". Suggest
13039 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13040 and suggest yy_switch_to_buffer.
13041
13042 2003-05-05 Paul Eggert <eggert@twinsun.com>
13043
13044 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13045 C89. This avoids a diagnostic on compilers that define __STDC__
13046 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
13047 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13048
13049 2003-05-03 Paul Eggert <eggert@twinsun.com>
13050
13051 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13052 Do not overrun array bounds.
13053 This should fix a bug reported today by Olatunji Oluwabukunmi in
13054 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
13055
13056 2003-04-29 Akim Demaille <akim@epita.fr>
13057
13058 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13059 * src/getargs.c, src/getargs.h: here, as bool, not int.
13060 (nondeterministic_parser): New.
13061 * src/parse-gram.y, src/scan-gram.l: Support
13062 %nondeterministic-parser.
13063 * src/output.c (prepare): Use nondeterministic_parser instead
13064 of glr_parser where appropriate.
13065 * src/tables.c (conflict_row, action_row, save_row)
13066 (token_actions, token_actions, pack_vector): Ditto.
13067
13068 2003-04-29 Akim Demaille <akim@epita.fr>
13069
13070 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13071
13072 2003-04-29 Akim Demaille <akim@epita.fr>
13073
13074 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13075 with %pure-parser and %locations to exercise the patch from Yakov
13076 Markovitch below.
13077
13078 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13079
13080 * data/yacc.c: (b4_lex_param): Corrected for the case where
13081 %lex-param is provided and %pure-parser isn't.
13082
13083 2003-04-27 Paul Eggert <eggert@twinsun.com>
13084
13085 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
13086 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
13087 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13088 if it is not defined.
13089 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13090
13091 2003-04-26 Paul Eggert <eggert@twinsun.com>
13092
13093 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13094 Declare to be of type suitable for the ninf value itself, not of
13095 type suitable for the corresponding table, since the latter might
13096 be unsigned but the ninf value might be negative. This fixes a
13097 bug reported by Alexandre Duret-Lutz in
13098 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
13099
13100 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13101 invokes it. We shouldn't invoke it twice because it will attempt
13102 to put error.o in the archive twice. This fixes a glitch reported
13103 by Martin Mokrejs in
13104 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
13105
13106 2003-04-21 Paul Eggert <eggert@twinsun.com>
13107
13108 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13109 to gnulib.
13110
13111 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13112
13113 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13114 Fix obvious typo that results in uncompilable GLR parsers
13115 when both %pure-parser and %locations are used. (trivial change)
13116
13117 2003-04-17 Paul Eggert <eggert@twinsun.com>
13118
13119 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13120 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13121 Do not insert the expected token via unput, as this runs afoul
13122 of a POSIX-compatibility bug in flex 2.5.31.
13123 All uses changed to BEGIN the parent state,
13124 since we no longer insert the expected token via unput.
13125 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13126 that is no longer emitted after the above change.
13127
13128 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13129 the first one. This change is from Paul Hilfinger, and it fixes
13130 regression reported by Werner Lemberg in
13131 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
13132
13133 (resolve_sr_conflict): Don't invoke state_errs_set
13134 unless one or more tokens have been explicitly made errors.
13135 Otherwise, the above change causes Bison to abort.
13136
13137 * tests/existing.at (GNU pic Grammar): New test case, taken from
13138 Lemberg's email.
13139
13140 2003-03-31 Akim Demaille <akim@epita.fr>
13141
13142 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13143
13144 2003-03-31 Akim Demaille <akim@epita.fr>
13145
13146 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13147 output.
13148
13149 2003-03-31 Akim Demaille <akim@epita.fr>
13150
13151 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13152 From Paul Hilfinger.
13153
13154 2003-03-29 Akim Demaille <akim@epita.fr>
13155
13156 * m4/error.m4: Do not put under dynamic conditions some code which
13157 expansion is under static control.
13158
13159 2003-03-29 Akim Demaille <akim@epita.fr>
13160
13161 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13162
13163 2003-03-29 Akim Demaille <akim@epita.fr>
13164
13165 * doc/bison.texinfo (Strings are Destroyed): New.
13166
13167 2003-03-13 Paul Eggert <eggert@twinsun.com>
13168
13169 * .cvsignore: Add configure.lineno.
13170 * src/.cvsignore: Add yacc.
13171 * tests/.cvsignore: Add testsuite.log.
13172 * doc/fdl.texi: Sync with latest FSF version.
13173
13174 2003-03-12 Paul Eggert <eggert@twinsun.com>
13175
13176 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13177 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13178 cursor, instead of leaving it undefined. This fixes a bug
13179 reported by Tim Van Holder in
13180 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
13181 * tests/input.at (Torturing the Scanner): Test the scanner on
13182 an empty input file, which was Tim Van Holder's test case.
13183
13184 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13185 <sys/resource.h> can be included, include sys/time.h and
13186 sys/times.h first, if available. This works around the SunOS
13187 4.1.4 porting bug reported by Bruce Becker in
13188 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
13189
13190 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13191 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13192 AC_HEADER_SYS_WAIT.
13193
13194 Merge changes from gnulib. This was prompted because the CVS
13195 snapshot didn't build on Solaris 7 due to strnlen problems.
13196
13197 These changes need to be merged back into gnulib:
13198 * lib/hash.c: Include <stdbool.h> unconditionally.
13199 * m4/onceonly.m4 (m4_quote): New macro.
13200 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13201 Quote AC_FOREACH variable-expansions properly.
13202 The 2003-01-03 obstack.h change also needs merging.
13203 {end of changes requiring merging}
13204
13205 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13206 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13207 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13208 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13209 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13210 New files, imported from gnulib.
13211 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13212 above.
13213
13214 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13215 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13216 gnulib sources.
13217
13218 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13219 Add.
13220 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13221 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13222 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13223 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13224 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13225 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13226 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13227 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13228 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13229 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13230 (jm_PREREQ_ARGMATCH): Remove.
13231 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13232 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13233
13234 * src/system.h: Include <stdbool.h> unconditionally.
13235
13236 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13237 assuming at least C89 in the bitset code for some time now.
13238
13239 2003-03-03 Akim Demaille <akim@epita.fr>
13240
13241 * ro.po: New.
13242
13243 2003-03-02 Akim Demaille <akim@epita.fr>
13244
13245 * doc/bison.texinfo (Table of Symbols): Reactivate the
13246 documentation for %lex-param, and %parse-param.
13247
13248 2003-03-02 Akim Demaille <akim@epita.fr>
13249
13250 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13251 generate verbose error messages.
13252 Use the number of tokens as an upper bound in yytname, as it
13253 cannot be a non terminal.
13254
13255 2003-03-02 Akim Demaille <akim@epita.fr>
13256
13257 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13258 message.
13259
13260 2003-03-02 Akim Demaille <akim@epita.fr>
13261
13262 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13263 Use them to exercise yycheck overrun.
13264 Based on Andrew Suffield's grammar.
13265
13266 2003-03-02 Akim Demaille <akim@epita.fr>
13267
13268 Create tests/local.at for Bison generic testing macros.
13269
13270 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13271 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13272 This new file.
13273 * tests/calc.at (AT_CHECK_CALC): Adjust.
13274 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13275 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13276 * tests/local.at: here.
13277 (AT_COMPILE_CXX): Tags the tests using it as c++.
13278 Ignore the test if CXX is not functional.
13279
13280 2003-03-01 Paul Eggert <eggert@twinsun.com>
13281
13282 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13283 not loc->end, since loc->end might contain garbage and this leads
13284 to undefined behavior on some platforms.
13285 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13286 depend on *loc, so that the reader doesn't give the the false
13287 impression that *loc is initialized.
13288 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13289 does not survive the return.
13290
13291 2003-03-01 Akim Demaille <akim@epita.fr>
13292
13293 * src/scan-gram.l (code_start): Always initialize it when entering
13294 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13295 yylex invocation. An alternative would be making it static, but
13296 then it starts with the second %%'s beginning, instead of its end.
13297
13298 2003-02-28 Paul Eggert <eggert@twinsun.com>
13299
13300 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13301 around a UnixWare 7.1.1 porting bug reported by John Hughes in
13302 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
13303
13304 2003-02-26 Paul Eggert <eggert@twinsun.com>
13305
13306 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13307 Remove Sequent/Pyramid discussion (nobody uses them any more).
13308 Merge VMS and MS-DOS discussion; these ports may well be dead
13309 but let's keep mentioning them for now. Put <> around email
13310 addresses. Add copyright notice.
13311
13312 2003-02-24 Paul Eggert <eggert@twinsun.com>
13313
13314 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13315 to avoid collision with flex use of yylineno.
13316 Problem reported by Bruce Lilly in
13317 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
13318 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13319 * data/yacc.c (yy_reduce_print): Likewise.
13320
13321 * config/depcomp: Sync with Automake 1.7.3.
13322
13323 2003-02-21 Akim Demaille <akim@epita.fr>
13324
13325 * data/lalr1.cc: Use temporary variables instead of casts to
13326 change integer types.
13327 Suggested by Paul Eggert.
13328
13329 2003-02-21 Akim Demaille <akim@epita.fr>
13330
13331 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13332 to avoid confusions with lalr1.cc's notion of Position.
13333 Suggested by Paul Eggert.
13334
13335 2003-02-20 Akim Demaille <akim@epita.fr>
13336
13337 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13338 before initial_columns.
13339 (location.hh): Use consistent variable names when defining the
13340 operator<<.
13341 Use "last" so that we subtract from Positions, not from unsigned.
13342
13343 2003-02-20 Akim Demaille <akim@epita.fr>
13344
13345 * data/lalr1.cc (position.hh): New subfile, including the extended
13346 and Doxygen'ed documentation of class Position.
13347 (location.hh): Use it.
13348 Document a` la Doxygen.
13349 With the help of Benoit Perrot.
13350
13351 2003-02-20 Akim Demaille <akim@epita.fr>
13352
13353 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13354 AT_YACC_IF.
13355 Redefine AT_YYERROR_SEES_LOC_IF using it.
13356 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13357 not defined.
13358 Don't use the location in yy::Parser::error_ and
13359 yy::Parser::print_ when not %locations.
13360 Activate more lalr1.cc tests.
13361
13362 2003-02-19 Akim Demaille <akim@epita.fr>
13363
13364 * data/lalr1.cc: When displaying a line number, be sure to make it
13365 an int.
13366
13367 2003-02-19 Akim Demaille <akim@epita.fr>
13368
13369 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13370 Remove, useless.
13371 (YYABORT, YYACCEPT, YYERROR): New.
13372 * tests/calc.at: Renable the lalr1.cc test.
13373
13374 2003-02-19 Akim Demaille <akim@epita.fr>
13375
13376 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13377 error recovery, mixing with/without pops and discarding of the
13378 lookahead.
13379 Exercise YYERROR.
13380 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13381
13382 2003-02-17 Paul Eggert <eggert@twinsun.com>
13383
13384 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13385 * tests/testsuite.at (AT_COMPILE): Use them.
13386 This fixes the testsuite problem reported by Robert Lentz in
13387 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
13388
13389 2003-02-12 Paul Eggert <eggert@twinsun.com>
13390
13391 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13392 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
13393 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
13394 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13395 Check for malloc failure, for consistency with yacc.c.
13396 (yytname_size): Remove, for consistency with yacc.c.
13397
13398 The bug still remains in data/lalr1.cc, as I didn't have time
13399 to fix it there.
13400
13401 2003-02-06 Akim Demaille <akim@epita.fr>
13402
13403 * configure.ac (GXX): Rename as...
13404 (CXX): this, to keep the original Autoconf semantics.
13405 Require 2.57.
13406 * data/lalr1.cc: Fix b4_copyright invocations.
13407 If YYDEBUG is not defined, don't depend upon name_ being defined.
13408 (location.hh): Include string and iostream.
13409 (Position::filename): New member.
13410 (Position::Position ()): New.
13411 (operator<< (Position)): New.
13412 (operator- (Position, int)): New.
13413 (Location::first, Location::last): Rename as...
13414 (Location::begin, Location::end): these, to mock the conventional
13415 iterator names.
13416 (operator<< (Location)): New.
13417 * tests/atlocal.in (CXX): New.
13418 * tests/testsuite.at (AT_COMPILE_CXX): New.
13419 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13420 locations in a more synthetic way.
13421 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13422 lalr1.cc is used.
13423 Adjust the C locations to match those from Emacs: first column is
13424 column 0.
13425 Change all the expected results.
13426 Conform to the GCS: simplify the locations when applicable.
13427 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13428 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13429 these CPP macros with the m4 macros new defined by...
13430 (AT_CHECK_PUSHDEFS): this, i.e.:
13431 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
13432 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
13433 New macros.
13434 (AT_CHECK_POPDEFS): Undefine them.
13435 (AT_CHECK_CALC_LALR1_CC): New.
13436 Use it for the first lalr1.cc test.
13437
13438 2003-02-04 Akim Demaille <akim@epita.fr>
13439
13440 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13441 Location as is defined.
13442
13443 2003-02-04 Akim Demaille <akim@epita.fr>
13444
13445 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13446 name_ being defined.
13447
13448 2003-02-03 Paul Eggert <eggert@twinsun.com>
13449
13450 * src/gram.h (start_symbol): Remove unused decl.
13451
13452 Use more-consistent naming conventions for local vars.
13453
13454 * src/derives.c (derives_compute): Change type of local var from
13455 int to rule_number.
13456 * src/gram.c (grammar_rules_partial_print): Likewise.
13457 * src/print.c (print_core): Likewise.
13458 * src/reduce.c (reduce_grammar_tables): Likewise.
13459
13460 * src/gram.c (grammar_dump): Change name of item_number *
13461 local var from r to rp.
13462 * src/nullable.c (nullable_compute): Likewise.
13463
13464 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13465
13466 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13467 for symbol or symbol_number var.
13468 * src/reader.c (grammar_start_symbol_set): Likewise.
13469 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13470 Likewise.
13471 * src/state.c (transitions_to): Likewise.
13472 * src/state.h: Likewise.
13473 * src/tables.c (symbol_number_to_vector_number): Likewise.
13474
13475 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13476 char * var.
13477
13478 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13479 var.
13480
13481 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13482 var.
13483
13484 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13485 Use str, not s, for char * var. Use ch, not c, for character var.
13486 Use size for size var.
13487
13488 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13489 char * var.
13490 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13491 uniqstr var.
13492 * src/uniqstr.h: Likewise.
13493
13494 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13495 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13496 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13497 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13498 param to have same name as that of enum, so that we don't use
13499 "s" to stand for a non-state.
13500
13501 2003-02-02 Akim Demaille <akim@epita.fr>
13502
13503 * src/scan-skel.l: Scan more than one inert character per yylex
13504 invocation.
13505
13506 2003-02-01 Paul Eggert <eggert@twinsun.com>
13507
13508 Version 1.875a.
13509
13510 * po/LINGUAS: Add ms.
13511
13512 2003-01-30 Akim Demaille <akim@epita.fr>
13513
13514 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13515
13516 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13517
13518 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13519 of $1.
13520
13521 Changes in response to error report by S. Eken: GLR mode does not
13522 handle negative $ indices or $ indices in embedded rules correctly.
13523 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13524
13525 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13526 (b4_rhs_location): Ditto.
13527 (yyfill): New function to copy from stack tree into array
13528 incrementally.
13529 (yyuserAction): Modify to allow incremental move of semantic values
13530 to rhs array when in GLR mode.
13531 Define YYFILL to use in user-defined actions to fill semantic array
13532 as needed.
13533 Remove dummy use of yystack, as there is now a guaranteed use.
13534 (yydoAction): Modify to allow incremental move of semantic values
13535 to rhs array when in GLR mode.
13536 (yyresolveAction): Ditto.
13537 (yyglrShiftDefer): Update comment.
13538 (yyresolveStates): Use X == NULL for pointers, not !X.
13539 (yyglrReduce): Ditto.
13540 (yydoAction): Ditto
13541
13542 * tests/glr-regr1.at: Rename to ...
13543 * tests/glr-regression.at: Add new regression test for the problems
13544 described above (adapted from S. Eken).
13545 Update copyright notice.
13546 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13547 * tests/Makefile.am: Ditto.
13548
13549 2003-01-28 Paul Eggert <eggert@twinsun.com>
13550
13551 * data/lalr1.cc: Do not use @output_header_name@ unless
13552 b4_defines_flag is set. This fixes two bugs reported by
13553 Tim Van Holder in
13554 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13555 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13556
13557 2003-01-21 Paul Eggert <eggert@twinsun.com>
13558
13559 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13560 we don't need to worry about yyerrlab1 being reported as an
13561 "unused label" by non-GCC C compilers. The downside is that if
13562 locations are used then a couple of statements are duplicated each
13563 time YYERROR is invoked, but the upside is that the warnings
13564 should vanish.
13565 (yyerrlab1): Move code to YERROR.
13566 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13567 This reverts some of the 2002-12-27 change.
13568
13569 2003-01-17 Paul Eggert <eggert@twinsun.com>
13570
13571 * src/output.c (symbol_printers_output): Fix typo that led
13572 to core dump. Problem reported by Antonio Rus in
13573 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13574
13575 2003-01-13 Akim Demaille <akim@epita.fr>,
13576 Quoc Peyrot <chojin@lrde.epita.fr>,
13577 Robert Anisko <anisko_r@lrde.epita.fr>
13578
13579 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13580 when the stacks contain one element, as the loop would otherwise
13581 free the last state, and then use the top state (the one we just
13582 popped). This means that the initial elements will not be freed
13583 explicitly, as is the case in yacc.c; it is not a problem, as
13584 these elements have fake values.
13585
13586 2003-01-11 Paul Eggert <eggert@twinsun.com>
13587
13588 * NEWS: %expect-violations are now just warnings, reverting
13589 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13590 bootstrapping problem reported by Matthias Klose; see
13591 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13592 * src/conflicts.c (conflicts_print): Likewise.
13593 * tests/conflicts.at (%expect not enough, %expect too much,
13594 %expect with reduce conflicts): Likewise.
13595 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13596 that the warning is enabled if the number of conflicts changes
13597 (not necessarily increases).
13598
13599 * src/getargs.c (version): Update copyright year.
13600
13601 2003-01-09 Akim Demaille <akim@epita.fr>
13602
13603 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13604
13605 2003-01-08 Paul Eggert <eggert@twinsun.com>
13606
13607 * Makefile.maint (WGETFLAGS):
13608 New macro, containing "-C off" to disable proxy caches.
13609 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13610 (rel-check): Use $(WGET) instead of wget.
13611
13612 2003-01-06 Paul Eggert <eggert@twinsun.com>
13613
13614 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13615 the GLR paper of Scott, Johnstone and Hussain.
13616
13617 2003-01-04 Paul Eggert <eggert@twinsun.com>
13618
13619 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13620 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13621 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13622 (EXTRA_LIBRARIES): New var, for liby.a.
13623 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13624 (EXTRA_SCRIPTS): New var, for yacc.
13625
13626 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13627 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13628 Problem reported by Nelson H. F. Beebe.
13629
13630 2003-01-03 Paul Eggert <eggert@twinsun.com>
13631
13632 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13633 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13634 when compiling Bison 1.875's `bitset bset = obstack_alloc
13635 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13636
13637 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13638 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13639 grow to a huge size with typical invocation.
13640
13641 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13642 Use the pattern recommended by Autoconf 2.57, except also protect
13643 against double-definition.
13644 * src/system.h: Likewise.
13645 Portability issues reported by Nelson H. F. Beebe.
13646
13647 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13648 All uses changed. Provide a definition in both C and C++.
13649 (yytrue, yyfalse): Define even if defined (__cplusplus).
13650
13651 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13652 Reported by Nelson H. F. Beebe.
13653
13654 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13655
13656 2003-01-02 Paul Eggert <eggert@twinsun.com>
13657
13658 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13659 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13660 Bug reported by Nelson H. F. Beebe.
13661
13662 2003-01-01 Paul Eggert <eggert@twinsun.com>
13663
13664 * Version 1.875.
13665
13666 2002-12-30 Paul Eggert <eggert@twinsun.com>
13667
13668 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13669 Moved here from...
13670 (<INITIAL>","): Here. This causes stray "," to be treated
13671 more uniformly.
13672
13673 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13674 last brace in braced code when not in Yacc mode, for compatibility
13675 with Bison 1.35. This resurrects the 2001-12-15 patch to
13676 src/reader.c.
13677
13678 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13679 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13680
13681 2002-12-28 Paul Eggert <eggert@twinsun.com>
13682
13683 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13684 that of SYM's type. This fixes Debian bug 168069, reported by
13685 Thomas Olsson.
13686
13687 2002-12-28 Paul Eggert <eggert@twinsun.com>
13688
13689 Version 1.75f.
13690
13691 Switch back to the Yacc style of conflict reports, undoing some
13692 of the 2002-07-30 change.
13693 * doc/bison.texinfo (Understanding): Use Yacc style for
13694 conflict reports. Also, use new way of locating rules.
13695 * src/conflicts.c (conflict_report):
13696 Renamed from conflict_report_yacc, removing the old
13697 'conflict_report'. Translate the entire conflict report at once,
13698 so that we don't assume that "," has the same interpretation in
13699 all languages.
13700 (conflicts_output): Use Yacc-style conflict report for each state,
13701 instead of our more-complicated style.
13702 (conflicts_print): Use Yacc-style conflict report, except print
13703 the input file name when not emulating Yacc.
13704 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13705 Conflicted Reduction, %expect not enough, %expect too much,
13706 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13707 * tests/existing.at (GNU Cim Grammar): Likewise.
13708 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13709
13710 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13711 fatal): Don't invoke fflush; it's not needed and it might even be
13712 harmful for stdout, as stdout might not be open.
13713 * src/reduce.c (reduce_print): Likewise.
13714
13715 2002-12-27 Paul Eggert <eggert@twinsun.com>
13716
13717 Fix a bug where error locations were not being recorded correctly.
13718 This problem was originally reported by Paul Hilfinger in
13719 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13720
13721 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13722 top of the location stack's error locations.
13723 (yyerrlab): Set it. When discarding a token, push its location
13724 onto yylerrsp so that we don't lose track of the error's end.
13725 (yyerrlab1): Now is only the target of YYERROR, so that we can
13726 properly record the location of the action that failed. For GCC
13727 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13728 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13729 (yyerrlab2): New label, which yyerrlab now falls through to.
13730 Compute the error's location by applying YYLLOC_DEFAULT to
13731 the locations of all the symbols that went into the error.
13732 * doc/bison.texinfo (Location Default Action): Mention that
13733 YYLLOC_DEFAULT is also invoked for syntax errors.
13734 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13735 Error locations include the locations of all the tokens that were
13736 discarded, not just the last token.
13737
13738 2002-12-26 Paul Eggert <eggert@twinsun.com>
13739
13740 * src/files.c: Include quote.h.
13741 (compute_output_file_names): Warn if we detect conflicting
13742 outputs to the same file. This should catch the misunderstanding
13743 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13744
13745 * src/conflicts.c (conflicts_print): If the user specifies
13746 "%expect N", report an error if there are any reduce/reduce
13747 conflicts. This is what the manual says should happen.
13748 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13749 * tests/conflicts.at (%expect with reduce conflicts): New test.
13750
13751 Don't use m4_include on relative file names, as it doesn't work as
13752 desired if there happens to be a file with that name under ".".
13753
13754 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13755 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13756 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13757 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13758 * src/output.c (output_skeleton): Use full path names when
13759 specifying a file to include; don't rely on include path, as
13760 it's unreliable when the working file contains a file with
13761 that name.
13762
13763 2002-12-25 Paul Eggert <eggert@twinsun.com>
13764
13765 Remove obsolete references to bison.simple and bison.hairy.
13766 Problem mentioned by Aubin Mahe in
13767 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13768 * data/glr.c: Comment fix.
13769 * doc/bison.1: Remove references. Also, mention "yacc".
13770
13771 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13772 with -g option.
13773
13774 * src/parse-gram.y (declaration): Use enum "report_states" rather
13775 than its numeric value 1.
13776
13777 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13778 opening a new one. This fixes Debian bug 165349, reported by
13779 Bruce Stephens.
13780
13781 2002-12-24 Paul Eggert <eggert@twinsun.com>
13782
13783 Version 1.75e.
13784
13785 * Makefile.maint (cvs-update): Don't assume that the shell
13786 supports $(...), as Solaris sh doesn't.
13787
13788 * src/parse-gram.y (lloc_default): Remove test for empty
13789 nonterminals at the end, since it didn't change the result.
13790
13791 2002-12-24 Paul Eggert <eggert@twinsun.com>
13792
13793 If the user does not define YYSTYPE as a macro, Bison now declares it
13794 using typedef instead of defining it as a macro. POSIX requires this.
13795 For consistency, YYLTYPE is also declared instead of defined.
13796
13797 %union directives can now have a tag before the `{', e.g., the
13798 directive `%union foo {...}' now generates the C code
13799 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13800 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13801 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13802 instead of `yyltype'.
13803
13804 `yystype' and `yyltype' are now obsolescent macros instead of being
13805 typedefs or tags; they are no longer documented and will be
13806 withdrawn in a future release.
13807
13808 * data/glr.c (b4_location_type): Remove.
13809 (YYSTYPE): Renamed from yystype.
13810 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13811 (struct YYLTYPE): Renamed from struct yyltype.
13812 (YYLTYPE): Renamed from yyltype.
13813 (yyltype, yystype): New (and obsolescent) macros,
13814 for backward compatibility.
13815 * data/yacc.c: Likewise.
13816
13817 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13818 does not specify a union tag. This is for compatibility with
13819 Solaris 9 yacc.
13820
13821 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13822 const *, since it is now modified by stripping surrounding { }.
13823 (current_braced_code): Remove.
13824 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13825 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13826 trailing " {...}". Now of type <chars>.
13827 (grammar_declaration): Adjust to bundled tokens.
13828 (code_content): Remove; stripping is now done by add_param.
13829 (print_token_value): Print contents of bundled tokens.
13830 (token_name): New function.
13831
13832 * src/reader.h (braced_code, current_braced_code): Remove.
13833 (token_name): New decl.
13834
13835 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13836 token_type, not braced_code code_kind. All uses changed.
13837 (SC_PRE_CODE): New state, for scanning after a keyword that
13838 has (or usually has) an immediately-following braced code.
13839 (token_type): New local var, to keep track of which token type
13840 to return when scanning braced code.
13841 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13842 <INITIAL>"%parse-param", <INITIAL>"%printer",
13843 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13844 instead of returning a token type immediately.
13845 (<INITIAL>"{"): Set token type.
13846 (<SC_BRACED_CODE>"}"): Use it.
13847 (handle_action_dollar, handle_action_at): Now returns bool
13848 indicating success. Fail if ! current_rule; this prevents a core dump.
13849 (handle_symbol_code_dollar, handle_symbol_code_at):
13850 Remove; merge body into caller.
13851 (handle_dollar, handle_at): Complain in invalid contexts.
13852
13853 * NEWS, doc/bison.texinfo: Document the above.
13854 * NEWS: Fix years and program names in copyright notice.
13855
13856 2002-12-17 Paul Eggert <eggert@twinsun.com>
13857
13858 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13859 Reporting, Table of Symbols): Omit mentions of %lex-param and
13860 %parse-param from the documentation for now.
13861
13862 2002-12-15 Paul Eggert <eggert@twinsun.com>
13863
13864 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13865 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13866 lookahead symbol, and which sets yychar in parser actions) and it
13867 disagreed with the Bison documentation. Bug
13868 reported by Andrew Walrond.
13869
13870 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13871 as the caller now does that.
13872 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13873 (YYEMPTY): Parenthesize right hand side, since others use it.
13874 (yyparse): Don't assume that our generated code is the only code
13875 that sets yychar.
13876
13877 2002-12-13 Paul Eggert <eggert@twinsun.com>
13878
13879 Version 1.75d.
13880
13881 POSIX requires a "yacc" command.
13882 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13883 (MOSTLYCLEANFILES): Add yacc.
13884 (yacc): New rule.
13885 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13886 as an alias for bison y.
13887
13888 * po/LINGUAS: Add da.
13889
13890 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13891 problem with latest <getopt.h>.
13892 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13893
13894 * doc/fdl.texi: Upgrade to 1.2.
13895 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13896 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13897 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13898 gnulib.
13899 * config/install-sh: Sync with autotools.
13900
13901 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13902 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13903 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13904 locations are requested.
13905 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13906 locations are requested.
13907
13908 2002-12-12 Paul Eggert <eggert@twinsun.com>
13909
13910 Remove unportable casts and storage allocation tricks.
13911 While we're at it, remove almost all casts, since they
13912 usually aren't needed and are a sign of trouble.
13913
13914 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13915
13916 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13917 the pointer DSET returned by malloc; this isn't portable.
13918 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13919 Similarly for DERIVES.
13920 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13921 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13922 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13923
13924 * src/derives.c (derives_compute): Do not bother invoking
13925 int_of_rule_number, since rule numbers are integers.
13926
13927 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13928 rather than XMALLOC (char, N).
13929
13930 * src/files.c (filename_split): Rewrite to avoid cast.
13931
13932 * src/gram.h (symbol_number_as_item_number,
13933 item_number_as_symbol_number, rule_number_as_item_number,
13934 item_number_as_rule_number):
13935 Now inline functions rather than macros, to avoid casts.
13936 * src/state.h (state_number_as_int): Likewise.
13937 * src/tables.c (state_number_to_vector_number,
13938 symbol_number_to_vector_number): Likewise.
13939
13940 * src/gram.h (int_of_rule_number): Remove; no longer used.
13941
13942 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13943 since the resulting storage is always stored into.
13944
13945 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13946 where it's needed.
13947
13948 * src/muscle_tab.c (muscle_m4_output):
13949 Now inline. Return bool, not int.
13950 * src/state.c (state_compare): Likewise.
13951 * src/symtab.c (symbol_check_defined,
13952 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13953 hash_compare_symbol, hash_symbol):
13954 Likewise.
13955 * src/uniqstr.c (uniqstr_print): Likewise.
13956 * src/muscle_tab.c (muscle_m4_output_processor):
13957 New function, to avoid casts.
13958 * src/state.c (state_comparator, stage_hasher): Likewise.
13959 * src/symtab.c (symbol_check_defined_processor,
13960 symbol_check_alias_consistency_processor, symbol_pack_processor,
13961 symbol_translation_processor, hash_symbol_comparator,
13962 hash_symbol_hasher): Likewise.
13963 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13964 * src/muscle_tab.c (muscles_m4_output):
13965 Use new functions instead of casting old functions unportably.
13966 * src/state.c (state_hash_new): Likewise.
13967 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13968 symbols_token_translations_init):
13969 Likewise.
13970 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13971
13972 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13973 var instead of casting to long, to avoid casts.
13974 (prepare_states): Use MALLOC rather than alloca, so that we don't
13975 have to worry about alloca.
13976 * src/state.c (state_hash_lookup): Likewise.
13977
13978 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13979 local var instead of casting to unsigned char, to avoid casts.
13980
13981 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13982 STATE_ALLOC): Remove.
13983 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13984 rather than calloc, and use offsetof to avoid allocating slightly
13985 too much storage.
13986 (state_new): Initialize all members.
13987
13988 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13989
13990 * src/symtab.c (symbol_free): Remove; unused.
13991 (symbol_get): Remove cast in lhs of assignment.
13992 (symbols_do): Now static. Accept generic arguments, not
13993 hashing-related ones.
13994
13995 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13996 (symbol_processor): Remove.
13997 (symbols_do): Remove decl; now static.
13998
13999 * src/system.h (alloca): Remove; decl no longer needed.
14000 (<stddef.h>): Include, for offsetof.
14001 (<inttypes.>, <stdint.h>): Include if available.
14002 (uintptr_t): New type, if system lacks it.
14003 (CALLOC, MALLOC, REALLOC): New macros.
14004 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
14005 new macros.
14006
14007 * src/tables.c (table_size): Now int, to pacify GCC.
14008 (table_grow, table_ninf_remap): Use signed table size.
14009 (save_row): Don't bother initializing locals when not needed.
14010 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14011 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14012
14013 * src/vcg.h: Correct misspellings.
14014
14015 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14016
14017
14018 * src/getargs.c (getargs): Don't assume EOF == -1.
14019
14020 2002-12-09 Paul Eggert <eggert@twinsun.com>
14021
14022 Change identifier spellings to avoid collisions with names
14023 that are reserved by POSIX.
14024
14025 Don't use names ending in _t, since POSIX reserves them.
14026 For consistency, remove _e and _s endings -- they're weren't
14027 needed to remove ambiguity. All uses changed.
14028 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14029 turn was just renamed from struniq_t.
14030 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14031 which in turn was just renamed from struniq_processor_t.
14032 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14033 in turn was renamed from hash_compare_struniq_t.
14034 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14035 (state_list): Renamed from state_list_t.
14036 * src/assoc.h (assoc): Renamed from assoc_t.
14037 * src/conflicts.c (enum conflict_resolution): Renamed from
14038 enum conflict_resolution_e.
14039 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14040 (rule_list): Renamed from rule_list_t.
14041 * src/getargs.h (enum trace): Renamed from enum trace_e.
14042 (enum report): Renamed from enum report_e.
14043 * src/gram.h (item_number): Renamed from item_number_t.
14044 (rule_number): Renamed from rule_number_t.
14045 (struct rule_s): Remove the "rule_s" part; not used.
14046 (rule): Renamed from rule_t.
14047 (rule_filter): Renamed from rule_filter_t.
14048 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14049 (goto_list): Renamed from goto_list_t.
14050 * src/lalr.h (goto_number): Renamed from goto_number_t.
14051 * src/location.h (location): Renamed from location_t.
14052 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14053 and moved here from:
14054 * src/muscle_tab.h (muscle_entry_t): here.
14055 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14056 (rule_list): Renamed from rule_list_t.
14057 * src/print_graph.c (static_graph): Renamed from graph.
14058 * src/reader.h (braced_code): Renamed from braced_code_t.
14059 Remove brace_code_e tag.
14060 * src/relation.h (relation_node): Renamed from relation_node_t.
14061 (relation_nodes): Renamed from relation_nodes_t.
14062 (relation): Renamed from relation_t.
14063 * src/state.h (state_number): Renamed from state_number_t.
14064 (struct state): Renamed from struct state_s.
14065 (state): Renamed from state_t.
14066 (transitions): Renamed from transitions_t. Unused (and
14067 misspelled) transtion_s tag removed.
14068 (errs): Renamed from errs_t. Unused errs_s tag removed.
14069 (reductions): Renamed from reductions_t. Unused tag
14070 reductions_s removed.
14071 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14072 (struct symbol_list): Renamed from struct symbol_list_s.
14073 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14074 (struct symbol): Renamed from struct symbol_s.
14075 (symbol): Renamed from symbol_t.
14076 * src/tables.c (vector_number): Renamed from vector_number_t.
14077 (action_number): Renamed from action_t.
14078 * src/tables.h (base_number): Renamed from base_t.
14079 * src/vcg.h (enum color): Renamed from enum color_e.
14080 (enum textmode): Renamed from enum textmode_e.
14081 (enum shape): Renamed from enum shape_e.
14082 (struct colorentry): Renamed from struct colorentry_s.
14083 (struct classname): Renamed from struct classname_s.
14084 (struct infoname): Renamed from struct infoname_s.
14085 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14086 (enum decision): Renamed from enum decision_e.
14087 (enum orientation): Renamed from enum orientation_e.
14088 (enum alignment): Renamed from enum alignment_e.
14089 (enum arrow_mode): Renamed from enum arrow_mode_e.
14090 (enum crossing_type): Renamed from enum crossing_type_e.
14091 (enum view): Renamed from enum view_e.
14092 (struct node): Renamed from struct node_s.
14093 (node): Renamed from node_t.
14094 (enum linestyle): Renamed from enum linestyle_e.
14095 (enum arrowstyle): Renamed from enum arrowstyle_e.
14096 (struct edge): Renamed from struct edge.
14097 (edge): Renamed from edge_t.
14098 (struct graph): Renamed from struct graph_s.
14099 (graph): Renamed from graph_t.
14100 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14101 Rename value_t -> value.
14102 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14103 value_t_as_yystype -> value_as_yystype.
14104
14105 Don't include <errno.h> in the mainstream code, since it
14106 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14107 * lib/get-errno.c, lib/get-errno.h: New files.
14108 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14109 get-errno.c.
14110 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14111 * src/output.c (output_skeleton): Likewise.
14112 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14113 instead of errno.
14114 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14115 Likewise.
14116 (handle_action_dollar, handle_action_at): Likewise.
14117 * src/system.h: Do not include <errno.h>.
14118 (TAB_EXT): Renamed from EXT_TAB.
14119 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14120
14121 Avoid str[a-z]*, since <string.h> reserves that name space.
14122 Change all instances of "struniq" in names to "uniqstr", and
14123 likewise for "STRUNIQ" and "UNIQSTR".
14124 * src/uniqstr.c: Renamed from src/struniq.c.
14125 * src/uniqstr.h: Renamed from src/struniq.h.
14126 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14127 * src/files.c (strsuffix): Remove; unused.
14128 (concat2): Renamed from stringappend. Now static.
14129 * src/files.h (strsuffix, stringappend): Remove; unused.
14130 * src/parse-gram.y (<chars>): Renamed from <string>.
14131 (<uniqstr>): Renamed from <struniq>.
14132 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14133 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14134 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14135 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14136 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14137 (N_EXPAND): Renamed from N_STRETCH.
14138
14139 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14140 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14141 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14142 Remove; unused.
14143 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14144 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14145 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14146 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14147 (BASE_MAXIMUM): Renamed from BASE_MAX.
14148 (BASE_MINIMUM): Renamed from BASE_MIN.
14149 (ACTION_MAX): Remove; unused.
14150 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14151 Unnecessary casts removed from above defines.
14152
14153
14154 Fix misspelling in names.
14155 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14156 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14157 G_NODE_ALIGNEMENT.
14158
14159
14160 * lib/timevar.c (timevar_report): Renamed from time_report,
14161 for consistency with other names.
14162 * lib/timevar.h (timevar_report): New decl.
14163 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14164
14165
14166 Sort include-file uses.
14167
14168 Reorder all include files under src to be in the order "system.h".
14169 then the ../lib include files in angle brackets (alphabetized),
14170 then the . include files in double-quotes (alphabetized). Fix
14171 dependency breakages encountered in this process, as follows:
14172 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14173 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14174 * src/state.h: Include "symtab.h".
14175
14176 2002-12-08 Paul Eggert <eggert@twinsun.com>
14177
14178 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14179 since this causes problems when __file__ contains character
14180 sequences like "@" that are treated specially by src/scan-skel.l.
14181 Instead, just use the file's basename. This fixes the bug
14182 reported by Martin Mokrejs in
14183 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
14184
14185 2002-12-06 Paul Eggert <eggert@twinsun.com>
14186
14187 Add support for rules that do not have trailing semicolons, as
14188 POSIX requires. Improve the quality of locations in Bison
14189 diagnostics.
14190
14191 * src/location.c: Include <quotearg.h>.
14192 (empty_location): Now const.
14193 (location_print): New function. Follow the recommendation of the
14194 GNU Coding Standards for locations that span file boundaries.
14195 * src/location.h: Do not include <quotearg.h>; no longer needed.
14196 (boundary): New type.
14197 (location_t): Use it. This allows locations to span file boundaries.
14198 All member uses changed: file -> start.file or end.file (as needed),
14199 first_line -> start.line, first_column -> start.column,
14200 last_line -> end.line, last_column -> end.column.
14201 (equal_boundaries): New function.
14202 (LOCATION_RESET, LOCATION_STEP): Remove.
14203 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14204 (empty_location): Now const.
14205 (location_print): New decl.
14206 * src/parse-gram.y (lloc_default): New function, which handles
14207 empty locations more accurately.
14208 (YYLLOC_DEFAULT): Use it.
14209 (%token COLON): Remove.
14210 (%token ID_COLON): New token.
14211 (rules): Use it.
14212 (declarations, rules): Remove trailing semicolon.
14213 (declaration, rules_or_grammar_declaration):
14214 Allow empty (";") declaration.
14215 (symbol_def): Remove empty actions; no longer needed.
14216 (rules_or_grammar_declaration): Remove trailing semicolon.
14217 (semi_colon.opt): Remove.
14218 * src/reader.h: Include location.h.
14219 (scanner_cursor): New decl.
14220 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14221 rolling our own.
14222 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14223 of *loc.
14224 (STEP): Remove. No longer needed, now that adjust_location does
14225 the work. All uses removed.
14226 (scanner_cursor): New var.
14227 (adjust_location): Renamed from extend_location. It now sets
14228 *loc and adjusts the scanner cursor. All uses changed.
14229 Don't bother testing for CR.
14230 (handle_syncline): Remove location arg; now updates scanner cursor.
14231 All callers changed.
14232 (unexpected_end_of_file): Now accepts start boundary of token or
14233 comment, not location. All callers changed. Update scanner cursor,
14234 not the location.
14235 (SC_AFTER_IDENTIFIER): New state.
14236 (context_state): Renamed from c_context. All uses changed.
14237 (id_loc, code_start, token_start): New local vars.
14238 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14239 processing of Yacc white space and equivalents here.
14240 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14241 instead of returning ID immediately, since we need to search for
14242 a subsequent colon.
14243 (<INITIAL>"'", "\""): Save token_start.
14244 (<INITIAL>"%{", "{", "%%"): Save code_start.
14245 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14246 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14247 BEGIN context_state at end, not INITIAL.
14248 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14249 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14250 Return correct token start.
14251 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14252 the start of a character, string or multiline comment is found.
14253 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14254 Reduction): Adjust reported locations to match the more-precise
14255 results now expected.
14256 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14257 * tests/reduce.at (Useless Rules, Reduced Automaton,
14258 Underivable Rules): Likewise.
14259 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14260 or "|"' now that so many other tokens are allowed by the new grammar.
14261
14262 * src/complain.h (current_file): Remove duplicate decl;
14263 current_file is now owned by files.h.
14264 * src/complain.c, src/scan-gram.l: Include files.h.
14265
14266 2002-12-06 Paul Eggert <eggert@twinsun.com>
14267
14268 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14269 promotes to int; it might be unsigned int.
14270 * data/yacc.c (yy_reduce_print): Likewise.
14271
14272 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14273 be #defined in the prologue, not in the Bison declarations.
14274 This fixes Debian Bug 102878, reported by Shaul Karl.
14275
14276 2002-12-02 Paul Eggert <eggert@twinsun.com>
14277
14278 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14279 * lib/strtoul.c: New file, from gnulib.
14280 This fixes a porting bug reported by Peter Klein in
14281 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
14282
14283 2002-11-30 Paul Eggert <eggert@twinsun.com>
14284
14285 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14286 and put only a forward declaration in the prologue. This is for
14287 consistency with the other scanner helper functions.
14288
14289 Type clashes now generate warnings, not errors, since it
14290 appears that POSIX may allow some grammars with type clashes.
14291 * src/reader.c (grammar_current_rule_check): Warn about
14292 type clashes instead of complaining.
14293 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14294
14295 Add Yacc library, since POSIX requires it.
14296 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14297 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14298 * lib/main.c, lib/yyerror.c: New files.
14299
14300 gram_error can be static; it need not be extern.
14301 * src/reader.h (gram_error): Remove decl.
14302 * src/parse-gram.y (gram_error): Now static. Add static decl.
14303 (print_token_value): Omit parameter names from forward decl,
14304 for consistency.
14305
14306 2002-11-29 Paul Eggert <eggert@twinsun.com>
14307
14308 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14309 be declared before being used. E.g., one should typically
14310 declare them in the prologue. Use GNU coding style in examples.
14311 Put "const" consistently after the type it modifies. Mention
14312 that C99 supports "inline". Mention that yyerror traditionally
14313 returns "int".
14314
14315 %parse-param and %lex-param now take just one argument, the
14316 declaration; the argument name is deduced from the declaration.
14317
14318 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14319 Reporting, Table of Symbols): Document this.
14320 * src/parse-gram.y (add_param): New function.
14321 (COMMA): Remove.
14322 (declaration): Implement new rule for %parse-param and %lex-param.
14323 * src/scan-gram.l: "," now elicits a warning, rather than being
14324 a token; this is more compatible with byacc.
14325 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14326
14327 2002-11-27 Paul Eggert <eggert@twinsun.com>
14328
14329 Rename identifiers to avoid real and potential collisions.
14330
14331 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14332 to avoid collision with lex macro described by Bruce Lilly in
14333 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
14334 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14335 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14336 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14337 All uses changed.
14338 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14339 The name "yycontrol" violates the name space rules, and this stuff
14340 wasn't being used anyway.
14341 (input): Remove action; this stuff wasn't being used.
14342 (gram_error): Rename local variable yylloc -> loc.
14343 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14344 (YY_DECL): Don't use "yy" at start of local variables.
14345 All uses changed, e.g., yylloc -> loc.
14346 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14347 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14348 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14349 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14350
14351 * src/parse-gram.y (gram_error): loc is now const *.
14352 * src/reader.h (gram_error): Likewise.
14353
14354 2002-11-24 Paul Eggert <eggert@twinsun.com>
14355
14356 Version 1.75c.
14357
14358 * tests/actions.at (Actions after errors): Use an output format
14359 more similar to that of the Printers and Destructors test.
14360 Test the position of the ';' token too.
14361 (Printers and Destructors): Likewise.
14362 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14363 unnecessarily alarming people when the test fails.
14364
14365 * data/yacc.c (yyerrlab1): Move this label down, so that the
14366 parser does not discard the lookahead token if the user code
14367 invokes YYERROR. This change is required for POSIX conformance.
14368
14369 * lib/error.c: Sync with gnulib.
14370
14371 2002-11-22 Paul Eggert <eggert@twinsun.com>
14372
14373 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14374 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14375 * lib/xmalloc.c: Likewise.
14376
14377 2002-11-20 Paul Eggert <eggert@twinsun.com>
14378
14379 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14380
14381 2002-11-20 Paul Eggert <eggert@twinsun.com>
14382
14383 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14384 should use `if (! x) abort ();' rather than `assert (x);', and
14385 anyway it's one less thing to worry about configuring.
14386
14387 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14388 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14389 and replace all instances of assert with abort.
14390 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14391 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14392
14393 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14394 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14395 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14396 hash_find_entry, hash_rehash, hash_insert): Likewise.
14397 * src/conflicts.c (resolve_sr_conflict): Likewise.
14398 * src/lalr.c (set_goto_map, map_goto): Likewise.
14399 * src/nullable.c (nullable_compute): Likewise.
14400 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14401 * src/reader.c (packgram, reader): Likewise.
14402 * src/state.c (state_new, state_free, state_transitions_set,
14403 state_reduction_find): Likewise.
14404 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14405 symbol_pack): Likewise.
14406 * src/tables.c (conflict_row, pack_vector): Likewise.
14407 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14408 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14409 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14410 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14411
14412 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14413 (ARGMATCH_CONSTRAINT): New macro.
14414 (ARGMATCH_ASSERT): Use it.
14415
14416 * src/system.h (verify): New macro.
14417 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14418 rather than assert.
14419 * src/tables.c (tables_generate): Likewise.
14420
14421 * src/struniq.c (struniq_assert): Now returns void, and aborts
14422 if the assertion is false.
14423 (struniq_assert_p): Remove.
14424 * src/struniq.h: Likewise.
14425
14426 2002-11-18 Paul Eggert <eggert@twinsun.com>
14427
14428 * data/glr.c (yygetLRActions): Replace `yyindex' with
14429 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14430 This fixes the regression with Sun ONE Studio 7 cc that I reported in
14431 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
14432
14433 2002-11-18 Akim Demaille <akim@epita.fr>
14434
14435 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14436 space.
14437 From Tim Van Holder.
14438
14439 2002-11-17 Paul Eggert <eggert@twinsun.com>
14440
14441 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14442 to "SyntaxError" for consistency with my 2002-11-15 change.
14443
14444 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14445 not define to {}, since this breaks the common use of `YYDPRINTF
14446 ((...));' if a single statement is desired (e.g. before `else').
14447 Work around GCC warnings by surrounding corresponding calls with
14448 {} if needed.
14449 (yyhasResolvedValue): Remove unused function.
14450 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14451 loop body.
14452 (yyreportSyntaxError): Renamed from yyreportParseError.
14453 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14454 All uses changed.
14455 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14456 extern when possible. Remove unused initializations.
14457
14458 2002-11-16 Akim Demaille <akim@epita.fr>
14459
14460 Augment the similarity between GLR and LALR traces.
14461
14462 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14463 (YY_REDUCE_PRINT): New.
14464 (yyparse): Use them.
14465 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14466 YYDPRINT here.
14467 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14468 state reached after the reduction/recovery, since...
14469 (yyparse, yyprocessOneStack): Report the state we are entering in.
14470
14471 2002-11-16 Akim Demaille <akim@epita.fr>
14472
14473 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14474 Add support for --trace=skeleton.
14475 * src/scan-skel.l: %option debug.
14476 Scan strings of non-@ or \n instead of character by character.
14477 (scan_skel): Handle trace_skeleton.
14478 (QPUTS): New.
14479 (@output_parser_name@, @output_header_name@): ``Restore'' their
14480 support (used to be M4 macros).
14481 * data/yacc.c: Quote larger chunks, a la glr.c.
14482 * data/lalr1.cc: Likewise.
14483 The header guards are no longer available, so use some other
14484 string than `YYLSP_NEEDED'.
14485
14486 2002-11-16 Akim Demaille <akim@epita.fr>
14487
14488 Make the ``Printers and Destructors'' test more verbose, taking
14489 `yacc.c''s behavior as (possibly wrong) reference.
14490
14491 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14492 instead of fprint on stdout.
14493 Set and report the last_line of the symbols.
14494 Consistently display values and locations.
14495
14496 2002-11-16 Paul Eggert <eggert@twinsun.com>
14497
14498 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14499
14500 2002-11-15 Paul Eggert <eggert@twinsun.com>
14501
14502 * tests/actions.at (Actions after errors): New test case.
14503
14504 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14505 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14506 tests/action.at, tests/calc.at, tests/conflicts.at,
14507 tests/cxx-type.at, tests/regression.at:
14508 "parse error" -> "syntax error" for POSIX compatibility.
14509 "parsing stack overflow..." -> "parser stack overflow" so
14510 that code matches Bison documentation.
14511
14512 2002-11-15 Akim Demaille <akim@epita.fr>
14513
14514 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14515 take two BRACED_CODE, not two string_content.
14516 Free the scanner's obstack when we are done.
14517 (code_content): New.
14518 * tests/calc.at: Adjust.
14519 * doc/bison.texinfo: Adjust.
14520 Also, make sure to include the `,' for these declarations.
14521
14522 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14523
14524 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14525 definition; avoids potential autoreconf problems.
14526
14527 2002-11-15 Akim Demaille <akim@epita.fr>
14528
14529 Always check the value returned by yyparse.
14530
14531 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14532 returned by yyparse.
14533 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14534 Adjust calls.
14535 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14536 returned by yyparse.
14537
14538 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14539
14540 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14541 on input.at test.
14542
14543 2002-11-14 Paul Eggert <eggert@twinsun.com>
14544
14545 * src/output.c (output_skeleton): Call xfopen instead of
14546 duplicating xfopen's body.
14547
14548 Fix bugs reported by Nelson H. F. Beebe in
14549 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14550
14551 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14552 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14553 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14554 file twice in the grammar, as an extra check.
14555
14556 * tests/input.at (Torturing the Scanner): Surround the
14557 backslash-newline tests with "#if 0", to make it less likely that
14558 we'll run into compiler bugs. Bring back solitary \ inside
14559 comment, but add a closing comment to work around HP C bug. Don't
14560 test backslash-newline in C character constant.
14561
14562 2002-11-14 Akim Demaille <akim@epita.fr>
14563
14564 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14565 status of the compiler.
14566 Calling `exit 1' is no longer needed.
14567 Reported by Nelson H. F. Beebe.
14568
14569 2002-11-14 Akim Demaille <akim@epita.fr>
14570
14571 * tests/atlocal.in (CPPFLAGS): We have config.h.
14572 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14573 New.
14574 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14575 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14576 * tests/regression.at, tests/torture.at: Use them for all the
14577 grammars that are to be compiled.
14578 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14579 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14580 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14581
14582 2002-11-14 Akim Demaille <akim@epita.fr>
14583
14584 * doc/bison.texinfo: Various formatting changes (alignments in
14585 samples, additional @group/@end group, GCS in samples.
14586 Use @deffn instead of simple @table to define the directives,
14587 macros, variables etc.
14588
14589 2002-11-13 Paul Eggert <eggert@twinsun.com>
14590
14591 Fix some bugs reported by Albert Chin-A-Young in
14592 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14593
14594 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14595 -o c"; the HP C compiler chatters during compilation.
14596 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14597 * tests/headers.at (export YYLTYPE): Likewise.
14598
14599 * tests/input.at (Torturing the Scanner): Remove lines containing
14600 solitary backslashes, as they tickle a bug in the HP C compiler.
14601
14602 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14603 comments, since they're not portable. Use GNU coding style.
14604
14605 2002-11-13 Akim Demaille <akim@epita.fr>
14606
14607 * data/yacc.c: Leave bigger chunks of quoted text.
14608 (YYDSYMPRINTF): New.
14609 Use it to report symbol activities.
14610 * data/glr.c (YYDSYMPRINTF): New.
14611 Use it.
14612
14613 2002-11-12 Paul Eggert <eggert@twinsun.com>
14614
14615 Version 1.75b.
14616
14617 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14618 (yyglrReduce): Return yyok, not 0.
14619 This should avoid the enumerated-type warnings reported
14620 by Nelson H. F. Beebe in
14621 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14622
14623 * lib/bbitset.h (BITSET_INLINE): Remove.
14624 * lib/bitset.h [! BITSET_INLINE]: Remove.
14625 (bitset_set, bitset_reset, bitset_test): Rename local vars
14626 to avoid shadowing warnings by GCC.
14627
14628 * data/glr.c (inline): Remove #define. It's the user's
14629 responsibility to #define it away, just like 'const'.
14630 This fixes one of the bugs reported by Nelson H. F. Beebe in
14631 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14632
14633 * Makefile.maint (po-check): Scan .l and .y files instead of the
14634 .c and the .h files that they generate. This fixes the bug
14635 reported by Tim Van Holder in:
14636 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14637 Look for N_ as well as for _. Try to avoid matching #define for
14638 N_ and _.
14639 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14640 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14641 * src/scan-gram.l: Revamp regular expressions so that " and '
14642 do not confuse xgettext.
14643
14644 * src/struniq.h (struniq_new): Do not declare the return type
14645 to be 'const'; this violates the C standard.
14646 * src/struniq.c (struniq_new): Likewise.
14647
14648 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14649
14650 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14651 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14652 linker.
14653
14654 2002-11-12 Akim Demaille <akim@epita.fr>
14655
14656 * Makefile.maint: Sync with Autoconf:
14657 (local_updates): New.
14658
14659 2002-11-12 Akim Demaille <akim@epita.fr>
14660
14661 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14662
14663 2002-11-12 Akim Demaille <akim@epita.fr>
14664
14665 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14666 locations.
14667
14668 2002-11-12 Akim Demaille <akim@epita.fr>
14669
14670 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14671 not yyvalue.
14672
14673 2002-11-12 Akim Demaille <akim@epita.fr>
14674
14675 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14676 Use it to test the GLR parser.
14677
14678 2002-11-12 Akim Demaille <akim@epita.fr>
14679
14680 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14681 defines it.
14682 * data/glr.c (yystos): New.
14683 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14684 (YYDSYMPRINT): New.
14685 (yyval): Don't define it, it is handled via M4.
14686 (yyrecoverParseError): Free verbosely the discarded symbols.
14687 * data/yacc.c (yysymprint): Remove, rather...
14688 (b4_yysymprint_generate): invoke.
14689 * data/c.m4 (b4_yysymprint_generate): New.
14690 Accept pointers as arguments, as opposed to the version from
14691 yacc.c.
14692 (b4_yydestruct_generate): Likewise.
14693 * tests/cations.at (Printers and Destructors): Use Bison directives
14694 instead of CPP macros.
14695 Don't rely on internal details.
14696
14697 2002-11-12 Akim Demaille <akim@epita.fr>
14698
14699 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14700 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14701 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14702 it against YYEMPTY and so forth), work on yytoken (i.e., set
14703 it to YYEMPTY etc.).
14704 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14705 (b4_symbol_actions): Remove.
14706 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14707 for 0, end-of-input.
14708
14709 2002-11-12 Akim Demaille <akim@epita.fr>
14710
14711 * doc/bison.texinfo (Destructor Decl): New.
14712
14713 2002-11-12 Akim Demaille <akim@epita.fr>
14714
14715 * src/tables.c (tables_generate): Use free for pointers that
14716 cannot be NULL, not XFREE.
14717 (pack_vector): Use assert, not fatal, for bound violations.
14718 * src/state.c (state_new): Likewise.
14719 * src/reader.c (reader): Likewise.
14720 * src/lalr.c (set_goto_map): Likewise.
14721 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14722 the file name.
14723
14724 2002-11-12 Akim Demaille <akim@epita.fr>
14725
14726 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14727 Restore.
14728 * src/scan-gram.l (last_string): Is global to the file, not to
14729 yylex.
14730 * src/parse-gram.y (input): Don't append the epilogue here,
14731 (epilogue.opt): do it here, and free the scanner's obstack.
14732 * src/reader.c (epilogue_set): Rename as...
14733 (epilogue_augment): this.
14734 * data/c.m4 (b4_epilogue): Defaults to empty.
14735
14736 2002-11-12 Akim Demaille <akim@epita.fr>
14737
14738 * src/getargs.c (long_options): Remove duplicates.
14739 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14740 Remove.
14741 * doc/bison.rnh: Remove.
14742 * doc/bison.texinfo (VMS Invocation): Remove.
14743
14744 2002-11-12 Akim Demaille <akim@epita.fr>
14745
14746 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14747 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14748
14749 Use struniq for symbols.
14750
14751 * src/symtab.h (symbol_t): The tag member is a struniq.
14752 (symbol_type_set): Adjust.
14753 * src/symtab.c (symbol_new): Takes a struniq.
14754 (symbol_free): Don't free the tag member.
14755 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14756 (hash_compare_symbol, hash_symbol): these.
14757 Use the fact that tags as struniqs.
14758 (symbol_get): Use struniq_new.
14759 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14760 Returns a strniq.
14761 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14762 and type members are struniqs.
14763 * src/reader.c (get_merge_function)
14764 (grammar_current_rule_merge_set): Adjust.
14765 (TYPE, current_type): Are struniq.
14766
14767 Use struniq for file names.
14768
14769 * src/files.h, src/files.c (infile): Split into...
14770 (grammar_file, current_file): these.
14771 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14772 * src/reduce.c (reduce_print): Likewise.
14773 * src/getargs.c (getargs): Likewise.
14774 * src/complain.h, src/complain.c: Likewise.
14775 * src/main.c (main): Call struniqs_new early enough to use it for
14776 file names.
14777 Don't free the input file name.
14778
14779 2002-11-12 Akim Demaille <akim@epita.fr>
14780
14781 * src/symtab.c (symbol_free): Remove dead deactivated code:
14782 type_name are properly removed.
14783 Don't use XFREE to free items that cannot be NULL.
14784 * src/struniq.h, src/struniq.c: New.
14785 * src/main.c (main): Initialize/free struniqs.
14786 * src/parse-gram.y (%union): Add astruniq member.
14787 (yyprint): Adjust.
14788 * src/scan-gram.l (<{tag}>): Return a struniq.
14789 Free the obstack bit that used to store it.
14790 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14791
14792 2002-11-11 Paul Eggert <eggert@twinsun.com>
14793
14794 Revamp to fix many (but not all) of the C- and M4-related quoting
14795 problems. Among other things, this fixes the Bison bug reported
14796 by Jan Hubicka when processing the Bash grammar; see:
14797 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14798
14799 Use new @ escapes consistently. Represent brackets with @{ and @}
14800 rather than @<:@ and @:>@, since this works a bit better with dumb
14801 editors like vi. Represent @ with @@, since @ is now consistently
14802 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14803 __ofile__, to avoid unexpected expansions. Similarly, use @output
14804 rather than #output.
14805
14806 * data/c.m4 (b4_copyright): Omit file name from comment, since
14807 the file name could contain "*/".
14808 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14809 be quoted. All uses changed.
14810
14811 * data/glr.c: Use new @ escapes consistently.
14812 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14813 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14814 Remove, since they couldn't handle arbitrary characters in file
14815 names.
14816 * data/lalr1.cc: Likewise.
14817 * data/yacc.c: Likewise.
14818
14819 * src/files.c (output_infix): Remove; all uses removed.
14820 * src/files.h: Likewise.
14821
14822 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14823 mishandled funny characters in file names, and anyway it isn't
14824 needed any more.
14825 * data/yacc.c: Likewise.
14826 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14827
14828 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14829 * data/yacc.c: Likewise.
14830
14831 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14832 strings now.
14833 (muscle_init): Quote filename as a C string.
14834 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14835 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14836 * src/output.c (escaped_file_name_output): New function.
14837 (prepare_symbols): Quote tokens for M4.
14838 (prepare): Don't insert output_infix, output_prefix,
14839 output_parser_name, output_header_name; this is now down by scan-skel.
14840 Insert skeleton as a C string.
14841
14842 * src/output.c (user_actions_output, symbol_destructors_output,
14843 symbol_printers_output): Quote filenames for C and M4.
14844 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14845
14846 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14847 escapes other than \\ and \'; this simplifies the code.
14848 (<SC_STRING>): Likewise, for \\ and \".
14849 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14850 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14851 Use new escapes @{ and @} for [ and ].
14852
14853 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14854 them with auto vars.
14855 Switch to new escape scheme, where @ is the escape character uniformly.
14856 Abort if a stray escape character is found. Avoid unbounded input
14857 buffer when parsing non-escaped text.
14858
14859 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14860 __oline__, #output, $@, and @{ do not have unintended meanings.
14861
14862 2002-11-09 Paul Eggert <eggert@twinsun.com>
14863
14864 Fix the test failure due to GCC warnings described in
14865 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14866 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14867 evaluate to 0 if it's impossible for NINF to be in the respective
14868 table.
14869 (yygetLRActions, yyrecoverParseError): Use them.
14870
14871 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14872 counted in the token inserted at end of file. Now takes
14873 location_t *, not location_t, so that the location can be
14874 adjusted. All uses changed.
14875
14876 * tests/regression.at (Invalid inputs): Adjust wording in
14877 diagnostic to match the new behavior.
14878
14879 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14880 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14881 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14882 abort ();'. This reduces the runtime of the "Many lookaheads"
14883 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14884 GCC 3.2.
14885
14886 2002-11-07 Paul Eggert <eggert@twinsun.com>
14887
14888 * src/parse-gram.y (CHARACTER): Remove unused token.
14889 All uses removed.
14890
14891 * src/scan-gram.l: Remove stack option. We no longer use the
14892 stack, since the stack was never deeper than 1; instead, use the
14893 new auto var c_context to record the stacked value.
14894
14895 Remove nounput option. At an unexpected end of file, we now unput
14896 the minimal input necessary to end cleanly; this simplifies the
14897 code.
14898
14899 Avoid unbounded token sizes where this is easy.
14900
14901 (unexpected_end_of_file): New function.
14902 Use it to systematize the error message on unexpected EOF.
14903 (last-string): Now auto, not static.
14904 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14905 (scanner_last_string_free): Remove; not used.
14906 (percent_percent_count): Move decl to just before use.
14907 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14908 not the (never otherwised-used) CHARACTER.
14909
14910 2002-11-07 Akim Demaille <akim@epita.fr>
14911
14912 Let yyerror always receive the msg as last argument, so that
14913 yyerror can be variadic.
14914
14915 * data/yacc.c (b4_yyerror_args): New.
14916 Use it when calling yyerror.
14917 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14918 Use it when calling yyerror.
14919 * doc/bison.texinfo (Error Reporting): Adjust.
14920 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14921 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14922
14923 2002-11-06 Akim Demaille <akim@epita.fr>
14924
14925 #line should have quoted strings.
14926 Ideally, this should be done by m4_quotearg.
14927
14928 * src/scan-skel.l: Include quotearg.h.
14929 Quote __ofile__.
14930 * src/output.c (symbol_printers_output)
14931 (symbol_destructors_output): Quote the file name.
14932
14933 2002-11-06 Akim Demaille <akim@epita.fr>
14934
14935 * tests/regression.at (Invalid inputs): Adjust to the recent
14936 messages.
14937
14938 2002-11-06 Akim Demaille <akim@epita.fr>
14939
14940 Restore --no-lines.
14941 Reported by Jim Kent.
14942
14943 * data/c.m4 (b4_syncline): New.
14944 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14945 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14946 * src/output.c (user_actions_output): Likewise.
14947 (prepare): Define 'b4_synclines_flag'.
14948 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14949
14950 2002-11-06 Akim Demaille <akim@epita.fr>
14951
14952 * src/main.c (main): Free `infile'.
14953 * src/scan-gram.l (handle_syncline): New.
14954 Recognize `#line'.
14955 * src/output.c (user_actions_output, symbol_destructors_output)
14956 (symbol_printers_output): Use the location's file name, not
14957 infile.
14958 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14959
14960 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14961
14962 * src/tables.c (matching_state): Don't allow states to match if
14963 either has GLR conflict entries.
14964
14965 2002-11-05 Paul Eggert <eggert@twinsun.com>
14966
14967 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14968 "integer out of range" rather than "invalid value".
14969 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14970 accordingly.
14971
14972 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14973 Also, remove one static variable in the scanner.
14974
14975 * src/scan-gram.l (braces_level): Now auto, not static.
14976 Initialize to zero if the compiler is being picky.
14977 (INITIAL): Clear braces_level instead of incrementing it.
14978 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14979 as POSIX 1003.1-2001 requires.
14980 * src/system.h (IF_LINT): New macro, taken from coreutils.
14981 * configure.ac: Define "lint" if --enable-gcc-warnings.
14982
14983 2002-11-05 Akim Demaille <akim@epita.fr>
14984
14985 * src/scan-gram.l: When it starts with `%', complain about the
14986 whole directive, not just that `invalid character: %'.
14987
14988 2002-11-04 Akim Demaille <akim@epita.fr>
14989
14990 * Makefile.maint: Update from Autoconf.
14991 (update, cvs-update, po-update, do-po-update): New.
14992
14993 2002-11-04 Akim Demaille <akim@epita.fr>
14994
14995 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14996 and yyerror.
14997 Have yyerror `use' its arguments.
14998 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14999 returns true when location & yacc & pure & parse-param.
15000 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
15001
15002 2002-11-04 Akim Demaille <akim@epita.fr>
15003
15004 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
15005 clashes.
15006 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15007 font-lock-mode.
15008 Use complain_at.
15009 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15010 slot 0.
15011
15012 2002-11-03 Paul Eggert <eggert@twinsun.com>
15013
15014 * src/reader.c (get_merge_function, grammar_current_rule_check):
15015 Use consistent diagnostics for reporting type name clashes.
15016 Quote the types with <>, for consistency with Yacc.
15017 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15018
15019 2002-11-03 Akim Demaille <akim@epita.fr>
15020
15021 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15022 New.
15023 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15024 (b4_parse_param): Remove.
15025 Use b4_identification.
15026 Propagate b4_pure_args where needed to pass them to yyerror.
15027 * data/glr.m4 (b4_parse_param): Remove.
15028 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15029 (b4_lpure_formals): New.
15030 Use b4_identification.
15031 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15032 b4_user_formals and b4_user_args.
15033 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15034 (yyreportAmbiguity): When using a pure parser, also need
15035 the location, and the parse-params.
15036 Adjust callers.
15037 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15038 When using a pure parser, also need the parse-params.
15039 Adjust callers.
15040 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15041 (%pure-parser + %parse-param) LALR and GLR parsers.
15042 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15043 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15044 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15045 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15046 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15047 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15048 * doc/bison.texinfo: Untabify the whole file.
15049 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15050 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15051 (Error Reporting): Adjust to these new directives.
15052 Document %error-verbose, deprecate YYERROR_VERBOSE.
15053
15054 2002-11-03 Akim Demaille <akim@epita.fr>
15055
15056 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15057 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15058 command line options.
15059 * tests/cxx-type.at: Formatting changes.
15060
15061 2002-11-03 Paul Eggert <eggert@twinsun.com>
15062
15063 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15064 to count columns correctly, and to check for invalid inputs.
15065
15066 Use mbsnwidth to count columns correctly. Account for tabs, too.
15067 Include mbswidth.h.
15068 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15069 (extend_location): New function.
15070 (YY_LINES): Remove.
15071
15072 Handle CRLF in C code rather than in Lex code.
15073 (YY_INPUT): New macro.
15074 (no_cr_read): New function.
15075
15076 Scan UCNs, even though we don't fully handle them yet.
15077 (convert_ucn_to_byte): New function.
15078
15079 Handle backslash-newline correctly in C code.
15080 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15081 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15082 all uses changed.
15083 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15084 Use {splice} wherever C allows backslash-newline.
15085 YY_STEP after space, newline, vertical-tab.
15086 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
15087
15088 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15089
15090 ({int}, handle_action_dollar, handle_action_at): Check for integer
15091 overflow.
15092
15093 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15094
15095 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15096 as well as \000. Check for UCHAR_MAX, not 255.
15097 Allow \x with an arbitrary positive number of digits, as in C.
15098 Check for overflow here.
15099 Allow \? and UCNs, for compatibility with C.
15100
15101 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15102 with quote slot used by complain_at.
15103
15104 * tests/input.at: Add tests for backslash-newline, m4 quotes
15105 in symbols, long literals, and funny escapes in strings.
15106
15107 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15108 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15109 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15110 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15111 * m4/mbswidth.m4: New file, from GNU coreutils.
15112
15113 * doc/bison.texinfo (Grammar Outline): Document // comments.
15114 (Symbols): Document that trigraphs have no special meaning in Bison,
15115 nor is backslash-newline allowed.
15116 (Actions): Document that trigraphs have no special meaning.
15117
15118 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15119 no longer used.
15120
15121 2002-11-02 Paul Eggert <eggert@twinsun.com>
15122
15123 * src/reader.c: Don't include quote.h; not needed.
15124 (get_merge_function): Reword warning to be consistent with
15125 type clash diagnostic in grammar_current_rule_check.
15126
15127 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15128 bug in trigraph handling.
15129
15130 * src/output.c (prepare_symbols): When printing token names,
15131 escape "[" as "@<:@" and likewise for "]".
15132
15133 * src/system.h (errno): Remove declaration, as we are now
15134 assuming C89 or better, and C89 guarantees errno.
15135
15136 2002-10-30 Paul Eggert <eggert@twinsun.com>
15137
15138 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15139 Check for close failures.
15140 * src/files.h (xfclose): Return void, not int, since it always
15141 returned zero.
15142 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15143 indicates one.
15144 * src/output.c (output_skeleton): Use xfclose rather than fclose
15145 and ferror. xfclose now checks ferror.
15146
15147 * data/glr.c (YYLEFTMOST_STATE): Remove.
15148 (yyreportTree): Use a stack-based leftmost state. This avoids
15149 our continuing battles with bogus warnings about initializers.
15150
15151 2002-10-30 Akim Demaille <akim@epita.fr>
15152
15153 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15154 #if.
15155
15156 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15157
15158 * tests/glr-regr1.at: New test for reported regressions.
15159 * tests/testsuite.at: Add glr-regr1.at test.
15160 * tests/Makefile.am: Add glr-regr1.at test.
15161
15162 2002-10-24 Paul Eggert <eggert@twinsun.com>
15163
15164 Version 1.75a.
15165
15166 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15167 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15168 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15169 Don't assume strdup exists; POSIX says its an XSI extension.
15170 Check for buffer overflow on input.
15171
15172 2002-10-24 Akim Demaille <akim@epita.fr>
15173
15174 * src/output.c (output_skeleton): Don't disable M4sugar comments
15175 too soon: it results in comments being expanded.
15176 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15177 first output.
15178
15179 2002-10-24 Akim Demaille <akim@epita.fr>
15180
15181 * data/yacc.c (m4_int_type): New.
15182 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15183 char' as only yacc.c wants K&R portability.
15184 * data/glr.c (yysigned_char): Remove.
15185 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15186 Reported by Quoc Peyrot.
15187
15188 2002-10-23 Paul Eggert <eggert@twinsun.com>
15189
15190 * src/main.c (main): With --trace=time, report times even if a
15191 non-fatal error occurs. Formerly, the times were reported in some
15192 such cases but not in others.
15193 * src/reader.c (reader): Just return if a complaint has been issued,
15194 instead of exiting, so that 'main' can report times.
15195
15196 2002-10-22 Akim Demaille <akim@epita.fr>
15197
15198 * src/system.h: Include sys/types.
15199 Reported by Bert Deknuydt.
15200
15201 2002-10-23 Paul Eggert <eggert@twinsun.com>
15202
15203 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15204 Suggested by Art Haas.
15205
15206 2002-10-22 Paul Eggert <eggert@twinsun.com>
15207
15208 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15209 decl; not needed any more.
15210 * src/main.c (main): Use return to exit, undoing yesterday's change.
15211 The last OS that we could find where this wouldn't work is
15212 SunOS 3.5, and that's too old to worry about now.
15213
15214 * data/glr.c (struct yyltype): Define members even when not
15215 doing locations. This is more consistent with yacc.c, and it
15216 works around the following bug reports:
15217 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15218 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
15219
15220 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15221 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15222 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15223
15224 2002-10-22 Akim Demaille <akim@epita.fr>
15225
15226 * data/README: New.
15227
15228 2002-10-21 Paul Eggert <eggert@twinsun.com>
15229
15230 Be consistent about 'bool'; the old code used an enum in one
15231 module and an int in another, and this violates the C standard.
15232 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15233 * configure.ac (AC_HEADER_STDBOOL): Add.
15234 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15235 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15236 * src/symtab.c (hash_compare_symbol_t): Likewise.
15237 * src/system.h (bool, false, true): Use a definition consistent
15238 with ../lib/hash.c. All uses changed.
15239
15240 * src/complain.c (warning_issued): Renamed from warn_message_count,
15241 so that we needn't worry about integer overflow (!).
15242 Now of type bool. All uses changed.
15243 (complaint_issued): Renamed from complain_message_count; likewise.
15244
15245 * src/main.c (main): Use exit to exit with failure.
15246
15247 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15248 rather than 1 and 0.
15249 * src/main.c (main): Likewise.
15250 * src/getargs.c (getargs): Likewise.
15251 * src/reader.c (reader): Likewise.
15252
15253 * src/getarg.c (getargs): Remove duplicate code for
15254 "Try `bison --help'".
15255
15256 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15257 What was that "2" for?
15258
15259 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15260 * src/getargs.c (usage): Likewise.
15261
15262 * src/getargs.c (getargs): When there are too few operands, report
15263 the last one. When there are too many, report the first extra
15264 one. This is how diffutils does it.
15265
15266 2002-10-20 Paul Eggert <eggert@twinsun.com>
15267
15268 Remove K&R vestiges.
15269 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15270 * src/complain.c (VA_START): Remove. Assume prototypes.
15271 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15272 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15273 fatal): Assume prototypes.
15274 * src/complain.h: Assume prototypes.
15275 * src/system.h (PARAMS): Remove.
15276 Include <limits.h> unconditionally, since it's guaranteeed even
15277 for a freestanding C89 compiler.
15278 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15279 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
15280
15281 2002-10-20 Akim Demaille <akim@epita.fr>
15282
15283 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15284 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15285 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15286 (yyresolveStates, yyresolveAction, yyresolveStack)
15287 (yyprocessOneStack): Use them.
15288 (yy_reduce_print): New.
15289 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15290
15291 2002-10-20 Akim Demaille <akim@epita.fr>
15292
15293 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15294 arguments and output `void'.
15295 (b4_c_function): Rename as...
15296 (b4_c_function_def): this.
15297 (b4_c_function_decl, b4_c_ansi_function_def)
15298 (b4_c_ansi_function_decl): New.
15299 Change the interpretation of the arguments: before `int, foo', now
15300 `int foo, foo'.
15301 * data/yacc.c (yyparse): Prototype and define thanks to these.
15302 Adjust b4_c_function_def uses.
15303 * data/glr.c (yyparse): Likewise, but ANSI only.
15304
15305 2002-10-20 Akim Demaille <akim@epita.fr>
15306
15307 * src/output.c (prepare): Move the definition of `tokens_number',
15308 `nterms_number', `undef_token_number', `user_token_number_max'
15309 to...
15310 (prepare_tokens): Here.
15311 (prepare_tokens): Rename as...
15312 (prepare_symbols): this.
15313 (prepare): Move the definition of `rules_number' to...
15314 (prepare_rules): here.
15315 (prepare): Move the definition of `last', `final_state_number',
15316 `states_number' to...
15317 (prepare_states): here.
15318 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15319
15320 2002-10-20 Akim Demaille <akim@epita.fr>
15321
15322 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15323
15324 2002-10-20 Akim Demaille <akim@epita.fr>
15325
15326 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15327 * data/c.m4: here.
15328
15329 2002-10-20 Akim Demaille <akim@epita.fr>
15330
15331 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15332 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15333 `pair'.
15334 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15335 `name' to...
15336 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15337 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15338 These.
15339
15340 2002-10-19 Paul Eggert <eggert@twinsun.com>
15341
15342 Do not create a temporary file, as that involves security and
15343 cleanup headaches. Instead, use a pair of pipes.
15344 Derived from a suggestion by Florian Krohm.
15345 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15346 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15347 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15348 (BISON_PREREQ_SUBPIPE): Add.
15349 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15350 Add subpipe.h, subpipe.c.
15351 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15352 * po/POTFILES.in: Add lib/subpipe.c.
15353 * src/output.c: Include "subpipe.h".
15354 (m4_invoke): Remove decl.
15355 (scan_skel): New decl.
15356 (output_skeleton): Use pipe rather than temporary file for m4 input.
15357 Check that m4sugar.m4 is readable, to avoid deadlock.
15358 Check for pipe I/O error.
15359 * src/scan-skel.l (readpipe): Remove decl.
15360 (scan_skel): New function, to be used in place of m4_invoke.
15361 Read from stream rather than file.
15362
15363 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15364 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15365 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15366 this generates a more-accurate value anyway.
15367
15368 * lib/timevar.c (timervar_accumulate): Rename locals to
15369 avoid confusion with similarly-named more-global.
15370 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15371
15372 * src/output.c (prepare): Use xstrdup to convert char const *
15373 to char *, to avoid GCC warning.
15374
15375 2002-10-19 Akim Demaille <akim@epita.fr>
15376
15377 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15378 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15379 Use them to have `calc.y' ready for %pure-parser.
15380 * data/yacc.c (YYLEX): Pass a yylex return type to
15381 b4_c_function_call.
15382
15383 2002-10-19 Akim Demaille <akim@epita.fr>
15384
15385 Prototype support of %lex-param and %parse-param.
15386
15387 * src/parse-gram.y: Add the definition of the %lex-param and
15388 %parse-param tokens, plus their rules.
15389 Drop the `_' version of %glr-parser.
15390 Add the "," token.
15391 * src/scan-gram.l (INITIAL): Scan them.
15392 * src/muscle_tab.c: Comment changes.
15393 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15394 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15395 (muscle_entry_s): The `value' member is no longer const.
15396 Adjust all dependencies.
15397 * src/muscle_tab.c (muscle_init): Adjust: use
15398 MUSCLE_INSERT_STRING.
15399 Initialize the obstack earlier.
15400 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15401 (muscle_pair_list_grow): New.
15402 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15403 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15404 * tests/calc.at: Use %locations, not --locations.
15405 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15406
15407 2002-10-19 Akim Demaille <akim@epita.fr>
15408
15409 * src/getargs.c (usage): Take status as argument and exit
15410 accordingly.
15411 Report the traditional `Try ... --help' message when status != 0.
15412 (usage, version): Don't take a FILE * as arg, it is pointless.
15413 (getargs): When there is an incorrect number of arguments, make it
15414 an error, and report it GNUlically thanks to `usage ()'.
15415
15416 2002-10-18 Paul Eggert <eggert@twinsun.com>
15417
15418 * data/glr.c (yyreportParseError): Don't assume that sprintf
15419 yields the length of the printed string, as this is not true
15420 on SunOS 4.1.4. Reported by Peter Klein.
15421
15422 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15423 * tests/conflicts.at (%nonassoc and eof): Likewise.
15424 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15425
15426 2002-10-17 Akim Demaille <akim@epita.fr>
15427
15428 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15429 * src/getargs.c (trace_types, trace_args): Adjust.
15430 * src/reader.c (grammar_current_rule_prec_set)
15431 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15432 Standardize error messages.
15433 And s/@prec/%prec/!
15434 (reader): Use trace_flag to enable scanner/parser debugging,
15435 instead of an adhoc scheme.
15436 * src/scan-gram.l: Remove trailing debugging code.
15437
15438 2002-10-16 Paul Eggert <eggert@twinsun.com>
15439
15440 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15441 MUSCLE_TAB_H.
15442
15443 * NEWS: Officially drop support for building Bison with K&R C,
15444 since it didn't work anyway and it's not worth worrying about.
15445 * Makefile.maint (wget_files): Remove ansi2knr.c.
15446 (ansi2knr.c-url_prefix): Remove.
15447 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15448 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15449 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15450
15451 2002-10-15 Paul Eggert <eggert@twinsun.com>
15452
15453 Stop using the "enum_" trick for K&R-style function definitions;
15454 it confused me, and I was the author! Instead, assume that people
15455 who want to use K&R C compilers (when using these modules in GCC,
15456 perhaps?) will run ansi2knr.
15457
15458 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15459 All uses of "enum_" changed to "enum ".
15460 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15461 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15462
15463 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15464 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15465 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15466 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15467 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15468 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15469 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15470 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15471 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15472 Use function prototypes; this removes the need for declaring
15473 static functions simply to provide their prototypes.
15474 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15475 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15476 bitset_count_, bitset_create, bitset_dump, bitset_first,
15477 bitset_free, bitset_init, bitset_last, bitset_next,
15478 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15479 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15480 bitset_print, bitset_release_memory, bitset_toggle_,
15481 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15482 debug_bitset): Likewise.
15483 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15484 * lib/bitset_stats.c (bitset_log_histogram_print,
15485 bitset_percent_histogram_print, bitset_stats_and,
15486 bitset_stats_and_cmp, bitset_stats_and_or,
15487 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15488 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15489 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15490 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15491 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15492 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15493 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15494 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15495 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15496 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15497 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15498 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15499 bitset_stats_zero): Likewise.
15500 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15501 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15502 bitsetv_dump, debug_bitsetv): Likewise.
15503 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15504 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15505 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15506 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15507 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15508 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15509 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15510 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15511 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15512 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15513 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15514 Likewise.
15515 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15516 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15517 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15518 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15519 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15520 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15521 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15522 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15523 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15524 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15525 lbitset_xor_cmp, lbitset_zero): Likewise.
15526
15527 2002-10-14 Akim Demaille <akim@epita.fr>
15528
15529 Version 1.75.
15530
15531 2002-10-14 Akim Demaille <akim@epita.fr>
15532
15533 * tests/Makefile.am (maintainer-check-posix): New.
15534
15535 2002-10-14 Akim Demaille <akim@epita.fr>
15536
15537 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15538 member.
15539
15540 2002-10-14 Akim Demaille <akim@epita.fr>
15541
15542 * src/tables.c (table_ninf_remap): base -> tab.
15543 Reported by Matt Rosing.
15544
15545 2002-10-14 Paul Eggert <eggert@twinsun.com>
15546
15547 * tests/action.at, tests/calc.at, tests/conflicts.at,
15548 tests/cxx-type.at, tests/headers.at, tests/input.at,
15549 tests/regression.at, tests/synclines.at, tests/torture.at:
15550 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15551 so that the tests still work even if POSIXLY_CORRECT is set.
15552 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15553
15554 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15555 for portability to K&R hosts. Fix typo: signed char is guaranteed
15556 only to 127, not to 128.
15557 * data/glr.c (yysigned_char): New type.
15558 * data/yacc.c (yysigned_char): Likewise.
15559 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15560
15561 2002-10-13 Paul Eggert <eggert@twinsun.com>
15562
15563 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15564 true due to limited range of data type" warning from GCC.
15565
15566 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15567 by wrapping enum yytokentype's definition inside #ifndef
15568 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15569
15570 2002-10-13 Akim Demaille <akim@epita.fr>
15571
15572 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15573 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15574
15575 2002-10-13 Akim Demaille <akim@epita.fr>
15576
15577 * Makefile.maint: Update from Autoconf 2.54.
15578 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15579
15580 2002-10-13 Akim Demaille <akim@epita.fr>
15581
15582 * src/print.c (print_state): Separate the list of solved conflicts
15583 from the other items.
15584 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15585
15586 2002-10-13 Akim Demaille <akim@epita.fr>
15587
15588 Let nondeterministic skeletons be usable with deterministic
15589 tables.
15590
15591 With the patch, GAWK compiled by GCC without -O2 passes its test
15592 suite using a GLR parser driven by LALR tables. It fails with -O2
15593 because `struct stat' gives two different answers on my machine:
15594 88 (definition of an auto var) and later 96 (memset on this var).
15595 Hence the stack is badly corrumpted. The headers inclusion is to
15596 blame: if I move the awk.h inclusion before GLR's system header
15597 inclusion, the two struct stat have the same size.
15598
15599 * src/tables.c (pack_table): Always create conflict_table.
15600 (token_actions): Always create conflict_list.
15601 * data/glr.c (YYFLAG): Remove, unused.
15602
15603 2002-10-13 Akim Demaille <akim@epita.fr>
15604
15605 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15606 (O0FLAGS): New.
15607 (VALGRIND, GXX): New.
15608 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15609 * tests/bison.in: Run $PREBISON a pre-command.
15610 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15611 (maintainer-check-g++): New.
15612 * Makefile.am (maintainer-check): New.
15613
15614 2002-10-13 Akim Demaille <akim@epita.fr>
15615
15616 * data/glr.c: Formatting changes.
15617 Tweak some trace messages to match yacc.c's.
15618
15619 2002-10-13 Akim Demaille <akim@epita.fr>
15620
15621 GLR parsers sometimes raise parse errors instead of performing the
15622 default reduction.
15623 Reported by Charles-Henry de Boysson.
15624
15625 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15626 check the length of the traces when %glr.
15627 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15628 GLR's traces.
15629 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15630 Test GLR parsers.
15631 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15632 (yyltype): Remove the yy prefix from the member names.
15633 (yytable): Complete its comment.
15634 (yygetLRActions): Map error action number from YYTABLE from
15635 YYTABLE_NINF to 0.
15636 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15637 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15638 not satisfying as we could compare an YYACTION computed from
15639 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15640 only value for error actions.
15641 (yyreportParseError): In verbose parse error messages, don't issue
15642 `error' in the list of expected tokens.
15643 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15644 next action to perform to match glr.c's decoding.
15645 (yytable): Complete its comment.
15646
15647 2002-10-13 Paul Eggert <eggert@twinsun.com>
15648
15649 Fix problem reported by Henrik Grubbstroem in
15650 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15651 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15652 because the Bison parser reads the second action before reducing
15653 the first one.
15654 * src/scan-gram.l (rule_length): New static var.
15655 Use it to keep track of the rule length in the scanner, since
15656 we can't expect the parser to be in lock-step sync with the scanner.
15657 (handle_action_dollar, handle_action_at): Use this var.
15658 * tests/actions.at (Exotic Dollars): Test for the problem.
15659
15660 2002-10-12 Paul Eggert <eggert@twinsun.com>
15661
15662 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15663 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15664 Include <sys/time.h> when checking for clock_t and struct tms.
15665 Use same include order as source.
15666 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15667 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15668
15669 * lib/timevar.c: Update copyright date and clarify comments.
15670 (get_time) [IN_GCC]: Keep the GCC version for reference.
15671
15672 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15673 GCC version as of today, then merge Bison's changes.
15674 Change "GCC" to "Bison" in copyright notice. timevar.def's
15675 author is Akim, so change that too.
15676
15677 * src/reader.c (grammar_current_rule_check):
15678 Don't worry about the default action if $$ is untyped.
15679 Prevents bogus warnings reported by Jim Gifford in
15680 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15681
15682 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15683 * data/glr.c, data/lalr1.cc, data/yacc.c:
15684 Output token definitions before the first part of user declarations.
15685 Fixes compatibility problem reported by Jim Gifford for kbd in
15686 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15687
15688 2002-10-11 Paul Eggert <eggert@twinsun.com>
15689
15690 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15691 (yyparse): here. This undoes some of the 2002-07-25 change.
15692 Compatibility problem reported by Ralf S. Engelschall with
15693 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15694
15695 2002-10-11 Akim Demaille <akim@epita.fr>
15696
15697 * tests/regression.at Characters Escapes): New.
15698 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15699 characters.
15700 Reported by Jan Nieuwenhuizen.
15701
15702 2002-10-11 Akim Demaille <akim@epita.fr>
15703
15704 * po/id.po: New.
15705
15706 2002-10-10 Paul Eggert <eggert@twinsun.com>
15707
15708 Portability fixes for bitsets; this also avoids several GCC
15709 warnings.
15710
15711 * lib/abitset.c: Include <stddef.h>, for offsetof.
15712 * lib/lbitset.c: Likewise.
15713
15714 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15715 properly for vectors of objects. Do not assume that adding a
15716 header size to a multiple of a word size yields a value that is
15717 properly aligned for the whole union.
15718 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15719
15720 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15721 unique names for structures.
15722 * lib/ebitset.c (ebitset_bytes): Likewise.
15723 * lib/lbitset.c (lbitset_bytes): Likewise.
15724
15725 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15726 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15727 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15728 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15729 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15730 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15731 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15732 to improve the type-checking that GCC can do.
15733 * lib/bitset.c (bitset_op4_cmp): Likewise.
15734 * lib/bitset_stats.c (bitset_stats_count,
15735 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15736 bitset_stats_copy, bitset_stats_disjoint_p,
15737 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15738 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15739 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15740 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15741 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15742 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15743 bitset_stats_or_and_cmp): Likewise.
15744 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15745 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15746 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15747 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15748
15749 * lib/abitset.h: Include bitset.h, not bbitset.h.
15750 * lib/ebitset.h: Likewise.
15751 * lib/lbitset.h: Likewise.
15752
15753 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15754 All instances of parameters of type enum bitset_opts are now of
15755 type enum_bitset_opts, to conform to the C Standard, and similarly
15756 for enum_bitset_type.
15757 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15758 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15759
15760 Do not use "struct bitset_struct" to mean different things in
15761 different modules. Not only is this confusing, it violates
15762 the C Standard, which requires that structure types in different
15763 modules must be compatible if one is to be passed to the other.
15764 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15765 All instances of "struct bitset_struct *" replaced with "bitset".
15766 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15767 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15768 struct lbitset_struct, struct bitset_stats_struct): New types.
15769 All uses of struct bitset_struct changed to union bitset_union,
15770 etc.
15771 * lib/abitset.c (struct abitset_struct, abitset,
15772 struct bitset_struct): Remove.
15773 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15774 struct bitset_struct): Remove.
15775 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15776 bitset_struct): Remove.
15777 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15778 Likewise.
15779
15780 Do not call a function of type T using a call that assumes the
15781 function is of a different type U. Standard C requires that a
15782 function must be called with a type that is compatible with its
15783 definition.
15784 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15785 New decls.
15786 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15787 New functions.
15788 * lib/ebitset.c (PFV): Remove.
15789 * lib/lbitset.c (PFV): Likewise.
15790 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15791 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15792 decls.
15793 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15794 (ebitset_vtable): Use them.
15795 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15796 lbitset_xor): New functions.
15797 (lbitset_vtable): Use them.
15798
15799 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15800 Declare.
15801
15802 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15803 GCC warning.
15804 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15805 Use offsetof, for simplicity.
15806
15807 2002-10-06 Paul Eggert <eggert@twinsun.com>
15808
15809 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15810 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15811 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15812 which was inadvertently undone by the 2002-09-30 patch.
15813 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15814 the same width as int.
15815
15816 2002-10-04 Paul Eggert <eggert@twinsun.com>
15817
15818 Version 1.50.
15819
15820 * configure.ac (AC_INIT), NEWS: Increment version number.
15821
15822 * doc/bison.texinfo: Minor spelling, grammar, and white space
15823 fixes.
15824 (Symbols): Mention that any negative value returned from yylex
15825 signifies end-of-input. Warn about negative chars. Mention
15826 the portable Standard C character set.
15827
15828 The GNU coding standard says CFLAGS and YFLAGS are reserved
15829 for the installer to set.
15830 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15831 * src/Makefile.am (AM_CFLAGS): Likewise.
15832 (AM_YFLAGS): Renamed from YFLAGS.
15833
15834 Fix some MAX and MIN problems.
15835 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15836 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15837 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15838 * src/reader.c (reader): Use it.
15839
15840 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15841 POSIX 1003.1-2001 has removed fgrep.
15842
15843 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15844
15845 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15846 interpreted as signed.
15847 * lib/ebitset.c (ebitset_list): Fix bug.
15848
15849 2002-10-01 Paul Eggert <eggert@twinsun.com>
15850
15851 More fixes for 64-bit hosts and large bitsets.
15852
15853 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15854 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15855 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15856 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15857 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15858 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15859 bitset_count_): Likewise.
15860 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15861 bitset_first, bitset_last): Likewise.
15862 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15863 bitset_stats_list_reverse, bitset_stats_size,
15864 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15865 Likewise.
15866 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15867 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15868 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15869 bitsetv_reflexive_transitive_closure): Likewise.
15870 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15871 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15872 Likewise.
15873 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15874 Likewise.
15875
15876 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15877 Use size_t, not unsigned int, to count bytes.
15878 * lib/abitset.h (abitset_bytes): Likewise.
15879 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15880 Likewise.
15881 * lib/bitset.h (bitset_bytes): Likewise.
15882 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15883 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15884 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15885 * lib/ebitset.c (ebitset_bytes): Likewise.
15886 * lib/ebitset.h (ebitset_bytes): Likewise.
15887 * lib/lbitset.c (lbitset_bytes): Likewise.
15888 * lib/lbitset.h (lbitset_bytes): Likewise.
15889
15890 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15891 abitset_subset_p, abitset_disjoint_p, abitset_and,
15892 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15893 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15894 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15895 abitset_or_and, abitset_or_and_cmp):
15896 Use bitset_windex instead of unsigned int.
15897 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15898 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15899 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15900 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15901 Likewise.
15902 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15903
15904 * lib/bitset.c (bitset_print):
15905 Use proper printf formats for widths of integer types.
15906 * lib/bitset_stats.c (bitset_percent_histogram_print,
15907 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15908 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15909 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15910 * lib/lbitset.c (lbitset_bytes): Likewise.
15911
15912 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15913 BITSET_SIZE_MAX): New macros.
15914 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15915 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15916 to BITSET_WINDEX_MAX.
15917
15918 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15919 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15920 since we now return the bitset_bindex type (not int).
15921
15922 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15923 when computing sizes.
15924 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15925
15926 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15927 and avoid cast to unsigned.
15928
15929 2002-09-30 Akim Demaille <akim@epita.fr>
15930
15931 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15932 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15933 Updates from Michael Hayes.
15934
15935 2002-09-30 Art Haas <ahaas@neosoft.com>
15936
15937 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15938 invocations.
15939 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15940 defined.
15941
15942 2002-09-27 Akim Demaille <akim@epita.fr>
15943
15944 Version 1.49c.
15945
15946 2002-09-27 Akim Demaille <akim@epita.fr>
15947
15948 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15949 (Because of AC_LIBSOURCE).
15950
15951 2002-09-27 Akim Demaille <akim@epita.fr>
15952
15953 Playing with Autoscan.
15954
15955 * configure.ac: Remove the old LIBOBJ tweaks.
15956 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15957 * lib/strrchr.c: New.
15958 * lib/strtol.c: New, from the Coreutils 4.5.1.
15959
15960 2002-09-27 Akim Demaille <akim@epita.fr>
15961
15962 Playing with Autoscan.
15963
15964 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15965 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15966 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15967 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15968 Coreutils 4.5.1.
15969
15970 2002-09-24 Akim Demaille <akim@epita.fr>
15971
15972 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15973 (Frequently Asked Questions, Parser Stack Overflow): New.
15974
15975 2002-09-13 Akim Demaille <akim@epita.fr>
15976
15977 Playing with autoscan.
15978
15979 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15980 * src/files.c (skeleton_find): Remove, unused.
15981 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15982 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15983
15984 2002-09-13 Akim Demaille <akim@epita.fr>
15985
15986 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15987 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15988
15989 2002-09-13 Akim Demaille <akim@epita.fr>
15990
15991 * configure.ac: Require 2.54.
15992 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15993 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15994 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15995 Remove, provided by Autoconf macros.
15996
15997 2002-09-12 Akim Demaille <akim@epita.fr>
15998
15999 * m4/prereq.m4: Update, from Coreutils 4.5.1.
16000
16001 2002-09-12 Akim Demaille <akim@epita.fr>
16002
16003 * m4/prereq.m4: Update, from Fileutils 4.1.5.
16004 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
16005 Reported by Martin Mokrejs.
16006
16007 2002-09-10 Akim Demaille <akim@epita.fr>
16008
16009 * src/parse-gram.y: Associate a human readable string to each
16010 token type.
16011 * tests/regression.at (Invalid inputs): Adjust.
16012
16013 2002-09-10 Gary V. Vaughan <gary@gnu.org>
16014
16015 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16016 with an Autoconf-2.5x style configure.ac.
16017
16018 2002-09-06 Paul Eggert <eggert@twinsun.com>
16019
16020 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16021 exception applies only to yacc.c. This is a modification of a
16022 patch originally suggested by Akim Demaille.
16023
16024 2002-09-06 Akim Demaille <akim@epita.fr>
16025
16026 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16027 here to...
16028 * data/yacc.c: here.
16029
16030 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16031 LocationType.
16032 (b4_ltype): Default to yy::Location from location.hh.
16033
16034 2002-09-04 Jim Meyering <jim@meyering.net>
16035
16036 * data/yacc.c: Guard the declaration of yytoknum also with
16037 `#ifdef YYPRINT', so it is declared only when used.
16038
16039 2002-09-04 Akim Demaille <akim@epita.fr>
16040
16041 * configure.in: Rename as...
16042 * configure.ac: this.
16043 Bump to 1.49c.
16044
16045 2002-09-04 Akim Demaille <akim@epita.fr>
16046
16047 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16048 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16049 translate maintainer only messages.
16050
16051 2002-08-12 Paul Eggert <eggert@twinsun.com>
16052
16053 Version 1.49b.
16054
16055 * Makefile.am (SUBDIRS): Remove intl.
16056 (DISTCLEANFILES): Remove.
16057 * NEWS: Mention that GNU M4 is now required. Clarify what is
16058 meant by "larger grammars". Mention the pt_BR translation.
16059 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16060 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16061 Bump version from 0.11.2 to 0.11.5.
16062 (BISON_PREREQ_STAGE): Remove.
16063 (AM_GNU_GETTEXT): Use external gettext.
16064 (AC_OUTPUT): Remove intl/Makefile.
16065
16066 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16067
16068 * data/glr.c: Include string.h, for strlen.
16069 (yyreportParseError): Use size_t for yysize.
16070 (yy_yypstack): No longer nested inside yypstates, as nested
16071 functions are not portable. Do not assume size_t is the
16072 same width as int.
16073 (yypstates): Do not assume that ptrdiff_t is the same width
16074 as int, and similarly for yyposn and YYINDEX.
16075
16076 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16077
16078 * lib/Makefile.am (INCLUDES): Do not include from the intl
16079 directory, which has been removed.
16080 * src/Makefile.am (INCLUDES): Likewise.
16081
16082 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16083 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16084 New vars.
16085
16086 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16087 * tests/Makefile.am (EXTRA_DIST): Likewise.
16088
16089 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16090 Do not assume that bitset_windex is the same width as unsigned.
16091
16092 * lib/abitset.c (abitset_unused_clear): Do not assume that
16093 bitset_word is the same width as int.
16094 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16095 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16096 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16097 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16098 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16099
16100 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16101 portability to one's complement hosts!).
16102 * lib/ebitset.c (ebitset_op1): Likewise.
16103 * lib/lbitset.c (lbitset_op1): Likewise.
16104
16105 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16106 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16107 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16108 Sync with fileutils.
16109 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16110 lib/gettext.h: Sync with diffutils.
16111
16112 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16113 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16114
16115 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16116 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16117 check for void *.
16118
16119 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16120 size_t; the old version tried to do this but casted improperly.
16121 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16122 (bitset_test): Now returns int, not unsigned long.
16123
16124 * lib/bitset_stats.c: Include "gettext.h".
16125 (_): New macro.
16126 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16127 name locals "index", as it generates unnecessary warnings on some
16128 hosts that have an "index" function.
16129
16130 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16131 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16132 they need translation.
16133 * src/LR0.c (state_list_append, new_itemsets, get_state,
16134 append_states, generate_states): Likewise.
16135 * src/assoc.c (assoc_to_string): Likewise.
16136 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16137 * src/gram.c (grammar_dump): Likewise.
16138 * src/injections.c (injections_compute): Likewise.
16139 * src/lalr.c (lookaheads_print): Likewise.
16140 * src/relation.c (relation_transpose): Likewise.
16141 * src/scan-gram.l: Likewise.
16142 * src/tables.c (table_grow, pack_vector): Likewise.
16143
16144 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16145 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16146 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16147 * m4/mbstate_t.m4: Sync with fileutils.
16148 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16149
16150 * po/LINGUAS: Add pt_BR.
16151 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16152 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16153 lib/timevar.c.
16154 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16155 manual recommends.
16156 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16157
16158 * src/complain.c (strerror_r): Remove decl; not needed.
16159 (strerror): Use same pattern as ../lib/error.c.
16160
16161 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16162
16163 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16164
16165 * src/main.c (main): Cast result of bindtextdomain and textdomain
16166 to void, to avoid a GCC warning when --disable-nls is in effect.
16167
16168 * src/scan-gram.l: Use strings rather than escapes when possible,
16169 to minimize the number of warnings from xgettext.
16170 (handle_action_dollar, handle_action_at): Don't use isdigit,
16171 as it mishandles negative chars and it may not work as expected
16172 outside the C locale.
16173
16174 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16175 this is a GCC extension and is not portable to other compilers.
16176
16177 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16178 Do not include <ctype.h>; no longer needed.
16179 Do not include <malloc.h>; no longer needed (and generates
16180 warnings on OpenBSD 3.0).
16181
16182 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16183 it's not portable.
16184
16185 * tests/regression.at: Do not use 'cc -c input.c -o input';
16186 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16187
16188 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16189 exit status as failure, not just exit status 1. Sun C exits
16190 with status 2 sometimes.
16191
16192 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16193 Use it for the two large tests.
16194
16195 2002-08-02 Akim Demaille <akim@epita.fr>
16196
16197 * src/conflicts.c (conflicts_output): Don't output rules never
16198 reduced here, since anyway that computation doesn't work.
16199 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16200 (rule_useless_p, rule_never_reduced_p): New.
16201 (grammar_rules_partial_print): Use a filter instead of a range.
16202 Display the title only if needed.
16203 (grammar_rules_print): Adjust.
16204 (grammar_rules_never_reduced_report): New.
16205 * src/tables.c (action_row): Move the computation of rules never
16206 reduced to...
16207 (token_actions): here.
16208 * src/main.c (main): Make the parser before making the report, so
16209 that rules never reduced are computed.
16210 Call grammar_rules_never_reduced_report.
16211 * src/print.c (print_results): Report rules never reduced.
16212 * tests/conflicts.at, tests/reduce.at: Adjust.
16213
16214 2002-08-01 Akim Demaille <akim@epita.fr>
16215
16216 Instead of attaching lookaheads and duplicating the rules being
16217 reduced by a state, attach the lookaheads to the reductions.
16218
16219 * src/state.h (state_t): Remove the `lookaheads',
16220 `lookaheads_rule' member.
16221 (reductions_t): Add a `lookaheads' member.
16222 Use a regular array for the `rules'.
16223 * src/state.c (reductions_new): Initialize the lookaheads member
16224 to 0.
16225 (state_rule_lookaheads_print): Adjust.
16226 * src/state.h, src/state.c (state_reductions_find): New.
16227 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16228 (count_rr_conflicts): Adjust.
16229 * src/lalr.c (LArule): Remove.
16230 (add_lookback_edge): Adjust.
16231 (state_lookaheads_count): New.
16232 (states_lookaheads_initialize): Merge into...
16233 (initialize_LA): this.
16234 (lalr_free): Adjust.
16235 * src/main.c (main): Don't free nullable and derives too early: it
16236 is used by --verbose.
16237 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16238
16239 2002-08-01 Akim Demaille <akim@epita.fr>
16240
16241 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16242 `rule_number_t**'.
16243 (set_derives, free_derives): Rename as...
16244 (derives_compute, derives_free): this.
16245 Adjust all dependencies.
16246 * src/nullable.c (set_nullable, free_nullable): Rename as...
16247 (nullable_compute, nullable_free): these.
16248 (rule_list_t): Store rule_t *, not rule_number_t.
16249 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16250 pointers, instead of their numbers.
16251 * src/main.c (main): Call nullable_free, and derives_free earlier,
16252 as they were lo longer used.
16253
16254 2002-08-01 Akim Demaille <akim@epita.fr>
16255
16256 * lib/timevar.c (get_time): Include children time.
16257 * src/lalr.h (LA, LArule): Don't export them: used with the
16258 state_t.
16259 * src/lalr.c (LA, LArule): Static.
16260 * src/lalr.h, src/lalr.c (lalr_free): New.
16261 * src/main.c (main): Call it.
16262 * src/tables.c (pack_vector): Check whether loc is >= to the
16263 table_size, not >.
16264 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16265 (tables_generate): do it, since that's also it which allocates
16266 them.
16267 Don't free LA and LArule, main does.
16268
16269 2002-07-31 Akim Demaille <akim@epita.fr>
16270
16271 Separate parser tables computation and output.
16272
16273 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16274 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16275 (yydefgoto, yydefact, high): Move to...
16276 * src/tables.h, src/tables.c: here.
16277 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16278 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16279 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16280 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16281 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16282 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16283 (action_row, save_row, token_actions, save_column, default_goto)
16284 (goto_actions, sort_actions, matching_state, pack_vector)
16285 (table_ninf_remap, pack_table, prepare_actions): Move to...
16286 * src/tables.c: here.
16287 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16288 * src/output.c (token_actions, output_base, output_conflicts)
16289 (output_check): Merge into...
16290 (prepare_actions): this.
16291 (actions_output): Rename as...
16292 (user_actions_output): this.
16293 * src/main.c (main): Call tables_generate and tables_free.
16294
16295 2002-07-31 Akim Demaille <akim@epita.fr>
16296
16297 Steal GCC's --time-report support.
16298
16299 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16300 stolen/adjusted from GCC.
16301 * m4/stage.m4: Remove time related checks.
16302 * m4/timevar.m4: New.
16303 * configure.in: Adjust.
16304 * src/system.h: Adjust to using timevar.h.
16305 * src/getargs.h, src/getargs.c: Support trace_time for
16306 --trace=time.
16307 * src/main.c (stage): Remove.
16308 (main): Replace `stage' invocations with timevar calls.
16309 * src/output.c: Insert pertinent timevar calls.
16310
16311 2002-07-31 Akim Demaille <akim@epita.fr>
16312
16313 Let --trace have arguments.
16314
16315 * src/getargs.h (enum trace_e): New.
16316 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16317 (long_options, short_options): --trace/-T takes an optional
16318 argument.
16319 Change all the uses of trace_flag to reflect the new flags.
16320 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16321
16322 Strengthen `stage' portability.
16323
16324 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16325 * configure.in: Use it.
16326 Don't check for malloc.h and sys/times.h.
16327 * src/system.h: Include them when appropriate.
16328 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16329 times and struct tms are available.
16330
16331 2002-07-30 Akim Demaille <akim@epita.fr>
16332
16333 In verbose parse error message, don't report `error' as an
16334 expected token.
16335 * tests/actions.at (Printers and Destructors): Adjust.
16336 * tests/calc.at (Calculator $1): Adjust.
16337 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16338 error message, do not report the parser accepts the error token in
16339 that state.
16340
16341 2002-07-30 Akim Demaille <akim@epita.fr>
16342
16343 Normalize conflict related messages.
16344
16345 * src/complain.h, src/complain.c (warn, complain): New.
16346 * src/conflicts.c (conflicts_print): Use them.
16347 (conflict_report_yacc): New, extracted from...
16348 (conflicts_print): here.
16349 * tests/conflicts.at, tests/existing.at: Adjust.
16350
16351 2002-07-30 Akim Demaille <akim@epita.fr>
16352
16353 Report rules which are never reduced by the parser: those hidden
16354 by conflicts.
16355
16356 * src/LR0.c (save_reductions): Don't make the final state too
16357 different: save its reduction (accept) instead of having a state
16358 without any action (no shift or goto, no reduce).
16359 Note: the final state is now a ``regular'' state, i.e., the
16360 parsers now contain `reduce 0' as default reduction.
16361 Nevertheless, since they decide to `accept' when yystate =
16362 final_state, they still will not reduce rule 0.
16363 * src/print.c (print_actions, print_reduction): Adjust.
16364 * src/output.c (action_row): Track reduced rules.
16365 (token_actions): Report rules never reduced.
16366 * tests/conflicts.at, tests/regression.at: Adjust.
16367
16368 2002-07-30 Akim Demaille <akim@epita.fr>
16369
16370 `stage' was accidently included in a previous patch.
16371 Initiate its autoconfiscation.
16372
16373 * configure.in: Look for malloc.h and sys/times.h.
16374 * src/main.c (stage): Adjust.
16375 Report only when trace_flag.
16376
16377 2002-07-29 Akim Demaille <akim@epita.fr>
16378
16379 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16380 state_number_t.
16381 (errs_t): symbol_t*, not symbol_number_t.
16382 (reductions_t): rule_t*, not rule_number_t.
16383 (FOR_EACH_SHIFT): New.
16384 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16385 * src/print.c, src/print_graph.c: Adjust.
16386
16387 2002-07-29 Akim Demaille <akim@epita.fr>
16388
16389 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16390
16391 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16392 (endtoken, accept): these.
16393 * src/reader.c (reader): Set endtoken's default tag to "$end".
16394 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16395 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16396 Adjust.
16397
16398 2002-07-29 Akim Demaille <akim@epita.fr>
16399
16400 * src/reduce.c (reduce_grammar): When the language is empty,
16401 complain about the start symbol, not the axiom.
16402 Use its location.
16403 * tests/reduce.at (Empty Language): New.
16404
16405 2002-07-26 Akim Demaille <akim@epita.fr>
16406
16407 * src/reader.h, src/reader.c (gram_error): ... can't get
16408 yycontrol without making too strong assumptions on the parser
16409 itself.
16410 * src/output.c (prepare_tokens): Use the real 0th value of
16411 token_translations instead of `0'.
16412 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16413 visible here.
16414 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16415 for the time being: %locations ought to provide it to yyerror.
16416
16417 2002-07-25 Akim Demaille <akim@epita.fr>
16418
16419 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16420 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16421 * tests/regression.at (Web2c Actions): Adjust.
16422
16423 2002-07-25 Akim Demaille <akim@epita.fr>
16424
16425 Stop storing rules from 1 to nrules + 1.
16426
16427 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16428 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16429 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16430 Iterate from 0 to nrules.
16431 Use rule_number_as_item_number and item_number_as_rule_number.
16432 Adjust to `derive' now containing possibly 0.
16433 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16434 Handle the `- 1' part in rule numbers from/to item numbers.
16435 * src/conflicts.c (log_resolution): Fix the message which reversed
16436 shift and reduce.
16437 * src/output.c (action_row): Initialize default_rule to -1.
16438 (token_actions): Adjust.
16439 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16440 expected output.
16441 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16442
16443 2002-07-25 Akim Demaille <akim@epita.fr>
16444
16445 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16446 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16447 (b4_c_knr_arg_decl): New.
16448 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16449 yyreport_parse_error.
16450
16451 2002-07-25 Akim Demaille <akim@epita.fr>
16452
16453 * data/yacc.c (yyreport_parse_error): New, extracted from...
16454 (yyparse): here.
16455 (yydestruct, yysymprint): Move above yyparse.
16456 Be K&R compliant.
16457
16458 2002-07-25 Akim Demaille <akim@epita.fr>
16459
16460 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16461 replace...
16462 (b4_sint_type, b4_uint_type): these.
16463 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16464 * tests/regression.at (Web2c Actions): Adjust.
16465
16466 2002-07-25 Akim Demaille <akim@epita.fr>
16467
16468 * src/gram.h (TIEM_NUMBER_MAX): New.
16469 (item_number_of_rule_number, rule_number_of_item_number): Rename
16470 as...
16471 (rule_number_as_item_number, item_number_as_rule_number): these.
16472 Adjust dependencies.
16473 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16474 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16475 (symbol_number_to_vector_number): New.
16476 (order): Of vector_number_t* type.
16477 (base_t, BASE_MAX, BASE_MIN): New.
16478 (froms, tos, width, pos, check): Of base_t type.
16479 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16480 (actrow): Of action_number_t type.
16481 (conflrow): Of unsigned int type.
16482 (table_ninf, base_ninf): New.
16483 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16484 (muscle_insert_int_table, muscle_insert_base_table)
16485 (muscle_insert_rule_number_table): New.
16486 (prepare_tokens): Output `toknum' as int_table.
16487 (action_row): Returns a rule_number_t.
16488 Use ACTION_MIN, not SHRT_MIN.
16489 (token_actions): yydefact is rule_number_t*.
16490 (table_ninf_remap): New.
16491 (pack_table): Use it for `base' and `table'.
16492 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16493 replaced with...
16494 (YYPACT_NINF, YYTABLE_NINF): these.
16495 (yypact, yytable): Compute their types instead of hard-coded
16496 `short'.
16497 * tests/regression.at (Web2c Actions): Adjust.
16498
16499 2002-07-19 Akim Demaille <akim@epita.fr>
16500
16501 * src/scan-gram.l (id): Can start with an underscore.
16502
16503 2002-07-16 Akim Demaille <akim@epita.fr>
16504
16505 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16506 Adjust all former `associativity' dependencies.
16507 * src/symtab.c (symbol_new): Default associativity is `undef', not
16508 `right'.
16509 (symbol_check_alias_consistence): Adjust.
16510
16511 2002-07-09 Akim Demaille <akim@epita.fr>
16512
16513 * doc/bison.texinfo: Properly set the ``header'' part.
16514 Use @dircategory ``GNU programming tools'' as per Texinfo's
16515 documentation.
16516 Use @copying.
16517
16518 2002-07-09 Akim Demaille <akim@epita.fr>
16519
16520 * lib/quotearg.h: Protect against multiple inclusions.
16521 * src/location.h (location_t): Add a `file' member.
16522 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16523 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16524 `error_one_per_line' support.
16525
16526 2002-07-09 Akim Demaille <akim@epita.fr>
16527
16528 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16529 * src/reader.c (lineno): Remove.
16530 Adjust all dependencies.
16531 (get_merge_function): Take a location and use complain_at.
16532 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16533 * tests/regression.at (Invalid inputs, Mixing %token styles):
16534 Adjust.
16535
16536 2002-07-09 Akim Demaille <akim@epita.fr>
16537
16538 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16539 recovery rule, and forbid extensions when --yacc.
16540 (gram_error): Use complain_at.
16541 * src/reader.c (reader): Exit if there were parse errors.
16542
16543 2002-07-09 Akim Demaille <akim@epita.fr>
16544
16545 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16546 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16547 Reported by R Blake <blakers@mac.com>.
16548
16549 2002-07-09 Akim Demaille <akim@epita.fr>
16550
16551 * data/yacc.c: Output the copyright notive in the header.
16552
16553 2002-07-03 Akim Demaille <akim@epita.fr>
16554
16555 * src/output.c (froms, tos): Are state_number_t.
16556 (save_column): sp, sp1, and sp2 are state_number_t.
16557 (prepare): Rename `final' as `final_state_number', `nnts' as
16558 `nterms_number', `nrules' as `rules_number', `nstates' as
16559 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16560 unused.
16561 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16562 * data/lalr1.cc (nsym_): Remove, unused.
16563
16564 2002-07-03 Akim Demaille <akim@epita.fr>
16565
16566 * src/lalr.h, src/lalr.c (goto_number_t): New.
16567 * src/lalr.c (goto_list_t): New.
16568 Propagate them.
16569 * src/nullable.c (rule_list_t): New.
16570 Propagate.
16571 * src/types.h: Remove.
16572
16573 2002-07-03 Akim Demaille <akim@epita.fr>
16574
16575 * src/closure.c (print_fderives): Use rule_rhs_print.
16576 * src/derives.c (print_derives): Use rule_rhs_print.
16577 (rule_list_t): New, replaces `shorts'.
16578 (set_derives): Add comments.
16579 * tests/sets.at (Nullable, Firsts): Adjust.
16580
16581 2002-07-03 Akim Demaille <akim@epita.fr>
16582
16583 * src/output.c (prepare_actions): Free `tally' and `width'.
16584 (prepare_actions): Allocate and free `order'.
16585 * src/symtab.c (symbols_free): Free `symbols'.
16586 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16587 * src/output.c (m4_invoke): Move to...
16588 * src/scan-skel.l: here.
16589 (<<EOF>>): Close yyout, and free its name.
16590
16591 2002-07-03 Akim Demaille <akim@epita.fr>
16592
16593 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16594
16595 * src/LR0.c (new_state): Merge into...
16596 (state_list_append): this.
16597 (new_states): Merge into...
16598 (generate_states): here.
16599 (set_states): Don't ensure a proper `errs' state member here, do it...
16600 * src/conflicts.c (conflicts_solve): here.
16601 * src/state.h, src/state.c: Comment changes.
16602 (state_t): Rename member `shifts' as `transitions'.
16603 Adjust all dependencies.
16604 (errs_new): For consistency, also take the values as argument.
16605 (errs_dup): Remove.
16606 (state_errs_set): New.
16607 (state_reductions_set, state_transitions_set): Assert that no
16608 previous value was assigned.
16609 (state_free): New.
16610 (states_free): Use it.
16611 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16612 temporary storage: use `errs' and `nerrs' as elsewhere.
16613 (set_conflicts): Allocate and free this `errs'.
16614
16615 2002-07-02 Akim Demaille <akim@epita.fr>
16616
16617 * lib/libiberty.h: New.
16618 * lib: Update the bitset implementation from upstream.
16619 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16620 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16621 * src/main.c: Adjust bitset stats calls.
16622
16623 2002-07-01 Paul Eggert <eggert@twinsun.com>
16624
16625 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16626 char, so that negative chars don't collide with $.
16627
16628 2002-06-30 Akim Demaille <akim@epita.fr>
16629
16630 Have the GLR tests be `warning' checked, and fix the warnings.
16631
16632 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16633 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16634 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16635 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16636 (yyaddDeferredAction): static.
16637 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16638 (yyreportParseError): yyprefix is const.
16639 yytokenp is used only when verbose.
16640 (yy__GNUC__): Replace with __GNUC__.
16641 (yypdumpstack): yyi is size_t.
16642 (yypreference): Un-yy local variables and arguments, to avoid
16643 clashes with `yyr1'. Anyway, we are not in the user name space.
16644 (yytname_size): be an int, as is compared with ints.
16645 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16646 Use them.
16647 * tests/cxx-gram.at: Use quotation to protect $1.
16648 Use AT_COMPILE to enable warnings hunts.
16649 Prototype yylex and yyerror.
16650 `Use' argc.
16651 Include `string.h', not `strings.h'.
16652 Produce and prototype stmtMerge only when used.
16653 yylex takes a location.
16654
16655 2002-06-30 Akim Demaille <akim@epita.fr>
16656
16657 We spend a lot of time in quotearg, in particular when --verbose.
16658
16659 * src/symtab.c (symbol_get): Store a quoted version of the key.
16660 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16661 Adjust all callers.
16662
16663 2002-06-30 Akim Demaille <akim@epita.fr>
16664
16665 * src/state.h (reductions_t): Rename member `nreds' as num.
16666 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16667 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16668
16669 2002-06-30 Akim Demaille <akim@epita.fr>
16670
16671 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16672 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16673 (shifts_to): Rename as...
16674 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16675 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16676 (TRANSITION_IS_DISABLED, transitions_to): these.
16677
16678 2002-06-30 Akim Demaille <akim@epita.fr>
16679
16680 * src/print.c (print_shifts, print_gotos): Merge into...
16681 (print_transitions): this.
16682 (print_transitions, print_errs, print_reductions): Align the
16683 lookaheads columns.
16684 (print_core, print_transitions, print_errs, print_state,
16685 print_grammar): Output empty lines separator before, not after.
16686 (state_default_rule_compute): Rename as...
16687 (state_default_rule): this.
16688 * tests/conflicts.at (Defaulted Conflicted Reduction),
16689 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16690 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16691
16692 2002-06-30 Akim Demaille <akim@epita.fr>
16693
16694 Display items as we display rules.
16695
16696 * src/gram.h, src/gram.c (rule_lhs_print): New.
16697 * src/gram.c (grammar_rules_partial_print): Use it.
16698 * src/print.c (print_core): Likewise.
16699 * tests/conflicts.at (Defaulted Conflicted Reduction),
16700 (Unresolved SR Conflicts): Adjust.
16701 (Unresolved SR Conflicts): Adjust and rename as...
16702 (Resolved SR Conflicts): this, as was meant.
16703 * tests/regression.at (Web2c Report): Adjust.
16704
16705 2002-06-30 Akim Demaille <akim@epita.fr>
16706
16707 * src/print.c (state_default_rule_compute): New, extracted from...
16708 (print_reductions): here.
16709 Pessimize, but clarify the code.
16710 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16711
16712 2002-06-30 Akim Demaille <akim@epita.fr>
16713
16714 * src/output.c (action_row): Let default_rule be always a rule
16715 number.
16716
16717 2002-06-30 Akim Demaille <akim@epita.fr>
16718
16719 * src/closure.c (print_firsts, print_fderives, closure):
16720 Use BITSET_EXECUTE.
16721 * src/lalr.c (lookaheads_print): Likewise.
16722 * src/state.c (state_rule_lookaheads_print): Likewise.
16723 * src/print_graph.c (print_core): Likewise.
16724 * src/print.c (print_reductions): Likewise.
16725 * src/output.c (action_row): Likewise.
16726 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16727
16728 2002-06-30 Akim Demaille <akim@epita.fr>
16729
16730 * src/print_graph.c: Use report_flag.
16731
16732 2002-06-30 Akim Demaille <akim@epita.fr>
16733
16734 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16735 to...
16736 * src/relation.h, src/relation.c (traverse, relation_digraph)
16737 (relation_print, relation_transpose): New.
16738
16739 2002-06-30 Akim Demaille <akim@epita.fr>
16740
16741 * src/state.h, src/state.c (shifts_to): New.
16742 * src/lalr.c (build_relations): Use it.
16743
16744 2002-06-30 Akim Demaille <akim@epita.fr>
16745
16746 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16747 (item_number_of_rule_number, rule_number_of_item_number): New.
16748 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16749 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16750 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16751 Propagate their use.
16752 Much remains to be done, in particular wrt `shorts' from types.h.
16753
16754 2002-06-30 Akim Demaille <akim@epita.fr>
16755
16756 * src/symtab.c (symbol_new): Initialize the `printer' member.
16757
16758 2002-06-30 Akim Demaille <akim@epita.fr>
16759
16760 * src/LR0.c (save_reductions): Remove, replaced by...
16761 * src/state.h, src/state.c (state_reductions_set): New.
16762 (reductions, errs): Rename as...
16763 (reductions_t, errs_t): these.
16764 Adjust all dependencies.
16765
16766 2002-06-30 Akim Demaille <akim@epita.fr>
16767
16768 * src/LR0.c (state_list_t, state_list_append): New.
16769 (first_state, last_state): Now symbol_list_t.
16770 (this_state): Remove.
16771 (new_itemsets, append_states, save_reductions): Take a state_t as
16772 argument.
16773 (set_states, generate_states): Adjust.
16774 (save_shifts): Remove, replaced by...
16775 * src/state.h, src/state.c (state_shifts_set): New.
16776 (shifts): Rename as...
16777 (shifts_t): this.
16778 Adjust all dependencies.
16779 * src/state.h (state_t): Remove the `next' member.
16780
16781 2002-06-30 Akim Demaille <akim@epita.fr>
16782
16783 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16784 escaped in slot 0.
16785
16786 2002-06-30 Akim Demaille <akim@epita.fr>
16787
16788 Use hash.h for the state hash table.
16789
16790 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16791 (allocate_storage): Use state_hash_new.
16792 (free_storage): Use state_hash_free.
16793 (new_state, get_state): Adjust.
16794 * src/lalr.h, src/lalr.c (states): Move to...
16795 * src/states.h (state_t): Remove the `link' member, no longer
16796 used.
16797 * src/states.h, src/states.c: here.
16798 (state_hash_new, state_hash_free, state_hash_lookup)
16799 (state_hash_insert, states_free): New.
16800 * src/states.c (state_table, state_compare, state_hash): New.
16801 * src/output.c (output_actions): Do not free states now, since we
16802 still need to know the final_state number in `prepare', called
16803 afterwards. Do it...
16804 * src/main.c (main): here: call states_free after `output'.
16805
16806 2002-06-30 Akim Demaille <akim@epita.fr>
16807
16808 * src/state.h, src/state.c (state_new): New, extracted from...
16809 * src/LR0.c (new_state): here.
16810 * src/state.h (STATE_ALLOC): Move to...
16811 * src/state.c: here.
16812 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16813 * src/state.h, src/state.c: here.
16814
16815 2002-06-30 Akim Demaille <akim@epita.fr>
16816
16817 * src/reader.c (gensym): Rename as...
16818 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16819 (getsym): Rename as...
16820 (symbol_get): this.
16821
16822 2002-06-30 Akim Demaille <akim@epita.fr>
16823
16824 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16825 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16826 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16827 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16828
16829 2002-06-30 Akim Demaille <akim@epita.fr>
16830
16831 Make the test suite pass with warnings checked.
16832
16833 * tests/actions.at (Printers and Destructors): Improve.
16834 Avoid unsigned vs. signed issues.
16835 * tests/calc.at: Don't exercise the scanner here, do it...
16836 * tests/input.at (Torturing the Scanner): here.
16837
16838 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16839
16840 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16841 reorganize first lines parallel to yacc.c.
16842
16843 2002-06-28 Akim Demaille <akim@epita.fr>
16844
16845 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16846 (b4_token_enum, b4_token_defines): New, factored from...
16847 * data/lalr1.cc, data/yacc.c, glr.c: here.
16848
16849 2002-06-28 Akim Demaille <akim@epita.fr>
16850
16851 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16852 unused variables.
16853 * src/output.c (merger_output): static.
16854
16855 2002-06-28 Akim Demaille <akim@epita.fr>
16856
16857 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16858 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16859 pacify GCC.
16860 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16861
16862 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16863
16864 Accumulated changelog for new GLR parsing features.
16865
16866 * src/conflicts.c (count_total_conflicts): Change name to
16867 conflicts_total_count.
16868 * src/conflicts.h: Ditto.
16869 * src/output.c (token_actions): Use the new name.
16870 (output_conflicts): Change conflp => conflict_list_heads, and
16871 confl => conflict_list for better readability.
16872 * data/glr.c: Use the new names.
16873 * NEWS: Add self to GLR announcement.
16874
16875 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16876
16877 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16878 Akim Demaille.
16879
16880 * data/bison.glr: Change name to glr.c
16881 * data/glr.c: Renamed from bison.glr.
16882 * data/Makefile.am: Add glr.c
16883
16884 * src/getargs.c:
16885
16886 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16887 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16888
16889 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16890
16891 * data/bison.glr: Be sure to restore the
16892 current #line when returning to the skeleton contents after having
16893 exposed the input file's #line.
16894
16895 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16896
16897 * data/bison.glr: Bring up to date with changes to bison.simple.
16898
16899 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16900
16901 * data/bison.glr: Correct definitions that use b4_prefix.
16902 Various reformatting.
16903 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16904 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16905 yytokenp argument; now part of stack.
16906 (yychar): Define to behave as documented.
16907 (yyclearin): Ditto.
16908
16909 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16910
16911 * src/reader.h: Add declaration for free_merger_functions.
16912
16913 * src/reader.c (merge_functions): New variable.
16914 (get_merge_function): New function.
16915 (free_merger_functions): New function.
16916 (readgram): Check for %prec that is not followed by a symbol.
16917 Handle %dprec and %merge declarations.
16918 (packgram): Initialize dprec and merger fields in rules array.
16919
16920 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16921 conflict_list_cnt, conflict_list_free): New variables.
16922 (table_grow): Also grow conflict_table.
16923 (prepare_rules): Output dprec and merger tables.
16924 (conflict_row): New function.
16925 (action_row): Output conflict lists for GLR parser. Don't use
16926 default reduction in conflicted states for GLR parser so that there
16927 are spaces for the conflict lists.
16928 (save_row): Also save conflict information.
16929 (token_actions): Allocate conflict list.
16930 (merger_output): New function.
16931 (pack_vector): Pack conflict table, too.
16932 (output_conflicts): New function to output yyconflp and yyconfl.
16933 (output_check): Allocate conflict_tos.
16934 (output_actions): Output conflict tables, also.
16935 (output_skeleton): Output b4_mergers definition.
16936 (prepare): Output b4_max_rhs_length definition.
16937 Use 'bison.glr' as default skeleton for GLR parsers.
16938
16939 * src/gram.c (glr_parser): New flag.
16940 (grammar_free): Call free_merger_functions.
16941
16942 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16943 all pairs of conflicting reductions, rather than just all tokens
16944 causing conflicts. Needed to size conflict tables.
16945 (conflicts_output): Modify call to count_rr_conflicts for new
16946 interface.
16947 (conflicts_print): Ditto.
16948 (count_total_conflicts): New function.
16949
16950 * src/reader.h (merger_list): New type.
16951 (merge_functions): New variable.
16952
16953 * src/lex.h (tok_dprec, tok_merge): New token types.
16954
16955 * src/gram.h (rule_s): Add dprec and merger fields.
16956 (glr_parser): New flag.
16957
16958 * src/conflicts.h (count_total_conflicts): New function.
16959
16960 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16961
16962 * doc/bison.texinfo (Generalized LR Parsing): New section.
16963 (GLR Parsers): New section.
16964 (Language and Grammar): Mention GLR parsing.
16965 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16966 Correct typo ("tge" -> "the").
16967
16968 * data/bison.glr: New skeleton for GLR parsing.
16969
16970 * tests/cxx-gram.at: New tests for GLR parsing.
16971
16972 * tests/testsuite.at: Include cxx-gram.at.
16973
16974 * tests/Makefile.am: Add cxx-gram.at.
16975
16976 * src/parse-gram.y:
16977
16978 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16979
16980 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16981
16982 2002-06-27 Akim Demaille <akim@epita.fr>
16983
16984 * src/options.h, src/options.c: Remove.
16985 * src/getargs.c (short_options, long_options): New.
16986
16987 2002-06-27 Akim Demaille <akim@epita.fr>
16988
16989 * data/bison.simple, data/bison.c++: Rename as...
16990 * data/yacc.c, data/lalr1.cc: these.
16991 * doc/bison.texinfo (Environment Variables): Remove.
16992
16993 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16994
16995 * src/getargs.c (report_argmatch): Initialize strtok().
16996
16997 2002-06-20 Akim Demaille <akim@epita.fr>
16998
16999 * data/bison.simple (b4_symbol_actions): New, replaces...
17000 (b4_symbol_destructor, b4_symbol_printer): these.
17001 (yysymprint): Be sure to call YYPRINT only for tokens, and using
17002 user token numbers.
17003
17004 2002-06-20 Akim Demaille <akim@epita.fr>
17005
17006 * data/bison.simple (yydestructor): Rename as...
17007 (yydestruct): this.
17008
17009 2002-06-20 Akim Demaille <akim@epita.fr>
17010
17011 * src/symtab.h, src/symtab.c (symbol_type_set)
17012 (symbol_destructor_set, symbol_precedence_set): The location is
17013 the last argument.
17014 Adjust all callers.
17015
17016 2002-06-20 Akim Demaille <akim@epita.fr>
17017
17018 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17019 internals.
17020 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17021 Takes a location.
17022 * src/symtab.h, src/symtab.c (symbol_class_set)
17023 (symbol_user_token_number_set): Likewise.
17024 Adjust all callers.
17025 Promote complain_at.
17026 * tests/input.at (Type Clashes): Adjust.
17027
17028 2002-06-20 Akim Demaille <akim@epita.fr>
17029
17030 * data/bison.simple (YYLEX): Fix the declaration when
17031 %pure-parser.
17032
17033 2002-06-20 Akim Demaille <akim@epita.fr>
17034
17035 * data/bison.simple (yysymprint): Don't print the token number,
17036 just its name.
17037 * tests/actions.at (Destructors): Rename as...
17038 (Printers and Destructors): this.
17039 Also exercise %printer.
17040
17041 2002-06-20 Akim Demaille <akim@epita.fr>
17042
17043 * data/bison.simple (YYDSYMPRINT): New.
17044 Use it to remove many of the #if YYDEBUG/if (yydebug).
17045
17046 2002-06-20 Akim Demaille <akim@epita.fr>
17047
17048 * src/symtab.h, src/symtab.c (symbol_t): printer and
17049 printer_location are new members.
17050 (symbol_printer_set): New.
17051 * src/parse-gram.y (PERCENT_PRINTER): New token.
17052 Handle its associated rule.
17053 * src/scan-gram.l: Adjust.
17054 (handle_destructor_at, handle_destructor_dollar): Rename as...
17055 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17056 * src/output.c (symbol_printers_output): New.
17057 (output_skeleton): Call it.
17058 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17059 since there are already many grammar files with a user `yyprint'.
17060 Replace the calls to YYPRINT to calls to yysymprint.
17061 * tests/calc.at: Adjust.
17062 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17063 taking advantage of parser very internal details (stack size!).
17064
17065 2002-06-20 Akim Demaille <akim@epita.fr>
17066
17067 * src/scan-gram.l: Complete the scanner with the missing patterns
17068 to pacify Flex.
17069 Use `quote' and `symbol_tag_get' where appropriate.
17070
17071 2002-06-19 Akim Demaille <akim@epita.fr>
17072
17073 * tests/actions.at (Destructors): Augment to test locations.
17074 * data/bison.simple (yydestructor): Pass it the current location
17075 if locations are enabled.
17076 Prototype only when __STDC__ or C++.
17077 Change the argument names to move into the yy name space: there is
17078 user code here.
17079
17080 2002-06-19 Akim Demaille <akim@epita.fr>
17081
17082 * data/bison.simple (b4_pure_if): New.
17083 Use it instead of #ifdef YYPURE.
17084
17085 2002-06-19 Akim Demaille <akim@epita.fr>
17086
17087 * data/bison.simple (b4_location_if): New.
17088 Use it instead of #ifdef YYLSP_NEEDED.
17089
17090 2002-06-19 Akim Demaille <akim@epita.fr>
17091
17092 Prepare @$ in %destructor, but currently don't bind it in the
17093 skeleton, as %location use is not cleaned up yet.
17094
17095 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17096 (handle_action_at): New.
17097 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17098 a braced_code_t and a location as additional arguments.
17099 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17100 unquote one when outputting `b4_dollar_dollar'.
17101 Adjust callers.
17102 * data/bison.simple (b4_eval): Remove.
17103 (b4_symbol_destructor): Adjust.
17104 * tests/input.at (Invalid @n): Adjust.
17105
17106 2002-06-19 Zack Weinberg <zack@codesourcery.com>
17107
17108 * doc/bison.texinfo: Document ability to have multiple
17109 prologue sections.
17110
17111 2002-06-18 Akim Demaille <akim@epita.fr>
17112
17113 * src/files.c (compute_base_names): When computing the output file
17114 names from the input file name, strip the directory part.
17115
17116 2002-06-18 Akim Demaille <akim@epita.fr>
17117
17118 * data/bison.simple.new: Comment changes.
17119 Reported by Andreas Schwab.
17120
17121 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17122
17123 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17124 there are no `label `yyoverflowlab' defined but not used' warnings
17125 when yyoverflow is defined.
17126
17127 2002-06-18 Akim Demaille <akim@epita.fr>
17128
17129 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17130 new member.
17131 (symbol_destructor_set): Adjust.
17132 * src/output.c (symbol_destructors_output): Output the destructor
17133 locations.
17134 Output the symbol name.
17135 * data/bison.simple (b4_symbol_destructor): Adjust.
17136
17137 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17138 and Akim Demaille <akim@epita.fr>
17139
17140 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17141 what's left on the stack when the error recovery hits EOF.
17142 * tests/actions.at (Destructors): Complete to exercise this case.
17143
17144 2002-06-17 Akim Demaille <akim@epita.fr>
17145
17146 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17147 arguments is really empty, not only equal to `[]'.
17148 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17149 member.
17150 (symbol_destructor_set): New.
17151 * src/output.c (symbol_destructors_output): New.
17152 * src/reader.h (brace_code_t, current_braced_code): New.
17153 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17154 (handle_dollar): Rename as...
17155 (handle_action_dollar): this.
17156 (handle_destructor_dollar): New.
17157 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17158 (grammar_declaration): Use it.
17159 * data/bison.simple (yystos): Is always defined.
17160 (yydestructor): New.
17161 * tests/actions.at (Destructors): New.
17162 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17163
17164 2002-06-17 Akim Demaille <akim@epita.fr>
17165
17166 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17167 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17168 rule_length only when needed.
17169 * src/output.c (actions_output, token_definitions_output): Output
17170 the full M4 block.
17171 * src/symtab.c: Don't access directly to the symbol tag, use
17172 symbol_tag_get.
17173 * src/parse-gram.y: Use symbol_list_free.
17174
17175 2002-06-17 Akim Demaille <akim@epita.fr>
17176
17177 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17178 (symbol_list_prepend, get_type_name): Move to...
17179 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17180 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17181 Adjust all callers.
17182 (symbol_list_free): New.
17183 * src/scan-gram.l (handle_dollar): Takes a location.
17184 * tests/input.at (Invalid $n): Adjust.
17185
17186 2002-06-17 Akim Demaille <akim@epita.fr>
17187
17188 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17189 (symbol_list_prepend): New.
17190 * src/parse-gram.y (%union): `list' is a new member.
17191 (symbols.1): New, replaces...
17192 (terms_to_prec.1, nterms_to_type.1): these.
17193 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17194 Take a location as additional argument.
17195 Adjust all callers.
17196
17197 2002-06-15 Akim Demaille <akim@epita.fr>
17198
17199 * src/parse-gram.y: Move %token in the declaration section so that
17200 we don't depend upon CVS Bison.
17201
17202 2002-06-15 Akim Demaille <akim@epita.fr>
17203
17204 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17205 * src/print.c (print_core): Use it.
17206
17207 2002-06-15 Akim Demaille <akim@epita.fr>
17208
17209 * src/conflicts.c (log_resolution): Accept the rule involved in
17210 the sr conflicts instead of the lookahead number that points to
17211 that rule.
17212 (flush_reduce): Accept the current lookahead vector as argument,
17213 instead of the index in LA.
17214 (resolve_sr_conflict): Accept the current number of lookahead
17215 bitset to consider for the STATE, instead of the index in LA.
17216 (set_conflicts): Adjust.
17217 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17218
17219 2002-06-15 Akim Demaille <akim@epita.fr>
17220
17221 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17222 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17223 Adjust all dependencies.
17224 * src/lalr.c (initialize_lookaheads): Split into...
17225 (states_lookaheads_count, states_lookaheads_initialize): these.
17226 (lalr): Adjust.
17227
17228 2002-06-15 Akim Demaille <akim@epita.fr>
17229
17230 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17231 out of...
17232 (grammar_rules_print): here.
17233 * src/reduce.c (reduce_output): Use it.
17234 * tests/reduce.at (Useless Rules, Reduced Automaton)
17235 (Underivable Rules): Adjust.
17236
17237 2002-06-15 Akim Demaille <akim@epita.fr>
17238
17239 Copy BYacc's nice way to report the grammar.
17240
17241 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17242 New.
17243 Don't print the rules' location, it is confusing and useless.
17244 (rule_print): Use grammar_rhs_print.
17245 * src/print.c (print_grammar): Use grammar_rules_print.
17246
17247 2002-06-15 Akim Demaille <akim@epita.fr>
17248
17249 Complete and rationalize `useless thing' warnings.
17250
17251 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17252 (symbol_tag_print): New.
17253 Use them everywhere in place of accessing directly the tag member.
17254 * src/gram.h, src/gram.c (rule_print): New.
17255 Use it where a rule used to be printed `by hand'.
17256 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17257 (reduce_grammar_tables): Report the useless rules.
17258 (reduce_print): Useless things are a warning, not an error.
17259 Report it as such.
17260 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17261 (Reduced Automaton, Underivable Rules): Adjust.
17262 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17263 * tests/conflicts.at (Unresolved SR Conflicts)
17264 (Solved SR Conflicts): Adjust.
17265
17266 2002-06-15 Akim Demaille <akim@epita.fr>
17267
17268 Let symbols have a location.
17269
17270 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17271 (getsym): Adjust.
17272 Adjust all callers.
17273 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17274 Use location_t, not int.
17275 * src/symtab.c (symbol_check_defined): Take advantage of the
17276 location.
17277 * tests/regression.at (Invalid inputs): Adjust.
17278
17279 2002-06-15 Akim Demaille <akim@epita.fr>
17280
17281 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17282 (input): Don't try to initialize yylloc here, do it in the
17283 scanner.
17284 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17285 * src/gram.h (rule_t): Change line and action_line into location
17286 and action_location, of location_t type.
17287 Adjust all dependencies.
17288 * src/location.h, src/location.c (empty_location): New.
17289 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17290 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17291 (grammar_current_rule_symbol_append)
17292 (grammar_current_rule_action_append): Expect a location as argument.
17293 * src/reader.c (grammar_midrule_action): Adjust to attach an
17294 action's location as dummy symbol location.
17295 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17296 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17297 the line numbers.
17298
17299 2002-06-14 Akim Demaille <akim@epita.fr>
17300
17301 Grammar declarations may be found in the grammar section.
17302
17303 * src/parse-gram.y (rules_or_grammar_declaration): New.
17304 (declarations): Each declaration may end with a semicolon, not
17305 just...
17306 (grammar_declaration): `"%union"'.
17307 (grammar): Branch to rules_or_grammar_declaration.
17308
17309 2002-06-14 Akim Demaille <akim@epita.fr>
17310
17311 * src/main.c (main): Invoke scanner_free.
17312
17313 2002-06-14 Akim Demaille <akim@epita.fr>
17314
17315 * src/output.c (m4_invoke): Extracted from...
17316 (output_skeleton): here.
17317 Free tempfile.
17318
17319 2002-06-14 Akim Demaille <akim@epita.fr>
17320
17321 * src/parse-gram.y (directives, directive, gram)
17322 (grammar_directives, precedence_directives, precedence_directive):
17323 Rename as...
17324 (declarations, declaration, grammar, grammar_declaration)
17325 (precedence_declaration, precedence_declarator): these.
17326 (symbol_declaration): New.
17327
17328 2002-06-14 Akim Demaille <akim@epita.fr>
17329
17330 * src/files.c (action_obstack): Remove, unused.
17331 (output_obstack): Remove it, and all its dependencies, as it is no
17332 longer needed.
17333 * src/reader.c (epilogue_set): Build the epilogue in the
17334 muscle_obstack.
17335 * src/output.h, src/output.c (muscle_obstack): Move to...
17336 * src/muscle_tab.h, src/muscle_tab.h: here.
17337 (muscle_init): Initialize muscle_obstack.
17338 (muscle_free): New.
17339 * src/main.c (main): Call it.
17340
17341 2002-06-14 Akim Demaille <akim@epita.fr>
17342
17343 * src/location.h: New, extracted from...
17344 * src/reader.h: here.
17345 * src/Makefile.am (noinst_HEADERS): Merge into
17346 (bison_SOURCES): this.
17347 Add location.h.
17348 * src/parse-gram.y: Use location_t instead of Bison's.
17349 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17350 Use location_t instead of ints.
17351
17352 2002-06-14 Akim Demaille <akim@epita.fr>
17353
17354 * data/bison.simple, data/bison.c++: Be sure to restore the
17355 current #line when returning to the skeleton contents after having
17356 exposed the input file's #line.
17357
17358 2002-06-12 Akim Demaille <akim@epita.fr>
17359
17360 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17361 eager.
17362 * tests/actions.at (Exotic Dollars): New.
17363
17364 2002-06-12 Akim Demaille <akim@epita.fr>
17365
17366 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17367 ['"/] too eagerly.
17368 * tests/input.at (Torturing the Scanner): New.
17369
17370 2002-06-11 Akim Demaille <akim@epita.fr>
17371
17372 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17373 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17374 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17375 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17376 * src/reader.c (reader): Use it.
17377
17378 2002-06-11 Akim Demaille <akim@epita.fr>
17379
17380 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17381 Adjust all callers.
17382 (scanner_last_string_free): New.
17383
17384 2002-06-11 Akim Demaille <akim@epita.fr>
17385
17386 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17387 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17388 (last_string, YY_OBS_FREE): New.
17389 Use them when returning an ID.
17390
17391 2002-06-11 Akim Demaille <akim@epita.fr>
17392
17393 Have Bison grammars parsed by a Bison grammar.
17394
17395 * src/reader.c, src/reader.h (prologue_augment): New.
17396 * src/reader.c (copy_definition): Remove.
17397
17398 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17399 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17400 (grammar_current_rule_prec_set, grammar_current_rule_check)
17401 (grammar_current_rule_symbol_append)
17402 (grammar_current_rule_action_append): Export.
17403 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17404 (symbol_list_action_append): Remove.
17405 Hook the routines from reader.
17406 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17407 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17408
17409 * src/reader.c (read_declarations): Remove, unused.
17410
17411 * src/parse-gram.y: Handle the epilogue.
17412 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17413 (grammar_start_symbol_set): this.
17414 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17415 * src/reader.c (readgram): Remove, unused.
17416 (reader): Adjust to insert eoftoken and axiom where appropriate.
17417
17418 * src/reader.c (copy_dollar): Replace with...
17419 * src/scan-gram.h (handle_dollar): this.
17420 * src/parse-gram.y: Remove `%thong'.
17421
17422 * src/reader.c (copy_at): Replace with...
17423 * src/scan-gram.h (handle_at): this.
17424
17425 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17426 New.
17427
17428 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17429 time being.
17430
17431 * src/reader.h, src/reader.c (grammar_rule_end): New.
17432
17433 * src/parse.y (current_type, current_class): New.
17434 Implement `%nterm', `%token' support.
17435 Merge `%term' into `%token'.
17436 (string_as_id): New.
17437 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17438 type name.
17439
17440 * src/parse-gram.y: Be sure to handle properly the beginning of
17441 rules.
17442
17443 * src/parse-gram.y: Handle %type.
17444 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17445
17446 * src/parse-gram.y: More directives support.
17447 * src/options.c: No longer handle source directives.
17448
17449 * src/parse-gram.y: Fix %output.
17450
17451 * src/parse-gram.y: Handle %union.
17452 Use the prologue locations.
17453 * src/reader.c (parse_union_decl): Remove.
17454
17455 * src/reader.h, src/reader.c (epilogue_set): New.
17456 * src/parse-gram.y: Use it.
17457
17458 * data/bison.simple, data/bison.c++: b4_stype is now either not
17459 defined, then default to int, or to the contents of %union,
17460 without `union' itself.
17461 Adjust.
17462 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17463
17464 * src/output.c (actions_output): Don't output braces, as they are
17465 already handled by the scanner.
17466
17467 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17468 characters to themselves.
17469
17470 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17471 that the epilogue has a proper #line.
17472
17473 * src/parse-gram.y: Handle precedence/associativity.
17474
17475 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17476 a terminal.
17477 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17478 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17479 at all to define terminals that cannot be emitted.
17480
17481 * src/scan-gram.l: Escape M4 characters.
17482
17483 * src/scan-gram.l: Working properly with escapes in user
17484 strings/characters.
17485
17486 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17487 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17488 grammar.
17489 Use more modest sizes, as for the time being the parser does not
17490 release memory, and therefore the process swallows a huge amount
17491 of memory.
17492
17493 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17494 stricter %token grammar.
17495
17496 * src/symtab.h (associativity): Add `undef_assoc'.
17497 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17498 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17499
17500 * tests/regression.at (Invalid %directive): Remove, as it is now
17501 meaningless.
17502 (Invalid inputs): Adjust to the new error messages.
17503 (Token definitions): The new grammar doesn't allow too many
17504 eccentricities.
17505
17506 * src/lex.h, src/lex.c: Remove.
17507 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17508 (copy_character, copy_string2, copy_string, copy_identifier)
17509 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17510 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17511 (parse_action): Remove.
17512 * po/POTFILES.in: Adjust.
17513
17514 2002-06-11 Akim Demaille <akim@epita.fr>
17515
17516 * src/reader.c (parse_action): Don't store directly into the
17517 rule's action member: return the action as a string.
17518 Don't require `rule_length' as an argument: compute it.
17519 (grammar_current_rule_symbol_append)
17520 (grammar_current_rule_action_append): New, eved out from
17521 (readgram): here.
17522 Remove `action_flag', `rulelength', unused now.
17523
17524 2002-06-11 Akim Demaille <akim@epita.fr>
17525
17526 * src/reader.c (grammar_current_rule_prec_set).
17527 (grammar_current_rule_check): New, eved out from...
17528 (readgram): here.
17529 Remove `xaction', `first_rhs': useless.
17530 * tests/input.at (Type clashes): New.
17531 * tests/existing.at (GNU Cim Grammar): Adjust.
17532
17533 2002-06-11 Akim Demaille <akim@epita.fr>
17534
17535 * src/reader.c (grammar_midrule_action): New, Eved out from
17536 (readgram): here.
17537
17538 2002-06-11 Akim Demaille <akim@epita.fr>
17539
17540 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17541 New.
17542 (readgram): Use them as replacement of inlined code, crule and
17543 crule1.
17544
17545 2002-06-11 Akim Demaille <akim@epita.fr>
17546
17547 * src/reader.c (grammar_end, grammar_symbol_append): New.
17548 (readgram): Use them.
17549 Make the use of `p' as local as possible.
17550
17551 2002-06-10 Akim Demaille <akim@epita.fr>
17552
17553 GCJ's parser requires the tokens to be defined before the prologue.
17554
17555 * data/bison.simple: Output the token definition before the user's
17556 prologue.
17557 * tests/regression.at (Braces parsing, Duplicate string)
17558 (Mixing %token styles): Check the output from bison.
17559 (Early token definitions): New.
17560
17561 2002-06-10 Akim Demaille <akim@epita.fr>
17562
17563 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17564 assigning twice the same user number to a token, so that we can
17565 use it in...
17566 * src/lex.c (lex): here.
17567 Also use `symbol_class_set' instead of hand written code.
17568 * src/reader.c (parse_assoc_decl): Likewise.
17569
17570 2002-06-10 Akim Demaille <akim@epita.fr>
17571
17572 * src/symtab.c, src/symtab.c (symbol_class_set)
17573 (symbol_user_token_number_set): New.
17574 * src/reader.c (parse_token_decl): Use them.
17575 Use a switch instead of ifs.
17576 Use a single argument.
17577
17578 2002-06-10 Akim Demaille <akim@epita.fr>
17579
17580 Remove `%thong' support as it is undocumented, unused, duplicates
17581 `%token's job, and creates useless e-mail traffic with people who
17582 want to know what it is, why it is undocumented, unused, and
17583 duplicates `%token's job.
17584
17585 * src/reader.c (parse_thong_decl): Remove.
17586 * src/options.c (option_table): Remove "thong".
17587 * src/lex.h (tok_thong): Remove.
17588
17589 2002-06-10 Akim Demaille <akim@epita.fr>
17590
17591 * src/symtab.c, src/symtab.c (symbol_type_set)
17592 (symbol_precedence_set): New.
17593 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17594 (value_components_used): Remove, unused.
17595
17596 2002-06-09 Akim Demaille <akim@epita.fr>
17597
17598 Move symbols handling code out of the reader.
17599
17600 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17601 (axiom): Move to...
17602 * src/symtab.h, src/symtab.c: here.
17603
17604 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17605 * src/reader.c (startval): Rename as...
17606 * src/symtab.h, src/symtab.c (startsymbol): this.
17607 * src/reader.c: Adjust.
17608
17609 * src/reader.c (symbol_check_defined, symbol_make_alias)
17610 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17611 (token_translations_init)
17612 Move to...
17613 * src/symtab.c: here.
17614 * src/reader.c (packsymbols): Move to...
17615 * src/symtab.h, src/symtab.c (symbols_pack): here.
17616 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17617 argument.
17618
17619 2002-06-03 Akim Demaille <akim@epita.fr>
17620
17621 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17622 then statements.
17623
17624 2002-06-03 Akim Demaille <akim@epita.fr>
17625
17626 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17627 structs with non literals.
17628 * src/scan-skel.l: never-interactive.
17629 * src/conflicts.c (enum conflict_resolution_e): No trailing
17630 comma.
17631 * src/getargs.c (usage): Split long literal strings.
17632 Reported by Hans Aberg.
17633
17634 2002-05-28 Akim Demaille <akim@epita.fr>
17635
17636 * data/bison.c++: Use C++ ostreams.
17637 (cdebug_): New member.
17638
17639 2002-05-28 Akim Demaille <akim@epita.fr>
17640
17641 * src/output.c (output_skeleton): Be sure to allocate enough room
17642 for `/' _and_ for `\0' in full_skeleton.
17643
17644 2002-05-28 Akim Demaille <akim@epita.fr>
17645
17646 * data/bison.c++: Catch up with bison.simple:
17647 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17648 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17649 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17650 and popping traces.
17651
17652 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17653
17654 * src/output.c (output_skeleton): Put an explicit path in front of
17655 the skeleton file name, rather than relying on the -I directory,
17656 to partially alleviate effects of having a skeleton file lying around
17657 in the current directory.
17658
17659 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17660
17661 * src/conflicts.c (log_resolution): Correct typo:
17662 obstack_printf should be obstack_fgrow1.
17663
17664 2002-05-26 Akim Demaille <akim@epita.fr>
17665
17666 * src/state.h (state_t): `solved_conflicts' is a new member.
17667 * src/LR0.c (new_state): Set it to 0.
17668 * src/conflicts.h, src/conflicts.c (print_conflicts)
17669 (free_conflicts, solve_conflicts): Rename as...
17670 (conflicts_print, conflicts_free, conflicts_solve): these.
17671 Adjust callers.
17672 * src/conflicts.c (enum conflict_resolution_e)
17673 (solved_conflicts_obstack): New, used by...
17674 (log_resolution): this.
17675 Adjust to attach the conflict resolution to each state.
17676 Complete the description with the precedence/associativity
17677 information.
17678 (resolve_sr_conflict): Adjust.
17679 * src/print.c (print_state): Output its solved_conflicts.
17680 * tests/conflicts.at (Unresolved SR Conflicts)
17681 (Solved SR Conflicts): Exercise --report=all.
17682
17683 2002-05-26 Akim Demaille <akim@epita.fr>
17684
17685 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17686 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17687 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17688 (token_number_t, item_number_as_token_number)
17689 (token_number_as_item_number, muscle_insert_token_number_table):
17690 Rename as...
17691 (symbol_number_t, item_number_as_symbol_number)
17692 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17693 these, since it is more appropriate.
17694
17695 2002-05-26 Akim Demaille <akim@epita.fr>
17696
17697 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17698 `Error:' lines.
17699 * data/bison.simple (yystos) [YYDEBUG]: New.
17700 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17701 error recovery.
17702 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17703
17704 2002-05-25 Akim Demaille <akim@epita.fr>
17705
17706 * doc/bison.texinfo (Debugging): Split into...
17707 (Tracing): this new section, its former contents, and...
17708 (Understanding): this new section.
17709 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17710 by...
17711 (report_flag): this.
17712 Adjust all dependencies.
17713 (report_args, report_types, report_argmatch): New.
17714 (usage, getargs): Report/support -r, --report.
17715 * src/options.h
17716 (struct option_table_struct): Rename as..,
17717 (struct option_table_s): this.
17718 Rename the `set_flag' member to `flag' to match with getopt_long's
17719 struct.
17720 * src/options.c (option_table): Split verbose into an entry for
17721 %verbose, and another for --verbose.
17722 Support --report/-r, so remove -r from the obsolete --raw.
17723 * src/print.c: Attach full item sets and lookaheads reports to
17724 report_flag instead of trace_flag.
17725 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17726
17727 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17728 and Paul Eggert <eggert@twinsun.com>
17729
17730 * data/bison.simple (yyparse): Correct error handling to conform to
17731 POSIX and yacc. Specifically, after syntax error is discovered,
17732 do not reduce further before shifting the error token.
17733 Clean up the code a bit by removing the labels yyerrdefault,
17734 yyerrhandle, yyerrpop.
17735 * NEWS: Document the above.
17736
17737 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17738
17739 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17740 type; it isn't always big enough, since it doesn't necessarily
17741 include non-terminals.
17742 (yytranslate): Expand definition of yy_token_number_type, so that
17743 the latter can be removed.
17744 (yy_token_number_type): Remove, only one use.
17745 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17746 don't use TokenNumberType as element type.
17747
17748 * tests/regression.at: Modify expected output to agree with change
17749 to yyr1 and yytranslate.
17750
17751 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17752
17753 * src/reader.c (parse_action): Use copy_character instead of
17754 obstack_1grow.
17755
17756 2002-05-13 Akim Demaille <akim@epita.fr>
17757
17758 * tests/regression.at (Token definitions): Prototype yylex and
17759 yyerror.
17760
17761 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17762
17763 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17764 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17765 32-bit arithmetic.
17766 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17767
17768 2002-05-07 Akim Demaille <akim@epita.fr>
17769
17770 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17771 avoid GCC warnings.
17772
17773 2002-05-07 Akim Demaille <akim@epita.fr>
17774
17775 Kill GCC warnings.
17776
17777 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17778 over the RHS of each rule.
17779 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17780 * src/state.h (state_t): Member `nitems' is unsigned short.
17781 * src/LR0.c (get_state): Adjust.
17782 * src/reader.c (packgram): Likewise.
17783 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17784 `Type'.
17785 (muscle_insert_int_table): Remove, unused.
17786 (prepare_rules): Remove `max'.
17787
17788 2002-05-06 Akim Demaille <akim@epita.fr>
17789
17790 * src/closure.c (print_firsts): Display of the symbol tags.
17791 (bitmatrix_print): Move to...
17792 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17793 here.
17794 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17795
17796 2002-05-06 Akim Demaille <akim@epita.fr>
17797
17798 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17799 hash_do_for_each.
17800
17801 2002-05-06 Akim Demaille <akim@epita.fr>
17802
17803 * src/LR0.c (new_state, get_state): Instead of using the global
17804 `kernel_size' and `kernel_base', have two new arguments:
17805 `core_size' and `core'.
17806 Adjust callers.
17807
17808 2002-05-06 Akim Demaille <akim@epita.fr>
17809
17810 * src/reader.c (packgram): No longer end `ritem' with a 0
17811 sentinel: it is not used.
17812
17813 2002-05-05 Akim Demaille <akim@epita.fr>
17814
17815 New experimental feature: display the lookaheads in the report and
17816 graph.
17817
17818 * src/print (print_core): When --trace-flag, display the rules
17819 lookaheads.
17820 * src/print_graph.c (print_core): Likewise.
17821 Swap the arguments.
17822 Adjust caller.
17823
17824 2002-05-05 Akim Demaille <akim@epita.fr>
17825
17826 * tests/torture.at (Many lookaheads): New test.
17827
17828 2002-05-05 Akim Demaille <akim@epita.fr>
17829
17830 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17831 (GENERATE_MUSCLE_INSERT_TABLE): this.
17832 (output_int_table, output_unsigned_int_table, output_short_table)
17833 (output_token_number_table, output_item_number_table): Replace with...
17834 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17835 (muscle_insert_short_table, muscle_insert_token_number_table)
17836 (muscle_insert_item_number_table): these.
17837 Adjust all callers.
17838 (prepare_tokens): Don't free `translations', since...
17839 * src/reader.h, src/reader.c (grammar_free): do it.
17840 Move to...
17841 * src/gram.h, src/gram.c (grammar_free): here.
17842 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17843 b4_translate_max.
17844
17845 2002-05-05 Akim Demaille <akim@epita.fr>
17846
17847 * src/output.c (output_unsigned_int_table): New.
17848 (prepare_rules): `i' is unsigned.
17849 `prhs', `rline', `r2' are unsigned int.
17850 Rename muscle `rhs_number_max' as `rhs_max'.
17851 Output muscles `prhs_max', `rline_max', and `r2_max'.
17852 Free rline and r1.
17853 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17854 to compute types instead of constant types.
17855 * tests/regression.at (Web2c Actions): Adjust.
17856
17857 2002-05-04 Akim Demaille <akim@epita.fr>
17858
17859 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17860 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17861 Adjust dependencies.
17862 * src/output.c (token_definitions_output): Be sure not to output a
17863 `#define 'a'' when fed with `%token 'a' "a"'.
17864 * tests/regression.at (Token definitions): New.
17865
17866 2002-05-03 Paul Eggert <eggert@twinsun.com>
17867
17868 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17869 for K&R C.
17870
17871 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17872
17873 * Makefile.am (SUBDIRS): Remove intl.
17874 (EXTRA_DIST): Add config/config.rpath.
17875
17876 2002-05-03 Akim Demaille <akim@epita.fr>
17877
17878 * data/bison.simple (m4_if): Don't output empty enums.
17879 And actually, output valid enum definitions :(.
17880
17881 2002-05-03 Akim Demaille <akim@epita.fr>
17882
17883 * configure.bat: Remove, completely obsolete.
17884 * Makefile.am (EXTRA_DIST): Adjust.
17885 Don't distribute config.rpath...
17886 * config/Makefile.am (EXTRA_DIST): Do it.
17887
17888 2002-05-03 Akim Demaille <akim@epita.fr>
17889
17890 * configure.in (GETTEXT_VERSION): New.
17891 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17892
17893 2002-05-03 Akim Demaille <akim@epita.fr>
17894
17895 * data/bison.simple (b4_token_enum): New.
17896 (b4_token_defines): Use it to output tokens both as #define and
17897 enums.
17898 Suggested by Paul Eggert.
17899 * src/output.c (token_definitions_output): Don't output spurious
17900 white spaces.
17901
17902 2002-05-03 Akim Demaille <akim@epita.fr>
17903
17904 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17905
17906 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17907
17908 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17909 Update the stack class, give a try to deque as the default container.
17910
17911 2002-05-02 Akim Demaille <akim@epita.fr>
17912
17913 * data/bison.simple (yyparse): Do not implement @$ = @1.
17914 (YYLLOC_DEFAULT): Adjust to do it.
17915 * doc/bison.texinfo (Location Default Action): Fix.
17916
17917 2002-05-02 Akim Demaille <akim@epita.fr>
17918
17919 * src/reader.c (parse_braces): Merge into...
17920 (parse_action): this.
17921
17922 2002-05-02 Akim Demaille <akim@epita.fr>
17923
17924 * configure.in (ALL_LINGUAS): Remove.
17925 * po/LINGUAS, hr.po: New.
17926
17927 2002-05-02 Akim Demaille <akim@epita.fr>
17928
17929 Remove the so called hairy (semantic) parsers.
17930
17931 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17932 * src/gram.h, src/gram.c (semantic_parser): Remove.
17933 (rule_t): Remove the guard and guard_line members.
17934 * src/lex.h (token_t): remove tok_guard.
17935 * src/options.c (option_table): Remove %guard and %semantic_parser
17936 support.
17937 * src/output.c, src/output.h (guards_output): Remove.
17938 (prepare): Adjust.
17939 (token_definitions_output): Don't output the `T'
17940 tokens (???).
17941 (output_skeleton): Don't output the guards.
17942 * src/files.c, src/files.c (attrsfile): Remove.
17943 * src/reader.c (symbol_list): Remove the guard and guard_line
17944 members.
17945 Adjust dependencies.
17946 (parse_guard): Remove.
17947 * data/bison.hairy: Remove.
17948 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17949 BISON_HAIRY.
17950
17951 2002-05-02 Akim Demaille <akim@epita.fr>
17952
17953 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17954 (parse_guard): Rename the formal argument `stack_offset' as
17955 `rule_length', which is more readable.
17956 Adjust callers.
17957 (copy_at, copy_dollar): Instead of outputting the hard coded
17958 values of $$, $n and so forth, output invocation to b4_lhs_value,
17959 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17960 Note: this patch partially drops `semantic-parser' support: it
17961 always does `rule_length - n', where semantic parsers ought to
17962 always use `-n'.
17963 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17964 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17965
17966 2002-05-02 Akim Demaille <akim@epita.fr>
17967
17968 * configure.in (AC_INIT): Bump to 1.49b.
17969 (AM_INIT_AUTOMAKE): Short invocation.
17970
17971 2002-05-02 Akim Demaille <akim@epita.fr>
17972
17973 Version 1.49a.
17974
17975 2002-05-01 Akim Demaille <akim@epita.fr>
17976
17977 * src/skeleton.h: Remove.
17978
17979 2002-05-01 Akim Demaille <akim@epita.fr>
17980
17981 * src/skeleton.h: Fix the #endif.
17982 Reported by Magnus Fromreide.
17983
17984 2002-04-26 Paul Eggert <eggert@twinsun.com>
17985
17986 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17987 Define if we define YYSTYPE and YYLTYPE, respectively.
17988 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17989
17990 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17991
17992 * src/scan-skel.l: Postprocess quadrigraphs.
17993
17994 * src/reader.c (copy_character): New function, used to output
17995 single characters while replacing `[' and `]' with quadrigraphs, to
17996 avoid troubles with M4 quotes.
17997 (copy_comment): Output characters with copy_character.
17998 (read_additionnal_code): Likewise.
17999 (copy_string2): Likewise.
18000 (copy_definition): Likewise.
18001
18002 * tests/calc.at: Exercise M4 quoting.
18003
18004 2002-04-25 Akim Demaille <akim@epita.fr>
18005
18006 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18007 between `!' and the command.
18008 Reported by Paul Eggert.
18009
18010 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
18011
18012 * tests/calc.at: Exercise prologue splitting.
18013
18014 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18015 `b4_post_prologue' instead of `b4_prologue'.
18016
18017 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18018 muscles.
18019 (output): Free pre_prologue_obstack and post_prologue_obstack.
18020 * src/files.h, src/files.c (attrs_obstack): Remove.
18021 (pre_prologue_obstack, post_prologue_obstack): New.
18022 * src/reader.c (copy_definition): Add a parameter to specify the
18023 obstack to fill, instead of using attrs_obstack unconditionally.
18024 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18025 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18026
18027 2002-04-23 Paul Eggert <eggert@twinsun.com>
18028
18029 * data/bison.simple: Remove unnecessary commentary and white
18030 space differences from 1_29-branch.
18031 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18032
18033 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18034 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18035 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18036 constructors or destructors.
18037
18038 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18039
18040 2002-04-23 Akim Demaille <akim@epita.fr>
18041
18042 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18043 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18044 location with columns.
18045 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18046 All reported by Paul Eggert.
18047
18048 2002-04-22 Akim Demaille <akim@epita.fr>
18049
18050 * src/reduce.c (dump_grammar): Move to...
18051 * src/gram.h, src/gram.c (grammar_dump): here.
18052 Be sure to separate long item numbers.
18053 Don't read the members of a rule's prec if its nil.
18054
18055 2002-04-22 Akim Demaille <akim@epita.fr>
18056
18057 * src/output.c (table_size, table_grow): New.
18058 (MAXTABLE): Remove, replace uses with table_size.
18059 (pack_vector): Instead of dying when the table is too big, grow it.
18060
18061 2002-04-22 Akim Demaille <akim@epita.fr>
18062
18063 * data/bison.simple (yyr1): Its type is that of a token number.
18064 * data/bison.c++ (r1_): Likewise.
18065 * tests/regression.at (Web2c Actions): Adjust.
18066
18067 2002-04-22 Akim Demaille <akim@epita.fr>
18068
18069 * src/reader.c (token_translations_init): 256 is now the default
18070 value for the error token, i.e., it will be assigned another
18071 number if the user assigned 256 to one of her tokens.
18072 (reader): Don't force 256 to error.
18073 * doc/bison.texinfo (Symbols): Adjust.
18074 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18075 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18076 etc. instead of 10, 20, 30 (which was used to `jump' over error
18077 (256) and undefined (2)).
18078
18079 2002-04-22 Akim Demaille <akim@epita.fr>
18080
18081 Propagate more token_number_t.
18082
18083 * src/gram.h (token_number_as_item_number)
18084 (item_number_as_token_number): New.
18085 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18086 Use it to create output_item_number_table and
18087 output_token_number_table.
18088 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18089 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18090 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18091 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18092
18093 2002-04-22 Akim Demaille <akim@epita.fr>
18094
18095 * src/output.h, src/output.c (get_lines_number): Remove.
18096
18097 2002-04-19 Akim Demaille <akim@epita.fr>
18098
18099 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18100 as Lex/Flex'.
18101 (Debugging): More details about enabling the debugging features.
18102 (Table of Symbols): Describe $$, $n, @$, and @n.
18103 Suggested by Tim Josling.
18104
18105 2002-04-19 Akim Demaille <akim@epita.fr>
18106
18107 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18108
18109 2002-04-10 Akim Demaille <akim@epita.fr>
18110
18111 * src/system.h: Rely on HAVE_LIMITS_H.
18112 Suggested by Paul Eggert.
18113
18114 2002-04-09 Akim Demaille <akim@epita.fr>
18115
18116 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18117 full stderr, and strip it according to the bison options, instead
18118 of composing the error message from different bits.
18119 This makes it easier to check for several error messages.
18120 Adjust all the invocations.
18121 Add an invocation exercising the error token.
18122 Add an invocation demonstrating a stupid error message.
18123 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18124 Adjust the tests.
18125 Error message are for stderr, not stdout.
18126
18127 2002-04-09 Akim Demaille <akim@epita.fr>
18128
18129 * src/gram.h, src/gram.c (error_token_number): Remove, use
18130 errtoken->number.
18131 * src/reader.c (reader): Don't specify the user token number (2)
18132 for $undefined, as it uselessly prevents using it.
18133 * src/gram.h (token_number_t): Move to...
18134 * src/symtab.h: here.
18135 (state_t.number): Is a token_number_t.
18136 * src/print.c, src/reader.c: Use undeftoken->number instead of
18137 hard coded 2.
18138 (Even though this 2 is not the same as above: the number of the
18139 undeftoken remains being 2, it is its user token number which
18140 might not be 2).
18141 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18142 `user_token_number_max'.
18143 Output `undef_token_number'.
18144 * data/bison.simple, data/bison.c++: Use them.
18145 Be sure to map invalid yylex return values to
18146 `undef_token_number'. This saves us from gratuitous SEGV.
18147
18148 * tests/conflicts.at (Solved SR Conflicts)
18149 (Unresolved SR Conflicts): Adjust.
18150 * tests/regression.at (Web2c Actions): Adjust.
18151
18152 2002-04-08 Akim Demaille <akim@epita.fr>
18153
18154 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18155 Adding #line.
18156 Remove the duplicate `typedefs'.
18157 (RhsNumberType): Fix the declaration and various other typos.
18158 Use __ofile__.
18159 * data/bison.simple: Use __ofile__.
18160 * src/scan-skel.l: Handle __ofile__.
18161
18162 2002-04-08 Akim Demaille <akim@epita.fr>
18163
18164 * src/gram.h (item_number_t): New, the type of item numbers in
18165 RITEM. Note that it must be able to code symbol numbers as
18166 positive number, and the negation of rule numbers as negative
18167 numbers.
18168 Adjust all dependencies (pretty many).
18169 * src/reduce.c (rule): Remove this `short *' pointer: use
18170 item_number_t.
18171 * src/system.h (MINSHORT, MAXSHORT): Remove.
18172 Include `limits.h'.
18173 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18174 (shortcpy): Remove.
18175 (MAXTABLE): Move to...
18176 * src/output.c (MAXTABLE): here.
18177 (prepare_rules): Use output_int_table to output rhs.
18178 * data/bison.simple, data/bison.c++: Adjust.
18179 * tests/torture.at (Big triangle): Move the limit from 254 to
18180 500.
18181 * tests/regression.at (Web2c Actions): Ajust.
18182
18183 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18184 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18185 passes, but produces negative #line number, once fixed, GCC is
18186 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18187 C), it passes.
18188 * src/state.h (state_h): Code input lines on ints, not shorts.
18189
18190 2002-04-08 Akim Demaille <akim@epita.fr>
18191
18192 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18193 and then the grammar.
18194
18195 2002-04-08 Akim Demaille <akim@epita.fr>
18196
18197 * src/system.h: No longer using strndup.
18198
18199 2002-04-07 Akim Demaille <akim@epita.fr>
18200
18201 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18202 * src/output.c (output_table_data): Return the longest number.
18203 (prepare_tokens): Output `token_number_max').
18204 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18205 New.
18206 Use them to define yy_token_number_type/TokenNumberType.
18207 Use this type for yytranslate.
18208 * tests/torture.at (Big triangle): Push the limit from 124 to
18209 253.
18210 * tests/regression.at (Web2c Actions): Adjust.
18211
18212 2002-04-07 Akim Demaille <akim@epita.fr>
18213
18214 * tests/torture.at (Big triangle): New.
18215 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18216 * tests/existing.at: here.
18217
18218 2002-04-07 Akim Demaille <akim@epita.fr>
18219
18220 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18221 nritems.
18222 Adjust dependencies.
18223
18224 2002-04-07 Akim Demaille <akim@epita.fr>
18225
18226 * src/reader.c: Normalize increments to prefix form.
18227
18228 2002-04-07 Akim Demaille <akim@epita.fr>
18229
18230 * src/reader.c, symtab.c: Remove debugging code.
18231
18232 2002-04-07 Akim Demaille <akim@epita.fr>
18233
18234 Rename all the `bucket's as `symbol_t'.
18235
18236 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18237 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18238 * src/symtab.c, src/symtab.h (bucket): Rename as...
18239 (symbol_t): this.
18240 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18241 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18242 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18243 (buckets_new, buckets_free, buckets_do): Rename as...
18244 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18245 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18246 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18247 (symbols_new, symbols_free, symbols_do): these.
18248
18249 2002-04-07 Akim Demaille <akim@epita.fr>
18250
18251 Use lib/hash for the symbol table.
18252
18253 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18254 EOF.
18255 * src/lex.c (lex): Set the `number' member of new terminals.
18256 * src/reader.c (bucket_check_defined, bucket_make_alias)
18257 (bucket_check_alias_consistence, bucket_translation): New.
18258 (reader, grammar_free, readgram, token_translations_init)
18259 (packsymbols): Adjust.
18260 (reader): Number the predefined tokens.
18261 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18262 for predefined tokens.
18263 * src/symtab.h (bucket): Remove all the hash table related
18264 members.
18265 * src/symtab.c (symtab): Replace by...
18266 (bucket_table): this.
18267 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18268 (buckets_new, buckets_do): New.
18269
18270 2002-04-07 Akim Demaille <akim@epita.fr>
18271
18272 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18273 (start_symbol, max_user_token_number, semantic_parser)
18274 (error_token_number): Initialize.
18275 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18276 Initialize.
18277 (reader): Don't.
18278 (errtoken, eoftoken, undeftoken, axiom): Extern.
18279
18280 2002-04-07 Akim Demaille <akim@epita.fr>
18281
18282 * src/gram.h (rule_s): prec and precsym are now pointers
18283 to the bucket giving the priority/associativity.
18284 Member `associativity' removed: useless.
18285 * src/reduce.c, src/conflicts.c: Adjust.
18286
18287 2002-04-07 Akim Demaille <akim@epita.fr>
18288
18289 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18290 Properly escape the symbols' TAG when outputting them.
18291
18292 2002-04-07 Akim Demaille <akim@epita.fr>
18293
18294 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18295
18296 2002-04-07 Akim Demaille <akim@epita.fr>
18297
18298 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18299 (LArule): this, which is an array to rule_t*.
18300 * src/print.c, src/conflicts.c: Adjust.
18301
18302 2002-04-07 Akim Demaille <akim@epita.fr>
18303
18304 * src/gram.h (rule_t): Rename `number' as `user_number'.
18305 `number' is a new member.
18306 Adjust dependencies.
18307 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18308
18309 2002-04-07 Akim Demaille <akim@epita.fr>
18310
18311 As a result of the previous patch, it is no longer needed
18312 to reorder ritem itself.
18313
18314 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18315
18316 2002-04-07 Akim Demaille <akim@epita.fr>
18317
18318 Be sure never to walk through RITEMS, but use only data related to
18319 the rules themselves. RITEMS should be banished.
18320
18321 * src/output.c (output_token_translations): Rename as...
18322 (prepare_tokens): this.
18323 In addition to `translate', prepare the muscles `tname' and
18324 `toknum', which were handled by...
18325 (output_rule_data): this.
18326 Remove, and move the remainder of its outputs into...
18327 (prepare_rules): this new routines, which also merges content from
18328 (output_gram): this.
18329 (prepare_rules): Be sure never to walk through RITEMS.
18330 (output_stos): Rename as...
18331 (prepare_stos): this.
18332 (output): Always invoke prepare_states, after all, just don't use it
18333 in the output if you don't need it.
18334
18335 2002-04-07 Akim Demaille <akim@epita.fr>
18336
18337 * src/LR0.c (new_state): Display `nstates' as the name of the
18338 newly created state.
18339 Adjust to initialize first_state and last_state if needed.
18340 Be sure to distinguish the initial from the final state.
18341 (new_states): Create the itemset of the initial state, and use
18342 new_state.
18343 * src/closure.c (closure): Now that the initial state has its
18344 items properly set, there is no need for a special case when
18345 creating `ruleset'.
18346
18347 As a result, now the rule 0, reducing to $axiom, is visible in the
18348 outputs. Adjust the test suite.
18349
18350 * tests/conflicts.at (Solved SR Conflicts)
18351 (Unresolved SR Conflicts): Adjust.
18352 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18353 * tests/conflicts.at (S/R in initial): New.
18354
18355 2002-04-07 Akim Demaille <akim@epita.fr>
18356
18357 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18358 the RHS of the rules.
18359 * src/output.c (output_gram): Likewise.
18360
18361 2002-04-07 Akim Demaille <akim@epita.fr>
18362
18363 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18364 bucket.
18365 Adjust all dependencies.
18366 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18367 `number' of the buckets too.
18368 * src/gram.h: Include `symtab.h'.
18369 (associativity): Move to...
18370 * src/symtab.h: here.
18371 No longer include `gram.h'.
18372
18373 2002-04-07 Akim Demaille <akim@epita.fr>
18374
18375 * src/gram.h, src/gram.c (rules_rhs_length): New.
18376 (ritem_longest_rhs): Use it.
18377 * src/gram.h (rule_t): `number' is a new member.
18378 * src/reader.c (packgram): Set it.
18379 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18380 the end of `rules', and count them out of `nrules'.
18381 (reduce_output, dump_grammar): Adjust.
18382 * src/print.c (print_grammar): It is no longer needed to check for
18383 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18384 * tests/reduce.at (Reduced Automaton): New test.
18385
18386 2002-04-07 Akim Demaille <akim@epita.fr>
18387
18388 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18389 lacking `+ 1' to nrules, Bison reported as useless a token if it
18390 was used solely to set the precedence of the last rule...
18391
18392 2002-04-07 Akim Demaille <akim@epita.fr>
18393
18394 * data/bison.c++, data/bison.simple: Don't output the current file
18395 name in #line, to avoid useless diffs between two identical
18396 outputs under different names.
18397
18398 2002-04-07 Akim Demaille <akim@epita.fr>
18399
18400 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18401 Normalize loops to using `< nrules + 1', not `<= nrules'.
18402
18403 2002-04-07 Akim Demaille <akim@epita.fr>
18404
18405 * TODO: Update.
18406
18407 2002-04-07 Akim Demaille <akim@epita.fr>
18408
18409 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18410 bucket.value as bucket.number.
18411
18412 2002-04-07 Akim Demaille <akim@epita.fr>
18413
18414 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18415 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18416 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18417 RHS, instead of being an index in RITEMS.
18418
18419 2002-04-04 Paul Eggert <eggert@twinsun.com>
18420
18421 * doc/bison.texinfo: Update copyright date.
18422 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18423 (Symbols): Warn about running Bison in one character set,
18424 but compiling and/or running in an incompatible one.
18425 Warn about character code 256, too.
18426
18427 2002-04-03 Paul Eggert <eggert@twinsun.com>
18428
18429 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18430 YYERROR_VERBOSE is nonzero, not whether it is defined.
18431
18432 Merge changes from bison-1_29-branch.
18433
18434 2002-03-20 Paul Eggert <eggert@twinsun.com>
18435
18436 Merge fixes from Debian bison_1.34-1.diff.
18437
18438 * configure.in (AC_PREREQ): 2.53.
18439
18440 2002-03-20 Akim Demaille <akim@epita.fr>
18441
18442 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18443
18444 2002-03-19 Paul Eggert <eggert@twinsun.com>
18445
18446 * src/bison.simple (YYCOPY): New macro.
18447 (YYSTACK_RELOCATE): Use it.
18448 Remove Type arg; no longer needed. All callers changed.
18449 (yymemcpy): Remove; no longer needed.
18450
18451 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18452 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18453
18454 2002-03-19 Akim Demaille <akim@epita.fr>
18455
18456 Test and fix the #line outputs.
18457
18458 * tests/atlocal.at (GCC): New.
18459 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
18460 (Prologue synch line, %union synch line, Postprologue synch line)
18461 (Action synch line, Epilogue synch line): New tests.
18462 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18463 * data/bison.simple, data/bison.c++: Use it.
18464
18465 2002-03-19 Akim Demaille <akim@epita.fr>
18466
18467 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18468 (Solved SR Conflicts, %expect not enough, %expect right)
18469 (%expect too much): Move to...
18470 * tests/conflicts.at: this new file.
18471
18472 2002-03-19 Akim Demaille <akim@epita.fr>
18473
18474 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18475 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18476 that we can move to enums for instance.
18477 * src/output.c (token_definitions_output): Output a list of
18478 `token-name, token-number' instead of the #define.
18479 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18480
18481 2002-03-14 Akim Demaille <akim@epita.fr>
18482
18483 Use Gettext 0.11.1.
18484
18485 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
18486
18487 * data/bison.c++: Make the user able to add members to the generated
18488 parser by subclassing.
18489
18490 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
18491
18492 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18493 a character.
18494 Reported by Nicolas Tisserand and Nicolas Burrus.
18495
18496 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18497
18498 * src/reader.c: Warn about lacking semi-colons, do not complain.
18499
18500 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18501
18502 * data/bison.c++: Remove a debug line.
18503
18504 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18505
18506 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18507 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18508 provide a default implementation.
18509
18510 2002-03-04 Akim Demaille <akim@epita.fr>
18511
18512 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18513 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18514 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18515 * tests/semantic.at (Parsing Guards): Similarly.
18516 * src/reader.at (readgram): Complain if the last rule is not ended
18517 with a semi-colon.
18518
18519 2002-03-04 Akim Demaille <akim@epita.fr>
18520
18521 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18522 * src/closure.c: here.
18523 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18524 RTC.
18525 * src/warshall.h, src/warshall.c: Remove.
18526 * tests/sets.at (Broken Closure): Adjust.
18527
18528 2002-03-04 Akim Demaille <akim@epita.fr>
18529
18530 * src/output.c (output_skeleton): tempdir is const.
18531 bytes_read is unused.
18532
18533 2002-03-04 Akim Demaille <akim@epita.fr>
18534
18535 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18536 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18537 Update.
18538 From Michael Hayes.
18539
18540 2002-03-04 Akim Demaille <akim@epita.fr>
18541
18542 * src/closure.c (closure): `r' is unused.
18543
18544 2002-03-04 Akim Demaille <akim@epita.fr>
18545
18546 * tests/sets.at (Broken Closure): Add the ending `;'.
18547 * src/reader.at (readgram): Complain if a rule is not ended with a
18548 semi-colon.
18549
18550 2002-03-04 Akim Demaille <akim@epita.fr>
18551
18552 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18553 (count_sr_conflicts): Use bitset_count.
18554 * src/reduce.c (inaccessable_symbols): Ditto.
18555 (bits_size): Remove.
18556 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18557
18558 2002-03-04 Akim Demaille <akim@epita.fr>
18559
18560 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18561 * src/reduce.c: Remove the `bitset_zero's following the
18562 `bitset_create's, as now it is performed by the latter.
18563
18564 2002-03-04 Akim Demaille <akim@epita.fr>
18565
18566 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18567 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18568 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18569 latest sources from Michael.
18570
18571 2002-03-04 Akim Demaille <akim@epita.fr>
18572
18573 * src/output.c (output): Don't free the grammar.
18574 * src/reader.c (grammar_free): New.
18575 * src/main.c (main): Call it and don't free symtab here.
18576
18577 2002-03-04 Akim Demaille <akim@epita.fr>
18578
18579 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18580 before returning.
18581 Reported by Benoit Perrot.
18582
18583 2002-03-04 Akim Demaille <akim@epita.fr>
18584
18585 Use bitset operations when possible, not loops over bits.
18586
18587 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18588 bitset_or.
18589 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18590 * src/reduce.c (useless_nonterminals): Formatting changes.
18591 * src/warshall.c (TC): Use bitset_or.
18592
18593 2002-03-04 Akim Demaille <akim@epita.fr>
18594
18595 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18596 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18597 Ditto.
18598
18599 2002-03-04 Akim Demaille <akim@epita.fr>
18600
18601 * src/lalr.c (F): Now a bitset*.
18602 Adjust all dependencies.
18603
18604 2002-03-04 Akim Demaille <akim@epita.fr>
18605
18606 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18607 Adjust all dependencies.
18608
18609 2002-03-04 Akim Demaille <akim@epita.fr>
18610
18611 * src/L0.c, src/LR0.h (nstates): Be size_t.
18612 Adjust comparisons (signed vs unsigned).
18613 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18614 bitset*.
18615 Adjust all dependencies.
18616
18617 2002-03-04 Akim Demaille <akim@epita.fr>
18618
18619 * src/closure.c (firsts): Now, also a bitset.
18620 Adjust all dependencies.
18621 (varsetsize): Remove, now unused.
18622 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18623
18624 2002-03-04 Akim Demaille <akim@epita.fr>
18625
18626 * src/print.c: Convert to use bitset.h, not hand coded iterations
18627 over ints.
18628
18629 2002-03-04 Akim Demaille <akim@epita.fr>
18630
18631 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18632
18633 2002-03-04 Akim Demaille <akim@epita.fr>
18634
18635 * src/closure.c (ruleset): Be a bitset.
18636 (rulesetsize): Remove.
18637
18638 2002-03-04 Akim Demaille <akim@epita.fr>
18639
18640 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18641 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18642 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18643 * src/closure.c (fderives): Be an array of bitsets.
18644
18645 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18646
18647 * data/bison.c++: Merge the two generated headers. Insert a copyright
18648 notice in each output file.
18649
18650 2002-02-28 Akim Demaille <akim@epita.fr>
18651
18652 * data/bison.c++: Copy the prologue of bison.simple to fetch
18653 useful M4 definitions, such as b4_header_guard.
18654
18655 2002-02-25 Akim Demaille <akim@epita.fr>
18656
18657 * src/getargs.c (version): Give the name of the authors, and use a
18658 translator friendly scheme for the bgr
18659 copyright notice.
18660
18661 2002-02-25 Akim Demaille <akim@epita.fr>
18662
18663 * src/output.c (header_output): Remove, now handled completely via
18664 M4.
18665
18666 2002-02-25 Akim Demaille <akim@epita.fr>
18667
18668 * m4/m4.m4: New, from CVS Autoconf.
18669 * configure.in: Invoke it.
18670 * src/output.c (output_skeleton): Use its result instead of the
18671 hard coded name.
18672
18673 2002-02-25 Akim Demaille <akim@epita.fr>
18674
18675 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18676 Fileutils 4.1.5.
18677 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18678 * src/output.c (output_skeleton): Use mkstemp to create a real
18679 temporary file.
18680 Move the filling of `skeleton' and its muscle to...
18681 (prepare): here.
18682 (output): Move the definition of the prologue muscle to...
18683 (prepare): here.
18684 * src/system.h (DEFAULT_TMPDIR): New.
18685
18686 2002-02-14 Paul Eggert <eggert@twinsun.com>
18687
18688 Remove the support for C++ namespace cleanliness; it was
18689 causing more problems than it was curing, since it didn't work
18690 properly on some nonstandard C++ compilers. This can wait
18691 for a proper C++ parser.
18692
18693 * NEWS: Document this.
18694 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18695 of C++, as it's treated like C now.
18696 * src/bison.simple (YYSTD): Remove.
18697 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18698 Treat C++ just like Standard C instead of trying to support
18699 namespace cleanliness.
18700
18701 2002-02-14 Akim Demaille <akim@epita.fr>
18702
18703 * tests/regression.at (else): Adjust to Andreas' change.
18704
18705 2002-02-14 Akim Demaille <akim@epita.fr>
18706
18707 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18708
18709 2002-02-13 Andreas Schwab <schwab@suse.de>
18710
18711 * src/output.c (output_rule_data): Don't output NULL, it might
18712 not be defined yet.
18713
18714 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18715
18716 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18717 (Copyright notice): Update.
18718
18719 2002-02-11 Akim Demaille <akim@epita.fr>
18720
18721 * tests/regression.at (%nonassoc and eof): Don't include
18722 nonportable headers.
18723
18724 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18725
18726 * data/bison.c++: Correct error recovery. Make the user able to
18727 initialize the starting location.
18728
18729 2002-02-07 Akim Demaille <akim@epita.fr>
18730
18731 * tests/input.at: New.
18732
18733 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18734
18735 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18736 more consistent when naming methods and variables. Put preprocessor
18737 directives around tables only needed for debugging.
18738
18739 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18740
18741 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18742 C++ parsers.
18743 (yy::b4_name::parse): Use print_.
18744
18745 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18746
18747 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18748
18749 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18750
18751 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18752 C++ parsers.
18753 (yy::b4_name::parse): Build verbose error messages, and use error_.
18754
18755 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18756
18757 * data/bison.c++: Fix m4 quoting in comments.
18758
18759 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18760
18761 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18762 not expanded by m4.
18763
18764 2002-02-05 Akim Demaille <akim@epita.fr>
18765
18766 * data/bison.c++: Adjust to the M4 back end.
18767 More is certainly needed.
18768
18769 2002-02-05 Akim Demaille <akim@epita.fr>
18770
18771 Give a try to M4 as a back end.
18772
18773 * lib/readpipe.c: New, from wdiff.
18774 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18775 BISON_HAIRY.
18776 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18777 specific values. Now it is m4 that performs the lookup.
18778 * src/parse-skel.y: Remove.
18779 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18780 * src/output.c (actions_output, guards_output)
18781 (token_definitions_output): No longer keeps track of the output
18782 line number, hence remove the second argument.
18783 (guards_output): Check against the guard member of a rule, not the
18784 action member.
18785 Adjust callers.
18786 (output_skeleton): Don't look for the skeleton location, let m4 do
18787 that.
18788 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18789 file will be used.
18790 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18791 (prepare): Given that for the time being changesyntax is not
18792 usable in M4, rename the muscles using `-' to `_'.
18793 Define `defines_flag', `output_parser_name' and `output_header_name'.
18794 * src/output.h (actions_output, guards_output)
18795 (token_definitions_output): Adjust prototypes.
18796 * src/scan-skel.l: Instead of scanning the skeletons, it now
18797 processes the output of m4: `__oline__' and `#output'.
18798 * data/bison.simple: Adjust to be used by M4(sugar).
18799 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18800 to date.
18801 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18802 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18803 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18804 shamelessly stolen from CVS Autoconf.
18805
18806 2002-02-05 Akim Demaille <akim@epita.fr>
18807
18808 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18809 * configure.in: Check for the declarations of free and malloc.
18810 * src/muscle_tab.c: Adjust.
18811
18812 2002-02-05 Akim Demaille <akim@epita.fr>
18813
18814 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18815 which have no values.
18816
18817 2002-02-05 Akim Demaille <akim@epita.fr>
18818
18819 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18820 * data/: here.
18821
18822 2002-01-29 Paul Eggert <eggert@twinsun.com>
18823
18824 * src/bison.simple (YYSIZE_T): Do not define merely because
18825 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18826 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18827
18828 2002-01-27 Akim Demaille <akim@epita.fr>
18829
18830 Fix `%nonassoc and eof'.
18831
18832 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18833 which were not properly copied! Replace
18834 memcpy (res->errs, src->errs, src->nerrs);
18835 with
18836 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18837 !!!
18838 * tests/regression.at (%nonassoc and eof): Adjust to newest
18839 Autotest: `.' is not in the PATH.
18840
18841 2002-01-27 Akim Demaille <akim@epita.fr>
18842
18843 * tests/sets.at (AT_EXTRACT_SETS): New.
18844 (Nullable): Use it.
18845 (Firsts): New.
18846
18847 2002-01-26 Akim Demaille <akim@epita.fr>
18848
18849 * tests/actions.at, tests/calc.at, tests/headers.at,
18850 * tests/torture.at: Adjust to the newest Autotest which no longer
18851 forces `.' in the PATH.
18852
18853 2002-01-25 Akim Demaille <akim@epita.fr>
18854
18855 * tests/regression.at (%nonassoc and eof): New.
18856 Suggested by Robert Anisko.
18857
18858 2002-01-24 Akim Demaille <akim@epita.fr>
18859
18860 Bison dumps core when trying to complain about broken input files.
18861 Reported by Cris van Pelt.
18862
18863 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18864 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18865 into...
18866 (Invalid inputs): Strengthen: exercise parse_percent_token.
18867
18868 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18869
18870 * src/Makefile.am: Add bison.c++.
18871 * src/bison.c++: New skeleton.
18872
18873 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18874
18875 * po/it.po: New.
18876
18877 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18878
18879 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18880
18881 2002-01-20 Marc Autret <marc@gnu.org>
18882
18883 * src/files.c (compute_output_file_names): Fix
18884
18885 2002-01-20 Marc Autret <marc@gnu.org>
18886
18887 * tests/output.at: New test.
18888 * src/files.c (compute_base_names): Don't map extensions when
18889 the YACC flag is set, use defaults.
18890 Reported by Evgeny Stambulchik.
18891
18892 2002-01-20 Marc Autret <marc@gnu.org>
18893
18894 * src/system.h: Need to define __attribute__ away for non-GCC
18895 compilers as well (i.e., the vendor C compiler).
18896 Suggested by Albert Chin-A-Young.
18897
18898 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18899
18900 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18901 canonical definition.
18902 * src/system.h: Use the canonical definition for PARAMS (avoids
18903 a conflict with the macro from lib/hash.h).
18904
18905 2002-01-11 Akim Demaille <akim@epita.fr>
18906
18907 * configure.in: Use AC_FUNC_STRNLEN.
18908 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18909
18910 2002-01-09 Akim Demaille <akim@epita.fr>
18911
18912 * src/files.c, src/files.h (output_infix): New.
18913 (tab_extension): Remove.
18914 (compute_base_names): Compute the former, drop the latter.
18915 * src/output.c (prepare): Insert the muscles `output-infix', and
18916 `output-suffix'.
18917 * src/parse-skel.y (string, string.1): New.
18918 (section.header): Use it.
18919 (section.yacc): Remove.
18920 (prefix): Remove too.
18921 * src/scan-skel.l: Adjust.
18922 * src/bison.simple, src/bison.hairy: Adjust.
18923
18924 2002-01-09 Akim Demaille <akim@epita.fr>
18925
18926 * configure.in (WERROR_CFLAGS): Compute it.
18927 * src/Makefile.am (CFLAGS): Pass it.
18928 * tests/atlocal.in (CFLAGS): Idem.
18929 * src/files.c: Fix a few warnings.
18930 (get_extension_index): Remove, unused.
18931
18932 2002-01-08 Akim Demaille <akim@epita.fr>
18933
18934 * src/getargs.c (AS_FILE_NAME): New.
18935 (getargs): Use it to convert DOSish file names.
18936 * src/files.c (base_name): Rename as full_base_name to avoid
18937 clashes with `base_name ()'.
18938 (filename_split): New.
18939 (compute_base_names): N-th rewrite, using filename_split.
18940
18941 2002-01-08 Akim Demaille <akim@epita.fr>
18942
18943 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18944 New, stolen from the Fileutils 4.1.
18945 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18946 * configure.in: Check for the presence of memrchr, and of its
18947 prototype.
18948
18949 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18950
18951 * lib/hash.h (__P): Added definition for this macro.
18952 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18953 BUILT_SOURCES, to ensure they are generated first.
18954 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18955 %error-verbose to allow bootstrapping with bison 1.30x.
18956
18957 2002-01-06 Akim Demaille <akim@epita.fr>
18958
18959 * src/reader.c (parse_braces): Don't fetch the next char, the
18960 convention is to fetch on entry.
18961 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18962 'switch' without a following semicolon.
18963 * tests/regression.at (braces parsing): New.
18964
18965 2002-01-06 Akim Demaille <akim@epita.fr>
18966
18967 Bison is dead wrong in its RR conflict reports.
18968
18969 * tests/torture.at (GNU Cim Grammar): New.
18970 * src/conflicts.c (count_rr_conflicts): Fix.
18971
18972 2002-01-06 Akim Demaille <akim@epita.fr>
18973
18974 Creating package.m4 from configure.ac causes too many problems.
18975
18976 * tests/Makefile.am (package.m4): Create it by hand,
18977 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18978
18979 2002-01-06 Akim Demaille <akim@epita.fr>
18980
18981 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18982 skeleton.h.
18983
18984 2002-01-04 Paul Eggert <eggert@twinsun.com>
18985
18986 * doc/bison.texinfo (Debugging):
18987 Remove YYSTDERR; it's no longer defined or used.
18988 Also, s/cstdio.h/cstdio/.
18989
18990 2002-01-03 Akim Demaille <akim@epita.fr>
18991
18992 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18993
18994 2002-01-03 Akim Demaille <akim@epita.fr>
18995
18996 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18997 tracing code to --trace, wait for a better --trace option, with
18998 args.
18999
19000 2002-01-03 Akim Demaille <akim@epita.fr>
19001
19002 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
19003 The ISO C++ standard is extremely clear about it: stderr is
19004 considered a macro, not a regular symbol (see table 94 `Header
19005 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19006 Therefore std:: does not apply to it. It still does with fprintf.
19007 Also, s/cstdio.h/cstdio/.
19008
19009 2002-01-03 Akim Demaille <akim@epita.fr>
19010
19011 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19012 for non system headers.
19013
19014 2002-01-02 Akim Demaille <akim@epita.fr>
19015
19016 Equip the skeleton chain with location tracking, runtime trace,
19017 pure parser and scanner.
19018
19019 * src/parse-skel.y: Request a pure parser, locations, and prefix
19020 renaming.
19021 (%union): Having several members with the same type does not help
19022 type mismatches, simplify.
19023 (YYPRINT, yyprint): New.
19024 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19025 (skel_error): this.
19026 Handle locations.
19027 * src/scan-skel.l: Adjust to these changes.
19028 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19029 (LOCATION_PRINT, skel_control_t): New.
19030
19031 2001-12-30 Akim Demaille <akim@epita.fr>
19032
19033 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19034 replace `gb' with BLANKS.
19035 * src/scan-skel.l: Adjust.
19036
19037 2001-12-30 Akim Demaille <akim@epita.fr>
19038
19039 * src/system.h: We don't need nor want bcopy.
19040 Throw away MS-DOS crap: we don't need getpid.
19041 * configure.in: We don't need strndup. It was even causing
19042 problems: because Flex includes the headers *before* us,
19043 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19044 not visible.
19045 * lib/xstrndup.c: New.
19046 * src/scan-skel.l: Use it.
19047 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19048 * src/parse-skel.y: Use %directives instead of #defines.
19049
19050 2001-12-30 Akim Demaille <akim@epita.fr>
19051
19052 * src/skeleton.h: New.
19053 * src/output.c (output_parser, output_master_parser): Remove, dead
19054 code.
19055 * src/output.h (get_lines_number, actions_output, guards_output)
19056 (token_definitions_output): Prototype them.
19057 * src/parse-skel.y: Add the license notice.
19058 Include output.h and skeleton.h.
19059 (process_skeleton): Returns void, and takes a single parameter.
19060 * src/scan-skel.l: Add the license notice.
19061 Include skeleton.h.
19062 Don't use %option yylineno: it seems that then Flex imagines
19063 REJECT has been used, and therefore it won't reallocate its
19064 buffers (which makes no other sense to me than a bug). It results
19065 in warnings for `unused: yy_flex_realloc'.
19066
19067 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
19068
19069 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19070 (MUSCLE_INSERT_PREFIX): ...to there.
19071 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19072 (MUSCLE_INSERT_PREFIX): Move from here...
19073
19074 * src/bison.hairy: Add a section directive. Put braces around muscle
19075 names. This parser skeleton is still broken, but Bison should not
19076 choke on a bad muscle 'syntax'.
19077 * src/bison.simple: Add a section directive. Put braces around muscle
19078 names.
19079
19080 * src/files.h (strsuffix, stringappend): Add declarations.
19081 (tab_extension): Add declaration.
19082 (short_base_name): Add declaration.
19083
19084 * src/files.c (strsuffix, stringappend): No longer static. These
19085 functions are used in the skeleton parser.
19086 (tab_extension): New.
19087 (compute_base_names): Use the computations done in this function
19088 to guess if the generated parsers should have '.tab' in their
19089 names.
19090 (short_base_name): No longer static.
19091
19092 * src/output.c (output_skeleton): New.
19093 (output): Disable call to output_master_parser, and give a try to
19094 a new skeleton handling system.
19095 (guards_output, actions_output): No longer static.
19096 (token_definitions_output, get_lines_number): No longer static.
19097
19098 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19099
19100 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
19101 parse-skel.y.
19102
19103 * src/parse-skel.y: New file.
19104 * src/scan-skel.l: New file.
19105
19106 2001-12-29 Akim Demaille <akim@epita.fr>
19107
19108 %name-prefix is broken.
19109
19110 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19111 Adjust all dependencies.
19112 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19113 %name-prefix.
19114
19115 Renaming yylval but not yylloc is not consistent. Now we do.
19116
19117 * src/bison.simple: Prefix yylloc if used.
19118 * doc/bison.texinfo (Decl Summary): Document that.
19119
19120 2001-12-29 Akim Demaille <akim@epita.fr>
19121
19122 * doc/bison.texinfo: Promote `%long-directive' over
19123 `%long_directive'.
19124 Remove all references to fixed-output-files, yacc is enough.
19125
19126 2001-12-29 Akim Demaille <akim@epita.fr>
19127
19128 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19129 user prologue. These are defaults.
19130 * tests/actions.at (Mid-rule actions): Make sure the user can
19131 define YYDEBUG and YYERROR_VERBOSE.
19132
19133 2001-12-29 Akim Demaille <akim@epita.fr>
19134
19135 * src/output.c (header_output): Don't forget to export YYLTYPE and
19136 yylloc.
19137 * tests/headers.at (export YYLTYPE): New, make sure it does.
19138 * tests/regression.at (%union and --defines, Invalid CPP headers):
19139 Move to...
19140 * tests/headers.at: here.
19141
19142 2001-12-29 Akim Demaille <akim@epita.fr>
19143
19144 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19145
19146 2001-12-29 Akim Demaille <akim@epita.fr>
19147
19148 * tests/actions.at (Mid-rule actions): Output on a single line
19149 instead of several.
19150
19151 2001-12-29 Akim Demaille <akim@epita.fr>
19152
19153 * doc/bison.texinfo: Formatting changes.
19154
19155 2001-12-29 Akim Demaille <akim@epita.fr>
19156
19157 Don't store the token defs in a muscle, just be ready to output it
19158 on command. Now possible via `symbols'. Fixes a memory leak.
19159
19160 * src/output.c (token_definitions_output): New.
19161 (output_parser, header_output): Use it.
19162 * src/reader.c (symbols_save): Remove.
19163
19164 2001-12-29 Akim Demaille <akim@epita.fr>
19165
19166 * src/bison.simple: Do not provide a default for YYSTYPE and
19167 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19168 default.
19169
19170 2001-12-29 Akim Demaille <akim@epita.fr>
19171
19172 Mid-rule actions are simply... ignored!
19173
19174 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19175 the empty-rule associated to the dummy symbol, not to the host
19176 rule.
19177 * tests/actions.at (Mid-rule actions): New.
19178
19179 2001-12-29 Akim Demaille <akim@epita.fr>
19180
19181 Memory leak.
19182
19183 * src/reader.c (reader): Free grammar.
19184
19185 2001-12-29 Akim Demaille <akim@epita.fr>
19186
19187 Memory leak.
19188
19189 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19190 since it allocates it for each state, although only one is needed.
19191 (allocate_storage): Do it here.
19192
19193 2001-12-29 Akim Demaille <akim@epita.fr>
19194
19195 * src/options.h, src/options.c (create_long_option_table): Rename
19196 as...
19197 (long_option_table_new): this, with a clearer prototype.
19198 (percent_table): Remove, unused,
19199 * src/getargs.c (getargs): Adjust.
19200
19201 2001-12-29 Akim Demaille <akim@epita.fr>
19202
19203 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19204 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19205 as states.
19206
19207 2001-12-29 Akim Demaille <akim@epita.fr>
19208
19209 * src/lalr.c (build_relations): Rename `states' as `states1'.
19210 Sorry, I don't understand exactly what it is, no better name...
19211
19212 2001-12-29 Akim Demaille <akim@epita.fr>
19213
19214 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19215 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19216 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19217 as rules.
19218
19219 2001-12-29 Akim Demaille <akim@epita.fr>
19220
19221 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19222 ago.
19223
19224 2001-12-29 Akim Demaille <akim@epita.fr>
19225
19226 * src/reader.c, src/reader.h (user_toknums): Remove.
19227 Adjust all users to use symbols[i]->user_token_number.
19228
19229 2001-12-29 Akim Demaille <akim@epita.fr>
19230
19231 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19232 Adjust all users to use symbols[i]->prec or ->assoc.
19233
19234 2001-12-29 Akim Demaille <akim@epita.fr>
19235
19236 * src/reader.c, src/reader.h (tags): Remove.
19237 Adjust all users to use symbols[i]->tag.
19238
19239 2001-12-29 Akim Demaille <akim@epita.fr>
19240
19241 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19242 and rule_table.
19243 * src/reader.c (packsymbols): Fill this table.
19244 Drop sprec.
19245 * src/conflicts.c (resolve_sr_conflict): Adjust.
19246 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19247 single table.
19248 Use symbols[i]->tag instead of tags[i].
19249
19250 2001-12-29 Akim Demaille <akim@epita.fr>
19251
19252 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19253 In addition, put a comment in there, to replace...
19254 * tests/regression.at (%union and C comments): Remove.
19255
19256 2001-12-29 Akim Demaille <akim@epita.fr>
19257
19258 * tests/regression.at (Web2c Actions): Blindly move the actual
19259 output as expected output. The contents *seem* right to me, but I
19260 can't pretend reading perfectly parser tables... Nonetheless, all
19261 the other tests pass correctly, the table look OK, even though the
19262 presence of `$axiom' is to be noted: AFAICS it is useless (but
19263 harmless).
19264
19265 2001-12-29 Akim Demaille <akim@epita.fr>
19266
19267 * src/reader.c (readgram): Don't add the rule 0 if there were no
19268 rules read. In other words, add it _after_ having performed
19269 grammar sanity checks.
19270 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19271
19272 2001-12-29 Akim Demaille <akim@epita.fr>
19273
19274 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19275 visible, and some states have now a different number.
19276
19277 2001-12-29 Akim Demaille <akim@epita.fr>
19278
19279 * src/reader.c (readgram): Bind the initial rule's lineno to that
19280 of the first rule.
19281 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19282 (Solved SR Conflicts): Adjust rule 0's line number.
19283
19284 2001-12-29 Akim Demaille <akim@epita.fr>
19285
19286 Fix the `GAWK Grammar' failure.
19287
19288 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19289 the reductions of the first state which was mistakenly confused
19290 with the final state because precisely final_state was initialized
19291 to 0.
19292 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19293 now noticed by Bison.
19294 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19295 have a reduction on $default.
19296
19297 2001-12-29 Akim Demaille <akim@epita.fr>
19298
19299 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19300 rule line numbers.
19301 * src/closure.c (print_closure): Likewise.
19302 * src/derives.c (print_derives): Likewise.
19303 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19304 now.
19305
19306 2001-12-29 Akim Demaille <akim@epita.fr>
19307
19308 * src/lalr.c (lookaheads_print): New.
19309 (lalr): Call it when --trace-flag.
19310 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19311 are dumped.
19312
19313 2001-12-29 Akim Demaille <akim@epita.fr>
19314
19315 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19316 when walking through ritem, even via rule->rhs.
19317 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19318 (useful_production, useless_nonterminals): Likewise.
19319 (reduce_grammar_tables): Likewise, plus update nritems.
19320 * src/nullable.c (set_nullable): Likewise.
19321 * src/lalr.c (build_relations): Likewise.
19322 * tests/sets.at (Nullable): Adjust.
19323 Fortunately, now, the $axiom is no longer nullable.
19324
19325 2001-12-29 Akim Demaille <akim@epita.fr>
19326
19327 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19328 the 0-sentinel.
19329 * src/gram.c (ritem_longest_rhs): Likewise.
19330 * src/reduce.c (nonterminals_reduce): Likewise.
19331 * src/print_graph.c (print_graph): Likewise.
19332 * src/output.c (output_rule_data): Likewise.
19333 * src/nullable.c (set_nullable): Likewise.
19334
19335 2001-12-29 Akim Demaille <akim@epita.fr>
19336
19337 * src/output.c: Comment changes.
19338
19339 2001-12-27 Paul Eggert <eggert@twinsun.com>
19340
19341 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19342 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19343 Sparc, as they were causing more porting problems than the
19344 (minor) performance improvement was worth.
19345
19346 Also, catch up with 1.31's YYSTD.
19347
19348 2001-12-27 Akim Demaille <akim@epita.fr>
19349
19350 * src/output.c (output_gram): Rely on nritems, not the
19351 0-sentinel. See below.
19352 Use -1 as separator, not 0.
19353 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19354 Rely on -1 as separator in yyrhs, instead of 0.
19355 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19356 twice `Now at end of input', therefore there are two lines less to
19357 expect.
19358
19359 2001-12-27 Akim Demaille <akim@epita.fr>
19360
19361 * tests/regression.at (Unresolved SR Conflicts):
19362 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19363 below.
19364
19365 2001-12-27 Akim Demaille <akim@epita.fr>
19366
19367 * src/LR0.c (new_state): Recognize the final state by the fact it
19368 is reached by eoftoken.
19369 (insert_start_shifting_state, insert_eof_shifting_state)
19370 (insert_accepting_state, augment_automaton): Remove, since now
19371 these states are automatically computed from the initial state.
19372 (generate_states): Adjust.
19373 * src/print.c: When reporting a rule number to the user, substract
19374 1, so that the axiom rule is rule 0, and the first user rule is 1.
19375 * src/reduce.c: Likewise.
19376 * src/print_graph.c (print_core): For the time being, just as for
19377 the report, depend upon --trace-flags to dump the full set of
19378 items.
19379 * src/reader.c (readgram): Once the grammar read, insert the rule
19380 0: `$axiom: START-SYMBOL $'.
19381 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19382 number of the states has changed (the final state is no longer
19383 necessarily the last), catch up.
19384
19385 2001-12-27 Akim Demaille <akim@epita.fr>
19386
19387 Try to make the use of the eoftoken valid. Given that its value
19388 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19389 is used instead of > 0 where appropriate, (ii), depend upon nritems
19390 instead of the 0-sentinel.
19391
19392 * src/gram.h, src/gram.c (nritems): New.
19393 Expected to be duplication of nitems, but for the time being...
19394 * src/reader.c (packgram): Assert nritems and nitems are equal.
19395 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19396 * src/closure.c (print_closure, print_fderives): Likewise.
19397 * src/gram.c (ritem_print): Likewise.
19398 * src/print.c (print_core, print_grammar): Likewise.
19399 * src/print_graph.c: Likewise.
19400
19401 2001-12-27 Akim Demaille <akim@epita.fr>
19402
19403 * src/main.c (main): If there are complains after grammar
19404 reductions, then output the report anyway if requested, then die.
19405 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19406 * src/reader.c (eoftoken): New.
19407 (parse_token_decl): If the token being defined has value `0', it
19408 is the eoftoken.
19409 (packsymbols): No longer hack `tags' to insert `$' by hand.
19410 Be sure to preserve the value of the eoftoken.
19411 (reader): Make sure eoftoken is defined.
19412 Initialize nsyms to 0: now eoftoken is created just like the others.
19413 * src/print.c (print_grammar): Don't special case the eof token.
19414 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19415 lie anyway, albeit pleasant.
19416 * tests/calc.at: Exercise error messages with eoftoken.
19417 Change the grammar so that empty input is invalid.
19418 Adjust expectations.
19419 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19420
19421 2001-12-27 Akim Demaille <akim@epita.fr>
19422
19423 * configure.in: Check the protos of strchr ans strspn.
19424 Replace strchr if needed.
19425 * src/system.h: Provide the protos of strchr, strspn and memchr if
19426 missing.
19427 * lib/strchr.c: New.
19428 * src/reader.c (symbols_save): Use strchr.
19429
19430 2001-12-27 Akim Demaille <akim@epita.fr>
19431
19432 * src/print.c, src/print_graph.c (escape): New.
19433 Use it to quote the TAGS outputs.
19434 * src/print_graph.c (print_state): Now errors are in red, and
19435 reductions in green.
19436 Prefer high to wide: output the state number on a line of its own.
19437
19438 2001-12-27 Akim Demaille <akim@epita.fr>
19439
19440 * src/state.h, src/state.c (reductions_new): New.
19441 * src/LR0.c (set_state_table): Let all the states have a
19442 `reductions', even if reduced to 0.
19443 (save_reductions): Adjust.
19444 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19445 * src/print.c (print_reductions, print_actions): Adjust.
19446 * src/output.c (action_row): Adjust.
19447
19448 2001-12-27 Akim Demaille <akim@epita.fr>
19449
19450 * src/state.h, src/state.c (errs_new, errs_dup): New.
19451 * src/LR0.c (set_state_table): Let all the states have an errs,
19452 even if reduced to 0.
19453 * src/print.c (print_errs, print_reductions): Adjust.
19454 * src/output.c (output_actions, action_row): Adjust.
19455 * src/conflicts.c (resolve_sr_conflict): Adjust.
19456
19457 2001-12-27 Akim Demaille <akim@epita.fr>
19458
19459 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19460
19461 2001-12-27 Akim Demaille <akim@epita.fr>
19462
19463 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19464 * src/print.c: here.
19465 (lookaheadset, shiftset): New, used as additional storage by
19466 print_reductions.
19467 (print_results): Adjust.
19468 (print_shifts, print_gotos, print_errs): New, extracted from...
19469 (print_actions): here.
19470 * src/print_graph.c (print_actions): Remove dead code.
19471
19472 2001-12-27 Akim Demaille <akim@epita.fr>
19473
19474 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19475 `$n' and `@n'.
19476
19477 2001-12-27 Akim Demaille <akim@epita.fr>
19478
19479 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19480 (build_relations): Adjust.
19481
19482 2001-12-27 Akim Demaille <akim@epita.fr>
19483
19484 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19485 duplication.
19486
19487 2001-12-27 Akim Demaille <akim@epita.fr>
19488
19489 * src/reader.c (packgram): Catch nitems overflows.
19490
19491 2001-12-27 Akim Demaille <akim@epita.fr>
19492
19493 * src/files.c, src/files.h (guard_obstack): Remove.
19494 * src/output.c (output): Adjust.
19495 * src/reader.c (parse_braces): New, factoring...
19496 (copy_action, copy_guard): these two which are renamed as...
19497 (parse_action, parse_guard): these.
19498 As a voluntary consequence, using braces around guards is now
19499 mandatory.
19500
19501 2001-12-27 Akim Demaille <akim@epita.fr>
19502
19503 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19504 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19505 members.
19506 (symbol_list_new): Adjust.
19507 (copy_action): action_line is the first line, not the last.
19508 (copy_guard): Just as for actions, store the `action' only, not
19509 the switch/case/break flesh.
19510 Don't parse the user action that might follow the guard, let...
19511 (readgram): do it, i.e., now, there can be an action after a
19512 guard.
19513 In other words the guard is just explicitly optional.
19514 (packgram): Adjust.
19515 * src/output.c (guards_output): New.
19516 (output_parser): Call it when needed.
19517 (output): Also free the guard and attrs obstacks.
19518 * src/files.c, src/files.h (obstack_save): Remove.
19519 (output_files): Remove.
19520 As a result, if one needs the former `.act' file, using an
19521 appropriate skeleton which requires actions and guards is now
19522 required.
19523 * src/main.c (main): Adjust.
19524 * tests/semantic.at: New.
19525 * tests/regression.at: Use `input.y' as input file name.
19526 Avoid 8+3 problems by requiring input.c when the test needs the
19527 parser.
19528
19529 2001-12-27 Akim Demaille <akim@epita.fr>
19530
19531 * src/reader.c (symbol_list_new): Be sure to initialize all the
19532 fields.
19533
19534 2001-12-27 Akim Demaille <akim@epita.fr>
19535
19536 All the hacks using a final pseudo state are now useless.
19537
19538 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19539 * src/lalr.c (nLA): New.
19540 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19541 instead of lookaheadsp from the pseudo state (nstate + 1).
19542
19543 2001-12-27 Akim Demaille <akim@epita.fr>
19544
19545 * src/output.c (action_row, token_actions): Use a state_t instead
19546 of a integer, and nlookaheads instead of the following state's
19547 lookaheadsp.
19548
19549 2001-12-27 Akim Demaille <akim@epita.fr>
19550
19551 * src/conflicts.c (log_resolution, flush_shift)
19552 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19553 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19554 (conflicts_print, print_reductions): Use a state_t instead of an
19555 integer when referring to a state.
19556 As much as possible, depend upon nlookaheads, instead of the
19557 `lookaheadsp' member of the following state (since lookaheads of
19558 successive states are successive, the difference between state n + 1
19559 and n served as the number of lookaheads for state n).
19560 * src/lalr.c (add_lookback_edge): Likewise.
19561 * src/print.c (print_core, print_actions, print_state)
19562 (print_results): Likewise.
19563 * src/print_graph.c (print_core, print_actions, print_state)
19564 (print_graph): Likewise.
19565 * src/conflicts.h: Adjust.
19566
19567 2001-12-27 Akim Demaille <akim@epita.fr>
19568
19569 * src/bison.hairy: Formatting/comment changes.
19570 ANSIfy.
19571 Remove `register' indications.
19572 Add plenty of `static'.
19573
19574 2001-12-27 Akim Demaille <akim@epita.fr>
19575
19576 * src/output.c (prepare): Drop the muscle `ntbase' which
19577 duplicates ntokens.
19578 * src/bison.simple: Formatting/comment changes.
19579 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19580 is an undocumented synonym.
19581
19582 2001-12-22 Akim Demaille <akim@epita.fr>
19583
19584 * src/output.c (output_table_data): Change the prototype to use
19585 `int' for array ranges: some invocations do pass an int, not a
19586 short.
19587 Reported by Wayne Green.
19588
19589 2001-12-22 Akim Demaille <akim@epita.fr>
19590
19591 Some actions of web2c.y are improperly triggered.
19592 Reported by Mike Castle.
19593
19594 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19595 * tests/regression.at (Web2c): Rename as...
19596 (Web2c Report): this.
19597 (Web2c Actions): New.
19598
19599 2001-12-22 Akim Demaille <akim@epita.fr>
19600
19601 Reductions in web2c.y are improperly reported.
19602 Reported by Mike Castle.
19603
19604 * src/conflicts.c (print_reductions): Fix.
19605 * tests/regression.at (Web2c): New.
19606
19607 2001-12-18 Akim Demaille <akim@epita.fr>
19608
19609 Some host fail on `assert (!"foo")', which expands to
19610 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19611 Reported by Nelson Beebee.
19612
19613 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19614 `#define it_succeeded 0' and `assert (it_succeeded)'.
19615
19616 2001-12-17 Marc Autret <autret_m@epita.fr>
19617
19618 * src/bison.simple: Don't hard code the skeleton line and filename.
19619 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19620 New line counter 'skeleton_line' (skeleton-line muscle).
19621
19622 2001-12-17 Paul Eggert <eggert@twinsun.com>
19623
19624 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19625 YYDEBUG must be defined to a nonzero value.
19626
19627 * src/bison.simple (yytname): Do not assume that the user defines
19628 YYDEBUG to a properly parenthesized expression.
19629
19630 2001-12-17 Akim Demaille <akim@epita.fr>
19631
19632 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19633 nlookaheads is a new member.
19634 Adjust all users.
19635 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19636 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19637 state.
19638
19639 2001-12-17 Akim Demaille <akim@epita.fr>
19640
19641 * src/files.h, src/files.c (open_files, close_files): Remove.
19642 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19643 let...
19644 * src/reader.c (reader): Do it.
19645
19646 2001-12-17 Akim Demaille <akim@epita.fr>
19647
19648 * src/conflicts.c (print_reductions): Formatting changes.
19649
19650 2001-12-17 Akim Demaille <akim@epita.fr>
19651
19652 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19653 (flush_reduce): New.
19654 (resolve_sr_conflict): Adjust.
19655
19656 2001-12-17 Akim Demaille <akim@epita.fr>
19657
19658 * src/output.c (output_obstack): Be static and rename as...
19659 (format_obstack): this, to avoid any confusion with files.c's
19660 output_obstack.
19661 * src/reader.h (muscle_obstack): Move to...
19662 * src/output.h: here, since it's defined in output.c.
19663
19664 2001-12-17 Akim Demaille <akim@epita.fr>
19665
19666 * src/output.c (action_row, save_column, default_goto)
19667 (sort_actions, matching_state, pack_vector): Better variable
19668 locality.
19669
19670 2001-12-17 Akim Demaille <akim@epita.fr>
19671
19672 * src/output.c: Various formatting changes.
19673
19674 2001-12-17 Akim Demaille <akim@epita.fr>
19675
19676 * src/files.c (output_files): Free the output_obstack.
19677 * src/main.c (main): Call print and print_graph conditionally.
19678 * src/print.c (print): Work unconditionally.
19679 * src/print_graph.c (print_graph): Work unconditionally.
19680 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19681
19682 2001-12-16 Marc Autret <autret_m@epita.fr>
19683
19684 * src/output.c (actions_output): Fix. When we use %no-lines,
19685 there is one less line per action.
19686
19687 2001-12-16 Marc Autret <autret_m@epita.fr>
19688
19689 * src/bison.simple: Remove a useless #line directive.
19690 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19691 * src/output.c (get_lines_number): New.
19692 (output_parser): Adjust, now takes care about the lines of a
19693 output muscles.
19694 Fix line numbering.
19695 (actions_output): Computes the number of lines taken by actions.
19696 (output_master_parser): Insert new skeleton which is the name of
19697 the output parser file name.
19698
19699 2001-12-15 Marc Autret <autret_m@epita.fr>
19700
19701 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19702
19703 2001-12-15 Marc Autret <autret_m@epita.fr>
19704
19705 * src/output.c (output_gram): Keep track of the hairy one.
19706
19707 2001-12-15 Akim Demaille <akim@epita.fr>
19708
19709 Make `make distcheck' work.
19710
19711 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19712 system.h which uses libgettext.h.
19713
19714 2001-12-15 Akim Demaille <akim@epita.fr>
19715
19716 * src/nullable.c (set_nullable): Useless rules must be skipped,
19717 otherwise, since we range over their symbols, we might look at a
19718 nonterminal which no longer ``exists'', i.e., it is not counted in
19719 `nvars', hence we overflow our arrays.
19720
19721 2001-12-15 Akim Demaille <akim@epita.fr>
19722
19723 The header can also be produced directly, without any obstack!
19724 Yahoo!
19725
19726 * src/files.c, src/files.h (defines_obstack): Remove.
19727 (compute_header_macro): Global.
19728 (defines_obstack_save): Remove.
19729 * src/reader.c (parse_union_decl): No longer output to
19730 defines_obstack: its content can be found in the `stype' muscle
19731 anyway.
19732 (output_token_translations): Merge into...
19733 (symbols_output): this.
19734 Rename as...
19735 (symbols_save): this.
19736 (reader): Adjust.
19737 * src/output.c (header_output): New.
19738 (output): Call it.
19739
19740 2001-12-15 Akim Demaille <akim@epita.fr>
19741
19742 * src/reader.c (parse_union_decl): Instead of handling two obstack
19743 simultaneously, use one to define the `stype' muscle, and use the
19744 value of the latter to fill defines_obstack.
19745 (copy_comment): Remove.
19746 (copy_comment2): Work for a single obstack.
19747 Rename as...
19748 (copy_comment): this.
19749
19750 2001-12-15 Akim Demaille <akim@epita.fr>
19751
19752 * src/lex.c, src/lex.h (xgetc): No longer static.
19753 * src/reader.c (parse_union_decl): Revamp.
19754
19755 2001-12-15 Akim Demaille <akim@epita.fr>
19756
19757 Still making progress in separating Bison into (i) input, (ii)
19758 process, (iii) output: now we can directly output the parser file
19759 without using table_obstack at all.
19760
19761 * src/files.c, src/files.h (table_obstack): Bye bye.
19762 (parser_file_name): New.
19763 * src/files.c (compute_output_file_names): Compute it.
19764 * src/output.c (actions_output, output_parser)
19765 (output_master_parser): To a file instead of an obstack.
19766
19767 2001-12-15 Akim Demaille <akim@epita.fr>
19768
19769 Attach actions to rules, instead of pre-outputting them to
19770 actions_obstack.
19771
19772 * src/gram.h (rule_t): action and action_line are new members.
19773 * src/reader.c (symbol_list): Likewise.
19774 (copy_action): Save the actions within the rule.
19775 (packgram): Save them in rule_table.
19776 * src/output.c (actions_output): New.
19777 (output_parser): Use it on `%%actions'.
19778 (output_rule_data): Don't free rule_table.
19779 (output): Do it.
19780 (prepare): Don't save the `action' muscle.
19781 * src/bison.simple: s/%%action/%%actions/.
19782
19783 2001-12-15 Akim Demaille <akim@epita.fr>
19784
19785 * src/reader.c (copy_action): When --yacc, don't append a `;'
19786 to the user action: let it fail if lacking.
19787 Suggested by Arnold Robbins and Tom Tromey.
19788
19789 2001-12-14 Akim Demaille <akim@epita.fr>
19790
19791 * src/lex.c (literalchar): Simply return the char you decoded, non
19792 longer mess around with obstacks and int pointers.
19793 Adjust all callers.
19794
19795 2001-12-14 Akim Demaille <akim@epita.fr>
19796
19797 * src/lex.c (literalchar): Don't escape the special characters,
19798 just decode them, and keep them as char (before, eol was output as
19799 the 2 char string `\n' etc.).
19800 * src/output.c (output_rule_data): Use quotearg to output the
19801 token strings.
19802
19803 2001-12-13 Paul Eggert <eggert@twinsun.com>
19804
19805 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19806 Do not infringe on the global user namespace when using C++.
19807 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19808 All uses of `fprintf' and `stderr' changed.
19809
19810 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19811
19812 2001-12-13 Akim Demaille <akim@epita.fr>
19813
19814 The computation of nullable is broken: it doesn't handle empty
19815 RHS's properly.
19816
19817 * tests/torture.at (GNU AWK Grammar): New.
19818 * tests/sets.at (Nullable): New.
19819 * src/nullable.c (set_nullable): Instead of blindly looping over
19820 `ritems', loop over the rules, and then over their rhs's.
19821
19822 Work around Autotest bugs.
19823
19824 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19825 frame, because Autotest understand lines starting with a `+' as
19826 traces from the shell. Then, they are not processed properly.
19827 Admittedly an Autotest bug, but we don't have time to wait for
19828 Autotest to catch up.
19829 * tests/regression.at (Broken Closure): Adjust to the new table
19830 frames.
19831 Move to...
19832 * tests/sets.at: here.
19833
19834 2001-12-13 Akim Demaille <akim@epita.fr>
19835
19836 * src/closure.c (closure): Use nrules instead of playing tricks
19837 with BITS_PER_WORD.
19838
19839 2001-12-13 Akim Demaille <akim@epita.fr>
19840
19841 * src/print.c (print_actions): Output the handling of `$' as the
19842 traces do: shifting the token EOF. Before EOF was treated as a
19843 nonterminal.
19844 * tests/regression.at: Adjust some tests.
19845 * src/print_graph.c (print_core): Complete the set of items via
19846 closure. The next-to-final and final states are still unsatisfying,
19847 but that's to be addressed elsewhere.
19848 No longer output the rule numbers, but do output the state number.
19849 A single loop for the shifts + gotos is enough, but picked a
19850 distinct color for each.
19851 (print_graph): Initialize and finalize closure.
19852
19853 2001-12-13 Akim Demaille <akim@epita.fr>
19854
19855 * src/reader.c (readgram): Remove dead code, an strip useless
19856 braces.
19857 (get_type): Remove, unused.
19858
19859 2001-12-12 Akim Demaille <akim@epita.fr>
19860
19861 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19862 on that of lib/error.c.
19863
19864 2001-12-12 Akim Demaille <akim@epita.fr>
19865
19866 Some hosts don't like `/' in includes.
19867
19868 * src/system.h: Include libgettext.h without qualifying the path.
19869 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19870 $(top_srcdir).
19871
19872 2001-12-11 Marc Autret <autret_m@epita.fr>
19873
19874 * src/output.c (output_parser): Remove useless muscle.
19875
19876 2001-12-11 Marc Autret <autret_m@epita.fr>
19877
19878 * src/bison.simple: Remove #line just before %%epilogue. It
19879 is now handled in ...
19880 * src/reader.c (read_additionnal_code): Add the output of a
19881 #line for the epilogue.
19882
19883 2001-12-10 Marc Autret <autret_m@epita.fr>
19884
19885 * src/reader.c (copy_definition): Re-use CPP-outed code which
19886 replace precedent remove.
19887 * src/bison.simple: Remove #line before %%prologue because
19888 %%input-line is wrong at this time.
19889
19890 2001-12-10 Marc Autret <autret_m@epita.fr>
19891
19892 * src/reader.c (symbols_output): Clean up.
19893 * src/output.c (output_gram, output): Clean up.
19894
19895 2001-12-10 Akim Demaille <akim@epita.fr>
19896
19897 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19898 * src/LR0.c (set_state_table): here.
19899 * src/lalr.c (lalr): Call it.
19900
19901 2001-12-10 Akim Demaille <akim@epita.fr>
19902
19903 * src/state.h (shifts): Remove the `number' member: shifts are
19904 attached to state, hence no longer need to be labelled with a
19905 state number.
19906
19907 2001-12-10 Akim Demaille <akim@epita.fr>
19908
19909 Now that states have a complete set of members, the linked list of
19910 shifts is useless: just fill directly the state's shifts member.
19911
19912 * src/state.h (shifts): Remove the `next' member.
19913 * src/LR0.c (first_state, last_state): Remove.
19914 Adjust the callers.
19915 (augment_automaton): Don't look for the shifts that must be added
19916 a shift on EOF: it is those of the state we looked for! But now,
19917 since shifts are attached, it is no longer needed to looking
19918 merely by its id: its number.
19919
19920 2001-12-10 Akim Demaille <akim@epita.fr>
19921
19922 * src/LR0.c (augment_automaton): Better variable locality.
19923 Remove an impossible branch: if there is a state corresponding to
19924 the start symbol being shifted, then there is shift for the start
19925 symbol from the initial state.
19926
19927 2001-12-10 Akim Demaille <akim@epita.fr>
19928
19929 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19930 only when appropriate: when insert_start_shifting_state' is not
19931 invoked.
19932 * tests/regression.at (Rule Line Numbers): Adjust.
19933
19934 2001-12-10 Akim Demaille <akim@epita.fr>
19935
19936 * src/LR0.c (augment_automaton): Now that all states have shifts,
19937 merge the two cases addition shifts to the initial state.
19938
19939 2001-12-10 Akim Demaille <akim@epita.fr>
19940
19941 * src/lalr.c (set_state_table): Move to...
19942 * src/LR0.c: here.
19943 * src/lalr.c (lalr): Don't call it...
19944 * src/LR0.c (generate_states): do it.
19945 * src/LR0.h (first_state): Remove, only the table is used.
19946
19947 2001-12-10 Akim Demaille <akim@epita.fr>
19948
19949 * src/LR0.h (first_shift, first_reduction): Remove.
19950 * src/lalr.c: Don't use first_shift: find shifts through the
19951 states.
19952
19953 2001-12-10 Akim Demaille <akim@epita.fr>
19954
19955 * src/LR0.c: Attach shifts to states as soon as they are
19956 computed.
19957 * src/lalr.c (set_state_table): Instead of assigning shifts to
19958 state, just assert that the mapping was properly done.
19959
19960 2001-12-10 Akim Demaille <akim@epita.fr>
19961
19962 * src/LR0.c (insert_start_shift): Rename as...
19963 (insert_start_shifting_state): this.
19964 (insert_eof_shifting_state, insert_accepting_state): New.
19965 (augment_automaton): Adjust.
19966 Better locality of the variables.
19967 When looking if the start_symbol is shifted from the initial
19968 state, using `while (... symbol != start_symbol ...)' sounds
19969 better than `while (... symbol < start_symbol ...)': If fail
19970 to see how the order between symbols could be relevant!
19971
19972 2001-12-10 Akim Demaille <akim@epita.fr>
19973
19974 * src/getargs.h: Don't declare `spec_name_prefix' and
19975 `spec_file_prefix', declared by src/files.h.
19976 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19977 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19978 * src/output.c (prepare): Adjust.
19979 * src/reader.c (symbols_output): Likewise.
19980 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19981
19982 2001-12-10 Akim Demaille <akim@epita.fr>
19983
19984 * src/muscle_tab.c (muscle_init): NULL is a better default than
19985 `"0"'.
19986
19987 2001-12-10 Akim Demaille <akim@epita.fr>
19988
19989 * src/reader.c (reader): Calling symbols_output once is enough.
19990
19991 2001-12-10 Akim Demaille <akim@epita.fr>
19992
19993 Now that states have a complete set of members, the linked list of
19994 reductions is useless: just fill directly the state's reductions
19995 member.
19996
19997 * src/state.h (struct reductions): Remove member `number' and
19998 `next'.
19999 * src/LR0.c (first_reduction, last_reduction): Remove.
20000 (save_reductions): Don't link the new reductions, store them in
20001 this_state.
20002 * src/lalr.c (set_state_table): No need to attach reductions to
20003 states, it's already done.
20004 * src/output.c (output_actions): No longer free the shifts, then
20005 the reductions, then the states: free all the states and their
20006 members.
20007
20008 2001-12-10 Akim Demaille <akim@epita.fr>
20009
20010 * src/options.c (OPTN, DRTV, BOTH): New.
20011 (option_table): Use them.
20012
20013 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20014 the job of system.h.
20015 * src/options.c: Don't include stdio.h and xalloc.h for the same
20016 reasons.
20017
20018 2001-12-10 Akim Demaille <akim@epita.fr>
20019
20020 * src/output.c (output, prepare): Make sure the values of the
20021 muscles `action' and `prologue' are 0-terminated.
20022
20023 2001-12-10 Akim Demaille <akim@epita.fr>
20024
20025 Clean up GCC warnings.
20026
20027 * src/reader.c (copy_action): `buf' is not used.
20028 (parse_skel_decl): Be static.
20029 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20030 * src/options.h (create_long_option_table): Have a real prototype.
20031 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20032 (hash_delete_at): Return const void *.
20033 Adjust casts to preserve the const.
20034
20035 2001-12-10 Akim Demaille <akim@epita.fr>
20036
20037 * configure.in: Require 2.52g.
20038 M4 is not needed, but AUTOM4TE is.
20039 * m4/m4.m4: Remove.
20040 * tests/Makefile.am: Adjust.
20041
20042 2001-12-10 Akim Demaille <akim@epita.fr>
20043
20044 One structure for states is enough, even though theoretically
20045 there are LR(0) states and LALR(1) states.
20046
20047 * src/lalr.h (state_t): Remove.
20048 (state_table): Be state_t **, not state_t *.
20049 * src/state.h (core, CORE_ALLOC): Rename as...
20050 (state_t, STATE_ALLOC): this.
20051 Add the LALR(1) members: shifts, reductions, errs.
20052 * src/LR0.c (state_table): Rename as...
20053 (state_hash): this, to avoid name clashes with the global
20054 `state_table'.
20055 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20056 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20057
20058 2001-12-10 Akim Demaille <akim@epita.fr>
20059
20060 Bison dumps core on bash.y.
20061 Reported by Pascal Bart.
20062
20063 * src/warshall.c (bitmatrix_print): New.
20064 (TC): Use it.
20065 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
20066 j must be the outer loop.
20067 * tests/regression.at (Broken Closure): New.
20068
20069 2001-12-05 Akim Demaille <akim@epita.fr>
20070
20071 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20072 its argument.
20073 Reported by Peter Hamorsky.
20074
20075 2001-12-05 Akim Demaille <akim@epita.fr>
20076
20077 * src/conflicts.c (err_table): Remove.
20078 (resolve_sr_conflict): Adjust.
20079 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20080 Rename as...
20081 (state_t.reductions, state_t.shifts): this.
20082
20083 2001-12-05 Akim Demaille <akim@epita.fr>
20084
20085 * src/reduce.c (reduce_grammar_tables): No longer disable the
20086 removal of useless rules via CPP but via `if (0)', so that the
20087 compiler still check the code is valid.
20088 For instance, it should have noticed `rline' no longer exists: use
20089 the `line' member of rule_t.
20090 * src/gram.c (dummy, rline): Remove, unused.
20091
20092 2001-12-05 Akim Demaille <akim@epita.fr>
20093
20094 * src/output.c (pack_vector): Use assert, not berror.
20095 * src/main.c (berror): Remove, unused.
20096
20097 2001-12-05 Akim Demaille <akim@epita.fr>
20098
20099 New experimental feature: if --verbose --trace output all the
20100 items of a state, not only its kernel.
20101
20102 * src/print.c (print_core): If `trace_flag', then invoke closure
20103 before outputting the items of the state (print_core is no longer
20104 a correct name them).
20105 (print_results): Invoke new_closure/free_closure if needed.
20106
20107 2001-12-05 Akim Demaille <akim@epita.fr>
20108
20109 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20110 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20111 (nitemset): for consistency with the rest of the project.
20112
20113 2001-12-05 Akim Demaille <akim@epita.fr>
20114
20115 * src/closure.c (print_closure): Improve.
20116 (closure): Use it for printing input and output.
20117
20118 2001-12-05 Akim Demaille <akim@epita.fr>
20119
20120 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20121 indexed by nonterminals.
20122
20123 2001-12-05 Akim Demaille <akim@epita.fr>
20124
20125 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20126 what it was!).
20127 * src/warshall.h: Remove accidental duplication of the content.
20128
20129 2001-12-05 Akim Demaille <akim@epita.fr>
20130
20131 * src/closure.c (set_fderives): De-obfuscate.
20132
20133 2001-12-05 Akim Demaille <akim@epita.fr>
20134
20135 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20136
20137 2001-12-05 Akim Demaille <akim@epita.fr>
20138
20139 * src/closure.c (set_firsts): De-obfuscate.
20140
20141 2001-12-05 Akim Demaille <akim@epita.fr>
20142
20143 * src/output.c (action_row): De-obfuscate
20144 using the good o' techniques: arrays not pointers, variable
20145 locality, BITISSET, RESETBIT etc.
20146
20147 2001-12-05 Akim Demaille <akim@epita.fr>
20148
20149 Pessimize the code to simplify it: from now on, all the states
20150 have a valid SHIFTS, which NSHIFTS is possibly 0.
20151
20152 * src/LR0.c (shifts_new): Be global and move to..
20153 * src/state.c, src/state.h: here.
20154 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20155 * src/print_graph: Adjust.
20156
20157 2001-12-05 Akim Demaille <akim@epita.fr>
20158
20159 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20160 * src/conflicts.c: Use it.
20161 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20162 incorrectly ``simplified''.
20163
20164 2001-12-05 Akim Demaille <akim@epita.fr>
20165
20166 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20167 using the good o' techniques: arrays not pointers, variable
20168 locality, BITISSET, RESETBIT etc.
20169
20170 2001-12-05 Akim Demaille <akim@epita.fr>
20171
20172 * src/state.h (SHIFT_SYMBOL): New.
20173 * src/conflicts.c: Use it to deobfuscate.
20174
20175 2001-12-05 Akim Demaille <akim@epita.fr>
20176
20177 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20178 (print_reductions): De-obfuscate using the good o' techniques:
20179 arrays not pointers, variable locality, BITISSET.
20180
20181 2001-12-05 Akim Demaille <akim@epita.fr>
20182
20183 * src/conflicts.c (print_reductions): Arrays, not pointers.
20184 Use BITISSET.
20185
20186 2001-12-05 Akim Demaille <akim@epita.fr>
20187
20188 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20189
20190 2001-12-05 Akim Demaille <akim@epita.fr>
20191
20192 * src/conflicts.c (print_reductions): Improve variable locality.
20193
20194 2001-12-05 Akim Demaille <akim@epita.fr>
20195
20196 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20197
20198 2001-12-05 Akim Demaille <akim@epita.fr>
20199
20200 * src/conflicts.c (print_reductions): Improve variable locality.
20201
20202 2001-12-05 Akim Demaille <akim@epita.fr>
20203
20204 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20205 * src/lalr.c: Use them.
20206
20207 2001-12-05 Akim Demaille <akim@epita.fr>
20208
20209 * src/LR0.c (augment_automaton): Formatting changes.
20210 Better variable locality.
20211
20212 2001-12-05 Akim Demaille <akim@epita.fr>
20213
20214 * src/lalr.c (matrix_print): New.
20215 (transpose): Use it.
20216 Use arrays instead of pointers.
20217
20218 2001-12-05 Akim Demaille <akim@epita.fr>
20219
20220 * src/lalr.c (maxrhs): Move to...
20221 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20222 * src/lalr.c (build_relations): Adjust.
20223
20224 2001-12-05 Akim Demaille <akim@epita.fr>
20225
20226 * src/lalr.c (transpose): Free the memory allocated to the
20227 argument, as it is replaced by the results by the unique caller.
20228 (build_relations): Merely invoke transpose: it handles the memory
20229 deallocation.
20230 Improve variable locality.
20231 Avoid variables used as mere abbreviations.
20232 (compute_lookaheads): Use arrays instead of pointers.
20233
20234 2001-12-05 Akim Demaille <akim@epita.fr>
20235
20236 * src/lalr.c (initialize_F): Improve variable locality.
20237 Avoid variables used as mere abbreviations.
20238
20239 2001-12-05 Akim Demaille <akim@epita.fr>
20240
20241 * src/derives.c (print_derives): Display the ruleno.
20242 * src/lalr.c (initialize_F, transpose): Better variable locality
20243 to improve readability.
20244 Avoid variables used as mere abbreviations.
20245
20246 2001-12-05 Akim Demaille <akim@epita.fr>
20247
20248 * src/lalr.c (traverse): Use arrays instead of pointers.
20249
20250 2001-12-05 Akim Demaille <akim@epita.fr>
20251
20252 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20253 the handling of squeue.
20254 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20255
20256 2001-12-05 Akim Demaille <akim@epita.fr>
20257
20258 Because useless nonterminals are now kept alive (instead of being
20259 `destroyed'), we now sometimes examine them, and store information
20260 related to them. Hence we need to know their number, and adjust
20261 memory allocations.
20262
20263 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20264 static.
20265 * src/LR0.c (allocate_itemsets): The memory allocated to
20266 `symbol_count' was used for two different purpose: once to count
20267 the number of occurrences of each symbol, and later reassigned to
20268 `shift_symbol', containing the symbol that can be shifted from a
20269 given state.
20270 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20271 only, and...
20272 (new_itemsets): Allocate `shift_symbol' here.
20273 (allocate_itemsets): symbol_count includes useless nonterminals.
20274 Make room for them.
20275 (free_storage): Use `free', not `XFREE', for pointers that cannot
20276 be null.
20277
20278 2001-12-05 Akim Demaille <akim@epita.fr>
20279
20280 * src/nullable.c (set_nullable): Deobfuscate the handling of
20281 ritem.
20282 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20283
20284 2001-12-05 Akim Demaille <akim@epita.fr>
20285
20286 * src/gram.c, src/gram.h (ritem_print): New.
20287 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20288 (This useless function was defined only to work around VMS linkers
20289 that can't handle compilation units with variables only).
20290 * src/reduce.c (dump_grammar): Use it to trace the construction of
20291 ritem.
20292
20293 2001-12-04 Paul Eggert <eggert@twinsun.com>
20294
20295 * src/bison.simple (union yyalloc): Change member names
20296 to be the same as the stack names.
20297 (yyparse): yyptr is now union yyalloc *, not char *.
20298 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20299 and may generate better code on some machines.
20300 (yystpcpy): Use prototype if __STDC__ is defined, not just
20301 if __cplusplus is defined.
20302
20303 2001-11-30 Akim Demaille <akim@epita.fr>
20304
20305 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20306 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20307 Gettext doesn't compile cleanly, and dies with -Werror.
20308 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20309 Include WARNING_CFLAGS here.
20310 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20311 before being defined.
20312
20313 2001-11-27 Paul Eggert <eggert@twinsun.com>
20314
20315 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20316 First arg is int, not unsigned.
20317 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20318 (SIZE_MAX, UINT_MAX): New macros.
20319 (quotearg_n_options): Abort if N is negative.
20320 Avoid overflow check on hosts where size_t is 64 bits and int
20321 is 32 bits, as overflow is impossible there.
20322 Fix off-by-one typo that caused unnecessary reallocation.
20323
20324 2001-11-29 Paul Eggert <eggert@twinsun.com>
20325
20326 Name space cleanup in generated parser.
20327
20328 * doc/bison.texinfo (Bison Parser): Discuss system headers
20329 and their effect on the user name space.
20330
20331 * src/bison.simple:
20332 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20333 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20334 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20335
20336 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20337 on user names when possible.
20338
20339 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20340 Simplify test for whather <alloca.h> exists.
20341
20342 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20343
20344 (<stdio.h>): Include if YYDEBUG.
20345
20346 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20347 ! defined (yyoverflow) && ! defined (yymemcpy).
20348
20349 (yymemcpy, yyparse): Rename local variables as needed so that
20350 they all begin with 'yy'.
20351
20352 (yystrlen, yystpcpy): New functions.
20353
20354 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20355 All uses changed.
20356
20357 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20358 instead of relying on string.h functions. Use YYSTACK_ALLOC
20359 and YYSTACK_FREE instead of malloc and free.
20360
20361 2001-11-30 Akim Demaille <akim@epita.fr>
20362
20363 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20364 before their first uses.
20365 (YYBISON, YYPURE): Move to the top of the output.
20366
20367 2001-11-30 Akim Demaille <akim@epita.fr>
20368
20369 * tests/reduce.at (Useless Nonterminals): Fix.
20370
20371 2001-11-30 Akim Demaille <akim@epita.fr>
20372
20373 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20374 if body instead of `;' to pacify GCC's warnings.
20375
20376 2001-11-30 Akim Demaille <akim@epita.fr>
20377
20378 Instead of mapping the LHS of unused rules to -1, keep the LHS
20379 valid, but flag the rules as invalid.
20380
20381 * src/gram.h (rule_t): `useful' is a new member.
20382 * src/print.c (print_grammar): Adjust.
20383 * src/derives.c (set_derives): Likewise.
20384 * src/reader.c (packgram, reduce_output): Likewise.
20385 * src/reduce.c (reduce_grammar_tables): Likewise.
20386 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20387
20388 2001-11-30 Akim Demaille <akim@epita.fr>
20389
20390 * src/reduce.c (reduce_output): Formatting changes.
20391 * src/print.c (print_results, print_grammar): Likewise.
20392 * tests/regression.at (Rule Line Numbers)
20393 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20394
20395 2001-11-30 Akim Demaille <akim@epita.fr>
20396
20397 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20398 useless nonterminals, move them at the end of the symbol arrays.
20399 (reduce_output): Adjust.
20400 * tests/reduce.at (Useless Nonterminals): Adjust.
20401
20402 2001-11-30 Akim Demaille <akim@epita.fr>
20403
20404 * src/reduce.c: Various comment/formatting changes.
20405 (nonterminals_reduce): New, extracted from...
20406 (reduce_grammar_tables): here.
20407 (reduce_grammar): Call nonterminals_reduce.
20408
20409 2001-11-29 Paul Eggert <eggert@twinsun.com>
20410
20411 * src/bison.simple (YYSTACK_REALLOC): Remove.
20412 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20413 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20414 New macros.
20415 (union yyalloc): New type.
20416 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20417 an arbitrary restriction on hosts where size_t is wider than int.
20418
20419 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20420 a parser stack overflow. Allocate just one block of memory for all
20421 three stacks, instead of allocating three blocks; this typically is
20422 faster and reduces fragmentation.
20423
20424 Do not limit the number of items in the stack to a value that fits
20425 in 'int', as this is an arbitrary limit on hosts with 64-bit
20426 size_t and 32-bit int.
20427
20428 2001-11-29 Marc Autret <autret_m@epita.fr>
20429
20430 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20431 of defining YYERROR_VERBOSE.
20432 [AT_DATA]: $4 is now out of C declarations in the prologue.
20433
20434 2001-11-28 Marc Autret <autret_m@epita.fr>
20435
20436 * src/reader.c (parse_dquoted_param): New.
20437 (parse_skel_decl): Use it.
20438 * src/lex.h: Add its prototype.
20439 * src/lex.c (literalchar): Become not static.
20440
20441 2001-11-28 Marc Autret <autret_m@epita.fr>
20442
20443 * src/output.h: And put its extern declaration here.
20444 * src/output.c (error_verbose): Define here.
20445 (prepare): Echo name modification.
20446 * src/getargs.h: Clean its extern declaration.
20447 * src/getargs.c (error_verbose_flag): Remove.
20448 (getargs): Remove case 'e'.
20449 * src/options.c (option_table): 'error-verbose' is now seen as simple
20450 percent option.
20451 Include output.h.
20452
20453 * src/reader.c (read_declarations): Remove case tok_include.
20454 (parse_include_decl): Remove.
20455 * src/lex.h (token_t): Remove tok_include.
20456 * src/options.c (option_table): 'include' is now a simple command line
20457 option.
20458
20459 2001-11-28 Marc Autret <autret_m@epita.fr>
20460
20461 * src/bison.simple: Adjust muscle names.
20462 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20463 * src/output.c (prepare): s/_/-/ for the muscles names.
20464 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20465
20466 2001-11-28 Marc Autret <autret_m@epita.fr>
20467
20468 * src/bison.simple: Fix debug.
20469 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20470
20471 2001-11-28 Akim Demaille <akim@epita.fr>
20472
20473 * src/LR0.c (shifts_new): New.
20474 (save_shifts, insert_start_shift, augment_automaton): Use it.
20475
20476 2001-11-28 Akim Demaille <akim@epita.fr>
20477
20478 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20479 keep ruleno only.
20480
20481 2001-11-28 Akim Demaille <akim@epita.fr>
20482
20483 * src/closure.c (closure): Instead of looping over word in array
20484 then bits in words, loop over bits in array.
20485
20486 2001-11-28 Akim Demaille <akim@epita.fr>
20487
20488 * src/closure.c (closure): No longer optimize the special case
20489 where all the bits of `ruleset[r]' are set to 0, to make the code
20490 clearer.
20491
20492 2001-11-28 Akim Demaille <akim@epita.fr>
20493
20494 * src/closure.c (closure): `r' and `c' are new variables, used to
20495 de-obfuscate accesses to RULESET and CORE.
20496
20497 2001-11-28 Akim Demaille <akim@epita.fr>
20498
20499 * src/reduce.c (reduce_print): Use ngettext.
20500 (dump_grammar): Improve the trace accuracy.
20501
20502 2001-11-28 Akim Demaille <akim@epita.fr>
20503
20504 * src/reduce.c (dump_grammar): Don't translate trace messages.
20505
20506 2001-11-28 Akim Demaille <akim@epita.fr>
20507
20508 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20509 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20510 as all tags are free'ed afterwards.
20511 From Enrico Scholz.
20512
20513 2001-11-27 Paul Eggert <eggert@twinsun.com>
20514
20515 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20516 use alloca when we didn't want to, and vice versa.
20517
20518 2001-11-27 Marc Autret <autret_m@epita.fr>
20519
20520 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20521 initialization.
20522 * src/output.c (prepare): Remove its update.
20523
20524 2001-11-27 Marc Autret <autret_m@epita.fr>
20525
20526 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20527 Use %error-verbose.
20528
20529 2001-11-27 Marc Autret <autret_m@epita.fr>
20530
20531 * src/bison.simple: Remove YYERROR_VERBOSE using.
20532 Use %%error_verbose.
20533 (yyparse): Likewise.
20534 * src/output.c (prepare): Give its final value.
20535 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20536 * src/getargs.h: Add its extern declaration.
20537 * src/getargs.c (error_verbose_flag): New int.
20538 (getargs): Update to catch new case.
20539 * src/options.c (option_table): 'error-verbose' is a new option.
20540 (shortopts): Update.
20541
20542 2001-11-27 Akim Demaille <akim@epita.fr>
20543
20544 * src/system.h: Use intl/libgettext.h.
20545 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20546
20547 2001-11-27 Akim Demaille <akim@epita.fr>
20548
20549 * tests/torture.at (Exploding the Stack Size with Malloc):
20550 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20551
20552 2001-11-27 Akim Demaille <akim@epita.fr>
20553
20554 * src/files.c: Include error.h.
20555 Reported by Hans Aberg.
20556
20557 2001-11-26 Marc Autret <autret_m@epita.fr>
20558
20559 * src/reader.c (parse_include_decl): New, not yet implemented.
20560 (read_declarations): Add case tok_include.
20561 * src/getargs.h (include): Add its extern definition.
20562 * src/getargs.c (include): New const char *.
20563 (getargs): Add case '-I'.
20564 * src/options.c (option_table): Add include as command line and
20565 percent option.
20566 * src/lex.h (token_t): Add tok_include.
20567
20568 2001-11-26 Akim Demaille <akim@epita.fr>
20569
20570 * src/reader.c (readgram): Make sure rules for mid-rule actions
20571 have a lineno equal to that of their host rule.
20572 Reported by Hans Aberg.
20573 * tests/regression.at (Rule Line Numbers): New.
20574
20575 2001-11-26 Akim Demaille <akim@epita.fr>
20576
20577 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20578 size_ts.
20579
20580 2001-11-26 Akim Demaille <akim@epita.fr>
20581
20582 * src/complain.c, src/complain.h (error): Remove, provided by
20583 lib/error.[ch].
20584
20585 2001-11-26 Akim Demaille <akim@epita.fr>
20586
20587 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20588 issue an error message.
20589 * tests/regression.at (Invalid %directive): New.
20590 Reported by Hans Aberg.
20591
20592 2001-11-26 Akim Demaille <akim@epita.fr>
20593
20594 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20595 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20596
20597 2001-11-26 Akim Demaille <akim@epita.fr>
20598
20599 * src/conflicts.c (conflicts_print): Don't complain at all when
20600 there are no reduce/reduce conflicts, and as many shift/reduce
20601 conflicts as expected.
20602 * tests/regression.at (%expect right): Adjust.
20603
20604 2001-11-23 Akim Demaille <akim@epita.fr>
20605
20606 * lib/alloca.c: Update, from fileutils.
20607
20608 2001-11-23 Akim Demaille <akim@epita.fr>
20609
20610 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20611
20612 2001-11-23 Akim Demaille <akim@epita.fr>
20613
20614 * src/system.h: Include alloca.h.
20615 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20616
20617 2001-11-23 Akim Demaille <akim@epita.fr>
20618
20619 * src/print_graph.c (print_actions): Remove `rule', unused.
20620 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20621 pacify GCC's signed < unsigned warnings.
20622 * src/closure.c (itemsetsize): Likewise.
20623 * src/reader.c (symbol_list_new): Static.
20624
20625 2001-11-23 Akim Demaille <akim@epita.fr>
20626
20627 Attaching lineno to buckets is stupid, since only one copy of each
20628 symbol is kept, only the line of the first occurrence is kept too.
20629
20630 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20631 * src/reader.c (rline_allocated): Remove, unused.
20632 (symbol_list): Have a `line' member.
20633 (symbol_list_new): New.
20634 (readgram): Use it.
20635 * src/print.c (print_grammar): Output the rule line numbers.
20636 * tests/regression.at (Solved SR Conflicts)
20637 (Unresolved SR Conflicts): Adjust.
20638 Reported by Hans Aberg.
20639
20640 2001-11-22 Marc Autret <autret_m@epita.fr>
20641
20642 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20643
20644 2001-11-22 Marc Autret <autret_m@epita.fr>
20645
20646 * src/muscle_tab.c (muscle_init): Remove initialization of
20647 skeleton muscle.
20648 * src/output.c (output_master_parser): Do it here.
20649
20650 2001-11-20 Akim Demaille <akim@epita.fr>
20651
20652 * po/sv.po: New.
20653 * configure.in (ALL_LINGUAS): Adjust.
20654 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20655 longer contains strings to translate.
20656
20657 2001-11-19 Akim Demaille <akim@epita.fr>
20658
20659 * src/conflicts.c (conflicts_print): Add a missing \n.
20660
20661 2001-11-19 Akim Demaille <akim@epita.fr>
20662
20663 * src/nullable.c (nullable_print): New.
20664 (set_nullable): Call it when tracing.
20665 Better locality of variables.
20666
20667 2001-11-19 Akim Demaille <akim@epita.fr>
20668
20669 * src/print.c (print_actions): Better locality of variables.
20670
20671 2001-11-19 Akim Demaille <akim@epita.fr>
20672
20673 * src/derives.c (print_derives): Fix and enrich.
20674 * src/closure.c (print_fderives): Likewise.
20675
20676 2001-11-19 Akim Demaille <akim@epita.fr>
20677
20678 * src/closure.c (itemsetend): Remove, replaced with...
20679 (itemsetsize): new.
20680
20681 2001-11-19 Akim Demaille <akim@epita.fr>
20682
20683 * src/LR0.c (kernel_end): Remove, replaced with...
20684 (kernel_size): new.
20685
20686 2001-11-19 Akim Demaille <akim@epita.fr>
20687
20688 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20689 to clarify.
20690
20691 2001-11-19 Akim Demaille <akim@epita.fr>
20692
20693 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20694
20695 2001-11-19 Akim Demaille <akim@epita.fr>
20696
20697 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20698 trace messages.
20699 * src/LR0.c: Likewise.
20700 (allocate_itemsets): Use arrays instead of pointers to clarify.
20701
20702 2001-11-19 Akim Demaille <akim@epita.fr>
20703
20704 * src/getargs.c (statistics_flag): Replace with...
20705 (trace_flag): New.
20706 (longopts): Accept --trace instead of --statistics.
20707 * src/getargs.h, src/options.c: Adjust.
20708 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20709 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20710
20711 2001-11-19 Akim Demaille <akim@epita.fr>
20712
20713 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20714 pointers to clarify the code.
20715 (save_reductions, save_shifts): Factor common parts of alternatives.
20716
20717 2001-11-19 Akim Demaille <akim@epita.fr>
20718
20719 * src/LR0.c (new_state, get_state): Complete TRACE code.
20720 * src/closure.c: Include `reader.h' to get `tags', needed by the
20721 trace code.
20722 Rename the conditional DEBUG as TRACE.
20723 Output consistently TRACEs to stderr, not stdout.
20724 * src/derives.c: Likewise.
20725 * src/reduce.c: (inaccessable_symbols): Using if is better style
20726 than goto.
20727 Use `#if TRACE' instead of `#if 0' for tracing code.
20728
20729 2001-11-19 Akim Demaille <akim@epita.fr>
20730
20731 * src/system.h (LIST_FREE, shortcpy): New.
20732 * src/LR0.c: Use them.
20733 * src/output.c (free_itemsets, free_reductions, free_shifts):
20734 Remove, replaced by LIST_FREE.
20735
20736 2001-11-19 Akim Demaille <akim@epita.fr>
20737
20738 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20739 (REDUCTIONS_ALLOC): New.
20740 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20741 allocation.
20742
20743 2001-11-19 Akim Demaille <akim@epita.fr>
20744
20745 * src/LR0.c (new_state): Complete trace code.
20746 * src/nullable.c (set_nullable): Don't translate traces.
20747
20748 2001-11-19 Akim Demaille <akim@epita.fr>
20749
20750 * src/print_graph.c (print_core): Better locality of variables.
20751 * src/print.c (print_core): Likewise.
20752
20753 2001-11-19 Akim Demaille <akim@epita.fr>
20754
20755 * src/vcg.c: You do the output, so you are responsible of the
20756 handling of VCG syntax, in particular: use quotearg.
20757 * src/print_graph.c: Don't.
20758 (print_actions): Don't output the actions as part of the nodes,
20759 since that's the job of the edges.
20760 (print_state): Don't output by hand: fill the node description,
20761 and ask for its output.
20762
20763 2001-11-19 Akim Demaille <akim@epita.fr>
20764
20765 * src/bison.simple (yyparse): When verbosely reporting an error,
20766 no longer put additional quotes around token names.
20767 * tests/calc.at: Adjust.
20768
20769 2001-11-19 Akim Demaille <akim@epita.fr>
20770
20771 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20772 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20773 * src/output.c: Adjust.
20774
20775 2001-11-19 Akim Demaille <akim@epita.fr>
20776
20777 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20778 (rule_t): this.
20779 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20780
20781 2001-11-19 Akim Demaille <akim@epita.fr>
20782
20783 * src/gram.h (rule_t): New.
20784 (rule_table): New.
20785 (rrhs, rlhs): Remove, part of state_t.
20786 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20787 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20788 * src/reader.c, src/reduce.c: Adjust.
20789
20790 2001-11-19 Akim Demaille <akim@epita.fr>
20791
20792 * src/reader.c (symbols_output): New, extracted from...
20793 (packsymbols): Here.
20794 (reader): Call it.
20795
20796 2001-11-19 Akim Demaille <akim@epita.fr>
20797
20798 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20799 (maxrhs): this new function.
20800
20801 2001-11-19 Akim Demaille <akim@epita.fr>
20802
20803 * src/lalr.c (F): New macro to access the variable F.
20804 Adjust.
20805
20806 2001-11-19 Akim Demaille <akim@epita.fr>
20807
20808 * src/lalr.h (LA): New macro to access the variable LA.
20809 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20810 * src/lalr.c: Adjust.
20811
20812 2001-11-19 Akim Demaille <akim@epita.fr>
20813
20814 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20815 (set_state_table): handle the `lookaheads' members.
20816
20817 2001-11-19 Akim Demaille <akim@epita.fr>
20818
20819 * src/lalr.h (lookaheads): Removed array, whose contents is now
20820 a member of...
20821 (state_t): this structure.
20822 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20823 Adjust.
20824
20825 2001-11-19 Akim Demaille <akim@epita.fr>
20826
20827 * src/lalr.h (consistent): Removed array, whose contents is now
20828 a member of...
20829 (state_t): this structure.
20830 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20831 Adjust.
20832
20833 2001-11-19 Akim Demaille <akim@epita.fr>
20834
20835 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20836 contents are now members of...
20837 (state_t): this structure.
20838 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20839 Adjust.
20840
20841 2001-11-19 Akim Demaille <akim@epita.fr>
20842
20843 * src/lalr.h (state_t): New.
20844 (state_table): Be a state_t * instead of a core **.
20845 (accessing_symbol): Remove, part of state_t.
20846 * src/lalr.c: Adjust.
20847 (set_accessing_symbol): Merge into...
20848 (set_state_table): this.
20849 * src/print_graph.c, src/conflicts.c: Adjust.
20850
20851 2001-11-14 Akim Demaille <akim@epita.fr>
20852
20853 * tests/calc.at, tests/output.at, tests/regression.at,
20854 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20855 now the tests are run in private dirs, therefore AC_CLEANUP and
20856 family can be simplified to 0-ary.
20857 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20858 use abs. path to find config.h.
20859 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20860 stderr, there can be way too much random noise.
20861 Instead pass -Werror to GCC and rely on the exit status.
20862 Reported by Wolfram Wagner.
20863
20864 2001-11-14 Akim Demaille <akim@epita.fr>
20865
20866 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20867 defined only if yyoverflow is defined, to avoid `warning: unused
20868 variable `yyvs1''.
20869 Reported by The Test Suite.
20870
20871 2001-11-14 Akim Demaille <akim@epita.fr>
20872
20873 * src/print.c: Include reduce.h.
20874 Reported by Hans Aberg.
20875
20876 2001-11-14 Akim Demaille <akim@epita.fr>
20877
20878 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20879 Revert a previous patch: these are really const.
20880 * src/conflicts.c (conflict_report): Additional useless pair of
20881 braces to pacify GCC's warnings for `if () if () {} else {}'.
20882 * src/lex.c (parse_percent_token): Replace equal_offset with
20883 arg_offset.
20884 arg is const.
20885 Be sure to strdup `arg' when used, since there is no reason for
20886 token_buffer not to change.
20887
20888 2001-11-14 Akim Demaille <akim@epita.fr>
20889
20890 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20891 definition.
20892 * src/main.c (main): Use them.
20893 Suggested by Hans Aberg.
20894
20895 2001-11-12 Akim Demaille <akim@epita.fr>
20896
20897 * src/system.h (ngettext): Now that we use ngettext, be sure to
20898 provide a default definition when NLS are not used.
20899
20900 2001-11-12 Akim Demaille <akim@epita.fr>
20901
20902 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20903 Use @kbd to denote user input.
20904 (Language and Grammar): ANSIfy the example.
20905 Adjust its layout for info/notinfo.
20906 (Location Tracking Calc): Output error messages to stderr.
20907 Output locations in a more GNUtically correct way.
20908 Fix a couple of Englishos.
20909 Adjust @group/@end group pairs.
20910
20911 2001-11-12 Akim Demaille <akim@epita.fr>
20912
20913 %expect was not functioning at all.
20914
20915 * src/conflicts.c (expected_conflicts): Set to -1.
20916 (conflict_report): Use ngettext.
20917 (conflicts_print): Check %expect and make its violation an error.
20918 * doc/bison.texinfo (Expect Decl): Adjust.
20919 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20920 * tests/regression.at (%expect not enough, %expect right)
20921 (%expect too much): New.
20922
20923 2001-11-12 Akim Demaille <akim@epita.fr>
20924
20925 * tests/regression.at (Conflicts): Rename as...
20926 (Unresolved SR Conflicts): this.
20927 (Solved SR Conflicts): New.
20928
20929 2001-11-12 Akim Demaille <akim@epita.fr>
20930
20931 * src/reduce.c (print_results): Rename as...
20932 (reduce_output): This.
20933 Output to OUT, passed as argument, instead of output_obstack.
20934 (dump_grammar): Likewise.
20935 (reduce_free): New.
20936 Also free V1.
20937 (reduce_grammar): No longer call reduce_output, since...
20938 * src/print.c (print_results): do it.
20939 * src/main.c (main): Call reduce_free;
20940
20941 2001-11-12 Akim Demaille <akim@epita.fr>
20942
20943 * src/conflicts.c (print_reductions): Accept OUT as argument.
20944 Output to it, not to output_obstack.
20945 * src/print.c (print_actions): Adjust.
20946
20947 2001-11-12 Akim Demaille <akim@epita.fr>
20948
20949 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20950 the result instead of using...
20951 (src_total, rrc_total, src_count, rrc_count): Remove.
20952 (any_conflicts): Remove.
20953 (print_conflicts): Split into...
20954 (conflicts_print, conflicts_output): New.
20955 * src/conflicts.h: Adjust.
20956 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20957 * src/print.c (print_grammar): Issue `\n' between two rules.
20958 * tests/regression.at (Conflicts): New.
20959 Reported by Tom Lane.
20960
20961 2001-11-12 Akim Demaille <akim@epita.fr>
20962
20963 * tests/regression.at (Invalid input): Remove, duplicate with
20964 ``Invalid input: 1''.
20965
20966 2001-11-12 Akim Demaille <akim@epita.fr>
20967
20968 * tests/torture.at (AT_DATA_STACK_TORTURE)
20969 (Exploding the Stack Size with Alloca)
20970 (Exploding the Stack Size with Malloc): New.
20971
20972 2001-11-12 Akim Demaille <akim@epita.fr>
20973
20974 * src/bison.simple (YYSTACK_REALLOC): New.
20975 (yyparse) [!yyoverflow]: Use it and free the old stack.
20976 Reported by Per Allansson.
20977
20978 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20979
20980 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20981 define CPP macro, which substitute YYSTYPE by yystype.
20982 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20983 with yyltype/YYLTYPE. This allows inclusion of the generated
20984 header within the parser if the compiler, such as GGC, accepts
20985 multiple equivalent #defines.
20986 From Akim.
20987
20988 2001-11-05 Akim Demaille <akim@epita.fr>
20989
20990 * src/reader.c (symbols_output): New, extracted from...
20991 (packsymbols): here.
20992 (reader): Adjust.
20993
20994 2001-11-05 Akim Demaille <akim@epita.fr>
20995
20996 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20997
20998 2001-11-05 Akim Demaille <akim@epita.fr>
20999
21000 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
21001 pattern.
21002
21003 2001-11-05 Akim Demaille <akim@epita.fr>
21004
21005 * src/options.h (struct option_table_struct): set_flags is void*.
21006 * src/options.c (longopts): Support `--output' and `%output'.
21007 (usage): Adjust.
21008 * src/lex.h (tok_setopt): Remove, replaced with...
21009 (tok_intopt, tok_stropt): these new guys.
21010 * src/lex.c (getopt.h): Not needed.
21011 (token_buffer, unlexed_token_buffer): Not const.
21012 (percent_table): Promote `-' over `_' in directive names.
21013 Active `%name-prefix', `file-prefix', and `output'.
21014 (parse_percent_token): Accept possible arguments to directives.
21015 Promote `-' over `_' in directive names.
21016
21017 2001-11-04 Akim Demaille <akim@epita.fr>
21018
21019 * doc/bison.texinfo (Decl Summary): Split the list into
21020 `directives for grammars' and `directives for bison'.
21021 Sort'em.
21022 Add description of `%name-prefix', `file-prefix', and `output'.
21023 Promote `-' over `_' in directive names.
21024 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21025 Simplify the description of `--name-prefix'.
21026 Promote `-' over `_' in directive names.
21027 Promote `--output' over `--output-file'.
21028 Fix the description of `--defines'.
21029 * tests/output.at: Exercise %file-prefix and %output.
21030
21031 2001-11-02 Akim Demaille <akim@epita.fr>
21032
21033 * doc/refcard.tex: Update.
21034
21035 2001-11-02 Akim Demaille <akim@epita.fr>
21036
21037 * src/symtab.h (SUNDEF): New.
21038 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21039 stand for `uninitialized', instead of 0.
21040 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21041 * src/lex.c (lex): Adjust.
21042
21043 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21044 Number it 0.
21045 Let yylex return it instead of a plain 0.
21046 Reported by Dick Streefland.
21047
21048 2001-11-02 Akim Demaille <akim@epita.fr>
21049
21050 * tests/regression.at (Mixing %token styles): New test.
21051
21052 2001-11-02 Akim Demaille <akim@epita.fr>
21053
21054 * src/reader.c (parse_thong_decl): Formatting changes.
21055 (token_translations_init): New, extracted from...
21056 (packsymbols): Here.
21057 Adjust.
21058
21059 2001-11-01 Akim Demaille <akim@epita.fr>
21060
21061 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21062 Check that `9foo.y' produces correct cpp guards.
21063 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21064 guards.
21065 Reported by Wwp.
21066
21067 2001-11-01 Akim Demaille <akim@epita.fr>
21068
21069 * tests/regression.at (Invalid input: 2): New.
21070 * src/lex.c (unlexed_token_buffer): New.
21071 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21072 too.
21073 Reported by Wwp.
21074
21075 2001-11-01 Akim Demaille <akim@epita.fr>
21076
21077 * tests/calc.at: Catch up with 1.30.
21078 * configure.in: Bump to 1.49a.
21079 Adjust to newer Autotest.
21080
21081 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
21082
21083 * src/conflicts.c: Move global variables rrc_total and src_total ...
21084 (print_conflicts): here.
21085 * src/output.c (output): Free global variable user_toknums.
21086 * src/lex.c (token_obstack): Become static.
21087
21088 2001-10-18 Akim Demaille <akim@epita.fr>
21089
21090 * tests/atlocal.in (GCC): Add.
21091 * tests/calc.at: s/m4_match/m4_bmatch/.
21092 s/m4_patsubst/m4_bpatsubst/.
21093 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21094 * configure.in: AC_SUBST(GCC).
21095
21096 2001-10-14 Marc Autret <autret_m@epita.fr>
21097
21098 * src/options.c (create_long_option_table): Fix.
21099
21100 2001-10-10 Akim Demaille <akim@epita.fr>
21101
21102 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21103
21104 2001-10-04 Akim Demaille <akim@epita.fr>
21105
21106 * src/reader.c (parse_union_decl): Push the caracters in
21107 union_obstack, not attrs_obstack.
21108
21109 2001-10-04 Akim Demaille <akim@epita.fr>
21110
21111 Merge in the branch 1.29.
21112
21113 * src/reader.c (packsymbols): Use a temporary obstack for
21114 `%%tokendef', since output_stack is already used elsewhere.
21115
21116 2001-10-02 Akim Demaille <akim@epita.fr>
21117
21118 Bump 1.29d.
21119
21120 2001-10-02 Akim Demaille <akim@epita.fr>
21121
21122 Version 1.29c.
21123
21124 2001-10-02 Akim Demaille <akim@epita.fr>
21125
21126 * tests/regression.at (Invalid CPP headers): New.
21127 From Alexander Belopolsky.
21128 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21129
21130 2001-10-02 Akim Demaille <akim@epita.fr>
21131
21132 * tests/regression.at (Invalid input): New.
21133 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21134 Reported by Shura.
21135
21136 2001-10-02 Akim Demaille <akim@epita.fr>
21137
21138 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21139
21140 2001-10-02 Akim Demaille <akim@epita.fr>
21141
21142 * src/output.c (output_parser): Assert `skeleton'.
21143 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21144 systems.
21145 From Shura.
21146
21147 2001-10-01 Marc Autret <autret_m@epita.fr>
21148
21149 * src/lex.h: Echo modifications.
21150 * src/lex.c (unlex): Parameter is now token_t.
21151 From Hans Aberg.
21152
21153 2001-10-01 Marc Autret <autret_m@epita.fr>
21154
21155 * src/main.c: Include lex.h.
21156 From Hans Aberg.
21157
21158 2001-09-29 Akim Demaille <akim@epita.fr>
21159
21160 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21161
21162 2001-09-28 Akim Demaille <akim@epita.fr>
21163
21164 * tests/testsuite.at: Update to newer Autotest.
21165 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21166
21167 2001-09-27 Akim Demaille <akim@epita.fr>
21168
21169 Position independent wrapper.
21170
21171 * tests/bison: Remove.
21172 * tests/bison.in: New.
21173 * configure.in: Adjust.
21174
21175 2001-09-27 Paul Eggert <eggert@twinsun.com>
21176
21177 Port quotearg fixes from tar 1.13.24.
21178
21179 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21180 tm to be declared.
21181 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21182 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21183
21184 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21185 * m4/mbrtowc.m4: New file.
21186 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21187 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21188
21189 2001-09-27 Akim Demaille <akim@epita.fr>
21190
21191 Bump to 1.29c.
21192
21193 2001-09-27 Akim Demaille <akim@epita.fr>
21194
21195 Version 1.29b.
21196
21197 2001-09-25 Akim Demaille <akim@epita.fr>
21198
21199 * src/system.h: Include `xalloc.h'.
21200 Remove it from the C files.
21201 * src/files.c (output_files): Free the obstacks.
21202 * src/lex.c (init_lex): Rename as...
21203 (lex_init): this.
21204 (lex_free): New.
21205 * src/main.c (main): Use it.
21206
21207 2001-09-24 Marc Autret <autret_m@epita.fr>
21208
21209 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21210 to output informations in fout (FILE*).
21211 (open_graph, close_graph): Likewise.
21212 (output_graph, output_edge, output_node): Likewise.
21213 * src/vcg.h: Update function prototypes.
21214 * src/print_graph.c (print_graph): Open output graph file.
21215 (print_actions): Adjust.
21216 * src/files.h: Remove extern declaration.
21217 * src/files.c: Remove graph_obstack declaration.
21218 (open_files): Remove graph_obstack initialization.
21219 (output_files): Remove graph_obstack saving.
21220
21221 2001-09-24 Marc Autret <autret_m@epita.fr>
21222
21223 * src/files.c (compute_output_file_names): Fix.
21224
21225 2001-09-24 Marc Autret <autret_m@epita.fr>,
21226 Akim Demaille <akim@epita.fr>
21227
21228 * src/reader.c (reader): Remove call to free_symtab ().
21229 * src/main.c (main): Call it here.
21230 Include symtab.h.
21231 * src/conflicts.c (initialize_conflicts): Rename as...
21232 (solve_conflicts): this.
21233 * src/print.c (print_core, print_actions, print_state)
21234 (print_grammar): Dump to a file instead a `output_obstack'.
21235 (print_results): Dump `output_obstack', and then proceed with the
21236 FILE *.
21237 * src/files.c (compute_output_file_names, close_files): New.
21238 (output_files): Adjust.
21239 * src/main.c (main): Adjust.
21240
21241 2001-09-23 Marc Autret <autret_m@epita.fr>
21242
21243 * src/files.c (compute_header_macro): Computes header macro name
21244 from spec_defines_file when given.
21245
21246 2001-09-23 Marc Autret <autret_m@epita.fr>
21247
21248 * src/files.c (output_files): Add default extensions.
21249
21250 2001-09-22 Akim Demaille <akim@epita.fr>
21251
21252 * src/conflicts.c (finalize_conflicts): Rename as...
21253 (free_conflicts): this.
21254
21255 2001-09-22 Akim Demaille <akim@epita.fr>
21256
21257 * src/gram.c (gram_free): Rename back as...
21258 (dummy): this.
21259 (output_token_translations): Free `token_translations'.
21260 * src/symtab.c (free_symtab): Free the tag field.
21261
21262 2001-09-22 Akim Demaille <akim@epita.fr>
21263
21264 Remove `translations' as it is always set to true.
21265
21266 * src/gram.h: Adjust.
21267 * src/reader.c (packsymbols, parse_token_decl): Adjust
21268 * src/print.c (print_grammar): Adjust.
21269 * src/output.c (output_token_translations): Adjust.
21270 * src/lex.c (lex): Adjust.
21271 * src/gram.c: Be sure the set pointers to NULL.
21272 (dummy): Rename as...
21273 (gram_free): this.
21274
21275 2001-09-22 Akim Demaille <akim@epita.fr>
21276
21277 * configure.in: Invoke AM_LIB_DMALLOC.
21278 * src/system.h: Use dmalloc.
21279 * src/LR0.c: Be sure to have pointers initialized to NULL.
21280 (allocate_itemsets): Allocate kernel_items only if needed.
21281
21282 2001-09-22 Akim Demaille <akim@epita.fr>
21283
21284 * configure.in: Bump to 1.29b.
21285 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21286 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21287 need xmalloc.c in calc.y.
21288 From Pascal Bart.
21289
21290 2001-09-21 Akim Demaille <akim@epita.fr>
21291
21292 Version 1.29a.
21293 * Makefile.maint, config/config.guess, config/config.sub,
21294 * config/missing: Update from masters.
21295 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21296 upon package.m4.
21297 * configure.in (ALL_LINGUAS): Add `tr'.
21298
21299 2001-09-21 Akim Demaille <akim@epita.fr>
21300
21301 * tests/Makefile.am (package.m4): Move to...
21302 ($(srcdir)/$(TESTSUITE)): here.
21303
21304 2001-09-20 Akim Demaille <akim@epita.fr>
21305
21306 * src/complain.c: No longer try to be standalone: use system.h.
21307 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21308 * src/complain.h: Likewise.
21309 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21310 Remove the unused variable `n'.
21311 From Albert Chin-A-Young.
21312
21313 2001-09-18 Marc Autret <autret_m@epita.fr>
21314
21315 * doc/bison.1: Update.
21316 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21317 descriptions.
21318 (Option Cross Key): Update.
21319 Add --graph.
21320
21321 2001-09-18 Marc Autret <autret_m@epita.fr>
21322
21323 * tests/regression.at: New test (comment in %union).
21324
21325 2001-09-18 Marc Autret <autret_m@epita.fr>
21326
21327 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21328 do that.
21329 Reported by Keith Browne.
21330
21331 2001-09-18 Marc Autret <autret_m@epita.fr>
21332
21333 * tests/output.at: Add tests for --defines and --graph.
21334
21335 2001-09-18 Marc Autret <autret_m@epita.fr>
21336
21337 * tests/output.at: Removes tests of %{header,src}_extension features.
21338
21339 2001-09-18 Akim Demaille <akim@epita.fr>
21340
21341 * tests/Makefile.am (package.m4): New.
21342 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21343 (_AT_CHECK_CALC_ERROR): Likewise.
21344 Factor the `, ' part of verbose error messages.
21345
21346 2001-09-18 Marc Autret <autret_m@epita.fr>
21347
21348 * src/getargs.c (longopts): Declare --defines and --graph as options
21349 with optional arguments.
21350 * src/files.h: Add extern declarations.
21351 * src/files.c (spec_graph_file, spec_defines_file): New.
21352 (output_files): Update.
21353 Remove CPP-outed code.
21354
21355 2001-09-18 Marc Autret <autret_m@epita.fr>
21356
21357 Turn off %{source,header}_extension feature.
21358
21359 * src/files.c (compute_exts_from_gf): Update.
21360 (compute_exts_from_src): Update.
21361 (output_files): CPP-out useless code.
21362 * src/files.h: Remove {header,source}_extension extern declarations.
21363 * src/reader.c (parse_dquoted_param): CPP-out.
21364 (parse_header_extension_decl): Remove.
21365 (parse_source_extension_decl): Remove.
21366 (read_declarations): Remove cases tok_{hdrext,srcext}.
21367 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21368 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21369
21370 2001-09-10 Akim Demaille <akim@epita.fr>
21371
21372 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21373 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21374 (AT_CHECK_OUTPUT): this.
21375 Merely check ls' exit status, its output is useless.
21376
21377 2001-09-10 Akim Demaille <akim@epita.fr>
21378
21379 * tests/calc.at: Use m4_match.
21380 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21381
21382 2001-09-10 Marc Autret <autret_m@epita.fr>,
21383 Akim Demaille <akim@epita.fr>
21384
21385 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21386 enum color_e.
21387 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21388 to `normal'.
21389 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21390 * src/lex.h: Adjust prototype.
21391 (token_t): Add `tok_undef'.
21392 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21393 (parse_percent_token): Now returns token_t.
21394 Add default statement in switch.
21395 (lex): Separate `c' as an input variable, from the token_t result
21396 part.
21397 (unlexed): Is a token_t.
21398
21399 2001-09-10 Akim Demaille <akim@epita.fr>
21400
21401 * configure.in: Bump to 1.29a.
21402
21403 2001-09-07 Akim Demaille <akim@epita.fr>
21404
21405 Version 1.29.
21406
21407 2001-08-30 Akim Demaille <akim@epita.fr>
21408
21409 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21410 * m4/atconfig.m4: Remove.
21411 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21412 * tests/bison: New.
21413 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21414 m4_if, m4_patsubst, and m4_regexp.
21415 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21416 `input' file instead of echo.
21417
21418 2001-08-29 Akim Demaille <akim@epita.fr>
21419
21420 Bump to 1.28e.
21421
21422 2001-08-29 Akim Demaille <akim@epita.fr>
21423
21424 Version 1.28d.
21425
21426 2001-08-29 Paul Eggert <eggert@twinsun.com>
21427
21428 * src/bison.simple (yyparse): Don't take the address of an
21429 item before the start of an array, as that doesn't conform to
21430 the C Standard.
21431
21432 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21433
21434 * doc/bison.texinfo (Location Tracking Calc): New node.
21435
21436 2001-08-29 Paul Eggert <eggert@twinsun.com>
21437
21438 * src/output.c (output): Do not define const, as this now
21439 causes more problems than it cures.
21440
21441 2001-08-29 Akim Demaille <akim@epita.fr>
21442
21443 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21444 the nodes.
21445 Be sure to tag the `detailmenu'.
21446
21447 2001-08-29 Akim Demaille <akim@epita.fr>
21448
21449 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21450 download in a tmp dir.
21451
21452 2001-08-28 Marc Autret <autret_m@epita.fr>
21453
21454 * config/depcomp: New file.
21455
21456 2001-08-28 Marc Autret <autret_m@epita.fr>
21457
21458 * doc/bison.1 (mandoc): Adjust.
21459 From Juan Manuel Guerrero.
21460
21461 2001-08-28 Marc Autret <autret_m@epita.fr>
21462
21463 * src/print_graph.c (print_state): Fix.
21464
21465 2001-08-27 Marc Autret <autret_m@epita.fr>
21466
21467 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21468 char * members.
21469 Echo modifications to the functions prototypes.
21470 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21471
21472 2001-08-27 Marc Autret <autret_m@epita.fr>
21473
21474 * src/vcg.c: Include `xalloc.h'.
21475 (add_colorentry): New.
21476 (add_classname): New.
21477 (add_infoname): New.
21478 * src/vcg.h: Add new prototypes.
21479
21480 2001-08-27 Akim Demaille <akim@epita.fr>
21481
21482 * Makefile.maint: Sync. again with CVS Autoconf.
21483
21484 2001-08-27 Akim Demaille <akim@epita.fr>
21485
21486 * Makefile.maint: Formatting changes.
21487 (po-update, cvs-update, update): New targets.
21488 (AMTAR): Remove.
21489
21490 2001-08-27 Akim Demaille <akim@epita.fr>
21491
21492 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21493 * Makefile.maint: Sync. with CVS Autoconf.
21494
21495 2001-08-27 Marc Autret <autret_m@epita.fr>
21496
21497 * src/vcg.h (struct infoname_s): New.
21498 (struct colorentry_s): New.
21499 (graph_s): New fields {vertical,horizontal}_order in structure.
21500 Add `infoname' field.
21501 Add `colorentry' field;
21502 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21503 (G_HORIZONTAL_ORDER): New.
21504 (G_INFONAME): New.
21505 (G_COLORENTRY): New.
21506 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21507 Add output of `infoname'.
21508 Add output of `colorentry'.
21509
21510 2001-08-27 Marc Autret <autret_m@epita.fr>
21511
21512 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21513 This one shadowed a global parameter.
21514
21515 2001-08-24 Marc Autret <autret_m@epita.fr>
21516
21517 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21518 instead of `unsigned'.
21519 (print_state): Do not call obstack_object_size () in obstack_grow ()
21520 to avoid macro variables shadowing.
21521
21522 2001-08-23 Marc Autret <autret_m@epita.fr>
21523
21524 * src/lex.c (percent_table): Typo: s/naem/name/.
21525 Add graph option.
21526 Normalize new options declarations.
21527
21528 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21529
21530 * tests/suite.at: Exercise %header_extension and %source_extension.
21531
21532 2001-08-16 Marc Autret <autret_m@epita.fr>
21533
21534 * src/reader.c (parse_dquoted_param): New.
21535 (parse_header_extension_decl): Use it.
21536 (parse_source_extension_decl): Likewise.
21537
21538 2001-08-16 Marc Autret <autret_m@epita.fr>
21539
21540 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21541 (get_xxxx_str): Use assert () instead of complain ().
21542 Remove return invokations in default cases.
21543 (get_decision_str): Modify default behaviour. Remove second argument.
21544 Echo modifications on calls.
21545 (output_graph): Fix.
21546
21547 2001-08-16 Marc Autret <autret_m@epita.fr>
21548
21549 * src/getargs.c (usage): Update with ``-g, --graph''.
21550
21551 2001-08-16 Marc Autret <autret_m@epita.fr>
21552
21553 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21554 (Option Cross Key): Likewise.
21555 * doc/bison.1: Update.
21556
21557 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21558
21559 * src/output.c (output_master_parser): Don't finish action_obstack.
21560 (output_parser): Don't care about the muscle action, here.
21561 (prepare): Copy the action_obstack in the action muscle.
21562 (output): Free action_obstack.
21563
21564 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21565
21566 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21567 will contain `%union' declaration.
21568 (parse_union_decl): Delete #line directive output.
21569 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21570 informations about %union.
21571 (parse_union_decl): Copy the union_obstack in the muscle stype.
21572 * src/bison.simple: Add new #line directive.
21573 Add typdef %%stype YYSTYPE.
21574
21575 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21576
21577 * src/bison.simple: Add new `#line' directive.
21578
21579 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21580
21581 * src/bison.simple: New `#line' directive.
21582 * src/output.c (output_parser): Support new dynamic muscle input_line.
21583
21584 2001-09-22 Marc Autret <autret_m@epita.fr>
21585
21586 * src/output.c (output_master_parser): New.
21587 (output_parser): Be more re-entrant.
21588
21589 2001-09-21 Marc Autret <autret_m@epita.fr>
21590
21591 * src/reader.c (copy_definition, parse_union_decl): Update and use
21592 `linef' muscle.
21593 (copy_action): Likewise.
21594 Use obstack_1grow ().
21595 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21596
21597 2001-09-21 Marc Autret <autret_m@epita.fr>
21598
21599 * src/options.c (option_table): Adjust.
21600 * src/lex.c (parse_percent_token): Fix.
21601
21602 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21603
21604 * src/options.c (symtab.h): Include it, need by lex.h.
21605
21606 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21607
21608 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21609 is now an option_table_struct*.
21610 (option_strcmp): New function option_strcmp.
21611 (parse_percent_token): Call option_strcmp.
21612 * src/getargs.c (xalloc.h, options.h): Include it.
21613 (getargs): Call create_long_option_table.
21614 (getargs): Free longopts at the end of the function.
21615 (shortopts): Move in options.c.
21616 * src/options.c (create_long_option_table): New function. Convert
21617 information from option_table to option structure.
21618 * src/reader.c (options.h): Include it.
21619
21620 * src/Makefile.am: Adjust.
21621 * src/options.c (option_table): Create from longopts and percent_table.
21622 * src/getargs.c (longopts): Delete.
21623 * src/lex.c (struct percent_table_struct): Delete.
21624 (percent_table): Delete.
21625 (options.h): Include it.
21626 * src/options.c: Create.
21627 * src/options.h: Create.
21628 Declare enum opt_access_e.
21629 Define struct option_table_struct.
21630
21631 2001-09-20 Marc Autret <autret_m@epita.fr>
21632
21633 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21634 sections of Bison.
21635
21636 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21637
21638 * src/bison.simple: s/%%filename/%%skeleton.
21639 * src/muscle_tab.c (getargs.h): Include it.
21640 (muscle_init): Insert new muscle skeleton.
21641
21642 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21643
21644 * src/output.c (output_parser): Delete unused variable actions_dumped.
21645
21646 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21647
21648 * src/output.c (output): Delete call to reader_output_yylsp.
21649 * src/reader.c (reader): Likewise.
21650 * src/reader.h: Delete declaration of reader_output_yylsp.
21651
21652 2001-09-02 Marc Autret <autret_m@epita.fr>
21653
21654 * src/reader.c: Include muscle_tab.h.
21655 (parse_union_decl): Update.
21656 (parse_macro_decl): Rename parse_muscle_decl.
21657 Update to use renamed functions and variable.
21658 (read_declarations, copy_action, read_additionnal_code, : Updated
21659 with correct variables and functions names.
21660 (packsymbols, reader): Likewise.
21661
21662 * src/reader.h (muscle_obstack): Extern declaration update.
21663
21664 * src/output.c: Include muscle_tab.h
21665 In all functions using macro_insert, change by using muscle_insert ().
21666 (macro_obstack): Rename muscle_obstack.
21667 Echo modifications in the whole file.
21668 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21669 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21670 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21671
21672 * src/muscle_tab.h: Update double inclusion macros.
21673 (macro_entry_s): Rename muscle_entry_s.
21674 Update prototypes.
21675
21676 * src/muscle_tab.c: Include muscle_tab.h.
21677 Rename macro_tabble to muscle_table.
21678 (mhash1, mhash2, mcmp): Use muscle_entry.
21679 (macro_init): Rename muscle_init. Update.
21680 (macro_insert): Rename muscle_insert. Update.
21681 (macro_find): Rename muscle_find. Update.
21682
21683 * src/main.c: Include muscle_tab.h.
21684 (main): Call muscle_init ().
21685 * src/Makefile.am (bison_SOURCES): Echo modifications.
21686
21687 2001-09-02 Marc Autret <autret_m@epita.fr>
21688
21689 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21690
21691 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21692
21693 2001-09-02 Marc Autret <autret_m@epita.fr>
21694
21695 * src/macrotab.c, src/macrotab.h: Remove.
21696
21697 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21698
21699 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21700 filename.
21701
21702 2001-09-01 Marc Autret <autret_m@epita.fr>
21703
21704 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21705 to an explicit value to activate the feature. We do it here.
21706
21707 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21708
21709 * src/output.c (prepare): Delete the `filename' muscule insertion.
21710 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21711 (parse_union_decl): Likewise.
21712 * src/macrotab.c (macro_init): Initialize filename by infile.
21713
21714 2001-08-31 Marc Autret <autret_m@epita.fr>
21715
21716 * src/bison.simple (YYLSP_NEEDED): New definition.
21717 * src/output.c (prepare): Add macro insertion of `locations_flag'
21718
21719 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21720
21721 * src/output.c (prepare): Delete insertion of previous muscles,
21722 and insert the `prefix' muscles.
21723 * src/macrotab.c (macro_init): Likewise.
21724 (macro_init): Initialization prefix directive by `yy'.
21725 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21726 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21727 yylval, yydebug, yyerror, yynerrs and yyparse.
21728 New directive `#define' to substitute yydebug, ... with option
21729 name_prefix.
21730
21731 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21732
21733 * src/main.c (main): Standardize.
21734 * src/output.c (output_table_data, output_parser): Likewise.
21735 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21736
21737 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21738
21739 * src/reader.c (read_additionnal_code): Rename %%user_code to
21740 %%epilogue.
21741 * src/output.c (output): Rename %%declarations to %%prologue.
21742 * src/bison.simple: Echo modifications.
21743
21744 2001-08-31 Marc Autret <autret_m@epita.fr>
21745
21746 * src/reader.c (readgram): CleanUp.
21747 (output_token_defines): Likewise.
21748 (packsymbols): Likewise.
21749 (reader): Likewise.
21750 * src/output.c (output): CPP-out useless code.
21751
21752 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21753
21754 * src/reader.c (reader): Delete obsolete call to function
21755 output_trailers and output_headers.
21756 * src/output.h: Remove obsolete functions prototypes of output_headers
21757 and output_trailers.
21758
21759 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21760
21761 * src/main.c: Include macrotab.h.
21762 * src/macrotab.h (macro_entry_s): Constify fields.
21763 Adjust functions prototypes.
21764 * src/macrotab.c (macro_insert): Constify key and value.
21765 (macro_find): Constify key.
21766 (macro_insert): Include 'xalloc.h'
21767 (macro_insert): Use XMALLOC.
21768 (macro_find): Constify return value.
21769 * src/output.c (output_table_data): Rename table to table_data.
21770 (output_parser): Constify macro_key, macro_value.
21771
21772 2001-08-30 Marc Autret <autret_m@epita.fr>
21773
21774 * src/reader.c (parse_skel_decl): New.
21775 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21776 * src/lex.h (token_t): New token `tok_skel'.
21777 * src/lex.c (percent_table): Add skeleton option entry.
21778 Standardize.
21779
21780 2001-08-29 Marc Autret <autret_m@epita.fr>
21781
21782 * src/bison.simple: Add %%user_code directive at the end.
21783 * src/reader.c (read_additionnal_code): New.
21784 (reader): Use it.
21785 * src/output.c (output_program): Remove.
21786 (output): Update.
21787
21788 2001-08-28 Marc Autret <autret_m@epita.fr>
21789
21790 * src/output.c (output_actions): Clean up.
21791 (output_gram): CPP-out useless code.
21792 * src/reader.c (reader): Clean up, CPP-out useless code.
21793
21794 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21795
21796 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21797 directive.
21798 * src/bison.simple: Add `%%definitions'.
21799
21800 2001-08-28 Marc Autret <autret_m@epita.fr>
21801
21802 * config/depcomp: New file.
21803
21804 2001-08-27 Paul Eggert <eggert@twinsun.com>
21805
21806 * src/bison.simple (yyparse): Don't take the address of an
21807 item before the start of an array, as that doesn't conform to
21808 the C Standard.
21809
21810 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21811
21812 * src/output.c (output): Remove the initialization of the macro
21813 obstack. It was done too late here.
21814
21815 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21816 completely wrong.
21817 (reader): Initialize the macro obstack here, since we need it to grow
21818 '%define' directives.
21819
21820 * src/reader.h: Declare the macro obstack as extern.
21821
21822 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21823
21824 * src/output.c (output_parser): Fix. Store single '%' characters in
21825 the output obstack instead of throwing them away.
21826
21827 2001-08-27 Akim Demaille <akim@epita.fr>
21828
21829 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21830
21831 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21832
21833 * lib/Makefile.am: Adjust.
21834
21835 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21836
21837 * src/bison.simple: Update and add '%%' directives.
21838
21839 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21840
21841 * src/reader.c (reader): Remove calls to 'output_headers' and
21842 'output_trailers'. Remove some C output.
21843 (readgram): Disable a piece of code that was writing a default
21844 definition for 'YYSTYPE'.
21845 (reader_output_yylsp): Remove.
21846 (packsymbols): Output token defintions to a macro.
21847 (copy_definition): Disable C output.
21848
21849 * src/reader.c (parse_macro_decl): New function used to parse macro
21850 declarations.
21851 (copy_string2): Put the body of copy_string into this new function.
21852 Add a parameter to let the caller choose whether he wants to copy the
21853 string delimiters or not.
21854 (copy_string): Be a simple call to copy_string2 with the last argument
21855 bound to true.
21856 (read_declarations): Add case for macro definition.
21857 (copy_identifier): New.
21858 (parse_macro_decl): Read macro identifiers using copy_identifier
21859 rather than lex.
21860
21861 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21862
21863 * src/output.c (prepare): Add prefixed names.
21864 (output_parser): Output semantic actions.
21865 (output_parser): Fix bug on '%%line' directives.
21866
21867 * src/output.c (output_headers): Remove. The C code printed by this
21868 function should now be in the skeletons.
21869 (output_trailers): Remove.
21870 (output): Disable call to 'reader_output_yylsp'.
21871 (output_rule_data): Do not output tables to the table obstack.
21872
21873 * src/output.c: Remove some C dedicated output.
21874 Improve the use of macro and output obstacks.
21875 (output_defines): Remove.
21876
21877 * src/output.c (output_token_translations): Associate 'translate'
21878 table with a macro. No output to the table obstack.
21879 (output_gram): Same for 'rhs' and 'prhs'.
21880 (output_stos): Same for 'stos'.
21881 (output_rule_data): Same for 'r1' and 'r2'.
21882 (token_actions): Same for 'defact'.
21883 (goto_actions): Same for 'defgoto'.
21884 (output_base): Same for 'pact' and 'pgoto'.
21885 (output_table): Same for 'table'.
21886 (output_check): Same for 'check'.
21887
21888 * src/output.c (output_table_data): New function.
21889 (output_short_table): Remove.
21890 (output_short_or_char_table): Remove.
21891
21892 * src/output.c (output_parser): Replace most of the skeleton copy code
21893 with something new. Skeletons are now processed character by character
21894 rather than line by line, and Bison looks for '%%' macros. This is the
21895 first step in making Bison's output process (a lot) more flexible.
21896 (output_parser): Use the macro table.
21897
21898 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21899
21900 * src/main.c (main): Initialize the macro table.
21901
21902 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21903
21904 * src/lex.c (percent_table): Add tok_define.
21905 * src/lex.h: Add tok_define.
21906
21907 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21908
21909 * src/macrotab.c: New file.
21910 * src/macrotab.h: New file.
21911 * src/Makefile.am: Update.
21912
21913 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21914
21915 * lib/hash.c: New file.
21916 * lib/hash.h: New file.
21917 * lib/Makefile.am: Update.
21918
21919 2001-08-15 Akim Demaille <akim@epita.fr>
21920
21921 Version 1.28c.
21922
21923 2001-08-15 Marc Autret <autret_m@epita.fr>
21924
21925 * src/reader.c (readgram): Indent output macro YYSTYPE.
21926 (packsymbols): Likewise.
21927 (output_token_defines): Likewise.
21928 * src/files.c: Standardize.
21929 (compute_header_macro): New.
21930 (defines_obstack_save): New. Use compute_header_macro.
21931 (output_files): Update. Use defines_obstack_save.
21932
21933 2001-08-15 Akim Demaille <akim@epita.fr>
21934
21935 * doc/bison.texinfo (Table of Symbols): Document
21936 YYSTACK_USE_ALLOCA.
21937
21938 2001-08-15 Akim Demaille <akim@epita.fr>
21939
21940 * missing: Update from CVS Automake.
21941 * config/config.guess, config/config.sub, config/texinfo.tex:
21942 Update from gnu.org.
21943
21944 2001-08-15 Akim Demaille <akim@epita.fr>
21945
21946 * Makefile.maint: Sync with CVS Autoconf.
21947
21948 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21949
21950 * doc/bison.texinfo: Include GNU Free Documentation License from
21951 `fdl.texi'.
21952 * doc/fdl.texi: Add to package.
21953
21954 2001-08-14 Marc Autret <autret_m@epita.fr>
21955
21956 Turn on %{source,header}_extension features.
21957
21958 * src/lex.c (percent_table): Un-CPP out header_extension and
21959 source_extension.
21960 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21961 (compute_exts_from_src): Remove conditions. It restores priorities
21962 between options.
21963
21964 2001-08-14 Marc Autret <autret_m@epita.fr>
21965
21966 * src/files.c (compute_base_names): Add extensions computing when
21967 `--file-prefix' used.
21968 Standardize function calls.
21969
21970 2001-08-13 Marc Autret <autret_m@epita.fr>
21971
21972 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21973 defining it (defined but null disables alloca).
21974
21975 2001-08-13 Marc Autret <autret_m@epita.fr>
21976
21977 * src/bison.simple (_yy_memcpy): CPP reformat.
21978
21979 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21980
21981 * tests/atconfig.in (CPPFLAGS): Fix.
21982
21983 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21984
21985 * doc/bison.texinfo: Include GNU General Public License from
21986 `gpl.texi'.
21987 * doc/gpl.texi: Add to package.
21988
21989 2001-08-10 Marc Autret <autret_m@epita.fr>
21990
21991 * src/print_graph.h: Fix.
21992 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21993
21994 2001-08-10 Akim Demaille <akim@epita.fr>
21995
21996 * src/system.h: Provide default declarations for stpcpy, strndup,
21997 and strnlen.
21998
21999 2001-08-10 Robert Anisko <anisko_r@epita.fr>
22000
22001 * doc/bison.texinfo (Locations): Update @$ stuff.
22002
22003 2001-08-09 Robert Anisko <anisko_r@epita.fr>
22004
22005 * src/bison.simple (YYLLOC_DEFAULT): Update.
22006 (yyparse): Adjust.
22007
22008 2001-08-08 Marc Autret <autret_m@epita.fr>
22009
22010 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
22011 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22012 Reported by Fabrice Bauzac.
22013
22014 2001-08-08 Marc Autret <autret_m@epita.fr>
22015
22016 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22017 * src/vcg.c (output_node): Fix.
22018 * src/vcg.h: Cleanup.
22019 * src/print_graph.c: Add comments.
22020 (node_output_size): New global variable. Simplify the formatting of
22021 the VCG graph output.
22022 (print_actions): Unused code is now used. It notifies the final state
22023 and no action states in the VCG graph. It also give the reduce actions.
22024 The `shift and goto' edges are red and the `go to state' edges are
22025 blue.
22026 Get the current node name and node_obstack by argument.
22027 (node_obstack): New variable.
22028 (print_state): Manage node_obstack.
22029 (print_core): Use node_obstack given by argument.
22030 A node is not only computed here but in print_actions also.
22031 (print_graph): CPP out useless code instead of commenting it.
22032
22033 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
22034
22035 * tests/atconfig.in (CPPFLAGS): Fix.
22036
22037 2001-08-07 Akim Demaille <akim@epita.fr>
22038
22039 * src/print_graph.c (quote): New.
22040 (print_core): Use it.
22041
22042 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
22043
22044 * src/vcg.c (complain.h): Include it.
22045 Unepitaize `return' invocations.
22046 [NDEBUG] (main): Remove.
22047 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
22048 * src/files.c (open_files): Initialize graph_obstack.
22049 * src/print_graph.c (print_actions): CPP out useless code.
22050 (print_core): Don't output the last `\n' in labels.
22051 Use `quote'.
22052 * src/files.c (output_files): Output the VCG file.
22053 * src/main.c (main): Invoke print_graph ();
22054
22055 2001-08-06 Marc Autret <autret_m@epita.fr>
22056
22057 Automaton VCG graph output.
22058 Using option ``-g'' or long option ``--graph'', you can generate
22059 a gram_filename.vcg file containing a VCG description of the LALR (1)
22060 automaton of your grammar.
22061
22062 * src/main.c: Call to print_graph() function.
22063 * src/getargs.h: Update.
22064 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22065 (graph_flag): New flag.
22066 (longopts): Update.
22067 (getargs): Add case `g'.
22068 * src/files.c (graph_obstack): New obstack struct.
22069 (open_files): Initialize new obstack.
22070 (output_files): Saves graph_obstack if required.
22071 * src/files.h (graph_obstack): New extern declaration.
22072 * src/Makefile.am: Add new source files.
22073
22074 2001-08-06 Marc Autret <autret_m@epita.fr>
22075
22076 * src/print_graph.c, src/print_graph.h (graph): New.
22077 * src/vcg.h: New file.
22078 * src/vcg.c: New file, VCG graph handling.
22079
22080 2001-08-06 Marc Autret <autret_m@epita.fr>
22081
22082 Add of %source_extension and %header_extension which specify
22083 the source or/and the header output file extension.
22084
22085 * src/files.c (compute_base_names): Remove initialisation of
22086 src_extension and header_extension.
22087 (compute_exts_from_gf): Update.
22088 (compute_exts_from_src): Update.
22089 (output_files): Update.
22090 * src/reader.c (parse_header_extension_decl): New.
22091 (parse_source_extension_decl): New.
22092 (read_declarations): New case statements for the new tokens.
22093 * src/lex.c (percent_table): Add entries for %source_extension
22094 and %header_extension.
22095 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22096
22097 2001-08-06 Marc Autret <autret_m@epita.fr>
22098
22099 * configure.in: Bump to 1.28c.
22100 * doc/bison.texinfo: Texinfo thingies.
22101
22102 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
22103
22104 * tests/atconfig.in (CPPFLAGS): Add.
22105 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22106
22107 2001-08-03 Akim Demaille <akim@epita.fr>
22108
22109 Version 1.28b.
22110
22111 2001-08-03 Akim Demaille <akim@epita.fr>
22112
22113 * tests/Makefile.am (check-local): Ship testsuite.
22114 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22115 Include `string.h'.
22116
22117 2001-08-03 Akim Demaille <akim@epita.fr>
22118
22119 * configure.in: Try using -Wformat when compiling.
22120
22121 2001-08-03 Akim Demaille <akim@epita.fr>
22122
22123 * configure.in: Bump to 1.28b.
22124
22125 2001-08-03 Akim Demaille <akim@epita.fr>
22126
22127 * src/complain.c: Adjust strerror_r portability issues.
22128
22129 2001-08-03 Akim Demaille <akim@epita.fr>
22130
22131 Version 1.28a.
22132
22133 2001-08-03 Akim Demaille <akim@epita.fr>
22134
22135 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22136 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22137 * src/getargs.c: Include complain.h.
22138 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22139 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22140
22141 2001-08-03 Akim Demaille <akim@epita.fr>
22142
22143 * src/reader.c (readgram): Display hidden chars in error messages.
22144
22145 2001-08-03 Akim Demaille <akim@epita.fr>
22146
22147 Update to gettext 0.10.39.
22148
22149 2001-08-03 Akim Demaille <akim@epita.fr>
22150
22151 * lib/strspn.c: New.
22152
22153 2001-08-01 Marc Autret <autret_m@epita.fr>
22154
22155 * doc/bison.texinfo: Update.
22156 * doc/bison.1 (mandoc): Update.
22157 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22158 * src/files.c: Support output files extensions computing.
22159 (src_extension): New static variable.
22160 (header_extension): New static variable.
22161 (tr): New function.
22162 (get_extension_index): New function, gets the index of an extension
22163 filename in a string.
22164 (compute_exts_from_gf): New function, computes extensions from the
22165 grammar file extension.
22166 (compute_exts_from_src): New functions, computes extensions from the
22167 C source file extension, file given by ``-o'' option.
22168 (compute_base_names): Update.
22169 (output_files): Update.
22170
22171 2001-08-01 Robert Anisko <anisko_r@epita.fr>
22172
22173 * doc/bison.texi: Document @$.
22174 (Locations): New section.
22175
22176 2001-07-18 Akim Demaille <akim@epita.fr>
22177
22178 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22179 * config/prev-version.txt, config/move-if-change: New.
22180 * Makefile.am: Adjust.
22181
22182 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
22183
22184 * src/bison.simple (yyparse): Suppress warning `comparaison
22185 between signed and unsigned'.
22186
22187 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
22188
22189 * src/getargs.h (raw_flag): Remove.
22190 * src/getargs.c: Die on `-r'/`--raw'.
22191 * src/lex.c (parse_percent_token): Die on `%raw'.
22192 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22193 * tests/calc.at: Suppress test with option `--raw'.
22194
22195 2001-07-14 Akim Demaille <akim@epita.fr>
22196
22197 * config/: New.
22198 * configure.in: Require Autoconf 2.50.
22199 Update to gettext 0.10.38.
22200
22201 2001-03-16 Akim Demaille <akim@epita.fr>
22202
22203 * doc/bison.texinfo: ANSIfy the examples.
22204
22205 2001-03-16 Akim Demaille <akim@epita.fr>
22206
22207 * getargs.c (skeleton): New variable.
22208 (longopts): --skeleton is a new option.
22209 (shortopts, getargs): -S is a new option.
22210 * getargs.h: Declare skeleton.
22211 * output.c (output_parser): Use it.
22212
22213 2001-03-16 Akim Demaille <akim@epita.fr>
22214
22215 * m4/strerror_r.m4: New.
22216 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22217 * lib/error.h, lib/error.c: Update.
22218
22219 2001-03-16 Akim Demaille <akim@epita.fr>
22220
22221 * src/getargs.c (longopts): Clean up.
22222
22223 2001-02-21 Akim Demaille <akim@epita.fr>
22224
22225 * src/reader.c (gensym): `gensym_count' is your own.
22226 Use a static buf to create the symbol name, as token_buffer is no
22227 longer a buffer.
22228
22229 2001-02-08 Akim Demaille <akim@epita.fr>
22230
22231 * src/conflicts.c (conflict_report): Be sure not to append to res
22232 between two calls, which could happen if both first sprintf were
22233 skipped, but not the first cp += strlen.
22234
22235 2001-02-08 Akim Demaille <akim@epita.fr>
22236
22237 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22238 New, from fileutils 4.0.37.
22239 * configure.in: Require Autoconf 2.49c. I took some time before
22240 making this decision. This is the only way out for portability
22241 issues in Bison, it would mean way too much duplicate effort to
22242 import in Bison features implemented in 2.49c since 2.13.
22243 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22244
22245 2001-02-02 Akim Demaille <akim@epita.fr>
22246
22247 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
22248 * lib/xalloc.h, lib/xmalloc.c: Update.
22249
22250 2001-01-19 Akim Demaille <akim@epita.fr>
22251
22252 Get rid of the ad hoc handling of token_buffer in the scanner: use
22253 the obstacks.
22254
22255 * src/lex.c (token_obstack): New.
22256 (init_lex): Initialize it. No longer call...
22257 (grow_token_buffer): this. Remove it.
22258 Adjust all the places which used it to use the obstack.
22259
22260 2001-01-19 Akim Demaille <akim@epita.fr>
22261
22262 * src/lex.h: Rename all the tokens:
22263 s/\bENDFILE\b/tok_eof/g;
22264 s/\bIDENTIFIER\b/tok_identifier/g;
22265 etc.
22266 Let them be enums, not #define, to ease debugging.
22267 Adjust all the code.
22268
22269 2001-01-18 Akim Demaille <akim@epita.fr>
22270
22271 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22272 * src/lex.c (maxtoken, grow_token_buffer): Static.
22273
22274 2001-01-18 Akim Demaille <akim@epita.fr>
22275
22276 Since we now use obstacks, more % directives can be enabled.
22277
22278 * src/lex.c (percent_table): Also accept `%yacc',
22279 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22280 `%debug'.
22281 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22282 instead of returning a token.
22283 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22284 * src/reader.c (read_declarations): Adjust.
22285 * src/files.c (open_files): Don't call `compute_base_names', don't
22286 compute `attrsfile' since they depend upon data which might be
22287 *in* the input file now.
22288 (output_files): Do it here.
22289 * src/output.c (output_headers): Document the fact that this patch
22290 introduces a guaranteed SEGV for semantic parsers.
22291 * doc/bison.texinfo: Document them.
22292 * tests/suite.at: Exercise these %options.
22293
22294 2000-12-20 Akim Demaille <akim@epita.fr>
22295
22296 Also handle the output file (--verbose) with obstacks.
22297
22298 * files.c (foutput): Remove.
22299 (output_obstack): New.
22300 Adjust all dependencies.
22301 * src/conflicts.c: Return a string.
22302 * src/system.h (obstack_grow_string): Rename as...
22303 (obstack_sgrow): this. Be ready to work with non literals.
22304 (obstack_fgrow4): New.
22305
22306 2000-12-20 Akim Demaille <akim@epita.fr>
22307
22308 * src/files.c (open_files): Fix the computation of short_base_name
22309 in the case of `-o foo.tab.c'.
22310
22311 2000-12-20 Akim Demaille <akim@epita.fr>
22312
22313 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22314 (copy_dollar): Now that everything uses obstacks, get rid of the
22315 FILE * parameters.
22316
22317 2000-12-20 Akim Demaille <akim@epita.fr>
22318
22319 * src/files.c (open_files): Actually the `.output' file is based
22320 on the short_base_name, not base_name.
22321 * tests/suite.at (Checking output file names): Adjust.
22322
22323 2000-12-20 Akim Demaille <akim@epita.fr>
22324
22325 * src/bison.s1: Remove, we now use directly...
22326 * src/bison.simple: this.
22327 * src/Makefile.am: Use pkgdata instead of data.
22328
22329 2000-12-20 Akim Demaille <akim@epita.fr>
22330
22331 * src/files.c (guard_obstack): New.
22332 (open_files): Initialize it.
22333 (output_files): Dump it...
22334 * src/files.h: Export it.
22335 * src/reader.c (copy_guard): Use it.
22336
22337 2000-12-19 Akim Demaille <akim@epita.fr>
22338
22339 * src/files.c (outfile, defsfile, actfile): Removed as global
22340 vars.
22341 (open_files): Don't compute them.
22342 (output_files): Adjust.
22343 (base_name, short_base_name): Be global.
22344 Adjust dependencies.
22345
22346 2000-12-19 Akim Demaille <akim@epita.fr>
22347
22348 * src/files.c (strsuffix): New.
22349 (stringappend): Be just like strcat but allocate.
22350 (base_names): Eve out from open_files.
22351 Try to simplify the rather hairy computation of base_name and
22352 short_base_name.
22353 (open_files): Use it.
22354 * tests/suite.at (Checking output file names): New test.
22355
22356 2000-12-19 Akim Demaille <akim@epita.fr>
22357
22358 * src/system.h (obstack_grow_literal_string): Rename as...
22359 (obstack_grow_string): this.
22360 * src/output.c (output_parser): Recognize `%% actions' instead of
22361 `$'.
22362 * src/bison.s1: s/$/%% actions/.
22363 * src/bison.hairy: Likewise.
22364
22365 2000-12-19 Akim Demaille <akim@epita.fr>
22366
22367 * src/output.c (output_parser): Compute the `#line' lines when
22368 there are.
22369 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22370 Suggested by Hans Aberg.
22371
22372 2000-12-19 Akim Demaille <akim@epita.fr>
22373
22374 Let the handling of the skeleton files be local to the procedures
22375 that use it.
22376
22377 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22378 longer static.
22379 (fparser, open_extra_files): Remove.
22380 (open_files, output_files): Don't take care of fparser.
22381 * src/files.h: Adjust.
22382 * src/output.c (output_parser): Open and close the file to the
22383 skeleton.
22384 * src/reader.c (read_declarations): When %semantic_parser, open
22385 fguard.
22386
22387 2000-12-19 Akim Demaille <akim@epita.fr>
22388
22389 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22390 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22391
22392 2000-12-19 Akim Demaille <akim@epita.fr>
22393
22394 * src/files.c (open_files): Yipee! We no longer need all the code
22395 looking for `/tmp' since we have no tmp file.
22396
22397 2000-12-19 Akim Demaille <akim@epita.fr>
22398
22399 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22400 New macros.
22401 * src/files.c (open_files): Less dependency on MSDOS etc.
22402
22403 2000-12-14 Akim Demaille <akim@epita.fr>
22404
22405 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22406 Provide a default definition.
22407 Use it when executing the default @ action.
22408 * src/reader.c (reader_output_yylsp): No longer include
22409 `timestamp' and `text' in the default YYLTYPE.
22410
22411 2000-12-12 Akim Demaille <akim@epita.fr>
22412
22413 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22414 (copy_guard): Quote the file names.
22415 Reported by Laurent Mascherpa.
22416
22417 2000-12-12 Akim Demaille <akim@epita.fr>
22418
22419 * src/output.c (output_headers, output_program, output): Be sure
22420 to escape special characters when outputting filenames.
22421 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22422 (output_headers): Don't depend on them, Use ACTSTR.
22423
22424 2000-11-17 Akim Demaille <akim@epita.fr>
22425
22426 * lib/obstack.h: Formatting changes.
22427 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22428 prevents type checking.
22429 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22430 cast the value to (void *): assigning a `foo *' to a `void *'
22431 variable is valid.
22432 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22433 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22434 append characters.
22435
22436 2000-11-17 Akim Demaille <akim@epita.fr>
22437
22438 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22439 as...
22440 (suite.m4, regression.m4, calc.m4): these.
22441 * tests/atgeneral.m4: Update from CVS Autoconf.
22442
22443 2000-11-17 Akim Demaille <akim@epita.fr>
22444
22445 * tests/regression.m4 (%union and --defines): New test,
22446 demonstrating a current bug in the obstack implementation.
22447
22448 2000-11-17 Akim Demaille <akim@epita.fr>
22449
22450 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22451 macros.
22452 Use them to declare the variables which are global or local to
22453 `yyparse'.
22454
22455 2000-11-17 Akim Demaille <akim@epita.fr>
22456
22457 * acconfig.h: Remove, no longer used.
22458
22459 2000-11-07 Akim Demaille <akim@epita.fr>
22460
22461 * src: s/Copyright (C)/Copyright/g.
22462
22463 2000-11-07 Akim Demaille <akim@epita.fr>
22464
22465 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22466 defining.
22467 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22468
22469 2000-11-07 Akim Demaille <akim@epita.fr>
22470
22471 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22472 Merge in a single CPP if/else.
22473
22474 2000-11-07 Akim Demaille <akim@epita.fr>
22475
22476 * src/output.c (output): Remove useless variables.
22477 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22478 argument `data' for consistency with the prototypes.
22479 Qualify it `const'.
22480 (obstack_copy, obstack_copy0): Rename the second argument as
22481 `address' for consistency. Qualify it `const'.
22482 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22483 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22484 `const' their input argument (`data' or `address').
22485 Adjust the corresponding macros to include `const' in casts.
22486
22487 2000-11-03 Akim Demaille <akim@epita.fr>
22488
22489 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22490 s/PFILE1/BISON_HAIRY/.
22491 Adjust dependencies.
22492
22493 2000-11-03 Akim Demaille <akim@epita.fr>
22494
22495 For some reason, this was not applied.
22496
22497 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22498 `unlink': it's no longer used.
22499
22500 2000-11-03 Akim Demaille <akim@epita.fr>
22501
22502 * src/files.c (skeleton_find): New function, eved out of...
22503 (open_files, open_extra_files): here.
22504
22505 2000-11-03 Akim Demaille <akim@epita.fr>
22506
22507 Don't use `atexit'.
22508
22509 * src/files.c (obstack_save): New function.
22510 (done): Rename as...
22511 (output_files): this.
22512 Use `obstack_save'.
22513 * src/main.c (main): Don't use `atexit' to register `done', since
22514 it no longer has to remove tmp files, just call `output_files'
22515 when there are no errors.
22516
22517 2000-11-02 Akim Demaille <akim@epita.fr>
22518
22519 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22520 `unlink': it's no longer used.
22521 * src/files.h: Formatting changes.
22522
22523 2000-11-02 Akim Demaille <akim@epita.fr>
22524
22525 Remove the last uses of mktemp and unlink/delete.
22526
22527 * src/files.c (fdefines, ftable): Removed.
22528 (defines_ostack, table_obstack): New.
22529 Adjust dependencies of the former into uses of the latter.
22530 * src/output.c (output_short_or_char_table, output_short_table):
22531 Convert to using obstacks.
22532 * src/reader.c (copy_comment2): Accept one FILE * and two
22533 obstacks.
22534 (output_token_defines, reader_output_yylsp): Use obstacks.
22535 * src/system.h (obstack_fgrow3): New.
22536 * po/POTFILES.in: Adjust.
22537
22538 2000-11-01 Akim Demaille <akim@epita.fr>
22539
22540 Change each use of `fattrs' into a use of `attrs_obstack'.
22541
22542 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22543 * src/files.c (fattrs): Remove.
22544 (attrs_obstack): New.
22545 Adjust all dependencies.
22546 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22547
22548 2000-11-01 Akim Demaille <akim@epita.fr>
22549
22550 Introduce obstacks.
22551 Change each use of `faction' into a use of `action_obstack'.
22552
22553 * lib/obstack.h, lib/obstack.c: New files.
22554 * src/files.c (faction): Remove.
22555 (action_obstack): New.
22556 Adjust all dependencies.
22557
22558 2000-10-20 Akim Demaille <akim@epita.fr>
22559
22560 * lib/quote.h (PARAMS): New macro. Use it.
22561
22562 2000-10-16 Akim Demaille <akim@epita.fr>
22563
22564 * src/output.c (output_short_or_char_table): New function.
22565 (output_short_table, output_token_translations): Use it.
22566 (goto_actions): Use output_short_table.
22567
22568 2000-10-16 Akim Demaille <akim@epita.fr>
22569
22570 * src/symtab.c (bucket_new): New function.
22571 (getsym): Use it.
22572
22573 * src/output.c (output_short_table): New argument to display the
22574 comment associated with the table.
22575 Adjust dependencies.
22576 (output_gram): Use it.
22577 (output_rule_data): Nicer output layout for YYTNAME.
22578
22579 2000-10-16 Akim Demaille <akim@epita.fr>
22580
22581 * src/lex.c (read_typename): New function.
22582 (lex): Use it.
22583 * src/reader.c (copy_dollar): Likewise.
22584
22585 2000-10-16 Akim Demaille <akim@epita.fr>
22586
22587 * src/reader.c (copy_comment2): Expect the input stream to be on
22588 the `/' which is suspected to open a comment, instead of being
22589 called after `//' or `/*' was read.
22590 (copy_comment, copy_definition, parse_union_decl, copy_action)
22591 (copy_guard): Adjust.
22592
22593 2000-10-16 Akim Demaille <akim@epita.fr>
22594
22595 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22596 `read_signed_integer'.
22597
22598 2000-10-16 Akim Demaille <akim@epita.fr>
22599
22600 * src/reader.c (copy_dollar): New function.
22601 (copy_guard, copy_action): Use it.
22602
22603 2000-10-16 Akim Demaille <akim@epita.fr>
22604
22605 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22606 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22607 New files, from Fileutils 4.0.27.
22608 * src/main.c (printable_version): Remove.
22609 * src/lex.c, src/reader.c: Use `quote'.
22610
22611 2000-10-04 Akim Demaille <akim@epita.fr>
22612
22613 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22614
22615 2000-10-04 Akim Demaille <akim@epita.fr>
22616
22617 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22618
22619 2000-10-04 Akim Demaille <akim@epita.fr>
22620
22621 When a literal string is used to define two different tokens,
22622 `bison -v' segfaults.
22623 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22624
22625 * tests/regression.m4: New file.
22626 Include the core of the sample provided by Piotr Gackiewicz.
22627 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22628 properly.
22629
22630 2000-10-04 Akim Demaille <akim@epita.fr>
22631
22632 * src/reader.c (parse_expect_decl): Keep `count' within the size
22633 of `buffer'.
22634 From Neil Booth.
22635
22636 2000-10-02 Paul Eggert <eggert@twinsun.com>
22637
22638 * bison.s1 (yyparse): Assign the default value
22639 unconditionally, to avoid a GCC warning and make the parser a
22640 tad smaller.
22641
22642 2000-10-02 Akim Demaille <akim@epita.fr>
22643
22644 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22645 options.
22646
22647 2000-10-02 Akim Demaille <akim@epita.fr>
22648
22649 * src/derives.c, src/print.c, src/reduce.c: To ease the
22650 translation, move some `\n' out of the translated strings.
22651
22652 2000-10-02 Akim Demaille <akim@epita.fr>
22653
22654 The location tracking mechanism is precious for parse error
22655 messages. Nevertheless, it is enabled only when `@n' is used in
22656 the grammar, which is a different issue (you can use it in error
22657 message, but not in the grammar per se). Therefore, there should
22658 be another means to enable it.
22659
22660 * src/getargs.c (getargs): Support `--locations'.
22661 (usage): Report it.
22662 * src/getargs.h (locationsflag): Export it.
22663 * src/lex.c (percent_table): Support `%locations'.
22664 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22665 with `locationsflag'.
22666 * doc/bison.texinfo: Document `--locations' and `%locations'.
22667 Sort the options.
22668 * tests/calc.m4: Test it.
22669
22670 For regularity of the names, replace each
22671 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22672 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22673 In addition replace each `flag' with `_flag'.
22674
22675 2000-10-02 Akim Demaille <akim@epita.fr>
22676
22677 Also test parse error messages, including with YYERROR_VERBOSE.
22678
22679 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22680 associative).
22681 Use it to check the computations.
22682 Use it to check `nonassoc' is honored.
22683 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22684 `--yyerror-verbose'.
22685 (_AT_CHECK_CALC): Adjust to this option.
22686 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22687
22688 2000-10-02 Akim Demaille <akim@epita.fr>
22689
22690 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22691 the latter demonstrates a flaw in the handling of non debugging
22692 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22693 was used in order to simplify:
22694
22695 #if YYDEBUG
22696 if (yydebug)
22697 {
22698 ...
22699 }
22700 #endif
22701
22702 into
22703
22704 if (yydebug)
22705 {
22706 ...
22707 }
22708
22709 unfortunately this leads to a CPP conflict when
22710 `--name-prefix=foo' is used since it produces `#define yydebug
22711 foodebug'.
22712
22713 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22714 (YYDPRINTF): New macro.
22715 Spread its use.
22716 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22717 the bison options.
22718 Also test `--verbose', `--defines' and `--name-prefix'.
22719
22720 2000-10-02 Akim Demaille <akim@epita.fr>
22721
22722 Improve the readability of the produced parsers.
22723
22724 * src/bison.s1: Formatting changes.
22725 Improve the comment related to the `$' mark.
22726 (yydefault): Don't fall through to `yyresume': `goto' there.
22727 * src/output.c (output_parser): When the `$' is met, skip the end
22728 of its line.
22729 New variable, `number_of_dollar_signs', to check there's exactly
22730 one `$' in the parser skeleton.
22731
22732 2000-10-02 Akim Demaille <akim@epita.fr>
22733
22734 * lib/xstrdup.c: New file, from the fileutils.
22735 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22736 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22737 instead of strlen + xmalloc + strcpy.
22738 * src/symtab.c (copys): Remove, use xstrdup instead.
22739
22740 2000-10-02 Akim Demaille <akim@epita.fr>
22741
22742 * src/gram.h (associativity): New enum type which replaces the
22743 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22744 `right_assoc', `left_assoc' and `non_assoc'.
22745 Adjust all dependencies.
22746 * src/reader.c: Formatting changes.
22747 (LTYPESTR): Don't define it, use it as a literal in
22748 `reader_output_yylsp'.
22749 * src/symtab.h (symbol_class): New enum type which replaces the
22750 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22751 `sunknown', `stoken and `snterm'.
22752
22753 2000-10-02 Akim Demaille <akim@epita.fr>
22754
22755 * src/getargs.c (fixed_outfiles): Rename as...
22756 (yaccflag): for consistency and accuracy.
22757 Adjust dependencies.
22758
22759 2000-10-02 Akim Demaille <akim@epita.fr>
22760
22761 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22762 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22763 difficult and introduced a lot of core dump. It turns out that
22764 Bison used an implementation of `xmalloc' based on `calloc', and
22765 at various places it does depend upon the initialization to 0. I
22766 have not tried to isolate the pertinent places, and all the former
22767 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22768 someone should address this issue.
22769
22770 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22771 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22772 files.
22773 Adjust dependencies.
22774 * src/warshall.h: New file.
22775 Propagate.
22776
22777 2000-10-02 Akim Demaille <akim@epita.fr>
22778
22779 Various anti-`extern in *.c' changes.
22780
22781 * src/system.h: Include `assert.h'.
22782
22783 2000-10-02 Akim Demaille <akim@epita.fr>
22784
22785 * src/state.h (nstates, final_state, first_state, first_shift)
22786 (first_reduction): Move their exportation from here...
22787 * src/LR0.h: to here.
22788 Adjust dependencies.
22789 * src/getargs.c (statisticsflag): New variable.
22790 Add support for `--statistics'.
22791 Adjust dependencies.
22792
22793 Remove a lot of now useless `extern' statements in most files.
22794
22795 2000-10-02 Akim Demaille <akim@epita.fr>
22796
22797 * src/LR0.h: New file.
22798 Propagate its use.
22799
22800 2000-10-02 Akim Demaille <akim@epita.fr>
22801
22802 * src/print.h: New file.
22803 Propagate its use.
22804 * src/print.c: Formatting and ordering changes.
22805 (verbose, terse): Replace with...
22806 (print_results): this new function.
22807 Adjust dependencies.
22808
22809 2000-10-02 Akim Demaille <akim@epita.fr>
22810
22811 * src/conflicts.c (conflict_report): New function.
22812 (conflict_log, verbose_conflict_log): Replace with...
22813 (print_conflicts): this function.
22814 Adjust dependencies.
22815 * src/conflicts.h: New file.
22816 Propagate its inclusion.
22817
22818 2000-10-02 Akim Demaille <akim@epita.fr>
22819
22820 * src/nullable.h: New file.
22821 Propagate its inclusion.
22822 * src/nullable.c: Formatting changes.
22823
22824 2000-10-02 Akim Demaille <akim@epita.fr>
22825
22826 * src/reduce.h: New file.
22827 Propagate its inclusion.
22828 * src/reduce.c: Topological sort and other formatting changes.
22829 (bool, TRUE, FALSE): Move their definition to...
22830 * src/system.h: here.
22831
22832 2000-10-02 Akim Demaille <akim@epita.fr>
22833
22834 * src/files.c: Formatting changes.
22835 (tryopen, tryclose, openfiles): Rename as...
22836 (xfopen, xfclose, open_files): this.
22837 (stringappend): static.
22838 * src/files.h: Complete the list of exported symbols.
22839 Propagate its use.
22840
22841 2000-10-02 Akim Demaille <akim@epita.fr>
22842
22843 * src/reader.h: New file.
22844 Propagate its use instead of tedious list of `extern' and
22845 prototypes.
22846 * src/reader.c: Formatting changes, topological sort,
22847 s/register//.
22848
22849 2000-10-02 Akim Demaille <akim@epita.fr>
22850
22851 * src/lex.h: Prototype `lex.c' exported functions.
22852 * src/reader.c: Adjust.
22853 * src/lex.c: Formatting changes.
22854 (safegetc): Rename as...
22855 (xgetc): this.
22856
22857 2000-10-02 Akim Demaille <akim@epita.fr>
22858
22859 * src/lalr.h: New file.
22860 Propagate its inclusion instead of prototypes and `extern'.
22861 * src/lalr.c: Formatting changes, topological sorting etc.
22862
22863 2000-10-02 Akim Demaille <akim@epita.fr>
22864
22865 * src/output.c (token_actions): Introduce a temporary array,
22866 YYDEFACT, that makes it possible for this function to use
22867 output_short_table.
22868
22869 2000-10-02 Akim Demaille <akim@epita.fr>
22870
22871 `user_toknums' is output as a `short[]' in `output.c', while it is
22872 defined as a `int[]' in `reader.c'. For consistency with the
22873 other output tables, `user_toknums' is now defined as a table of
22874 shorts.
22875
22876 * src/reader.c (user_toknums): Be a short table instead of an int
22877 table.
22878 Adjust dependencies.
22879
22880 Factor the short table outputs.
22881
22882 * src/output.c (output_short_table): New function.
22883 * src/output.c (output_gram, output_stos, output_rule_data)
22884 (output_base, output_table, output_check): Use it.
22885
22886 2000-10-02 Akim Demaille <akim@epita.fr>
22887
22888 * src/output.c (output): Topological sort of the functions, in
22889 order to get rid of the `static' prototypes.
22890 No longer use `register'.
22891 * src/output.h: New file.
22892 Propagate its inclusion in files explicitly prototyping functions
22893 from output.c.
22894
22895 2000-09-21 Akim Demaille <akim@epita.fr>
22896
22897 * src/atgeneral.m4: Update from Autoconf.
22898
22899 2000-09-21 Akim Demaille <akim@epita.fr>
22900
22901 * src/closure.h: New file.
22902 * src/closure.c: Formatting changes, topological sort over the
22903 functions, use of closure.h.
22904 (initialize_closure, finalize_closure): Rename as...
22905 (new_closure, free_closure): these. Adjust dependencies.
22906 * src/LR0.c: Formatting changes, topological sort, use of
22907 cloture.h.
22908 (initialize_states): Rename as...
22909 (new_states): this.
22910 * src/Makefile.am (noinst_HEADERS): Adjust.
22911
22912 2000-09-20 Akim Demaille <akim@epita.fr>
22913
22914 * src/acconfig.h: Don't protect config.h against multiple
22915 inclusion.
22916 Don't define PARAMS.
22917 * src/system.h: Define PARAMS.
22918 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22919 purpose of config.h. system.h must not try to fix wrong
22920 definitions in config.h.
22921
22922 2000-09-20 Akim Demaille <akim@epita.fr>
22923
22924 * src/derives.h: New file.
22925 * src/main.c, src/derives.h: Use it.
22926 Formatting changes.
22927 * src/Makefile.am (noinst_HEADERS): Adjust.
22928
22929 2000-09-20 Akim Demaille <akim@epita.fr>
22930
22931 * tests/atgeneral.m4: Update from Autoconf.
22932 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22933 (AT_CHECK_CALC): New macros.
22934 Use these macros to test bison with options `', `--raw',
22935 `--debug', `--yacc', `--yacc --debug'.
22936
22937 2000-09-19 Akim Demaille <akim@epita.fr>
22938
22939 * src/output.c: Formatting changes.
22940 * src/machine.h: Remove, leaving its contents in...
22941 * src/system.h: here.
22942 Include stdio.h.
22943 Adjust all dependencies on stdio.h and machine.h.
22944 * src/getargs.h: New file.
22945 Let all `extern' declarations about getargs.c be replaced with
22946 inclusion of `getargs.h'.
22947 * src/Makefile.am (noinst_HEADERS): Adjust.
22948
22949 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22950 scope.
22951 (yyerror): Returns void, not int.
22952 * doc/bison.texinfo: Formatting changes.
22953
22954 2000-09-19 Akim Demaille <akim@epita.fr>
22955
22956 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22957 portable.
22958
22959 2000-09-18 Akim Demaille <akim@epita.fr>
22960
22961 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22962 * src/Makefile.am (INCLUDES): Don't.
22963 Be ready to fetch headers in lib/.
22964
22965 2000-09-18 Akim Demaille <akim@epita.fr>
22966
22967 * doc/bison.texinfo: Update the copyright.
22968 ANSIfy and GNUify the examples.
22969 Remove the old menu.
22970
22971 2000-09-18 Akim Demaille <akim@epita.fr>
22972
22973 First set of tests: use the `calc' example from the documentation.
22974
22975 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22976 is defined only when YYDEBUG is.
22977 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22978 * src/files.c (tryopen, tryclose): Formatting changes.
22979 Move to the top and be static.
22980 * src/reader.c (read_signed_integer): Likewise.
22981 * tests/calc.m4: New file.
22982 * Makefile.am, suite.m4: Adjust.
22983 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22984
22985 2000-09-18 Akim Demaille <akim@epita.fr>
22986
22987 Add support for an Autotest test suite for Bison.
22988
22989 * m4/m4.m4, m4/atconfig.m4: New files.
22990 * m4/Makefile.am (EXTRA_DIST): Adjust.
22991 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22992 files.
22993 * src/getargs.c: Display a more standard --version message.
22994 * src/reader.c (reader): Formatting changes.
22995 No longer depend upon VERSION_STRING.
22996 * configure.in: No longer use `dnl'.
22997 Set up the test suite and the new directory `tests/.
22998 (VERSION_STRING): Remove.
22999
23000 2000-04-14 Akim Demaille <akim@epita.fr>
23001
23002 * src/reader.c (copy_comment2): New function, same as former
23003 `copy_comment', but outputs into two FILE *.
23004 (copy_comment): Use it.
23005 (parse_union_decl): Use it.
23006 (get_type, parse_start_decl): Use the same `invalid' message.
23007 (parse_start_decl, parse_union_decl): Use the same `multiple'
23008 message.
23009 (parse_union_decl, copy_guard, copy_action): Use the same
23010 `unmatched' message.
23011 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23012
23013 2000-03-31 Akim Demaille <akim@epita.fr>
23014
23015 * src/files.c (tryopen, tryclose): Move to the top.
23016 Be static.
23017
23018 2000-03-31 Akim Demaille <akim@epita.fr>
23019
23020 * src/main.c (main): Don't call `done', exit does it.
23021
23022 2000-03-31 Akim Demaille <akim@epita.fr>
23023
23024 * allocate.c: s/return (foo)/return foo/.
23025 * lalr.c: Likewise.
23026 * LR0.c: Likewise.
23027 * output.c: Likewise.
23028 * reader.c: Likewise.
23029 * symtab.c: Likewise.
23030 * vmsgetargs.c: Likewise.
23031
23032 2000-03-31 Akim Demaille <akim@epita.fr>
23033
23034 Clean up the error reporting functions.
23035
23036 * src/report.c: New file.
23037 * src/report.h: Likewise.
23038 * src/Makefile.am: Adjust.
23039 * m4/error.m4: New file.
23040 * m4/Makefile.am: Adjust.
23041 * configure.in (jm_PREREQ_ERROR): Call it.
23042 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23043 Remove.
23044 (fatal, fatals): Remove. All callers use complain.c::fatal.
23045 (warn, warni, warns, warnss, warnss): Remove. All callers use
23046 complain.c::complain.
23047 (toomany): Remove, use fatal instead.
23048 * src/files.c (done): No argument, use complain_message_count.
23049 * src/main.c (main): Register `done' to `atexit'.
23050
23051 * src/getargs.c (usage): More `fputs', less `fprintf'.
23052
23053 2000-03-28 Akim Demaille <akim@epita.fr>
23054
23055 * lib/: New directory.
23056 * Makefile.am (SUBDIRS): Adjust.
23057 * configure.in: Adjust.
23058 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23059 useless.
23060 * src/alloca.c: Moved to lib/.
23061 * src/getopt.c: Likewise.
23062 * src/getopt1.c: Likewise.
23063 * src/getopt.h: Likewise.
23064 * src/ansi2knr.c: Likewise.
23065 * src/ansi2knr.1: Likewise.
23066 * src/Makefile.am: Adjust.
23067 * lib/Makefile.am: New file.
23068
23069 2000-03-28 Akim Demaille <akim@epita.fr>
23070
23071 * src/getargs.c (usage): Refresh the help message.
23072
23073 2000-03-17 Akim Demaille <akim@epita.fr>
23074
23075 * src/getopt1.c: Updated from textutils 2.0e
23076 * src/getopt.c: Likewise.
23077 * src/getopt.h: Likewise.
23078
23079 2000-03-17 Akim Demaille <akim@epita.fr>
23080
23081 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23082 the file name, not the whole `#line LINE FILE'.
23083
23084 2000-03-17 Akim Demaille <akim@epita.fr>
23085
23086 On syntax errors, report the token on which we choked.
23087
23088 * src/bison.s1 (yyparse): In the label yyerrlab, when
23089 YYERROR_VERBOSE, add yychar in msg.
23090
23091 2000-03-17 Akim Demaille <akim@epita.fr>
23092
23093 * src/reader.c (copy_at): New function.
23094 (copy_guard): Use it.
23095 (copy_action): Use it.
23096
23097 2000-03-17 Akim Demaille <akim@epita.fr>
23098
23099 Be kind to translators, save some useless translations.
23100
23101 * src/main.c (banner): New function.
23102 (fatal_banner): Use it.
23103 (warn_banner): Use it.
23104
23105 2000-03-17 Akim Demaille <akim@epita.fr>
23106
23107 * src/reader.c (copy_definition): Use copy_string and
23108 copy_comment. Removed now unused `match', `ended',
23109 `cplus_comment'.
23110 (copy_comment, copy_string): Moved, to be visible from
23111 copy_definition.
23112
23113 2000-03-17 Akim Demaille <akim@epita.fr>
23114
23115 * src/reader.c (copy_string): Declare `static inline'. No
23116 problems with inline, since it is checked by configure.
23117 (copy_comment): Likewise.
23118
23119 2000-03-17 Akim Demaille <akim@epita.fr>
23120
23121 * src/reader.c (packsymbols): Formatting changes.
23122
23123 2000-03-17 Akim Demaille <akim@epita.fr>
23124
23125 * src/reader.c (copy_comment): New function, factored out from:
23126 (copy_action): Use it. Removed now unused `match', `ended',
23127 `cplus_comment'.
23128 (copy_guard): Likewise.
23129
23130 2000-03-17 Akim Demaille <akim@epita.fr>
23131
23132 * src/reader.c (copy_string): New function, factored out from:
23133 (copy_action): Use it.
23134 (copy_guard): Likewise.
23135
23136 2000-03-17 Akim Demaille <akim@epita.fr>
23137
23138 Change the handling of @s so that they behave exactly like $s.
23139 There is now a pseudo variable @$ (readble and writable), location
23140 of the lhs of the rule (by default ranging from the location of
23141 the first symbol of the rhs, to the location of the last symbol,
23142 or, if the rhs is empty, YYLLOC).
23143
23144 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23145 yyval.
23146 (yyparse): When providing a default semantic action, provide a
23147 default location action.
23148 (after the $): No longer change `*YYLSP', just stack YYLOC the
23149 same way you stack YYVAL.
23150 * src/reader.c (read_declarations): Use warns.
23151 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23152 (copy_action, case '@'): Likewise.
23153 Use a standard error message, to save useless work from
23154 translators.
23155
23156 2000-03-17 Akim Demaille <akim@epita.fr>
23157
23158 * src/bison.s1: Formatting and cosmetics changes.
23159 * src/reader.c: Likewise.
23160 Update the Copyright notice.
23161
23162 2000-03-17 Akim Demaille <akim@epita.fr>
23163
23164 * src/bison.s1 (#line): All set to `#line' only, since the
23165 Makefile now handles them.
23166
23167 2000-03-16 Akim Demaille <akim@epita.fr>
23168
23169 * src/output.c (output_rule_data): Output the documentation of
23170 some of the tables.
23171 (Copyright notice): Update.
23172 Formatting changes.
23173
23174 2000-03-16 Akim Demaille <akim@epita.fr>
23175
23176 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23177 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23178 One `#if YYDEBUG' remains, since it uses variables which are
23179 defined only if `YYDEBUG != 0'.
23180
23181 2000-03-16 Akim Demaille <akim@epita.fr>
23182
23183 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23184 and related variables so that the similarities are highlighted.
23185
23186 2000-03-16 Akim Demaille <akim@epita.fr>
23187
23188 * src/bison.s1: Properly indent CPP directives.
23189
23190 2000-03-16 Akim Demaille <akim@epita.fr>
23191
23192 * src/bison.s1: Properly indent the `alloca' CPP section.
23193
23194 2000-03-16 Akim Demaille <akim@epita.fr>
23195
23196 Do not hard code values of directories in `configure.in'.
23197 Update the `configure' tool chain.
23198
23199 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23200 src/makefile.am.
23201 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23202 (AC_OUTPUT): Add m4/Makefile.
23203 Bump to bison 1.28a, 1.29 has never been released.
23204 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23205 handled via src/Makefile.am.
23206 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23207 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23208 autoheader.
23209 * Makefile.am (SUBDIRS): Add m4.
23210 (ACLOCAL_AM_FLAGS): New variable.
23211 (AUTOMAKE_OPTIONS): Add check-news.
23212 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23213 the proper line number and file name.
23214 (DEFS): Propagate the location of bison library files and of the
23215 locale files.
23216 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23217 builddir.
23218 * acinclude.m4: Remove, replaced by the directory m4.
23219 * m4/Makefile.am (EXTRA_DIST): New variable.
23220 * m4/gettext.m4: New file, from the fileutils.
23221 * m4/lcmessage.m4: Likewise
23222 * m4/progtest.m4: Likewise.
23223 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23224
23225 2000-03-10 Akim Demaille <akim@epita.fr>
23226
23227 * src/closure.c:
23228 Formatting changes of various comments.
23229 Respect the GNU coding standards at various places.
23230 Don't use `_()' when no translation is needed.
23231
23232 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23233
23234 * src/files.c:
23235 OS/2 honors TMPDIR environment variable.
23236
23237 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23238
23239 * doc/bison.texinfo: Tweaked spelling and grammar.
23240 Updated ISBN.
23241 Removed reference to price of printed copy.
23242 Mention BISON_SIMPLE and BISON_HAIRY.
23243
23244 1999-12-13 Jesse Thilo <jthilo@gnu.org>
23245
23246 * configure.in, NEWS:
23247 Bison 1.29 released.
23248
23249 1999-10-27 Jesse Thilo <jthilo@gnu.org>
23250
23251 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23252 Added reference card.
23253
23254 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23255
23256 * po/ru.po: Added Russian translation.
23257
23258 1999-07-26 Jesse Thilo <jthilo@gnu.org>
23259
23260 * configure.in: Added Russian translation.
23261
23262 1999-07-06 Jesse Thilo <jthilo@gnu.org>
23263
23264 * configure.in, NEWS, README:
23265 Released version 1.28.
23266
23267 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23268
23269 * src/system.h:
23270 Squashed redefinition warning on some systems.
23271
23272 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23273 Have configure build version string instead of relying on ANSI string
23274 concatentation.
23275
23276 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23277
23278 * po/POTFILES.in: Got rid of version.c.
23279
23280 1999-06-14 Jesse Thilo <jthilo@gnu.org>
23281
23282 * acconfig.h, configure.in:
23283 Have configure build version string instead of relying on ANSI string
23284 concatentation.
23285
23286 1999-06-08 Jesse Thilo <jthilo@gnu.org>
23287
23288 * doc/bison.1:
23289 Dropped mention of `+' for long-named options.
23290
23291 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23292
23293 * src/files.c: Added <unistd.h> for unlink().
23294
23295 * src/Makefile.am, src/system.h:
23296 I18n fixes.
23297
23298 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23299
23300 * README: Added a FAQ list.
23301
23302 * configure.in, acconfig.h:
23303 I18n fixes.
23304
23305 1999-05-30 Jesse Thilo <jthilo@gnu.org>
23306
23307 * doc/FAQ, doc/Makefile.am:
23308 Added a FAQ list.
23309
23310 1999-05-19 Jesse Thilo <jthilo@gnu.org>
23311
23312 * src/alloc.h, src/symtab.h, src/version.c:
23313 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23314
23315 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23316
23317 * src/.cvsignore, src/Makefile.am:
23318 Reorganized: sources in `src', documentation in `doc'.
23319
23320 * src/lex.c (literalchar):
23321 fixed the code for escaping double quotes (thanks
23322 Jonathan Czisny.)
23323
23324 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23325
23326 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23327 Adjusted paths to reflect directory reorganization.
23328
23329 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23330
23331 * doc/.cvsignore, doc/Makefile.am:
23332 Reorganized: sources in `src', documentation in `doc'.
23333
23334 1999-04-18 Jesse Thilo <jthilo@gnu.org>
23335
23336 * configure.in:
23337 Updated AC_INIT file to reflect directory reorganization.
23338
23339 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23340 Reorganized: sources in `src', documentation in `doc'.
23341
23342 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23343
23344 * src/allocate.c:
23345 Don't declare calloc() and realloc() if not necessary.
23346
23347 1999-04-13 Jesse Thilo <jthilo@gnu.org>
23348
23349 * configure.in, acconfig.h, acinclude.m4:
23350 Don't declare calloc() and realloc() if not necessary.
23351
23352 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23353
23354 * po/.cvsignore: Added i18n support.
23355
23356 1999-03-23 Jesse Thilo <jthilo@gnu.org>
23357
23358 * acconfig.h, configure.in, Makefile.am:
23359 Added i18n support.
23360
23361 1999-03-22 Jesse Thilo <jthilo@gnu.org>
23362
23363 * src/bison.s1: Fixed #line numbers.
23364
23365 1999-03-15 Jesse Thilo <jthilo@gnu.org>
23366
23367 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23368 Added PO files from Translation Project.
23369
23370 1999-03-03 Jesse Thilo <jthilo@gnu.org>
23371
23372 * Makefile.am:
23373 Added support for non-ANSI compilers (ansi2knr).
23374
23375 1999-02-16 Jesse Thilo <jthilo@gnu.org>
23376
23377 * configure.in: Bumped version number to 1.27.
23378
23379 * Makefile.am:
23380 Added `bison.simple' to list of files removed by `make distclean'.
23381
23382 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23383
23384 * src/files.c, src/files.h:
23385 Defined locations of parser files in config.h instead of Makefile.
23386
23387 1999-02-12 Jesse Thilo <jthilo@gnu.org>
23388
23389 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23390 Defined locations of parser files in config.h instead of Makefile.
23391
23392 1999-02-09 Jesse Thilo <jthilo@gnu.org>
23393
23394 * Makefile.am:
23395 Removed inappropriate use of $< macro.
23396
23397 1999-02-05 Jesse Thilo <jthilo@gnu.org>
23398
23399 * po/Makefile.in.in, po/POTFILES.in:
23400 Add `po' directory skeleton.
23401
23402 1999-01-27 Jesse Thilo <jthilo@gnu.org>
23403
23404 * README: Document help-bison list.
23405
23406 * configure.in: Add check for mkstemp().
23407
23408 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23409
23410 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23411 Hush a few compiler warnings.
23412
23413 * src/files.c:
23414 Add tryclose(), which verifies that fclose was successful.
23415 Hush a couple of compiler warnings.
23416
23417 1999-01-20 Jesse Thilo <jthilo@gnu.org>
23418
23419 * Makefile.am, OChangeLog:
23420 ChangeLog is now automatically generated. Include the old version as
23421 OChangeLog.
23422
23423 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23424
23425 * 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:
23426 Update FSF address.
23427
23428 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23429
23430 * doc/bison.texinfo: Fix formatting glitch.
23431
23432 * doc/bison.texinfo: Update FSF address.
23433
23434 1999-01-14 Jesse Thilo <jthilo@gnu.org>
23435
23436 * acconfig.h: Update FSF address.
23437
23438 1999-01-08 Jesse Thilo <jthilo@gnu.org>
23439
23440 * src/system.h:
23441 Don't define PACKAGE here, since config.h defines it.
23442
23443 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23444
23445 * src/reader.c: Update copyright date.
23446
23447 * src/main.c:
23448 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23449 favor of output directly to stderr (avoids buffer overruns).
23450
23451 * src/reader.c: Some checks for premature EOF.
23452
23453 * 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:
23454 Use prototypes if the compiler understands them.
23455
23456 * src/files.c: Honor TMPDIR on Unix hosts.
23457 Use prototypes if the compiler understands them.
23458
23459 * src/reader.c:
23460 Fix a couple of buffer overrun bugs.
23461 Use prototypes if the compiler understands them.
23462
23463 * src/system.h: Include unistd.h and ctype.h.
23464 Use #ifdef instead of #if for NLS symbols.
23465
23466 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23467
23468 * doc/bison.texinfo:
23469 Delete comment "consider using @set for edition number, etc..." since
23470 we now are doing so.
23471
23472 1998-12-30 Jesse Thilo <jthilo@gnu.org>
23473
23474 * configure.in:
23475 Use prototypes if the compiler understands them.
23476
23477 * NEWS: Document 1.26 highlights.
23478
23479 * Makefile.am: Require Automake 1.3 or later.
23480
23481 * acconfig.h:
23482 Use prototypes if the compiler understands them.
23483
23484 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23485
23486 * src/version.c:
23487 Use VERSION symbol from automake for version number.
23488
23489 1998-12-29 Jesse Thilo <jthilo@gnu.org>
23490
23491 * acconfig.h, configure.in, version.cin:
23492 Use VERSION symbol from automake for version number.
23493
23494 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23495
23496 * Makefile.am:
23497 Distribute original version of simple parser (bison.s1), not built
23498 version (bison.simple).
23499
23500 1998-11-28 Jesse Thilo <jthilo@gnu.org>
23501
23502 * doc/bison.texinfo: Add info dir entry.
23503
23504 * doc/bison.texinfo:
23505 Let automake put version number into documentation.
23506
23507 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23508
23509 * src/bison.cld, src/build.com, src/vmshlp.mar:
23510 Add non-RCS files from /gd/gnu/bison.
23511
23512 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23513
23514 * doc/bison.1:
23515 Document the BISON_HAIRY and BISON_SIMPLE variables.
23516
23517 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23518
23519 * src/version.c: Build version.c automatically.
23520
23521 * src/reader.c:
23522 Fix token numbering (used to start at 258, not 257).
23523
23524 * src/system.h: Include config.h.
23525
23526 * src/getargs.c: Update bug report address.
23527
23528 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23529 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23530
23531 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23532
23533 * Makefile.am:
23534 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23535
23536 * configure.in, version.cin:
23537 Build version.c automatically.
23538
23539 * AUTHORS: Add AUTHORS file.
23540
23541 * README: Update bug report address.
23542
23543 * bison.simple:
23544 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23545
23546 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23547 Add automake stuff.
23548
23549 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23550
23551 * doc/bison.texinfo: Clean up some formatting.
23552
23553 1998-05-05 Richard Stallman <rms@gnu.org>
23554
23555 * doc/bison.texinfo:
23556 Explain better why to make a pure parser.
23557
23558 1998-01-05 Richard Stallman <rms@gnu.org>
23559
23560 * src/files.c (openfiles):
23561 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23562 find a temporary directory, if possible. Do not unlink files while
23563 they are open.
23564
23565 1997-08-25 Richard Stallman <rms@gnu.org>
23566
23567 * src/reader.c (stack_offset;):
23568 Change some warni to warns.
23569
23570 * src/lex.c (literalchar): Use warns, not warni.
23571
23572 1997-06-28 Richard Stallman <rms@gnu.org>
23573
23574 * src/bison.s1: Add a Bison version comment.
23575
23576 * src/main.c (fatal, warn, berror):
23577 Use program_name.
23578
23579 1997-06-28 Richard Stallman <rms@gnu.org>
23580
23581 * Makefile.in (bison_version): New variable.
23582 (dist): Use that variable.
23583 (bison.s1): Substitute the Bison version into bison.simple.
23584
23585 * bison.simple: Add a Bison version comment.
23586
23587 1997-06-18 Richard Stallman <rms@gnu.org>
23588
23589 * src/main.c (fatal, warn, berror):
23590 Make error messages standard.
23591 (toomany): Improve error message text.
23592
23593 * 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:
23594 new.h renamed to alloc.h.
23595
23596 1997-06-18 Richard Stallman <rms@gnu.org>
23597
23598 * Makefile.in: new.h renamed to alloc.h.
23599
23600 1997-05-24 Richard Stallman <rms@gnu.org>
23601
23602 * src/lex.c (literalchar):
23603 Fix the code for escaping \, " and '.
23604
23605 (lex): Avoid trouble when there are many chars
23606 to discard in a char literal with just several chars in it.
23607
23608 1997-05-17 Richard Stallman <rms@gnu.org>
23609
23610 * src/bison.s1:
23611 Use malloc, if using alloca is troublesome.
23612 (YYSTACK_USE_ALLOCA): New flag macro.
23613 Define it for some systems and compilers.
23614 (YYSTACK_ALLOC): New macro.
23615 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23616 If it was malloc'd, free it.
23617
23618 1997-05-17 Richard Stallman <rms@gnu.org>
23619
23620 * bison.simple:
23621 Use malloc, if using alloca is troublesome.
23622 (YYSTACK_USE_ALLOCA): New flag macro.
23623 Define it for some systems and compilers.
23624 (YYSTACK_ALLOC): New macro.
23625 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23626 If it was malloc'd, free it.
23627
23628 1997-04-23 Richard Stallman <rms@gnu.org>
23629
23630 * src/bison.s1:
23631 (alloca) [__hpux]: Always define as __builtin_alloca.
23632
23633 1997-04-23 Richard Stallman <rms@gnu.org>
23634
23635 * bison.simple:
23636 (alloca) [__hpux]: Always define as __builtin_alloca.
23637
23638 1997-04-22 Richard Stallman <rms@gnu.org>
23639
23640 * src/bison.s1:
23641 [__hpux]: Include alloca.h (right for HPUX 10)
23642 instead of declaring alloca (right for HPUX 9).
23643
23644 * src/bison.s1 (__yy_memcpy):
23645 Declare arg `count' as unsigned int.
23646 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23647
23648 1997-04-22 Richard Stallman <rms@gnu.org>
23649
23650 * bison.simple:
23651 [__hpux]: Include alloca.h (right for HPUX 10)
23652 instead of declaring alloca (right for HPUX 9).
23653
23654 * bison.simple (__yy_memcpy):
23655 Declare arg `count' as unsigned int.
23656 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23657
23658 1997-01-03 Richard Stallman <rms@gnu.org>
23659
23660 * src/allocate.c: [__STDC__ or _MSC_VER]:
23661 Declare calloc and realloc to return void *.
23662
23663 1997-01-02 Richard Stallman <rms@gnu.org>
23664
23665 * src/system.h:
23666 [_MSC_VER]: Include stdlib.h and process.h.
23667 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23668
23669 * src/main.c (main): Return FAILURE as a value.
23670 (printable_version): Declare arg as int, not char.
23671
23672 1997-01-02 Richard Stallman <rms@gnu.org>
23673
23674 * Makefile.in (dist):
23675 Explicitly check for symlinks, and copy them.
23676
23677 1996-12-19 Richard Stallman <rms@gnu.org>
23678
23679 * src/files.c:
23680 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23681
23682 1996-12-18 Paul Eggert <eggert@gnu.org>
23683
23684 * src/bison.s1 (yyparse):
23685 If __GNUC__ and YYPARSE_PARAM are both defined,
23686 declare yyparse to have a void * argument.
23687
23688 1996-12-18 Paul Eggert <eggert@gnu.org>
23689
23690 * bison.simple (yyparse):
23691 If __GNUC__ and YYPARSE_PARAM are both defined,
23692 declare yyparse to have a void * argument.
23693
23694 1996-12-17 Richard Stallman <rms@gnu.org>
23695
23696 * src/reduce.c (nbits): Add some casts.
23697
23698 1996-08-12 Richard Stallman <rms@gnu.org>
23699
23700 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23701
23702 1996-08-12 Richard Stallman <rms@gnu.org>
23703
23704 * bison.simple: Test _MSDOS as well as _MSDOS_.
23705
23706 1996-07-31 Richard Stallman <rms@gnu.org>
23707
23708 * src/bison.s1:
23709 [__sun && __i386]: Include alloca.h.
23710
23711 1996-07-31 Richard Stallman <rms@gnu.org>
23712
23713 * bison.simple:
23714 [__sun && __i386]: Include alloca.h.
23715
23716 1996-07-30 Richard Stallman <rms@gnu.org>
23717
23718 * src/bison.s1: Comment change.
23719
23720 * src/bison.s1: Test _MSDOS_, not MSDOS.
23721
23722 1996-07-30 Richard Stallman <rms@gnu.org>
23723
23724 * bison.simple: Comment change.
23725
23726 * bison.simple: Test _MSDOS_, not MSDOS.
23727
23728 1996-06-01 Richard Stallman <rms@gnu.org>
23729
23730 * 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:
23731 Insert `_' macro around many string constants.
23732
23733 * src/main.c:
23734 Insert `_' macro around many string constants.
23735
23736 (main): Call setlocale, bindtextdomain and textdomain.
23737
23738 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23739 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23740 [ENABLE_NLS]: Include libintl.h.
23741 [ENABLE_NLS] (gettext): Define.
23742 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23743 (N_, PACKAGE, LOCALEDIR): New macros.
23744
23745 1996-06-01 Richard Stallman <rms@gnu.org>
23746
23747 * POTFILES.in: New file.
23748
23749 * Makefile.in (allocate.o):
23750 Define target explicitly.
23751
23752 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23753 (LDFLAGS): Set to @LDFLAGS@.
23754 (configure): Run autoconf only if preceding `cd' succeeds.
23755 (bison.s1): Redirect output to temporary file then move the
23756 temporary to the target, rather than redirecting directly to bison.s1.
23757 (clean): Remove config.status and config.log.
23758 (distclean): Don't remove config.status here.
23759
23760 1996-05-12 Richard Stallman <rms@gnu.org>
23761
23762 * src/bison.s1:
23763 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23764
23765 1996-05-12 Richard Stallman <rms@gnu.org>
23766
23767 * bison.simple:
23768 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23769
23770 1996-05-11 Richard Stallman <rms@gnu.org>
23771
23772 * src/bison.s1 (__yy_memcpy):
23773 Really reorder the args, as was supposedly done on Feb 14 1995.
23774 (yyparse): Calls changed accordingly.
23775
23776 1996-05-11 Richard Stallman <rms@gnu.org>
23777
23778 * Makefile.in (dist): Don't use $(srcdir).
23779
23780 * bison.simple (__yy_memcpy):
23781 Really reorder the args, as was supposedly done on Feb 14 1995.
23782 (yyparse): Calls changed accordingly.
23783
23784 1996-01-27 Richard Stallman <rms@gnu.org>
23785
23786 * src/output.c (output_rule_data):
23787 Test YYERROR_VERBOSE in the conditional
23788 around the definition of ttyname.
23789
23790 1995-12-29 Richard Stallman <rms@gnu.org>
23791
23792 * src/bison.s1:
23793 Fix line numbers in #line commands.
23794
23795 1995-12-29 Richard Stallman <rms@gnu.org>
23796
23797 * bison.simple:
23798 Fix line numbers in #line commands.
23799
23800 1995-12-27 Richard Stallman <rms@gnu.org>
23801
23802 * src/bison.s1 (YYPARSE_PARAM_DECL):
23803 In C++, make it always null.
23804 (YYPARSE_PARAM_ARG): New macro.
23805 (yyparse): Use YYPARSE_PARAM_ARG.
23806
23807 1995-12-27 Richard Stallman <rms@gnu.org>
23808
23809 * bison.simple (YYPARSE_PARAM_DECL):
23810 In C++, make it always null.
23811 (YYPARSE_PARAM_ARG): New macro.
23812 (yyparse): Use YYPARSE_PARAM_ARG.
23813
23814 1995-11-29 Richard Stallman <rms@gnu.org>
23815
23816 * doc/bison.texinfo:
23817 Describe literal string tokens, %raw, %no_lines, %token_table.
23818
23819 1995-11-29 Daniel Hagerty <hag@gnu.org>
23820
23821 * doc/bison.texinfo: Fixed update date
23822
23823 1995-10-16 Richard Stallman <rms@gnu.org>
23824
23825 * src/version.c: Version 1.25.
23826
23827 1995-10-16 Richard Stallman <rms@gnu.org>
23828
23829 * NEWS: *** empty log message ***
23830
23831 1995-10-16 Richard Stallman <rms@gnu.org>
23832
23833 * doc/bison.1, doc/bison.rnh:
23834 Add new options.
23835
23836 1995-10-15 Richard Stallman <rms@gnu.org>
23837
23838 * src/vmsgetargs.c, src/getargs.c:
23839 Added -n, -k, and -raw switches.
23840 (noparserflag, toknumflag, rawtoknumflag): New variables.
23841
23842 * src/symtab.h (SALIAS):
23843 New #define for adding aliases to %token.
23844 (struct bucket): Added `alias' field.
23845
23846 * src/reduce.c (reduce_grammar):
23847 Revise error message.
23848 (print_notices): Remove final `.' from error message.
23849
23850 * src/reader.c (reader_output_yylsp):
23851 New function.
23852 (readgram): Use `#if 0' around code that accepted %command
23853 inside grammar rules: The documentation doesn't allow it,
23854 and it will fail since the %command processors scan for the next %.
23855 (parse_token_decl): Extended the %token
23856 declaration to allow a multi-character symbol as an alias.
23857 (parse_thong_decl): New function.
23858 (read_declarations): Added %thong declarations.
23859 (read_declarations): Handle NOOP to deal with allowing
23860 % declarations as another means to specify the flags.
23861 (readgram): Allow %prec prior to semantics embedded in a rule.
23862 (skip_to_char, read_declarations, copy_definition)
23863 (parse_token_decl, parse_start_decl, parse_type_decl)
23864 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23865 (get_type_name, copy_guard, copy_action, readgram)
23866 (get_type, packsymbols): Revised most error messages.
23867 Changed `fatal' to `warnxxx' to avoid aborting for error.
23868 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23869 (read_declarations): Improve the error message for
23870 an invalid character. Do not abort.
23871 (read_declarations, copy_guard, copy_action): Use
23872 printable_version to avoid unprintable characters in printed output.
23873 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23874 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23875 Allow the type of a non-terminal can be given
23876 more than once, as long as all specifications give the same type.
23877
23878 * src/output.c:
23879 (output_headers, output_trailers, output, output_gram)
23880 (output_rule_data): Implement noparserflag variable.
23881 Implement toknumflag variable.
23882 (output): Call reader_output_yylsp to output LTYPESTR.
23883
23884 * src/main.c (main):
23885 If reader sees an error, don't process the grammar.
23886 (fatals): Updated to not use VARARGS1.
23887 (printable_version, int_to_string, warn, warni, warns, warnss)
23888 (warnsss): New error reporting functions. Avoid abort for error.
23889
23890 * src/lex.h:
23891 Added THONG and NOOP for alias processing.
23892 Added SETOPT for the new code that allows setting options with %flags.
23893
23894 * src/lex.c:
23895 Include getopt.h. Add some extern decls.
23896 (safegetc): New function to deal with EOF gracefully.
23897 (literalchar); new function to deal with reading \ escapes.
23898 (lex): Use literalchar.
23899 (lex): Implemented "..." tokens.
23900 (literalchar, lex, parse_percent_token): Made tokenbuffer
23901 always contain the token. This includes growing the token
23902 buffer while reading an integer.
23903 (parse_percent_token): Replaced if-else statement with percent_table.
23904 (parse_percent_token): Added % declarations as another
23905 way to specify the flags -n, -l, and -r. Also added hooks for
23906 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23907 major changes to files.c.
23908 (lex) Retain in the incoming stream a character following
23909 an incorrect '/'.
23910 (skip_white_space, lex): Revised most error messages
23911 and changed fatal to warn to avoid aborting.
23912 (percent_table): Added %thong declarations.
23913
23914 * src/gram.h: Comment changes.
23915
23916 * src/files.c (openfiles, open_extra_files, done):
23917 Add faction flag
23918 and actfile file. Handle noparserflag. Both for -n switch.
23919
23920 * src/conflicts.c (resolve_sr_conflict):
23921 Remove use of alloca.
23922
23923 1995-06-01 Jim Meyering <meyering@gnu.org>
23924
23925 * doc/bison.texinfo: *** empty log message ***
23926
23927 1995-05-06 Richard Stallman <rms@gnu.org>
23928
23929 * src/bison.s1: Comment change.
23930
23931 1995-05-06 Richard Stallman <rms@gnu.org>
23932
23933 * bison.simple: Comment change.
23934
23935 1995-05-03 Richard Stallman <rms@gnu.org>
23936
23937 * src/version.c: Version now 1.24.
23938
23939 * src/bison.s1: Change distribution terms.
23940
23941 * src/version.c: Version now 1.23.
23942
23943 1995-05-03 Richard Stallman <rms@gnu.org>
23944
23945 * doc/bison.texinfo:
23946 Rewrite "Conditions for Using Bison".
23947 Update version to 1.24.
23948
23949 1995-05-03 Richard Stallman <rms@gnu.org>
23950
23951 * bison.simple: Change distribution terms.
23952
23953 1995-02-23 Richard Stallman <rms@gnu.org>
23954
23955 * src/files.c: Test __VMS_POSIX as well as VMS.
23956
23957 1995-02-14 Jim Meyering <meyering@gnu.org>
23958
23959 * src/bison.s1 (__yy_memcpy):
23960 Renamed from __yy_bcopy to avoid
23961 confusion. Reverse FROM and TO arguments to be consistent with
23962 those of memcpy.
23963
23964 1995-02-14 Jim Meyering <meyering@gnu.org>
23965
23966 * bison.simple (__yy_memcpy):
23967 Renamed from __yy_bcopy to avoid
23968 confusion. Reverse FROM and TO arguments to be consistent with
23969 those of memcpy.
23970
23971 1994-11-10 David J. MacKenzie <djm@gnu.org>
23972
23973 * NEWS: reformat
23974
23975 * NEWS: New file.
23976
23977 * Makefile.in (DISTFILES): Include NEWS.
23978
23979 * Makefile.in (DISTFILES):
23980 Include install-sh, not install.sh.
23981
23982 * configure.in: Update to Autoconf v2 macro names.
23983
23984 1994-10-05 David J. MacKenzie <djm@gnu.org>
23985
23986 * Makefile.in: fix typo
23987
23988 * Makefile.in (prefix, exec_prefix):
23989 Let configure set them.
23990
23991 1994-09-28 David J. MacKenzie <djm@gnu.org>
23992
23993 * Makefile.in: Set datadir to $(prefix)/share.
23994
23995 1994-09-15 Richard Stallman <rms@gnu.org>
23996
23997 * src/bison.s1:
23998 Update copyright notice and GPL version.
23999
24000 1994-09-15 Richard Stallman <rms@gnu.org>
24001
24002 * bison.simple:
24003 Update copyright notice and GPL version.
24004
24005 1994-07-12 Richard Stallman <rms@gnu.org>
24006
24007 * src/reduce.c, src/reader.c:
24008 entered into RCS
24009
24010 1994-05-05 David J. MacKenzie <djm@gnu.org>
24011
24012 * Makefile.in: entered into RCS
24013
24014 1994-03-26 Richard Stallman <rms@gnu.org>
24015
24016 * src/bison.s1: entered into RCS
24017
24018 1994-03-26 Richard Stallman <rms@gnu.org>
24019
24020 * bison.simple: entered into RCS
24021
24022 1994-03-25 Richard Stallman <rms@gnu.org>
24023
24024 * src/main.c: entered into RCS
24025
24026 1994-03-24 Richard Stallman <rms@gnu.org>
24027
24028 * src/conflicts.c: entered into RCS
24029
24030 1994-01-02 Richard Stallman <rms@gnu.org>
24031
24032 * Makefile.in: *** empty log message ***
24033
24034 1993-11-21 Richard Stallman <rms@gnu.org>
24035
24036 * src/bison.s1: *** empty log message ***
24037
24038 1993-11-21 Richard Stallman <rms@gnu.org>
24039
24040 * doc/bison.texinfo: entered into RCS
24041
24042 * doc/bison.texinfo: *** empty log message ***
24043
24044 1993-11-21 Richard Stallman <rms@gnu.org>
24045
24046 * bison.simple: *** empty log message ***
24047
24048 1993-10-25 David J. MacKenzie <djm@gnu.org>
24049
24050 * doc/bison.texinfo: *** empty log message ***
24051
24052 1993-10-19 Richard Stallman <rms@gnu.org>
24053
24054 * src/bison.s1: *** empty log message ***
24055
24056 1993-10-19 Richard Stallman <rms@gnu.org>
24057
24058 * bison.simple: *** empty log message ***
24059
24060 1993-10-14 Richard Stallman <rms@gnu.org>
24061
24062 * src/bison.s1: *** empty log message ***
24063
24064 1993-10-14 Richard Stallman <rms@gnu.org>
24065
24066 * bison.simple: *** empty log message ***
24067
24068 1993-09-14 David J. MacKenzie <djm@gnu.org>
24069
24070 * doc/bison.texinfo: *** empty log message ***
24071
24072 1993-09-13 Noah Friedman <friedman@gnu.org>
24073
24074 * Makefile.in: *** empty log message ***
24075
24076 1993-09-10 Richard Stallman <rms@gnu.org>
24077
24078 * src/conflicts.c: *** empty log message ***
24079
24080 * src/system.h: entered into RCS
24081
24082 1993-09-10 Richard Stallman <rms@gnu.org>
24083
24084 * doc/bison.1: entered into RCS
24085
24086 1993-09-06 Noah Friedman <friedman@gnu.org>
24087
24088 * src/version.c: entered into RCS
24089
24090 1993-09-06 Noah Friedman <friedman@gnu.org>
24091
24092 * Makefile.in: *** empty log message ***
24093
24094 1993-07-30 David J. MacKenzie <djm@gnu.org>
24095
24096 * Makefile.in: *** empty log message ***
24097
24098 1993-07-24 Richard Stallman <rms@gnu.org>
24099
24100 * src/bison.s1: *** empty log message ***
24101
24102 1993-07-24 Richard Stallman <rms@gnu.org>
24103
24104 * bison.simple: *** empty log message ***
24105
24106 1993-07-08 David J. MacKenzie <djm@gnu.org>
24107
24108 * Makefile.in: *** empty log message ***
24109
24110 1993-07-04 Richard Stallman <rms@gnu.org>
24111
24112 * src/bison.s1: *** empty log message ***
24113
24114 1993-07-04 Richard Stallman <rms@gnu.org>
24115
24116 * bison.simple: *** empty log message ***
24117
24118 1993-06-26 David J. MacKenzie <djm@gnu.org>
24119
24120 * src/getargs.c: entered into RCS
24121
24122 1993-06-26 David J. MacKenzie <djm@gnu.org>
24123
24124 * doc/bison.texinfo: *** empty log message ***
24125
24126 * doc/bison.1: New file.
24127
24128 1993-06-25 Richard Stallman <rms@gnu.org>
24129
24130 * src/getargs.c: New file.
24131
24132 1993-06-16 Richard Stallman <rms@gnu.org>
24133
24134 * src/bison.s1: *** empty log message ***
24135
24136 1993-06-16 Richard Stallman <rms@gnu.org>
24137
24138 * bison.simple: *** empty log message ***
24139
24140 1993-06-03 Richard Stallman <rms@gnu.org>
24141
24142 * src/bison.s1: New file.
24143
24144 1993-06-03 Richard Stallman <rms@gnu.org>
24145
24146 * doc/bison.texinfo: *** empty log message ***
24147
24148 1993-06-03 Richard Stallman <rms@gnu.org>
24149
24150 * bison.simple: New file.
24151
24152 1993-05-19 Richard Stallman <rms@gnu.org>
24153
24154 * doc/bison.texinfo: New file.
24155
24156 1993-05-07 Noah Friedman <friedman@gnu.org>
24157
24158 * Makefile.in: *** empty log message ***
24159
24160 1993-04-28 Noah Friedman <friedman@gnu.org>
24161
24162 * src/reader.c: *** empty log message ***
24163
24164 1993-04-23 Noah Friedman <friedman@gnu.org>
24165
24166 * src/alloc.h: entered into RCS
24167
24168 1993-04-20 David J. MacKenzie <djm@gnu.org>
24169
24170 * src/version.c: *** empty log message ***
24171
24172 * src/files.c, src/allocate.c:
24173 entered into RCS
24174
24175 * src/reader.c: *** empty log message ***
24176
24177 * src/lex.c: entered into RCS
24178
24179 * src/conflicts.c: New file.
24180
24181 * src/symtab.c: entered into RCS
24182
24183 * src/alloc.h: New file.
24184
24185 * src/LR0.c: entered into RCS
24186
24187 1993-04-18 Noah Friedman <friedman@gnu.org>
24188
24189 * src/reader.c: New file.
24190
24191 * src/version.c: *** empty log message ***
24192
24193 1993-04-18 Noah Friedman <friedman@gnu.org>
24194
24195 * Makefile.in: *** empty log message ***
24196
24197 1993-04-17 Noah Friedman <friedman@gnu.org>
24198
24199 * Makefile.in: *** empty log message ***
24200
24201 1993-04-15 Richard Stallman <rms@gnu.org>
24202
24203 * src/main.c, src/files.c:
24204 New file.
24205
24206 1993-04-15 Noah Friedman <friedman@gnu.org>
24207
24208 * configure.in: entered into RCS
24209
24210 * configure.in: *** empty log message ***
24211
24212 * configure.in: New file.
24213
24214 1993-04-14 Richard Stallman <rms@gnu.org>
24215
24216 * Makefile.in: New file.
24217
24218 1993-04-13 Richard Stallman <rms@gnu.org>
24219
24220 * src/version.c: New file.
24221
24222 1993-03-25 Richard Stallman <rms@gnu.org>
24223
24224 * src/output.c: entered into RCS
24225
24226 1992-09-25 Richard Stallman <rms@gnu.org>
24227
24228 * configure.bat: entered into RCS
24229
24230 1992-06-22 Richard Stallman <rms@gnu.org>
24231
24232 * src/vmsgetargs.c: entered into RCS
24233
24234 1992-06-22 Richard Stallman <rms@gnu.org>
24235
24236 * doc/bison.rnh: entered into RCS
24237
24238 1992-04-20 David J. MacKenzie <djm@gnu.org>
24239
24240 * README: entered into RCS
24241
24242 1992-01-22 Richard Stallman <rms@gnu.org>
24243
24244 * src/machine.h: entered into RCS
24245
24246 1991-12-21 Richard Stallman <rms@gnu.org>
24247
24248 * src/lalr.c, src/closure.c:
24249 entered into RCS
24250
24251 1991-12-20 Richard Stallman <rms@gnu.org>
24252
24253 * src/state.h: entered into RCS
24254
24255 1991-12-18 Richard Stallman <rms@gnu.org>
24256
24257 * src/print.c, src/nullable.c, src/derives.c:
24258 entered into RCS
24259
24260 1991-11-03 David J. MacKenzie <djm@gnu.org>
24261
24262 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24263 entered into RCS
24264
24265 1988-09-09 Richard Stallman <rms@gnu.org>
24266
24267 * src/bison.hairy: entered into RCS
24268
24269 1987-12-16 Richard Stallman <rms@gnu.org>
24270
24271 * REFERENCES: entered into RCS
24272
24273
24274 -----
24275
24276 Copyright (C) 1987-1988, 1991-2012 Free Software Foundation,
24277 Inc.
24278
24279 Copying and distribution of this file, with or without
24280 modification, are permitted provided the copyright notice and this
24281 notice are preserved.