]> git.saurik.com Git - bison.git/blame - ChangeLog
build: avoid warnings about set-but-not-used variables
[bison.git] / ChangeLog
CommitLineData
89d4466b
JM
12012-01-06 Jim Meyering <meyering@redhat.com>
2
3 build: avoid warnings about set-but-not-used variables
4 * lib/bitset_stats.c (bitset_stats_list): Remove declaration
5 and set of unused local, "type".
6 * lib/ebitset.c (ebitset_init): Likewise, for "size".
7 * lib/lbitset.c (lbitset_not): Likewise, for "elt".
8
f3bd3f78
JD
92011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
10
11 lalr1.cc: remove trailing comma from enumerator list.
12 * data/lalr1.cc (yy::parser): Here. This suppresses a -pedantic
13 warning.
14
d63311df
JD
152011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
16
17 tests: add -pedantic for --enable-gcc-warnings.
18 This should help to avoid some portability problems. For example,
19 it would have revealed the empty unions fixed by the last patch
20 * configure.ac (WARN_CFLAGS_TESTS, WARN_CXXFLAGS_TEST): Implement.
21 * tests/synclines.at (AT_TEST_SYNCLINE): Avoid -pedantic warning
22 about an empty translation unit.
23
765e1bd4
JD
242011-08-21 Joel E. Denny <joeldenny@joeldenny.org>
25
26 tests: fix empty unions.
27 Empty unions are not accepted by the ISO C99 grammar or by at
28 least some versions of Sun Studio. Reported by Wolfgang S. Kechel
29 at
30 <http://lists.gnu.org/archive/html/bug-bison/2011-08/msg00003.html>.
31 * NEWS (2.5.1): Document fix.
32 * THANKS (Wolfgang S. Kechel): Add.
33 * tests/existing.at (GNU Cim Grammar)
34 (GNU pic (Groff 1.18.1) Grammar.): Remove empty %union.
35
e9690142
JD
362011-07-24 Joel E. Denny <joeldenny@joeldenny.org>
37
38 global: remove unnecessary horizontal tabs.
39 This change was made by applying emacs' untabify function to
40 nearly all files in Bison's repository. Required tabs in make
41 files, ChangeLog, regexps, and test code were manually skipped.
42 Other notable exceptions and changes are listed below.
43 * bootstrap: Skip because we sync this with gnulib.
44 * data/m4sugar/foreach.m4
45 * data/m4sugar/m4sugar.m4: Skip because we sync these with
46 Autoconf.
47 * djgpp: Skip because I don't know how to test djgpp properly, and
48 this code appears to be unmaintained anyway.
49 * README-hacking (Hacking): Specify that tabs should be avoided
50 where not required.
51
c12aa01f
JD
522011-07-10 Joel E. Denny <joeldenny@joeldenny.org>
53
54 build: avoid YACC typo inherited from Autoconf.
55 The typo shows up in the `configure --help' output. Reported by
56 W.C.A. Wijngaards and Paul Eggert at
57 <http://lists.gnu.org/archive/html/bug-bison/2011-07/msg00000.html>.
58 * README-hacking (Release Procedure): Remind about updating
59 maintainer tools before a release.
60 * THANKS (W.C.A. Wijngaards): Add.
61 * configure.ac (AC_PREREQ): Set to 2.68, which fixes the YACC
62 typo.
63
b55b6860
JD
642011-07-10 Joel E. Denny <joeldenny@joeldenny.org>
65
66 build: create xz instead of bzip2 tarballs.
67 Suggested by Jim Meyering at
68 <http://lists.gnu.org/archive/html/bug-bison/2011-06/msg00012.html>.
69 * README-hacking (Release Procedure): Update example.
70 * configure.ac (AM_INIT_AUTOMAKE): Replace dist-bzip2 with
71 dist-xz.
72
1769eb30
JD
732011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
74
75 doc: clean up references to `Locations Overview'.
76 * doc/bison.texinfo (Locations Overview): Rename node to...
77 (Locations): ... this, which is its section name. Update menus to
78 match that and not to use the title `Tracking Locations', which is
79 a different section.
80
303834cc
JD
812011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
82
83 doc: clean up references to `Tracking Locations'.
84 * doc/bison.texinfo (Locations): Rename node to...
85 (Tracking Locations): ... this, which is its section name, and
86 update all cross references. The trouble is that there is another
87 node about locations. Its section name is `Locations', which was
88 easily confused with the node name of this node. Moreover, its
89 node name is `Locations Overview', which was mistakenly used to
90 label some cross references to this node.
91
a7b15ab9
JD
922011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
93
94 doc: clean up `Named References' a little.
95 * doc/bison.texinfo (Named References): Rename section to match
96 the node name, and update all cross references. Don't use the
97 acronyms RHS and LHS given that we don't expand them anywhere in
98 the manual. Try to use @samp and @code properly. Mention that
99 named references are experimental as we've already stated in NEWS.
100 (Destructor Decl): Expand the only remaining use of RHS or LHS.
101
a40e77eb
JD
1022011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
103
104 doc: motivate named references.
105 Suggested by Hans Aberg at
106 <http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
107 * doc/bison.texinfo (Named References): Explain briefly how
108 they're better than the traditional positional references.
109
378e917c
JD
1102011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
111
112 doc: discuss named references after locations.
113 Reported by Hans Aberg at
114 <http://lists.gnu.org/archive/html/bug-bison/2011-05/msg00008.html>.
115 * NEWS (2.5.1): Document.
116 * doc/bison.texinfo (Named References): Because it discusses
117 locations in addition to semantic values, move this subsection out
118 of the section `Defining Language Semantics', where locations have
119 not yet been introduced, to be a new section after the following
120 section, `Tracking Locations'.
121
df6e3db0
JD
1222011-05-29 Joel E. Denny <joeldenny@joeldenny.org>
123
124 Prepare for the possibility of a 2.5.1 release.
125 * NEWS (2.5.1): New heading.
126
28801043
JD
1272011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
128
129 Version 2.5.
130 * NEWS (2.5): Set date.
131
84f6a6ca
JD
1322011-05-14 Joel E. Denny <joeldenny@joeldenny.org>
133
134 Don't use IF_LINT in Bison sources.
135 It creates unnecessary differences between the sources that Bison
136 maintainers build and test (given that maintainers normally
137 configure with --enable-gcc-warnings) and the sources that Bison
138 users build. Instead, use PACIFY_CC, which doesn't. This change
139 fixes compiler warnings reported by Tys Lefering at
140 <http://lists.gnu.org/archive/html/bison-patches/2011-05/msg00004.html>.
141 * configure.ac: Don't AC_DEFINE lint regardless of the configure
142 options. This change affects imported gnulib sources, where
143 IF_LINT still appears and depends on lint.
144 * src/scan-gram.l, src/scan-skel.l: Replace uses of IF_LINT with
145 PACIFY_CC.
146 * src/system.h (IF_LINT): Remove cpp macro.
147 (PACIFY_CC): New cpp macro.
148
1f36f544
JD
1492011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
150
151 Fix precedence for end token.
152 Since Bison 2.3b, which restored the ability of precedence
153 directives to assign user token numbers, doing so for user token
154 number 0 has produced an assertion failure.
155 * NEWS (2.5): Document fix.
156 * src/symtab.c (symbol_user_token_number_set): In the case of the
157 end token, don't decrement ntokens if it was never incremented.
158 * tests/regression.at (Token number in precedence declaration):
159 Extend.
160
ba60c395
JD
1612011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
162
163 Pacify -DGNULIB_POSIXCHECK.
164 * bootstrap.conf (gnulib_modules): Add all modules suggested by
165 -DGNULIB_POSIXCHECK.
166 * src/files.c (file_name_split)
167 * src/getargs.c (getargs)
168 * src/location.c (boundary_set_from_string)
169 * src/output.c (output_skeleton)
170 * src/parse-gram.y (prologue_declaration)
171 * src/scan-gram.l (handle_syncline)
172 * src/symtab.c (symbol_new): Use mbschr and mbsrchr instead of
173 strchr and strrchr. In the cases of command-line options, file
174 names, and thus locations, functionality may be improved. In the
175 case of symbol names, there should be no functional difference as
176 all characters are ASCII, so the intended benefit is just warning
177 suppression.
178
7262f54f
JD
1792011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
180
181 * NEWS (2.5): Fix minor typos.
182
4b568fc0
JD
1832011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
184
185 doc: clean up quotation style in NEWS.
186 * NEWS (2.5): For multi-character tokens in example grammar rules,
187 use "token" not 'token'. In English, use a consistent quotation
188 style; we might as well follow the precedent seen in info pages:
189 `quote' not "quote".
190
9fc4c025
JD
1912011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
192
193 tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
194 Reported by Jim Meyering at
195 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
196 * tests/actions.at
197 (Default %printer and %destructor for mid-rule values): Define
198 YYLLOC_DEFAULT so that it uses its Rhs argument.
199
67b8cfbd
JD
2002011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
201
202 glr.c: omit yyresolveLocations when locations are disabled.
203 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
204 about yyresolveLocations's local yyrhsloc. When locations are
205 enabled, there's no such warning because YYLLOC_DEFAULT then uses
206 yyrhsloc. Reported by Jim Meyering at
207 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
208 * data/glr.c (yyresolveLocations): Omit definition when locations
209 are disabled.
210 (yyresolveValue): Omit yyresolveLocations invocation when
211 locations are disabled.
212
a801089c
JD
2132011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
214
215 gnulib, autoconf: update.
216 * README-hacking (Updating a submodule): Give advice on how to
217 determine the versions of gnulib and autoconf to which we should
218 update.
219 (Release Procedure): Note that submodules should be updated.
220 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
221 suggested in updated gnulib NEWS.
222 * gnulib: Choose a stable snapshot according to advice in Bison's
223 README-hacking.
224 * po/POTFILES.in (lib/pipe.c): Rename to...
225 (lib/spawn-pipe.c): ... this.
226 * src/output.c: Update to include spawn-pipe.h.
227 * submodules/autoconf: Update to latest for improvement in m4.m4
228 that excludes M4 with buggy strstr. The only other changes to
229 files that we use are copyright updates.
230
2f658d53
JD
2312011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
232
233 Fix missing updates to GPLv3.
234 Reported by Tys Lefering at
235 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
236 * src/print-xml.c, src/print-xml.h: In these files.
237
786743d5
JD
2382011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
239
240 Add -Wconflicts-sr and -Wconflicts-rr.
241 Thus, conflict reports are now affected by -Werror and -Wnone
242 (unless %expect or %expect-rr is specified). Reported by George
243 Neuner at
244 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
245 * NEWS (2.5): Document.
246 * doc/bison.texinfo (Bison Options): Document.
247 * src/complain.c, src/complain.h (set_warning_issued): Export
248 function.
249 * src/conflicts.c (conflicts_print): Suppress conflict report
250 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
251 conflicts as errors if -Werror.
252 * src/getargs.c (warnings_flag): Initialize with
253 warnings_conflicts_sr and warnings_conflicts_rr as well.
254 (warnings_args, warnings_types): Add entries for
255 warnings_conflicts_sr and warnings_conflicts_rr.
256 (usage): Update.
257 * src/getargs.h (enum warnings): Add entries for
258 warnings_conflicts_sr and warnings_conflicts_rr.
259 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
260 group.
261 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
262 conflict report can produce a "warnings being treated as errors"
263 message. Also, check that stderr is now fully scrubbed by -Wnone
264 when the exit status is 0.
265
e4a14879
JD
2662011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
267
268 Pacify maintainer-check-posix.
269 Adding command-line options after the grammar file name is not
270 permitted, so disable checks that do that when
271 maintainer-check-posix is running.
272 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
273 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
274 remove an unnecessary m4_if.
275
c39014ae
JD
2762011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
277
278 Add -Wother so -Wnone suppresses all warnings.
279 Reported by George Neuner at
280 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
281 * NEWS (2.5): Document.
282 * THANKS (George Neuner): Add.
283 * doc/bison.texinfo (Bison Options): Document.
284 * src/complain.c, src/complain.h
285 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
286 (midrule_value_at): New warning function, similar to yacc_at in
287 that it's controlled by its own warning category.
288 * src/getargs.c (warnings_flag): Initialize to warnings_other.
289 (warnings_args, warnings_types): Add entry for warnings_other.
290 (usage): Update.
291 * src/getargs.h (enum warnings): Add entry for warnings_other.
292 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
293 don't print useless rules.
294 * src/reader.c (symbol_should_be_used): Rather than adjusting the
295 return value based on whether midrule value warnings are enabled,
296 accept a new parameter for telling the caller whether true is
297 being returned for a potential midrule warning.
298 (grammar_rule_check): Use midrule_value_at for midrule value
299 warnings, and continue to use warn_at for all other warnings. Let
300 them check whether the warnings are enabled.
301 * tests/local.at (AT_BISON_CHECK): Update documentation.
302 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
303 disable all warnings exercised in the test suite.
304
bf0e44e8
JD
3052011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
306
307 Don't let -Wnone disable -Werror.
308 Discussed at
309 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
310 * NEWS (2.5): Document.
311 * src/getargs.c (flags_argmatch): Accept a new argument that
312 specifies what flags "all" and thus "none" affect.
313 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
314 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
315 New test group.
316
86408959
JD
3172011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
318
319 * NEWS (2.5): Document fix for -Wno-CATEGORY.
320
709c7d11
JD
3212011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
322
323 doc: fix confusing citation of LAC publication.
324 Suggested by Akim Demaille.
325 * doc/bison.texinfo (LAC): Here.
326
f0ad1b2f
JD
3272011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
328
329 lr.default-reductions: rename "full" value to "most".
330 Unlike "consistent" and "accepting", "full" doesn't answer the
331 question of "which states".
332 * doc/bison.texinfo (%define Summary): Update.
333 (Default Reductions): Update.
334 * src/print.c (print_reductions): Update.
335 * src/reader.c (prepare_percent_define_front_end_variables):
336 Update.
337 * src/tables.c (action_row): Update.
338 * tests/input.at (%define enum variables): Update.
339 * tests/reduce.at (%define lr.default-reductions): Update.
340
f9d52903
JD
3412011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
342
343 * src/parse-gram.c, src/parse-gram.h: Regenerate.
344
a4d1bf6a
AD
3452011-03-09 Akim Demaille <akim@lrde.epita.fr>
346
347 named references: fix double free.
348 In `rhs[name]: "a" | "b"', do not free "name" twice.
349 Reported by Tys Lefering.
350 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
351 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
352 * src/parse-gram.y (current_lhs): Rename as...
353 (current_lhs_symbol): this.
354 (current_lhs): New function. Use it to free the current lhs
355 named reference.
356 * src/reader.c: Bind lhs to a copy of the current named reference.
357 * src/symlist.c: Rely on free (0) being valid.
358 * tests/named-refs.at: Test this.
359
17d7bf83
AD
3602011-03-09 Akim Demaille <akim@lrde.epita.fr>
361
362 tests: style changes.
363 * tests/named-refs.at (Redundant words in LHS brackets)
364 (Unresolved references): here.
365
02803d55
JD
3662011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
367
368 java: fix parser tracing bug.
369 * NEWS (2.5): Document.
370 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
371 element.
372
1a33f4f6
JD
3732011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
374
375 java: finish fixing parser stack popping bug.
376 * NEWS (2.5): Document.
377 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
378 in clearing the location stack. Also fix pop function that
379 accepts no arguments.
380
3f8ffd15
AB
3812011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
382
383 java: fix parser stack popping bug.
384 Reported at
385 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
386 * THANKS (Angelo Borsotti): Add.
387 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
388 in clearing the value stack. Previously, the top element of the
389 stack wasn't cleared and so the value was not garbage collected.
390
15e46f2d
JD
3912011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
392
393 doc: cite publication for LAC.
394 * doc/bison.texinfo (LAC): Here.
395
cc09e5be
JD
3962011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
397
398 doc: clean up terminology for mysterious conflicts.
399 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
400 (Mysterious Conflicts): ... this, which is already the section
401 title and the name used in the index. Update all cross-references
402 to this node. Also, don't imply that R/R conflicts are the only
403 kind of mysterious conflict.
404
32493bc8
JD
4052011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
406
407 lr.default-reductions: rename "all" value to "full".
408 States that shift the error token do not have default reductions,
409 and GLR disables some default reductions, so "all" was a misnomer.
410 * doc/bison.texinfo (%define Summary): Update.
411 (Default Reductions): Update.
412 * src/print.c (print_reductions): Update.
413 * src/reader.c (prepare_percent_define_front_end_variables):
414 Update.
415 * src/tables.c (action_row): Update.
416 * tests/input.at (%define enum variables): Update.
417 * tests/reduce.at (%define lr.default-reductions): Update.
418
7fceb615
JD
4192011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
420
421 doc: create a new Tuning LR section in the manual.
422 And clean up all other documentation of the features described
423 there.
424 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
425 bit, update the cross-references to the manual, and point out that
426 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
427 That is, as the referenced section in the manual documents, LAC
428 does not fix infinite parsing loops on syntax errors.
429 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
430 IELR, and LR in @cindex.
431 (%define Summary): Condense the entries for lr.default-reductions,
432 lr.keep-unreachable-states, lr.type, and parse.lac into brief
433 summaries, and cross-reference the appropriate subsections of
434 Tuning LR. For parse.lac, mention that it's only implemented for
435 deterministic parsers in C. In parse.error entry, mention LAC,
436 and add cross-reference to the LAC section.
437 (Error Reporting): When mentioning parse.error, mention LAC, and
438 add cross-reference to the LAC section.
439 (Tuning LR): New section with an extended version of the
440 documentation removed from %define Summary. Change all
441 cross-references in the manual to point here instead of there.
442 (Calc++ Parser): When mentioning parse.error, mention LAC, and add
443 cross-reference to the LAC section.
444 (Table of Symbols): In %error-verbose entry, add cross-reference
445 to Error Reporting.
446 (Glossary): Capitalize entry titles consistently. Add definitions
447 for "defaulted state" and "unreachable state". Expand IELR
448 acronym in IELR's entry.
449
5e528941
JD
4502011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
451
452 doc: add bibliography to manual.
453 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
454 bibliography instead of citing publications directly.
455 (Generalized LR Parsing): Likewise.
456 (Bibliography): New section. Not all entries are cross-referenced
457 yet, but that will come in future patches.
458
6771a463
JD
4592011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
460
461 java: test and document previous bug fix.
462 * NEWS (2.5): Document it.
463 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
464 invocations, pass a location that spans multiple tokens. Change
465 yyerror to report all of a location rather than just the begin
466 position. Extend yylex and Position to count tokens on a line.
467 Remove getHashCode as it's unused. Update all expected output.
468
aa3bcdf3
BK
4692011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
470
471 java: fix location handling bug.
472 Reported at
473 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
474 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
475 reversed access to location stack.
476 * THANKS (Bernd Kiefer): Add.
477
84072495
JD
4782011-02-13 Joel E. Denny <joeldenny@joeldenny.org>
479
480 doc: fix some minor inconsistencies.
481 * doc/bison.texinfo (%define Summary): Fix mislabeled entry for
482 lex_symbol.
483 (%code Summary): For consistency with the variable list in the
484 %define Summary, enclose the list of %code qualifiers in a table
485 instead of an itemize.
486
51151d91
JD
4872011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
488
489 doc: clean up new subsections in manual.
490 * doc/bison.texinfo (%define Summary): Reword so it reads well as
491 a separate section. For example, add an intro, and move most of
492 the text outside of the @deffn so it is not indented so far.
493 (%code Summary): Likewise.
494 (Table of Symbols): Reword %code entry to match the %code entry in
495 Decl Summary.
496
35c1e5f0
JD
4972011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
498
499 doc: finish splitting apart the manual's Decl Summary section.
500 Suggested by Akim Demaille at
501 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
502 * doc/bison.texinfo (Decl Summary): Extract most of the %define
503 entry into...
504 (%define Summary): ... this new subsection, and update all
505 cross-references. For readability of the patches, rewriting of
506 the text so it makes sense as a separate subsection will come in a
507 later patch. Moreover, the majority of the text describing the
508 various new LR features should likely move to another new section
509 somewhere.
510
e0c07222
JD
5112011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
512
513 doc: begin to split apart the manual's Decl Summary section.
514 Discussed in thread starting at
515 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
516 * doc/bison.texinfo (Decl Summary): Extract most of the %code
517 entry into...
518 (%code Summary): ... this new subsection, and update all
519 cross-references. For readability of the patches, rewriting of
520 the text so it makes sense as a separate subsection will come in a
521 later patch.
522
ff7571c0
JD
5232011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
524
525 doc: clean up naming of various Bison files.
526 The Bison manual's names for various files associated with a Bison
527 parser has devolved into inconsistency. This patch makes the
528 naming consistent for the most important files. First, it chooses
529 "grammar file" over "input file". The former appears to be more
530 traditional in the Bison manual, and Bison has other input
531 files (skeletons). Second, it chooses "parser implementation
532 file" over names like "parser file", "parser source file", "parser
533 source code file", and "parser output file". The new name makes
534 it clearer where Bison generates the main parser implementation,
535 and it is easily distinguishable from "parser header file".
536 * doc/bison.texinfo: Implement throughout.
537
679e9935
JD
5382011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
539
540 doc: give credit to more of Bison's developers.
541 * doc/bison.texinfo (Introduction): Don't imply that only Robert
542 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
543 Bison. However, I don't have time to write a full history, so
544 just point readers to THANKS and ChangeLog.
545
af28d414
JD
5462011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
547
548 doc: document experimental features better.
549 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
550 LR(1) are experimental. Mention Java. Normally experimental
551 features probably shouldn't be mentioned in the introduction.
552 However, if Bison's limitations to LALR(1), C, and C++ are so
553 important that they should be mentioned here, then it's important
554 to point out that Bison is beginning to escape those limitations.
555 Moreover, these particular experimental features have very little
556 chance of being removed.
557 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
558 experimental.
559
82f3355e
JD
5602011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
561
562 Do not allow identifiers that start with a dash.
563 This cleans up our previous fixes for a bug whereby Bison
564 discarded `.field' in `$-1.field'. The previous fixes were less
565 restrictive about where a dash could appear in an identifier, but
566 the restrictions were hard to explain. That bug was reported and
567 this final fix was originally suggested by Paul Hilfinger. This
568 also fixes a remaining bug reported by Paul Eggert whereby Bison
569 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
570 identifier. Now, `-' cannot be an identifier. Discussed in
571 threads beginning at
572 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
573 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
574 * NEWS (2.5): Update entry describing the dash extension to
575 grammar symbol names. Also, move that entry before the named
576 references entry because the latter mentions the former.
577 * doc/bison.texinfo (Symbol): Update documentation for symbol
578 names. As suggested by Paul Eggert, mention the effect of periods
579 and dashes on named references.
580 (Decl Summary): Update documentation for unquoted %define values,
581 which, as a side effect, can no longer start with dashes either.
582 * src/scan-code.l (id): Implement.
583 * src/scan-gram.l (id): Implement.
584 * tests/actions.at (Exotic Dollars): Extend test group to exercise
585 bug reported by Paul Hilfinger.
586 * tests/input.at (Symbols): Update test group, and extend to
587 exercise bug reported by Paul Eggert.
588 * tests/named-refs.at (Stray symbols in brackets): Update test
589 group.
590 ($ or @ followed by . or -): Likewise.
591 * tests/regression.at (Invalid inputs): Likewise.
592
fe3cae17
JD
5932011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
594
595 * data/yacc.c: Fix last apostrophe warning from xgettext.
596
3c9b20ff
PE
5972011-01-09 Paul Eggert <eggert@cs.ucla.edu>
598
599 Fix minor problems encountered by a fresh bootstrap.
600 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
601 as they confuse xgettext, which tries to parse them as C character
602 constants in a preprocessor directive.
603 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
604 that expression might not promote to int on some platforms.
605 * src/parse-gram.c, src/parse-gram.h: Regenerate.
606
5c9efc75
JD
6072011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
608
609 Improve error messages for `$' or `@' followed by `.' or `-'.
610 Previously, for this special case of an invalid reference, the
611 usual "symbol not found in production:" was printed. However,
612 because the symbol name was parsed as the empty string, that
613 message was followed immediately by a newline instead of a symbol
614 name. In reality, this is a syntax error, so the reference is
615 invalid regardless of the symbols actually appearing in the
616 production. Discussed at
617 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
618 * src/scan-code.l (parse_ref): Report the above case as a syntax
619 error. Other than that, continue to handle this case like any
620 other invalid reference that Bison manages to parse because
621 "possibly meant" messages can still be helpful to the user.
622 * tests/named-refs.at ($ or @ followed by . or -): New test group.
623
8a4281b9
JD
6242011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
625
626 doc: don't use @acronym.
627 Lately, many GNU packages are dropping it. See
628 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
629 * doc/bison.texinfo: Remove all uses.
630
e0319547
AR
6312011-01-05 Alex Rozenman <rozenman@gmail.com>
632
633 Do not allow identifiers that start with a negative number.
634 Reported by Paul Hilfinger as a side effect of named references
635 support at
636 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
637 Suggested by Paul Eggert.
638 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
639 * src/scan-gram.l ({letter}, {id}): Likewise.
640
15fe6bb4
JD
6412011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
642
643 * ChangeLog (2011-01-02): improve description.
644
355bdbdc
JD
6452011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
646
647 maint: don't update copyright years in bootstrap.
648 * .x-update-copyright: Add entry for bootstrap.
649 * bootstrap: Remove 2011 from copyright years. The bootstrap
650 version we're currently using comes from an older version of
651 gnulib.
652 * bootstrap.conf (bootstrap_sync): Add comments explaining this
653 issue.
654
575619af
JD
6552011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
656
657 maint: run "make update-copyright".
658
cb3f7f33
JD
6592011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
660
15fe6bb4 661 maint: prepare to use year ranges in copyright notices.
cb3f7f33 662 * README (Copyright statements): New section explaining the range
15fe6bb4
JD
663 notation. The GNU maintainers document requires this explanation:
664 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
665 I copied our explanation from coreutils.
cb3f7f33
JD
666 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
667 disabled Bison's automated use of ranges.
668 * cfg.mk (update-copyright-env): Likewise.
669
1eb63504
JD
6702011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
671
672 Correct my email address.
673 * ChangeLog: In all recent entries.
674 * THANKS (Joel E. Denny): Here.
675
6762010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
d397d9f0
JD
677
678 doc: cleanup.
679 * NEWS (2.5): Try to sort entries according to how interesting
680 users might find them.
681
1eb63504 6822010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
f1b238df
JD
683
684 doc: cleanup.
685 * NEWS (2.5): Make some minor improvements to wording, and format
686 entries more consistently.
687 * doc/bison.texinfo (Language and Grammar): Point out that IELR
688 and canonical LR are experimental features.
689 (Decl Summary): In list of %define variables, make wording more
690 consistent. Improve discussion of using LALR for GLR.
691
1eb63504 6922010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
fcf834f9
JD
693
694 parse.lac: document.
695 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
696 other corrections to verbose syntax error messages.
697 * doc/bison.texinfo (Decl Summary): Rewrite entries for
698 lr.default-reductions and lr.type to be clearer, to mention
699 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
700 for parse.lac.
701 (Glossary): Add entry for LAC.
702
1eb63504 7032010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
107844a3
JD
704
705 parse.lac: implement exploratory stack reallocations.
706 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
707 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
708 with values of "failures" (default) or "full".
709 (b4_declare_parser_state_variables): Add yyesa, yyes, and
710 yyes_capacity variables.
711 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
712 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
713 LAC requested.
714 (YYCOPY_NEEDED): New cpp macro.
715 (YYCOPY): Define if LAC requested.
716 (yy_lac_stack_realloc): New function implementing stack
717 reallocations. Use YYMAXDEPTH for maximum stack size given that
718 the stack should never need to grow larger than the main state
719 stack needs to grow without LAC.
720 (YY_LAC_ESTABLISH): Update yy_lac invocation.
721 (yy_lac): Add arguments for exploratory stack memory data
722 recorded in the main parser. Invoke yy_lac_stack_realloc when
723 reallocation is necessary.
724 (yysyntax_error): Add the same new arguments and pass them to
725 yy_lac.
726 (yypstate_delete): Free yyes if necessary.
727 (yyesa, yyes, yyes_capacity): #define these to yypstate members
728 in the case of push parsing.
729 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
730 Update yysyntax_error invocations. At yyreturn, free yyes if
731 necessary.
732 * src/parse-gram.y: %define parse.lac full.
733 * tests/input.at (LAC: errors for %define): Extend for
734 parse.lac-memory-trace.
735 * tests/regression.at (LAC: Exploratory stack): Extend to check
736 that stack reallocs happen when expected.
737 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
738 parse.lac.es-capacity-initial.
739
1eb63504 7402010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
bf35c71c
JD
741
742 parse.lac: implement as %define variable.
743 LAC = lookahead correction. See discussion at
744 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
745 However, one point there must be corrected: because of %nonassoc,
746 LAC is *not* always redundant for lr.type=canonical-lr.
747 * data/yacc.c: Accept values of "none" (default) or "full" for
748 parse.lac. Accept %define parse.lac.es-capacity to specify
749 capacity of LAC's temporary exploratory stack. It defaults to 20
750 and, for now, will not grow dynamically.
751 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
752 parse.lac!=none.
753 (YYBACKUP): Invoke YY_LAC_DISCARD.
754 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
755 yy_lac and track when it needs to be invoked
756 (yy_lac): New function that, given the current stack, determines
757 whether a token can eventually be shifted. Return status mimics
758 yyparse return status.
759 (yysyntax_error): Change yystate argument to yyssp so stack top
760 can be passed to yy_lac. If LAC is requested, build expected
761 token list by invoking yy_lac for every token instead of just
762 checking the current state for lookaheads. Return 2 if yy_lac
763 exhausts memory.
764 (yyparse, yypush_parse): Use local variable yy_lac_established and
765 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
766 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
767 is requested.
768 * tests/conflicts.at (%nonassoc and eof): Extend to check the
769 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
770 (parse.error=verbose and consistent errors): Likewise.
771 (LAC: %nonassoc requires splitting canonical LR states): New test
772 group demonstrating how LAC can fix canonical LR.
773 * tests/input.at (LAC: Errors for %define): New test group.
774 * tests/regression.at (LAC: Exploratory stack): New test group.
775 (LAC: Memory exhaustion): New test group.
776
1eb63504 7772010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
10bae98a
JD
778
779 build: use gnulib's new bootstrap_sync option.
780 Now, whenever we update bison's copy of gnulib, bootstrap will
781 update itself the next time it's run.
782 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
783 * bootstrap.conf (bootstrap_sync): Set to true.
784 * gnulib: Update to latest so bootstrap is in sync now.
785
1eb63504 7862010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
d2060f06
JD
787
788 yysyntax_error: fix for consistent error with lookahead.
789 * NEWS (2.5): Document.
790 * data/yacc.c (yysyntax_error): In a verbose syntax error
791 message while in a consistent state with a default action (which
792 must be an error action given that yysyntax_error is being
793 invoked), continue to drop the expected token list, but don't
794 drop the unexpected token unless there actually is no lookahead.
795 Moreover, handle that internally instead of returning 1 to tell
796 the caller to do it. With that meaning of 1 gone, renumber
797 return codes more usefully.
798 (yyparse, yypush_parse): Update yysyntax_error usage. Most
799 importantly, set yytoken to YYEMPTY when there's no lookahead.
800 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
801 unexpected token unless there actually is no lookahead.
802 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
803 pass yyempty_ not yyla.type to yysyntax_error_.
804 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
805 token unless there actually is no lookahead.
806 * data/lalr1.java (YYParser::parse): If there's no lookahead,
807 set yytoken to yyempty_ before invoking yysyntax_error.
808 (YYParser::yysyntax_error): Again, don't drop the unexpected
809 token unless there actually is no lookahead.
810 * tests/conflicts.at (parse.error=verbose and consistent
811 errors): Extend test group to further reveal how the previous
812 use of the simple "syntax error" message was too general. Test
813 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
814 failure.
815 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
816 to...
817 * tests/local.at: ... here.
818 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
819 (AT_BISON_OPTION_POPDEFS): Pop it.
820 (AT_FULL_COMPILE): Extend to handle Java.
821
1eb63504 8222010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
25a648d8
JD
823
824 yysyntax_error: more preparation for readability of next patch.
825 There are no behavioral changes here.
826 * data/glr.c (yyreportSyntaxError): Reorganize.
827 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
828 * tests/conflicts.at (parse.error=verbose and consistent errors):
829 Reorganize.
830
1eb63504 8312010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
b4bbc4a0
JD
832
833 yysyntax_error: prepare for readability of next patches.
834 These are purely whitespace changes that result in ugly code
835 but that make the next couple of patches much easier to read.
836 * data/glr.c (yyreportSyntaxError): Reindent.
837 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
838 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
839 * data/yacc.c (yysyntax_error): Reindent.
840
71431084
JD
8412010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
842
843 Fix memory leak.
844 * src/output.c (prepare_rules): Free temporary array.
845
34db451c
JD
8462010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
847
848 yysyntax_error: improve invocation readability.
849 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
850 invocation, get rid of the while loop, which is misleading
851 because there are really at most two iterations.
852
9d6bc5c4
JD
8532010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
854
855 * ChangeLog: Correct some errors in previous entries.
856
e503b9cb
JD
8572010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
858
859 maint: re-anchor all .gitignore entries.
860 * bootstrap: Copy from gnulib's latest for the fix to
861 automatically anchor entries it constructs.
862 * gnulib: Update to latest just so it has the same bootstrap.
863 * .gitignore, build-aux/.gitignore, doc/.gitignore:
864 * lib/.gitignore, m4/.gitignore, po/.gitignore:
865 * runtime-po/.gitignore: Re-anchor all entries.
866
95aed8db
PE
8672010-10-08 Paul Eggert <eggert@cs.ucla.edu>
868
8ff146cd
PE
869 Fix portability problem on OpenBSD 4.7.
870
871 Jim Meyering reported this in
872 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
873 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
874 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
875 for quite some time.
876 * src/parse-gram.c, src/parse-gram.h: Regenerate.
877 * tests/regression.at: Tamper with the renamed witness.
878
95aed8db
PE
879 Adjust to recent changes to gnulib bootstrap.
880
881 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
882 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
883 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
884 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
885 anymore and don't know of anybody else who does. If someone needs
886 these files, they can resurrect them.
887 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
888 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
889 Omit leading '/', since bootstrap omits it.
890 Adjust file names to match current contents better.
891 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
892 installed just for us.
893 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
894 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
895 needed somehow. Don't have time to look into why.
896 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
897 the GNU malloc behavior, where malloc (0) != NULL unless we're
898 out of storage? If not, we can omit malloc-gnu; but for now I left
899 it in to be safe.
900 (vc_ignore): Remove.
901 (gnulib_mk_hook): New function.
902 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
903 uses that convention.
904
39f5757a
PH
9052010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
906
907 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
908 possible change of value.
909
d467f443
PH
9102010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
911
912 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
913 compiler errors when using %debug.
914 Add declaration of yylow when locations in use to avoid compilation
915 error.
916 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
917 on whether we are in split mode, for consistency with behavior of
918 non-GLR parsing.
919
c49784f5
AD
9202010-09-01 Akim Demaille <demaille@gostai.com>
921
922 Address GCC warnings about shadowed local variables (yyflag).
923 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
924 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
925 yyrule, and yyflag.
926
64877e5e
JD
9272010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
928
929 Version 2.4.3.
930 * NEWS (2.4.3): Set date.
931
83af6585
JD
9322010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
933
934 maint: add gettext version to release announcements.
935 Suggested by Paul Hilfinger at
936 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
937 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
938 * cfg.mk (bootstrap-tools): Add gettext.
939
93d7dde9
JD
9402010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
941
942 doc: fix -W and %expect documentation some.
943 * NEWS (2.4.3): Mention that there are documentation fixes.
944 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
945 turns conflicts into errors not warnings.
946 (Shift/Reduce): Likewise.
947 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
948
2bfcac9a
JD
9492010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
950
951 -Werror: fix for rules useless in parser after conflicts.
952 * NEWS (2.4.3): Document fix.
953 * src/complain.c (error_message): Extend to handle incomplete
954 error messages so warn and warn_at can be used in more cases.
955 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
956 -Werror is always obeyed.
957 * src/reduce.c (reduce_print): Use warn so that the "warnings
958 being treated as errors" message is printed consistently before
959 the first warning message. This makes testing easier.
960 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
961 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
962 --warnings=error when warnings appear in bison's stderr.
963
c61d4fa1
JD
9642010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
965
966 maint: enable gnits only at stable releases.
967 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
968 version string should disable gnits. Explain in comments.
969
825c88e8
JD
9702010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
971
972 i18n: update.
973 * po/POTFILES.in: Add src/graphviz.c.
974
343c3db8
JD
9752010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
976
977 i18n: fix for gnulib.
978 * po/POTFILES.in: Add remaining gnulib files that have
979 translatable strings.
980
42765f8e
JD
9812010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
982
983 build: fix our adjustments for gnulib files in lib.
984 * configure.ac: For prepending lib/ to the values of config
985 variables, fix detection of empty values. Also, due to recent
986 gnulib changes, add LIBUNISTRING_UNITYPES_H and
987 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
988
e35bc778
JD
9892010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
990
991 maint: use announce-gen's new --mail-headers.
992 * HACKING (Announce): Update instructions.
993 * cfg.mk (announcement_Cc_): Define.
994 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
995 required by latest gnulib.
996 * gnulib: Update to latest.
997
b6ca79e8
JD
9982010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
999
1000 tests: handle Valgrind that complains about >&-.
1001 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
1002 (Output files: -dv >&-): Skip test group if running
1003 maintainer-check-valgrind.
1004
ca2a6d15
PH
10052010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
1006
1007 * NEWS: Describe new semantic-predicate feature.
9d6bc5c4
JD
1008 * data/c.m4 (b4_predicate_case): New definition.
1009 * data/java.m4 (b4_predicate_case): New definition.
1010 * data/glr.c (yyimmediate): Add definition.
1011 (yydoAction): Remove comment, now obsolete.
1012 Do YY_REDUCE_PRINT here.
1013 (yyglrReduce): Alter comment to indicate that semantic values
1014 need not be deferred.
1015 Remove YY_REDUCE_PRINT from here; done in yydoAction.
1016 (yyprocessOneStack): Pass immediate flag.
1017 Delete stacks rejected by predicates in newly split-off parsers.
1018 Change handling of yyerr so that only current stack gets deleted
1019 when semantic predicate fails.
1020 (yyfillin): Don't crash if a semantic value is unresolved (as may
1021 happen in predicate rules).
1022 Copy lr state as well in debugging mode.
1023 Update comment on setting of yysval to include yyloc as well.
1024 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
1025 Report unresolved RHS values.
1026 (yyimmediate): New table.
1027 * src/gram.h (struct rule): Add is_predicate field.
1028 * src/output.c (user_actions_output): Use b4_predicate_case for
1029 predicates.
1030 (prepare_symbols): Output yyimmediate.
1031 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
1032 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
1033 argument.
1034 * src/scan-code.h (struct code_props): Add is_predicate field.
1035 (code_props_rule_action_init): New interface.
1036 * src/parse-gram.y (%?{...}): New token.
1037 (rhs): Add %?{...} rule.
1038 * src/parse-gram.c: Regenerate.
1039 * src/parse-gram.h: Regenerate.
1040 * src/reader.c (grammar_current_rule_action_append): Add
1041 immediate argument.
1042 (grammar_midrule_action): Use new interface for
1043 code_props_rule_action_init.
1044 (grammar_current_rule_action_append): Ditto.
1045 (packgram): Transfer is_predicate value.
1046 * src/reader.h (grammar_current_rule_action_append): New interface.
1047 * doc/bison.texinfo: Document semantic predicates (%?).
1048
1049 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
1050 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
1051 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
1052 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
1053 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
1054 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
1055 names in comments and mention all parameters.
1056 (struct yyGLRState): Fix description of yyposn field.
1057 (yyresolveLocations): Correct comment so as not to imply action when
1058 yyn1==0.
c49784f5 1059
7d424de1
PE
10602010-06-17 Paul Eggert <eggert@cs.ucla.edu>
1061
804e83b2
PE
1062 Update from GFDL GFDL 1.2 to 1.3.
1063 * doc/bison.texinfo: Update GFDL version number.
1064 * doc/fdl.texi: Update to version 1.3, taken from:
1065 http://www.gnu.org/licenses/fdl.texi
1066
7d424de1
PE
1067 Do not use date ranges in copyright notices.
1068 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
1069
1070 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
1071 * TODO, bootstrap, bootstrap.conf:
1072 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
1073 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
1074 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
1075 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
1076 * data/lalr1.java, data/local.mk, data/location.cc:
1077 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
1078 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
1079 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
1080 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
1081 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
1082 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
1083 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
1084 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
1085 * examples/calc++/Makefile.am, examples/extexi:
1086 * examples/local.mk, lib/abitset.c, lib/abitset.h:
1087 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1088 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1089 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1090 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1091 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1092 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
1093 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
1094 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
1095 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
1096 * src/AnnotationList.c, src/AnnotationList.h:
1097 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
1098 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
1099 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
1100 * src/complain.h, src/conflicts.c, src/conflicts.h:
1101 * src/derives.c, src/derives.h, src/files.c, src/files.h:
1102 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
1103 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
1104 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
1105 * src/location.c, src/location.h, src/main.c:
1106 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
1107 * src/named-ref.h, src/nullable.c, src/nullable.h:
1108 * src/output.c, src/output.h, src/parse-gram.y:
1109 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
1110 * src/print_graph.c, src/print_graph.h, src/reader.c:
1111 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
1112 * src/relation.h, src/scan-code.h, src/scan-code.l:
1113 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1114 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1115 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1116 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1117 * tests/actions.at, tests/atlocal.in, tests/c++.at:
1118 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1119 * tests/existing.at, tests/glr-regression.at:
1120 * tests/headers.at, tests/input.at, tests/java.at:
1121 * tests/local.at, tests/local.mk, tests/named-refs.at:
1122 * tests/output.at, tests/push.at, tests/reduce.at:
1123 * tests/regression.at, tests/sets.at, tests/skeletons.at:
1124 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
1125 Don't use date ranges in copyright notices.
1126
38435078
AD
11272010-05-11 Akim Demaille <demaille@gostai.com>
1128
1129 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
1130 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
1131 header file to the implementation file, after the user %code
1132 sections.
1133 * NEWS (2.5): Document this.
1134
e944aaff
AD
11352010-05-11 Akim Demaille <demaille@gostai.com>
1136
1137 doc: please Emacs.
1138 * doc/bison.texinfo (Local Variables): Move this after the
1139 LocalWords, since the latter are looked for in the whole document,
1140 while the former are looked for only at its end.
1141 Require american spell checking.
1142
86e5b440
AD
11432010-05-10 Akim Demaille <demaille@gostai.com>
1144
1145 doc: fix lalr1.cc documentation.
1146 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
1147 (C++ Bison Interface): Fix lalr1.cc skeleton name.
1148 (C++ Parser Interface): Fix semantic_type and location_type names.
1149 Document yy::parser::token.
1150 Reported by Jerry Quinn.
1151
bb9191dd
AD
11522010-05-10 Akim Demaille <demaille@gostai.com>
1153
1154 c++: use YYRHSLOC.
1155 * data/lalr1.cc (YYRHSLOC): New.
1156 (YYLLOC_DEFAULT): Use it.
1157 * data/glr.cc: If location_type was user defined, do not include
1158 location.hh, and do not produce location.hh and position.hh.
1159 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
1160 Check that glr.cc supports user defined location_type.
1161 * NEWS: Document this.
1162
8aec287e
AD
11632010-05-07 Akim Demaille <demaille@gostai.com>
1164
1165 doc: fix typo.
1166 * tests/synclines.at: here.
1167
c826013f
AD
11682010-05-04 Akim Demaille <demaille@gostai.com>
1169
1170 tests: enhance AT_SYNCLINES_COMPILE.
1171 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
1172 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
1173 taken care of in AT_SYNCLINES_COMPILE.
1174
7789b6e3
AD
11752010-05-04 Akim Demaille <demaille@gostai.com>
1176
1177 lalr1.cc: don't generate location.hh when location_type is defined
1178 * data/bison.m4 (b4_percent_define_get): Accept a default value.
1179 * data/c++.m4: Do not provide a default value for the %define
1180 variable location_type, rather, use b4_percent_define_get with a
1181 default argument where its value is needed.
1182 * data/lalr1.cc: Do not load location.cc (which outputs both
1183 location.hh and position.hh) if the user defined location_type.
1184 Do not include location.hh either.
1185
19ad326b
AD
11862010-05-04 Akim Demaille <demaille@gostai.com>
1187
1188 lalr1.cc: minor refactoring.
1189 * data/lalr1.cc: Don't issue empty namespaces.
1190
f5da8149
AD
11912010-05-04 Akim Demaille <demaille@gostai.com>
1192
1193 tests: fix %printer.
1194 Currently, there is no check that %printer ... <foo> (nor
1195 %destructor) is about an existing <foo> type. This C++ test had
1196 it wrong (<::std::string> vs. <std::string>).
1197
1198 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
1199 pretty-printing of lists into something better for parser traces.
1200 Update the expected output.
1201 Fix correspondance between %type/%token and %printer.
1202
49976d5c
AD
12032010-05-04 Akim Demaille <demaille@gostai.com>
1204
1205 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
1206 * tests/calc.at (Span): Instead of begin/end, as in the built-in
1207 location class, use first and last.
1208 Define YYLLOC_DEFAULT to adjust to these changes.
1209 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
1210 location_type changes.
1211
bc81de36
JD
12122010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1213
1214 tests: fix maintainer-xml-check.
1215 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
1216 Update output to include comments now produced by --graph.
1217 (xsl:template match="automaton"): As for --graph, name the
1218 digraph after the grammar file.
1219 * src/print-xml.c (escape_bufs): Enlarge array.
1220 (print_xml): Add bug-report and url attributes to
1221 bison-xml-report element.
1222
b7666378
JD
12232010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1224
1225 In DOT output, convert from "/*" comments to "//" comments.
1226 This handles the possibility that a "*/" might appear in
1227 variable portions of those comments at some point in the future.
1228 * src/graphviz.c (start_graph): Implement.
1229
9b5049bd
JD
12302010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1231
1232 Document that undefined %prec identifier warnings will remain.
1233 * NEWS (2.4.3): Here.
1234 (2.4.2): Here.
1235
02354690
JD
12362010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1237
1238 Revert 2009-12-30 change for undefined %prec token complaints.
1239 That is, keep them as warnings because that should be sufficient
1240 to satisfy POSIX without creating backward compatibility issues.
1241 Suggested by Richard Stallman at
1242 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
1243 * NEWS (2.5): Remove mention of complaint.
56e92e0b
JD
1244 * src/reader.c (grammar_rule_check): Convert complaint back to
1245 warning.
02354690
JD
1246 * tests/input.at (%prec's token must be defined): Update.
1247
a7ddefd1
JD
12482010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1249
1250 build: don't require src/bison during bootstrap.
1251 Suggested by Eric Blake at
1252 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
1253 * bootstrap.conf (bootstrap_epilogue): New function to make sure
1254 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
1255
c1bd4b2b
JD
12562010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1257
1258 i18n: fix untranslatable string.
1259 Reported by Goran Uddeborg at
1260 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
1261 * src/muscle-tab.c (muscle_percent_define_insert): Here.
1262
67f1a2c2
AD
12632010-04-13 Akim Demaille <demaille@gostai.com>
1264
1265 tests: calc: minor refactoring.
1266 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
1267
4f756f88
AD
12682010-04-13 Akim Demaille <demaille@gostai.com>
1269
1270 tests: calc: simplify location management.
1271 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
1272 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
1273 define the appropriate AT_LOC accessors.
1274 * tests/calc.at: Use AT_LOC accessors.
1275
24bb8c8c
AD
12762010-04-13 Akim Demaille <demaille@gostai.com>
1277
1278 test location_type.
1279 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1280 Define AT_LOCATION_TYPE_IF.
1281 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1282 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1283 used, provide a user location type and use it.
1284 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1285
af129079
AD
12862010-04-13 Akim Demaille <demaille@gostai.com>
1287
1288 tests: check fclose's return value.
1289 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1290
36dc3637
AD
12912010-04-13 Akim Demaille <demaille@gostai.com>
1292
1293 tests: don't depend on the actual location type.
1294 * tests/calc.at: Use yy::parser::location_type rather than
1295 yy::location, since the former is always right, and might point to
1296 another type than the latter.
1297
c499231d
AD
12982010-04-13 Akim Demaille <demaille@gostai.com>
1299
1300 formatting changes.
1301 * tests/calc.at: Formatting changes.
1302
7799ef15
AD
13032010-04-13 Akim Demaille <demaille@gostai.com>
1304
1305 lalr1.cc: remove useless forward declaration.
1306 * data/lalr1.cc: Include location.hh before stack.hh.
1307 Remove the useless forward declarations of position and location.
1308 Reported by Chris Morley.
1309 * data/glr.cc: Likewise.
1310
06cb07d5
JD
13112010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1312
1313 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1314
4586c8cd
JD
13152010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1316
1317 tests: fix for newer Sun Studio C++.
1318 Reported by Dagobert Michelsen at
1319 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1320 * THANKS (Dagobert Michelsen): Add.
1321 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1322 Autoconf macro for handling the restrict keyword.
1323 * gnulib: Update to latest, which no longer overrides that macro
1324 from Autoconf.
1325
44c2b42d
JD
13262010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1327
1328 portability: fix pointer arithmetic to conform to C standard.
1329 Reported by Tys Lefering at
1330 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1331 This fix is already implemented in glr.c and does not apply to
1332 lalr1.java.
1333 * data/lalr1.cc (yy::parser::parse): Increase size of
1334 yyerror_range and adjust subscripting so you don't have to
1335 subtract one from the beginning of the array.
1336 * data/yacc.c (b4_declare_parser_state_variables,
1337 yyparse, yypush_parse): Likewise.
1338
218287f5
AD
13392010-04-05 Akim Demaille <demaille@gostai.com>
1340
1341 remove useless include.
1342 * src/graphviz.h: Don't include stdbool.h.
1343
8176ab33
AD
13442010-04-05 Akim Demaille <demaille@gostai.com>
1345
1346 graph: sign the output file.
1347 * src/graphviz.c (start_graph): Issue comments about Bison.
1348 Suggested by Tys Lefering.
1349
4ad3921d
JD
13502010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1351
1352 portability: fix test suite for GCC 4.5's new #error message.
1353 Reported by Tys Lefering at
1354 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1355 * NEWS (2.4.3): Mention.
1356 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1357
10a697de
AD
13582010-03-30 Akim Demaille <demaille@gostai.com>
1359
1360 fix comments.
1361 * src/graphviz.h: Add missing license notice.
1362 Document.
1363
d6b347e4
AD
13642010-03-25 Akim Demaille <demaille@gostai.com>
1365
1366 tests: fix 250: parse.error=verbose overflow.
1367 * tests/regression.at (parse.error=verbose overflow): Avoid the
1368 double inclusion of stdlib.h as it triggers hard errors.
1369
b8675840
JD
13702010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1371
1372 portability: fix for BSD make.
1373 Reported by Johan van Selst at
1374 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1375 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
1376 this dependency list as in package.m4's target rule.
1377
8b9e021f
JD
13782010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1379
1380 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1381 Reported by Johan van Selst at
1382 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1383 * NEWS (2.4.3): New.
1384 * THANKS (Johan van Selst): Add.
1385 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
1386 targets so that gnulib's new c++defs.h is matched.
1387 * gnulib: Update to latest.
1388
96a381c5
JD
13892010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1390
1391 maint: update for changes to gnulib's announce-gen.
1392 * HACKING (Announce): RELEASE_TYPE=major must now be written
1393 RELEASE_TYPE=stable.
1394
e19a049c
JD
13952010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1396
1397 Version 2.4.2.
1398 * NEWS (2.4.2): Set version and date. For the recent test suite
1399 portability fixes, don't be so optimistic about their success
1400 given the lack of feedback on the affected platforms.
1401
890aeb28
JD
14022010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1403
1404 tests: fix maintainer-xml-check for recent changes.
1405 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1406 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1407 output file whose name conflicts with a previous output file
1408 is now never generated.
1409
f39ab286
JD
14102010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1411
1412 portability: fix several issues with M4 subprocess.
1413
1414 M4's output pipe was not being drained upon fatal errors during
1415 scan_skel. As a result, broken-pipe messages from M4 were seen
1416 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1417 failure in the test suite. The problem was that, on platforms
1418 where the default disposition for SIGPIPE is ignore instead of
1419 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1420 then reported it. However, there's some sort of race condition,
1421 because the new test group occasionally succeeded.
1422 Reported by Albert Chin at
1423 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1424
1425 There were also problems with the test suite livelocking on
1426 Tru64 5.1b. Reported by Didier Godefroy at
1427 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1428 Switching to create_pipe_bidi suggested by Akim Demaille.
1429
1430 To attempt to solve both of these problems, switch to gnulib's
1431 create_pipe_bidi and register M4 process as a slave. Along the
1432 way, clean up file name conflict handling, which was affected by
1433 the broken-pipe problem before the switch.
1434 * NEWS (2.4.2): Document.
1435 * THANKS (Didier Godefroy): Add.
1436 * bootstrap.conf (gnulib_modules): Add pipe.
1437 * gnulib: Update to latest to make sure we have all the latest
1438 fixes.
1439 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
1440 subpipe.c.
1441 * po/POTFILES.in (lib/subpipe.c): Remove.
1442 * src/files.c (compute_output_file_names): Update invocations
1443 of output_file_name_check.
1444 (output_file_name_check): In the case that the grammar file
1445 would be overwritten, use complain instead of fatal, but replace
1446 the output file name with /dev/null. Use the /dev/null solution
1447 for the case of two conflicting output files as well because it
1448 seems safer in case Bison one day tries to open both files at
1449 the same time.
1450 * src/files.h (output_file_name_check): Update prototype.
1451 * src/output.c (output_skeleton): Use create_pipe_bidi and
1452 wait_subprocess. Assert that scan_skel completely drains the
1453 pipe.
1454 * src/scan-skel.l (at_directive_perform): Update
1455 output_file_name_check invocation.
1456 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1457 grammar file actually isn't overwritten.
1458 (Conflicting output files: -o foo.y): Update expected output.
1459 * tests/skeletons.at (Fatal errors but M4 continues producing
1460 output): New test group.
1461
e32050b0
JD
14622010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1463
1464 Update POTFILES.
1465 * HACKING (Release Procedure): Add reminder about keeping
1466 POTFILES files up-to-date.
1467 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1468
efc4ed4a
JD
14692010-02-01 Joel E. Denny <jdenny@clemson.edu>
1470
1471 Code cleanup.
1472 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1473 which is already defined in atconfig.
1474
95611b56
JD
14752010-01-22 Joel E. Denny <jdenny@clemson.edu>
1476
1477 tests: fix missing include caught by g++ 4.4.1.
1478 Reported by Tys Lefering.
1479 * HACKING (Release checks): Add note about trying a recent GCC.
1480 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
1481 cstdlib for abort.
1482 (_AT_DATA_EXPECT2_Y): Likewise.
1483
d6e40cba
JD
14842010-01-21 Joel E. Denny <jdenny@clemson.edu>
1485
1486 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1487
80b70223
JD
14882010-01-21 Joel E. Denny <jdenny@clemson.edu>
1489
1490 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1491 * HACKING (Release Procedure): Update notes on copyright years.
1492 * Makefile.am (update-package-copyright-year): New target rule.
1493 * build-aux/update-package-copyright-year: New file.
1494 * cfg.mk (update-copyright): Add update-package-copyright-year
1495 as a dependency.
1496
3320a276
JD
14972010-01-19 Joel E. Denny <jdenny@clemson.edu>
1498
1499 * bootstrap: Import improvements from latest gnulib.
1500
e30c0477
JD
15012010-01-19 Joel E. Denny <jdenny@clemson.edu>
1502
1503 build: require Automake 1.11.1 to avoid a security flaw.
1504 * HACKING (Release Procedure): Don't document Automake security
1505 flaw here.
1506 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1507 why here.
1508
a538eeb1
JD
15092010-01-19 Joel E. Denny <jdenny@clemson.edu>
1510
1511 gnulib: update to latest.
1512
d6bdb90a
JD
15132010-01-19 Joel E. Denny <jdenny@clemson.edu>
1514
1515 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1516
326e5cf8
JD
15172010-01-15 Joel E. Denny <jdenny@clemson.edu>
1518
1519 Thank the developer of the initial push parser implementation.
1520 This unfortunate oversight is several years old.
1521 * THANKS (Odd Arild Olsen): Add.
1522
fca9c5ef
JD
15232010-01-04 Joel E. Denny <jdenny@clemson.edu>
1524
1525 Fix some comments concerning LR(0) versus LALR(1).
1526
1527 Stop equating LR(0) with nondeterminism and LALR(1) with
1528 determinism. That is, if all states are consistent, then LR(0)
1529 tables are deterministic. On the other hand, LALR(1) tables
1530 might be nondeterministic before conflict resolution, and GLR
1531 permits LALR(1) tables to remain nondeterministic.
1532 * src/LR0.c, src/LR0.h: Here.
1533 * src/lalr.c, src/lalr.h: Here.
1534 * src/main.c (main): Here.
1535 * src/state.c, src/state.h: Here.
1536
1537 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1538 parser tables.
1539
e141f4d4
JD
15402010-01-04 Joel E. Denny <jdenny@clemson.edu>
1541
1542 maint: run "make update-copyright"
1543
882be728
JD
15442009-12-30 Joel E. Denny <jdenny@clemson.edu>
1545
1546 POSIX: complain if %prec's token was not defined.
1547 * NEWS (2.5): Document.
1548 * src/reader.c (grammar_rule_check): Convert warning to
1549 complaint.
1550 * tests/input.at (%prec's token must be defined): Update.
1551
8bb3a2e7
JD
15522009-12-30 Joel E. Denny <jdenny@clemson.edu>
1553
1554 POSIX: warn if %prec's token was not defined.
1555 Reported by Florian Krohm at
1556 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1557 * NEWS (2.4.2): Document.
1558 * src/reader.c (grammar_rule_check): Implement.
1559 (grammar_current_rule_prec_set): Add comments explaining that we
1560 here assume a %prec identifier is a token, but we still manage
1561 to support POSIX.
1562 * tests/input.at (%prec's token must be defined): New test
1563 group.
1564
505e1551
JD
15652009-12-31 Joel E. Denny <jdenny@clemson.edu>
1566
1567 * HACKING (Release Procedure): Recommend a secure automake.
1568
b8d19cf8
JD
15692009-12-29 Joel E. Denny <jdenny@clemson.edu>
1570
1571 portability: `<' and `>' are not always defined on addresses.
1572 Specifically, don't sort objects by their memory addresses when
1573 they're not allocated in the same array or other object. Though
1574 I haven't found a test case where that fails on my platform, C
1575 says the behavior is undefined.
1576 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1577 FIXME. Use new id field of InadequacyList nodes rather than
1578 their memory addresses when sorting.
1579 (AnnotationList__compute_from_inadequacies): Add
1580 inadequacy_list_node_count argument to pass to
1581 InadequacyList__new_conflict.
1582 * src/AnnotationList.h
1583 (AnnotationList__compute_from_inadequacies): Update prototype
1584 and documentation for new argument.
1585 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1586 node_count argument and use it to assign a unique ID.
1587 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1588 (InadequacyList): Add id field.
1589 (InadequacyList__new_conflict): Update prototype and
1590 documentation for new argument.
1591 * src/ielr.c (ielr_compute_annotation_lists): Update
1592 AnnotationList__compute_from_inadequacies invocation.
1593
df222dfa
JD
15942009-12-20 Joel E. Denny <jdenny@clemson.edu>
1595
1596 Fix handling of yychar manipulation in user semantic actions.
1597 The problem was that yacc.c didn't always update the yychar
1598 translation afterwards. However, other skeletons appear to be
1599 fine. glr.c appears to already translate yychar before every
1600 use. lalr1.cc does not define yychar and does not document its
1601 replacement, yyla, for users. It does provide yyclearin, but
1602 that does not manipulate yyla and thus requires no translation
1603 update. In lalr1.java, yychar is out of scope during semantic
1604 actions.
1605 * NEWS (2.5): Document.
1606 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1607 yytoken here.
1608 (yyparse, yypush_parse): Instead, translate before every use of
1609 yytoken, and add comments explaining this approach.
1610 * tests/actions.at (Destroying lookahead assigned by semantic
1611 action): New test group checking that translation happens before
1612 lookahead destructor calls at parser return. Previously,
1613 incorrect destructors were called.
1614 * tests/conflicts.at (parse.error=verbose and consistent
1615 errors): New test group checking that translation happens at
1616 syntax error detection before the associated verbose error
1617 message and the associated lookahead destructor calls. While
1618 the destructor call is fixed by this patch, the verbose error
1619 message is currently incorrect due to another bug (see
1620 comments in test group), so this is an expected failure for now.
1621
4395a9ff
JD
16222009-12-21 Joel E. Denny <jdenny@clemson.edu>
1623
1624 YYFAIL: warn about uses and remove from lalr1.java.
1625 * NEWS (2.5): Document.
9d6bc5c4 1626 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
4395a9ff
JD
1627 and make it private. Update all uses.
1628 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1629
1625df5b
JD
16302009-12-21 Joel E. Denny <jdenny@clemson.edu>
1631
1632 YYFAIL: deprecate.
1633 * NEWS (2.4.2): Document deprecation and the phase-out plan.
9d6bc5c4 1634 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1625df5b
JD
1635 deprecation.
1636 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1637 YYFAIL from GCC cpp's -Wunused-macros.
1638 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1639 documentation.
1640 (LocalWords): Remove YYFAIL.
1641
5335b65a
JD
16422009-12-20 Joel E. Denny <jdenny@clemson.edu>
1643
1644 tests: cleanup.
1645 * tests/c++.at (Syntax error discarding no lookahead): Don't
1646 ignore stderr. Instead, eliminate remaining warnings.
1647
d59beda0
JD
16482009-12-18 Joel E. Denny <jdenny@clemson.edu>
1649
1650 lalr1.cc: don't discard non-existent lookahead on syntax error.
9d6bc5c4 1651 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
d59beda0
JD
1652 * tests/c++.at (Syntax error discarding no lookahead): New test
1653 group.
1654
387b4d50
JD
16552009-12-17 Joel E. Denny <jdenny@clemson.edu>
1656
1657 Code cleanup.
1658 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1659 function, which is no longer used.
1660
a603c6e0
JD
16612009-12-16 Joel E. Denny <jdenny@clemson.edu>
1662
1663 Add gcc's -Wundef to test suite and fix another warning from it.
1664 * NEWS (2.4.2): Update description of -Wundef fix.
1665 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1666 (WARN_CFLAGS_TEST): New substitution.
1667 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1668 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1669 WARN_CFLAGS.
1670 (NO_WERROR_CFLAGS): Likewise.
1671 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1672
19750d31
JD
16732009-12-16 Joel E. Denny <jdenny@clemson.edu>
1674
1675 * data/yacc.c: Reformat m4 a little.
1676
c938d650
JD
16772009-12-16 Joel E. Denny <jdenny@clemson.edu>
1678
1679 Document gcc -Wundef fix.
1680 * NEWS (2.4.2): Here.
1681 * THANKS (Jonathan Nieder): Add.
1682
fcd32abd
JN
16832009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1684
1685 Simplify y.tab.c when location tracking is disabled.
1686 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1687 tracking is not enabled. Instead, unconditionally define
1688 YY_LOCATION_PRINT as a no-op for backward compatibility.
1689
ae93128c
JN
16902009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1691
1692 Avoid warnings from gcc -Wundef y.tab.c.
1693 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1694 defined before using them.
1695 * data/lalr1.cc: Likewise.
1696 * data/yacc.c: Likewise.
1697
c843aaab
JD
16982009-12-15 Joel E. Denny <jdenny@clemson.edu>
1699
1700 autoconf: update to latest for fix of M4 detection.
1701 Reported by Eric Blake.
1702 * submodules/autoconf: Update.
1703
5c99151a
JD
17042009-12-15 Joel E. Denny <jdenny@clemson.edu>
1705
1706 portability: use -DGNULIB_POSIXCHECK.
1707 Reported by Eric Blake. See discussions at
1708 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1709 and
1710 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1711 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1712 * bootstrap.conf (gnulib_modules): Add all the printf modules
1713 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1714 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1715 (excluded_files): Remove m4/printf-posix.m4.
1716 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1717 lib/libbison.a so gnulib libraries can be linked.
1718
75f94c6d
JD
17192009-12-15 Joel E. Denny <jdenny@clemson.edu>
1720
1721 gnulib: update for fix of fprintf-posix, which we'll use soon.
1722 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1723 targets so that gnulib's new arg-nonnull.h and link-warning.h
1724 are matched.
1725 * gnulib: Update.
1726
ca01f454
JD
17272009-12-14 Joel E. Denny <jdenny@clemson.edu>
1728
1729 Enable assertion output and --disable-assert for configure.
1730 * bootstrap.conf (gnulib_modules): Add assert module.
1731 * src/system.h (aver): Define as assert, and summarize the
1732 discussion on this issue.
1733
9dc3ee6d
JD
17342009-12-14 Joel E. Denny <jdenny@clemson.edu>
1735
1736 Expand GLR acronym in summary of Bison.
1737 Based on discussion with Akim Demaille starting at
1738 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1739 * doc/bison.texinfo (Introduction): Here.
1740 * src/getargs.c (usage): Here.
1741
d013372c
AR
17422009-10-03 Alex Rozenman <rozenman@gmail.com>
1743
1744 Document named references.
1745 * doc/bison.texinfo (Actions): Add new example and xref to
1746 Using Named References node.
1747 (Using Named References): New node.
1748
5297ebb3
JD
17492009-10-16 Joel E. Denny <jdenny@clemson.edu>
1750
1751 cleanup.
1752 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1753 of char*.
1754 (Sbitset__isEmpty): Use Sbitset instead of char*.
1755 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1756 instead of char. This helps to avoid casting errors.
1757 (Sbitset__or): Use Sbitset instead of char*.
1758
175620d3
JD
17592009-10-16 Joel E. Denny <jdenny@clemson.edu>
1760
1761 portability: don't assume 8-bit bytes.
1762 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1763 * src/Sbitset.h (Sbitset__nbytes): Here.
1764 (Sbitset__byteAddress): Here.
1765 (Sbitset__bit_mask): Here.
1766 (Sbitset__last_byte_mask): Here.
1767 (Sbitset__ones): Here.
1768 (SBITSET__FOR_EACH): Here.
1769
786578e3
JD
17702009-10-11 Joel E. Denny <jdenny@clemson.edu>
1771
1772 portability: use va_start and va_end in the same function.
1773 * src/complain.c (error_message): Move va_end from here...
1774 (ERROR_MESSAGE): ... to here.
1775
416a9da6
JD
17762009-10-08 Joel E. Denny <jdenny@clemson.edu>
1777
1778 * data/bison.m4: Update comments for rename to muscle-tab.h.
1779
10659d0e
JD
17802009-10-07 Joel E. Denny <jdenny@clemson.edu>
1781
1782 Minor code cleanup.
1783 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1784 replace all uses with UNIQSTR_CONCAT.
1785 * src/uniqstr.c (uniqstr_vsprintf): New function.
1786 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1787 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1788 macros.
1789
3c5362b8
JD
17902009-10-06 Joel E. Denny <jdenny@clemson.edu>
1791
1792 * TODO (Complaint submessage indentation): New.
1793
b143f404
JD
17942009-10-04 Joel E. Denny <jdenny@clemson.edu>
1795
1796 Minor code cleanup.
1797 * src/parse-gram.y: Clean up sorting of declarations.
1798 Use types to simplify %printer declarations where possible.
1799 Provide %printer for BRACKETED_ID and symbol.prec.
1800 * src/symtab.c: Whitespace change.
1801
7439c5c0
JD
18022009-10-04 Joel E. Denny <jdenny@clemson.edu>
1803
1804 tests: skip tests of file names that platform does not support.
1805 Reported by Michael Raskin at
1806 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1807 * THANKS (Michael Raskin): Add.
1808 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1809 to fail at least for file names containing ":" or "\".
1810
45319f13
JD
18112009-09-23 Joel E. Denny <jdenny@clemson.edu>
1812
1813 yysyntax_error: avoid duplicate lookahead collection.
1814 Except when memory reallocation is required, this change
1815 eliminates the need to invoke yysyntax_error twice and thus to
1816 repeat the collection of lookaheads. It also prepares for
1817 future extensions that will make those repetitions more
1818 expensive and that will require additional memory management in
1819 yysyntax_error. Finally, it fixes an obscure bug already
1820 exercised in the test suite.
1821 * data/yacc.c (yysyntax_error): Add arguments for message
1822 buffer variables stored in the parser. Instead of size, return
1823 status similar to yyparse status but indicating success of
1824 message creation. Other than the actual reallocation of the
1825 message buffer, import and clean up memory management code
1826 from...
1827 (yyparse, yypush_parse): ... here.
1828 * tests/regression.at (parse.error=verbose overflow): No longer
1829 an expected failure.
1830
52cea04a
JD
18312009-09-23 Joel E. Denny <jdenny@clemson.edu>
1832
1833 yysyntax_error: test memory management more.
1834 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1835 * tests/regression.at (parse.error=verbose and
1836 YYSTACK_USE_ALLOCA): New test group.
1837 (parse.error=verbose overflow): New test group that reveals an
1838 obscure bug. Expected fail for now.
1839
37318e2f
JD
18402009-10-04 Joel E. Denny <jdenny@clemson.edu>
1841
1842 benchmarks: use %debug consistently among grammars.
1843 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1844 %debug by default. It can affect the timings even if yydebug=0.
1845 (generate_grammar_calc): For consistency with other grammars,
1846 use YYDEBUG environment variable to set yydebug.
1847
f74d6d25
JD
18482009-10-03 Joel E. Denny <jdenny@clemson.edu>
1849
1850 Remove dead code.
1851 * src/symtab.c (symbol_pack): Here because every symbol's number
1852 is always defined by this time.
1853
5b1ff423
AR
18542009-10-03 Alex Rozenman <rozenman@gmail.com>
1855
1856 Add additional space after periods in NEWS.
1857 * NEWS (2.5): here.
1858
47eced30
JD
18592009-09-29 Joel E. Denny <jdenny@clemson.edu>
1860
1861 Use the correct conversion specifier for size_t.
1862 Reported by Jim Meyering.
1863 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1864 because Sbitset__Index is size_t.
1865 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1866
d8f68fc2
JD
18672009-09-27 Joel E. Denny <jdenny@clemson.edu>
1868
1869 tests: don't abuse AT_BISON_CHECK.
1870 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1871 additional shell commands outside of AT_BISON_CHECK.
1872
43aabb70
JD
18732009-09-26 Joel E. Denny <jdenny@clemson.edu>
1874
1875 tests: check that parse-gram.y's IELR and LALR are identical.
1876 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1877 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1878 group.
1879
66381412
AR
18802009-09-19 Alex Rozenman <rozenman@gmail.com>
1881
1882 Keep sub-messages aligned. Fix strings for translation.
5b1ff423
AR
1883 * src/location.h (location_print): Add return value.
1884 * src/location.c (location_print): Return number of printed
66381412 1885 characters.
5b1ff423
AR
1886 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1887 new functions.
1888 * src/complain.cpp (indent_ptr): New static variable.
1889 (error_message, complain_at_indent, warn_at_indent): Implement
1890 the alignment mechanism.
1891 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1892 for translations. Use new alignment mechanism.
1893 * tests/named-ref.at: Adjust test-cases.
66381412
AR
1894 * NEWS (2.5): Add an announcement about named references.
1895
a6ca4ce2
AD
18962009-09-17 Akim Demaille <demaille@gostai.com>
1897
1898 doc: fixes.
1899 * doc/bison.texinfo: here.
1900 Reported by Alex Rozenman.
1901
3cdc21cf
AD
19022009-09-16 Akim Demaille <demaille@gostai.com>
1903
1904 doc: lalr1.cc and variants.
1905 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1906 "variant" %define variables.
1907 (C++ Semantic Values): Split into...
1908 (C++ Unions, C++ Variants): these.
1909 The latter is new.
1910 (C++ Parser Interface): Fix type names.
1911 Document parser::syntax_error.
1912 Document the fact that locations are not mandatory.
1913 (C++ Scanner Interface): Split into...
1914 (Split Symbols, Complete Symbols): these.
1915 The later is new.
1916 (Calc++ Parsing Driver): Use variants.
1917 Add more comments.
1918 Adjust style.
1919 (Calc++ Parser): Declare all the tokens, no
1920 longer accept raw characters.
1921 Remove %union.
1922 Adjust types and printers.
1923 Remove destructors.
1924 (Calc++ Scanner): Use make_<SYMBOL> functions.
1925 Use strerror in error message.
1926
f50bfcd6
AD
19272009-09-16 Akim Demaille <demaille@gostai.com>
1928
1929 doc: spell checking.
1930 * doc/bison.texinfo: here.
1931
6b5a0de9
AD
19322009-09-16 Akim Demaille <demaille@gostai.com>
1933
1934 doc: comment changes.
1935 * doc/bison.texinfo: Comment changes.
1936
2b08bceb
AD
19372009-09-16 Akim Demaille <demaille@gostai.com>
1938
1939 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1940 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1941 constructor to take a token_type instead of the (internal) symbol
1942 number.
1943 Call yytranslate_.
1944 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1945 don't call yytranslate_ here.
1946
c981ce9b
AD
19472009-09-16 Akim Demaille <demaille@gostai.com>
1948
1949 TODO: statistics.
1950 * TODO (Figures): New.
1951
00d80a9c
JD
19522009-09-13 Joel E. Denny <jdenny@clemson.edu>
1953
1954 tests: clean up push.at test group titles.
1955 * tests/push.at: Remove "Push Parsing: " from test group titles
1956 because these are already under the banner "Push Parsing Tests".
1957
f64e406b
AR
19582009-09-12 Alex Rozenman <rozenman@gmail.com>
1959
1960 Provide an additional sub-message for clarity.
1961 Add "symbol not found in production" error message when
1962 an "invalid reference" is detected in named references
1963 resolution.
1964 * src/scan-code.l: Update "invalid reference" case.
1965 * tests/named-ref.at: Adjust test-cases.
1966
bb31eb56
JD
19672009-09-10 Joel E. Denny <jdenny@clemson.edu>
1968
1969 Clean up yacc.c a little.
1970 * data/yacc.c: Clean up M4 for readability, and make output
1971 whitespace more consistent. For the main parse function
1972 comment, instead of saying "yyparse or yypush_parse", say either
1973 "yyparse" or "yypush_parse" depending on which it actually is.
1974
2d399888
JD
19752009-09-10 Joel E. Denny <jdenny@clemson.edu>
1976
1977 Fix --enable-gcc-warnings.
1978 * src/parse-gram.y (%printer <param>): Handle param_none.
1979
ff601366
AD
19802009-09-09 Akim Demaille <demaille@gostai.com>
1981
1982 lalr1.cc: syntax_error as exceptions.
1983 It is common to use sort of factories in the user actions. These
1984 factories may check some "syntactic" constraints that are not
1985 enforced by the grammar itself. This is possible using YYERROR
1986 within the action itself. Provide the user with a means to throw
1987 a syntax_error exception.
1988
1989 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1990 Declare and define yy::parser::syntax_error.
1991 * data/lalr1.cc: Include stdexcept.
1992 (yy::parser::parse): Wrap the user action within a try/catch.
1993 * data/glr.cc: Include stdexcept.
1994
29660062
AD
19952009-09-09 Akim Demaille <demaille@gostai.com>
1996
1997 lalr1.cc: add missing "inline".
1998 * data/c++.m4 (b4_public_types_define): Add missing inline to
1999 implementations provided in headers.
2000
2055a44e
AD
20012009-09-09 Akim Demaille <demaille@gostai.com>
2002
2003 %param: documentation.
2004 * NEWS (2.6): Document %param, %lex-param, and %parse-param
2005 changes.
2006 * doc/bison.texinfo: Document that %lex-param and %parse-param
2007 are n-ary.
2008 Changes some examples to demonstrate it.
2009 (Calc++ Parser): Use %param.
2010
dd875058
AD
20112009-09-09 Akim Demaille <demaille@gostai.com>
2012
2013 Regen.
2014
f71db70b
AD
20152009-09-09 Akim Demaille <demaille@gostai.com>
2016
2017 style changes.
2018 * src/parse-gram.y (add_param): Scope changes.
2019
eaca4c11
AD
20202009-09-09 Akim Demaille <demaille@gostai.com>
2021
2022 %parse: support several arguments.
2023 * src/parse-gram.y (current_param): New.
2024 (param_type): Add param_none.
2025 (params): New nonterminal.
2026 Use it.
2027
b18cdd91
AD
20282009-09-09 Akim Demaille <demaille@gostai.com>
2029
2030 Regen.
2031
a7706735
AD
20322009-09-09 Akim Demaille <demaille@gostai.com>
2033
2034 %param.
2035 Provide a means to factor lex-param and parse-param common
2036 declarations.
2037
2038 * src/parse-gram.y (param_type): New.
2039 Define a %printer for it.
2040 (add_param): Use it.
2041 (%parse-param, %lex-param): Merge into...
2042 (%parse): this new token.
2043 Adjust the grammar to use it.
2044 * src/scan-gram.l (RETURN_VALUE): New.
2045 (RETURN_PERCENT_FLAG): Use it.
2046 (RETURN_PERCENT_PARAM): New.
2047 Use it to support %parse-param, %lex-param and %param.
2048
9789acf0
JD
20492009-09-03 Joel E. Denny <jdenny@clemson.edu>
2050
2051 Use aver not assert.
2052 * src/output.c: Don't include assert.h.
2053 (output_skeleton): Use aver not assert.
2054 * src/system.h (aver): In documentation of why, add links to
2055 Paul Eggert's explanations in the mailing lists.
2056
61bc57e5
AR
20572009-09-05 Alex Rozenman <rozenman@gmail.com>
2058
2059 Use "Unresolved reference" error message when no symbols were found
2060 in a symbolic reference resolution. Remove .expr and -expr from
2061 the shown reference when the reference is unresolved.
2062 * src/scan-code.l: Change the error message, adjust location columns,
2063 rename variable "exact_mode" to "explicit_bracketing".
2064 * tests/named-ref.at: Adjust existing tests and add a new one.
2065
f4c75eaf
AD
20662009-09-04 Akim Demaille <demaille@gostai.com>
2067
2068 Adjust synclines in src/parse-gram.[ch].
2069 * tests/bison.in: Do some magic (including working around issues
2070 with ylwrap) when this wrapper is used to compile
2071 src/parse-gram.y.
2072
c6abeab1
JD
20732009-09-03 Joel E. Denny <jdenny@clemson.edu>
2074
2075 Complain about unused %define variables and %code qualifiers.
2076 * NEWS (2.5): Document.
2077 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
2078 * doc/bison.texinfo (Decl Summary): Document complaint, and
2079 improve %define documentation a little otherwise.
2080 * tests/input.at (Reject unused %code qualifiers): Update.
2081 (%define errors): Update.
2082 (%define, --define, --force-define): Update.
2083 (%define backward compatibility): Update.
2084 (Unused %define api.pure): Update.
2085 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
2086
82db7cdb
JD
20872009-09-03 Joel E. Denny <jdenny@clemson.edu>
2088
2089 Don't suppress warnings about unused parse.error.
2090 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
2091 %define variable parse.error unless b4_error_verbose_flag is
2092 actually expanded in a skeleton.
2093
2755de8f
AD
20942009-09-03 Akim Demaille <demaille@gostai.com>
2095
2096 * NEWS (2.4.2): Add "Internationalization" item.
2097
1deef26d
AD
20982009-09-03 Akim Demaille <demaille@gostai.com>
2099
2100 bootstrap: fix/improve find_tool.
2101 * bootstrap (find_tool): Improve error messages.
2102 Fix typo about find_tool_names.
2103
2646cd54
JD
21042009-08-29 Joel E. Denny <jdenny@clemson.edu>
2105
2106 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
2107 See
2108 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
2109 * src/scan-code.h (code_props_rule_action_init): Rename
2110 named_ref arg to name so it doesn't shadow named_ref type. This
2111 makes it consistent with the function definition in scan-code.l
2112 anyway.
2113
cf499cff
JD
21142009-08-28 Joel E. Denny <jdenny@clemson.edu>
2115
2116 %define: accept unquoted values.
2117 * NEWS (2.5): Group all %define changes together, and document
2118 this one. Remove quotes in IELR and canonical LR entry.
2119 * doc/bison.texinfo: Remove quotes in most examples throughout.
2120 (Decl Summary): Update %define documentation.
2121 (Table of Symbols): Likewise.
2122 * src/ielr.c (LrType): Update documentation.
2123 * src/parse-gram.y (content.opt): Add production for ID.
2124 * tests/actions.at: Remove quotes in most tests.
2125 * tests/calc.at: Likewise.
2126 * tests/existing.at: Likewise.
2127 * tests/input.at: Likewise.
2128 * tests/local.at: Likewise.
2129 * tests/push.at: Likewise.
2130 * tests/reduce.at: Likewise.
2131 * tests/torture.at: Likewise.
2132
6ba96404
JD
21332009-08-28 Joel E. Denny <jdenny@clemson.edu>
2134
2135 %define lr.type: make values lowercase IDs.
2136 That is, "LALR" => "lalr", "IELR" => "ielr", and
2137 "canonical LR" => "canonical-lr".
2138 * NEWS (2.5): Update documentation.
2139 * doc/bison.texinfo (Decl Summary): Likewise.
2140 * src/ielr.c (ielr): Use new values.
2141 * src/ielr.h (ielr): Update documentation.
2142 * src/reader.c (prepare_percent_define_front_end_variables): Use
2143 and validate new values.
2144 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
2145 grammars.
2146 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
2147
4413bbd3
EB
21482009-08-27 Eric Blake <ebb9@byu.net>
2149
2150 scan-gram: avoid portability trap with ctype usage.
2151 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2152 Avoid compiler warning.
2153
b70c7fb4
JD
21542009-08-27 Joel E. Denny <jdenny@clemson.edu>
2155
2156 tests: use perl for printing special sequences to files.
2157 And skip tests if perl is not available. This is better than
2158 playing tricks with shell portability. Suggested by Akim
2159 Demaille.
2160 * tests/input.at (Bad character literals): Use it here for
2161 omitting final newlines.
2162 (Bad escapes in literals): Use it here for special characters.
2163
d1cc31c5
JD
21642009-08-26 Joel E. Denny <jdenny@clemson.edu>
2165
2166 tests: show a use of %define lr.default-reductions "consistent"
2167 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
2168 prevents the omission of expected tokens for %error-verbose.
2169
3bed3a75
AD
21702009-08-26 Akim Demaille <demaille@gostai.com>
2171
2172 tests: portability fix.
2173 * tests/input.at (Bad escapes in literals): Don't expect "echo
2174 '\0'" to output \ then 0.
2175
aa0cb40d
JD
21762009-08-26 Joel E. Denny <jdenny@clemson.edu>
2177
2178 Actually handle the yytable zero value correctly this time.
2179 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
2180 zero values in the YYTABLE comments.
2181 * data/glr.c (yytable_value_is_error): Don't check for zero
2182 value.
2183 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
2184 * data/yacc.c (yytable_value_is_error): Likewise.
2185 * data/lalr1.java (yy_table_value_is_error_): Likewise.
2186 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
2187 * src/tables.h: In header comments, explain why it's useless to
2188 check for a zero value in yytable.
2189
f2b30bdf
JD
21902009-08-25 Joel E. Denny <jdenny@clemson.edu>
2191
2192 More fixes related to last two patches.
2193 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
2194 comments: zero indicates syntax error not default action.
2195 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
2196 defined.
2197 * data/glr.c (yyis_pact_ninf): Rename to...
2198 (yypact_value_is_default): ... this.
2199 (yyisDefaultedState): Update for rename.
2200 (yyis_table_ninf): Rename to...
2201 (yytable_value_is_error): ... this, and check for value zero
2202 besides just YYTABLE_NINF.
2203 (yygetLRActions): Check for default value from yypact. It
2204 appears that this check is always performed before this function
2205 is invoked, and so adding the check here is probably redundant.
2206 However, the code may evolve after this subtlety is forgotten.
2207 Also, update for rename to yytable_value_is_error. Because that
2208 macro now checks for zero, a different but equivalent branch of
2209 the if-then-else here is evaluated.
2210 (yyreportSyntaxError): Update for rename to
2211 yytable_value_is_error. The zero condition was mishandled
2212 before.
2213 (yyrecoverSyntaxError): Update for renames. No behavioral
2214 changes.
2215 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
2216 New function.
2217 (yy_table_value_is_error_): New function.
2218 (parse): Use new functions where possible. No behavioral
2219 changes.
2220 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
2221 The zero condition was mishandled before.
2222 * data/yacc.c (yyis_pact_ninf): Rename to...
2223 (yypact_value_is_default): ... this.
2224 (yyis_table_ninf): Rename to...
2225 (yytable_value_is_error): ... this, and check for value zero
2226 besides just YYTABLE_NINF.
2227 (yysyntax_error): Update for rename to yytable_value_is_error.
2228 The zero condition was mishandled before.
2229 (yyparse): Update for renames. No behavioral changes.
2230 * src/tables.h: Improve comments about yypact, yytable, etc.
2231 more. Most importantly, say yytable value of zero means syntax
2232 error not default action.
2233
53f036ce
JD
22342009-08-25 Joel E. Denny <jdenny@clemson.edu>
2235
2236 Fix %error-verbose for conflicts resolved by %nonassoc.
2237 * NEWS (2.5): Document.
2238 * data/glr.c (yyreportSyntaxError): Fix this by checking
2239 yyis_table_ninf.
2240 * data/yacc.c (yysyntax_error): Likewise.
2241 * data/lalr1.cc (yysyntax_error_): Fix this by checking
2242 yytable_ninf_.
2243 * data/lalr1.java (yysyntax_error): Likewise.
2244 * tests/conflicts.at (%nonassoc and eof): Update expected output
2245 and remove FIXME.
2246
87412882
JD
22472009-08-25 Joel E. Denny <jdenny@clemson.edu>
2248
2249 Some code and documentation improvements.
2250 * data/c.m4 (b4_table_value_equals): New macro to capture
2251 some repeated code.
2252 * data/glr.c (yyis_pact_ninf): Use it here.
2253 (yyis_table_ninf): Likewise.
2254 (yyreportSyntaxError): Improve internal comments.
2255 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
2256 Use it everywhere possible.
2257 (yyis_table_ninf): Likewise.
2258 (yysyntax_error): Improve internal comments.
2259 * data/lalr1.cc (yysyntax_error_): Likewise.
2260 * data/lalr1.java (yysyntax_error): Likewise.
2261 * src/tables.h: Improve comments about yypact, yytable, etc.
2262
e6c849d8
JD
22632009-08-21 Joel E. Denny <jdenny@clemson.edu>
2264
2265 Use locale when quoting.
2266 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
2267 quote rather than implementing quoting here.
2268
d8911864
EB
22692009-08-20 Eric Blake <ebb9@byu.net>
2270
b0778bdd
EB
2271 Make previous patch more robust.
2272 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
2273 argmatch.h.
2274 (output_skeleton): Use it.
2275 Suggested by Akim Demaille.
2276
d8911864
EB
2277 Import latest m4/m4.m4.
2278 * submodules/autoconf: Update to autoconf 2.64.
2279 * configure.ac (M4_GNU_OPTION): New define.
2280 * src/output.c (output_skeleton): Use it to resolve FIXME.
2281 * NEWS: Mention this.
2282
c2724603
JD
22832009-08-19 Joel E. Denny <jdenny@clemson.edu>
2284
2285 Fix complaints about escape sequences.
2286 Discussed starting at
2287 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
2288 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
2289 For a \0 and similar escape sequences meaning the null
2290 character, report an invalid escape sequence instead of an
2291 invalid null character because the latter does not actually
2292 appear in the user's input.
2293 In all escape sequence complaints, don't escape the initial
2294 backslash, and don't quote when the sequence appears at the end
2295 of the complaint line unless there's whitespace that quotearg
2296 won't escape.
2297 Consistently say "invalid" not "unrecognized".
2298 Consistently prefer "empty character literal" over "extra
2299 characters in character literal" warning for invalid escape
2300 sequences; that is, consistently discard those sequences.
2301 * tests/input.at (Bad escapes in literals): New.
2302
17aed602
AD
23032009-08-19 Akim Demaille <demaille@gostai.com>
2304
2305 doc: fixes.
2306 * doc/bison.texinfo: Fix minor Texinfo errors.
2307
9142239a
AD
23082009-08-19 Akim Demaille <demaille@gostai.com>
2309
2310 tests: distcc compliance.
2311 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
2312 error messages from the output.
2313
171ad99d
AD
23142009-08-19 Akim Demaille <demaille@gostai.com>
2315
2316 variables: simplify the upgrade of namespace into api.namespace.
2317
2318 This patch simplifies "variables: rename namespace as
2319 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
2320 Suggested by Joel E. Denny in
2321 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
2322
2323 * src/muscle-tab.c (muscle_percent_variable_update): New.
2324 (muscle_percent_define_insert): Use it in replacement of the
2325 previous tr invocation.
2326 Remove variable_tr, no longer needed.
2327 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2328 Remove.
2329 * data/c++.m4: No longer handle namespace -> api.namespace.
2330 * tests/input.at (%define backward compatibility): Check that
2331 namespace is treated as api.namespace.
2332
d59e456d
AD
23332009-08-19 Akim Demaille <demaille@gostai.com>
2334
2335 doc: %initial-action to initialize yylloc.
2336 Reported by Bill Allombert.
2337 * doc/bison.texinfo: Set fill-column to 76.
2338 (Location Type): Document the use of %initial-action to initialize
2339 yylloc.
2340
ceb8b8e6
AD
23412009-08-19 Akim Demaille <demaille@gostai.com>
2342
2343 lalr1.cc: use state_type.
2344 * data/lalr1.cc (yysyntax_error_): Use state_type.
2345 Move argument names into yy*.
2346
7580c379
AD
23472009-08-19 Akim Demaille <demaille@gostai.com>
2348
2349 lalr1.cc: get rid of yyparse's yystate.
2350 yystate and yystack_[0].state are equal, keep only the latter.
2351 The former was also used as a temporary variable to compute the
2352 post-reduction state. Move this computation into an auxiliary
2353 function.
2354
2355 * data/glr.c (yyLRgotoState): Fuse variable definition and first
2356 assignment.
2357 * data/lalr1.cc (yy_lr_goto_state_): New.
2358 (yyparse): Use it.
2359 Replace remaining uses of yystate by yystate_[0].state.
2360 Remove the former.
2361
c4dc4c46
AD
23622009-08-19 Akim Demaille <demaille@gostai.com>
2363
2364 lalr1.cc: destroy $$ when YYERROR is called.
2365 * data/lalr1.cc (yyreduce): Compute the resulting state before
2366 running the user action so that yylhs is a valid symbol.
2367 (yyerrorlab): Since yylhs is complete (it knows its type), we can
2368 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
2369 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
2370
c67e466f
JD
23712009-08-18 Joel E. Denny <jdenny@clemson.edu>
2372
2373 maint: update for gnulib's recent update-copyright changes
2374 * gnulib: Update.
2375 * .x-update-copyright (COPYING): Add as it's no longer implied
2376 when .x-update-copyright is present.
2377 * cfg.mk (update-copyright-local): Remove, now ignored.
2378 (update-copyright): Declare update-b4-copyright as a dependency.
2379
af6d2358
AD
23802009-08-17 Akim Demaille <demaille@gostai.com>
2381
2382 build: require gettext 0.17.
2383
2384 Suggested by Bruno Haible.
2385 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
2386 * configure.ac: require gettext 0.17 to ensure compatibility with
2387 gnulib.
2388
91a2b9b1
AD
23892009-08-17 Akim Demaille <demaille@gostai.com>
2390
2391 build: lower gettext requirements.
2392
2393 Bison was uselessly requiring the formatstring macros from
2394 gettext, which resulted in mo files not being installed on systems
2395 that perfectly supported Bison mo files. Lower the requirement.
2396 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
2397
b0778bdd
EB
2398 * configure.ac: Require need-ngettext instead of
2399 need-formatstring-macros.
2400 Reported by Martin Jabocs.
2401 Suggested by Bruno Haible.
2402 * INSTALL: Restructure.
2403 (Internationalization): New.
91a2b9b1 2404
585935e8
JD
24052009-08-14 Joel E. Denny <jdenny@clemson.edu>
2406
2407 maint: fix use of copyright year intervals.
2408 * gnulib: Update.
2409 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
2410 as now recommended in gnulib/NEWS.
2411 * build-aux/update-b4-copyright: Fix.
2412 * cfg.mk (update-copyright-env): Configure update-copyright.
2413
83b60c97
JD
24142009-08-13 Joel E. Denny <jdenny@clemson.edu>
2415
2416 Make it easier to write deterministic tests.
2417 Continues Akim's work from his 2009-06-10 commits.
2418 * src/reader.c (check_and_convert_grammar): Don't add any
2419 symbols after the first symbols_do invocation.
2420 * src/symtab.c (symbols_sorted): New static global.
2421 (user_token_number_redeclaration): Update comments.
2422 (symbol_from_uniqstr): If a new symbol is being created, assert
2423 that symbols_sorted hasn't been allocated yet.
2424 (symbols_free): Free symbols_sorted.
2425 (symbols_cmp, symbols_cmp_qsort): New functions.
2426 (symbols_do): Sort symbol_table into symbols_sorted on first
2427 invocation.
2428 * tests/input.at (Numbered tokens): Recombine tests now that the
2429 output should be deterministic across multiple numbers.
2430
28169bab
AD
24312009-08-12 Akim Demaille <demaille@gostai.com>
2432
2433 tests: GCC 4.5 compliance.
2434 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
2435 messages about #error.
2436
9f14e187
AD
24372009-08-12 Akim Demaille <demaille@gostai.com>
2438
2439 build: fix the generation of the documentation.
2440 Some of our targets use "bison --help", but they can't depend on
2441 "bison" itself (to avoid additional requirements on the user), so
2442 they used to call "make src/bison" in the commands. Then
2443 concurrent builds may fail: one make might be aiming one of its
2444 jobs at compiling src/bison, and another job at generating the man
2445 page. If the latter is faster than the former, then we have two
2446 makes that concurrently try to compile src/bison.
2447
2448 This might also be a more convincing explanation for the failure
2449 described in the patch "build: fix paths".
2450
2451 * Makefile.am (SUFFIXES): Initialize.
2452 * build-aux/move-if-change: New, symlink to gnulib's.
2453 * build-aux/local.mk: Ship it.
2454 * doc/common.x: Remove, merged into...
2455 * doc/bison.x: here.
2456 * doc/local.mk (doc/bison.help): New.
2457 ($(CROSS_OPTIONS_TEXI)): Depend on it.
2458 Use src/bison.
2459 (.x.1): Replace with...
2460 (doc/bison.1): this explicit, simpler, target.
2461 (common_dep): Remove, inlined where appropriate.
2462 (SUFFIXES, PREPATH): Remove, unused.
2463
d1b55e81
AD
24642009-08-12 Akim Demaille <demaille@gostai.com>
2465
2466 gnulib: improve prefixing.
2467 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
2468 change the value of...
2469 (gl_LIBOBJS): this.
2470 Adjust more variables.
2471 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
2472 gl_LIBOBJS.
2473 (prefix): Also transform rules whose targets have slashes.
2474 Use $prefix liberally.
2475 Map @MKDIR_P@ to $(MKDIR_P).
2476 Prefix directories that are mkdir'd.
2477
838205d5
AD
24782009-08-12 Akim Demaille <demaille@gostai.com>
2479
2480 build: fix paths.
2481 When using $(top_builddir) inconsistently, Make (including GNU
2482 Make) is sometimes confused. As a result it may want to build
2483 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
2484 file, different names) concurrently, which, amusingly enough,
2485 might end with:
2486
2487 ranlib lib/libbison.a
2488 ranlib lib/libbison.a
2489 make[2]: *** [lib/libbison.a] Segmentation fault
2490
2491 on OS X.
2492
2493 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
2494 needed.
2495
67af7198
AD
24962009-08-12 Akim Demaille <demaille@gostai.com>
2497
2498 distcheck: fix.
2499
b0778bdd 2500 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
67af7198 2501
c467dc42
JD
25022009-08-10 Joel E. Denny <jdenny@clemson.edu>
2503
2504 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
2505
dfaa4860
JD
25062009-08-10 Joel E. Denny <jdenny@clemson.edu>
2507
2508 Miscellaneous code readability improvements.
2509
2510 * src/reader.c (reader): Move %define front-end variable
2511 defaults and checking into...
2512 (prepare_percent_define_front_end_variables): ... this new
2513 function.
2514
2515 * src/scan-gram.l (INITIAL): For consistency with string
2516 literals, don't store open quote on character literal. It's
2517 discarded before returning anyway.
2518 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2519 Make length test more readable, and make the character stored
2520 for an empty literal more obvious while consistent with the
2521 previous behavior.
2522
2523 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2524 USER_NUMBER_HAS_STRING_ALIAS throughout.
2525 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2526 that is repeated in symtab.h. Improve argument names to make it
2527 clear which side of the symbol-string alias pair is which.
2528 (symbol_check_alias_consistency): Improve local variable names
2529 for the same purpose.
2530 * src/symtab.h (struct symbol): Make comments about aliases
2531 clearer.
2532 (symbol_make_alias): Improve comments and argument name.
2533 * src/output.c (token_definitions_output): Update for rename to
2534 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2535
ce268795
AR
25362009-08-08 Alex Rozenman <rozenman@gmail.com>
2537
2538 Convert "misleading reference" messages to warnings.
2539 * src/scan-code.l: New function 'show_sub_messages', more
2540 factoring.
2541 * tests/named-ref.at: Adjust tests.
2542
401b73af
JD
25432009-08-06 Joel E. Denny <jdenny@clemson.edu>
2544
2545 maint: run "make update-copyright"
2546
a1a9422d
JD
25472009-08-06 Joel E. Denny <jdenny@clemson.edu>
2548
2549 maint: make update-b4-copyright easier to use
2550 * build-aux/update-b4-copyright: In warnings, report line
2551 numbers rather than character positions.
2552 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2553 that update-copyright runs it.
2554 * gnulib: Update.
2555
0b61a8ec
JD
25562009-08-05 Joel E. Denny <jdenny@clemson.edu>
2557
2558 maint: clean up update-b4-copyright code
2559 * build-aux/update-b4-copyright: Do not accept 2-digit
2560 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2561 Don't accept a `[' in a b4_copyright argument.
2562 Format code more consistently.
2563 Don't assume b4*copyright never occurs.
2564
269e222e
JD
25652009-08-04 Joel E. Denny <jdenny@clemson.edu>
2566
2567 maint: automate b4_copyright updates.
2568 * Makefile.am (update-b4-copyright): New target rule.
2569 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
2570 * build-aux/update-b4-copyright: New.
2571 * data/yacc.c: Remove stray characters around b4_copyright
2572 invocations.
2573
35905f2b
JD
25742009-08-04 Joel E. Denny <jdenny@clemson.edu>
2575
2576 maint: automate annual package-wide copyright-year update.
2577 * .x-update-copyright: New.
2578 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2579 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2580 update-copyright. Remove gnumakefile, which is implied by
2581 maintainer-makefile.
2582 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2583 * gnulib: Update.
2584 * maint.mk: Remove, now copied from gnulib.
2585 * examples/extexi: Add missing "(C)" in copyright statement so
2586 update-copyright can recognize it.
2587 * src/LR0.h: Likewise.
2588 * src/print.h: Likewise.
2589 * src/print_graph.h: Likewise.
2590 * src/gram.c: Add missing comma in copyright statement.
2591 * src/gram.h: Likewise.
2592
b30e18dc
JD
25932009-08-04 Joel E. Denny <jdenny@clemson.edu>
2594
2595 Fix "make distcheck".
2596 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2597 of just calc.stamp.
2598
8d90395d
JD
25992009-08-01 Joel E. Denny <jdenny@clemson.edu>
2600
2601 Pacify "gcc -Wunused" for the input function from Flex.
2602 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2603 and later.
2604 * src/scan-code.l: Add "%option noinput", which I cannot find in
2605 the Flex manual, but which Flex has supported since at least as
2606 far back as 2.5.4. However, if any of our developers still use
2607 Flex 2.5.4, they'll need to stop configuring with
2608 --enable-gcc-warnings because "%option noinput" didn't work
2609 correctly until Flex 2.5.6.
2610 * src/scan-gram.l: Likewise.
2611 * src/scan-skel.l: Likewise.
2612
ba4184ec
AR
26132009-07-31 Alex Rozenman <rozenman@gmail.com>
2614
2615 Fix --enable-gcc-warnings problems.
2616 * src/reader.c: Adjust variable names.
2617 * src/scan-code.l: Fix prototypes and adjust names.
2618 * src/named-ref.c: Remove redundant "if".
2619
91a2af97
JD
26202009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2621
2622 Fix a --enable-gcc-warnings problem.
2623 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2624 variable.
2625
3208e3f4
JD
26262009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2627
2628 Warn about character literals not of length one.
2629 * NEWS (2.5): Document.
2630 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2631 the length.
2632 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2633 * tests/input.at (Bad character literals): New test group.
2634
5add20ab 26352009-07-24 Alex Rozenman <rozenman@gmail.com>
13cdf208
AR
2636
2637 Fix some memory leaks.
2638 * src/named-ref.c: Add a pointer check (named_ref_free).
2639 * src/scan-code.l: New function (variant_table_free). Called in
2640 code_scanner_free.
2641 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2642
e459fb0e
JD
26432009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2644
2645 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2646
c4be5517
JD
26472009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2648
2649 Some M4 cleanup in the testsuite.
2650 Suggested by Eric Blake at
2651 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2652 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2653 complicate the code by distinguishing between a missing value
2654 and an empty string value for an optional argument. This fix is
2655 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2656 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2657 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2658 arguments are not needed because of the following changes.
2659 Fix stale comments.
2660 Bison developers should use GNU M4 and should not use
2661 POSIXLY_CORRECT when building the test suite, so do not
2662 complicate the code by avoiding $10 and above.
2663 Do not quote an empty string value for an optional argument, and
2664 do not distinguish between a missing value and an empty string
2665 value.
2666
feeb56cd
JD
26672009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2668
2669 Revert unnecessary column realignment in --help output.
2670 Reported by Akim Demaille at
2671 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2672 * src/getargs.c (usage): Here.
2673
5add20ab 26742009-07-04 Alex Rozenman <rozenman@gmail.com>
629e4def
AR
2675
2676 Alphabetical order in src/local.mk.
2677 * src/local.mk: Adjust.
2678
5add20ab 26792009-07-04 Alex Rozenman <rozenman@gmail.com>
872b52bc
AR
2680
2681 Style changes and factoring.
2682 * src/named-ref.h: Add comments.
2683 * src/parse-gram.y: Readability and style changes.
2684 * src/reader.c: Factoring: assign_named_ref function.
2685 * src/scan-code.l: Factoring and style changes. Rename
2686 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2687 Use "unsigned" type for variant index. Improve readablity.
2688 * src/scan-gram.l: Change error messages and add comments.
2689 * src/symlist.h: symbol_list_null: New function decl.
2690 * src/symlist.c: symbol_list_null: Implement here.
2691 * tests/named-refs.at: Adjust for new error messages.
2692
83ea2423
EB
26932009-06-29 Eric Blake <ebb9@byu.net>
2694
2695 scan-code: avoid compiler warnings
2696 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2697
5ece73ea
AD
26982009-06-29 Akim Demaille <demaille@gostai.com>
2699
2700 build: avoid concurrent extraction of calc++.
2701 * examples/calc++/Makefile.am (calc.stamp): New.
2702 Depend on it to create the sources of calc++ so that concurrent
2703 builds don't launch several "extexi" in parallel.
2704 Not only this is inefficient, this also builds incorrect sources
2705 with several extractions mixed together.
2706
ad597a78
AD
27072009-06-29 Akim Demaille <demaille@gostai.com>
2708
2709 parse.error: fix.
2710 * data/bison.m4: Move code related to specific variables after the
2711 definition of the variable-maintaining macros so that we don't
2712 "invoke" b4_percent_define_check_values before it is defined.
2713
31b850d2
AD
27142009-06-29 Akim Demaille <demaille@gostai.com>
2715
2716 variables: parse.error
2717
2718 Implement, document, and test the replacement of %error-verbose
2719 by %define parse.error "verbose".
2720 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2721 values of the parse.error variable.
2722 Make "simple" its default value.
2723 Check the valid values.
2724 * src/parse-gram.y: Use %define parse.error.
2725 (PERCENT_ERROR_VERBOSE): New token.
2726 Support it.
2727 * src/scan-gram.l: Support %error-verbose.
2728
2729 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2730 %define error-verbose by that of %define parse.error.
2731 * NEWS: Document it.
2732
2733 * tests/actions.at, tests/calc.at: Use parse.error instead of
2734 %error-verbose.
2735
b9f1d9a4
AR
27362009-06-27 Alex Rozenman <rozenman@gmail.com>
2737
2738 Implement support for named symbol references.
2739 * src/parse-gram.y: Add new syntax (named_ref.opt).
2740 * src/reader.c: Store named refs in symbol lists.
2741 * src/reader.h: New argument for symbol_append and
2742 action_append functions.
2743 * src/scan-code.h: Add new field (named_ref) into
2744 code_props data structure. Keeps named ref of midrule
2745 actions.
2746 * src/scan-code.l: Support for named refs in semantic
2747 action code. New function 'parse_named_ref'.
2748 * src/scan-gram.l: Support bracketed id.
2749 * src/symlist.c: Store named refs in symbol lists.
2750 * src/symlist.h: New field in symbol list: named_ref.
2751 * src/named-ref.h: New file, a struct for named_ref.
2752 * src/named-ref.cp: New file, named_ref_new function.
2753 * src/local.mk: Add two new files.
2754 * tests/testsuite.at: Include new test group:
2755 * tests/named-refs.at: this new file.
2756
b5c212b6
AD
27572009-06-25 Akim Demaille <demaille@gostai.com>
2758
2759 hash: check insertion for memory exhaustion.
2760 * src/uniqstr.c (uniqstr_new): New.
2761
67501061
AD
27622009-06-24 Akim Demaille <demaille@gostai.com>
2763
2764 variables: rename namespace as api.namespace.
2765 Discussed in
2766 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2767
2768 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2769 New.
2770 (b4_percent_define_use): New.
2771 Use it where applicable.
2772 * data/c++.m4: Replace uses of the variable "namespace" by
2773 "api.namespace".
2774 Default the latter to the former.
2775 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2776 obsolete.
2777 Document api.namespace.
2778 Use @samp to document %define uses, keep @code for identifiers.
2779 * NEWS: Likewise.
2780 * tests/c++.at, tests/input.at: Test api.namespace instead of
2781 namespace. (The tests passed with namespace.)
2782
41976786
AD
27832009-06-11 Akim Demaille <demaille@gostai.com>
2784
2785 style changes.
2786 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2787 * src/print-xml.c: Style changes.
2788 * tests/conflicts.at: Comment changes.
2789
44bb9084
AD
27902009-06-11 Akim Demaille <demaille@gostai.com>
2791
2792 xml: beware of user strings used to give a %prec to rules.
2793 * tests/conflicts.at (%prec with user strings): New.
2794 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2795 XML output.
2796
04d1e39d
AD
27972009-06-11 Akim Demaille <demaille@gostai.com>
2798
2799 hash: check insertion for memory exhaustion.
2800 * src/muscle-tab.c (muscle_insert, muscle_grow)
2801 * src/state.c (state_hash_insert): Check the return value of
2802 hash_insert.
2803
a8873669
AD
28042009-06-11 Akim Demaille <demaille@gostai.com>
2805
2806 tests: honor TESTSUITEFLAGS in every check target.
2807 * tests/local.mk (RUN_TESTSUITE): New.
2808 (check-local, installcheck-local, maintainer-check-g++)
2809 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2810
8893145a
AD
28112009-06-10 Akim Demaille <demaille@gostai.com>
2812
2813 deterministic test suite.
2814 Some consistency checks on symbols are performed after all the
2815 symbols were read, by an iteration over the symbol table. This
2816 traversal is nondeterministic, which can be a problem for test
2817 cases.
2818 Avoid this.
2819 Addresses another form of nondeterminism reported by Joel E. Denny.
2820 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2821
2822 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2823 test in two.
2824 Use different file names for the three tests to make the
2825 maintenance easier.
2826
92d7a23a
AD
28272009-06-10 Akim Demaille <demaille@gostai.com>
2828
2829 gnulib: update.
b0778bdd
EB
2830 * gnulib: Update to latest.
2831 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2832 * m4/.gitignore: Regen.
2833 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2834 Call xalloc_die on hash_insert failures.
2835 Requested by the new __warn_unused_result__ attribute of
2836 hash_insert.
92d7a23a 2837
12cf133f
AD
28382009-06-10 Akim Demaille <demaille@gostai.com>
2839
2840 deterministic user-token-number redeclaration errors.
2841 Address nondeterminism reported by Joel E. Denny.
2842 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2843
2844 * src/uniqstr.h: Comment changes.
2845 * src/location.h (boundary_cmp, location_cmp): New.
2846 * src/symtab.c (user_token_number_redeclaration): New.
2847 (symbol_translation): Use it.
2848 * tests/input.at (Numbered tokens): Adjust the expected output.
2849
796a2b0a
AD
28502009-05-25 Akim Demaille <demaille@gostai.com>
2851
2852 build: avoid ignored errors.
2853 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2854 errors, they pollute the output.
2855
0b6d43c5
JD
28562009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2857
2858 Convert multiple variable definition warnings to complaints.
2859 * NEWS (2.5): Add a new entry for that change.
2860 * doc/bison.texinfo (Decl Summary): Update %define entry.
2861 (Bison Options): Update -D/--define/-F/--force-define entry.
2862 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2863 * src/muscle-tab.h (muscle_percent_define_insert): Update
2864 comments.
2865 * tests/input.at (`%define errors'): Update.
2866 (`%define, --define, --force-define'): Update.
2867
de5ab940
JD
28682009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2869
2870 -F/--force-define and relative %define/-D/--define priorities.
2871 * NEWS (2.5): Add documentation to -D/--define entry.
2872 * build-aux/cross-options.pl: Hard-code association of
2873 --force-define with %define.
2874 * doc/bison.texinfo (Decl Summary): In %define entry,
2875 cross-reference command-line options.
2876 (Bison Options): Add documentation to -D/--define entry.
2877 (Option Cross Key): Widen column for --force-define row.
2878 * src/getargs.c (usage): Document -F/--force-define. Realign
2879 options in output.
2880 (short_options, long_options, getargs): Parse -F/--force-define,
2881 and update muscle_percent_define_insert invocations.
2882 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2883 (muscle_percent_define_insert): Add argument with that type.
2884 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2885 -F/--force-define behavior and priorities.
2886 (muscle_percent_define_ensure): Update
2887 muscle_percent_define_insert invocation.
2888 * src/parse-gram.y (prologue_declaration): Update
2889 muscle_percent_define_insert invocations.
2890 * tests/input.at (`%define, --define'): Rename to...
2891 (`%define, --define, --force-define'): ... this and extend.
2892
f8e7258f
JD
28932009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2894
2895 Update some comments to make sense for -D.
2896 * data/bison.m4 (b4_check_user_names): In header comments, say
2897 "user occurrence" instead of "grammar occurrence".
2898 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2899 (muscle_percent_code_grow): Likewise just for consistency.
2900
b987342b
JD
29012009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2902
2903 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2904
4977e0a7
JD
29052009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2906
2907 Handle a trailing `:' in a user-supplied C++ namespace better.
2908 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2909 among the closing braces here. This fix might make the
2910 generated code easier to debug, but otherwise it should be
2911 insignificant because a trailing `:' is a C++ error already.
2912
9b04dad7
AD
29132009-05-19 Akim Demaille <demaille@gostai.com>
2914
2915 remove useless variable.
2916 * src/getargs.c (skeleton_arg): Remove now useless variable.
2917 Should help the compiler see that this printf-like call is sane.
2918
4c6622c2
AD
29192009-05-15 Akim Demaille <demaille@gostai.com>
2920
2921 Rename token.prefix as api.tokens.prefix.
2922 Discussed here.
2923 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2924
2925 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2926 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2927 (token.prefix): Rename as...
2928 (api.tokens.prefix): this.
2929
3c248d70
AD
29302009-05-11 Akim Demaille <demaille@gostai.com>
2931
2932 doc: use C++ headers.
2933 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2934 headers.
2935
99c08fb6
AD
29362009-05-11 Akim Demaille <demaille@gostai.com>
2937
2938 doc: token.prefix
2939 * doc/bison.simple (Decl Summary): Document token.prefix.
2940 (Calc++ Parser): Various fixes.
2941 Formatting changes.
2942 Use token.prefix.
2943 Introduce a macro TOKEN to shorten the code and make it more
2944 readable.
2945 (Calc++ Scanner): Adjust.
2946 * NEWS (Variable token.prefix): New.
2947
84a1cb5a
AD
29482009-05-04 Akim Demaille <demaille@gostai.com>
2949
2950 bison: catch bad symbol names.
2951 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2952 * tests/input.at: Adjust.
2953
cdf3f113
AD
29542009-05-04 Akim Demaille <demaille@gostai.com>
2955
2956 identifiers: dashes are letters.
2957 Dashes can now start identifiers (symbols and directives).
84a1cb5a 2958
cdf3f113
AD
2959 * src/scan-gram.l ({letter}): Add dash.
2960 ({id}): Remove it.
2961 * tests/input.at (Symbols): Adjust.
2962 Remove stray comment.
2963 * tests/regression.at (Invalid inputs): Adjust error message.
2964 * doc/bison.texinfo (Symbols): Update.
2965
98a345a2
JD
29662009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2967
2968 Declare %code to be a permanent feature.
2969 * NEWS (2.4.2): Here.
2970 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2971 experimental.
2972 (Decl Summary): Likewise.
2973
67212941
JD
29742009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2975
2976 Convert underscores to dashes in some %define variable names.
2977 For now, just api.push-pull and lr.keep-unreachable-states.
2978 Maintain old names for backward compatibility.
2979 * NEWS (2.5): Document.
2980 * data/c.m4 (b4_identification): Update comment.
2981 * data/yacc.c: Update access.
2982 * doc/bison.texinfo: Update.
2983 * etc/bench.pl.in (bench_push_parser): Update use.
2984 * src/files.c (tr): Move to...
2985 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2986 think of a better place to expose it. My logic is that, for all
2987 uses of tr so far, command-line arguments can be involved, and
2988 getargs.h is already included.
2989 * src/main.c (main): Update access.
2990 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2991 variable names to new variable names before assigning value.
2992 * src/reader.c (reader): Update setting default.
2993 * tests/calc.at: Update uses.
2994 * tests/conflicts.at (Unreachable States After Conflict
2995 Resolution): Update use.
2996 * tests/input.at (%define enum variables): Update use.
2997 (%define backward compatibility): New test group.
2998 * tests/push.at: Update uses.
2999 * tests/reduce.at: Update uses.
3000 * tests/torture.at: Update uses.
3001
ba5c6d94
JD
30022009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
3003
3004 Set all front-end %define defaults in one place.
3005 * src/main.c (main): Move lr.keep_unreachable_states default...
3006 * src/reader.c (reader): ... to here.
3007
5bab9d08
JD
30082009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
3009
3010 Rename lr.default_reductions to lr.default-reductions.
3011 * NEWS (2.5): Here.
3012 * doc/bison.texinfo: Here.
3013 * src/lalr.c (initialize_LA): Here.
3014 * src/print.c (print_reductions): Here.
3015 * src/reader.c (reader): Here.
3016 * src/tables.c (action_row): Here.
3017 * tests/input.at (%define enum variables): Here.
3018 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
3019
d521ee19
JD
30202009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
3021
3022 Pacify ./configure --enable-gcc-warnings.
3023 * tests/input.at (Symbols): Prototype yyerror and yylex.
3024
30252009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
c9aded4b
JD
3026
3027 Document how `%define "var" "value"' is not M4-friendly.
3028 * src/parse-gram.y (variable): In comments here.
3029
8f0d265e
JD
30302009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
3031
3032 Clean up recent patches a little.
3033 Reported by Akim Demaille.
3034 * doc/bison.texinfo (Understanding): Fix typos.
3035 * src/print.c (print_reductions): Don't use negated variable.
3036
f4909773
JD
30372009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
3038
3039 List accepted values for a %define enum variable with an invalid value.
3040 Suggested by Akim Demaille at
3041 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
3042 * data/bison.m4 (_b4_percent_define_check_values): Implement.
3043 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
3044 * tests/input.at (%define lr.default_reductions invalid values): Merge
3045 into...
3046 (%define enum variables): ... here, and update output.
3047
110ef36a
JD
30482009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
3049
3050 Rename "default rule" to "default reduction".
3051 This includes changing variable names in code, changing
3052 comments, and renaming %define lr.default_rules to %define
3053 lr.default_reductions.
3054 * NEWS (2.5): Update IELR documentation.
3055 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
3056 documentation.
3057 * data/glr.c, data/lalr1.java: Sync copyright dates.
3058 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
3059 and lr.type documentation. Make some other wording
3060 improvements.
3061 (Glossary): Adjust cross-references and Default Reduction
3062 definition.
3063 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
3064 Remove a confusing comment pointed out by Akim Demaille.
3065 (initialize_LA): Adjust code.
3066 * src/print-xml.c (print_reductions): Adjust code.
3067 * src/print.c (print_reductions): Adjust code.
3068 * src/reader.c (reader): Adjust code.
3069 * src/tables.c (action_row): Adjust code.
3070 (token_actions): Adjust code.
3071 * src/tables.h: Adjust YYDEFACT documentation.
3072 * tests/input.at (%define lr.default_rules invalid values):
3073 Rename test group to...
3074 (%define lr.default_reductions invalid values): ... this, and
3075 update grammar file and expected output.
3076 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
3077 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
3078
746ee38c
AD
30792009-04-21 Akim Demaille <demaille@gostai.com>
3080
3081 tests: check the use of dashes and periods in symbols.
3082 * tests/input.at (Symbol): New test group.
3083
eb45ef3b
JD
30842009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3085
3086 Document %define lr.type and lr.default_rules.
3087 * NEWS (2.5): Add an entry.
3088 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
3089 besides just LALR(1) and GLR(1).
3090 * doc/bison.texinfo (Introduction): Likewise.
3091 (Language and Grammar): Bison is no longer limited to LALR(1)
3092 restrictions.
3093 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
3094 when trying to distinguish from GLR. Talk about LR(1) grammars
3095 rather than LALR(1) grammars.
3096 (Decl Summary): In %define api.push_pull entry, say it applies
3097 to deterministic parsers in C rather than LALR(1) parsers in C.
3098 Add lr.default_rules entry.
3099 Add lr.type entry.
3100 (Mystery Conflicts): Bison is no longer limited to LALR(1)
3101 restrictions.
3102 (Generalized LR Parsing): Same changes as for the previous GLR
3103 section.
3104 (Memory Management): Say deterministic rather than LALR(1).
3105 (Understanding): Correct some bison output.
3106 Index discussion of "accepting state".
3107 Say deterministic rather than LALR(1).
3108 (Bison Options): In --yacc entry, say deterministic rather than
3109 LALR(1).
3110 In --report, --graph, and --xml entries, just don't mention
3111 LALR(1).
3112 (C++ Parsers): Say deterministic rather than LALR(1).
3113 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
3114 (Glossary): Add Accepting State, Consistent State, Default Rule,
3115 and IELR(1) definitions.
3116 In Generalized LR (GLR) definition, make same changes as in
3117 previous GLR sections.
3118 In LALR(1) definition, say Bison uses LALR(1) by default rather
3119 than implying Bison is limited to LALR(1).
3120 (LocalWords): Add IELR.
3121
db34f798
JD
31222009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3123
3124 Finish implementing %define lr.type.
3125 Its value can be "LALR", "IELR", or "canonical LR".
3126 * lib/timevar.def (TV_IELR_PHASE1): New var.
3127 (TV_IELR_PHASE2): New var.
3128 (TV_IELR_PHASE3): New var.
3129 (TV_IELR_PHASE4): New var.
3130 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
3131 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
3132 Sbitset.h, ielr.h, and ielr.c.
3133 * src/getargs.h, src/getargs.c (enum trace, trace_args,
3134 trace_types): Add trace_ielr.
3135 * src/lalr.h, src/lalr.c (ngotos): Export it.
3136 (F): Rename to...
3137 (goto_follows): ... this, update all uses, and export it.
3138 (set_goto_map): Export it.
3139 (map_goto): Export it.
3140 (compute_lookahead_tokens): Don't free goto_follows yet. Now
3141 handled in ielr.
3142 (initialize_LA): Export it. Move lookback allocation to...
3143 (lalr): ... here because, for canonical LR, initialize_LA must
3144 be invoked but lookback and much of the rest of LALR isn't
3145 needed.
3146 * main.c (main): Instead of lalr, invoke ielr, which invokes
3147 lalr.
3148 * src/reader.c (reader): Default lr.type to "LALR".
3149 Default lr.default_rules to "accepting" if lr.type is "canonical
3150 LR". Leave the default as "all" otherwise.
3151 Check for a valid lr.type value.
3152 * src/state.h, src/state.c (struct state_list): Add state_list
3153 member.
3154 (state_new): Initialize state_list member to NULL.
3155 (state_new_isocore): New function, exported.
3156 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
3157 exercises all values of lr.type.
3158 (GNU AWK Grammar): Rename test group to...
3159 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
3160 AT_TEST_EXISTING_GRAMMAR.
3161 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
3162 (GNU pic Grammar): Rename test group to...
3163 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
3164 AT_TEST_EXISTING_GRAMMAR.
3165 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
3166 all values of lr.type.
3167 (Single State Split): New test groups using AT_TEST_LR_TYPE.
3168 (Lane Split): Likewise.
3169 (Complex Lane Split): Likewise.
3170 (Split During Added Lookahead Propagation): Likewise.
3171
7fe11bb5
JD
31722009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3173
3174 Add new files for IELR and canonical LR implementation.
3175 * src/AnnotationList.c: New.
3176 * src/AnnotationList.h: New.
3177 * src/InadequacyList.c: New.
3178 * src/InadequacyList.h: New.
3179 * src/Sbitset.c: New.
3180 * src/Sbitset.h: New.
3181 * src/ielr.c: New.
3182 * src/ielr.h: New.
3183
7254f6a8
JD
31842009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3185
3186 Implement %define lr.default_rules.
3187 Its value describes the states that are permitted to contain
3188 default rules: "all", "consistent", or "accepting".
3189 * src/reader.c (reader): Default lr.default_rules to "all".
3190 Check for a valid lr.default_rules value.
3191 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
3192 is "accepting", then only mark the accepting state as
3193 consistent.
3194 (initialize_LA): Tell state_lookahead_tokens_count whether
3195 lr.default_rules is "accepting".
3196 * src/tables.c (action_row): If lr.default_rules is not "all",
3197 then disable default rules in inconsistent states.
3198 * src/print.c (print_reductions): Use this opportunity to
3199 perform some assertions about whether lr.default_rules was
3200 obeyed correctly.
3201 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
3202 helps with checking the parser tables for a grammar.
3203 * tests/input.at (%define lr.default_rules invalid values): New
3204 test group.
3205 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
3206 AT_TEST_TABLES_AND_PARSE.
3207 (`no %define lr.default_rules'): New test group generated by
3208 AT_TEST_LR_DEFAULT_RULES.
3209 (`%define lr.default_rules "all"'): Likewise.
3210 (`%define lr.default_rules "consistent"'): Likewise.
3211 (`%define lr.default_rules "accepting"'): Likewise.
3212
72e727f2
AD
32132009-04-20 Akim Demaille <demaille@gostai.com>
3214
3215 Formatting change.
3216
90462b8d
AD
32172009-04-20 Akim Demaille <demaille@gostai.com>
3218
3219 bison: factoring.
3220 * src/output.c (token_definitions_output): Use symbol_id_get
3221 instead of duplicating its logic.
3222 * TODO (YYERRCODE): Extend.
3223
4f646c37
AD
32242009-04-20 Akim Demaille <demaille@gostai.com>
3225
71b00ed8
AD
3226 variables: prefer error-verbose to error_verbose.
3227 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
3228 instead of error_verbose.
3229 * src/scan-gram.l (%error-verbose): Map to the error-verbose
3230 variable.
3231 * doc/bison.texinfo: Promote %define error-verbose instead of
3232 %error-verbose.
3233 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
3234
32352009-04-15 Akim Demaille <demaille@gostai.com>
3236
4f646c37
AD
3237 variables: accept dashes.
3238 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
3239 underscores.
3240 * src/scan-gram.l ({id}): Also accept dashes after the initial
3241 letter.
3242 ({directive}): Use {id}.
3243 * src/parse-gram.y: Comment and formatting changes.
3244 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
3245 symbols.
3246 * src/complain.h, src/complain.c (yacc_at): New.
3247 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
3248 symbol names.
3249 * src/output.c (token_definitions_output): Do not #define token
3250 names with dashes.
3251
184e3179
AD
32522009-04-20 Akim Demaille <demaille@gostai.com>
3253
3254 Consistently refer to Yacc, not YACC.
3255 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
3256
41253c3a
JD
32572009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
3258
3259 Pacify make maintainer-check-posix.
3260 * tests/input.at (%define, --define): Move bison command-line
3261 options before grammar file name.
3262
197b82ba
JD
32632009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3264
3265 Document semicolon warnings.
3266 * NEWS (2.5): Here.
3267
0c90a1f5
AD
32682009-04-14 Akim Demaille <demaille@gostai.com>
3269
3270 variables: use `parse.assert' instead of `assert'.
3271 * TODO (assert): Remove.
3272 * data/bison.m4 (b4_assert_if): Replace with...
3273 (b4_parse_assert_if): this.
3274 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
3275 * doc/bison.texinfo (Decl Summary): Document parse.assert.
3276
fa819509
AD
32772009-04-14 Akim Demaille <demaille@gostai.com>
3278
16dc0d90 3279 variables: use `parse.trace' instead of `debug'.
fa819509
AD
3280 * src/getargs.c (getargs): Map -t to %define trace.parse.
3281 * src/scan-gram.l (%debug): Map to %define trace.parse.
3282 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
3283 names to `_' in macro names.
3284 (b4_debug_if): Replace with...
3285 (b4_parse_trace_if): this.
3286 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3287 * data/yacc.c: Adjust.
3288 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
3289 Use @code to label the variable list.
3290 Document the variable parse.trace.
3291 (Tracing): Promote the parse.trace variable.
3292 * TODO: %printer is not documented.
3293
f7dae1ea
AD
32942009-04-14 Akim Demaille <demaille@gostai.com>
3295
3296 doc: minor fixes.
3297 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
3298 (Table of Symbols): Remove duplicate entry for %debug.
3299
3535c071
EB
33002009-04-10 Eric Blake <ebb9@byu.net>
3301
3302 submodules: update to latest
3303 * submodules/autoconf: Use latest upstream Autoconf.
3304
cf48f675
EB
33052009-04-06 Eric Blake <ebb9@byu.net>
3306
3307 Work around autoconf 2.63b bug in testsuite.
3308 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
3309 autoconf bug related to # in test.
3310
50cca368
JD
33112009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3312
3313 * NEWS (2.5): New section. Describe new -D/--define feature.
3314
3583d96b
AD
33152009-04-06 Akim Demaille <demaille@gostai.com>
3316
3317 Regen.
3318 * src/parse-gram.h, src/parse-gram.c: Regen.
3319
00f5d575
AD
33202009-04-06 Akim Demaille <demaille@gostai.com>
3321
3322 rename muscle_tab.* as muscle-tab.* for consistency.
3323 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
3324 * src/muscle-tab.h, src/muscle-tab.c: these.
3325 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
3326 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
3327
76bf5102
AD
33282009-04-06 Akim Demaille <demaille@gostai.com>
3329
3330 Makefile: introduce $(BISON).
3331 * src/local.mk (BISON): New.
3332 (YACC): Use it.
3333
bc0f5737
AD
33342009-04-06 Akim Demaille <demaille@gostai.com>
3335
3336 parser: handle %locations as %define locations.
3337 * src/getargs.h, src/getargs.c (locations_flag): Remove.
3338 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
3339 to set "locations" to true.
3340 * src/output.c (prepare): Don't output "locations".
3341 * src/scan-gram.l (%locations): Handle it as a %<flag>.
3342 * src/parse-gram.y: It's no longer a token.
3343 Don't handle it.
3344 * data/bison.m4 (b4_locations_if): Define it with
3345 b4_percent_define_if_define.
3346 * data/c.m4, data/glr.cc: Adjust.
3347
697c912f
AD
33482009-04-06 Akim Demaille <demaille@gostai.com>
3349
3350 Regen.
3351 * src/parse-gram.c: Regen.
3352
4920ae8b
AD
33532009-04-06 Akim Demaille <demaille@gostai.com>
3354
3355 muscle: factor the handling of obsolete of obsolete directives.
3356 Suggested by Joel E. Denny.
50cca368 3357
4920ae8b
AD
3358 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
3359 New, extracted from...
3360 * src/parse-gram.y (prologue_declaration: pure-parser): here.
3361 Remove it.
3362 (prologue_declaration: "%<flag>"): Use
3363 muscle_percent_define_ensure.
3364 (%error-verbose, %pure-parser): No longer tokens.
3365 * src/scan-gram.l (pure-parser): Return as a %<flag>.
3366
1d5b3c08
JD
33672009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3368
3369 Fix options documentation.
3370 * build-aux/cross-options.pl: As in --help output, write optional
3371 arguments as [=ARG] not =[ARG].
3372 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
3373
62c99cf4
JD
33742009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3375
3376 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
3377 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
3378 requirements for a correct m4 are stricter.
3379 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
3380 * configure.ac: Update to use AC_PROG_GNU_M4.
3381 Reported by Eric Blake.
3382
1c93f35b
JD
33832009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3384
3385 Help with updating web manual.
3386 * HACKING: Incorporate instructions from gnulib/doc/README.
3387 * bootstrap.conf (gnulib_modules): Add gendocs.
3388
86cfae0a
AD
33892009-04-03 Akim Demaille <demaille@gostai.com>
3390
3391 Regen.
3392 * src/parse-gram.h, src/parse-gram.c: Regen.
3393
ba061fa6
AD
33942009-04-03 Akim Demaille <demaille@gostai.com>
3395
3396 Factor %FLAG at scan level.
3397 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
3398 definitions and associated rules, replaced by....
3399 (PERCENT_FLAG): this new token type, and rule.
3400 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
3401 Use it for %debug and %error-verbose.
3402
b19ebeb3
AD
34032009-04-03 Akim Demaille <demaille@gostai.com>
3404
3405 Regen.
3406 * src/parse-gram.h, src/parse-gram.c: Regen.
3407
001a16a9
AD
34082009-04-03 Akim Demaille <demaille@gostai.com>
3409
3410 Treat %debug as %define debug.
3411 * data/bison.m4 (b4_debug_if): New.
3412 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
3413 * data/lalr1.java: Use it instead of b4_debug_flag.
3414 * src/getargs.h, src/getargs.c (debug_flag): Remove.
3415 * src/output.c (prepare): Don't output it.
3416 * src/parse-gram.y: Treat %debug as %define debug.
3417
34182009-04-03 Akim Demaille <demaille@gostai.com>
3419
3420 Treat %error-verbose as %define error_verbose.
3421 This allows to pass -Derror_verbose on the command line. Better
3422 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
3423 ERROR_VERBOSE being defined as false or true.
3424 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
3425 on b4_percent_define_ifdef, for does not check the defined value,
3426 but only whether the symbol is defined, rely on
3427 b4_percent_define_flag_if, so that a value of "false" is processed
3428 as a false.
3429 If not defined, define the flag to "false".
3430 (b4_error_verbose_if): New.
3431 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
3432 b4_error_verbose_flag.
3433 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
3434 * src/output.c (prepare): Don't output it.
3435 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
3436
92822aff
JD
34372009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3438
3439 Fix strange %define locations for default values.
3440 Reported by Akim Demaille at
3441 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
3442 and discussed again starting at
3443 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
3444 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
3445 because location information is bogus.
3446 Use angle brackets to delimit fake file name because square brackets
3447 look like underexpanded m4. Choose a better fake file name.
3448 Use negative line numbers.
3449 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
3450 * src/location.c (location_print): If line for a boundary is negative,
3451 only print that boundary's file name.
3452 * src/location.h: Document that.
3453 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3454 defaults): Update output.
3455
e021191b
JD
34562009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3457
3458 Pacify ./configure --enable-gcc-warnings.
3459 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
3460 in lib won't compile with it.
3461 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
3462
78f65418
AD
34632009-03-31 Akim Demaille <demaille@gostai.com>
3464
3465 bootstrap: --help to stdout.
3466 * bootstrap (usage): Don't send --help to stderr.
3467 Use a here doc instead of a long string.
3468
f7e241f4
AD
34692009-03-31 Akim Demaille <demaille@gostai.com>
3470
3471 bootstrap: README-hacking no longer exists
3472 * bootstrap (checkout_only_file): Set to HACKING.
3473
31d3e510
AD
34742009-03-26 Akim Demaille <demaille@gostai.com>
3475
3476 doc: merge HACKING and README-hacking.
3477 Two files is confusing.
3478 Reported by Alexandre Duret-Lutz.
1f9d8248 3479
31d3e510
AD
3480 * README-hacking: Merge into...
3481 * HACKING (Working from the repository): here.
3482
81535bfa
AD
34832009-03-26 Akim Demaille <demaille@gostai.com>
3484
3485 doc: update README-hacking.
3486 * README-hacking: We now use git and git submodules.
3487 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
3488
56f772e9
AD
34892009-03-26 Akim Demaille <demaille@gostai.com>
3490
3491 lalr1.cc: avoid GCC 4.3 warnings.
3492 GCC 4.3 now warns about "a || b && c" and asks for explicit
3493 parentheses.
3494 Reported by Alexandre Duret-Lutz.
3495 * data/location.cc: Update copyright years.
3496 (Position::operator==): Use parens to make precedence explicit.
3497 Compare lines and columns first, as they are more likely to be
3498 different, and they are faster to compare.
3499
11c073b7
AD
35002009-03-26 Akim Demaille <demaille@gostai.com>
3501
3502 gnulib: update.
3503 * gnulib: Update to latest.
3504 * src/local.mk (AM_CFLAGS): Move to...
3505 * Makefile.am: here.
3506 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
3507 AM_CFLAGS.
3508
91be6b28
AD
35092009-03-02 Akim Demaille <demaille@gostai.com>
3510
3511 Comment changes.
3512
cbf25ce7
AD
35132009-03-02 Akim Demaille <demaille@gostai.com>
3514
3515 Share b4_yytranslate_define.
3516 * data/lalr1.cc (b4_yytranslate_define): Move to...
3517 * data/c++.m4: here.
3518
882f02ed
AD
35192009-03-02 Akim Demaille <demaille@gostai.com>
3520
3521 Use locations in the variant example.
1f9d8248
AD
3522 Yes, this obfuscates the point of this example, variants only.
3523 But glr.cc cannot work (yet?) without locations. This change
3524 makes it easier to use this example with glr.cc.
11c073b7 3525
882f02ed
AD
3526 * examples/variant.yy (assert): %define it.
3527 (locations): Request them.
3528 (yylex): Bind the location to the stage.
3529
0623bacc
AD
35302009-03-02 Akim Demaille <demaille@gostai.com>
3531
3532 Dub make_TOKEN as a public type interface.
3533 * data/c++.m4 (b4_symbol_constructor_declare)
3534 (b4_symbol_constructor_define): New empty stubs.
3535 (b4_public_types_declare, b4_public_types_define): Use them.
3536 * data/lalr1.cc (b4_symbol_constructor_declare)
3537 (b4_symbol_constructor_declare_)
3538 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
3539 Move to...
3540 * data/variant.hh: here.
3541 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
3542 needed.
3543 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
3544 b4_symbol_constructor_declare, as it is now done by
3545 b4_public_types_define and b4_public_types_declare.
3546
5f5a90df
AD
35472009-03-02 Akim Demaille <demaille@gostai.com>
3548
3549 Coding style changes.
3550 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3551 (b4_symbol_constructor_declarations)
3552 (b4_symbol_constructor_definition_)
3553 (b4_symbol_constructor_definitions)
3554 (b4_yytranslate_definition): Rename as...
3555 (b4_symbol_constructor_declare_)
3556 (b4_symbol_constructor_declare)
3557 (b4_symbol_constructor_define_)
3558 (b4_symbol_constructor_define)
3559 (b4_yytranslate_define): these.
3560 * data/variant.hh (b4_variant_definition): Rename as...
3561 (b4_variant_define): this.
3562
b47b6ff7
AD
35632009-03-02 Akim Demaille <demaille@gostai.com>
3564
3565 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
3566 * data/bison.m4 (b4_percent_define_if_define): New.
3567 * data/c++.m4 (b4_variant_if): Move to...
3568 * data/bison.m4: Here, using b4_percent_define_if_define.
3569 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
3570 * data/bison.m4: Here, using b4_percent_define_if_define.
3571
1d6b689b
AD
35722009-03-02 Akim Demaille <demaille@gostai.com>
3573
3574 Dub symbol_type_base as a public type.
3575 * data/c++.m4 (b4_public_types_declare): Now define
3576 symbol_type_base and symbol_type.
3577 (b4_public_types_define): New.
3578 In both cases, the definitions are taken verbatim from lalr1.cc.
3579 * data/lalr1.cc: Adjust.
3580
4f84717d
AD
35812009-03-02 Akim Demaille <demaille@gostai.com>
3582
3583 b4_public_types_declare.
3584 * data/c++.m4 (b4_public_types_declare): New.
3585 * data/glr.cc, data/lalr1.cc: Use it.
3586
b9e4eb5b
AD
35872009-03-02 Akim Demaille <demaille@gostai.com>
3588
3589 b4_semantic_type_declare.
3590 * data/c++.m4 (b4_semantic_type_declare): New.
3591 Factors and generalizes what was in glr.cc and lalr1.cc.
3592 * data/variant.hh (b4_semantic_type_declare): Redefine it for
3593 variants.
3594 * data/lalr1.cc, data/glr.cc: Use it.
3595
6a6e7f0c
AD
35962009-02-26 Akim Demaille <demaille@gostai.com>
3597
3598 Upgrade gnulib.
3599 * gnulib: Upgrade from master.
3600 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
3601 Regen.
3602
e9e61b00
AD
36032009-02-25 Akim Demaille <demaille@gostai.com>
3604
3605 Remove useless arguments.
3606 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3607 relevant.
3608
3eead995
AD
36092009-02-25 Akim Demaille <demaille@gostai.com>
3610
3611 Comment changes.
3612 * data/lalr1.cc: here.
3613
87f28efe
AD
36142009-02-25 Akim Demaille <demaille@gostai.com>
3615
3616 Fix glr.cc's debug level handling.
3617 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3618 glr.c which is used.
3619 (debug_level, set_debug_level): Adjust.
3620
9be2a009
AD
36212009-02-25 Akim Demaille <demaille@gostai.com>
3622
3623 Copyright years.
3624 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3625
07a6e87d
AD
36262009-02-25 Akim Demaille <demaille@gostai.com>
3627
3628 Style changes.
3629 * etc/bench.pl.in (generate_grammar_list): Consitently use
3630 location_type, not yy::location.
3631
33c78bd2
AD
36322009-02-25 Akim Demaille <demaille@gostai.com>
3633
3634 Comment change.
3635 * data/lalr1.cc: here.
3636
49572920
AD
36372009-02-19 Akim Demaille <demaille@gostai.com>
3638
3639 Make yyparser::error public.
3640 * data/lalr1.cc: here.
3641 There is no good reason to keep it private (and it is convenient
3642 to use it from the scanner for instance). It is already public in
3643 glr.cc.
3644
88654b47
AD
36452009-02-19 Akim Demaille <demaille@gostai.com>
3646
3647 Comment changes.
3648 * data/glr.cc: here.
3649
4524c55b
AD
36502009-02-19 Akim Demaille <demaille@gostai.com>
3651
3652 Remove trailing blanks.
6a6e7f0c
AD
3653 The epilogue has its own ending \n, no need to add another.
3654
4524c55b
AD
3655 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3656 epilogue.
3657 * data/glr.cc: dnl when extending the epilogue.
3658 Remove stray "private:".
3659
6ceccee8
AD
36602009-02-19 Akim Demaille <demaille@gostai.com>
3661
3662 Use b4_c_modern.
3663 * data/c.m4 (b4_c_function_decl): Here.
3664
9c6a8966
AD
36652009-02-19 Akim Demaille <demaille@gostai.com>
3666
3667 Comment changes.
3668 * data/lalr1.cc: here.
3669
507aa0e2
AD
36702009-02-19 Akim Demaille <demaille@gostai.com>
3671
3672 Extract variant.hh
3673 * data/variant.hh: New, extracted from...
3674 * data/lalr1.cc: here.
3675 Adjust.
3676 * data/local.mk: Adjust.
3677
51bacae6
AD
36782009-02-19 Akim Demaille <demaille@gostai.com>
3679
3680 Extract stack.hh from lalr1.cc.
3681 * data/stack.hh: New.
3682 * data/lalr1.cc: Extract from here.
3683 * data/local.mk: Adjust.
3684
06c3084f
JD
36852009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3686
3687 Add reminder about uploading public key to keys.gnupg.net.
3688 * HACKING (Release Procedure): Here.
3689
0ea583d2
AD
36902009-01-28 Akim Demaille <demaille@gostai.com>
3691
3692 * NEWS: Update information about 2.4.1 and 2.4.2.
3693
402b123d
AD
36942008-11-04 Akim Demaille <demaille@gostai.com>
3695
3696 Reformat NEWS.
3697 * NEWS: Use more outline-mode markup.
3698 Suggested by Jim Meyering.
3699
74553c98
AD
37002009-01-08 Akim Demaille <demaille@gostai.com>
3701
3702 Fix grep portability issues.
3703 Grep on Solaris does not support -q.
3704 Reported by Summum Bonum.
3705
3706 * NEWS: Add a stub for 2.4.2.
3707 * THANKS: Add Summum Bonum.
3708 * tests/atlocal.in (EGREP): New.
3709 (CC, CXX, XSLTPROC): Make it possible to override them via
3710 envvars.
3711 * tests/java.at: Use $EGREP instead of egrep.
3712 Use AT_CHECK's ignore instead of grep's -q.
3713
84eedf86
AD
37142008-12-11 Akim Demaille <demaille@gostai.com>
3715
3716 Pass the token type to yysyntax_error.
3717 * data/yacc.c (yysyntax_error): Take the transated token instead
3718 of the raw number.
3719 Adjust callers.
3720 * TODO: Update.
3721
5860cc8c
AD
37222008-12-11 Akim Demaille <demaille@gostai.com>
3723
3724 Formatting changes.
3725 * data/glr.c: Formatting changes.
3726
2b008529
AD
37272008-12-11 Akim Demaille <demaille@gostai.com>
3728
3729 Propagate i18n changes into glr.c.
3730 * TODO: Update.
3731 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3732 building the error message format dynamically.
3733 * data/lalr1.java: Formatting changes.
3734
2cd1af95
AD
37352008-12-11 Akim Demaille <demaille@gostai.com>
3736
3737 Use testsuite -C.
3738 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3739 Solves problems when top_srcdir is an absolute path.
3740 Suggested by Eric Blake.
3741 * configure.ac: Require Autoconf 2.62.
3742
eeb29422
AD
37432008-12-11 Akim Demaille <demaille@gostai.com>
3744
3745 Simplify the i18n of the error messages.
3746 * data/lalr1.cc: Comment changes.
3747 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3748 lalr1.cc instead of building dynamically the format string.
3749
6617622c
AD
37502008-12-08 Akim Demaille <demaille@gostai.com>
3751
3752 Fix portability issue in the test suite.
3753 * tests/local.at (AT_MATCHES_CHECK): New.
3754 Based on Perl instead of Sed. Sed has too many portability
3755 pitfalls, not ever Sed is GNU Sed.
3756 * tests/actions.at (Fix user actions without a trailing semicolon):
3757 Use it.
3758
2ca1136c
AD
37592008-12-08 Akim Demaille <demaille@gostai.com>
3760
3761 Update data/README.
3762 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3763
6c63b895
AD
37642008-12-08 Akim Demaille <demaille@gostai.com>
3765
3766 Install autoconf as a submodule to get m4sugar.
3767 * .gitmodules: Add submodules/autoconf.
3768 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3769 submodules/autoconf.
3770
417e31d2
AD
37712008-12-08 Akim Demaille <demaille@gostai.com>
3772
3773 Test token.prefix in all the skeletons.
3774 * data/java.m4 (b4_token_enum): Use the token.prefix.
3775 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3776 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3777 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3778 * tests/java.at: Comment changes.
3779 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3780 (Java parser class and package names): Add token.prefix check.
3781
97abf544
AD
37822008-12-08 Akim Demaille <demaille@gostai.com>
3783
3784 Fix regeneration of atconfig.
3785 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3786 remove it: now that there is no tests/Makefile.am, the top-level
3787 Makefile properly updates atconfig when needed.
3788
e8cd1ad6
DJ
37892008-12-07 Di-an Jan <dianj@freeshell.org>
3790
3791 Implement the FIXME that ends an user action with a semicolon
3792 if it seems necessary.
3793 * src/scan-code.l (flex rules section): Flag cpp directive from
3794 any `#' to the first unescaped end-of-line. Semicolon is not
3795 needed after `;', `{', '}', or cpp directives and is needed after
3796 any other token (whitespaces and comments have no effect).
3797 * tests/actions.at (Fix user actions without a trailing semicolon):
3798 New test.
3799 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3800 to make user actions complete statements.
3801 Adjust column numbers in error messages.
3802 * tests/regression.at (Fix user actions without a trailing semicolon):
3803 Remove. Covered by new test.
3804
ce9447fc
AD
38052008-12-07 Akim Demaille <demaille@gostai.com>
3806
3807 Update gnulib.
3808 * gnulib: Update from master.
3809
d333175f
EB
38102008-12-05 Eric Blake <ebb9@byu.net>
3811
3812 Avoid compiler warning.
3813 * src/output.c (muscle_insert_item_number_table): Delete unused
3814 function.
3815
215b40ac
EB
38162008-12-02 Eric Blake <ebb9@byu.net>
3817
3818 Build testsuite with newer autoconf.
3819 * tests/output.at (m4_expand): Don't override in newer autoconf,
3820 where the underlying implementation changed.
3821 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3822 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3823 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3824 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3825 since some of them contain unbalanced ')'.
3826
3bb21113
AD
38272008-12-01 Akim Demaille <demaille@gostai.com>
3828
3829 Use b4_symbol for printers and destructors everywhere.
3830 * data/bison.m4 (b4_symbol_action_location): New.
3831 * data/c.m4 (b4_symbol_actions): Remove.
3832 Adjust all callers to use by b4_symbol_foreach and the corresponding
3833 b4_symbol_printer/destructor macro.
3834 * data/glr.cc: Adjust.
3835 * data/lalr1.java: Adjust the %destructor sanity check.
3836 * src/output.c (symbol_code_props_output): Remove, we no longer
3837 need the b4_symbol_printers/destructors tables.
3838
fb7c5b1f
AD
38392008-12-01 Akim Demaille <demaille@gostai.com>
3840
3841 Use b4_symbol_case_.
3842 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3843 b4_symbol_case_.
3844
cf6fb222
AD
38452008-12-01 Akim Demaille <demaille@gostai.com>
3846
3847 Move b4_symbol based macro to bison.m4.
3848 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3849 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3850 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3851 (b4_type_foreach): Move to...
3852 * data/bison.m4: Here.
3853 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3854 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 3855
e3c52a63
AD
38562008-12-01 Akim Demaille <demaille@gostai.com>
3857
3858 b4_symbol/type_foreach.
3859 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3860 Use them.
3861
2bde9113
AD
38622008-12-01 Akim Demaille <demaille@gostai.com>
3863
3864 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
3865 Instead of defining complex list of tuples to define various
3866 properties of the symbols, we now prefer to define symbols as
3867 "structs" in m4: using the symbol key (its number), and the
3868 property name, b4_symbol gives it value. Use this to handle
3869 destructors and printers.
3870
2bde9113
AD
3871 * src/output.c (CODE_PROP): New.
3872 (prepare_symbol_definitions): Use it to define the printer and
3873 destructor related attributes of the symbols.
3874 * data/lalr1.cc (b4_symbol_actions): Rename as...
3875 (b4_symbol_action): this.
3876 Use b4_symbol instead of 6 arguments.
3877 (b4_symbol_printer, b4_symbol_destructor): New.
3878 Use them instead of b4_symbol_actions.
3879
44494bf6
AD
38802008-12-01 Akim Demaille <demaille@gostai.com>
3881
3882 Avoid capturing variables too easily.
3883 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3884 v__ and p__ instead of v and p.
3885
fad814bd
AD
38862008-12-01 Akim Demaille <demaille@gostai.com>
3887
3888 Remove spurious empty line before syncline.
3889 * data/bison.m4 (b4_syncline): Don't output an empty line before
3890 the output.
3891
feda5527
AD
38922008-11-26 Akim Demaille <demaille@gostai.com>
3893
3894 Convert lib/Makefile.am into lib/local.mk.
3895 The real problem is rather gnulib.mk, which itself is extracted
3896 from a Makefile.am that gnulib expects to the "recursive". The
3897 tool prefix-gnulib-mk converts such a gnulib.mk to be
3898 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3899
3900 * etc/prefix-gnulib-mk: New.
3901 * bootstrap (slurp): Use it to convert further gnulib.mk.
3902 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3903 are deeper.
3904 * lib/Makefile.am: Rename as...
3905 * lib/local.mk: this.
3906 Adjust to be prefixed.
3907 * Makefile.am, configure.ac: Adjust.
3908 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3909
56ddee7f
AD
39102008-11-26 Akim Demaille <demaille@gostai.com>
3911
3912 s/_FLAGS/FLAGS/.
3913 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3914 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3915 Reported by Eric Blake.
3916
728e89a0
AD
39172008-11-26 Akim Demaille <demaille@gostai.com>
3918
3919 Use b4_parser_tables_define in glr.cc.
3920 * data/glr.c: Use b4_parser_tables_define instead of defining the
3921 (deterministic integral) tables by hand.
3922
2c1bf9bd
AD
39232008-11-26 Akim Demaille <demaille@gostai.com>
3924
3925 Use b4_parser_tables_define in Java.
3926 * data/java.m4 (b4_typed_parser_table): Rename as...
3927 (b4_typed_parser_table_define): this, for consistency.
3928 Accept a comment as $4.
3929 Move $2 into yy*_.
3930 (b4_integral_parser_table): Rename as...
3931 (b4_integral_parser_table_define): this.
3932 * data/lalr1.java: Adjust all uses.
3933 Use b4_parser_tables_define instead of generation by hand.
3934
ba206cf4
AD
39352008-11-26 Akim Demaille <demaille@gostai.com>
3936
3937 Prepare the convergence bw C style and Java table generation.
3938 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3939 (b4_tables_define): Rename as...
3940 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3941 (b4_parser_tables_define): these.
3942 * data/c.m4 (b4_table_define): Rename as...
3943 (b4_integral_parser_table_define): this.
3944 * data/lalr1.cc: Adjust.
3945 (b4_table_define, b4_table_declare): Rename as...
3946 (b4_integral_parser_table_define)
3947 (b4_integral_parser_table_declare): these.
3948 (yyrline_): Move the comment where it is actually used.
3949 * data/yacc.c: Adjust.
3950 (yyrline): Use b4_integral_parser_table_define.
3951
d12f8e49
AD
39522008-11-26 Akim Demaille <demaille@gostai.com>
3953
3954 Regen.
3955 * src/parse-gram.h, src/parse-gram.c: Regen.
3956
0991e29b
AD
39572008-11-26 Akim Demaille <demaille@gostai.com>
3958
3959 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3960 * data/lalr1.cc (b4_tables_map): Move to...
3961 * data/bison.m4: here.
3962 Update the comment for yytable during the flight.
3963 (b4_tables_declare, b4_tables_define): New.
3964 * data/lalr1.cc: Use them.
3965 * data/c.m4 (b4_table_define): New.
3966 * data/yacc.c: Use b4_tables_define instead of output the tables
3967 by hand.
3968 * tests/regression.at (Web2c Actions): Adjust the expected output,
3969 the order of the tables changed.
3970
3d3bc1fe
AD
39712008-11-26 Akim Demaille <demaille@gostai.com>
3972
3973 Get rid of (yy)rhs and (yy)prhs.
3974 These tables are no longer needed in the parsers, and they don't seem to
3975 be useful. They are not documented either.
feda5527 3976
3d3bc1fe
AD
3977 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3978 Adjust the computation of (yy)r2.
3979
08c81469
AD
39802008-11-26 Akim Demaille <demaille@gostai.com>
3981
3982 Rule length is unsigned.
3983 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3984
932b0c96
AD
39852008-11-26 Akim Demaille <demaille@gostai.com>
3986
3987 Get rid of lalr1-split.cc.
3988 It was no longer maintainer.
feda5527 3989
932b0c96
AD
3990 * data/lalr1-split.cc: Remove.
3991 * etc/bench.pl.in (bench_fusion_parser): Remove.
3992 Adjust.
3993
8452c667
AD
39942008-11-26 Akim Demaille <demaille@gostai.com>
3995
3996 Use yy* consistently.
3997 * data/glr.c: Now that yyrhs no longer exists as a global
3998 variable, rename local "rhs" variables into "yyrhs" for
3999 consistency.
4000
783aa653
AD
40012008-11-25 Akim Demaille <demaille@gostai.com>
4002
4003 Get rid of yyrhs and yyprhs in glr.c.
4004 * data/glr.c (yyrhs, yyprhs): Remove.
4005 Instead, use the state stack and yystos.
4006
6130b755
AD
40072008-11-25 Akim Demaille <demaille@gostai.com>
4008
4009 Flag glr tests.
4010 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
4011 as an Autotest keyword.
4012
95a7b1c9
AD
40132008-11-25 Akim Demaille <demaille@gostai.com>
4014
4015 Prefer TESTSUITE_FLAGS.
4016 TESTSUITEFLAGS is barely readable.
feda5527 4017
95a7b1c9
AD
4018 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
4019 for backward compatibility.
4020 Use the former instead of the latter.
4021
b4f18401
AD
40222008-11-25 Akim Demaille <demaille@gostai.com>
4023
4024 Get rid of yyrhs and yyprhs in larl1.java.
4025 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
4026 (yy_reduce_print): Rather, use yystos_ and the state stack.
4027
c265fd6b
AD
40282008-11-25 Akim Demaille <demaille@gostai.com>
4029
4030 Formatting changes.
4031
68dbdee8
AD
40322008-11-25 Akim Demaille <demaille@gostai.com>
4033
4034 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
4035 They were used to get the symbol types, given a rule number, when
4036 displaying the top of the stack before a reduction. But the
4037 symbol type is available from the state stack. This has two be
4038 benefits: two tables less in the parser (making it smaller), and a
4039 more consistent use of the three stacks which will help to fuse
4040 them.
feda5527 4041
68dbdee8
AD
4042 * data/yacc.c (yyprhs, yyrhs): Remove.
4043 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
4044 (yy_reduce_print): Take yyssp as argument.
4045 Use it, together with yystos, to get the symbol type.
4046 * tests/regression.at (Web2c Report): Remove these tables from the
4047 expected output.
4048
6ab1adbe
AD
40492008-11-25 Akim Demaille <demaille@gostai.com>
4050
4051 b4_tables_map.
4052 The point is to factor the generation of the tables across skeletons.
4053 This is language dependant.
feda5527 4054
6ab1adbe
AD
4055 * data/c.m4 (b4_comment_): New.
4056 Should be usable to define how to generate tables independently of
4057 the language.
4058 (b4_c_comment): New.
4059 (b4_comment): Bounce to b4_c_comment.
4060 Now support $2 = [PREFIX] for indentation.
4061 * data/lalr1.cc (b4_table_declare): Don't output a comment if
4062 there is no comment.
4063 Indent it properly when there is one.
4064 Output the ending semicolon.
4065 (b4_table_define): Space changes.
4066 Output the ending semicolon.
4067 (b4_tables_map): New.
4068 Use it twice instead of declaring and defining the (integral)
4069 tables by hand.
4070
0fddb3d5
AD
40712008-11-25 Akim Demaille <demaille@gostai.com>
4072
4073 b4_table_declare.
4074 * data/lalr1.cc (b4_table_declare): New.
4075 Use it to declare the tables defined with b4_table_define.
4076 (b4_table_define): Declare a third arg to match b4_table_declare
4077 signature.
4078 Move all the comments around invocations of b4_table_define into
4079 the invocations itselves.
4080 Move things around to have the order for declarations and
4081 definitions.
4082
c4ddc0fb
AD
40832008-11-25 Akim Demaille <demaille@gostai.com>
4084
4085 Formatting changes.
4086 * data/lalr1.java: here.
4087
e0c653e7
AD
40882008-11-25 Akim Demaille <demaille@gostai.com>
4089
4090 b4_args is more general than only C++.
4091 * data/lalr1.cc (b4_args, _b4_args): Move to...
4092 * data/bison.m4: here.
4093
4182a0a1
DJ
40942008-11-21 Di-an Jan <dianj@freeshell.org>
4095
4096 Implement no-XXX arguments for --warnings, --report, --trace.
4097 * src/getargs.c (flags_argmatch): Handles no-XXX.
4098 Fix typo in doxygen comment.
4099
01466c3e
AD
41002008-11-21 Akim Demaille <demaille@gostai.com>
4101
4102 Display the changes in cross-options.texi.
4103 * build-aux/cross-options.pl ($sep): New, to separate items.
4104 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
4105 changes.
4106
a7c09cba
DJ
41072008-11-20 Di-an Jan <dianj@freeshell.org>
4108
4109 Improves options in the manual.
4110 * doc/bison.texinfo (-g, -x): Add space before argument.
4111 (Option Cross Key): Implement FIXME: listing directives also.
4112 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
4113 (Short Option): Special case -d. Put arguments inside @option.
feda5527 4114 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
4115 src/scan-gram.l (actual name passed as the first argument)
4116 with special case for %define.
4117 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
4118 to build-aux/cross-options.pl.
4119 * src/getargs.c (usage): Document limitations of cross-options.pl.
4120 * src/scan-gram.l: Likewise.
4121
6c88b51e
JD
41222008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4123
4124 Fix unexpanded macros in GLR defines file.
4125 Reported by Csaba Raduly at
4126 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
4127 * THANKS (Csaba Raduly): Add.
4128 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
4129 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
4130 lexer in a separate module that includes the defines file.
4131 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
4132 source.
4133 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
4134 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
4135 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
4136 (AT_DATA_SOURCE_PROLOGUE): New.
4137 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
4138 (AT_DATA_SOURCE): New.
4139 (AT_FULL_COMPILE): Extend to support an additional source file.
4140
1e034807
AD
41412008-11-18 Akim Demaille <demaille@gostai.com>
4142
4143 More TODO.
4144 * TODO: More short term issues.
4145
e3dda35c
AD
41462008-11-18 Akim Demaille <demaille@gostai.com>
4147
4148 Regen.
4149 * src/parse-gram.h, src/parse-gram.c: Regen.
4150
bd187d7b
AD
41512008-11-18 Akim Demaille <demaille@gostai.com>
4152
4153 Use b4_subtract where possible.
4154 * data/lalr1.cc (b4_subtract): Move to...
4155 * data/bison.m4: here.
4156 * data/glr.c (b4_rhs_data): Use it.
4157 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
4158
6085ab0d
AD
41592008-11-18 Akim Demaille <demaille@gostai.com>
4160
4161 Remove incorrect mode specification.
4162 * data/glr.cc: Don't pretend it's C code.
4163
9ce405ce
JD
41642008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4165
4166 Simplify last patch slightly.
4167 * src/getargs.c (getargs): Here.
4168
a8beef7e
JD
41692008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4170
4171 Fix last warning from --enable-gcc-warnings.
4172 * src/getargs.c (getargs): Don't assign const address to non-const
4173 pointer.
4174
d50eea6d
JD
41752008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4176
4177 Don't let maintainer-*-check targets force a version update.
4178 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
4179 handled.
4180
f5f419de
DJ
41812008-11-17 Di-an Jan <dianj@freeshell.org>
4182
4183 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
4184 Align menus. Adjust word wrapping. Use node names for menu names.
4185 (Examples): Don't abbreviate node names.
4186 (LocalWords): Remove abbreviations.
4187 (Copying): Make description a sentence.
d50eea6d 4188 (Java Action Features): Remove period to match the rest of menu.
f5f419de 4189
d73e55e0
DJ
41902008-11-17 Di-an Jan <dianj@freeshell.org>
4191
4192 Handles several --enable-gcc-warnings.
4193 * src/getargs.c (command_line_location): Set parameters to void.
4194 * src/output.c (symbol_type_name_cmp): Make static.
4195 (symbols_by_type_name): Set parameters to void.
4196 (symbol_definitions_output): Remove unused parameter. Rename as...
4197 (prepare_symbol_definitions): this.
4198 (muscles_output): Move symbol_definitions_output to...
4199 (output): here as prepare_symbol_definitions.
4200 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 4201 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 4202
68c989de
DJ
42032008-11-17 Di-an Jan <dianj@freeshell.org>
4204
4205 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
4206 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
4207
23ce6f4c
AD
42082008-11-16 Akim Demaille <demaille@gostai.com>
4209
4210 Add missing $(EXEEXT).
4211 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
4212 "src/bison$(EXEEXT)".
4213 Reported by Di-an Jan.
4214
dd704c35
AD
42152008-11-15 Akim Demaille <demaille@gostai.com>
4216
4217 * TODO: Update.
4218
dab244d5
AD
42192008-11-15 Akim Demaille <demaille@gostai.com>
4220
4221 Formatting changes.
4222 * tests/input.at: here.
4223
4b4da9fb
AD
42242008-11-15 Akim Demaille <demaille@gostai.com>
4225
4226 Remove duplicate header inclusion.
4227 * src/LR0.c: here.
4228
4ea3f53d
AD
42292008-11-15 Akim Demaille <demaille@gostai.com>
4230
4231 * src/parse-gram.h, src/parse-gram.c: Regen.
4232
cb823b6f
AD
42332008-11-15 Akim Demaille <demaille@gostai.com>
4234
4235 Support parametric types.
b06df3c2
AD
4236
4237 There are two issues to handle: first scanning nested angle
4238 bracket pairs to support types such as std::pair< std::string,
4239 std::list<std::string> > >.
4240
4241 Another issue is to address idiosyncracies of C++: do not glue two
4242 closing angle brackets together (otherwise it's operator>>), and
4243 avoid sticking blindly a TYPE to the opening <, as it can result
4244 in '<:' which is a digraph for '['.
4245
cb823b6f
AD
4246 * src/scan-gram.l (brace_level): Rename as...
4247 (nesting): this.
4248 (SC_TAG): New.
4249 Implement support for complex tags.
b06df3c2 4250 (tag): Accept
cb823b6f
AD
4251 , but not <.
4252 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
4253 (b4_symbol_variant): Leave space around types as parameters.
4254 * examples/variant.yy: Use nested template types and leading ::.
4255 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
4256 Rename as...
4257 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
4258 * tests/c++.at: Test parametric types.
4259
7b6e6753
AD
42602008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4261
4262 Test token.prefix.
4263 This is not sufficient, but we test at least that the make_SYMBOL
4264 interface is not affected by token.prefix. A more general test
4265 will be implemented when the support of token.prefix is generalized
4266 to more skeletons.
b06df3c2 4267
7b6e6753
AD
4268 * tests/c++.at: One more variant test, using token.prefix.
4269
dddec537
AD
42702008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4271
4272 Test the make_TOKEN interface.
4273 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
4274 Factor the common code in yylex.
4275 Use it to test "%define lex_symbol".
4276
7d3e21ba
AD
42772008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4278
4279 Formatting change.
4280
4fc55348
AD
42812008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4282
4283 Simplify code for variants bench marks.
4284 * etc/bench.pl.in (&generate_grammar_list): Define and use
4285 location_type.
4286 Factor the common code in yylex.
4287
070e6509
AD
42882008-11-15 Akim Demaille <demaille@gostai.com>
4289
4290 Better error message.
4291 * bootstrap (find_tool): Fix the error message.
4292
0078681b
AD
42932008-11-15 Akim Demaille <demaille@gostai.com>
4294
4295 Update variant.yy to newest interface.
4296 * examples/variant.yy: Define lex_symbol.
4297 Adjust.
4298
ff084799
AD
42992008-11-15 Akim Demaille <demaille@gostai.com>
4300
4301 Don't use locations in variant.yy.
4302 * examples/variant.yy: Adjust to not using locations.
4303
b0d79ec6
AD
43042008-11-15 Akim Demaille <demaille@gostai.com>
4305
4306 Comment changes.
4307 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
4308 comments for the license.
4309
d4977ce3
AD
43102008-11-15 Akim Demaille <demaille@gostai.com>
4311
4312 Remove tests/Makefile.am.
4313 * tests/Makefile.am: Rename as...
4314 * tests/local.mk: this.
4315 * Makefile.am, configure.ac: Adjust.
4316 * Makefile.am (DISTCLEANFILES): Define.
4317 (maintainer-check, maintainer-xml-check, maintainer-push-check):
4318 Remove, we no longer need to bounce to the real targets.
4319
87f1149a
AD
43202008-11-15 Akim Demaille <demaille@gostai.com>
4321
4322 Comment changes.
4323
36415906
AD
43242008-11-15 Akim Demaille <demaille@gostai.com>
4325
4326 djgpp/local.mk.
4327 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
4328 * djgpp/local.mk: this new file.
4329
e2c2f696
AD
43302008-11-15 Akim Demaille <demaille@gostai.com>
4331
4332 Remove doc/Makefile.am.
4333 * doc/Makefile.am: Rename as...
4334 * doc/local.mk: this.
4335 Adjust paths
4336 * Makefile.am, configure.ac: Adjust.
4337 * Makefile.am (MOSTLYCLEANFILES): New.
4338 * src/local.mk: Adjust.
4339
2ead32e6
AD
43402008-11-15 Akim Demaille <demaille@gostai.com>
4341
4342 Move sc_tight_scope into maint.mk.
b06df3c2
AD
4343 It does not work, and I don't know how it was supposed to work: it
4344 seems to be looking for sources in the build tree. I just moved
4345 it at a better place, fixing it is still required.
4346
2ead32e6
AD
4347 * src/local.mk (echo): Remove.
4348 (sc_tight_scope): Move to...
4349 * maint.mk: here.
4350
2df9ec37
AD
43512008-11-15 Akim Demaille <demaille@gostai.com>
4352
4353 Regen.
4354 * src/parse-gram.h, src/parse-gram.h: Regen.
4355
0305d25e
AD
43562008-11-15 Akim Demaille <demaille@gostai.com>
4357
4358 Remove src/Makefile.am.
4359 * src/Makefile.am: Rename as...
4360 * src/local.mk: this.
4361 Prefix all the paths with src/.
4362 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
4363 (AM_CPPFLAGS): Find find in builddir/src.
4364 (YACC): Move the flags into...
4365 (AM_YFLAGS): here.
4366 * maint.mk (sc_tight_scope): Disable.
4367 It used to bounce to the version in src/Makefile.am which is now
4368 part of this very Makefile.
4369 * Makefile.am, configure.ac: Adjust.
4370 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
4371 include "..." to find files "here": we are no longer in src/, so
4372 qualify the includes with src/.
4373 * doc/Makefile.am (PREPATH): No longer include the top_builddir
4374 prefix.
4375 (.x.1): Adjust to be able to create src/foo from the top level
4376 Makefile, instead of going bounce to src/Makefile the creation of
4377 foo.
4378
5277c0a3
AD
43792008-11-15 Akim Demaille <demaille@gostai.com>
4380
4381 Remove useless variable.
4382 * doc/Makefile.am (srcsrcdir): Remove.
4383
6a5aa0cd
AD
43842008-11-15 Akim Demaille <demaille@gostai.com>
4385
4386 Remove data/Makefile.am.
4387 * data/Makefile.am: Rename as...
4388 * data/local.mk: this.
4389 Adjust paths.
4390 * Makefile.am, configure.ac: Adjust.
4391
7cb794dc
AD
43922008-11-15 Akim Demaille <demaille@gostai.com>
4393
4394 Remove etc/Makefile.am.
4395 * etc/Makefile.am: Rename as...
4396 * etc/local.mk: this.
4397 Adjust.
4398 * Makefile.am, configure.ac: Adjust.
4399
cd409e3b
AD
44002008-11-15 Akim Demaille <demaille@gostai.com>
4401
4402 Remove examples/local.mk.
4403 examples/calc++/Makefile.am might be interesting to keep as is, since
4404 it is an example in itself.
2df9ec37 4405
cd409e3b
AD
4406 * examples/Makefile.am: Rename as...
4407 * examples/local.mk: this.
4408 Adjust.
4409 * Makefile.am, configure.ac: Adjust.
4410
9a1e4214
AD
44112008-11-15 Akim Demaille <demaille@gostai.com>
4412
4413 Remove build-aux/Makefile.am.
4414 Recursive Makefiles are really way too slow, let's get rid of some of
4415 them.
2df9ec37 4416
9a1e4214
AD
4417 * build-aux/Makefile.am: Rename as...
4418 * build-aux/local.mk: this.
4419 Adjust paths.
4420 * Makefile.am, configure.ac: Adjust.
4421
0634493c
AD
44222008-11-15 Akim Demaille <demaille@gostai.com>
4423
4424 Provide convenience constructors for locations and positions.
4425 * data/location.cc (position::position): Accept file, line and
4426 column as arguments with default values.
4427 Always qualify initial line and column literals as unsigned.
4428 (location::location): Provide convenience constructors.
4429
fe1b448a
AD
44302008-11-15 Akim Demaille <demaille@gostai.com>
4431
b06df3c2
AD
4432 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
4433 token type.
fe1b448a
AD
4434 Using template buys us nothing, and makes it uselessly complex to
4435 construct a symbol. Besides, it could not be generalized to other
4436 languages, while make_FOO would work in C/Java etc.
2df9ec37 4437
fe1b448a
AD
4438 * data/lalr1.cc (b4_symbol_): New.
4439 (b4_symbol): Use it.
4440 (b4_symbol_constructor_declaration_)
4441 (b4_symbol_constructor_definition_): Instead of generating
4442 specializations of an overloaded template function, just generate
4443 several functions whose names are forged from the token names
4444 without the token.prefix.
4445 (b4_symbol_constructor_declarations): Generate them for all the
4446 symbols, not just by class of symbol type, now that instead of
4447 specializing a function template by the token, we generate a
4448 function named after the token.
4449 (b4_symbol_constructor_specialization_)
4450 (b4_symbol_constructor_specializations): Remove.
4451 * etc/bench.pl.in: Adjust to this new API.
4452
5679f311
AD
44532008-11-13 Akim Demaille <demaille@gostai.com>
4454
4455 %define token.prefix.
b06df3c2
AD
4456 Provide a means to add a prefix to the name of the tokens as
4457 output in the generated files. Because of name clashes, it is
4458 good to have such a prefix such as TOK_ that protects from names
4459 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 4460
5679f311
AD
4461 * data/bison.m4 (token.prefix): Empty by default.
4462 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
4463 * data/lalr1.cc (b4_symbol): Ditto.
4464
3204049e
AD
44652008-11-13 Akim Demaille <demaille@gostai.com>
4466
4467 Compute at M4 time some of the subtractions.
90290ce5 4468 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
4469 (b4_rhs_data): Use it.
4470
202598d3
AD
44712008-11-13 Akim Demaille <demaille@gostai.com>
4472
4473 symbol::token.
b06df3c2 4474 This allows the user to get the type of a token returned by yylex.
2df9ec37 4475
202598d3
AD
4476 * data/lalr1.cc (symbol::token): New.
4477 (yytoknum_): Define when %define lex_symbol, independently of
4478 %debug.
4479 (yytoken_number_): Move into...
4480 (symbol::token): here, since that's the only use.
4481 The other one is YYPRINT which was not officially supported
4482 by lalr1.cc, and anyway it did not work since YYPRINT uses this
4483 array under a different name (yytoknum).
4484
fc2476c7
AD
44852008-11-13 Akim Demaille <demaille@gostai.com>
4486
4487 YYERRCODE.
4488 * TODO (YYERRCODE): Mention the case of $undef.
4489
865f1e9f
AD
44902008-11-13 Akim Demaille <demaille@gostai.com>
4491
4492 TODO: YYPRINT.
4493 * TODO (YYPRINT): New.
4494
cb0b136a
AD
44952008-11-13 Akim Demaille <demaille@gostai.com>
4496
4497 Comment changes.
4498 * data/lalr1.cc, data/yacc.c: Fix the description of the
4499 yytranslate and yytoknum tables.
4500
2c086d29
AD
45012008-11-13 Akim Demaille <demaille@gostai.com>
4502
4503 Define make_symbol in the header.
b06df3c2
AD
4504 To reach good performances these functions should be inlined (yet
4505 this is to measure precisely). To this end they must be available
4506 to the caller.
2df9ec37 4507
2c086d29
AD
4508 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
4509 location_type with the class name.
4510 Since will now be output in the header, declare "inline".
4511 No longer use b4_symbol_constructor_specializations, but
4512 b4_symbol_constructor_definitions in the header.
4513 Don't call it in the *.cc file.
4514
1c4af381
AD
45152008-11-13 Akim Demaille <demaille@gostai.com>
4516
4517 Define yytranslate in the header for lex_symbol.
4518 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
4519 into the header file when using %define lex_symbol.
4520 (yytranslate_): Declare inline.
4521
e51b0a82
AD
45222008-11-13 Akim Demaille <demaille@gostai.com>
4523
b06df3c2
AD
4524 Define the constructors of symbol_type in
4525 b4_symbol_constructor_definitions.
e51b0a82 4526 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
4527 forthcoming patch will move elsewhere. Hence the interest of
4528 putting them together.
2df9ec37 4529
b06df3c2
AD
4530 The stack_symbol_type does not need to be moved, it is used only
4531 by the parser.
2df9ec37 4532
e51b0a82
AD
4533 * data/lalr1.cc: Move symbol_type and symbol_base_type
4534 constructors into...
4535 (b4_symbol_constructor_definitions): here.
4536 Adjust.
4537
78835571
AD
45382008-11-13 Akim Demaille <demaille@gostai.com>
4539
4540 Make it easier to move the definition of yytranslate_.
4541 Forthcoming changes will make it possible to use yytranslate_
4542 from outside the parser implementation file.
2df9ec37 4543
78835571
AD
4544 * data/lalr1.cc (b4_yytranslate_definition): New.
4545 Use it.
4546
c1e6c88c
AD
45472008-11-13 Akim Demaille <demaille@gostai.com>
4548
4549 Remove useless class specification.
4550 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
4551 to refer to the class name to use a type defined by the class for
4552 arguments of member functions.
4553
4654b0c0
AD
45542008-11-13 Akim Demaille <demaille@gostai.com>
4555
4556 Finer input type for yytranslate.
4557 This patch is debatable: the tradition expects yylex to return an int
4558 which happens to correspond to token_number (which is an enum). This
4559 allows for instance to return characters (such as '*' etc.). But this
4560 goes against the stronger typing I am trying to have with the new
4561 lex interface which return a symbol_type. So in this case, feed
4562 yytranslate_ with a token_type.
2df9ec37 4563
4654b0c0
AD
4564 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
4565 expect a token_type.
4566
dd735e4e
AD
45672008-11-13 Akim Demaille <demaille@gostai.com>
4568
4569 Honor lex-params in %define lex_symbol mode.
4570 * data/lalr1.cc: Use b4_lex_param.
4571
6659366c
AD
45722008-11-13 Akim Demaille <demaille@gostai.com>
4573
4574 Simplify names.
4575 * src/output.c (symbol_definitions_output): Rename symbol
4576 attributes type_name and has_type_name as type and has_type.
4577 * data/lalr1.cc: Adjust uses.
4578
e9805e57
AD
45792008-11-13 Akim Demaille <demaille@gostai.com>
4580
4581 Use b4_type_names for the union type.
b06df3c2
AD
4582 The union used to compute the size of the variant used to iterate
4583 over the type of all the symbols, with a lot of redundancy. Now
4584 iterate over the lists of symbols having the same type-name.
2df9ec37 4585
e9805e57
AD
4586 * data/lalr1.cc (b4_char_sizeof_): New.
4587 (b4_char_sizeof): Use it.
4588 Adjust to be called with a list of numbers instead of a single
4589 number.
4590 Adjust its caller for new-line issues.
4591
aea10ef4
AD
45922008-11-13 Akim Demaille <demaille@gostai.com>
4593
4594 Define the "identifier" of a symbol.
b06df3c2
AD
4595 Symbols may have several string representations, for instance if
4596 they have an alias. What I call its "id" is a string that can be
4597 used as an identifier. May not exist.
2df9ec37 4598
b06df3c2
AD
4599 Currently the symbols which have the "tag_is_id" flag set are
4600 those that don't have an alias. Look harder for the id.
2df9ec37 4601
aea10ef4
AD
4602 * src/output.c (is_identifier): Move to...
4603 * src/symtab.c (is_identifier): here.
4604 * src/symtab.h, src/symtab.c (symbol_id_get): New.
4605 * src/output.c (symbol_definitions_output): Use it to define "id"
4606 and "has_id".
4607 Remove the definition of "tag_is_id".
4608 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4609 "tag_is_id" were used to produce code.
4610 We still use "tag" for documentation.
4611
2ea7730c
AD
46122008-11-11 Akim Demaille <demaille@gostai.com>
4613
4614 Locations are no longer required by lalr1.cc.
4615 * data/lalr1.cc (_b4_args, b4_args): New.
4616 Adjust all uses of locations to make them optional.
4617 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4618 (AT_CHECK_NAMESPACE): Check the use of locations.
4619 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4620 without locations with lalr1.cc.
4621 Test these cases.
4622 * tests/output.at: Check lalr1.cc with and without location
4623 support.
4624 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4625 Don't use locations.
4626
7ca2266a
AD
46272008-11-11 Akim Demaille <demaille@gostai.com>
4628
4629 AT_FULL_COMPILE.
4630 * tests/local.at (AT_FULL_COMPILE): New.
4631 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4632
1a7a65f9
AD
46332008-11-11 Akim Demaille <demaille@gostai.com>
4634
4635 Support parens in calc++.
4636 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4637 * examples/calc++/test (run): Check the expected output.
4638 Adjust callers.
4639 Check parens too.
4640
c944f7f2
AD
46412008-11-11 Akim Demaille <demaille@gostai.com>
4642
4643 Simplify lalr1.cc since %defines is mandatory.
4644 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4645
dada3cd1
AD
46462008-11-11 Akim Demaille <demaille@gostai.com>
4647
4648 TODO: yyfmt.
4649 * TODO (yysyntax_error): New item.
4650
422c18f4
AD
46512008-11-11 Akim Demaille <demaille@gostai.com>
4652
4653 Prefer M4 to CPP.
4654 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4655 YYERROR_VERBOSE.
4656
a0ffc175
AD
46572008-11-11 Akim Demaille <demaille@gostai.com>
4658
4659 Support i18n of the parse error messages.
4660 * TODO (lalr1.cc/I18n): Remove.
4661 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4662 error messages, as done in yacc.c.
4663 Stay within the yy* pseudo namespace.
4664
00a8a083
AD
46652008-11-11 Akim Demaille <demaille@gostai.com>
4666
4667 More TODO.
4668 * TODO (single stack, yysyntax_error): New.
4669
09277875
AD
46702008-11-11 Akim Demaille <demaille@gostai.com>
4671
4672 Make it possible to return a symbol_type from yylex.
4673 * data/lalr1.cc (b4_lex_symbol_if): New.
4674 (parse): When lex_symbol is defined, expected yylex to return the
4675 complete lookahead.
4676 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4677 yylex interface.
4678 (bench_variant_parser): Exercise it.
4679
64c1b92a
AD
46802008-11-11 Akim Demaille <demaille@gostai.com>
4681
4682 Remove useless bench case.
4683 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4684 no longer used.
4685
2722aa42
AD
46862008-11-11 Akim Demaille <demaille@gostai.com>
4687
4688 Improve display of directives.
4689 * etc/bench.pl.in (parse_term): Don't add useless eol.
4690
918eb7c5
AD
46912008-11-11 Akim Demaille <demaille@gostai.com>
4692
4693 Use string_cast in the bench.
4694 * etc/bench.pl.in (generate_grammar_list): Define and use
4695 string_cast.
4696
39be9022
AD
46972008-11-11 Akim Demaille <demaille@gostai.com>
4698
4699 Replace yychar with a Boolean.
4700 * data/lalr1.cc (parse::yychar): Replace by...
4701 (parse::yyempty): this.
4702
a2e3fa77
AD
47032008-11-11 Akim Demaille <demaille@gostai.com>
4704
4705 Factor the tables.
4706 * TODO: New item.
4707
aba12ad1
AD
47082008-11-11 Akim Demaille <demaille@gostai.com>
4709
4710 Let yytranslate handle the eof case.
4711 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4712 Adjust callers.
4713 No longer expect yychar to be equal to yyeof_, rather, test the
4714 lookahead's (translated) kind.
4715
27cb5b59
AD
47162008-11-11 Akim Demaille <demaille@gostai.com>
4717
4718 yychar cannot be empty in yyerrlab.
4719 * TODO (yychar == yyempty_): New.
4720 * data/lalr1.cc: Remove the handling of this case.
4721 This eases forthcoming changes related to yychar and yytranslate.
4722
fce629c0
AD
47232008-11-11 Akim Demaille <demaille@gostai.com>
4724
4725 Bench: syntactic sugar for %define/#define.
4726 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4727 (&bench_push_parser, bench_variant_parser): Use this feature.
4728 (&eat): New.
4729 Use it.
4730
ce671960
AD
47312008-11-11 Akim Demaille <demaille@gostai.com>
4732
4733 Less memory pressure on the "list" bench.
4734 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4735 the values, to limit memory pressure.
4736
2873fdf8
AD
47372008-11-11 Akim Demaille <demaille@gostai.com>
4738
4739 Introduce make_symbol.
b06df3c2
AD
4740 make_symbol provides a means to construct a full symbol (kind,
4741 value, location) in a single shot. It is meant to be a Symbol
4742 constructor, parameterized by the symbol kind so that overloading
4743 would prevent incorrect kind/value pairs. Unfortunately
4744 parameterized constructors do not work well in C++ (unless the
4745 parameter also appears as an argument, which is not acceptable),
4746 hence the use of a function instead of a constructor.
2df9ec37 4747
2873fdf8
AD
4748 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4749 (b4_symbol_constructor_declarations)
4750 (b4_symbol_constructor_specialization_)
4751 (b4_symbol_constructor_specializations)
4752 (b4_symbol_constructor_definition_)
4753 (b4_symbol_constructor_definitions): New.
4754 Use them where appropriate to generate declaration, declaration of
4755 the specializations, and implementations of the templated
4756 overloaded function "make_symbol".
4757 (variant::variant): Always define a default ctor.
4758 Also provide a copy ctor.
4759 (symbol_base_type, symbol_type): New ctor overloads for value-less
4760 symbols.
4761 (symbol_type): Now public, so that functions such as yylex can use
4762 it.
4763
8be046d7
AD
47642008-11-11 Akim Demaille <demaille@gostai.com>
4765
4766 Inform m4 whether a tag is a valid id.
4767 * src/output.c (is_identifier): New.
4768 (symbol_definitions_output): Use it to define tag_is_id.
4769 But maybe this should be done at m4 level?
4770
de62edee
AD
47712008-11-11 Akim Demaille <demaille@gostai.com>
4772
4773 Test 214 was failing: it greps with a pattern containing [ ]*
4774 which obviously meant to catch spaces and tabs, but contained only
4775 spaces. Tabulations in sources are a nuisance, so to simplify the
4776 matter, get rid of all the tabulations in the Java sources. The
4777 other skeletons will be treated equally later.
4778
4779 * data/java.m4, data/lalr1.java: Untabify.
4780 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4781 tabulations are no longer generated.
4782
905f0697
PB
47832008-11-11 Paolo Bonzini <bonzini@gnu.org>
4784
4785 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4786 * configure.ac: Adjust usage.
4787 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4788 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4789 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4790
09ccae9b
DJ
47912008-11-10 Di-an Jan <dianj@freeshell.org>
4792
4793 Workaround Java's ``code too large'' problem for parser tables
4794 in most cases, by using one function per initialization.
4795 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4796 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4797 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4798 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4799 (yytname_): Use b4_typed_parser_table.
4800 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4801 ``code too large'' error.
4802
1979121c
DJ
48032008-11-10 Di-an Jan <dianj@freeshell.org>
4804
4805 * NEWS: Document them.
de62edee 4806
1979121c
DJ
4807 General Java skeleton improvements.
4808 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4809 using gcj < 4.3 in the testsuite, according to comments in
4810 gnulib/m4/javacomp.m4.
4811 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4812 location_type, position_type): Remove extraneous brackets from
4813 b4_percent_define_default.
4814 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4815 m4_define and m4_define_default.
4816 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4817 which marks the end of user code with appropriate syncline, like all
4818 the other skeletons.
4819 (b4_user_post_prologue): Add. Don't silently drop.
4820 (yylex): Remove.
4821 (parse): Inline yylex.
4822 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4823 (%{...%}): Fix typo of %code imports.
4824 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4825
4826 Support annotations on parser class with %define annotations.
4827 * data/lalr1.java (annotations): Add to parser class modifier.
4828 * doc/bison.texinfo (Java Parser Interface): Document
4829 %define annotations.
4830 (Java Declarations Summary): Document %define annotations.
4831 * tests/java.at (Java parser class modifiers): Test annotations.
4832
4833 Do not generate code for %error-verbose unless requested.
4834 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4835 Make private. Make conditional on %error-verbose.
4836 (getErrorVerbose, setErrorVerbose): New.
4837 (yytnamerr_): Make conditional on %error-verbose.
4838 (yysyntax_error): Make some code conditional on %error-verbose.
4839 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4840 about %error-verbose having no effect.
4841 (getErrorVerbose, setErrorVerbose): Document.
4842
4843 Move constants for token names to Lexer interface.
4844 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4845 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4846 (parse): Qualify EOF to Lexer.EOF.
4847 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4848 EOF and token names to Java Lexer Interface.
4849 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4850
4851 Make yyerror public.
4852 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4853 (yyerror): Change to public. Add Javadoc comments. Use longer
4854 parameter names. Make the body rather than the declarator
4855 conditional on %locations.
4856 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4857
4858 Allow user to add code to the constructor with %code init.
4859 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4860 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4861 Add %code init to the front of the constructor body.
4862 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4863 and %define init_throws.
4864 (Java Declarations Summary): Document %code init and
4865 %define init_throws.
4866 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4867 (Java constructor init and init_throws): Add tests.
de62edee 4868
42f832d6
AD
48692008-11-10 Akim Demaille <demaille@gostai.com>
4870
4871 Update TODO.
4872 * TODO (-D): is implemented.
4873 (associativity): Same precedence must have the same associativity.
4874 For instance, how can a * b / c be parsed if * is %left and / is
4875 %right?
4876 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4877
247efe34
AD
48782008-11-10 Akim Demaille <demaille@gostai.com>
4879
4880 Formatting changes.
4881
5d731440
AD
48822008-11-10 Akim Demaille <demaille@gostai.com>
4883
4884 More information about the symbols.
4885 * src/output.c (type_names_output): Document all the symbols,
4886 including those that don't have a type-name.
4887 (symbol_definitions_output): Define "is_token" and
4888 "has_type_name".
4889 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4890 type-name, now that they are defined too in b4_type_names.
4891
21db118b
AD
48922008-11-10 Akim Demaille <demaille@gostai.com>
4893
4894 Regen.
4895
6ed15cde
AD
48962008-11-10 Akim Demaille <demaille@gostai.com>
4897
4898 Make parser::yytranslate static.
b06df3c2
AD
4899 Small speedup (1%) on the list grammar. And makes yytranslate_
4900 available in non member functions.
de62edee 4901
6ed15cde
AD
4902 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4903 function.
4904
30bb2edc
AD
49052008-11-10 Akim Demaille <demaille@gostai.com>
4906
4907 Avoid trailing spaces.
4908 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4909 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4910 they can be empty, and anyway this incorrectly indents the first
4911 action.
4912
b3a28fd4
AD
49132008-11-10 Akim Demaille <demaille@gostai.com>
4914
4915 Comment changes.
4916
914202bd
AD
49172008-11-10 Akim Demaille <demaille@gostai.com>
4918
4919 Use "enum" for integral constants.
4920 This is just nicer to read, I observed no speedup.
de62edee 4921
914202bd
AD
4922 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4923 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4924 (yyuser_token_number_max_, yyundef_token_): Move into...
4925 (yytranslate_): here.
4926
c17f9a4a
AD
49272008-11-10 Akim Demaille <demaille@gostai.com>
4928
4929 Shortcuts in bench directives.
4930 * etc/bench.pl.in (parse_dirs): New.
4931 Use it.
4932 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4933 Create the benches in "benches/".
4934
b9855ea5
AD
49352008-11-10 Akim Demaille <demaille@gostai.com>
4936
4937 Formatting changes.
4938 * data/lalr1.cc: here.
4939
6e097787
AD
49402008-11-10 Akim Demaille <demaille@gostai.com>
4941
4942 Adjust verbose message to using emacs.
4943 * etc/bench.pl.in: Inform compilation-mode when we change the
4944 directory.
4945 (generate_grammar_list): Recognize %define "variant" in addition
4946 to %define variant.
4947
4c3cc7da
AD
49482008-11-10 Akim Demaille <demaille@gostai.com>
4949
4950 Classify symbols by type-name.
4951 * src/uniqstr.h (UNIQSTR_CMP): New.
4952 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4953 (type_names_output): New.
4954 (muscles_output): Use it.
4955 * data/lalr1.cc (b4_symbol_action_): Remove.
4956 (b4_symbol_case_, b4_type_action_): New.
4957 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4958
d69c9694
AD
49592008-11-10 Akim Demaille <demaille@gostai.com>
4960
4961 Change the handling of the symbols in the skeletons.
4962 Before we were using tables which lines were the symbols and which
4963 columns were things like number, tag, type-name etc. It is was
4964 difficult to extend: each time a column was added, all the numbers had
4965 to be updated (you asked for colon $2, not for "tag"). Also, it was
4966 hard to filter these tables when only a subset of the symbols (say the
4967 tokens, or the nterms, or the tokens that have and external number
4968 *and* a type-name) was of interest.
de62edee 4969
d69c9694
AD
4970 Now instead of monolithic tables, we define one macro per cell. For
4971 instance "b4_symbol(0, tag)" is a macro name which contents is
4972 self-decriptive. The macro "b4_symbol" provides easier access to
4973 these cells.
de62edee 4974
d69c9694
AD
4975 * src/output.c (type_names_output): Remove.
4976 (symbol_numbers_output, symbol_definitions_output): New.
4977 (muscles_output): Call them.
4978 (prepare_symbols): Define b4_symbols_number.
4979
5263bea9
AD
49802008-11-10 Akim Demaille <demaille@gostai.com>
4981
4982 --trace=muscles
4983 * src/getargs.h, src/getargs.c (trace_muscle): New.
4984 (trace_types, trace_args): Support it.
4985 * src/output.c (output_skeleton): Use it.
4986
4175f6bb
AD
49872008-11-10 Akim Demaille <demaille@gostai.com>
4988
4989 muscles_output.
4990 * src/output.c (muscles_output): New, extracted from...
4991 (output_skeleton): here.
4992 Adjust.
4993
1de69d6a
AD
49942008-11-10 Akim Demaille <demaille@gostai.com>
4995
4996 Formatting changes.
4997
36db78a7
AD
49982008-11-10 Akim Demaille <demaille@gostai.com>
4999
5000 Update the variant example.
5001 * examples/variant.yy: Formatting changes.
5002 One stage build.
5003
e5eb92e7
AD
50042008-11-10 Akim Demaille <demaille@gostai.com>
5005
5006 Support constructor with an argument.
5007 This improves the "list" bench by 2%.
de62edee 5008
e5eb92e7
AD
5009 * data/lalr1.cc (variant::build): Add an overloaded version with
5010 an argument.
5011 * tests/c++.at (AT_CHECK_VARIANT): Check it.
5012
76307410
AD
50132008-11-10 Akim Demaille <demaille@gostai.com>
5014
5015 Test variants.
5016 * tests/c++.at (AT_CHECK_VARIANTS): New.
5017 Use it with and without %define assert.
5018
d78f0ac9
AD
50192008-11-10 Akim Demaille <demaille@gostai.com>
5020
5021 Add %precedence support.
5022 Unfortunately it is not possible to reuse the %prec directive. This
5023 is because to please POSIX, we do not require to end the rules with a
5024 semicolon. As a result,
de62edee 5025
d78f0ac9 5026 foo: bar %prec baz
de62edee 5027
d78f0ac9
AD
5028 is ambiguous: either a rule which precedence is that of baz, or a rule,
5029 and then a declaration of the precedence of the token baz.
de62edee 5030
d78f0ac9
AD
5031 * doc/bison.texinfo: Document %precedence.
5032 (Precedence Only): New.
5033 * src/assoc.h, src/assoc.c (precedence_assoc): New.
5034 * src/conflicts.c (resolve_sr_conflict): Support it.
5035 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
5036 Parse it.
5037 * tests/calc.at: Use %precedence for NEG.
5038 * tests/conflicts.at (%precedence does not suffice)
5039 (%precedence suffices): New tests.
5040
c85be41a
AD
50412008-11-09 Akim Demaille <demaille@gostai.com>
5042
5043 Make benches in a sub dirs.
5044 * etc/bench.pl.in ($dir): New.
5045 Use it.
5046 Check the use of constructors with an argument.
5047 (bench_variant_parser): Fix.
5048
db65ca1f
AD
50492008-11-09 Akim Demaille <demaille@gostai.com>
5050
5051 fix eof condition
5052
9b0efa5b
AD
50532008-11-09 Akim Demaille <demaille@gostai.com>
5054
5055 Fix --help.
5056
432ac57a
AD
50572008-11-09 Akim Demaille <demaille@gostai.com>
5058
5059 Require the generation of parse-gram.output.
5060 * src/Makefile.am (YACC): Pass --report=all.
5061
deef2a0a
AD
50622008-11-09 Akim Demaille <demaille@gostai.com>
5063
5064 Formatting changes.
5065
df72984a
AD
50662008-11-09 Akim Demaille <demaille@gostai.com>
5067
5068 Update TODO.
5069 * TODO: Remove obsolete items.
5070 Update others.
5071
f10e19fd
AD
50722008-11-09 Akim Demaille <demaille@gostai.com>
5073
5074 Enhance bench.pl.
5075 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
5076 (@token, $grammar, $bench): New.
5077 (generate_grammar_variant): Rename as...
5078 (generate_grammar_list): this.
5079 (generate_grammar): Adjust.
5080 (bench_grammar): Rename as...
5081 (bench): this.
5082 Use it in the various bench-marking routines.
5083 (-b, -g): New options.
5084
5de9c593
AD
50852008-11-09 Akim Demaille <demaille@gostai.com>
5086
5087 Use a static hierarchy for symbols in the C++ parser.
5088 * data/lalr1.cc (symbol_base_type, symbol_type)
5089 (stack_symbol_type): Make it a static hierarchy.
5090 Adjust dependencies.
5091
757f8f98
AD
50922008-11-09 Akim Demaille <demaille@gostai.com>
5093
5094 bench.pl -d, --directive.
5095 * etc/bench.pl.in (@directive): New.
5096 (&bench_grammar): Use it.
5097 (&bench_list_grammar): New, to provide access to the "variant"
5098 grammar.
5099 Use it.
5100 (getopts): Support -d, --directive.
5101
d3be4f6d
AD
51022008-11-09 Akim Demaille <demaille@gostai.com>
5103
5104 Use inline for small operations.
5105 * data/lalr1.cc (symbol_base_type, symbol_type)
5106 (stack_symbol_type): Declare constructor and other operations as
5107 inline.
5108 (yy_destroy_): Inline.
5109
1f7d007b
AD
51102008-11-09 Akim Demaille <demaille@gostai.com>
5111
5112 Introduce a hierarchy for symbols.
5113 * data/lalr1.cc (symbol_base_type, symbol_type): New.
5114 (data_type): Rename as...
5115 (stack_symbol_type): this.
5116 Derive from symbol_base_type.
5117 (yy_symbol_value_print_): Merge into...
5118 (yy_symbol_print_): this.
5119 Rename as...
5120 (yy_print_): this.
5121 (yydestruct_): Rename as...
5122 (yy_destroy_): this.
5123 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
5124 (parser::parse): yyla is now of symbol_type.
5125 Use its type member instead of yytoken.
5126
bc0b0477
AD
51272008-11-09 Akim Demaille <demaille@gostai.com>
5128
5129 Rename data_type and stack_symbol_type.
5130 * data/lalr1.cc (data_type): Rename as...
5131 (stack_symbol_type): this.
5132
57295d14
AD
51332008-11-09 Akim Demaille <demaille@gostai.com>
5134
5135 Handle semantic value and location together.
5136 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
5137 yydata.value and yydata.location.
5138 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
5139 (YY_SYMBOL_PRINT): Now take semantic value and location as a
5140 single arg.
5141 Adjust all callers.
5142 (yydestruct_): New overload for a stack symbol.
5143
e9b0834e
AD
51442008-11-09 Akim Demaille <demaille@gostai.com>
5145
5146 Push a complete symbol, not connected parts.
5147 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
5148 state, value and location.
5149 Adjust callers.
5150
6082531a
AD
51512008-11-09 Akim Demaille <demaille@gostai.com>
5152
5153 Agregate yylval and yylloc.
5154 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
5155 (parser::yyla): this.
5156
33c195cc
AD
51572008-11-09 Akim Demaille <demaille@gostai.com>
5158
5159 Rely on the state stack to display reduction traces.
b06df3c2
AD
5160 To display rhs symbols before a reduction, we used information
5161 about the rule reduced, which required the tables yyrhs and
5162 yyprhs. Now use rely only on the state stack to get the same
5163 information.
de62edee 5164
33c195cc
AD
5165 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
5166 Use them.
5167 (parser::yyrhs_, parser::yyprhs_): Remove.
5168 (parser::yy_reduce_print_): Use the state stack.
5169
e1f93869
AD
51702008-11-09 Akim Demaille <demaille@gostai.com>
5171
5172 Fuse yyval and yyloc into yylhs.
5173 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
5174 yylhs.
5175 (parse): Replace yyval and yyloc with yylhs.value and
5176 yylhs.location.
5177 After a user action, compute yylhs.state earlier.
5178 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
5179 fresh error_token.
5180
2935744b
DJ
51812008-11-09 Di-an Jan <dianj@freeshell.org>
5182
5183 Remove unused variable.
5184 * src/output.c (type_names_output): Remove unused variable sep.
5185
bbf9ca37
PB
51862008-11-09 Paolo Bonzini <bonzini@gnu.org>
5187
5188 Change tests/output.at quoting.
5189 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
5190 expanding arguments.
5191
d9a9b96b
JD
51922008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
5193
5194 Don't add a semicolon to actions for %skeleton or %language.
5195 It breaks Java test cases as reported by Akim Demaille.
5196 * src/scan-code.l: Implement.
5197
51365192
JD
51982008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
5199
5200 Clean up %skeleton and %language priority implementation.
5201 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
5202 remove static qualifier because others will soon need to see it.
5203 (language_prio): Likewise.
5204 (getargs): Use command_line_prio rather than 0.
5205 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
5206 enum fields.
5207 (skeleton_prio): Extern it.
5208 (language_prio): Extern it.
5209 * src/parse-gram.y: Use grammar_prio rather than 1.
5210
9380cfd0
AD
52112008-11-07 Akim Demaille <demaille@gostai.com>
5212
5213 Moving push traces into yypush_.
5214 * data/lalr1.cc (yypush_): Now takes a optional trace message.
5215 Adjust all uses.
5216
8901f32e
AD
52172008-11-07 Akim Demaille <demaille@gostai.com>
5218
5219 The single-stack C++ parser is now the standard one.
5220 * data/lalr1.cc: Rename as...
5221 * data/lalr1-split.cc: this.
5222 * data/lalr1-fusion.cc: Rename as...
5223 * data/lalr1.cc: this.
5224 * etc/bench.pl.in: Adjust.
5225
8cdabf02
AD
52262008-11-07 Akim Demaille <demaille@gostai.com>
5227
5228 Avoid empty-if warnings.
5229 Reported by Quentin Hocquet.
de62edee 5230
8cdabf02
AD
5231 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
5232 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
5233
5a893c2b
AD
52342008-11-07 Akim Demaille <demaille@gostai.com>
5235
5236 Pass command line location to skeleton_arg and language_argmatch.
5237 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
5238 The location argument is now mandatory.
5239 Adjust all dependencies.
5240 (getargs): Use command_line_location.
5241
58697c6d
AD
52422008-11-07 Akim Demaille <demaille@gostai.com>
5243
5244 -D, --define.
5245 * src/getargs.c (usage): Document -D.
5246 Fix help string for --locations.
5247 (command_line_location): New.
5248 (short_options, long_options, getargs): Support -D, --define.
5249 (getargs): Move -d support at the right place.
5250 * doc/bison.texinfo (Bison Options): Update.
5251 * tests/input.at (%define, --define): New.
5252
9fe5a457
AD
52532008-11-07 Akim Demaille <demaille@gostai.com>
5254
5255 Initialize the muscle table before parsing the command line.
5256 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
5257 (getargs): Define file_name.
5258 * src/main.c (main): Initialize muscle_tab before calling
5259 getargs.
5260 * src/muscle_tab.c (muscle_init): No longer define file_name, as
5261 its value is not available yet.
5262
56c5eca9
AD
52632008-11-07 Akim Demaille <demaille@gostai.com>
5264
5265 Locations without columns for command line arguments.
5266 * src/location.c (location_print): Don't display negative columns.
5267 * src/location.h: Document this.
5268
9b9e0a7d
AD
52692008-11-07 Akim Demaille <demaille@gostai.com>
5270
5271 Fix --help.
5272 * src/getargs.c (usage): Fix help string for -W.
5273
74eae918
AD
52742008-11-07 Akim Demaille <demaille@gostai.com>
5275
5276 Handle more general types of option arguments.
5277 * build-aux/cross-options.pl: The argument ends at the first
5278 space, not the first non-symbol character.
5279 Use @var for each word appearing the argument description.
5280
a3d4c6fb
AD
52812008-11-07 Akim Demaille <demaille@gostai.com>
5282
5283 Destroy the variants that remain on the stack in case of error.
5284 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
5285 destructor.
5286 Display the value only if yymsg is nonnull.
5287 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
5288
2d32fc9f
AD
52892008-11-07 Akim Demaille <demaille@gostai.com>
5290
5291 Add "%define assert" to variants.
5292 This is used to help the user catch cases where some value gets
5293 ovewritten by a new one. This should not happen, as this will
5294 probably leak.
de62edee 5295
2d32fc9f
AD
5296 Unfortunately this uncovered a bug in the C++ parser itself: the
5297 lookahead value was not destroyed between two calls to yylex. For
5298 instance if the previous lookahead was a std::string, and then an int,
5299 then the value of the std::string was correctly taken (i.e., the
5300 lookahead was now an empty string), but std::string structure itself
5301 was not reclaimed.
de62edee 5302
2d32fc9f
AD
5303 This is now done in variant::build(other&) (which is used to take the
5304 value of the lookahead): other is not only stolen from its value, it
5305 is also destroyed. This incurs a new performance penalty of a few
5306 percent, and union becomes faster again.
de62edee 5307
2d32fc9f
AD
5308 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
5309 (b4_variant_if): New.
5310 (variant::built): New.
5311 Use it whereever the status of the variant changes.
5312 * etc/bench.pl.in: Check the penalty of %define assert.
5313
f6038cb8
AD
53142008-11-07 Akim Demaille <demaille@gostai.com>
5315
5316 Use "%define variant" in bench.pl.
5317 * etc/bench.pl.in: No longer use the pseudo directive %variants,
5318 just use %define variants.
5319
ccde1f98
AD
53202008-11-07 Akim Demaille <demaille@gostai.com>
5321
5322 Regen.
5323 * src/parse-gram.h, src/parse-gram.c: Regen.
5324
58bd33b7
JD
53252008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
5326
5327 Fix user actions without a trailing semicolon.
5328 Reported by Sergei Steshenko at
5329 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
5330 * THANKS (Sergei Steshenko): Add.
5331 * src/scan-code.l (SC_RULE_ACTION): Fix it.
5332 * tests/regression.at (Fix user actions without a trailing semicolon):
5333 New test case.
5334
639867b5
AD
53352008-11-04 Akim Demaille <demaille@gostai.com>
5336
5337 Use b4_copyright_years.
5338 * data/yacc.c (b4_copyright_years): New.
5339 Fix its value according to the comments in the file.
5340 Use it and undefine it.
5341
3c262606
AD
53422008-11-04 Akim Demaille <demaille@gostai.com>
5343
5344 Formatting changes.
5345 * data/lalr1-fusion.cc, src/parse-gram.y: here.
5346
a2b93d52
AD
53472008-11-04 Akim Demaille <demaille@gostai.com>
5348
5349 Formatting changes.
5350 * data/lalr1-fusion.cc: here.
5351
3a2803df
AD
53522008-11-04 Akim Demaille <demaille@gostai.com>
5353
5354 Use strict on bench.pl.
5355 * etc/bench.pl.in (&run, &generate_grammar): New.
5356 Rename the grammar generating functions for consistency.
5357 Change the interface so that the list of benches to run is passed
5358 as (optionless) arguments.
5359 (&compile): Use &run.
5360
a0d4650a
AD
53612008-11-04 Akim Demaille <demaille@gostai.com>
5362
5363 Remove spurious initial empty lines.
5364 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
5365 * data/yacc.c: End the @output lines with an @.
5366
cac9e09b
AD
53672008-11-04 Akim Demaille <demaille@gostai.com>
5368
5369 Improve the display of sizes.
5370 * etc/bench.p.in: Higher precision.
5371 Sort by decreasing size.
5372
4af4348a
AD
53732008-11-04 Akim Demaille <demaille@gostai.com>
5374
5375 Don't memcpy C++ structures.
5376 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
5377 arguments.
5378 (variant::build): New overload for
5379 copy-construction-that-destroys.
5380 (variant::swap): New.
5381 (parser::yypush_): Use it in variant mode.
5382
ef05c4d6
AD
53832008-11-04 Akim Demaille <demaille@gostai.com>
5384
5385 Better defaults for bench.pl.
5386 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
5387 default values.
5388 Adjust &verbose uses.
5389 (-q, --quiet): New.
5390
9718cfa9
AD
53912008-11-04 Akim Demaille <demaille@gostai.com>
5392
5393 Make variant.yy more complex.
5394 std::list cannot be copied via memcpy, they are more demanding than
5395 std::string. Use one std::list to strengthen the test.
de62edee 5396
9718cfa9
AD
5397 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
5398 Adjust.
5399 Create a list of strings, instead of a single large string.
5400
a6df593d
AD
54012008-11-04 Akim Demaille <demaille@gostai.com>
5402
5403 bench.pl --bench.
5404 * etc/bench.pl.in (--bench, $bench): New.
5405
006a0303
AD
54062008-11-04 Akim Demaille <demaille@gostai.com>
5407
5408 Sort methods.
5409 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
5410 Define it after as().
5411
faef3466
AD
54122008-11-04 Akim Demaille <demaille@gostai.com>
5413
5414 Useless parens.
5415 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
5416
2141aded
AD
54172008-11-04 Akim Demaille <demaille@gostai.com>
5418
5419 Issue missing synclines after user actions.
5420 * data/c.m4 (b4_case): Issue synclines on the output file.
5421
e426d17b
AD
54222008-11-04 Akim Demaille <demaille@gostai.com>
5423
5424 Remove trailing empty line.
5425 * data/lalr1-fusion.cc: Don't add an empty line after the user's
5426 epilogue.
5427
a9ce3f54
AD
54282008-11-04 Akim Demaille <demaille@gostai.com>
5429
5430 Fix output of copyright years.
5431 * data/bison.m4 (b4_copyright): Fix the indentation of the
5432 copyright year paragraph.
5433 Use b4_copyright_years when no years are given.
5434 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
5435 (b4_copyright_years): New.
5436 Use it.
5437
59c544c2
AD
54382008-11-04 Akim Demaille <demaille@gostai.com>
5439
5440 Avoid the spurious initial empty line.
5441 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
5442 the end of @output request to suppress the empty line that
5443 results.
5444
96b15448
AD
54452008-11-04 Akim Demaille <demaille@gostai.com>
5446
5447 Remove parser::rhs_number_type.
5448 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
5449 (yyrhs_): Use b4_table_define.
5450
f0633174
AD
54512008-11-04 Akim Demaille <demaille@gostai.com>
5452
5453 Fix iteration type.
5454 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
5455
417b8004
AD
54562008-11-04 Akim Demaille <demaille@gostai.com>
5457
5458 Factor the declaration of the integer tables.
5459 * data/lalr1-fusion.cc (b4_table_define): New.
5460 Use it.
5461
1a5246c6
AD
54622008-11-03 Akim Demaille <demaille@gostai.com>
5463
5464 Fix indentation of tables in lalr1.cc
5465 * data/lalr1-fusion.cc: Fix the indentation.
5466
f8a95c9c
AD
54672008-11-03 Akim Demaille <demaille@gostai.com>
5468
5469 Destroy the lhs symbols after reduction.
5470 * data/lalr1-fusion.cc (parse): After the user action, when in
5471 variant mode, destroy the lhs symbols.
5472
d7f4d823
AD
54732008-11-03 Akim Demaille <demaille@gostai.com>
5474
5475 Simplify yysyntax_error_ use.
5476 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
5477 type, but make it unnamed in the declaration when it is not used.
5478
8b9c89fb
AD
54792008-11-03 Akim Demaille <demaille@gostai.com>
5480
5481 Let yy::variant::build return an lvalue.
5482 * data/lalr1-fusion.cc (variant::build): Return a reference to the
5483 object.
5484
83243c24
AD
54852008-11-03 Akim Demaille <demaille@gostai.com>
5486
5487 Define yy::variant only when needed.
5488 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
5489 used.
5490
429b4848
AD
54912008-11-03 Akim Demaille <demaille@gostai.com>
5492
5493 Bench the three-stack lalr1.cc.
5494 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
5495 one-stack one.
5496
414c76a4
AD
54972008-11-03 Akim Demaille <demaille@gostai.com>
5498
5499 Fail on parse error in calc++.
5500 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
5501 status.
5502 * examples/calc++/test ($me, $number, $exit, run): New.
5503 Use them to propagate errors to the exit status.
5504
8a5783fd
AD
55052008-11-03 Akim Demaille <demaille@gostai.com>
5506
5507 Don't specify the skeleton twice in the example.
5508 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
5509 file does what is needed.
5510
0cc5bead
AD
55112008-11-03 Akim Demaille <demaille@gostai.com>
5512
5513 bench: Improve output.
5514 * etc/bench.pl.in (bench_grammar): Tune the printf format.
5515
5b421a4e
AD
55162008-11-03 Akim Demaille <demaille@gostai.com>
5517
5518 bench: check impact of %debug on variants.
5519 * etc/bench.pl.in (variant_grammar): Fix the computation of
5520 $variant.
5521 Generate a grammar file that can work with or without %debug.
5522 Do use the @directive.
5523 (bench_variant_parser): Check impact of %debug.
5524 (@directives): Rename all the occurrences to...
5525 (@directive): this, for consistency.
5526
d11ee647
AD
55272008-11-03 Akim Demaille <demaille@gostai.com>
5528
5529 bench: report the size too.
5530 * etc/bench.pl.in ($iterations): Defaults to -3.
5531 (&bench_grammar): Require hireswallclock.
5532 Compute and display the size of the result.
5533 More comments.
5534
e1b74b92
AD
55352008-11-03 Akim Demaille <demaille@gostai.com>
5536
5537 bench: More use of the verbosity level.
5538 * etc/bench.pl.in ($verbose, &verbose): New.
5539 Use them.
5540 More POD documentation.
5541
7e5f9c54
AD
55422008-11-03 Akim Demaille <demaille@gostai.com>
5543
5544 bench.pl: a command line interface
5545 * etc/bench.pl.in: More doc.
5546 Some fixes in the documentation.
5547 ($cflags, $iterations, &help, &getopt): New.
5548 Use them.
5549 (&variant_grammar): Let the number of stages be 10 times what is
5550 specified.
5551
7109a18d
AD
55522008-11-03 Akim Demaille <demaille@gostai.com>
5553
5554 Bench the use of Boost.Variants.
5555 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
5556 New.
5557 (&compile): Be ready to compile C++ parsers.
5558 (&bench_push_parser): Move debug information to the outermost
5559 level.
5560 * THANKS: Add Michiel De Wilde.
5561
922730fe
AD
55622008-11-03 Akim Demaille <demaille@gostai.com>
5563
5564 bench.pl: Pass directives as a list instead of as a string.
5565 * etc/bench.pl.in (&directives): New.
5566 (&triangular_grammar, &calc_grammar): Use it to format the Bison
5567 directives.
5568 (&triangular_grammar): Do use the directives (were ignored).
5569 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
5570 directives.
5571
7484f1d4
AD
55722008-11-03 Akim Demaille <demaille@gostai.com>
5573
5574 Improve genericity of bench.pl.
5575 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
5576 argument.
5577 (&bench_push_parser): New.
5578 Call it.
5579
15129f25
AD
55802008-11-03 Akim Demaille <demaille@gostai.com>
5581
5582 Add documentation to bench.pl.
5583 * etc/bench.pl.in: Comment changes.
5584
0e0ed236
AD
55852008-11-03 Akim Demaille <demaille@gostai.com>
5586
5587 Fuse the three stacks into a single one.
de62edee 5588
b06df3c2
AD
5589 In order to make it easy to perform benchmarks to ensure that
5590 there are no performance loss, lalr1.cc is forked into
5591 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
5592 lalr1.cc.
5593
5594 Meanwhile, to make sure that lalr1-fusion.cc is correctly
5595 exercized by the test suite, the user must install a symbolic link
5596 from lalr1.cc to it.
de62edee 5597
b06df3c2
AD
5598 Instead of having three stacks (state, value, location), use a
5599 stack of triples. This considerably simplifies the code (and it
5600 will be easier not to require locations as currently does the C++
5601 parser), and also gives a 10% speedup according to
5602 etc/bench (probably mainly since memory allocation is done once
5603 instead of three times).
de62edee 5604
0e0ed236
AD
5605 Another motivation is to make it easier to destruct properly
5606 semantic values: now that they are bound to their state (hence
5607 symbol type) it will be easier to call the appropriate destructor.
de62edee 5608
0e0ed236 5609 These changes should probably benefit the C parser too.
de62edee 5610
b06df3c2
AD
5611 * data/lalr1.cc: Copy as...
5612 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
5613 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5614 from c++.m4.
5615 (state_stack_type, semantic_stack_type, location_stack_type)
5616 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5617 (data_type, stack_type, yystack_): New.
5618 (YYLLOC_DEFAULT, yypush_): Adjust.
5619 (yyerror_range): Now based on data_type, not location_type.
5620
7dedf26e
AD
56212008-11-03 Akim Demaille <demaille@gostai.com>
5622
5623 Push the state, value, and location at the same time.
5624 This is needed to prepare a forthcoming patch that fuses the three
5625 stacks into one.
de62edee 5626
7dedf26e
AD
5627 * data/lalr1.cc (parser::yypush_): New.
5628 (parser::yynewstate): Change the semantics: instead of arriving to
5629 this label when value and location have been pushed, but yystate
5630 is to be pushed on the state stack, now the three of them must
5631 have been pushed before. yystate still must be the new state.
5632 This allows to use yypush_ everywhere instead of individual
5633 handling of the stacks.
5634
c4585f1e
AD
56352008-11-03 Akim Demaille <demaille@gostai.com>
5636
5637 Prefer references to pointers.
5638 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5639 definition to use references instead of pointers.
5640 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5641 Take the value and location as references.
5642 Adjust callers.
5643
56017c17
AD
56442008-11-03 Akim Demaille <demaille@gostai.com>
5645
5646 stack::size instead of stack::height.
5647 * data/lalr1.cc (stack::height): Rename as...
5648 (stack::size): this.
5649 Fix the output type.
5650 Comment changes.
5651
5ab8c47b
AD
56522008-11-03 Akim Demaille <demaille@gostai.com>
5653
5654 Use variants to support objects as semantic values.
b06df3c2
AD
5655 This patch was inspired by work by Michiel De Wilde. But he used
5656 Boost variants which (i) requires Boost on the user side, (ii) is
5657 slow, and (iii) has useless overhead (the parser knows the type of
5658 the semantic value there is no reason to duplicate this
5659 information as Boost.Variants do).
5660
5661 This implementation reserves a buffer large enough to store the
5662 largest objects. yy::variant implements this buffer. It was
5663 implemented with Quentin Hocquet.
de62edee 5664
5ab8c47b
AD
5665 * src/output.c (type_names_output): New.
5666 (output_skeleton): Invoke it.
5667 * data/c++.m4 (b4_variant_if): New.
5668 (b4_symbol_value): If needed, provide a definition for variants.
5669 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5670 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5671 (b4_char_sizeof, yy::variant): New.
5672 (parser::parse): If variants are requested, define
5673 parser::union_type, parser::variant, change the definition of
5674 semantic_type, construct $$ before running the user action instead
5675 of performing a default $$ = $1.
5676 * examples/variant.yy: New.
5677 Based on an example by Michiel De Wilde.
5678
1fa5d8bb
AD
56792008-11-03 Akim Demaille <demaille@gostai.com>
5680
5681 Parameterize the extraction of semantic values.
5682 To make future changes easier, no longer rely on ".TYPE" being the
5683 way to get a semantic value.
de62edee 5684
1fa5d8bb
AD
5685 * data/c.m4 (b4_symbol_value): New.
5686 Use it.
5687 * data/c++.m4, data/yacc.c: Use it.
5688 * data/glr.c: Use b4_symbol_value.
5689 (b4_rhs_data): New.
5690 Use it.
5691
91ba8a55
AD
56922008-11-03 Akim Demaille <demaille@gostai.com>
5693
5694 Prepare easier M4 changes.
5695 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5696 future changes.
5697
c9ba9e59
JD
56982008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5699
5700 Initiate further development.
5701 * NEWS: Create an empty section for new entries.
5702 * gnulib: Update submodule to HEAD.
5703
bfb40910
JD
57042008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5705
5706 * NEWS: Version 2.4.
5707
241fda7a
JD
57082008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5709
5710 Prepare for next release.
5711 * NEWS: Briefly mention changes since 2.3b.
5712 * README: Say GNU m4 1.4.6, which we've been requiring in release
5713 announcements already, not 1.4.3, which breaks the build.
5714
ed4d67dc
JD
57152008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5716
5717 Say %language is experimental.
5718 We're thinking of extending it's effect on output file naming. See the
5719 thread at
5720 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5721 * NEWS: Say it's experimental.
5722 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5723 recommend it over %skeleton for now.
5724 (Bison Options): Likewise.
5725 (C++ Bison Interface): Use %skeleton not %language.
5726 (Calc++ Parser): Use %skeleton not %language.
5727 * src/getargs.c (usage): Say it's experimental.
5728
e254a580
DJ
57292008-11-01 Di-an Jan <dianj@freeshell.org>
5730 Paolo Bonzini <bonzini@gnu.org>
5731
5732 Support all Java parser class modifiers.
5733 * data/java.m4 (b4_percent_define_get3): New.
5734 (b4_final_if, b4_strictfp_if): New.
5735 * data/lalr1.java (final, strictfp, extends, implements): Support.
5736 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5737 documentation.
5738 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5739 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5740 (AT_CHECK_JAVA_GREP): New.
5741 (Java parser class modifiers): New test.
5742 (Java parser class extends and implements): New test.
5743
5744 Model exception propagation better with throws and lex_throws.
5745 * data/java.m4 (b4_list2): New.
5746 (throws): Change default.
5747 * data/lalr1.java (yyaction): Add throws.
5748 (parse): Add lex_throws in addition to throws.
5749 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5750 * tests/java.at (Java throws specifications): New test.
5751
5752 Improve documentation for Java parsers.
5753 * doc/bison.texinfo (Java Parsers): Add subsections.
5754 Don't quote first argument of %define.
5755 (Java Bison Interface): Document output files. Move documentation
5756 of parser class and merge into Java Parser Interface. Document
5757 features that error out. Document directives with no effect.
5758 Move note about Javadoc higher.
5759 (Java Semantic Values): Explicitly mention stype.
5760 Document that generic types cannot be used.
5761 (Java Location Values): Use @deftypeivar. Document constructors.
5762 Correct return value for toString.
5763 (Java Parser Interface): List undocumented constants/fields.
5764 Move documentation of fields added by %parse-param closer to list
5765 of members. Document that token names are added as fields.
5766 Document constructors accurately. Remove error method.
5767 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5768 Interface. Describe %code lexer and yylex accutately.
5769 Remove documentation that does not match the code.
5770 (Java Action Features): New.
5771 (Java Differences): Add reference. Add item on semantic values.
5772 Add note about @{ ... @}. Clarify %% epilogue placement.
5773 (Java Declarations Summary): New.
5774
5775 Fix Java skeleton.
5776 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5777 (b4_remove_comma): Quote test argument.
5778 (b4_identification): Remove "bison" field.
5779 * tests/java.at (Java parser class and package names): New test.
5780 (Java %parse-param and %lex-param): New test.
5781 (Java stype, position_class and location_class): New test.
5782
f259e4e6
PB
57832008-10-31 Di-an Jan <dianj@freeshell.org>
5784
5785 * data/lalr1.jave: Update copyright years.
5786 (YYParser): Correct name of "generated from" file in Javadoc:
5787 use b4_file_name instead of @ofile@.
5788 (Location constructor): Correct Javadoc parameter name.
5789 (yylloc): Add missing opening m4 quote after b4_location_if.
5790 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5791 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5792 (YYParser constructor): Correct Javadoc parameter name.
5793
cae5057f
JD
57942008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5795
5796 Always put auxiliary code files in the same dir as other output files.
5797 * src/files.c (compute_file_name_parts): When the user specifies
5798 --output but not --file-prefix, extract the directory prefix from the
5799 file prefix not from the grammar file name. This affects the location
5800 of files like location.hh generated by the C++ skeleton. The includes
5801 in the other output files require this fix.
5802 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5803 for expected output files.
5804 (Output files): Add a test for the above.
5805
4af432ba
JD
58062008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5807
5808 * gnulib: Update submodule to HEAD.
5809
e26d4e43
JD
58102008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5811
5812 Update copyright year.
5813 * src/files.c: Here.
5814
c0ee9e21
DJ
58152008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5816
5817 Don't overwrite the input file.
5818 * src/files.c (output_file_name_check): Fatal error if using input file
5819 for output.
5820 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5821 argument.
5822 (Conflicting output files): Add test.
5823
482dc52f
AD
58242008-10-28 Akim Demaille <demaille@gostai.com>
5825
5826 Space changes.
5827 * data/lalr1.cc: Formatting changes.
5828
52cbbe84
AD
58292008-10-28 Akim Demaille <demaille@gostai.com>
5830
5831 Don't define debugging functions when !YYDEBUG.
5832 * data/lalr1.cc (debug_stream, set_debug_stream)
5833 (debug_level_type, debug_level, set_debug_level): Don't
5834 declare them when YYDEBUG is not defined.
5835 The implementation are already YYDEBUG-aware.
5836
0925d5bf
AD
58372008-10-28 Akim Demaille <demaille@gostai.com>
5838
5839 Prefer "continue" for empty loop bodies.
5840 * etc/bench.pl.in: Use "continue" instead of {}.
5841
cf98343c
AD
58422008-10-28 Akim Demaille <demaille@gostai.com>
5843
5844 Space and comments changes.
5845 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5846 * data/c.m4, data/lalr1.cc: Space changes.
5847
9f467b7d
AD
58482008-10-28 Akim Demaille <demaille@gostai.com>
5849
5850 Make gnulib a submodule.
5851 * gnulib: New.
5852 * .gitmodules (gnulib): New.
5853
0f0e1ace
JD
58542008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5855
5856 Fix yyerror_range for user-defined location type in C++. Reported by
5857 Georg Sauthoff at
5858 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5859 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5860 * THANKS (Georg Sauthoff): Add.
5861
548e2104
JD
58622008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5863
5864 Update several administrative files mainly to facilitate releasing.
5865 * HACKING (Administrivia): Make the git-merge-changelog notes more
5866 helpful.
5867 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5868 (Release Procedure): Update for git and add numerous details that were
5869 previously missing.
5870 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5871 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5872 that announcements don't claim we bootstrapped with whatever bison
5873 happened to be in PATH. Add flex as a bootstrap tool.
5874 * Makefile.maint: Remove, previously replaced by maint.mk.
5875 * Makefile.cfg: Remove, and migrate settings to...
5876 * cfg.mk: ... here for the sake of `make announcement'.
5877 * bootstrap.conf (gnulib_modules): Add announce-gen.
5878 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5879 Berry.
5880
ddf17a6e
PB
58812008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5882
5883 Small but important bugfixes for the Java skeleton.
5884 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5885 (yy_symbol_print): Call toString on yyvaluep.
5886
e1145ad8
AD
58872008-08-29 Akim Demaille <demaille@gostai.com>
5888
5889 Clarify UPDATED use.
215b40ac 5890 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 5891 not to the release date of Bison.
215b40ac 5892 Reported by Joel E. Denny.
e1145ad8 5893
0df72d78
AD
58942008-08-29 Akim Demaille <demaille@gostai.com>
5895
5896 * README: Update FAQ pointer.
5897 Reported by Joel E. Denny.
5898
9a90b6bb
EB
58992008-08-27 Eric Blake <ebb9@byu.net>
5900
5901 Resync m4sugar from autoconf.
5902 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5903 (m4_init): Adjust to latest m4.git changes.
5904 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5905 effects.
5906 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5907 (_m4_list_cmp): Reduce side effects.
5908
65015668
AD
59092008-08-27 Akim Demaille <demaille@gostai.com>
5910
5911 Check yyerrok in calc.at.
215b40ac
EB
5912 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5913 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5914 expected.
65015668 5915
98e26a92
AD
59162008-08-27 Akim Demaille <demaille@gostai.com>
5917
5918 Support yyerrok in lalr1.cc.
5919 YYBACKUP is still to import back into lalr1.cc.
215b40ac 5920 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 5921
86c0e784
JD
59222008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5923
5924 For maintainer-check*, don't recompile for a $(VERSION) update.
5925 * cfg.mk: New file.
5926 (_is-dist-target): Override the one in GNUmakefile.
5927 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5928
88511166
JD
59292008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5930
5931 Update for recent change to gnulib.
5932 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5933 string.h now.
5934
6bbb2ed5
EB
59352008-08-15 Eric Blake <ebb9@byu.net>
5936
d67c52e8
EB
5937 Remaining m4sugar merge from autoconf.
5938 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5939 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5940 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5941 * src/output.c (output_skeleton): Tell m4 how to find it.
5942
6bbb2ed5
EB
5943 Partial m4sugar merge from autoconf: m4_map.
5944 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5945 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5946 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5947 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5948 for empty list.
5949 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5950 Likewise.
5951 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5952 declares it.
5953
8dce3875
JD
59542008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5955
5956 Keep .version and PACKAGE_VERSION in sync.
5957 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5958 dependency, and add comments justifying this in more detail. Discussed
5959 starting at
5960 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5961
882a1fbf
EB
59622008-08-06 Eric Blake <ebb9@byu.net>
5963
a3764451
EB
5964 Partial m4sugar merge from autoconf: m4_shiftn.
5965 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5966 (m4_shift2, m4_shift3): New macros.
5967 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5968 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5969 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5970 * data/java.m4 (b4_remove_comma): Likewise.
5971
882a1fbf
EB
5972 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5973 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5974 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5975 (m4_init): Consolidate wrapped text into single m4_wrap.
5976 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5977 in wrapped text.
5978
a30e920d
EB
59792008-08-05 Eric Blake <ebb9@byu.net>
5980
dfcc5959
EB
5981 Partial m4sugar merge from autoconf: builtins, version.m4.
5982 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5983 (m4_prepend): Remove, as it is unused and inherently quadratic,
5984 whereas m4_append is linear in newer m4.
5985 (m4_mkstemp): New builtin.
5986 (m4_symbols): Make rename conditional.
5987 (m4_version_prereq): Ensure fatal error if used in bison, which
5988 intentionally lacks version.m4.
5989
a30e920d
EB
5990 Fix comments in m4sugar.
5991 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5992
445b7470
JD
59932008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5994
5995 Update for recent .gitignore fix in Gnulib.
5996 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5997 anchored .gitignore entries.
5998
a1e50014
JD
59992008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
6000
6001 Set gnu or gnits strictness.
6002 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
6003 development and gnits strictness for releases. Based on Eric Blake's
6004 suggestion at
6005 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
6006
d43f77e7
PB
60072008-07-31 Paolo Bonzini <bonzini@gnu.org>
6008
6009 * NEWS: Clarify documentation of %language.
6010
fee2ed87
PB
60112008-07-31 Paolo Bonzini <bonzini@gnu.org>
6012
6013 Support usage of git-merge-changelog.
6014 * .gitattributes: New.
6015 * HACKING: Document usage of git-merge-changelog.
6016 * bootstrap: Install git-merge-changelog entries in .git/config
6017 if appropriate.
6018
78029cd5
JD
60192008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6020
6021 Remove remaining dependence on CVS Id keyword.
6022 * ChangeLog: For the sake of people still using CVS, don't use dollars
6023 when mentioning Id.
6024 * data/xslt/bison.xsl: Remove Id from header comments, where it was
6025 unusual anyway.
6026 * data/xslt/xml2dot.xsl: Likewise.
6027 * data/xslt/xml2text.xsl: Likewise.
6028 * data/xslt/xml2xhtml.xsl: Likewise.
6029 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
6030 * doc/Makefile.am (neutralize): Remove, no longer needed.
6031 (.x.1): Don't use neutralize.
6032 (edit): Don't substitute for ID.
6033 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
6034
c53d18b1
JD
60352008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
6036
6037 Fix dependence on computed configure variables.
6038 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
6039 $(top_srcdir)/configure.ac so that changes to computed variables, such
6040 as PACKAGE_VERSION, are seen.
6041 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
6042
5523ac79
JD
60432008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
6044
6045 Update copyright dates for recent changes.
6046 * Makefile.am: Here.
6047 * src/Makefile.am: Here.
6048 * src/reduce.c: Here.
6049 * tests/reduce.at: Here.
6050
8fa36911
JD
60512008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
6052
6053 Use git-version-gen for version names between releases.
6054 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
6055 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
6056 * .prev-version: New.
6057 * .version.in: Remove.
78029cd5 6058 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
6059 revision.
6060 * GNUmakefile: Remove, now copied from Gnulib.
6061 * Makefile.am: Add code suggested by comments in
6062 build-aux/git-version-gen.
6063 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
6064 .prev-version, and .version.
6065 * NEWS (2.3b+): Rename to...
6066 (?.?): ... this because we're dropping the "+" version naming scheme,
6067 but, in general, we still can't be sure of our next release name.
6068 * bootstrap: Add a quick hack to remove from .gitignore the
6069 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
6070 entry. This should really be fixed in gnulib instead.
6071 * bootstrap.conf (gnulib_modules): Add gnumakefile.
6072 * configure.ac (AC_INIT): Set version name by invoking
6073 build-aux/git-version-gen.
6074 (AC_CONFIG_FILES): Remove .version, now generated by
6075 build-aux/git-version-gen.
6076 * maint.mk: New, copied from coreutils.
6077 * doc/.cvsignore (bison.1): Add.
6078 * doc/.gitignore (/bison.1): Add.
6079 * doc/bison.1: Remove, generated.
6080 * src/.cvsignore (revision.c): Remove.
6081 * src/.gitignore (/revision.c): Remove.
6082 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
6083 (BUILT_SOURCES): Remove revision.c.
6084 (revision.c): Remove.
6085 * src/getargs.c (version): Don't print revision after the VERSION.
6086 * src/revision.h: Remove.
6087
bcf07cb7
JD
60882008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
6089
6090 Fix untranslatable composition of sentences. Reported by Goran
6091 Uddeborg at
6092 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
6093 * THANKS (Goran Uddeborg): Add.
6094 * src/reduce.c (reduce_print): Report the number of nonterminals and
6095 rules useless in the grammar in separate sentences.
6096 * tests/reduce.at (Useless Rules): Update output.
6097 (Reduced Automaton): Likewise.
6098 (Underivable Rules): Likewise.
6099 (Empty Language): Likewise.
6100
9aacab9a
JD
61012008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
6102
6103 Fix some .gitignore and .cvsignore problems.
6104 * bootstrap (insert_sorted_if_absent): Replace all uses with...
6105 (insert_vc_ignore): ... this new function, which prepends `/' to all
6106 .gitignore entries before passing them to insert_sorted_if_absent.
6107 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
6108 .cvsignore files are maintained even though Bison developers run
6109 bootstrap while using Git.
6110 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
6111 unneeded by Bison.
6112 (gnulib): Add.
6113 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
6114 unneeded. Reported by Eric Blake.
6115 * lib/.gitignore (/*~): Add.
6116 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
6117 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
6118 Blake.
6119 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
6120
a9fc7990
JD
61212008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
6122
6123 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
6124 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
6125 * bootstrap.conf (gnulib_modules): Add unsetenv.
6126 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
6127 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
6128 (/setenv.m4): Add.
6129 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
6130 the first argument because it may become position-dependent, and unset
6131 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
6132 Add comments explaining these issues in more detail.
6133
0f1d6f10
JD
61342008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
6135
6136 Add .gitignore everywhere based on .cvsignore.
6137 * .gitignore: New.
6138 * build-aux/.gitignore: New.
6139 * data/.gitignore: New.
6140 * doc/.gitignore: New.
6141 * etc/.gitignore: New.
6142 * examples/.gitignore: New.
6143 * examples/calc++/.gitignore: New.
6144 * lib/.gitignore: New.
6145 * m4/.gitignore: New.
6146 * po/.gitignore: New.
6147 * runtime-po/.gitignore: New.
6148 * src/.gitignore: New.
6149 * tests/.gitignore: New.
6150
7bd1665a
JD
61512008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6152
6153 * NEWS (2.3b+): New section, empty for now.
6154 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
6155
72c5b982
JD
61562008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
6157
6158 * NEWS (2.3b): Update release date since there has been a delay in
6159 getting the announcements and tarballs out.
6160
bd02cd5d
JD
61612008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
6162
6163 * NEWS: Version 2.3b.
6164 * configure.ac (AC_INIT): Likewise.
6165 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
6166
9126263e
JD
61672008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
6168
6169 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
6170 been doing it for years.
6171 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
6172 (Release Procedure): Add FIXME about make alpha being unmaintained.
6173
fa6aa7b3
JD
61742008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
6175
6176 * data/yacc.c: Reformat m4 a little for readability.
6177 * src/lalr.c (build_relations): Correct comment.
6178
d30b312d
JMG
61792008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6180
6181 DJGPP specific issue.
6182 * djgpp/config.sed: Fixes required to run configure scripts generated
6183 by autoconf 2.62.
6184
138d4cd9
JD
61852008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6186
6187 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
6188 coordinator@translationproject.org.
6189
8f7e2e1f
JD
61902008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6191
6192 * THANKS: Add Eric Blake.
6193
f55efa38
JD
61942008-04-23 Eric Blake <ebb9@byu.net>
6195
6196 Revert prior patch, by working around autoconf regression.
6197 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
6198 ("Output file name: ("): Uncomment test.
6199 ("Output file name: )"): Likewise.
6200 Based on an idea from Noah Misch.
6201
096c9f9d
JD
62022008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6203
6204 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
6205 2.61. Reported by Juan Manuel Guerrero at
6206 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
6207 * tests/output.at ("Output file name: ("): Comment out test case for
6208 now.
6209 ("Output file name: )"): Likewise.
6210
0f664b89
JD
62112008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6212
6213 * GNUmakefile: Update git-version-gen invocation so make dist
6214 succeeds.
6215
1cfe6375
JD
62162008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6217
6218 Update to the current gnulib CVS repository, and fix trigraph handling
6219 in Bison.
6220 * bootstrap: Update gnulib CVS repository URL.
6221 (symlink_to_dir): Encapsulate the code that guarantees the destination
6222 directory exists into...
6223 (check_dst_dir): ... this new function, and...
6224 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
6225 fail when copying files into lib/uniwidth/.
6226 * src/output.c (prepare_symbols): When writing yytname muscles, where
6227 symbol names will be encoded in C-string literals, tell quotearg to
6228 escape trigraphs. This used to be the default in gnulib.
6229 * tests/regression.at (Token definitions): Because of the change in
6230 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
6231 escapes trigraphs in symbol names. Thus, yytname no longer has
6232 trigraphs unnecessarily doubly escaped. Update test case output.
6233 Extend test case to be sure Bison's own error messages will no longer
6234 have trigraphs in symbol names unnecessarily escaped once.
6235
74c52fc8
JD
62362008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
6237
6238 Fix make dist infinite loop reported by Juan Manuel Guerrero at
6239 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
6240 * .cvsignore: Add .version.
6241 * .version.in: New.
6242 * bootstrap.conf (gnulib_modules): Add git-version-gen.
6243 * configure.ac (AC_CONFIG_FILES): Add .version.
6244 * build-aux/.cvsignore: Add git-version-gen.
6245
8e55b3aa
JD
62462008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6247
6248 * NEWS (2.3a+): Mention that -g now takes an argument.
6249 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
6250 consistency. Update the -g and -x entries now that they take
6251 arguments. Use brackets to indicate optional arguments.
6252 * src/getargs.c (usage): Explain the relationship between arguments of
6253 long and short options more completely. Document --defines and -d
6254 separately since the former takes an argument but, for POSIX Yacc, the
6255 latter does not.
6256 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 6257 (getargs): Sort cases.
8e55b3aa 6258
59c5ac72
AD
62592008-02-28 Akim Demaille <demaille@gostai.com>
6260
6261 * doc/bison.texinfo: Fix a few typos.
6262
118d4978
AD
62632008-02-28 Akim Demaille <akim@epita.fr>
6264
6265 * doc/bison.texinfo (Bison Options): Document -W.
6266 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
6267
7020f1e9
AD
62682008-02-28 Akim Demaille <akim@epita.fr>
6269
6270 * src/getargs.c (short_options): Split and sort for readability.
6271 -g and -x take optional arguments, just like their long options.
6272 * build-aux/cross-options.pl: Use /x to make the regexp easier to
6273 understand.
6274 Fix the handling of $opt which resulted in all the argument to be
6275 considered as optional.
6276
59da312b
JD
62772008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
6278
6279 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
6280 say its interface is experimental.
6281 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6282 Java.
6283 (Bison Options): In the -L and --language entry, mention Java.
6284 (Java Bison Interface): Say the interface is experimental.
6285 * src/getargs.c (usage): Mention -L and --language.
6286
6287 * NEWS (2.3a+): Say the push parsing interface is experimental.
6288 * doc/bison.texinfo (Push Decl): Likewise.
6289 (Decl Summary): Likewise in the "%define api.push_pull" entry.
6290 (Push Parser Function): Likewise.
6291 (Pull Parser Function): Likewise.
6292 (Parser Create Function): Likewise.
6293 (Parser Delete Function): Likewise.
6294 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
6295 yypull_parse, and yypush_parse entries.
6296
6297 * NEWS (2.3a+): Mention XML support, and say the schema is
6298 experimental.
6299 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
6300 * src/getargs.c (usage): Say the XML schema is experimental.
6301
6302 * NEWS (2.3a+): Say option instead of flag.
6303
2bb3ebec
WP
63042008-02-21 Wojciech Polak <polak@gnu.org>
6305
6306 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
6307 text.
6308
333e670c
JD
63092008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
6310
6311 Fix impure push parser compile error reported by Bob Rossi at
6312 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
6313 * data/yacc.c: Clean up whitespace in the output a little.
6314 (yypstate_allocated): Define for impure push parsers regardless of
6315 whether the pull interface is also requested.
6316 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
6317 check impure push parsers without the pull interface.
6318
6319 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
6320 yyerror takes arguments specified by %parse-param while yypstate_new
6321 does not.
6322 * doc/bison.texinfo (Parser Create Function): Document that
6323 yypstate_new returns 0 for multiple impure parser instances.
6324 * tests/push.at (Push Parsing: Multiple impure instances): Update
6325 expected stderr output.
6326
798096e1
JD
63272008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6328
6329 * runtime-po/POTFILES.in (push.c): Remove.
6330
9ca7f077
JD
63312008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6332
6333 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
6334 * data/push.c: Rename to...
6335 * data/yacc.c: ... this, overwriting it.
6336 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
6337 `%push-pull-parser' -> `%define api.push_pull "both"'.
6338 Remove old yacc.c tests, and update push.c tests to yacc.c.
6339
42ee26bb
JD
63402008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6341
6342 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
6343 `"%code top" blocks' instead of `%code "top" blocks'.
6344 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
6345 Clean up whitespace in the output a little.
6346
b1cc23c4
JD
63472008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6348
6349 Fix documentation problems reported by Tim Josling at
6350 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
6351 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
6352 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
6353 integers. Explain the effect of literal string aliases on error
6354 messages. Copy token 0 documentation from the C++ skeleton
6355 documentation.
6356
ab7f29f8
JD
63572008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6358
6359 Accept a token number in a %left, %right, or %nonassoc for POSIX
6360 conformance. Reported by Tim Josling at
6361 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
6362 * NEWS (2.3a+): Mention.
6363 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
6364 and code numbers are treated by precedence declarations.
6365 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
6366 of symbols.1.
6367 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
6368 of symbol.
6369 (symbol.prec): New, just like symbol but allows INT.
6370 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
6371 longer holds.
6372 * tests/regression.at (Token number in precedence declaration): New
6373 test case.
6374
a924ef36
JMG
63752008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6376
6377 DJGPP specific issues.
6378 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
6379 be changed. Copyright timestamp adjusted.
6380 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
6381 be changed. Copyright timestamp adjusted.
6382 * djgpp/config.site: Copyright timestamp adjusted.
6383 * djgpp/config_h.sed: Copyright timestamp adjusted.
6384 * djgpp/djunpack.bat: Copyright timestamp adjusted.
6385 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
6386 filename translation list.
6387 * djgpp/subpipe.c (init_subpipe): Check the environment variables
6388 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
6389 files shall be created. Before trying to use the temp dir where the
6390 environment variable points to check that the dir really exists. If
6391 not default to the cwd as temp dir. Copyright timestamp adjusted.
6392 * djgpp/subpipe.h: Copyright timestamp adjusted.
6393 * djgpp/testsuite.sed: Copyright timestamp adjusted.
6394
389c8cfd
PE
63952008-01-30 Paul Eggert <eggert@cs.ucla.edu>
6396
6397 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
6398
5d1cfef4
PE
63992008-01-09 Paul Eggert <eggert@cs.ucla.edu>
6400
6401 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
6402 Problem reported by Claudio Saavedra in
6403 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
6404
e2dcf996
WP
64052008-01-05 Wojciech Polak <polak@gnu.org>
6406
6407 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
6408 document's title with the input grammar file name.
6409
da730230
JD
64102007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
6411
6412 Automate regression testing of the XML/XSLT implementation. Discussed
6413 starting at
6414 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
6415 * configure.ac (XSLTPROC): New substitution.
6416 * Makefile.am (maintainer-xml-check): New phony target invoking...
6417 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
6418 invoking make maintainer-check with BISON_TEST_XML=1.
6419 * tests/atlocal.in (XSLTPROC): New.
6420 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
6421 not to report reachable memory when Bison is expected to have a
6422 non-zero exit status and (2) to compare XML/XSLT output with --graph
6423 and --report=all output for every working grammar when
6424 BISON_TEST_XML=1.
6425 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
6426 (AT_BISON_CHECK_XML): New.
6427 (AT_QUELL_VALGRIND): New.
6428 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
6429 (AT_CHECK): ... don't redefine this since this was the old way to
6430 quell Valgrind.
6431 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
6432 AT_BISON_CHECK invocations.
6433 * tests/c++.at: Likewise.
6434 * tests/calc.at: Likewise.
6435 * tests/conflicts.at: Likewise.
6436 * tests/cxx-type.at: Likewise.
6437 * tests/existing.at: Likewise.
6438 * tests/glr-regression.at: Likewise.
6439 * tests/headers.at: Likewise.
6440 * tests/input.at: Likewise.
6441 * tests/java.at: Likewise.
6442 * tests/output.at: Likewise.
6443 * tests/push.at: Likewise.
6444 * tests/reduce.at: Likewise.
6445 * tests/regression.at: Likewise.
6446 * tests/sets.at: Likewise.
6447 * tests/skeletons.at: Likewise.
6448 * tests/synclines.at: Likewise.
6449 * tests/torture.at: Likewise.
6450 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
6451 tends to hang xsltproc.
6452 (Big horizontal): Likewise.
6453
408476bc
JD
64542007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6455
6456 In XML output, remove redundant class attribute on symbol element.
6457 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
6458 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
6459 look up a symbol to determine whether it's a nonterminal or terminal.
6460 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
6461 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
6462
6463 Add prec/assoc information to XML output.
6464 * src/gram.c (grammar_rules_print_xml): For each rule that has a
6465 %prec, add a percent_prec attribute.
6466 * src/print-xml.c (print_grammar): For each terminal that has a
6467 precedence or associativity, add a prec or assoc attribute.
6468 (xml_indent): New.
6469 (xml_puts): Use xml_indent.
6470 (xml_printf): Use xml_indent.
6471 * src/print-xml.h (xml_indent): Prototype.
6472
6473 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
6474 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6475
d4a26c48
JD
64762007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6477
6478 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
6479 (bison:ruleByNumber): ... this for clarity.
6480 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
6481 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
6482 (xsl:template match="reduction"): Update.
6483 (xsl:template match="item"): Update.
6484 (xsl:template match="reduction"): Update.
6485
6486 In the XML output, don't print the list of rules where symbols appear.
6487 Compute it in XSLT instead. Discussed at
6488 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
6489 * data/xslt/bison.xsl (bison:ruleByLhs): New.
6490 (bison:ruleByRhs): New.
6491 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
6492 bison:ruleByRhs.
6493 (xsl:template match="terminal/rule"): Remove.
6494 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6495 bison:ruleByRhs.
6496 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6497 Remove.
6498 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
6499 bison:ruleByRhs and mode="number-link" for rule template.
6500 (xsl:template match="terminal/rule"): Remove.
6501 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6502 bison:ruleByRhs and mode="number-link" for rule template.
6503 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6504 Rewrite as...
6505 (xsl:template match="rule" mode="number-link"): ... this.
6506 * src/print-xml.c (print_grammar): Don't print the list of rules.
6507
ef1b4273
JD
65082007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6509
6510 Don't let --report affect XML output; always print all information.
6511 Discussed at
6512 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
6513 * src/conflicts.c (log_resolution): Implement.
6514 * src/print-xml.c (print_core): Implement.
6515 (print_state): Implement.
6516 (print_xml): Implement.
6517
6518 * NEWS (2.3a+): Fix quotes.
6519 * src/parse-gram.y (prologue_declaration): For consistency with -v,
6520 don't let %verbose clear the list specified by --report.
6521
0f6cd9e3
AD
65222007-11-26 Akim Demaille <akim@epita.fr>
6523
6524 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
6525
d80fb37a
JD
65262007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
6527
6528 In the XML output, list useless and unused symbols and rules with the
6529 useful ones and add a "usefulness" attribute. Discussed starting at
6530 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
6531 * src/gram.c (grammar_rules_partial_print_xml): Remove.
6532 (grammar_rules_print_xml): Print all rules instead of just those
6533 useful in the grammar, and add a "usefulness" attribute.
6534 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
6535 * src/print-xml.c (print_rules_useless_in_parser): Remove.
6536 (print_grammar): Print all nonterminals instead of just useful ones,
6537 and add a "usefulness" attribute to nonterminals and terminals.
6538 (print_xml): Don't print a separate "reductions" or
6539 "rules-useless-in-parser" element.
6540 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
6541 (reduce_xml): Remove.
6542 (reduce_token_unused_in_grammar): New.
6543 (reduce_nonterminal_useless_in_grammar): New.
6544 * src/reduce.h (reduce_xml): Remove prototype.
6545 (reduce_token_unused_in_grammar): Add prototype.
6546 (reduce_nonterminal_useless_in_grammar): Add prototype.
6547 * data/xslt/xml2text.xsl: Update for XML changes.
6548 * data/xslt/xml2xhtml.xsl: Update for XML changes.
6549 * tests/reduce.at (Useless Terminals): Update output.
6550 (Useless Rules): Update output.
6551 (Reduced Automaton): Update output.
6552
6553 Say "Terminals unused in grammar" instead of "Unused terminals".
6554 * NEWS (2.3a+): Update.
6555 * doc/bison.texinfo (Understanding): Update example output.
6556 * src/reduce.c (reduce_output): Implement.
6557 * data/xslt/xml2text.xsl: Implement.
6558 * data/xslt/xml2xhtml.xsl: Implement.
6559
1bb2bd75
JD
65602007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
6561
6562 Accept --report-file=FILE to override the default `.output' filename.
6563 * NEWS (2.3a+): Mention.
6564 * doc/bison.texinfo (Bison Options): Add an entry.
6565 * src/files.c (compute_output_file_names): Don't override
6566 spec_verbose_file if already set.
6567 * src/getargs.c (usage): Document --report-file.
6568 (REPORT_FILE_OPTION): New anonymous enum member.
6569 (long_options): Add entry for it.
6570 (getargs): Add case for it setting spec_verbose_file.
6571
6572 * build-aux/cross-options.pl: Don't record a short option just because
6573 there's an arg.
6574 * doc/.cvsignore: Add yacc.1.
6575
a005a9c4
AD
65762007-11-14 Akim Demaille <akim@epita.fr>
6577
6578 * doc/yacc.1.in: New.
6579 * configure.ac, doc/Makefile.am: Adjust.
6580 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
6581 config.h symbol.
6582 Use AC_SUBST for assignments too.
6583 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
6584
cff03fb2
JD
65852007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6586
6587 * src/gram.c: Remove comments that duplicate comments in gram.h.
6588
6589 When reporting useless rules and nonterminals, say "useless in grammar"
6590 instead of "useless", and say "useless in parser" instead of "never
6591 reduced". Discussed starting at
6592 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
6593 * NEWS (2.3a+): Mention this change.
6594 * data/xslt/xml2text.xsl: Update output text and expected input XML
6595 element names to match changes below.
6596 * data/xslt/xml2xhtml.xsl: Likewise.
6597 (xsl:template match="bison-xml-report"): Add missing entry in Table of
6598 Contents: "Rules useless in parser due to conflicts".
6599 * doc/bison.texinfo (Decl Summary): Reword a little.
6600 (Understanding): Update example output for changes below.
6601 * src/gram.c: (rule_useful_p): Rename to...
6602 (rule_useful_in_grammar_p): ... this.
6603 (rule_useless_p): Rename to...
6604 (rule_useless_in_grammar_p): ... this.
6605 (rule_never_reduced_p): Rename to...
6606 (rule_useless_in_parser_p): ... this.
6607 (grammar_rules_print): Update for renames.
6608 (grammar_rules_print_xml): Update for renames.
6609 (grammar_rules_never_reduced_report): Rename to...
6610 (grammar_rules_useless_report): ... this since it is used for either
6611 kind of useless rule.
6612 * src/gram.h: Reword comments and update function names in prototypes.
6613 * src/main.c (main): Say "rule useless in parser due to conflicts".
6614 * src/print-xml.c (print_rules_never_reduced): Rename to...
6615 (print_rules_useless_in_parser): ... this, and rename output XML
6616 element "rules-never-reduced" to "rules-useless-in-parser".
6617 (print_xml): Update for rename.
6618 * src/print.c (print_results): Say "Rules useless in parser due to
6619 conflicts".
6620 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6621 (nonterminals_reduce): Say "nonterminal useless in grammar".
6622 (reduce_output): Say "Nonterminals useless in grammar".
6623 Say "Rules useless in grammar".
6624 (reduce_xml): Rename output XML element "useless" to
6625 "useless-in-grammar".
6626 (reduce_print): Don't report the count of grammatically useless rules
6627 as "rules never reduced" just because %yacc is specified.
6628 In the correct report of this count, say nonterminal(s) and rule(s)
6629 "useless in grammar".
6630 * tests/conflicts.at (S/R in initial): Update expected output.
6631 (Defaulted Conflicted Reduction): Likewise.
6632 (Unreachable States After Conflict Resolution): Likewise.
6633 * tests/existing.at (GNU pic Grammar): Likewise.
6634 * tests/reduce.at (Useless Nonterminals): Likewise.
6635 (Useless Rules): Likewise.
6636 (Reduced Automaton): Likewise.
6637 (Underivable Rules): Likewise.
6638 (Empty Language): Likewise.
6639
66f0441d
JD
66402007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6641
6642 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6643 here document and before the EOF so that BSD's implementation of Bourne
6644 shell doesn't parse the delimiter as part of the here document.
6645 * doc/.cvsignore: Add cross-options.texi.
6646 * src/getargs.c (usage): Add a blank line after the warning categories.
6647
d0ee4105
PB
66482007-11-08 Paolo Bonzini <bonzini@gnu.org>
6649
6650 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6651
e8b1fb9b
AD
66522007-11-05 Akim Demaille <akim@epita.fr>
6653
6654 Remove Id: from bison.1.
6655 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6656 (perl -0777 -pi -e 's/\.PP\nId): New.
6657 (.x.1): Use it to ignore the version control revision.
6658
2f7a96b5
AD
66592007-11-05 Akim Demaille <demaille@gostai.com>
6660
6661 * build-aux/Makefile.am: Ship cross-options.pl.
6662 * doc/Makefile.am: Always refer to cross-options.texi with
6663 $(srcdir).
6664 (MAINTAINERCLEANFILES): Add it.
6665
f4101aa6
AD
66662007-11-04 Akim Demaille <demaille@gostai.com>
6667
6668 Generate the long/short option cross-table.
6669 * build-aux/cross-options.pl: New.
6670 * doc/Makefile.am (cross-options.texi): New.
6671 * doc/bison.texinfo: Use it.
6672
727a1401
AD
66732007-11-04 Akim Demaille <demaille@gostai.com>
6674
6675 Generate bison.1 using help2man.
6676 * doc/common.x, doc/bison.x: New.
6677 * doc/Makefile.am (bison.1, .x.1): New.
6678 The code is taken from autoconf-2.61/man/Makefile.am.
6679 * configure.ac: Look for help2man.
6680
6aeb9c57
AD
66812007-11-04 Akim Demaille <demaille@gostai.com>
6682
6683 Complete --help.
6684 * src/getargs.c (usage): Document -W, make it clear that -d,
6685 -g and -x have optional arguments.
6686
d7be4085
AD
66872007-11-04 Akim Demaille <demaille@gostai.com>
6688
6689 Find sha1sum when named gsha1sum.
6690 * bootstrap (find_tool): New.
6691 ($SHA1SUM): New.
6692
d9df47b6
JD
66932007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6694
6695 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6696 at
6697 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6698 * NEWS (2.3a+): Mention.
6699 * data/bison.m4 (b4_pure_if): Don't define it here.
6700 * data/c.m4 (b4_identification): Depend on individual skeletons to
6701 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6702 values of the %define variables api.pure or api.push_pull. Define
6703 YYPURE, YYPUSH, and YYPULL accordingly.
6704 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6705 glr.cc has already defined b4_pure_flag.
6706 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6707 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 6708 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
6709 * doc/bison.texinfo (Pure Decl): Update.
6710 (Push Decl): Update.
6711 (Decl Summary): Add api.pure to %define entry.
6712 In %pure-parser entry, say it's deprecated and reference %define.
6713 (Pure Calling): Update.
6714 (Error Reporting): Update.
6715 (C++ Scanner Interface): Update.
6716 (How Can I Reset the Parser): Update.
6717 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6718 reference %define.
6719 * src/getargs.c (pure_parser): Remove global variable.
6720 * src/getargs.h (pure_parser): Remove extern.
6721 * src/output.c (prepare): Don't define pure_flag muscle.
6722 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6723 wrapper around `%define api.pure'.
6724 * tests/calc.at (Simple LALR Calculator): Update.
6725 (Simple GLR Calculator): Update.
6726 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6727 Update.
6728 (GLR: Resolve ambiguity, pure, locations): Update.
6729 (GLR: Merge conflicting parses, pure, no locations): Update.
6730 (GLR: Merge conflicting parses, pure, locations): Update.
6731 * tests/glr-regression.at (Uninitialized location when reporting
6732 ambiguity): Update
6733 * tests/input.at (Unused %define api.pure): New test case.
6734 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6735 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6736 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6737
c373bf8b
JD
67382007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6739
6740 %define push_pull -> %define api.push_pull. Discussed starting at
6741 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6742 * data/push.c: Expect the new name.
6743 * data/yacc.c: Likewise.
6744 * doc/bison.texinfo (Push Decl): Update.
6745 (Decl Summary): Update %define entry.
6746 (Push Parser Function): Update.
6747 (Pull Parser Function): Update.
6748 (Parser Create Function): Update.
6749 (Parser Delete Function): Update.
6750 * tests/calc.at (Simple LALR Calculator): Update.
6751 * tests/input.at (%define enum variables): Update.
6752 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6753 (Push Parsing: Multiple impure instances): Update.
6754 (Push Parsing: Unsupported Skeletons): Update.
6755 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6756 (Exploding the Stack Size with Malloc): Update.
6757
6758 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6759 other entries some.
6760
32f19b6b
JD
67612007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6762
6763 For the XML output's terminal element, rename @number to @token-number,
6764 and add @symbol-number. In the nonterminal element, rename @number to
6765 @symbol-number. Discussed starting at
6766 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6767 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6768 renames.
6769 (xsl:template match="nonterminal"): Likewise.
6770 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6771 (xsl:template match="nonterminal"): Likewise.
6772 * src/print-xml.c (print_grammar): Implement.
6773
255a6b90
JD
67742007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6775
6776 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6777 2007-10-11 change, the child elements here are items not rules.
408476bc 6778 (xsl:template match="item"): New.
255a6b90
JD
6779 (xsl:template match="rule"): Update for new reduced itemset.
6780 (xsl:template match="point"): Remove.
6781 (xsl:template match="empty"): For consistency with --graph, don't
6782 output "/* empty */".
6783 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6784 line-wrap, don't pass a negative value as first-line-length since this
6785 won't work with the following changes.
6786 (xsl:template name="line-wrap"): Simplify slightly.
6787 (xsl:template name="ws-search"): Eliminate recursion.
6788 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6789 set next to an item whose dot is not at the end of the RHS even if it
6790 happens to be associated with the same rule.
6791
88c78747
JD
67922007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6793
31984206
JD
6794 Add %define lr.keep_unreachable_states.
6795 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6796 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6797 * src/main.c (main): Implement it.
6798 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6799 Extend to test it, and fix a typo.
6800
68012007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6802
6803 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
6804 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6805 the example .output text.
6806 * tests/regression.at (Extra lookahead sets in report): Improve wording
6807 of comments.
6808
b7a70162
WP
68092007-10-17 Wojciech Polak <polak@gnu.org>
6810
6811 * src/print-xml.c (print_grammar): Renamed
6812 <terminal> and <nonterminal> attributes:
6813 "type" to "number" and "symbol" to "name".
6814 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6815 Use new attribute names.
6816 (xsl:template match="nonterminal"): Likewise.
6817 * data/xslt/xml2xhtml.xsl: Likewise.
6818
a0de5091
JD
68192007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6820
6821 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6822 (Option Cross Key): Likewise.
6823
6824 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6825 next to an item whose dot is not at the end of the RHS even if it
6826 happens to be associated with the same rule.
6827 * src/print.c (print_core): Likewise.
6828 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6829 (Resolved SR Conflicts): Update output.
6830 * tests/regression.at (Extra lookahead sets in report): New test case.
6831
4c20d18d
WP
68322007-10-11 Wojciech Polak <polak@gnu.org>
6833
6834 * src/print-xml.c (print_core): Remove item set
6835 redundancy.
6836 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6837 Improve processing time. Suggested by Joel E. Denny.
6838 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6839 Write xsl:param "required" attribute as comment.
6840 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6841 (xsl:template match="rule"): Support new reduced itemset.
6842 (xsl:template match="point"): Remove.
6843 * data/xslt/xml2xhtml.xsl: Likewise.
6844
f506ad1c
JD
68452007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6846
6847 * src/getargs.c (version): Update copyright year.
6848
21f1b063
JD
68492007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6850
6851 Make xml2dot.xsl and --graph produce the same output.
6852 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
6853 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6854 escaped later.
6855 (xsl:template name="output-node"): Use the new escape template instead
6856 of the string-replace template directly.
6857 (xsl:template name="output-edge"): Likewise.
6858 (xsl:template name="escape"): New, escapes backslashes and newlines in
6859 addition to quotation marks.
6860 * src/graphviz.c (start_graph, output_node, output_edge): Add
6861 whitespace to output for legibility.
6862
6863 Make xml2text.xsl and --report produce the same output, and remove the
6864 XML "conflicts" element since a conflict summary is easily extracted
6865 from the automaton.
6866 * data/xslt/bison.xsl: New.
6867 (xsl:template match="state" mode="bison:count-conflicts): New.
6868 * data/xslt/xml2text.xsl: Import bison.xsl.
6869 (xsl:template match="bison-xml-report"): Instead of styling the
6870 "conflicts" element, style the "automaton" element with mode
6871 "conflicts". Unlike the former, the latter lists S/R and R/R
6872 conflicts for a state on the same line.
6873 (xsl:template match="conflicts"): Remove.
6874 (xsl:template match="conflict"): Remove.
6875 (xsl:template match="terminal"): Line-wrap the list of rules in which
6876 the terminal is used.
6877 (xsl:template match="nonterminal"): Likewise for nonterminals.
6878 (xsl:template match="automaton" mode="conflicts"): New.
6879 (xsl:template match="state" mode="conflicts"): New.
6880 (xsl:template name="line-wrap"): New.
6881 (xsl:template name="ws-search"): New.
6882 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6883 (xsl:template match="bison-xml-report"): Instead of styling the
6884 "conflicts" element, style the "automaton" element with mode
6885 "conflicts."
6886 (xsl:template match="conflicts"): Remove.
6887 (xsl:template match="conflict"): Remove.
6888 (xsl:template match="automaton" mode="conflicts"): New.
6889 (xsl:template match="state" mode="conflicts): New.
6890 * src/conflicts.c (conflicts_output_xml): Remove.
6891 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6892 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6893 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6894 the corresponding XSLT is easier. Also, never wrap between a word and
6895 the comma that follows it.
6896
793fbca5
JD
68972007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6898
6899 Improve C++ namespace support. Discussed starting at
6900 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6901 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6902 b4_namespace_close): New macros that interpret the %define variable
6903 "namespace" so its value can contain "::" to indicate nested
6904 namespaces.
6905 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6906 the above macros.
6907 * data/lalr1.cc (b4_namespace): Likewise.
6908 * data/location.cc (b4_namespace): Likewise.
6909 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6910 inside a new table in the general %define entry. Document `%define
6911 namespace' there as well. Point the %name-prefix entry to it since it
6912 explains it more completely in the case of C++.
6913 (C++ Bison Interface): Mention `%define namespace' instead of
6914 %name-prefix.
6915 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6916 entry suffices.
6917 * tests/c++.at (Relative namespace references): New test case.
6918 (Absolute namespace references): New test case.
6919 (Syntactically invalid namespace references): New test case.
6920 * tests/input.at (C++ namespace reference errors): New test case.
6921
35b8730d
JD
69222007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6923
6924 Add syncline support and location accessor to internal %define
6925 interfaces.
6926 * data/bison.m4 (b4_percent_define_get_loc): New.
6927 (b4_percent_define_get_syncline): New.
6928 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6929 (b4_percent_define_default): Record defining location as line 1 rather
6930 than 0 for the sake of synchronizing #line's, and define
6931 b4_percent_define_syncline(VARIABLE).
6932 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6933 * src/muscle_tab.c (muscle_syncline_grow): New.
6934 (muscle_code_grow): Use muscle_syncline_grow.
6935 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6936 define b4_percent_define_syncline(VARIABLE).
6937 (muscle_percent_define_get_loc): New.
6938 (muscle_percent_define_get_syncline): New.
6939 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6940 remove some unused variables.
6941 (muscle_percent_define_default): Record defining location as line 1
6942 rather than 0 for the sake of synchronizing #line's, and define
6943 b4_percent_define_syncline(VARIABLE).
6944 (muscle_percent_define_check_values): Use
6945 muscle_percent_define_get_loc.
6946 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6947 (muscle_percent_define_get_syncline): Prototype.
6948 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6949 defaults): Update output for location change.
6950 (Complaining during macro argument expansion): Extend to test
6951 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6952
7dc4a694
JD
69532007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6954
6955 Fix some error-reporting macro bugs.
6956 * data/bison.m4 (b4_cat): New.
6957 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6958 to stdout so they don't become arguments to other macros. Update
6959 comments and add examples.
6960 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6961 add examples.
6962 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6963 after printing the error directive so that M4 doesn't report subsequent
6964 problems that are induced by this problem.
6965 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6966 instead of just in them. Recognize @\n in both places. Both expand to
6967 the empty string. Needed by b4_cat.
6968 * tests/skeletons.at (Complaining during macro argument expansion):
6969 New test case.
6970 (Fatal errors make M4 exit immediately): New test case.
6971
d4bd2295
JD
69722007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6973
6974 Implement --print-datadir.
6975 * src/getargs.c (usage): Mention.
6976 (PRINT_DATADIR_OPTION): New anonymous enum member.
6977 (long_options): Add entry for it.
6978 (getargs): Add case for it calling compute_pkgdatadir.
6979 * src/output.c (output_skeleton): Encapsulate data directory
6980 computation from here...
6981 (prepare): ... and from here...
6982 (compute_pkgdatadir): ... into this new function.
6983 * src/output.h (compute_pkgdatadir): Prototype.
6984
34cdeddf
JD
69852007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6986
6987 * src/print-xml.c (escape_bufs): New static global variable
6988 replacing...
6989 (xml_escape_n): ... the static local variable buf here.
6990 (print_xml): Free memory for escape_bufs.
6991 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6992
d782395d
JD
69932007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6994
6995 Replace `%push-parser' and `%push-pull-parser' with
6996 `%define push_pull "push"' and `%define push_pull "both"'.
6997 `%define push_pull "pull"' is the default.
6998 * doc/bison.texinfo (Push Decl, Push Parser Function,
6999 Pull Parser Function, Parser Create Function, Parser Delete Function):
7000 Update declarations.
7001 (Decl Summary, Table of Symbols): Replace %push-parser and
7002 %push-pull-parser entries with a %define push_pull entry.
7003 * data/bison.m4 (b4_percent_define_check_values): New macro.
7004 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
7005 definitions...
7006 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
7007 definitions...
7008 * data/push.c: ... to here and compute them from the value of the
7009 %define variable push_pull.
7010 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
7011 parsing requests here...
7012 * data/yacc.c: ... hack this to switch to push.c any time
7013 b4_use_push_pull_flag or the %define variable push_pull is set. This
7014 will go away when we mv push.c yacc.c.
7015 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
7016 push parsing is not supported since unused %define variables are
7017 reported anyway.
7018 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
7019 * src/muscle_tab.h (muscle_percent_define_check_values): Update
7020 comments for consistency with b4_percent_define_check_values.
7021 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
7022 muscles.
7023 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
7024 Remove.
7025 (prologue_declaration): Remove %push-parser and %push-pull-parser
7026 rules.
7027 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
7028 * tests/calc.at: Update declarations.
7029 * tests/input.at (%define enum variables): New test case.
7030 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
7031 declaration.
7032 (Push Parsing: Multiple impure instances): Update declaration.
7033 (Push Parsing: Unsupported Skeletons): New test case.
7034 * tests/torture.at (Exploding the Stack Size with Alloca): Update
7035 declaration.
7036 (Exploding the Stack Size with Malloc): Update declaration.
7037
3f999f78
WP
70382007-09-24 Wojciech Polak <polak@gnu.org>
7039
7040 Add XSLT transformations.
7041
7042 * data/xslt/xml2dot.xsl: Transform XML into DOT.
7043 * data/xslt/xml2text.xsl: Transform XML into plain text.
7044 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
7045 * data/Makefile.am (xsltdir): New variable.
7046 (dist_xslt_DATA): Add xslt/*.xsl files.
7047
a4f75309
PE
70482007-09-23 Paul Eggert <eggert@cs.ucla.edu>
7049
7050 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
7051 Problem reported by Wojciech Polak.
7052 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
7053 (xml_printf): Undo change I made on 21 September; that is,
7054 indent 2 spaces, not 1.
7055
ad5feac4
JD
70562007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
7057
7058 Pacify ./configure --enable-gcc-warnings.
7059 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
7060 `char const *' instead of `char *'.
7061 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
7062 local variable `sep'.
7063
41d7a5f2
PE
70642007-09-21 Paul Eggert <eggert@cs.ucla.edu>
7065
7066 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
7067 elsewhere.
7068 * src/print-xml.c: Prefer "const" after types; that's more consistent.
7069 (xml_printf): Indent just 1 space for level.
7070 (e_char, xlate_char): Remove.
7071 (xml_escape_string): Rewrite to avoid undefined behavior (used
7072 storage that was freed from the stack).
7073 (xml_escape_n): Don't bother checking for subscript error.
7074
3f999f78
WP
70752007-09-21 Wojciech Polak <polak@gnu.org>
7076
7077 Add Bison XML Automaton Report.
41d7a5f2
PE
7078
7079 Add support for an -x option to generate an XML report.
7080 It is not documented yet.
7081 * src/print-xml.c: New file.
7082 * src/print-xml.h: Likewise.
7083 * lib/timevar.def (TV_XML): New var.
7084 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
7085 * src/conflicts.c: Include print-xml.h.
7086 (solved_conflicts_xml_obstack): New var.
7087 (log_resolution, conflicts_solve, conflicts_free):
7088 Add support for XML report.
7089 (conflicts_output_val): New function.
7090 * src/conflicts.h (conflicts_output_val): New decl.
7091 * src/files.c (spec_xml_file): New var.
7092 (compute_output_file_names, output_file_names_free): Add XML support.
7093 * src/files.h (spec_xml_file): New decl.
7094 * src/getargs.c (xml_flag): New var.
7095 (usage, short_options, long_options, getargs): Add XML support.
7096 * src/getargs.h (xml_flag): New decl.
7097 * src/gram.c: Include print-xml.h.
7098 (rule_lhs_print_xml, rule_rhs_print_xml):
7099 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
7100 New functions.
7101 * src/gram.h: Declare external ones.
7102 * src/main.c: Include print-xml.h.
7103 (main): Add XML support.
7104 * src/reduce.c: Include print-xml.h.
7105 (reduce_xml): New function.
7106 * src/reduce.h: Declare it.
7107 * src/state.c: Include print-xml.h.
7108 (state_new): Add XML support.
7109 (state_rule_lookahead_tokens_print_xml): New function.
7110 * src/state.h: Declare it.
7111 (struct state): New member solved_conflicts_xml.
7112 * src/symtab.c (symbol_class_get_string): New function.
7113 * src/symtab.h: Declare it.
7114
6d8e724d
PE
71152007-09-21 Paul Eggert <eggert@cs.ucla.edu>
7116
7117 * GNUmakefile: Switch to coreutils's version.
7118 * bootstrap: Likewise.
7119 * Makefile.cfg: Adjust to new GNUmakefile.
7120 * README-hacking: Likewise.
7121
7122 Import from gnulib:
7123
7124 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
7125 Bruno Haible <bruno@clisp.org>
7126
7127 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
7128 and is a script that invokes bison. Tighten the code. Add comments.
7129
922bdd7f
JD
71302007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
7131
7132 Spell "boolean" as "Boolean". Reported by Akim Demaille.
7133 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
7134 * doc/bison.texinfo (Decl Summary): Fix.
7135 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
7136 * tests/input.at (Boolean %define variables): Update output.
7137 * tests/skeletons.at (%define boolean variables: invalid skeleton
7138 defaults): Rename to...
7139 (%define Boolean variables: invalid skeleton defaults): ... this and
7140 update output.
7141
1b17b01d
JD
71422007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
7143
7144 In impure push mode, don't allow more than one yypstate to be allocated
7145 since multiple impure parsers would corrupt yynerrs.
7146 * data/push.c (yypstate_allocated): New static global variable
7147 initialized to 0.
7148 (yypull_parse): If yypstate_new returns 0, don't report it as memory
7149 exhaustion if yypstate_allocated is 1, but still return 2.
7150 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
7151 already 1. Otherwise, set it to 1.
7152 (yypstate_delete): Set it to 0.
7153 * tests/push.at (Push Parsing: Multiple impure instances): New test
7154 case.
7155
9987d1b3
JD
71562007-08-17 Bob Rossi <bob@brasko.net>
7157
7158 * doc/bison.texinfo (Push Decl): Document the push parser.
7159 (Table of Symbols): Ditto.
7160 (Pure Decl): Ditto.
7161 (Decl Summary): Ditto.
7162 (Multiple Parsers, Push Parser Function, Pull Parser Function,
7163 Parser Create Function, Parser Delete Function):
7164 Add new push parser symbols.
7165 (Table of Symbols): Document push-parser, push-pull-parser,
7166 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
7167
f16b0819
PE
71682007-08-15 Paul Eggert <eggert@cs.ucla.edu>
7169
7170 Update to GPLv3.
7171 * doc/gpl-3.0.texi: New file.
7172 * doc/gpl.texi: Remove.
7173 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
7174 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
7175 * README-hacking, TODO, bootstrap, bootstrap.conf:
7176 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
7177 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
7178 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
7179 * data/lalr1.cc, data/lalr1.java, data/location.cc:
7180 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
7181 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
7182 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
7183 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
7184 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
7185 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
7186 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
7187 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
7188 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
7189 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
7190 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
7191 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
7192 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
7193 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
7194 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
7195 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
7196 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
7197 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
7198 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
7199 * src/complain.c, src/complain.h, src/conflicts.c:
7200 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
7201 * src/files.h, src/flex-scanner.h, src/getargs.c:
7202 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
7203 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
7204 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
7205 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
7206 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
7207 * src/print.c, src/print.h, src/print_graph.c:
7208 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
7209 * src/reduce.h, src/relation.c, src/relation.h:
7210 * src/revision.h, src/scan-code.h, src/scan-code.l:
7211 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
7212 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
7213 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
7214 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
7215 * tests/Makefile.am, tests/actions.at, tests/c++.at:
7216 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
7217 * tests/existing.at, tests/glr-regression.at:
7218 * tests/headers.at, tests/input.at, tests/java.at:
7219 * tests/local.at, tests/output.at, tests/push.at:
7220 * tests/reduce.at, tests/regression.at, tests/sets.at:
7221 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
7222 * tests/torture.at:
7223 Update to GPLv3.
7224
728c4be2
JD
72252007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7226
7227 Get rid of broken %no-parser, -n, and --no-parser implementation and
7228 documentation.
7229 * TODO: Don't mention them.
7230 * doc/bison.1: Likewise.
7231 * doc/bison.texinfo (Decl Summary): Likewise.
7232 (Bison Options): Likewise.
7233 (Option Cross Key): Likewise.
7234 * src/getargs.c (no_parser_flag): Remove global variable.
7235 (usage): Don't print description of -n and --no-parser.
7236 (long_options): Remove --no-parser entry here.
7237 (getargs): Remove -n case in the switch here.
7238 * src/getargs.h (no_parser_flag): Remove extern.
7239 * tests/regression.at (Web2c Actions): Remove comment that mentions
7240 --no-parser.
7241
5d31a216
JD
72422007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7243
7244 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
7245 name user variables starting with `yy'. Just pass NULL instead of a
7246 dummy local &yylval to yypush_parse.
7247 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
7248 starting with `yy'.
7249
a2ea208d
JD
72502007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
7251
7252 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
7253 true since it's then always used regardless of whether yyoverflow is
7254 defined. Reported by Christian Burger at
7255 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
7256 * THANKS: Add Christian Burger.
7257
91661ebb
JD
7258 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7259 node names: say "Decl Summary" not "Bison Declaration Summary".
7260
cbd50549
JD
72612007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
7262
7263 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
7264 determine whether this function has already complained about an invalid
7265 value for a %define boolean variable, don't check whether Bison has
7266 ever examined the value. As written, the check was a tautology.
7267 Instead, record and check for this complaint using a separate muscle.
7268
eb1b0740
JD
72692007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
7270
7271 Fix push parsing memory leak reported by Brandon Lucia at
7272 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
7273 * THANKS: Add Brandon Lucia.
7274 * data/push.c (yypstate_delete): Free the stack if it was reallocated
7275 but the parse never completed and thus freed it.
7276 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
7277 * tests/testsuite.at: Include push.at.
7278 * test/push.at: New.
7279 (Push Parsing: Memory Leak for Early Deletion): New test case.
7280
9d774aff
JD
72812007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
7282
7283 Improve handling of multiple S/R conflicts in the same state and of S/R
7284 conflicts involving multiple reductions.
7285 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
7286 set for a state here or Bison will abort if it is reassigned on a
7287 later conflicted reduction in the same state.
7288 Similarly, don't finalize and assign the solved conflicts report here
7289 or it will be lost if it is reassigned on a later conflicted reduction
7290 in the same state.
7291 (set_conflicts): Instead, assign them both here after all S/R conflicts
7292 in the state have been fully examined.
7293 * src/print.c (shift_set): Rename to...
7294 (no_reduce_set): ... this.
7295 (print_reductions): Update for rename, and add %nonassoc error action
7296 tokens to no_reduce_set so that, when printing the first remaining
7297 reduction on an error action token, the reduction is enclosed in
7298 brackets.
7299 (print_results): Update for rename.
7300 * tests/conflicts.at (Solved conflicts report for multiple reductions
7301 in a state): New test case.
7302 (%nonassoc error actions for multiple reductions in a state): New test
7303 case.
7304
7305 * src/main.c (main): Don't depend on C99 features.
7306
10159d2a
JD
73072007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
7308
7309 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
7310 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
7311 uniwidth.
10159d2a 7312
953b3935
JD
73132007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
7314
7315 * bootstrap (slurp): Create target directories that don't exist.
7316 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
7317
6ce2d93a
JD
73182007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7319
7320 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
7321 than item number.
7322 * closure.c (closure): Likewise.
7323 * state.h (reductions): Comment sorting of rules.
7324 (state): Comment sorting of items.
7325
ce3448d5
JD
73262007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
7327
7328 Fix C++ test cases after recent Gnulib changes. Discussed starting at
7329 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
7330 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
7331 definition in order to avoid Gnulib headers since we don't use config.h
7332 here.
7333 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
7334 rather than AT_DATA so that config.h is included.
7335
8a86eef0
JD
73362007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
7337
7338 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
7339 instead of fprintf. Guard these functions with #if YYDEBUG instead of
7340 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
7341 and so that YYFPRINTF is guaranteed to be defined here.
7342
b1a81613
JD
73432007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7344
7345 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
7346 with...
7347 (muscle_percent_define_check_values): ... this more helpful function.
7348 Again, it's not used yet, but it will be.
7349 * src/muscle_tab.h: Likewise.
7350
71b61d4d
JD
7351 Improve some comments in parser table construction.
7352 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
7353 (generate_states): Don't mention ruleset, which is internal to closure.
7354 * src/closure.c (closure): Explain sorting of core and itemset, which
7355 is required for this function to behave correctly.
7356 * src/closure.h (closure): Mention sorting.
7357
2a6b783d
JD
73582007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
7359
7360 * src/lalr.c (state_lookahead_tokens_count): For code readability,
7361 move the check for disabled transitions to an aver since conflict
7362 resolution hasn't happened yet.
7363
7364 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
7365 labels a state as inconsistent just because it has error transitions.
7366 The original form of this check appeared in revision 1.1 of lalr.c,
7367 which was committed on 1991-12-21. Now (at least), changing the
7368 consistency label on such a state appears to have no useful effect in
7369 any of the places it is examined, which I enumerate below. The key
7370 point to understanding each item in this enumeration is that a state
7371 with an error transition is labelled consistent in the first place only
7372 if it has no rules, so the check cannot matter for states that have
7373 rules. (1) Labelling a state as inconsistent will cause set_conflicts
7374 to try to identify its conflicts, and a state must have *rules* to have
7375 conflicts. (2) Labelling a state as inconsistent will affect how
7376 action_row sets the default *rule* for the state. (3) Labelling a
7377 state as inconsistent will cause build_relations to add lookback edges
7378 to *rules* in that state.
7379 * src/state.h (struct state): Word the comment for member consistent
7380 more carefully.
7381
14462c2b
JD
73822007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
7383
7384 Don't depend on C99 features.
7385 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
7386 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
7387 * src/reader.c (check_and_convert_grammar): Fix for-loop.
7388 * src/state.c (state_mark_reachable_states): Fix for-loop.
7389 (state_remove_unreachable_states): Fix for-loop.
7390
7391 Don't widen struct state with member reachable just to temporarily
7392 record reachability. Instead, use a local bitset.
7393 * src/state.h (struct state): Remove member.
7394 * src/state.c (state_new): Don't initialize it.
7395 (state_mark_reachable_states): Rename to...
7396 (state_record_reachable_states): ... this, and use bitset.
7397 (state_remove_unreachable_states): Use bitset.
7398
5a43d418
JD
73992007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
7400
7401 * src/Makefile.am (yacc): Quote target action commands properly so
7402 that the yacc script isn't corrupt. Reported by Hans Aberg at
7403 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
7404
0c650a20
JD
7405 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
7406 the case of pure parsers. Reported by Frans Englich at
7407 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
7408 * THANKS: Add Frans Englich.
7409
61fee93e
JD
7410 * NEWS (2.3a+): In the %code entry, reference section `Bison
7411 Declaration Summary' from the manual now since the %code summary has
7412 moved there.
7413 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
7414 in the rules section must be terminated by semicolons.
7415
f124d423
JD
74162007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
7417
7418 Extend the front-end API for %define variables to more completely
7419 mirror the back-end. This will be useful in the future.
7420 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
7421 Update comments to mention the new front-end counterparts of these
7422 macros.
7423 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
7424 for muscle_string_decode and muscle_location_decode.
7425 (muscle_string_decode): New static function.
7426 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
7427 (muscle_percent_define_get, muscle_percent_define_ifdef): New
7428 functions.
7429 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
7430 muscle_percent_define_get to mimic the b4_percent_define_flag_if
7431 implementation more closely.
7432 (muscle_percent_define_invalid_value): New function.
7433 * src/muscle_tab.h (muscle_percent_define_get,
7434 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
7435 Prototype.
7436
75ad86ee
JD
74372007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
7438
7439 * NEWS (2.3a+): Mention yesterday's state-removal change.
7440 (2.3a): Remove the %language entry, which was added after 2.3a.
7441 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
7442 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
7443 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
7444 tests/existing.at: Update copyright date.
7445
5967f0cf
JD
74462007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7447
7448 If conflict resolution makes states unreachable, remove those states,
7449 report rules that are then unused, and don't report conflicts in those
7450 states.
7451 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
7452 New global function.
7453 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
7454 function.
7455 * src/main.c (main): After conflict resolution, remove the unreachable
7456 states and update all data structures that reference states by number.
7457 * src/state.c (state_new): Initialize each state's reachable member to
7458 false.
7459 (state_mark_reachable_states): New static function.
7460 (state_remove_unreachable_states): New global function.
7461 * src/state.h (struct state): Add member bool reachable.
7462 (state_remove_unreachable_states): Prototype.
7463 * tests/conflicts.at (Unreachable States After Conflict Resolution):
7464 New test case.
7465 * tests/existing.at (GNU pic Grammar): Update test case output now that
7466 an unused rule is discovered.
7467
b09f4f48
JD
74682007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7469
7470 Minor code cleanup in parser table construction.
7471 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
7472 (new_itemsets, save_reductions): Update for rename to nitemset.
7473 * src/closure.c (nritemset): Rename to...
7474 (nitemset): ... this since the "r" appears to meaningless and isn't
7475 used in the comments.
7476 (closure): Update for rename.
7477 * src/closure.h (nritemset): Update extern to...
7478 (nitemset): ... this.
7479 * src/lalr.c (LA): Fix a typo in comments.
7480 * src/print.c (print_core): Update for rename to nitemset.
7481 * src/print_graph.c (print_graph): Likewise.
7482 * src/state.h: Fix some typos in header comments.
7483
bbb44d83
PE
74842007-04-04 Paul Eggert <eggert@cs.ucla.edu>
7485
9b33de72
PE
7486 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
7487 still sticks to ASCII. Sorry!
7488
bbb44d83
PE
7489 * README-hacking: New file, taken mostly from coreutils, with changes
7490 for Bison. Contains much of the contents of:
7491 * README-cvs: Remove.
7492 * bootstrap: Sync from gnulib.
7493 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
7494 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
7495
29553547
JD
74962007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
7497
7498 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
7499 Setzer.
7500 (Java Differences): Fix some typos.
7501 * THANKS: Add Sebastian Setzer.
7502
01b477c6
PB
75032007-03-07 Paolo Bonzini <bonzini@gnu.org>
7504
730739e4
AD
7505 * data/java.m4 (b4_single_class_if): Remove.
7506 (b4_abstract_if): Look at "%define abstract".
7507 (b4_lexer_if): New.
7508 (b4_union_name): Rename...
7509 (b4_yystype): ... to this. Map to "%define stype".
7510 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
7511 b4_maybe_throws): Fix quoting.
7512 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
7513 * data/lalr1.java (Lexer interface): Always define.
7514 (Lexer interface within parser class): Remove.
7515 (YYLexer class): New, used when "%code lexer" is present.
7516 (constructor): When "%code lexer" is used, pass %lex-param
7517 to the lexer constructor.
7518 (yylex, yyparse): Remove %lex-param from method invocations
7519 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
7520
7521 * doc/bison.texinfo (Java Bison Interface): Mention "%define
7522 abstract". Rename "%define union_name" to "%define stype".
7523 Rename method names according to previous patch.
7524 (Java Scanner Interface): Describe "%code lexer" instead of
7525 "%pure-parser" and "%define single_class".
7526 (Java Differences): Mention "%code lexer".
7527
7528 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
7529 Include scanner here, using macros from tests/local.at.
7530 (AT_DATA_CALC_Y): Remove final argument.
7531 (_AT_CHECK_JAVA_CALC): Likewise.
7532 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
7533 of %locations and %error-verbose.
7534 (main): Test with and without %lex-param.
7535 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
7536 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 7537
122bea3a
JMG
75382007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7539
7540 DJGPP spefic issue. Inhibit the use of disallowed characters for
7541 file name genertion on Win98, WinXP, etc. These are |<>":?*\
7542 and concern testsuite case 46.
7543 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
7544 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
7545 * djgpp/config.bat: Inhibit the use of disallowed characters.
7546
9611cfa2
JD
75472007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7548
7549 Miscellaneous %define and %code cleanup.
7550 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
7551 values are interpreted.
7552 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
7553 documentation a little more.
7554 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
7555 muscle_percent_define_insert, muscle_percent_code_grow): New
7556 functions/macros.
7557 * src/muscle_tab.h (muscle_percent_define_insert,
7558 muscle_percent_code_grow): Prototype.
7559 * src/parse-gram.y (prologue_declaration): Use
7560 muscle_percent_define_insert and muscle_percent_code_grow when parsing
7561 %define and %code directives.
7562
7563 Make it easy to share %define boolean variables between the front-end
7564 and back-end. Though not used yet, this will be useful in the future.
7565 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
7566 Bison uses of names rather than just skeleton uses of names.
7567 (b4_percent_define_get, b4_percent_define_ifdef): Rename
7568 b4_percent_define_skeleton_variables(VARIABLE) to
7569 b4_percent_define_bison_variables(VARIABLE).
7570 (b4_percent_code_get, b4_percent_code_ifdef): Rename
7571 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
7572 b4_percent_code_bison_qualifiers(QUALIFIER).
7573 (b4_check_user_names_wrap): Update for renames.
7574 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
7575 muscle_percent_define_default): New functions mimicking
7576 b4_percent_define_flag_if and b4_percent_define_default.
7577
7578 For %define variables, report locations for invalid values and
bbb44d83 7579 redefinitions.
9611cfa2
JD
7580 * data/bison.m4 (b4_percent_define_flag_if): Read
7581 b4_percent_define_loc(VARIABLE) to report the location of an invalid
7582 value for VARIABLE.
7583 (b4_percent_define_default): Save a special location in
7584 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
7585 must later be reported as invalid.
7586 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
7587 functions.
7588 (muscle_percent_define_insert): Record the location of VARIABLE in
7589 muscle percent_define_loc(VARIABLE), and use it to report the previous
7590 location for a redefinition.
7591 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
7592 (muscle_percent_define_default): Update like b4_percent_define_default.
7593 (muscle_grow_user_name_list): Rename to...
7594 (muscle_user_name_list_grow): ... this for consistency and use
7595 muscle_location_grow.
7596 * src/muscle_tab.h (muscle_location_grow): Prototype.
7597 * tests/input.at (%define errors): Update expected output.
7598 * tests/skeletons.at (%define boolean variables: invalid skeleton
7599 defaults): New test case.
7600
0bf92491
JD
76012007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
7602
7603 * src/print.c (lookahead_set, state_default_rule): Remove.
7604 (print_reductions): Replace state_default_rule invocation with
7605 equivalent use of yydefact, which was computed in token_actions in
7606 tables.c.
7607 (print_results): Don't allocate lookahead_set.
7608
d3b12988
PB
76092007-02-27 Paolo Bonzini <bonzini@gnu.org>
7610
7611 * data/lalr1.java: Prefix all private members with yy.
7612
f57a7536
JD
76132007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7614
7615 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 7616 Sebastien Fricker at
f57a7536 7617 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 7618 * THANKS: Add Sebastien Fricker.
f57a7536
JD
7619 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7620 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7621 accept a variable number of arguments.
7622
6404a5bf
JD
76232007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7624
7625 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7626
e4e09639
JMG
76272007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7628
7629 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7630 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7631 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7632
d7e0a1a7
PE
76332007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7634
7635 Undo my 2007-02-07 change, switching back to the c-strcase module
7636 introduced in the 2007-02-03 change. Bruno Haible reported that
7637 the 2007-02-07 change would be dangerous in Turkish if we add a
7638 language whose name contains "i", since "i" is not lowercase "I"
7639 in Turkish.
7640 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7641 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7642 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7643 * m4/.cvsignore: Remove strcase.m4.
7644 * src/getargs.c: Revert 2007-02-07 change, as follows.
7645 Include c-strcase.h.
7646 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7647
deee93a1
JD
76482007-02-11 Bruno Haible <bruno@clisp.org>
7649
7650 Enable the Java related testsuite tests when the only Java compiler
7651 found is a gcj < 4.3. Discussed at
7652 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7653 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7654
574add85
JD
76552007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7656
7657 * data/Makefile.am: Update copyright date.
7658 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7659 yypstate_new returns NULL.
7660 (yypstate_new): Return NULL if malloc does.
7661 * src/reader.c (packgram): Move translation of rule actions from the
7662 beginning of packgram to...
7663 (check_and_convert_grammar): ... here right before packgram is invoked
7664 so it's easier to write more complete comments, and remove redundant
7665 code.
7666
e785ccf7
JD
76672007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7668
7669 As in semantic actions, make @$ in %initial-action, %destructor, and
7670 %printer imply %locations.
7671 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7672 scanning @$.
7673 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7674 (@$ in %initial-action implies %locations,
7675 @$ in %destructor implies %locations,
7676 @$ in %printer implies %locations): ... these new test cases.
7677
1cfe1ed7
PE
76782007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7679
7680 Undo most of the 2007-02-03 change, switching to the strcase module
7681 now that gnulib strcase has been fixed.
7682 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7683 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7684 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7685 * m4/.cvsignore: Add strcase.m4.
7686 * src/getargs.c: Revert 2007-02-03 change, as follows.
7687 Don't include c-strcase.h.
7688 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7689 strcasecmp has "unspecified behavior" outside the POSIX locale,
7690 but it works fine in practice if at least one argument is ASCII,
7691 as is the case in Bison.
7692
0049ec86
PB
76932007-02-07 Paolo Bonzini <bonzini@gnu.org>
7694
7695 * tests/java.at: Skip tests if only one of javac/java is present.
7696 Reported by Joel E. Denny.
7697 * tests/atlocal.in: Adjust copyright years.
7698
76992007-02-05 Paolo Bonzini <bonzini@gnu.org>
7700
7701 * data/lalr1.java (Stack): Work around old verifiers that disallow
7702 access to the private fields of an inner class, from the outer class.
7703 We can make Stack's fields public because user code doesn't have access
7704 to the instance of Stack used by parse(). Reported by Paul Eggert.
7705
2c2b7220
PE
77062007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7707
7708 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7709 the right spot for these files?
7710 * bootstrap.conf (gnulib_modules): Add c-strcase.
7711 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7712 c-strncasecmp.c.
7713 * src/getargs.c: Include c-strcase.h.
7714 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7715 to avoid unspecified behavior.
7716
b2b81dae
JD
77172007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7718
7719 * doc/bison.texinfo (Decl Summary): Correct typo.
7720
c1d19e10
PB
77212007-01-30 Paolo Bonzini <bonzini@gnu.org>
7722
7723 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7724 Complain if the value does not match empty, "true" or "false".
7725 * data/c++.m4: Adjust default definitions of %define variables.
7726 * data/java.m4: Adjust default definitions of %define variables.
7727 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7728 to above behavior.
7729 * tests/input.at (Boolean %define variables): Test new behavior.
7730
8405b70c
PB
77312007-01-29 Paolo Bonzini <bonzini@gnu.org>
7732
7733 * NEWS: Mention java.
7734 * TODO: Remove things that are done.
7735 * bootstrap.conf: Add javacomp-script and javaexec-script.
7736 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7737
7738 * data/Makefile.am: Add new files.
7739 * data/java-skel.m4: New.
7740 * data/java.m4: New.
7741 * data/lalr1.java: New.
7742
7743 * doc/bison.texinfo: Put "A Complete C++ Example" under
7744 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7745 under Other Languages.
7746
7747 * src/getargs.c (valid_languages): Add Java.
7748 * src/getargs.h (struct bison_language): Update size of string fields.
7749
7750 * tests/Makefile.am: Add java.at.
7751 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7752 * tests/java.at: New.
7753 * tests/testsuite.at: Include it.
7754
3eb82471
JD
77552007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7756
7757 Clean up.
7758 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7759 at_directive_argv arguments so these no longer have to be global
7760 variables. Also, update the implementation for the following changes.
7761 (fail_for_at_directive_too_many_args,
7762 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7763 (at_directive_name): Remove as at_directive_argv[0] will be used for
7764 this now.
7765 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7766 for the directive name.
7767 (at_directive_argc, at_directive_argv): Make these local within
7768 skel_lex instead of global.
7769 (INITIAL): Update directive start action for above changes.
7770 (SC_AT_DIRECTIVE_ARG): Rename to...
7771 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7772 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7773 (scan_skel): Move yylex_destroy to...
7774 (skel_scanner_free): ... here.
7775 * tests/skeletons.at (installed skeleton file name): Rename to...
7776 (installed skeleton file names): ... this.
7777
148d66d8
JD
77782007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7779
7780 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7781 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7782 Summary" not "Directives".
7783 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7784 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7785 since the former is now the more complete one.
7786 (Prologue Alternatives): Likewise and do the same for %defines.
7787 (Table of Symbols): Add summary of %code, add summary of %define, and
7788 move full %code documentation to...
7789 (Decl Summary): ... here for consistency with other entries in these
7790 sections.
7791 Move %define entry in order to keep this list alphabetized.
7792 Reword %define entry a little to put less emphasis on the skeleton
7793 concept, which most users shouldn't have to think about.
7794
665f0c24
PE
77952007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7796
7797 Adjust to recent gnulib changes.
7798 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7799 Add string.h, string_.h, unistd_.h, wchar_.h.
7800 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7801 * src/system.h: Don't include <stpcpy.h>; this is now done by
7802 <string.h>.
7803
592d0b1e
PB
78042007-01-23 Paolo Bonzini <bonzini@gnu.org>
7805
7806 Simplify implementation of unqualified %code, implement macros for
7807 uniform treatment of boolean %define flags. Document %define.
7808 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7809 b4_percent_code_ifdef): New.
7810 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7811 * data/c++.m4: Define default value for global_tokens_and_yystype.
7812 * data/glr.cc: Likewise.
7813 * data/location.cc: Use b4_percent_define_flag_if.
7814
148d66d8 7815 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
7816
7817 * src/parse-gram.y (Unqualified %code): Change muscle name to
7818 b4_percent_code().
7819 (content.opt): Default to empty.
7820
a7867f53
JD
78212007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7822
7823 Implement support for relative and absolute skeleton file names.
7824 Discussed starting at
7825 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7826 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7827 (Bison Options): Document in --skeleton entry.
7828 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7829 full_skeleton can't necessarily hold all of pkgdatadir.
7830 If the specified skeleton file name contains a `/', don't prepend
7831 pkgdatadir.
7832 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7833 file name contains a `/', prepend the grammar file directory.
7834 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7835 * skeletons.at: New file.
7836 (relative skeleton file names): New test case.
7837 (installed skeleton file names): New test case.
7838 * tests/testsuite.at: Include skeletons.at.
7839
7840 * bootstrap: Update copyright to 2007.
7841
830c9b18
PB
78422007-01-17 Paolo Bonzini <bonzini@gnu.org>
7843
7844 * bootstrap: Remove occurrences of .#bootmp from the files.
7845
a8c2e813
AD
78462007-01-17 Akim Demaille <akim@epita.fr>
7847
7848 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7849 nonterminals.
7850 Use per-type %printer.
7851
279cabb6
JD
78522007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7853
7854 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7855 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7856 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7857 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7858 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7859 tests/glr-regression.at, tests/input.at, tests/local.at,
7860 tests/output.at, tests/torture.at: Update copyright to 2007.
7861
bb32f4f2
AD
78622007-01-16 Akim Demaille <akim@epita.fr>
7863
7864 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7865 error code.
7866 (Calc++ Scanner): Exit with failure if we can't open the input
7867 file.
7868 Accept "-" standing for stdin.
7869 (Calc++ Top Level): Print the result only if the parsing was
7870 successful.
7871
7cff04b5
AD
78722007-01-16 Akim Demaille <akim@epita.fr>
7873
7874 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7875
a4e25e1d
JD
78762007-01-15 Paolo Bonzini <bonzini@gnu.org>
7877 and Joel E. Denny <jdenny@ces.clemson.edu>
7878
7879 Clean up %define and %code implementation in M4 some. Most
7880 importantly, rename all related macros to be in the b4_percent_define
7881 and b4_percent_code namespaces. Also, complete support for `.' in
7882 %define variable names and %code qualifiers.
7883 * data/bison.m4 (b4_check_user_names): Check for special
7884 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7885 m4_foreach loops.
7886 (b4_get_percent_define, b4_get_percent_code): Rename to...
7887 (b4_percent_define_get, b4_percent_code_get): ... these.
7888 Extend documentation with examples.
7889 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7890 b4_percent_define_skeleton_variables and
7891 b4_percent_code_skeleton_qualifiers.
7892 Expect any value for the %define variable `foo' to be stored in the
7893 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7894 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7895 expect any unqualified %code blocks to be stored in a macro named
7896 `b4_percent_code_unqualified'.
7897 Use m4_indir so that %define variable names and %code qualifiers can
7898 contain `.', which is allowed by the grammar parser.
7899 (b4_percent_define_default): New macro to set a default value for a
7900 %define variable.
7901 (m4_wrap): Update wrapped code, and fix some underquoting.
7902 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7903 Expect grammar uses of %define variables and %code qualifiers to be
7904 defined in b4_percent_define_user_variables and
7905 b4_percent_code_user_qualifiers.
7906 * data/c++.m4: Use b4_percent_define_default rather than
7907 m4_define_default. Fix some underquoting. Skeleton usage of %define
7908 variable define_location_comparison now implies skeleton usage of
7909 %define variable filename_type.
7910 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7911 data/push.c, data/yacc.c: Update macro names.
7912 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7913 muscle names.
7914
e37c665c
JMG
79152007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7916
7917 DJGPP specific issues.
7918
7919 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7920 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7921
7d2d521f
JD
79222007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7923
7924 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7925 run parsers in all tests so that Valgrind is invoked during
7926 maintainer-check-valgrind.
7927 (Duplicate representation of merged trees): Free all semantic values.
7928 (Duplicated user destructor for lookahead): Likewise.
7929
e0ac9b4b
JD
79302007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7931
7932 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7933 command-line prefix.
7934 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7935 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7936 miss Valgrind messages.
7937 (Exploding the Stack Size with Malloc): Likewise.
7938
78143faa
JD
79392007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7940
7941 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7942 locals. Reported by Juan Manuel Guerrero at
7943 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7944 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7945 Fix some indentation also.
7946 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7947 explaining this issue.
7948
7ecec4dd
JD
79492007-01-09 Paolo Bonzini <bonzini@gnu.org>
7950 and Joel E. Denny <jdenny@ces.clemson.edu>
7951
7952 Simplify union and prologue handling, and escape union and lex/parse
7953 params with digraphs.
7954 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7955 values to the empty string since these are no longer guaranteed
7956 initialized by the front-end.
7957 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7958 braces around b4_user_stype since this is no longer done by the
7959 front-end.
7960 * src/files.c, src/files.h (pre_prologue_obstack,
7961 post_prologue_obstack): Remove.
7962 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7963 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7964 with digraphs. This fixes lex params and parse params.
7965 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7966 * src/output.c (prepare): Remove muscle insertion of the prologues.
7967 (output): Remove freeing of pre_prologue_obstack and
7968 post_prologue_obstack.
7969 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7970 than prologue_augment for prologue parsing so you don't need prologue
7971 obstacks.
5c80250c
JD
7972 (grammar_declaration): For %union RHS, use `braceless' instead of
7973 "{...}" so that braces are already stripped and code is escaped with
7974 digraphs.
7ecec4dd
JD
7975 * src/reader.c (prologue_augment): Remove.
7976 (reader): Remove initialization of pre_prologue_obstack and
7977 post_prologue_obstack.
7978 * src/reader.h (prologue_augment): Remove.
7979
7980 * data/c.m4: Remove stray parenthesis.
7981
16dc6a9e
JD
79822007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7983
7984 Remove quotes from variables names in %define directives and from
7985 qualifiers in %code directives, and restrict the characters that are
7986 allowed in them to M4-friendly ones. For %define, continue to support
7987 the quoted form as a deprecated feature. Discussed starting at
7988 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7989 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7990 %code.
7991 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
7992 (Decl Summary): In %defines entry, update mention of `%code requires'
7993 and `%code provides'.
16dc6a9e
JD
7994 (C++ Location Values): Update %define uses.
7995 (Calc++ Parser Interface): Likewise.
7996 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 7997 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
7998 * src/parse-gram.y (prologue_declaration): For %define variables, use
7999 `variable' instead of `STRING'.
8000 (grammar_declaration): For %code qualifiers, use `ID' instead of
8001 `STRING'.
8002 (variable): New nonterminal that takes an `ID' or a `STRING'.
8003 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
8004 and %define uses.
8005 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
8006 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
8007 (%define errors): Update %define uses.
8008
e9813cd4
JD
80092007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8010
8011 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
8012 instead of muscle_insert for %define values so that M4-special
8013 characters are replaced with digraphs.
8014 * tests/input.at (%define errors): Extend to check weird values.
8015
6afc30cc
JD
80162007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8017
8018 Instead of having skeletons declare all valid %define variables and
8019 %code qualifiers, provide macros that retrieve the associated values
8020 and build these lists automatically. Thus Bison will now warn when a
8021 variable or qualifier is not used by the skeleton in the current
8022 invocation regardless of whether it might sometimes be used by that
8023 skeleton in other invocations. Also, move all %define value macros to
8024 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
8025 form, which is replaced by %code.
8026 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
8027 (b4_check_user_names): ... this, and change the series of valid name
8028 arguments to a single list argument for names used in the skeleton
8029 similar to the existing list argument for names used in the grammar.
8030 Warn instead of complaining.
8031 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
8032 values and %code code, to format %code code properly, and to build
8033 lists of all %define variables and %code qualifiers used in the
8034 skeleton: b4_skeleton_percent_define_variables and
8035 b4_skeleton_percent_code_qualifiers.
8036 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
8037 Remove, and...
8038 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
8039 the skeleton names lists can finish building first. In place of
8040 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
8041 expect the lists b4_user_percent_define_variables and
8042 b4_user_percent_code_qualifiers.
8043 * data/c++.m4: Where setting default values for b4_parser_class_name,
8044 b4_location_type, b4_filename_type, b4_namespace, and
8045 b4_define_location_comparison, update their names to the
8046 b4_percent_define_ namespace.
8047 * data/glr.c: Don't use b4_check_percent_define_variables and
8048 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
8049 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
8050 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 8051 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
8052 * data/location.cc: Use b4_get_percent_define.
8053 * data/push.c: Don't use b4_check_percent_define_variables and
8054 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
8055 * data/yacc.c: Likewise, and don't call m4_exit in
8056 b4_use_push_for_pull_if or m4_wrap code will never execute.
8057 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
8058 Rename to...
8059 (muscle_grow_user_name_list): ... this for consistency with the
8060 terminology used in bison.m4.
8061 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
8062 %define variable names, and rename muscle used_percent_define_variables
8063 to user_percent_define_variables.
8064 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
8065 user_percent_code_qualifiers.
8066 (content): Remove.
8067 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
8068 {CODE} form is no longer accepted.
8069 * tests/input.at (Reject bad %code qualifiers): Rename to...
8070 (Reject unused %code qualifiers): ... this, and update test output.
8071 (%define error): Update test output.
8072
7eb8a0bc
JD
80732007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
8074
8075 Check for unrecognized %define variables similar to checking for
8076 unrecognized %code qualifiers. Check for redefined %define variables.
8077 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
8078 generalizes...
8079 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
8080 (b4_check_percent_define_variables): New, also wraps it.
8081 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
8082 variables using b4_check_percent_define_variables.
8083 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
8084 all those exercised in the test suite and all those listed in the
8085 `Default values' section of c++.m4. Are there others?
8086 * data/push.c, data/yacc.c: Declare no valid %define variables.
8087 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
8088 similar to muscle_find, but it works even when the muscle stores a
8089 const value.
8090 (muscle_grow_used_name_list): New function for constructing the used
8091 name list muscles that b4_check_for_unrecognized_names requires.
8092 * src/parse-gram.y (prologue_declaration): Warn if a variable is
8093 %define'd more than once. Define the b4_used_percent_define_variables
8094 muscle with muscle_grow_used_name_list.
8095 (grammar_declaration): Abbreviate %code code with
8096 muscle_grow_used_name_list.
8097 * tests/input.at (%define errors): New.
8098
3fc65ead
JD
80992007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8100
8101 Provide warn_at, complain_at, and fatal_at function callbacks to the
8102 skeletons, and use this for %code qualifier complaints.
8103 * data/bison.m4 (b4_error_at): New, invoked by...
8104 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
8105 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
8106 @fatal_at(...@) directives.
8107 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
8108 qualifiers in b4_used_percent_code_qualifiers and to use
8109 b4_complain_at.
8110 * src/location.c, src/location.h (boundary_set_from_string): New global
8111 function.
8112 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
8113 function.
8114 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
8115 to b4_used_percent_code_qualifiers.
8116 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
8117 function.
8118 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
8119 (lineno): Rename to...
8120 (out_lineno): ... this so I don't misunderstand it again.
8121 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
8122 here; these newlines are in the input but not the output file.
8123 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
8124 (at_directive_perform): ... this new static function, and add handling
8125 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
8126 directives.
8127 * tests/input.at (Reject bad %code qualifiers): Update test output with
8128 locations and extend.
8129
8130 * tests/output.at (Output file name: [, Output file name: ]): Remove
8131 bogus comment about these tests failing.
8132
1c7b7e1d
JD
81332007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8134
8135 Clean up b4_check_percent_code_qualifiers a little.
8136 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
8137 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
8138 documentation and add examples.
8139 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
8140 qualifiers here.
8141
08af01c2
JD
81422007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8143
8144 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
8145 unreliable -- especially when they're hidden inside another macro.
8146 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
8147 data/c.m4: Remove m4_divert(-1).
8148 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
8149 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
8150 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 8151 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
8152 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
8153 pushed and popped by m4sugar, should be first on the stack.
8154
8155 Provide warn, complain, and fatal function callbacks to the skeletons.
8156 This provides more flexibility than m4_fatal, improves the error
8157 message format, and captures messages for translation. Discussed
8158 starting at
8159 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
8160 * data/bison.m4 (b4_error): New, invoked by...
8161 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
8162 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
8163 directives. Because these M4 macros might be called when the current
8164 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
8165 the previous removal of uses of m4_divert, which caused trouble.
8166 (b4_check_percent_code_qualifiers): Use b4_complain instead of
8167 m4_fatal to report unrecognized %code qualifiers.
8168 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
8169 push parser requests.
8170 * data/glr.c: Use b4_complain instead of m4_fatal to report
8171 non-deterministic push parser requests.
8172 Update @output usage to @output(...@) form.
8173 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
8174 report missing %defines. Update @output usage to @output(...@) form.
8175 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
8176 @output(...@) form.
8177 * src/main.c (main): Invoke skel_scanner_free.
8178 * src/scan-skel.h (skel_scanner_free): Prototype new function.
8179 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
8180 obstack_for_string from flex-scanner.h.
8181 (YY_DECL): Use to declare skel_lex static.
8182 (decode_at_digraphs): Remove; now handled in the new
8183 SC_AT_DIRECTIVE_ARG start condition.
8184 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
8185 functions.
8186 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
8187 at_directive_argv): New static globals.
8188 (INITIAL): Use fail_for_invalid_at.
8189 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
8190 recognize the start of a generalized `@directive(...@)' form and
8191 start...
8192 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
8193 directive args (using the new obstack_for_string), to decode the
8194 contained @ diagraphs, and to perform the directive. It recognizes
8195 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
8196 @output(...@).
8197 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
8198 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
8199 `@,'.
8200 (scan_skel): Initialize obstack_for_string on the first call.
8201 (skel_scanner_free): New function to free obstack_for_string.
8202 * tests/input.at (Reject bad %code qualifiers): Update test output.
8203
8e0a5e9e
JD
82042007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
8205
8206 Consolidate the 4 prologue alternative directives (%code, %requires,
8207 %provides, and %code-top) into a single %code directive with an
8208 optional qualifier field. Discussed at
8209 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
8210 * NEWS (2.3a+): Rewrite the existing entry for the prologue
8211 alternatives.
8212 * doc/bison.texinfo (Prologue Alternatives): Update.
8213 (Decl Summary): Update to %code "requires" and %code "provides".
8214 (Calc++ Parser): Update to %code "requires".
148d66d8 8215 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
8216 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
8217 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
8218 are replaced by b4_percent_code_provides and b4_percent_code_requires,
8219 which are skeleton-specific.
8220 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
8221 declare what %code qualifiers it supports and to complain if any other
8222 qualifiers were used in the grammar.
8223 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
8224 and b4_user_code([b4_percent_code_provides]) in place of
8225 b4_user_requires and b4_user_provides.
8226 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
8227 Add b4_user_code([b4_percent_code_top]) and
8228 b4_user_code([b4_percent_code]).
8229 Invoke b4_check_percent_code_qualifiers.
8230 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8231 PERCENT_REQUIRES): Remove.
8232 (grammar_declaration): Remove RHS's for %code-top, %provides, and
8233 %requires. Rewrite the %code RHS as the unqualified form defining the
8234 muscle b4_percent_code. Add another RHS for the qualified %code form,
8235 which defines muscles of the form b4_percent_code_QUALIFIER and the
8236 b4_used_percent_code_qualifiers muscle.
8237 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8238 PERCENT_REQUIRES): Remove.
8239 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
8240 %code "requires" and %code "provides".
8241 * tests/input.at (Reject bad %code qualifiers): New.
8242
95021767
JD
82432007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8244
8245 Use the new code_props interface for destructors and printers.
8246 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
8247 printer_location members, and change the type of the destructor and
8248 printer members to code_props.
8249 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
8250 symbol_printer_get, semantic_type_destructor_set,
8251 semantic_type_printer_set, default_tagged_destructor_set,
8252 default_tagless_destructor_set, default_tagged_printer_set,
8253 default_tagless_printer_set): Use code_props in arguments and return
8254 types in place of char const * and location.
8255 (symbol_destructor_location_get, symbol_printer_location_get): Remove
8256 since the locations are now contained in the return of
8257 symbol_destructor_get and symbol_printer_get.
8258 * src/output.c (symbol_destructors_output, symbol_printers_output):
8259 Replace with...
8260 (symbol_code_props_output): ... this to eliminate duplicate code.
8261 (output_skeleton): Update to use symbol_code_props_output.
8262 * src/reader.c (symbol_should_be_used): Update use of
8263 symbol_destructor_get.
8264 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8265 Update uses of the various _destructor_set and _printer_set functions.
8266 * src/symtab.c: (default_tagged_destructor_location,
8267 default_tagless_destructor_location, default_tagged_printer_location,
8268 default_tagless_printer_location): Remove since we...
8269 (default_tagged_destructor, default_tagless_destructor,
8270 default_tagged_printer, default_tagless_printer): ... change the type
8271 of these to code_props.
8272 (symbol_new, semantic_type_new, symbol_destructor_set,
8273 semantic_type_destructor_set, symbol_destructor_get,
8274 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
8275 symbol_check_alias_consistency, default_tagged_destructor_set,
8276 default_tagless_destructor_set, default_tagged_printer_set,
8277 default_tagless_printer_set): Update.
8278 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
8279 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
8280 code_props members.
8281 (symbol_print): Use SYMBOL_CODE_PRINT.
8282
f6857bbf
JD
82832007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8284
8285 Use the new code_props interface for rule actions.
8286 * src/symlist.h (symbol_list): Replace action, action_location, and
8287 used members with a code_props action_props member.
8288 * src/reader.c (symbol_should_be_used, grammar_rule_check,
8289 grammar_midrule_action, grammar_current_rule_merge_set,
8290 grammar_current_rule_symbol_append, packgram): Update.
8291 * src/scan-code.h (translate_rule_action): Remove, no longer used.
8292 * src/scan-code.l (handle_action_dollar): Update.
8293 (translate_rule_action): Remove, no longer used.
8294 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
8295
7c0c6181
JD
82962007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8297
8298 Use the new code_props interface in parse-gram.y.
8299 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
8300 Update all uses of translate_* functions to use the new code_props
8301 interface and to use gram_scanner_last_string_free and
8302 code_scanner_last_string_free where possible.
8303 (grammar_declaration): symbol_list_destructor_set and
8304 symbol_list_printer_set now perform the translation, so don't do it
8305 here. Use gram_scanner_last_string_free where possible.
8306 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
8307 translate_code): Remove, no longer used.
8308 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
8309 symbol_list_printer_set): Perform code translation here rather than
8310 depending on the caller to do so.
8311
8312 * src/symlist.h (struct symbol_list): Correct some documentation typos.
8313 * src/scan-gram.h (gram_last_string): Remove declaration.
8314 * src/scan-gram.l (last_string): Declare it static.
8315
28e52c0d
JD
83162007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8317
8318 Encapsulate code properties and related functionality for the various
8319 destructors, printers, and actions into a code_props structure and
8320 interface. This patch merely implements code_props in scan-code.h and
8321 scan-code.l. Future patches will rewrite other modules to use it.
8322 Discussed starting at
8323 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
8324 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
8325 consistently initialize const structs that have an empty location
8326 field.
8327 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
8328 to ensure consistency.
8329 * src/scan-code.h (code_props): New structure.
8330 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
8331 function, macro, and const global variable for initializing a
8332 code_props with no code.
8333 (code_props_plain_init, code_props_symbol_action_init,
8334 code_props_rule_action_init, code_props_translate_code): The rest of
8335 the new code_props functional interface. Among other things, the init
8336 functions set the code_props kind field so that
8337 code_props_translate_code will know whether to behave like
8338 translate_symbol_action, translate_rule_action, or translate_code.
8339 These old translate functions must remain until all other modules are
8340 updated to use the new code_props interface.
8341 (code_scanner_last_string_free): New function similar to
8342 gram_scanner_last_string_free.
8343 (code_scanner_free): Add documentation.
8344 * src/scan-code.l: Implement the new interface.
8345 (code_lex): Make it static, add a code_props* argument, and remove the
8346 rule argument.
8347 (last_string): New static global similar to the one in scan-gram.l.
8348 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
8349 instead of rule.
8350 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
8351 code_props since Bison may one day use this information for destructors
8352 and printers.
8353 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
8354 (handle_action_dollar): Use symbol_list_n_get and set used flag
8355 directly since symbol_list_n_used_set is removed.
8356 (translate_action): Add a code_props* argument and remove the rule,
8357 action, and location arguments. Pass the code_props* on to code_lex.
8358 (translate_rule_action, translate_symbol_action, translate_code):
8359 Rewrite as wrappers around the new code_props interface.
8360 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
8361 it would eventually need to break the encapsulation of code_props.
8362
96034983
JD
83632007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8364
8365 * etc/.cvsignore: New.
8366
945e396c
JD
83672007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8368
8369 Add maintainer-push-check to run maintainer-check using push parsing in
8370 place of pull parsing where available.
8371 * Makefile.am (maintainer-push-check): New.
8372 * data/bison.m4 (b4_use_push_for_pull_if): New.
8373 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
8374 appropriately based on their existing values.
8375 (yypush_parse): Don't print push-parser-specific diagnostics if push
8376 parsing is being used in place of pull parsing.
8377 * data/yacc.c: If push parsing should replace pull parsing, redirect to
8378 push.c.
8379 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
8380 variable, and insert b4_use_push_for_pull_flag into muscles.
8381 * tests/Makefile.am (maintainer-push-check): New.
8382
7d596384
JD
83832006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8384
8385 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
8386 (whether successful or failed) so that yypush_parse can be invoked
8387 again to start a new parse using the same yypstate.
8388 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
8389 check multiple yypull_parse invocations on the same yypstate. For pull
8390 mode, extend to check multiple yyparse invocations.
8391 (Exploding the Stack Size with Alloca): Extend to try with
8392 %push-pull-parser.
8393 (Exploding the Stack Size with Malloc): Likewise.
8394
8395 * tests/calc.at (Simple LALR Calculator): Don't specify
8396 %skeleton "push.c" since %push-pull-parser implies that now.
8397 * tests/headers.at (export YYLTYPE): Don't check for the push
8398 declarations. Otherwise, this test case can't be used to see if push
8399 mode can truly emulate pull mode.
8400 * tests/input.at (Torturing the Scanner): Likewise.
8401 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
8402 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
8403 AT_YACC_IF, which now includes the case of push mode since %skeleton
8404 need not be used for push mode. This will be more intuitive once
8405 push.c is renamed to yacc.c.
8406
7172e23e
JD
84072006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8408
8409 For push mode, convert yyparse from a macro to a function, invoke yylex
8410 instead of passing a yylexp argument to yypull_parse, and don't
8411 generate yypull_parse or yyparse unless %push-pull-parser is declared.
8412 Discussed starting at
8413 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
8414 * data/bison.m4 (b4_pull_if): New.
8415 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
8416 * data/push.c: Improve M4 quoting a little.
8417 (b4_generate_macro_args, b4_parenthesize): Remove.
8418 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
8419 any time a pull parser is requested.
8420 Don't #define this as a wrapper around yypull_parse. Instead, when
8421 both push and pull are requested, make it a function that does that
8422 same thing.
8423 (yypull_parse): If there's a b4_prefix, #define this to
8424 b4_prefix[pull_parse] when both push and pull are requested.
8425 Don't define this as a function unless both push and pull are
8426 requested.
8427 Remove the yylexp argument and hard-code yylex invocation instead.
8428 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
8429 %push-parser.
8430 * src/getargs.c (pull_parser): New global initialized to true.
8431 * getargs.h (pull_parser): extern it.
8432 * src/output.c (prepare): Insert pull_flag muscle.
8433 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
8434 (prologue_declaration): Set both push_parser and pull_parser = true for
8435 %push-pull-parser. Set push_parser = true and pull_parser = false for
8436 %push-parser.
8437 * src/scan-gram.l: Don't accept %push_parser as an alternative to
8438 %push-parser since there's no backward-compatibility concern here.
8439 Scan %push-pull-parser.
8440 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
8441 instead of %push-parser.
8442 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
8443 prototype it in the module that calls yyparse.
8444 * tests/input.at (Torturing the Scanner): Likewise.
8445 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
8446
2e7944cb
JD
84472006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
8448
8449 Update etc/bench.pl. Optimize push mode a little (the yyn change
8450 deserves most of the credit).
8451 * Makefile.am (SUBDIRS): Add etc subdirectory.
8452 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
8453 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
8454 yytoken, yyval, and yyloc declarations to...
8455 (yyparse or yypush_parse): ... here to improve performance. For
8456 yypush_parse invocations after the first, be sure to assign yyn its old
8457 value again.
8458 (yypstate_new): Don't bother initializing the yyresult field since the
8459 initial value isn't used.
8460 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
8461 remove the #define that, in push mode, set it to yyps->NAME.
8462 * etc/Makefile.am: New.
8463 * etc/bench.pl: Remove and build it instead from...
8464 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
8465 "tests/bison" from the build directory by default rather than just
8466 invoking "bison" from $PATH.
8467 (calc_grammar): Update push parser code: don't declare yylval globally,
8468 don't define yyparse_wrapper, and don't #define yyparse.
8469 (bench_grammar): Update to check all working combinations of yacc.c,
8470 push.c, impure, pure, pull, and push.
8471
c3d50342
JD
84722006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8473
8474 For push mode, add pull wrappers around yypush_parse.
8475 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
8476 (yypull_parse): New function wrapping yypush_parse.
8477 (yyparse): New #define wrapping yypull_parse.
8478 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
8479 is declared.
8480 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
8481 prototype yylex in the module that calls yyparse, and don't prototype
8482 yyparse there. Otherwise, the yyparse expansion won't compile.
8483 * tests/input.at (Torturing the Scanner): Likewise.
8484
94ebeba5
JD
84852006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8486
8487 Enable push parsers to operate in impure mode. Thus, %push-parser no
8488 longer implies %pure-parser. The point of this change is to move
8489 towards being able to test the push parser code by running the entire
8490 test suite as if %push-parser had been declared.
8491 * data/push.c (yypush_parse): For impure mode, remove the
8492 yypushed_char, yypushed_val, and yypushed_loc arguments.
8493 Instead, declare these as local variables initialized to the global
8494 yychar, yylval, and yylloc.
8495 For the first yypush_parse invocation only, restore the initial values
8496 of these global variables when it's time to read a token since they
8497 have been overwritten.
8498 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
8499 %push-parser.
8500 * tests/calc.at (Simple LALR(1) Calculator): Always declare
8501 %pure-parser along with %push-parser since this test case was designed
8502 for pure push parsers.
8503 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
8504 (AT_YACC_OR_PUSH_IF): New.
8505 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
8506 add a note that it's still wrong for some cases (as it has been for a
8507 while).
8508 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
8509 %push-parser no longer implies %pure-parser.
8510
a0633178
JD
85112006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8512
8513 Remove some unnecessary differences between the pull parser code and
8514 the push parser code. This patch enables yynerrs in push mode.
8515 * data/push.c: Reformat M4 a little.
8516 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
8517 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
8518 because push mode is on. Instead, if pure mode is on, move yynerrs
8519 to...
8520 (b4_declare_parser_state_variables): ... here.
8521 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
8522 to yyps->NAME so it can be used in yypush_parse.
8523 (yypush_parse): Don't omit uses of yynerrs in push mode.
8524
8646b6a3
JD
85252006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8526
8527 Fix bug such that the first pushed token's value and location are
8528 sometimes overwritten (sometimes by %initial-action) before being used.
8529 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
8530 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
8531 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
8532 more closely mimic the pull parser logic.
8533 Don't copy the pushed token to yychar, yylval, and yylloc until it's
8534 time to read a token, which is after any initialization of yylval and
8535 yylloc.
8536 (gottoken): Rename label to...
8537 (yyread_pushed_token): ... for clarity and to avoid infringing on the
8538 user namespace.
8539
9baf4d74
JD
85402006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8541
8542 Rearrange initialization of the parser state variables so that the
8543 skeleton doesn't have to have a copy for pull mode and another for push
8544 mode. This patch also fixes at least a bug such that yylloc was not
8545 initialized (with b4_location_initial_line and
8546 b4_location_initial_column) upon calling yypush_parse. However, that
8547 initialization now overwrites the first token's location;
8548 %initial-action assigning @$ already did the same thing, and both bugs
8549 will be fixed in a later patch.
8550 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
8551 (b4_declare_parser_state_variables): Remove initialization of yytoken,
8552 yyss, yyvs, yyls, and yystacksize.
8553 (yypstate_new): Remove initialization of some yypstate fields: yystate,
8554 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
8555 yylsp.
8556 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
8557 yyps->NAME so it can be used in yypush_parse.
8558 (yyparse or yypush_parse): For yypush_parse, don't print the
8559 "Starting parse" diagnostic for invocations after the first.
8560 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
8561 yypush_parse, only do it for the first invocation.
8562 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
8563 initialization to occur in yypush_parse but only on the first
8564 invocation.
8565
23522164
JD
85662006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8567
8568 * data/push.c: Add CPP guards around push parser declarations in both
8569 the header and the code file.
8570 In the code file, move the push parser declarations to the same place
8571 they appear in the header file.
8572 Clean up the M4 some, especially the inconsistent underquoting in
8573 some b4_c_function_def and b4_c_function_decl uses.
8574
bb010fe5
JD
85752006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8576
8577 Encapsulate the push parser state variables into an M4 macro so the
8578 push skeleton doesn't have to list them again for pull mode's yyparse.
8579 For push mode, remove yypush_parse's local equivalents of these
8580 variables to eliminate unnecessary copying between the two sets at
8581 run-time. This patch also fixes at least a bug related to multiple
8582 %initial-action invocations in push mode.
8583 * data/push.c (b4_declare_parser_variables): Rename to...
8584 (b4_declare_scanner_communication_variables): ... this for clarity and
8585 update both uses.
8586 (b4_declare_yyparse_variables): Remove and move its contents to the one
8587 spot where it was invoked.
8588 (b4_declare_parser_state_variables): New macro containing the parser
8589 state variables required by push mode.
8590 (struct yypstate): Replace all fields but yynew with
8591 b4_declare_parser_state_variables.
8592 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
8593 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
8594 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
8595 (yyparse or yypush_parse): For yyparse in pull mode, replace local
8596 parser state variable declarations with
8597 b4_declare_parser_state_variables.
8598 Don't initialize parser state variables when calling yypush_parse since
8599 yypstate_new already does that.
8600 Invoke the user's initial action only upon the first yypush_parse
8601 invocation.
8602 Remove all code that copies between the local parser state variables
8603 and the yypstate.
8604
2d212f8c
JD
86052006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8606
8607 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8608 prevent a name collision in a future patch where these names will
8609 sometimes be #define'd.
8610 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8611 since it no longer has the same name as the existing argument.
8612 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8613
e6e704dc
JD
86142006-12-19 Paolo Bonzini <bonzini@gnu.org>
8615 and Joel E. Denny <jdenny@ces.clemson.edu>
8616
8617 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8618 that the argument is case-insensitive, and there's no `=' here.
8619 For the %skeleton entry, mention that %language is better.
8620 (Bison Options): Likewise for --language and --skeleton. Move the
8621 --skeleton entry so that the `Tuning the parser' section is sorted
8622 alphabetically on long options.
8623 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8624 %language directive in detail here; cross-reference the %language
8625 documentation instead.
8626 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8627 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 8628 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
8629 * examples/extexi (normalize): Instead of replacing every %require
8630 argument with the current Bison version, just substitute for
8631 `@value{VERSION}'. This guarantees that we're testing what actually
8632 appears in the documentation.
8633 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8634 rather than `@VERSION@'.
8635
0e021770
PE
86362006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8637
fd575f05
PE
8638 * NEWS: Reword the %language news a bit, and put it earlier.
8639
0e021770
PE
8640 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8641 Rewrite to simplify the logic.
8642 (language_argmatch): Likewise.
fd575f05
PE
8643 (program_name): We now own this var.
8644 * src/getargs.h (struct bison_language): Use char[] rather than
8645 const char *.
0e021770
PE
8646
8647 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8648 Java is supported.
8649 * src/complain.c (program_name): Remove decl; no longer needed.
8650 * src/main.c (program_name): Remove; now belongs to getargs.
8651
86522006-12-18 Paolo Bonzini <bonzini@gnu.org>
8653
8654 * NEWS: Document %language.
8655
8656 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8657
8658 * data/c-skel.m4, data/c++-skel.m4: New files.
8659 * data/glr.c: Complain on push parsers.
8660
8661 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8662 over %skeleton.
148d66d8 8663 (Decl Summary): Document %language and %skeleton.
0e021770
PE
8664 (Command line): Document -L.
8665
8666 * examples/extexi: Rewrite %require directive.
8667 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8668
8669 * src/files.c (compute_exts_from_gc): Look in language structure
8670 for .y extension.
8671 (compute_file_name_parts): Check whether .tab should be added.
8672 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8673 (language, skeleton_arg, language_argmatch): New.
8674 (long_options): Add --language.
8675 (getargs): Use skeleton_arg, add -L/--language.
8676 * src/getargs.h: Include location.h.
8677 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8678 * src/output.c (prepare): Pick default skeleton from struct language.
8679 Don't dispatch C skeletons here.
8680 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8681 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8682 * src/scan-gram.l ("%language"): New rule.
8683
8684 * tests/calc.at: Test %skeleton and %language.
8685 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8686 (AT_GLR_IF): Look for %skeleton "glr.cc".
8687 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8688 (AT_YACC_IF): Reject %language.
8689
5691bf57
PE
86902006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8691
db06f0ce
PE
8692 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8693 since it wasn't used; only the typedef name 'semantic_type' is needed.
8694 Also, omit trailing white space.
8695
5691bf57
PE
8696 * bootstrap: Sync from coreutils.
8697 (gnulib_extra_files): Add build-aux/announce.gen.
8698 (slurp): Adjust .gitignore files like .cvsignore files.
8699 * build-aux/announce-gen: Remove from CVS, since bootstrap
8700 now creates this.
8701
791934e4
JD
87022006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8703
8704 Make %push-parser imply %pure-parser. This fixes several bugs; see
8705 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8706 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8707 pure_parser = true.
8708 * data/push.c: Don't bother testing b4_push_if when deciding whether
8709 to expand b4_declare_parser_variables globally.
8710 (yypush_parse): Likewise in here.
8711
8712 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8713 (yy_reduce_print): Reformat M4 for readability.
8714
ee5abb37
JD
87152006-12-15 Bob Rossi <bob@brasko.net>
8716 and Joel Denny <jdenny@ces.clemson.edu>
8717
8718 * data/push.c (yypstate): Add typedef, and update all uses of
8719 struct yypstate to just yypstate.
8720 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8721
16ca01f9
JD
87222006-12-14 Bob Rossi <bob@brasko.net>
8723
8724 * data/push.c (yypush_parse): Declare prototype regardless of
8725 %locations option.
8726
ab8e7e1a
JD
87272006-12-14 Bob Rossi <bob@brasko.net>
8728
8729 * data/push.c (yyparse): Remove the prototype and the #define when in
8730 push-parser mode.
8731
9bf32be3
JD
87322006-12-13 Bob Rossi <bob@brasko.net>
8733
8734 * data/push.c (yypstate_init): Rename to...
8735 (yypstate_new): ... this and use b4_c_function_def.
8736 (yypstate_delete): New.
8737 (yypush_parse): Change parameters yynval and yynlloc to be const.
8738 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8739 yypstate_delete functions.
8740
f02e2948
JD
87412006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8742
8743 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8744 strange test case titles. Reported by Bob Rossi.
8745
38eb7751
PE
87462006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8747
8748 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8749 of potential ambiguities in GLR grammers.
8750
bd9d212b
JD
87512006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8752
8753 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8754 `bison ', use m4_index instead of m4_substr since chopping up a string
8755 containing M4-special characters causes problems here.
8756
8757 Fix a couple of bugs related to special characters in user-specified
8758 file names, and make it easier for skeletons to compute output file
8759 names with the same file name prefix as Bison-computed output file
8760 names.
8761 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8762 b4_parser_file_name and b4_spec_defines_file instead of
8763 @output_parser_name@ and @output_header_name@, which are now redundant.
8764 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8765 b4_parser_file_name, b4_spec_defines_file, and the new
8766 @basename(FILENAME@) instead of @output_parser_name@ and
8767 @output_header_name@, which inappropriately escaped the file names as
8768 C string literals.
8769 * src/files.c (all_but_ext): Remove static qualifier.
8770 (compute_output_file_names): Move `free (all_but_ext)' to...
8771 (output_file_names_free): ... here since all_but_ext is needed later.
8772 * src/files.h (all_but_ext): Extern.
8773 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8774 exactly what MUSCLE_INSERT_STRING used to do.
8775 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8776 characters are escaped properly.
8777 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8778 all_but_ext.
8779 For pkgdatadir muscle, maintain previous functionality by using
8780 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8781 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8782 digraphs would never be expanded. Hopefully no one has M4-special
8783 characters in his Bison installation path.
8784 * src/scan-skel.l: Don't parse @output_header_name@ and
8785 @output_parser_name@ anymore since they're now redundant.
8786 In @output, use decode_at_digraphs.
8787 Parse a new @basename command that invokes last_component.
8788 (decode_at_digraphs): New.
8789 (BASE_QPUTS): Remove unused.
8790 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8791 (Output file name): New tests.
8792
3f7ca628
JD
87932006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8794
8795 Warn about output files that are generated by the skeletons and that
8796 conflict with other output files.
8797 * data/glr.c: Don't generate the header file here when glr.cc does.
8798 * src/files.c (file_names, file_names_count): New static globals.
8799 (compute_output_file_names): Invoke output_file_name_check for files
8800 not generated by the skeletons and remove existing checks.
8801 (output_file_name_check): New function that warns about conflicting
8802 output file names.
8803 (output_file_names_free): Free file_names.
8804 * src/files.h (output_file_name_check): Declare.
8805 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8806 the skeletons.
8807 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8808 (Conflicting output files): New tests.
8809
178e123e
PE
88102006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8811
8812 * doc/bison.texinfo: Fix a couple of typos.
8813
88142006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
8815
8816 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8817 Rename to...
8818 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8819 update all uses.
8820 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8821 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8822 local pv.
8823 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8824 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8825
ea17f233
JD
88262006-12-07 Bob Rossi <bob@brasko.net>
8827 and Joel Denny <jdenny@ces.clemson.edu>
8828
8829 * data/push.c (yypvarsinit): Change return type from void* to struct
8830 yypvars*. No longer cast to void* on return.
8831 (struct yypvars): Remove yylen since it need not be remembered between
8832 yypushparse invocations.
8833 (yypushparse): Don't copy between yylen and pv->yylen.
8834
55a30bda
JD
88352006-12-05 Bob Rossi <bob@brasko.net>
8836
8837 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8838 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8839 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8840 (struct yypvars): Remove b4_declare_parser_variables.
8841 (yypvarsinit): Remove init code for removed variables.
8842 (global scope): Do not declare b4_declare_parser_variables if
8843 push or pure mode.
8844 (yypushparse): Add b4_declare_parser_variables.
8845 Init new local variables, and remove init code for removed
8846 yypvars variables.
8847 (yyparse): Delete.
8848 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8849 and yyparse for other modes.
8850 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8851 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8852 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8853 (AT_PURE_LEX_IF): True if pure or push parser.
8854
85894313
JD
88552006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8856
8857 Document Yacc prologue alternatives and default %destructor's and
8858 %printer's as experimental. Don't mention Java yet. Discussed at
8859 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8860 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8861 (2.3a): Annotate this entry to say the old forms of these features were
8862 also experimental.
8863 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 8864 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
8865 of Java (we'll want this back eventually).
8866
02975b9a
JD
88672006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8868
8869 Support a file name argument to %defines. Deprecate `=' in
8870 %file-prefix, %name-prefix, and %output. Discussed at
8871 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8872 * NEWS (2.3a+): Mention.
148d66d8 8873 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
8874 form of %defines, and remove `=' from entries for %file-prefix,
8875 %name-prefix, and %output.
8876 * src/parse-gram.y (prologue_declaration): Implement.
8877 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8878 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8879 all but one occurrence of %name-prefix.
8880 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8881 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8882 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8883 occurrence of each of %file-prefix and %output. Add check for %defines
8884 with argument.
8885 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8886 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8887 Remove the `=' from %output.
8888
287b314e
JD
88892006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8890
8891 Don't escape $ in test case titles since Autoconf 2.61 now does that
8892 correctly.
8893 * tests/actions.at (Default %printer and %destructor are not for error
8894 or $undefined): Here.
8895 (Default %printer and %destructor are not for $accept): Here.
8896 * tests/input.at (Invalid $n and @n): Here.
8897
3ebecc24
JD
88982006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8899
8900 Rename <!> to <>. Discussed starting at
8901 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8902 * NEWS (2.3a+): Update.
148d66d8 8903 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
8904 Update.
8905 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8906 * src/scan-gram.l (INITIAL): Implement.
8907 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8908 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8909 comment.
8910 * tests/actions.at (Default tagless %printer and %destructor,
8911 Default tagged and per-type %printer and %destructor,
8912 Default %printer and %destructor are not for error or $undefined,
8913 Default %printer and %destructor are not for $accept,
8914 Default %printer and %destructor for mid-rule values): Update.
8915 * tests/input.at (Default %printer and %destructor redeclared,
8916 Unused values with default %destructor): Update.
8917
26b8a438
JD
89182006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8919
8920 Don't let %prec take a nonterminal.
8921 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8922 token.
8923 * tests/input.at (%prec takes a token): New test checking that %prec
8924 won't take a nonterminal.
8925
07c39ae9
JD
89262006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8927
405d53b7
JD
8928 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8929 it was double-quoted.
07c39ae9
JD
8930 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8931 grammar is maintained with Bison's highest standards.
8932 * src/getargs.c: Fix some typos in Doxygen comments.
8933
580b8926
JD
89342006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8935
8936 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8937 later. Reported by Paul Eggert in
8938 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8939 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8940 * src/scan-code.l (translate_action): Don't bother invoking
8941 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8942 (code_scanner_free): Instead of invoking
8943 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8944 which frees more.
8945 * src/scan-gram.l (gram_scanner_free): Likewise.
8946 * src/scan-skel.l (scan_skel): Likewise.
8947
4502eadc
JD
89482006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8949
8950 * src/files.c (tr): Change return type to void.
8951 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8952 has been called previously for the same key.
8953 (muscle_find): Return storage instead of value so that
8954 --enable-gcc-warnings doesn't produce warnings that the return discards
8955 const. aver that the value and storage are the same since storage
8956 could potentially be NULL when value is not.
8957 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8958 same as 0.
8959
7746c8f6
PE
89602006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8961
8962 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8963 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8964 us a slightly cleaner distribution, and also works.
8965 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8966 gnulib changes.
8967
eb095650
PE
89682006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8969 and Paul Eggert <eggert@cs.ucla.edu>
8970
8971 Don't let Bison leak memory except when it complains.
8972 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8973 (spec_defines_file, dir_prefix): Now char *, not const char *,
8974 since they are freed.
8975 * src/files.c: Likewise.
8976 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8977 Likewise.
8978 (tr): Now operates in-place. All uses changed.
8979 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8980 values.
8981 (compute_file_name_parts, compute_output_file_names): Don't store
8982 read-only data in variables that will be freed.
8983 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8984 src_extension, and header_extension.
8985 (output_file_names_free): New public function to free
8986 spec_verbose_file, spec_graph_file, spec_defines_file,
8987 parser_file_name, and dir_prefix.
8988 * src/getargs.c (getargs): Don't store read-only data in variables that
8989 will be freed.
8990 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8991 (which previously existed but was unused), and quotearg_free.
8992 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8993 * src/muscle_tab.c: Likewise.
8994 (muscle_entry): Make the value char const *,
8995 and add a new storage member that is char * and can be freed.
8996 (muscle_entry_free): New private function.
8997 (muscle_init): Use it instead of free.
8998 (muscle_insert, muscle_grow): Update and use new storage member.
8999 (muscle_code_grow): Free the string passed to muscle_grow
9000 since it's not needed anymore.
9001 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
9002 add a new `char *code' member.
9003 ("{...}"): Declare semantic type as code.
9004 * src/scan-code.h (translate_rule_action):
9005 (translate_symbol_action, translate_code, translate_action): Return
9006 `char const *' rather than `char *' since external code should not free
9007 these strings.
9008 * src/scan-code.l: Likewise.
9009 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
9010 which is "{...}" in the parser.
9011 * tests/Makefile.am (maintainer-check-valgrind): Set
9012 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
9013 Valgrind.
9014 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
9015 complain.
9016 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
9017 expecting a non-zero exit status sets --leak-check=summary and
9018 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
9019 this case, and we don't want to hear about it.
9020
ac564be4
PE
90212006-11-08 Paul Eggert <eggert@cs.ucla.edu>
9022
9023 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
9024 instead of from the template, to simplify configuration a bit.
9025 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
9026 and m4/wint_t.m4, as they are needed with the latest gnulib.
9027
17bd8a73
JD
90282006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
9029
9030 Disable unset/unused mid-rule value warnings by default, and recognize
9031 --warnings=midrule-values to enable them. Discussed starting at
9032 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
9033 * NEWS (2.3a+): Mention.
9034 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
9035 warnings): Add entry for midrule-values subargument.
9036 * src/reader.c (symbol_should_be_used): Don't return true just because
9037 the value is a set/used mid-rule value unless
9038 --warnings=midrule-values was specified.
9039 * tests/input.at (Unused values, Unused values before symbol
9040 declarations): Run tests with and without --warnings=midrule-values.
9041
9042 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
9043 than LIST_FREE directly.
9044
89eb3c76
JD
90452006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
9046
9047 Finish implementing --warnings=error, which should not be implied by
9048 --warnings=all (or by its synonyms -W and --warnings without
9049 subarguments).
9050 * src/complain.c (set_warning_issued): New function to report that
9051 warnings are being treated as errors and to record an error if so.
9052 Invoke...
9053 (warn_at, warn): ... here.
9054 * src/getargs.c (warnings_args, warnings_types): Reorder so that
9055 "error - warnings are errors" does not appear above "all - all of the
9056 above".
9057 (getargs): For -W and --warnings without subarguments, don't let
9058 FLAGS_ARGMATCH set warnings_error in warnings_flag.
9059 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
9060
ba7560e2
JD
90612006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
9062
9063 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
9064 empty subargument list. For example: `bison --warnings= parser.y'.
9065
31283fc3
JD
90662006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
9067
9068 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
9069 the parser header file so that gcc doesn't warn.
9070
12e35840
JD
90712006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
9072
9073 Split the default %destructor/%printer into two kinds: <*> and <!>.
9074 Discussed starting at
9075 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
9076 * NEWS (2.3a+): Mention.
9077 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
9078 previous change today related to mid-rules.
148d66d8 9079 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 9080 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
9081 (TYPE_TAG_ANY): Add as <*>.
9082 (TYPE_TAG_NONE): Add as <!>.
9083 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
9084 for <*> and <!>.
9085 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
9086 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
9087 * src/symlist.c (symbol_list_default_new): Split into tagged and
9088 tagless versions.
9089 (symbol_list_destructor_set, symbol_list_printer_set): Split
9090 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
9091 SYMLIST_DEFAULT_TAGLESS.
9092 * src/symlist.h: Update symbol_list_default*_new prototypes.
9093 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
9094 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
9095 * src/symtab.c (default_destructor, default_destructor_location,
9096 default_printer, default_printer_location): Split each into tagged and
9097 tagless versions.
9098 (symbol_destructor_get, symbol_destructor_location_get,
9099 symbol_printer_get, symbol_printer_location_get): Implement tagged
9100 default and tagless default cases.
9101 (default_destructor_set, default_printer_set): Split each into tagged
9102 and tagless versions.
9103 * src/symtab.h: Update prototypes.
9104 * tests/actions.at (Default %printer and %destructor): Rename to...
9105 (Default tagless %printer and %destructor): ... this, and extend.
9106 (Per-type %printer and %destructor): Rename to...
9107 (Default tagged and per-type %printer and %destructor): ... this, and
9108 extend.
9109 (Default %printer and %destructor for user-defined end token): Extend.
9110 (Default %printer and %destructor are not for error or $undefined):
9111 Update.
9112 (Default %printer and %destructor are not for $accept): Update.
9113 (Default %printer and %destructor for mid-rule values): Extend.
9114 * tests/input.at (Default %printer and %destructor redeclared): Extend.
9115 (Unused values with default %destructor): Extend.
9116
f91b1629
JD
91172006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
9118
9119 Don't apply the default %destructor/%printer to an unreferenced midrule
9120 value. Mentioned at
9121 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
9122 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
9123 like $@n instead of just @n so that the default %destructor/%printer
9124 logic doesn't see them as user-defined symbols.
9125 (symbol_is_dummy): Check for both forms of the name.
9126 * src/reader.c (packgram): Remove the `$' from each midrule symbol
9127 name for which the midrule value is referenced in any action.
9128 * tests/actions.at (Default %printer and %destructor for mid-rule
9129 values): New test.
9130 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
9131 for change to dummy symbol names.
9132
519d0004
JD
91332006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
9134
9135 Warn about unset midrule $$ if the corresponding $n is used.
9136 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
9137 $n usage.
9138 (packgram): Before invoking grammar_rule_check on any rule, make sure
9139 all actions have already been scanned in order to set `used' flags.
9140 Otherwise, checking that a midrule's $$ is set will not always work
9141 properly because the midrule check must forward-reference the midrule's
9142 parent rule.
9143 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
9144 warning.
9145
a501eca9
JD
91462006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
9147
9148 More improvements to the documentation of the prologue alternatives:
9149 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
9150 Bison manual.
9151 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
9152 some text to clarify the relative importance of the new directives and
9153 to show how these directives may be viewed as code labels.
9154
2cbe6b7f
JD
91552006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
9156
9157 Similar to the recently removed %before-header, add %code-top as the
9158 alternative to the pre-prologue. Mentioned at
9159 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
9160 Also, let the prologue alternatives appear in the grammar section.
9161 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
9162 (prologue_declaration): Move the existing prologue alternatives to...
9163 (grammar_declaration): ... here and add %code-top.
9164 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
9165
9166 Clean up and extend documentation for the prologue alternatives.
9167 * NEWS (2.3a+): Describe prologue alternatives.
9168 * doc/bison.texinfo (Prologue): Move discussion of prologue
9169 alternatives to...
9170 (Prologue Alternatives): ... this new section, and extend it to discuss
9171 all 4 directives in detail.
148d66d8
JD
9172 (Table of Symbols): Clean up discussion of prologue alternatives and
9173 add %code-top.
2cbe6b7f 9174
e557d3ea
JMG
91752006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9176
9177 DJGPP specific issues.
9178
9179 * djgpp/config.bat: config.hin has been moved to lib. Adjust
9180 config.bat accordingly.
9181 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
9182 * djgpp/config.site: Likewise.
9183
136a0f76
PB
91842006-10-16 Paolo Bonzini <bonzini@gnu.org>
9185
27bd5d67
PB
9186 Replace %*-header with %provides, %requires, %code. See discussion at
9187 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
9188
136a0f76
PB
9189 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
9190 (b4_user_start_header): Remove.
9191 * data/glr.c: Use new macros instead of b4_*start_header
9192 and b4_*end_header.
9193 * data/glr.cc: Likewise.
9194 * data/lalr1.cc: Likewise.
9195 * data/push.c: Likewise.
9196 * data/yacc.c: Likewise.
9197
9198 * doc/bison.texinfo: Remove %before-header, rename
9199 %{start,end,after}-header to %requires, %provides, %code.
9200
9201 * src/parse-gram.y: Likewise (also rename token names accordingly).
9202 * src/scan-gram.l: Likewise.
9203 * tests/actions.at: Likewise.
9204
10f429ef
PE
92052006-10-14 Paul Eggert <eggert@cs.ucla.edu>
9206
9207 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
9208 Problem reported by Joel E. Denny.
9209
92102006-10-14 Jim Meyering <jim@meyering.net>
9211
9212 (Sync from coreutils.)
9213 Work also when the working directory (with e.g. coreutils sources)
9214 is version controlled with git, rather than CVS.
9215 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
9216 rather than CVS.
9217 In messages and comments, say e.g., "checked-out sources",
9218 rather than "CVS sources".
9219 (version_controlled_file): New function. Work for git as well as
9220 for CVS. Don't use grep's -q option.
9221 (slurp): Call it here, in place of CVS-specific code.
9222
c4bd5bf7
JD
92232006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
9224
9225 Fix testsuite for ./configure --enable-gcc-warnings:
9226 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
9227 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
9228 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
9229 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
9230 * test/regression.at (Diagnostic that expects two alternatives):
9231 Likewise.
9232
46356ea4
PE
92332006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9234
231ed89a
PE
9235 * bootstrap.conf (gnulib_modules): Add config-h.
9236 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
9237 worry about HAVE_CONFIG_H.
9238 * lib/abitset.c: Likewise.
9239 * lib/bitset.c: Likewise.
9240 * lib/bitset_stats.c: Likewise.
9241 * lib/bitsetv-print.c: Likewise.
9242 * lib/bitsetv.c: Likewise.
9243 * lib/ebitset.c: Likewise.
9244 * lib/get-errno.c: Likewise.
9245 * lib/lbitset.c: Likewise.
9246 * lib/subpipe.c: Likewise.
9247 * lib/timevar.c: Likewise.
9248 * lib/vbitset.c: Likewise.
9249 * lib/bitset.c: Include "bitset.h" first, to test interface.
9250 * lib/bitset_stats.c: Include "bitset_stats.h" first.
9251 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
9252 * lib/bitsetv.c: Include "bitsetv.h" first.
9253 * lib/get-errno.c: Include "get-errno.h" first.
9254 * m4/.cvsignore: Add config-h.m4.
9255 * tests/actions.at (Default %printer and %destructor for ...):
9256 Adjust expected line numbers in output to reflect removal of #if
9257 HAVE_CONFIG_H lines.
9258 * tests/glr-regression.at (Missed %merge type warnings when ...):
9259 Likewise.
9260 * tests/regression.at (Braced code in declaration in rules section):
9261 Likewise.
9262 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
9263 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
9264 Include <config.h> unconditionally.
9265
46356ea4
PE
9266 * bootstrap: Sync from coreutils, as follows:
9267
9268 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9269
9270 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
9271 variable was sometimes used without being initialized. This
9272 messed up the installation of the INSTALL file in some cases.
9273
9274 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9275
9276 * bootstrap (usage, main program, symlink_to_gnulib): Add option
9277 --copy. Inspired by a suggestion from Bruno Haible.
9278
9279 2006-10-03 Jim Meyering <jim@meyering.net>
9280
9281 * bootstrap: Undo last change to this file, since now gnulib-tool
9282 sticks with the automake default in generating dependencies.
9283
dd4bf078
PE
92842006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9285
cf2a5f7c
PE
9286 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
9287 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
9288
9289 * doc/bison.1: Add copyright notice.
9290
9291 * data/glr.c: Don't include <stdarg.h>; not used.
9292
35fe0834
PE
9293 * NEWS: The -g and --graph options now output graphs in Graphviz
9294 DOT format, not VCG format.
9295 * doc/bison.1: Likewise.
9296 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
9297 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
9298 of this change in
9299 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
9300 * TODO: Remove Graphviz entry.
9301 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
9302 remove vcg.c, vcg.h, vcg_defaults.h.
9303 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
9304 * src/graphviz.c, src/graphviz.h: New files.
9305 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
9306 * src/files.h: Make comment more generic.
9307 * src/main.c (main): Likewise.
9308 * src/print_graph.h: Likewise.
9309 * src/getargs.c (usage): Make usage description more generic.
9310 * src/print_graph.c: Include graphviz.h rather than vcg.h.
9311 (static_graph, fgraph): Remove. All uses changed to pass
9312 arguments instead of sharing a static var.
9313 (print_core, print_actions, print_state, print_graph):
9314 Output graphviz format rather than VCG format.
9315 * tests/.cvsignore: Remove *.vcg; add *.dot.
9316 * tests/output.at: Expect *.dot files, not *.vcg files.
9317
dd4bf078
PE
9318 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
9319 accommodates the 2006-10-08 change.
9320
efdd7421
PE
93212006-10-11 Bob Rossi <bob@brasko.net>
9322
9323 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
9324 (b4_yyssa, b4_yyerror_range): New macros.
9325 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
9326 (yypvarsinit): Remove init of removed fields.
9327 (yypushparse): Remove use of removed fields; use new macros instead.
9328
96a1981a
PE
93292006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9330
9331 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
9332 in a push parser. Reindent slightly to match yacc.c better.
9333
93342006-10-11 Bob Rossi <bob@brasko.net>
9335
46356ea4
PE
9336 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
9337 yymsg_alloc fields.
9338 (yypvarsinit, yypushparse): Remove init of removed fields.
9339 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 9340
c1630a8b
PE
93412006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9342
9343 * THANKS: Add Paolo Bonzini and Bob Rossi.
9344
90b9908d
PB
93452006-10-08 Paolo Bonzini <bonzini@gnu.org>
9346
9347 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
9348 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
9349 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
9350 b4_define_user_cde and uses): Remove.
9351 (b4_comment, b4_prefix, b4_sync_start): New.
9352 * data/bison.m4: New file, with most of the content removed from c.m4.
9353 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
9354 * src/output.c (output_skeleton): Pass bison.m4.
9355 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
9356 only if specified.
9357
cf806753
PE
93582006-10-05 Paul Eggert <eggert@cs.ucla.edu>
9359
9360 Fix test failure reported by Tom Lane in
9361 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
9362 and try to make such failures easier to catch in the future.
9363 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
9364 that's now the caller's responsibility.
9365 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
9366 Set yychar = YYEOF if it's negative.
9367 * tests/actions.at (yylex): Abort if asked to read past EOF.
9368 * tests/conflicts.at (yylex): Likewise.
9369 * tests/cxx-type.at (yylex): Likewise.
9370 * tests/glr-regression.at (yylex): Likewise.
9371 * tests/input.at (yylex): Likewise.
9372 * tests/regression.at (yylex): Likewise.
9373 * tests/torture.at (yylex): Likewise.
9374
0e2f006a
PE
93752006-10-01 Paul Eggert <eggert@cs.ucla.edu>
9376
9377 Fix problems with translating English-language diagnostics.
9378 * bootstrap: Fix bug introduced in recent bootstrap changes, with
9379 respect to bison-runtime pot generation. The YY_ stuff
9380 wasn't being captured.
9381 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
9382 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
9383 * runtime-po/POTFILES.in: Add data/push.c.
9384
e3ddc1e3
PE
93852006-09-29 Paul Eggert <eggert@cs.ucla.edu>
9386
9387 Merge bootstrap changes from coreutils.
9388
9389 2006-09-28 Jim Meyering <jim@meyering.net>
9390
9391 Automatically generated dependencies are important even
9392 when all of the sources in a directory come from gnulib.
9393 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
9394 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
9395
9396 2006-09-23 Jim Meyering <jim@meyering.net>
9397
9398 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
9399
9400 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9401
9402 * bootstrap: Add support for --force.
9403 (usage): New function. Describe usage less tersely.
9404 (CVS_only_file): New var.
9405
01e972b3
PE
94062006-09-21 Paul Eggert <eggert@cs.ucla.edu>
9407
9408 * data/push.c (YYPUSH_MORE): Make it an enum instead.
9409 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
9410 Adjust white space and comments to match GNU style better.
9411
c63d3e90
PE
94122006-09-20 Bob Rossi <bob@brasko.net>
9413
9414 * data/push.c (yyresult_get): Remove function.
9415 (YYPUSH_MORE): Add #define.
9416 (yypushparse): Modify return value.
9417
e70f46d1
PE
94182006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9419
9420 * stamp-h.in: Remove; no longer needed.
9421 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
9422 Remove config.h, config.hin, intl (no longer created).
9423 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
9424 stamp-h1.
9425
9426 Sync bootstrap from coreutils, as follows:
9427
9428 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
9429
9430 * bootstrap (symlink_to_gnulib): New function.
9431 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
9432 to copies-of-gnulib.
9433 (cp_mark_as_generated, slurp, gnulib_files):
9434 Avoid making a copy if it's the same as the old version.
9435 (gnulib_files): Add support for this variable (used by Bison).
9436
a92be413
PE
94372006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9438
9439 * src/getargs.c (usage): Rework to use conventions similar to
9440 coreutils, to make translation a bit easier and the code a bit
9441 smaller. Problem reported by Tim Van Holder.
9442
4f82b42a
PE
94432006-09-15 Paul Eggert <eggert@cs.ucla.edu>
9444
3b2942e6
PE
9445 Use some of gnulib's new modules, taken from coreutils.
9446
9447 * bootstrap: Sync from coreutils, except add support for gnulib_files.
9448 * bootstrap.conf: New file.
9449 (gnulib_modules): Add configmake, inttypes, unistd.
9450 (XGETTEXT_OPTIONS): Add complain, complain_at,
9451 fatal, fatal_at, warn, warn_at, unexpected_end.
9452 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
9453 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
9454 (gl_EARLY): Add.
9455 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
9456 (gl_INIT): Add
9457 (GNULIB_AUTOCONF_SNIPPET): Remove.
9458 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
9459 the pickiest.
9460 * lib/.cvsignore: Add inttypes_.h.
9461 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
9462 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
9463 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
9464 no-longer-necessary initializations.
9465 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
9466 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
9467 use the unistd module.
9468 * src/system.h: Likewise.
9469 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
9470 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
9471 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
9472 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
9473 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
9474 * src/system.h: Include inttypes.h unconditionally, now that we
9475 use the inttypes module. Don't bother to include stdint.h, since
9476 inttypes.h now does that for us.
9477 (LOCALEDIR): Remove, now that we use the configmake module.
9478 * src/getargs.c: Include configmake.h.
9479 * src/main.c: Likewise.
9480 * src/output.c: Likewise.
9481 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
9482 not from $abs_top_builddir, since config.h moved.
9483
9484
4f82b42a
PE
9485 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
9486 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
9487
9488 * src/parse-gram.y (symbol_declaration): Don't put statements
9489 before declarations; it's not portable to C89.
9490 * src/scan-code.l (handle_action_at): Likewise.
9491
9492 * src/scan-code.l: Always initialize braces_level; the old code
9493 left it uninitialized and therefore had undefined behavior.
9494
9495 Don't attempt to redefine 'assert', since it runs afoul of
9496 systems where standard headers (mistakenly) include <assert.h>.
9497 Instead, define and use our own alternative, called 'aver'.
9498 * src/reader.c: Don't include assert.h, since we no longer
9499 use assert.
9500 * src/scan-code.l: Likewise.
9501 * src/system.h (assert): Remove, replacing with....
9502 (aver): New function, taking a bool arg. All uses changed.
9503 * src/tables.c (pack_vector): Ensure that aver arg is bool,
9504 not merely an integer.
9505
31c10e38
PE
95062006-09-15 Bob Rossi <bob@brasko.net>
9507
d6bdb90a
JD
9508 Add support for push parsing. Based on the original work of
9509 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
9510 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
9511 * data/c.m4 (YYPUSH): New.
9512 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
d6bdb90a 9513 * data/push.c: New file.
31c10e38
PE
9514 * src/getargs.c (push_parser): New var.
9515 * src/getargs.h (push_parser): New declaration.
9516 * src/output.c (prepare): Add macro insertion of `push_flag'.
9517 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
9518 (prologue_declaration): Parse %push-parser.
9519 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
9520 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
9521 list of removed lines from the traces observed.
9522 (AT_CHECK_CALC_LALR): Added push parser tests.
9523
fa7b79c0
PE
95242006-09-13 Paul Eggert <eggert@cs.ucla.edu>
9525
21fe08ca
PE
9526 * NEWS: Version 2.3a.
9527 * configure.ac (AC_INIT): Likewise.
9528
e8ec4d9b
PE
9529 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
9530 "#define YYSTYPE int" that caused "make maintainer-check" to fail
9531 due to header ordering dependencies. I don't know why the #define
9532 was there.
9533
fa7b79c0
PE
9534 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
9535 runtime cost when YYDEBUG is not defined, and so that some tests
9536 that used to fail now work. Problem and initial suggestion by
9537 Paolo Bonzini.
9538 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
9539 * data/glr.cc (b4_parser_class_name):
9540 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
9541 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
9542 (yydebug_) [YYDEBUG]: New member.
9543 (yycdebug_): Now defined only if YYDEBUG.
9544 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
9545 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
9546 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
9547 if YYYDEBUG.
9548 (debug_stream, set_debug_stream, debug_level, set_debug_level):
9549 Define only if YYDEBUG.
9550 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
9551 set_debug_level.
9552 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
9553 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
9554 AT_CHECK_CALC_GLR_CC that are working now.
9555
4ec13d60
PE
95562006-09-12 Paul Eggert <eggert@cs.ucla.edu>
9557
9558 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
9559 We don't need them in glr.cc, and glr.c defines them.
9560 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
9561 assumes that defining it to anything is the same as defining
9562 it to 1. Problem reported by Paolo Bonzini.
9563
8e1687ae
PE
95642006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
9565
9566 * data/c.m4 (b4_null, b4_case): Define.
9567 * src/output.c (prepare_symbols): Use b4_null.
9568 (user_actions_output): Use b4_case.
9569
3dc5e96b
PE
95702006-09-11 Paul Eggert <eggert@cs.ucla.edu>
9571
aef3da86
PE
9572 * data/glr.c (b4_shared_declarations): Put start-header first,
9573 before any #includes that we generate, so that feature-test
9574 macros work. Problem reported by Michael Deutschmann in
9575 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
9576 * data/lalr1.cc: Likewise.
9577 * doc/bison.texinfo (Prologue): Document that feature-test macros
9578 should be defined before any Bison declarations.
9579 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
9580 that depend on location.hh after, not before, Bison decls, since
9581 we now include location.hh after the first user prologue.
9582
3dc5e96b
PE
9583 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
9584 Sander Brandenburg in
9585 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
9586 Also, fix minor white space and comment issues.
aef3da86
PE
9587 (Prologue): Mention that it's better to define feature-test macros
9588 before Bison declarations. Problem reported by Michael Deutschmann.
9589
9590 * README-cvs: Fix typo: "&" should be "&&". Problem reported
9591 by Jim Meyering.
9592 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
9593 This adjusts to recent gnulib changes.
3dc5e96b 9594
b2a0b7ca
JD
95952006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9596
9597 Finish implementation of per-type %destructor/%printer. Discussed
9598 starting at
9599 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
9600 and
9601 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
9602 * NEWS (2.3+): Add a description of this feature to the default
9603 %destructor/%printer description.
9604 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
9605 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9606 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9607 list node contains a semantic type.
9608 * src/symtab.c, src/symtab.h: Extend with a table that associates
9609 semantic types with their %destructor's and %printer's.
9610 (semantic_type_from_uniqstr, semantic_type_get,
9611 semantic_type_destructor_set, semantic_type_printer_set): New functions
9612 composing the public interface of that table.
9613 (symbol_destructor_get, symbol_destructor_location_get,
9614 symbol_printer_get, symbol_printer_location_get): If there's no
9615 per-symbol %destructor/%printer, look up the per-type before trying
9616 the default.
9617 * tests/actions.at (Per-type %printer and %destructor): New test case.
9618 * tests/input.at (Default %printer and %destructor redeclared):
9619 Extend to check that multiple occurrences of %symbol-default in a
9620 single %destructor/%printer declaration is an error.
9621 (Per-type %printer and %destructor redeclared, Unused values with
9622 per-type %destructor): New test cases.
9623
3be03b13
JD
96242006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9625
9626 Require default %destructor/%printer to be declared using
9627 %symbol-default instead of an empty symbol list, and start working on
9628 new per-type %destructor/%printer. Discussed at
9629 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9630 * NEWS (2.3+): Add %symbol-default to example.
9631 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 9632 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
9633 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9634 (generic_symlist, generic_symlist_item): New nonterminals for creating
9635 a list in which each item is a symbol, semantic type, or
9636 %symbol-default.
9637 (grammar_declaration): Use generic_symlist in %destructor and %printer
9638 declarations instead of symbols.1 or an empty list.
9639 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9640 for changes to symbol_list.
9641 * src/reader.c: Update for changes to symbol_list.
9642 * src/scan-code.l: Likewise.
9643 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9644 * src/symlist.c, src/symlist.h: Extend such that a list node may
9645 represent a semantic type or a %symbol-default in addition to just an
9646 ordinary symbol. Add switched functions for setting %destructor's and
9647 %printer's.
9648 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9649 %destructor/%printer declarations.
9650
3508ce36
JD
96512006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9652
9653 Whether the default %destructor/%printer applies to a particular symbol
9654 isn't a question of whether the user *declares* that symbol (in %token,
9655 for example). It's a question of whether the user by any means
9656 *defines* the symbol at all (by simply using a char token, for
9657 example). $end is defined by Bison whereas any other token with token
9658 number 0 is defined by the user. The error token is always defined by
9659 Bison regardless of whether the user declares it with %token, but we
9660 may one day let the user define error as a nonterminal instead.
9661 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9662 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9663 the meaning of "user-defined".
9664 * tests/actions.at (Default %printer and %destructor for user-declared
9665 end token): Rename to...
9666 (Default %printer and %destructor for user-defined end token): ...
9667 this.
9668
9669 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9670 computation of whether to apply the default, don't maintain a list of
9671 every Bison-defined symbol. Instead, just check for a first character
9672 of '$', which a user symbol cannot have, and check for the error token.
9673
9350499c
JD
96742006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9675
9676 Don't apply the default %destructor or %printer to the error token,
9677 $undefined, or $accept. This change fits the general rule that the
9678 default %destructor and %printer are only for user-declared symbols,
9679 and it solves several difficulties that are described in the new test
9680 cases listed below.
9681 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9682 * tests/actions.at (Default %printer and %destructor are not for error
9683 or $undefined, Default %printer and %destructor are not for $accept):
9684 New test cases.
9685
4d7370cb
JD
96862006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9687
9688 Allow %start after the first rule.
9689 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9690 when parsing the first rule.
9691 (check_and_convert_grammar): Search for it here after all grammar
9692 declarations have been parsed. Skip midrules, which have dummy LHS
9693 nonterminals.
9694 * src/symtab.c (symbol_is_dummy): New function.
9695 * src/symtab.h (symbol_is_dummy): Declare it.
9696 * tests/input.at (%start after first rule): New test.
9697
6d0ef4ec
JD
96982006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9699
9700 Redo some of the previous commit: add back the ability to use
9701 non-aliased/undeclared string literals since it might be useful to
9702 those declaring %token-table.
9703 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9704 commit: don't worry about complaints from symbols_pack.
9705 * src/symtab.c (symbol_new, symbol_class_set,
9706 symbol_check_alias_consistency): Undo changes in previous commit: count
9707 each string literal as a new symbol and token, assign it a symbol
9708 number, and don't complain about non-aliased string literals.
9709 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9710 and token counts but does still set aliased tokens to the same number,
9711 symbol_pack_processor now leaves empty slots in the symbols array.
9712 Remove those slots.
9713 * tests/regression.at (Undeclared string literal): Remove test case
9714 added in previous commit since non-aliased string literals are allowed
9715 again.
9716 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9717 remove unnecessary string literal declarations.
9718 * tests/sets.at (Firsts): Likewise.
9719
965537bc
JD
97202006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9721
9722 Don't allow an undeclared string literal, but allow a string literal to
9723 be used before its declaration.
9724 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9725 symbols_pack complained.
9726 * src/symtab.c (symbol_new): Don't count a string literal as a new
9727 symbol.
9728 (symbol_class_set): Don't count a string literal as a new token, and
9729 don't assign it a symbol number since symbol_make_alias does that.
9730 (symbol_make_alias): It's not necessary to decrement the symbol and
9731 token counts anymore. Don't assume that an alias declaration occurs
9732 before any uses of the identifier or string, and thus don't assert that
9733 one of them has the highest symbol number so far.
9734 (symbol_check_alias_consistency): Complain if there's a string literal
9735 that wasn't declared as an alias.
9736 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9737 symbol_pack asserts that every token has been assigned a symbol number
9738 although undeclared string literals have not.
9739 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 9740 string literal): New test cases.
965537bc
JD
9741 (Characters Escapes, Web2c Actions): Declare string literals as
9742 aliases.
9743 * tests/sets.at (Firsts): Likewise.
9744
47aee066
JD
97452006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9746
9747 In the grammar scanner, STRING_FINISH unclosed constructs and return
9748 them to the parser in order to improve error messages.
9749 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9750 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9751 * tests/input.at (Unclosed constructs): New test case.
9752 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9753 seen.
9754
9755 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9756 unused global.
9757
1f6b3679
JD
97582006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9759
9760 Handle string aliases for character tokens correctly.
9761 * src/symtab.c (symbol_user_token_number_set): If the token has an
9762 alias, check and set its alias's user token number instead of its own,
9763 which is set to indicate the alias. Previously, every occurrence of
9764 the character token in the grammar overwrote that alias indicator with
9765 the character code.
9766 * tests/input.at (String aliases for character tokens): New test.
9767
219741d8
JD
97682006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9769
9770 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9771
11daa4e7
PE
97722006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9773
9774 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9775 to prevent failures when building on older platforms.
9776 Check for autopoint failure.
9777 Set XGETTEXT_OPTIONS to values that check for C format strings,
9778 so that translators are warned about them (this also helps
9779 prevent core dumps).
9780
9781 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9782 function, since it simplifies our code a bit.
9783
9784 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9785 rather than -W, so we don't get bogus warnings about sign comparisons.
9786 Add -Wpointer-arith, since that warning is useful (it reports code
9787 that does not conform to C89 and that some compilers reject).
9788 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9789 since it's no longer needed.
9790
f9bfc42a
JD
97912006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9792
9793 Clean up scanners a bit.
9794 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9795 definitions so gcc won't warn when obstack_for_string is unused.
9796 * src/scan-code.l: config.h and system.h are already #include'd by
9797 scan-code-c.c, so get rid of them here.
9798 * src/scan-gram.l: Likewise.
9799 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9800 definitions rather than duplicating the rest of it.
9801 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9802
06e8700a
JD
98032006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9804
9805 Suppress signed/unsigned comparison warnings for yycheck.
9806 * data/c.m4 (b4_safest_int_type): New macro.
9807 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9808 a signed int type, cast it to b4_safest_int_type first.
9809 * data/yacc.c: Likewise.
9810 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9811 also overwritten.
9812
9c437126
PE
98132006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9814
9815 * doc/bison.texinfo: Fix some typos.
9816
284d8a13
PE
98172006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9818
9819 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9820 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9821
9822 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9823 the latest gnulib does this a different way.
9824 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9825 translation was patched, so stop omitting it.
9826
ec5479ce
JD
98272006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9828
9829 Enable declaration of default %printer/%destructor. Make the parser
9830 use these for all user-declared grammar symbols for which the user does
9831 not declare a specific %printer/%destructor. Thus, the parser uses it
9832 for token 0 if the user declares it but not if Bison generates it as
9833 $end. Discussed starting at
9834 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9835 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9836 and
9837 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9838 * NEWS (2.3+): Mention.
9839 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9840 declare a %destructor for a mid-rule's semantic value. It's just
9841 impossible to declare one specific to it.
9842 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9843 code. Describe default %destructor form.
9844 * src/parse-gram.y (grammar_declaration): Parse default
9845 %printer/%destructor declarations.
9846 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9847 and symbol_destructor_location_get rather than accessing the destructor
9848 and destructor_location members of struct symbol.
9849 (symbol_printers_output): Likewise but for %printer's.
9850 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9851 again.
9852 * src/symtab.c (default_destructor, default_destructor_location,
9853 default_printer, default_printer_location): New static global
9854 variables to record the default %destructor and %printer.
9855 (symbol_destructor_get, symbol_destructor_location_get,
9856 symbol_printer_get, symbol_printer_location_get): New functions to
9857 compute the appropriate %destructor and %printer for a symbol.
9858 (default_destructor_set, default_printer_set): New functions to set the
9859 default %destructor and %printer.
9860 * src/symtab.h: Prototype all those new functions.
9861 * tests/actions.at (Default %printer and %destructor): New test to
9862 check that the right %printer and %destructor are called, that they're
9863 not called for $end, and that $$ and @$ work correctly.
9864 (Default %printer and %destructor for user-declared end token): New
9865 test to check that the default %printer and %destructor are called for
9866 a user-declared end token.
9867 * tests/input.at (Default %printer and %destructor redeclared, Unused
9868 values with default %destructor): New tests to check related grammar
9869 warnings and errors.
9870
868d2d96
JD
98712006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9872
9873 Clean up handling of %destructor for the end token (token 0).
9874 Discussed starting at
9875 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9876 and
9877 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9878
9879 Make the skeletons consistent in how they pop the end token and invoke
9880 its %destructor.
9881 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9882 state, which has token number 0, since this would invoke the
9883 %destructor for the end token.
9884 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9885 until after shifting the end token, or else it won't be popped.
9886 * data/yacc.c (yyparse): Likewise.
9887
9888 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9889 it's the end token. Upon termination, destroy an unshifted lookahead
9890 even when it's the end token.
9891 * data/lalr1.cc (yy::parser::parse): Likewise.
9892 * data/yacc.c (yyparse): Likewise.
9893
9894 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9895 value warnings for the end token when the user gives the end token a
9896 %destructor.
9897
9898 * tests/actions.at (Printers and Destructors): Test all the above.
9899
62a9592d
PE
99002006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9901
9902 Update to latest gnulib and gettext versions.
9903 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9904 Add fopen-safer.
9905 (gnulib_files): Add m4/warning.m4. Don't worry about files
9906 overwritten by autopoint.
9907 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9908 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9909 rejects them.
9910 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9911 so that we can remove the intl files at a better time.
9912 (intl_files_to_remove): Remove aclocal.m4, since it gets
9913 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9914 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9915 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9916 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9917 Remove datarootdir hack; no longer needed.
9918 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9919 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9920 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9921 strdup.h.
9922 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9923 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9924
10d6970f
PE
99252006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9926
9927 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9928 it with --assume-autoconf='latest-stable'.
9929
50a33993
JD
99302006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9931
9932 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9933 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9934 YYSTYPE' and `{'.
9935 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9936 those from muscle_tab.c since the old ones are misleading.
9937
2ce4ed68
AD
99382006-07-13 Akim Demaille <akim@epita.fr>
9939
9940 Support %define "KEY" {VALUE}.
9941 * src/scan-code.h, src/scan-code.l (translate_action)
9942 (translate_rule_action, translate_symbol_action, translate_code):
9943 Return char *, not const char *.
9944 * src/parse-gram.y (declaration): Rename as...
9945 (prologue_declaration): this.
9946 (string_content): Remove this nonterminal, use STRING.
9947 (braceless, content, content.opt): New nonterminal.
9948 Use them.
9949 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9950 as value.
9951 * src/scan-gram.l (getargs.h): Don't include it.
9952
db7e5eb5
PE
99532006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9954
9955 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9956 rather than a for-loop that declares a local bool variable. This
9957 should work around a compatibility problem with a Cray x1e C++
9958 compiler reported by Hung Nguyen in
9959 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9960 The for-loop was introduced in the 2004-11-17 change but I don't
9961 know why it was needed.
9962
a5d80ba5
AD
99632006-07-12 Akim Demaille <akim@epita.fr>
9964
9965 * data/c.m4: Comment changes.
9966
23eb2a69
AD
99672006-07-10 Akim Demaille <akim@lrde.epita.fr>
9968
9969 * src/complain.c (error_message, ERROR_MESSAGE): New.
9970 To factor...
9971 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9972 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9973
ddc8ede1
PE
99742006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9975
9976 * NEWS: Instead of %union, you can define and use your own union type
9977 YYSTYPE if your grammar contains at least one <type> tag.
9978 Your YYSTYPE need not be a macro; it can be a typedef.
9979 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9980 (Union Decl, Decl Summary): Document this.
9981 * data/glr.c (YYSTYPE): Implement this.
9982 * data/glr.cc (YYSTYPE): Likewise.
9983 * data/lalr1.cc (YYSTYPE): Likewise.
9984 * data/yacc.c (YYSTYPE): Likewise.
9985 * src/output.c (prepare): Output tag_seen_flag.
9986 * src/parse-gram.y (declaration, grammar_declaration):
9987 Use 'union_seen' rather than 'typed' to determine whether
9988 %union has been seen, since grammars can now be typed without
9989 %union.
9990 (symbol_declaration, type.opt, symbol_def):
9991 Keep track of whether a tag has been seen.
9992 * src/reader.c (union_seen, tag_seen): New vars.
9993 (typed): remove.
9994 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9995 * src/scan-code.l (untyped_var_seen): New variable.
9996 (handle_action_dollar): Adjust to above changes.
9997 (handle_action_dollar, handle_action_at):
9998 Improve overflow checking for outlandish numbers.
9999 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
10000 avoid new diagnostics generated by above changes.
10001 * tests/regression.at (YYSTYPE typedef): Add test to check
10002 for type tags without %union.
10003
10004 * src/symlist.c (symbol_list_length): Return int, not unsigned
10005 int, since callers expect int. This may need to get revisited
10006 once we have proper integer overflow checking.
10007
10008 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
10009 object is now static.
10010
10011 * src/getargs.c (flags_argmatch): Return void, not int,
10012 to pacify ./configure --enable-gcc-warnings.
10013
10014 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
10015 since last_string is already defined to FLEX_PREFIX (last_string).
10016
7b42569e
AD
100172006-07-09 Akim Demaille <akim@lrde.epita.fr>
10018
10019 Implement --warnings/-W.
10020 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
10021 replaced by...
10022 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
10023 Adjust callers.
10024 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
10025 (warnings_args, warnings_types): New.
10026 (getargs, short_options, long_options): Accept -W/--warnings.
10027 Sort the options by alphabetical order, upper case letter right
10028 before its lower case.
10029
3b452f4e
JD
100302006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
10031
10032 Change %merge result type clash warnings to errors. Discussed at
10033 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
10034 * src/reader.c (record_merge_function_type): Use complain_at.
10035 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
10036 declared later): Update test case results.
10037
b8a41559
AD
100382006-07-09 Akim Demaille <akim@lrde.epita.fr>
10039
10040 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
10041 to be in alphabetical order.
10042 (trace_args): Spelling fixes.
10043
cd9e1ba2
PE
100442006-07-09 Paul Eggert <eggert@cs.ucla.edu>
10045
10046 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
10047 so they don't collide with user-defined macros.
10048 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
10049 this was never guaranteed, and now that we're using gnulib stdint,
10050 which defines int_fast16_t to long int, the problem is exposed.
10051
cb48f191
PE
100522006-07-08 Paul Eggert <eggert@cs.ucla.edu>
10053
b8445a15
PE
10054 * data/c.m4 (b4_basename): Simplify a bit, since we don't
10055 need the full POSIX semantics (and weren't implementing them
10056 anyway).
10057
cb48f191
PE
10058 Adjust to Autoconf 2.60 and today's gnulib.
10059 * bootstrap (gnulib_modules): Add stdint.
10060 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
10061 no longer copies it.
10062 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
10063 since stdint needs the former and wcwidth (which is now required
10064 by mbswidth) needs the latter.
10065 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
10066 work around a compatibility glitch between gettext 0.14.6 and
10067 Autoconf 2.60.
10068 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
10069 Do not check for uintptr_t, since new stdint module does the right
10070 thing.
10071 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
10072 Add stdint.h, stdint_.h, wcwidth.h.
10073 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
10074 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
10075 stdint.m4, wchar_t.m4, wcwidth.m4.
10076 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
10077 usual order for ../lib/*.h files.
10078 (file_name_split): Use last_component, not base_name, to adjust
10079 to gnulib changes.
10080 * src/parse-gram.h: Include <strverscmp.h> in the usual order
10081 for ../lib/*.h files.
10082 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
10083 Define unconditionally, since we now assume the stdint module.
10084 * src/scan-skel.l: Include <dirname.h>.
10085 (BASE_QPUTS): Use last_component, not base_name.
10086 * src/system.h: Include <unlocked-io.h> in the usual order
10087 for ../lib/*.h files. Include <stdint.h> unconditionally,
10088 since we now use the stdint module.
10089 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
10090 HAVE_UINTPTR_T, since we now use the stdint module.
10091 (base_name): Remove decl, since files now include <dirname.h>
10092 to get the decl.
10093
cd48d21d
AD
100942006-07-08 Akim Demaille <akim@lrde.epita.fr>
10095
10096 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
10097 New, default to 1.
10098 * data/yacc.c, data/glr.c, data/location.cc: Use them.
10099 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
10100 default.
10101 * tests/calc.at: Adjust.
10102
8ec0a172
AD
101032006-07-08 Akim Demaille <akim@lrde.epita.fr>
10104
b8445a15 10105 * data/c.m4 (b4_basename): New.
8ec0a172
AD
10106 (b4_syncline): Also output the location of its invocation (from
10107 the skeleton).
10108 (b4_user_action, b4_define_user_action, b4_user_actions)
10109 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
10110 (b4_user_stype): New.
10111 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
10112
4a678af8
JD
101132006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
10114
10115 In the grammar file, the first column is 1 not 0 on the first line as
10116 on every other line.
10117 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
10118 * tests/input.at (Torturing the Scanner): Update output.
10119
10120 * src/scan-gram.l (scanner_cursor): Declare it static.
10121
dd60572a
JD
101222006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
10123
10124 In warnings, say "previous declaration" rather than "first
10125 declaration".
10126 * src/symtab.c (redeclaration): Do that here.
10127 * src/reader.c (record_merge_function_type): In the case of a result
10128 type clash, report the previous declaration rather than the very first
10129 one in the grammar file.
10130 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
10131 declared later): Add a third declaration to check this behavior.
10132 * tests/input.at (Incompatible Aliases): Update output.
10133
2073e1b6
AD
101342006-06-27 Akim Demaille <akim@epita.fr>
10135
10136 * doc/Doxyfile.in: New.
10137 * doc/Makefile.am: Use it.
10138 * src/lalr.h, src/symtab.h: Initial doxygenation.
10139
8ee5b538
JD
101402006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10141
10142 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
10143 declared after the %merge. This continues the effort of the previous
10144 patch.
8ee5b538
JD
10145 * src/reader.c (get_merge_function): Don't set the merger type yet.
10146 (record_merge_function_type): New function for setting the merger type
10147 and checking for clashes.
10148 (grammar_current_rule_merge_set): Set the location of the %merge for
10149 the current rule.
10150 (packgram): Invoke record_merge_function_type for each rule now that
10151 all symbol type declarations have been parsed.
10152 * src/reader.h (merger_list.type_declaration_location): New member
10153 storing the location of the first %merge from which the type for this
10154 merging function was derived.
10155 * src/symlist.h (symbol_list.merger_declaration_location): New member
10156 storing the location of a rule's %merge, if any.
10157 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
10158 declared later): New test to catch the error fixed by the above patch.
10159
ffa4ba3a
JD
101602006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10161
10162 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
10163 declarations appear after the rules. Discussed at
10164 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
10165 and
10166 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
10167 Don't mistake the type of $$ in a midrule to be that of its parent
10168 rule's $$.
ffa4ba3a
JD
10169 * src/reader.c (grammar_current_rule_end): Don't invoke
10170 grammar_rule_check yet since not all symbol declarations may have been
10171 parsed yet.
10172 (grammar_midrule_action): Likewise.
10173 Don't record whether the midrule's $$ has been used yet since actions
10174 haven't been translated yet.
10175 Record the midrule's parent rule and its RHS index within the parent
10176 rule.
10177 (grammar_current_rule_action_append): Don't translate the action yet
10178 since not all symbol declarations may have been parsed yet and, thus,
10179 warnings about types for $$, $n, @$, and @n can't be reported yet.
10180 (packgram): Translate the action and invoke grammar_rule_check now that
10181 all symbol declarations have been parsed.
10182 * src/scan-code.l (handle_action_dollar): Now that this is invoked
10183 after parsing the entire grammar file, the symbol list here in the case
10184 of a midrule is actually the midrule's empty RHS, so reference its
10185 parent rule's RHS where necessary.
10186 On the other hand, now that you can already know it's a midrule, you
10187 aren't forced to think $$ has the same type as its parent rule's $$.
10188 (handle_action_at): In the case of a midrule, reference the parent rule
10189 where necessary.
10190 * src/symlist.c (symbol_list_new): Initialize new midrule-related
10191 members.
10192 (symbol_list_length): Now that this is invoked after all rules have
10193 been parsed, a NULL symbol (rather than a NULL symbol list node)
10194 terminates a rule. symbol_list_print already does this correctly.
10195 * src/symlist.h (symbol_list.midrule_parent_rule,
10196 symbol_list.midrule_parent_rhs_index): New members so that midrules can
10197 remember their relationships with their parents.
10198 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
10199 fixed by the above patch.
10200 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
10201 implementing...
10202 (Unused values): ... this old test case and...
10203 (Unused values before symbol declarations): ... this new test case.
10204 This one is the same as `Unused values' except that all symbol
10205 declarations appear after the rules in order to catch the rest of the
10206 errors fixed by the above patch.
10207
e256e17f
JD
102082006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10209
300a1930
JD
10210 More cleanup.
10211 * src/reader.c (current_rule): Declare it static since it's no longer
10212 used outside this file.
10213 (grammar_current_rule_action_append): Remove redundant arguments from
10214 translate_rule_action invocation.
10215 * src/reader.h (current_rule): Remove this unused extern.
10216 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
10217 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 10218
381ecb06
JD
102192006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
10220
10221 Clean up yesterday's patch.
10222 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
10223 to...
10224 * src/reader.c (grammar_current_rule_action_append): ... here for
10225 consistency with grammar_current_rule_symbol_append.
10226 * tests/regression.at (Braced code in declaration in rules section):
10227 Make yyerror and yylex static as usual.
10228
4210cd0b
JD
102292006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
10230
10231 Fix bug that mistakes braced code in a declaration in the rules section
10232 to be a rule action. Mentioned at
10233 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
10234 * src/scan-gram.l: Move midrule action detection from the start of the
10235 scanning of any braced code to...
10236 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
10237 action. For readability, use $2 and @2 rather than the equivalent
10238 global variables.
10239 * tests/regression.at (Braced code in declaration in rules section):
10240 New test to catch the error fixed by the above patch.
10241
10242 Work on code readability some.
10243 * src/scan-code.l (current_rule): Get rid of this misleading and
10244 redundant declaration: it's actually extern'ed in reader.h.
10245 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
10246 translate_action): Add a rule argument and use it instead of the global
10247 current_rule.
10248 (translate_rule_action): This already receives current_rule through an
10249 argument, so pass it on to translate_action instead of assigning
10250 current_rule to current_rule.
10251 (translate_symbol_action, translate_code): Pass rule = NULL to
10252 translate_action.
10253
34f98f46
JD
102542006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
10255
10256 Rename %before-definitions to %start-header and %after-definitions to
10257 %end-header. Don't use these declarations to separate pre-prologue
10258 blocks from post-prologue blocks. Add new order-independent
10259 declarations %before-header and %after-header as alternatives to the
10260 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
10261 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
10262 * NEWS (2.3+): Update for these changes.
10263 * data/glr.c (b4_before_definitions): Update to...
10264 (b4_start_header): ... this.
10265 (b4_after_definitions): Update to...
10266 (b4_end_header): ... this.
10267 * data/glr.cc: Likewise.
10268 * data/lalr1.cc: Likewise.
10269 * data/yacc.c: Likewise.
10270 * doc/bison.texinfo (The prologue): Update names, and replace remaining
10271 prologue blocks with %*-header declarations.
10272 (Calc++ Parser): Likewise.
91661ebb 10273 (Decl Summary): Update names.
148d66d8 10274 (Table of Symbols): Update description.
34f98f46
JD
10275 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
10276 (PERCENT_END_HEADER): ... this.
10277 (PERCENT_BEFORE_DEFINITIONS): Update to...
10278 (PERCENT_START_HEADER): ... this.
10279 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10280 (declaration): Update token names and m4 macro names.
10281 When parsing %end-header and %start-header, invoke translate_code
10282 before muscle_code_grow, and no longer set global booleans to remember
10283 whether these declarations have been seen.
10284 Parse new %after-header and %before-header.
10285 * src/reader.c (before_definitions, after_definitions): Remove.
10286 (prologue_augment): Accept a new bool argument to specify whether to
10287 augment the pre-prologue or post-prologue.
10288 * src/reader.h (before_definitions, after_definitions): Remove these
10289 extern's.
10290 (prologue_augment): Add new bool argument.
10291 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
10292 (PERCENT_END_HEADER): ... this.
10293 (PERCENT_BEFORE_DEFINITIONS): Update to...
10294 (PERCENT_START_HEADER): ... this.
10295 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10296 * tests/actions.at (Printers and Destructors): Update names.
10297
31b2b07e
JD
102982006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
10299
10300 Add comparison operators for C++ location classes. Discussed at
10301 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
10302 * data/c++.m4 (b4_define_location_comparison): New boolean %define
10303 declaration indicating whether filename_type has an operator==. If
10304 filename_type is `std::string', it defaults to `1', `0' otherwise.
10305 * data/location.cc: Iff b4_define_location_comparison is `1', add
10306 operator== and operator!= for class position and for class location.
10307
10308 Some minor fixes.
10309 * src/scan-action.l: Remove unused file.
10310 * src/symtab.c (symbol_printer_set): Use printer_location not
10311 destructor_location.
10312 * src/symtab.h (struct symbol): Replace incorrect source comment for
10313 printer members.
10314 * tests/input.at (Incompatible Aliases): Update output with correct
10315 printer location.
10316
9bc0dd67
JD
103172006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
10318
10319 Don't put the pre-prologue in the header file. For the yacc.c code
10320 file and the glr.c header and code files, move the pre-prologue before
10321 the token definitions. Add new %before-definitions and
10322 %after-definitions to declare code that will go in both the header file
10323 and code file. Discussed at
10324 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
10325 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
10326 and
10327 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
10328 * NEWS (2.3+): Describe these changes.
10329 * data/glr.c (b4_pre_prologue): Move from within to before...
10330 (b4_shared_declarations): ... this.
10331 Add new b4_before_definitions before b4_token_enums.
10332 Add new b4_after_definitions at the end.
10333 * data/glr.cc (b4_pre_prologue): Replace with...
10334 (b4_before_definitions): ... this in the header file.
10335 (b4_after_definitions): New near the end of the header file.
10336 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
10337 code file right before including the header file.
10338 (b4_before_definitions): New in the previous position of
10339 b4_pre_prologue in the header file.
10340 (b4_after_definitions): New near the end of the header file.
10341 * data/yacc.c: Clean up some m4 quoting especially in the header file.
10342 (b4_token_enums_defines): In the code file, move to right before
10343 YYSTYPE for consistency with the header file.
10344 (b4_before_definitions): New right before b4_token_enums_defines in
10345 both the header and code file.
10346 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
10347 header and code file.
10348 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
10349 of prologues for %union dependencies.
91661ebb
JD
10350 (Decl Summary): In %defines description, mention the effect of
10351 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
10352 (Calc++ Parser): Forward declare driver in a %before-definitions rather
10353 than in the pre-prologue so that make check succeeds.
148d66d8 10354 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
10355 %after-definitions.
10356 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
10357 %before-definitions.
10358 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
10359 (declaration): Parse those declarations and append to
10360 b4_before_definitions and b4_after_definitions, respectively.
10361 * src/reader.c (before_definitions, after_definitions): New bools to
10362 track whether those declarations have been seen.
10363 (prologue_augment): Add to the post-prologue if %union,
10364 %before-definitions, or %after-definitions has been seen.
10365 * src/reader.h (before_definitions, after_definitions): New extern's.
10366 * src/scan-gram.l: Scan the new declarations.
10367 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
10368 prologue block in a %before-definitions or a %after-definitions based
10369 on whether the %union is declared.
10370 * tests/regression.at (Early token definitions with --yacc, Early token
10371 definitions without --yacc): Move tests for token definitions into the
10372 post-prologue since token names are no longer defined in the
10373 pre-prologue.
10374
203b9274
AD
103752006-06-20 Akim Demaille <akim@epita.fr>
10376
10377 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
10378 (symbol_get): Use it.
10379 * src/parse-gram.y: Use it.
10380
a7ee59cf
JD
103812006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
10382
10383 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
10384 build succeeds when configured with --enable-gcc-warnings.
10385
5a2baae7
PE
103862006-06-19 Paul Eggert <eggert@cs.ucla.edu>
10387
33ad1a9c
PE
10388 * src/parse-gram.y (char_name): New function.
10389 (CHAR, STRING, string_content): For %printer, properly escape.
10390 (ID): Prefer fputs to fprintf.
10391 (id): Reindent to be consistent with other rules.
10392 Properly quote char.
10393
5a2baae7
PE
10394 The Translation Project changed its way of publishing translations
10395 to maintainers. I haven't received any responses to my request
10396 for supporting the old way, or for documenting the new way. I
10397 have modified 'bootstrap' to use screen scraping
10398 (in this case, HTML scraping). This is unreliable and inelegant,
10399 but I don't see any better way. Yuck.
10400 * bootstrap (TP_URL, WGET_COMMAND): New vars.
10401 (get_translations): New function, which uses HTML scraping to
10402 deduce locations of latest translations.
10403 Use this function to grab both bison and bison-runtime .po files.
10404 Don't bother priming the pump for the runtime-po domain any more,
10405 as it's now translated better than bison is.
10406
58d7a1a1
AD
104072006-06-19 Akim Demaille <akim@epita.fr>
10408
10409 * src/scan-gram.l: No longer "parse" things after `%union' until
10410 `{'. Rather, return a single "%union" token.
10411 No longer make symbols: return strings, and leave the conversion
10412 to symbols to the parser.
10413 (SC_PRE_CODE, token_type): Remove.
10414 * src/parse-gram.y (%union): New field `character'.
10415 Sort tokens.
10416 (CHAR): New token.
10417 (ID, ID_COLON): Now that the scanner no longer makes them
10418 identifiers, adjust all uses to invoke symbol_get.
10419 (id_colon): New, wraps the conversion from string to symbol.
10420 (%union): Accept a possible union_name.
10421 (symbol): Now can be a char.
10422 * data/c.m4 (b4_union_name): Leave a default value.
10423 * data/glr.c, data/yacc.c: Use it.
10424
b931235e
JD
104252006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
10426
10427 For associating token numbers with token names for "yacc.c", don't use
10428 #define statements unless `--yacc' is specified; always use enum
10429 yytokentype. Most important discussions start at:
10430 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
10431 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
10432 and
10433 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
10434 * NEWS (2.3+): Mention.
10435 * data/c.m4 (b4_yacc_if): New.
10436 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
10437 token #define's.
10438 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
10439 on token name definitions.
10440 * src/getargs.c (usage): Capitalize `Yacc' in English.
10441 * src/output.c (prepare): Define b4_yacc_flag.
10442 * tests/regression.at (Early token definitions): Test that tokens names
10443 are defined before the pre-prologue not just before the post-prologue.
10444 Remove this test case and copy to...
10445 (Early token definitions with --yacc): ... this to test #define's.
10446 (Early token definitions without --yacc): ... and this to test enums.
10447
9e6e7ed2
PE
104482006-06-11 Paul Eggert <eggert@cs.ucla.edu>
10449
10450 * NEWS: Reword the post-2.3 change to not be so optimistic about
10451 removing the old "look-ahead" spelling.
10452 Update previous look-ahead/lookahead change reports.
10453 * REFERENCES: look-ahead -> lookahead (since that's
10454 what he actually wrote).
10455 * doc/refcard.tex: look ahead -> lookahead,
10456 look-ahead -> lookahead
10457
742e4900
JD
104582006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
10459
10460 For consistency, use `lookahead' instead of `look-ahead' or
10461 `look_ahead'. Discussed starting at
10462 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
10463 and then at
10464 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
10465 * NEWS: For the next release, note the change to `--report'.
10466 * TODO, doc/bison.1: Update English.
10467 * doc/bison.texinfo: Update English.
10468 (Understanding Your Parser, Bison Options): Document as
10469 `--report=lookahead' rather than `--report=look-ahead'.
10470 * src/conflicts.c: Update English in comments.
10471 (lookahead_set): Rename from look_ahead_set.
10472 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
10473 (resolve_sr_conflict): Rename local look_ahead_tokens to
10474 lookahead_tokens, and update other uses.
10475 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
10476 count_rr_conflicts, conflicts_free): Update uses.
10477 * src/getargs.c (report_args): Move "lookahead" before alternate
10478 spellings.
10479 (report_types): Update uses.
10480 (usage): For `--report' usage description, state `lookahead' spelling
10481 rather than `look-ahead'.
10482 * src/getargs.h (report.report_lookahead_tokens): Rename from
10483 report_look_ahead_tokens.
10484 * src/lalr.c: Update English in comments.
10485 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
10486 (state_lookahead_tokens_count): Rename from
10487 state_look_ahead_tokens_count.
10488 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10489 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
10490 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10491 Update other uses.
10492 Update English in output.
10493 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
10494 * src/print.c: Update English in comments.
10495 (lookahead_set): Rename from look_ahead_set.
10496 (print_reduction): Rename argument lookahead_token from
10497 look_ahead_token.
10498 (print_core, state_default_rule, print_reductions, print_results):
10499 Update uses.
10500 * src/print_graph.c: Update English in comments.
10501 (print_core): Update uses.
10502 * src/state.c: Update English in comments.
10503 (reductions_new): Update uses.
10504 (state_rule_lookahead_tokens_print): Rename from
10505 state_rule_look_ahead_tokens_print, and update other uses.
10506 * src/state.h: Update English in comments.
10507 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
10508 (state_rule_lookahead_tokens_print): Rename from
10509 state_rule_look_ahead_tokens_print.
10510 * src/tables.c: Update English in comments.
10511 (conflict_row, action_row): Update uses.
10512 * tests/glr-regression.at
10513 (Incorrect lookahead during deterministic GLR,
10514 Incorrect lookahead during nondeterministic GLR): Rename
10515 print_look_ahead to print_lookahead.
10516 * tests/torture.at: Update English in comments.
10517 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
10518 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
10519 (Many lookahead tokens): Update uses.
10520 * data/glr.c: Update English in comments.
10521 * lalr1.cc: Likewise.
10522 * yacc.c: Likewise.
10523 * src/conflicts.h: Likewise.
10524 * src/lalr.h: Likewise.
10525 * src/main.c: Likewise.
10526 * src/output.c: Likewise.
10527 * src/parse-gram.c: Likewise.
10528 * src/tables.h: Likewise.
10529 * tests/calc.at: Likewise.
10530
3c40d0b5
JD
105312006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
10532
10533 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
10534
5d278082
PE
105352006-06-07 Paul Eggert <eggert@cs.ucla.edu>
10536
10537 * TODO: Add request from Nelson H. F. Beebe to be able to install
10538 Bison without installing the yacc script.
10539
9e668899
JD
105402006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10541
10542 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
10543 and yytext if they're already #define'd.
10544 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
10545 * src/scan-code-c.c: ... here.
10546 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
10547 <config.h>.
10548
0c8e079f
JD
105492006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10550
10551 Get Bison to build again when configured with --enable-gcc-warnings.
10552 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
10553 missing #include's.
10554 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
10555 loc argument as it shadows a global.
10556 * src/scan-gram.l: Remove stray comma that prevents boundary_set
10557 invocation.
10558
10559 * src/.cvsignore: Add scan-code.c.
10560
2346344a
AD
105612006-06-07 Akim Demaille <akim@epita.fr>
10562
10563 * src/scan-gram.l: Move the "add a trailing ; to actions" code
10564 to...
10565 * src/scan-code.l: here.
10566 * tests/input.at (Torturing the Scanner): Fix another location
10567 error.
10568
4862bdfd
AD
105692006-06-07 Akim Demaille <akim@epita.fr>
10570
10571 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
10572
e9071366
AD
105732006-06-06 Akim Demaille <akim@epita.fr>
10574
10575 Extract the parsing of user actions from the grammar scanner.
10576 As a consequence, the relation between the grammar scanner and
10577 parser is much simpler. We can also split "composite tokens" back
10578 into simple tokens.
10579 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
10580 * src/scan-gram.l (add_column_width, adjust_location): Move to and
10581 rename as...
10582 * src/location.h, src/location.c (add_column_width)
10583 (location_compute): these.
10584 Fix the column count: the initial column is 0.
10585 (location_print): Be robust to ending column being 0.
10586 * src/location.h (boundary_set): New.
10587 * src/main.c: Adjust to scanner_free being renamed as
10588 gram_scanner_free.
10589 * src/output.c: Include scan-code.h.
10590 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
10591 Use boundary_set.
10592 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
10593 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
10594 which is now, again, a separate token.
10595 Adjust all dependencies.
10596 Whereever actions with $ and @ are used, use translate_code.
10597 (action): Remove this nonterminal which is now useless.
10598 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
10599 (grammar_current_rule_action_append): Use translate_code.
10600 (packgram): Bound check ruleno, itemno, and rule_length.
10601 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
10602 (last_string, last_braced_code_loc, max_left_semantic_context)
10603 (scanner_initialize, scanner_free, scanner_last_string_free)
10604 (gram_out, gram_lineno, YY_DECL_): Move to...
10605 * src/scan-gram.h: this new file.
10606 (YY_DECL): Rename as...
10607 (GRAM_DECL): this.
10608 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10609 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10610 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10611 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10612 Move these declarations, and...
10613 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10614 these to...
10615 * src/flex-scanner.h: this new file.
10616 * src/scan-gram.l (rule_length, rule_length_overflow)
10617 (increment_rule_length): Remove.
10618 (last_braced_code_loc): Rename as...
10619 (gram_last_braced_code_loc): this.
10620 Adjust to the changes of the parser.
10621 Move all the handling of $ and @ into...
10622 * src/scan-code.l: here.
10623 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10624 (handle_action_dollar, handle_action_at): Move to...
10625 * src/scan-code.l: here.
10626 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10627 scan-code.h, scan-code-c.c, scan-gram.h.
10628 (EXTRA_bison_SOURCES): Add scan-code.l.
10629 (BUILT_SOURCES): Add scan-code.c.
10630 (yacc): Be robust to white spaces.
10631
10632 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10633 * tests/regression.at: Adjust the column numbers.
10634 * tests/regression.at: Adjust the error message.
7891a7c4 10635
184e42f0
JD
106362006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10637
10638 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10639 Use Akim's wording from
10640 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10641
7891a7c4
JD
106422006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10643
10644 Between Bison releases, manually append `+' to the previous Bison
10645 release number, and use that as a signal to automatically print the
10646 ChangeLog's CVS Id keyword from --version. Discussed starting at
10647 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10648 * ChangeLog: Add Id header.
10649 * configure.ac (AC_INIT): Append `+' to `2.3'.
10650 * src/.cvsignore: Add revision.c.
10651 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10652 (BUILT_SOURCES): Add revision.c.
10653 (revision.c): New target rule. This file defines a new global variable
10654 named revision. It initializes it with either the Id from ChangeLog
10655 or, if VERSION doesn't contain `+', with the empty string.
10656 * src/getargs.c (version): Print the value of revision.
10657 * src/revision.h: Extern revision.
10658
4ad3ed84
PE
106592006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10660
10661 * NEWS: Version 2.3.
10662 * configure.ac (AC_INIT): Likewise.
10663
02103984
PE
106642006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10665
10666 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10667 with no arguments, not as an object-like macro. This is for
10668 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10669 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10670 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10671 Document this.
10672
2c08afa5
JD
106732006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10674
10675 * src/getargs.c (usage): Back out yesterday's modification of the
10676 --help output so that we don't have to wait for translation before
10677 releasing 2.3.
10678
6077da58
PE
106792006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10680
10681 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10682 Problem reported by Akim Demaille.
10683
2a26b6c2
JD
106842006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10685
10686 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10687
aefef0d6
PE
106882006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10689
10690 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10691 generated source code. Problem reported by Frans Englich in
10692 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10693
fcd8e201
PE
106942006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10695
10696 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10697 shell, not within 'make', so that 'make' by an ordinary builder
10698 (using GNU make) does not worry about configuring gzip. This also
10699 works around a bug reported independently by Keith Thompson and by
10700 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10701 stderr rather than stdout, messing up the build logs.
10702
7b5cdcbd
JD
107032006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10704
10705 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10706 to make sure that YYID will never be unused. This fixes a 'make
10707 maintainer-check' failure caused by the recent changes to the 'Trivial
10708 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10709 not used.
10710 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10711
5ad0a449
JD
107122006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10713
10714 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10715 state before an empty RHS is always resolved here. Only the location
10716 of that state is guaranteed to be resolved, and that's enough. This
10717 fixes the remaining bug reported by Derek M. Jones in
10718 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10719 * tests/glr-regression.at (Uninitialized location when reporting
10720 ambiguity): Test the above case.
10721 Also, the embedded comments in this test case claim it checks the case
10722 of an empty RHS that has inherited the initial location. However, the
10723 corresponding LHS was already resolved, so yyresolveLocations didn't
10724 actually have reason to modify it. Fix this by forcing
10725 nondeterministic operation at the beginning of the parse.
10726
50cce58e
PE
107272006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10728
10729 * data/c.m4 (b4_yy_symbol_print_generate):
10730 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10731 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10732 of the bugs reported today by Derek M Jones in
10733 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10734 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10735 defined to be a type name without parens or brackets.
10736 (Location Type): Similarly for YYLTYPE.
10737 * tests/regression.at (Trivial grammars): Put in a test for this
10738 bug that will be caught by 'make maintainer-check' (though not,
10739 alas, by 'make check' unless your compiler is picky).
10740
ab8d9dc5
PE
107412006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10742
0d2c8934 10743 * NEWS: Version 2.2.
ab8d9dc5
PE
10744 * configure.ac (AC_INIT): Likewise.
10745
9138c575
JD
107462006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10747
10748 * data/glr.c (yyreportTree): Make room in yystates for the state
10749 preceding the RHS. This fixes the segmentation fault reported by Derek
10750 M. Jones in
10751 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10752 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10753 to the user. Reported for yyreportTree by Derek M. Jones later in the
10754 same thread.
10755 * THANKS: Add Derek M. Jones.
10756 Update my email address.
10757 Fix typo in Steve Murphy's name.
10758
276f48df
PE
107592006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10760
d6645148
PE
10761 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10762 checking against YYLAST that caused the parser to miss a potential
10763 alternative in its diagnostic.
10764 Problem reported by Maria Jose Moron Fernandez in
10765 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10766 * data/lalr1.cc (yysyntax_error_): Likewise.
10767 * data/yacc.c (yysyntax_error): Likewise.
10768 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10769 tokens, in case we run into an older C compiler.
10770 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10771 Use them to check for the off-by-one error fixed above.
10772
276f48df
PE
10773 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10774 YYSIZE_T, not size_t.
10775 * tests/regression.at (Trivial grammars): New test, to catch
10776 the error fixed by the above patch.
10777
cd8b5791
AD
107782006-05-14 Akim Demaille <akim@lrde.epita.fr>
10779
10780 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10781 scheme.
10782 Reported by Steve Murphy.
10783
34376418
AD
107842006-05-14 Akim Demaille <akim@lrde.epita.fr>
10785
10786 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10787 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10788
327afc7c
AD
107892006-05-14 Akim Demaille <akim@lrde.epita.fr>
10790
10791 Implement --trace=m4.
10792 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10793 * src/output.c (output_skeleton): When set, pass -dV to m4.
10794
10795 Factor the handling of flags in m4.
10796 * src/output.c (prepare): Rename the muscle names debug, defines,
10797 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10798 * data/c.m4: Adjust.
10799 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10800 Use b4_define_flag_if to define other b4_FLAG_if macros.
10801 (b4_location_if): As a consequence, rename as...
10802 (b4_locations_if): this, for consistency.
10803 Adjust all the skeletons.
10804
ba9ecd19
AD
108052006-05-14 Akim Demaille <akim@lrde.epita.fr>
10806
10807 * etc/bench.pm: Shorten bench names.
10808
4e83ea15
AD
108092006-05-14 Akim Demaille <akim@lrde.epita.fr>
10810
10811 * src/output.h, src/output.c (error_verbose): Move to...
10812 * src/getargs.h, src/getargs.c: here.
10813 Sort the flags.
10814 Adjust dependencies.
10815
6e93d810
PE
108162006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10817
10818 * data/c.m4 (b4_copyright): Put the special exception for Bison
10819 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
10820 uses changed. Suggested by Akim Demaille. Also, wrap the
10821 copyright notice, in case it is longer than 80 columns. Replace
10822 comma by newline after title.
6e93d810 10823
eaea13f5
PE
108242006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10825
10826 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10827 incompatibility, not a bug. Mention that it wasn't fixed as of
10828 flex 2.5.33.
10829
3cf084ec
AD
108302006-05-11 Akim Demaille <akim@lrde.epita.fr>
10831
10832 * examples/extexi: Enforce the precedence of concatenation over
10833 >>.
0a9f1c7d 10834 Reported by Tommy Nordgren.
3cf084ec 10835
32c96bd7
AD
108362006-05-11 Akim Demaille <akim@lrde.epita.fr>
10837
10838 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10839 with the member "token".
f94705b2 10840 Reported by Martin Nylin.
32c96bd7 10841
eaea13f5
PE
108422006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10843
10844 * data/glr.c: Switch to Bison 2.2 special-exception language in
10845 the copyright notice. Use more-regular format for titles and
10846 copyright notices.
10847 * data/glr.cc: Likewise.
10848 * data/location.cc: Likewise.
10849 * data/yacc.cc: Likewise.
10850 * doc/bison.texinfo (Conditions): Document this.
10851 * NEWS: likewise. Upgrade version to 2.2.
10852
6e2d1146
AD
108532006-04-27 Akim Demaille <akim@lrde.epita.fr>
10854
10855 * data/glr.cc: Remove dead code.
10856
47671055
PE
108572006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10858
10859 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10860 that variable and the line breaks the bootstrap. Problem reported
10861 by Juan M. Guerrero.
10862
ed2e6384
AD
108632006-04-24 Akim Demaille <akim@lrde.epita.fr>
10864
10865 * doc/bison.texinfo (Multiple start-symbols): New.
10866
3cedc2dc
AD
108672006-04-24 Akim Demaille <akim@lrde.epita.fr>
10868
10869 * etc/README, etc/bench.pl: New.
10870
b2ddc3f3
AD
108712006-04-03 Akim Demaille <akim@lrde.epita.fr>
10872
10873 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10874 rule.
10875 Reported by Mickael Labau.
10876 * tests/input.at (Torturing the Scanner): Test it.
10877
91e3ac9a
PE
108782006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10879
10880 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10881 Problem reported by Bob Rossi.
10882
108832006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10884
10885 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10886 and didn't really work.
10887 For the index, use @ifnotinfo, not @iftex.
10888 Minor cleanups of spacing and terminology.
10889
5cf61e93
AD
108902006-03-12 Akim Demaille <akim@lrde.epita.fr>
10891
10892 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10893 of AT_NAME_PREFIX when %name-prefix is not used.
10894
aa08666d
AD
108952006-03-12 Akim Demaille <akim@lrde.epita.fr>
10896
10897 Apply --prefix to C++ skeletons too: they change the namespace.
10898 The test suite already exercize these cases.
10899 * data/c++.m4 (b4_namespace): New.
10900 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10901 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10902 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10903 * doc/bison.texinfo: Document it.
10904 (Option Cross Key): Use @multitable in all formats. It looks
10905 nicer, even in TeX outputs.
10906 (Rules): Use the same code whatever the output type is.
10907 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10908 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10909 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 10910
45567173
AD
109112006-03-10 Akim Demaille <akim@lrde.epita.fr>
10912
10913 * TODO: Remove dead items.
10914
e9d8f881 109152006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
10916
10917 * doc/FAQ: Remove, merged into...
10918 * doc/bison.texinfo (FAQ): this.
10919 * doc/Makefile.am (EXTRA_DIST): Adjust.
10920
c095d689
AD
109212006-03-10 Akim Demaille <akim@lrde.epita.fr>
10922
10923 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10924 even if empty.
10925 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10926 * doc/bison.texinfo (Calc++ Scanner): Use it.
10927
6e0f8287
PE
109282006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10929
10930 Fix two nits reported by twlevo, plus one more that I discovered.
10931
10932 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10933 this is the usual Bison style.
10934 * src/location.h (location_print): Likewise.
10935
10936 * src/reader.h (token_name): Likewise.
10937
d6b771c3
PE
109382006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10939
10940 Fix some nits reported by twlevo.
10941 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10942 and "POSIX". Use more-modern syntax for URLs. Mention C++
10943 and ask for Java. Don't hardwire OS version numbers. Add
10944 copyright notice.
10945 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10946 * src/conflicts.c (solved_conflicts_obstack): Now static.
10947
1e137b71
JD
109482006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10949
10950 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10951 page. Say "you can use it" not "you may use it" as on the web page;
10952 we're describing capabilities not granting permission.
10953
73f2e47e
PE
109542006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10955
6d05403d
PE
10956 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10957 shadowing warnings. Use usual patter for iterating through RHS.
10958 * tests/glr-regression.at
10959 (Uninitialized location when reporting ambiguity):
10960 Modify yylex so that it uses its argument, rather than trying
10961 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10962 const char -> char const.
10963
73f2e47e
PE
10964 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10965 Don't use tabs inside commands; it messes up 'ps'.
10966 Problem reported by twlevo.
10967
8710fc41
JD
109682006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10969
10970 * tests/glr-regression.at (Uninitialized location when reporting
10971 ambiguity): New test case.
10972 * data/glr.c (yyresolveLocations): New function, which uses
10973 YYLLOC_DEFAULT.
10974 (yyresolveValue): Invoke yyresolveLocations before reporting an
10975 ambiguity.
10976 * doc/bison.texinfo (Default Action for Locations): Note
10977 YYLLOC_DEFAULT's usage for ambiguity locations.
10978 (GLR Semantic Actions): Cross-reference those notes.
10979
ae952af2
JD
109802006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10981
10982 * tests/glr-regression.at (Leaked semantic values when reporting
10983 ambiguity): Remove unnecessary union and type declarations.
10984 (Leaked lookahead after nondeterministic parse syntax error): New test
10985 case.
10986 * data/glr.c (yyparse): Check for zero stacks remaining before
10987 attempting to shift the lookahead so that you don't lose it.
10988
35ee866a
JD
109892006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10990
10991 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10992 * tests/glr-regression.at (Leaked semantic values when reporting
10993 ambiguity): New test case.
10994 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10995 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10996 now unnecessary yystackp parameter.
10997 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10998 destructors can be called.
10999
11000 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
11001 in existing testcases.
11002
520181ab
JD
110032006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
11004
11005 Don't leak semantic values for parent RHS when a user action cuts the
11006 parser, and clean up related code a bit.
11007 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
11008 cuts parse): Rename to...
11009 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
11010 for leaked parent RHS values.
11011 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
11012 between an unresolved state (non-empty chain of semantic options) and
11013 an incomplete one (signaled by an empty chain).
ae952af2 11014 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
11015 successfully or unsuccessfully resolved yyGLRState to...
11016 (yyresolveValue): ... here so that yyresolveValue always leaves a
11017 yyGLRState with consistent data and thus is easier to understand.
11018 Remove the yyvalp and yylocp parameters since they are always just
11019 taken from the yys parameter. When reporting a discarded merged value
11020 in debugging output, note that it is incompletely merged. Document the
11021 interface.
11022 (yyresolveAction): If resolving any of the RHS states fails, destroy
11023 them all rather than leaking them. Thus, as long as user actions are
11024 written to clean up the RHS correctly, yyresolveAction always cleans up
11025 the RHS of a semantic option. Document the interface.
11026
18d9185c
PE
110272006-02-27 Paul Eggert <eggert@cs.ucla.edu>
11028
11029 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
11030 led to a segmentation fault in GNU Pascal. Problem reported
11031 by Waldek Hebisch.
11032
841a7737
JD
110332006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
11034
11035 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
11036 mid-rule action inside a nonterminal symbol in order to declare a
11037 destructor for its semantic value.
11038
fc3f467f
PE
110392006-02-16 Paul Eggert <eggert@cs.ucla.edu>
11040
11041 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
11042 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
11043 __cplusplus && ! defined _STDLIB_H && !
11044 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
11045 defined free))]: Include <stdlib.h> rather than rolling our own
11046 declarations of malloc and free, to avoid problems with
11047 incompatible declarations (using 'throw') C++'s stdlib.h. This
11048 should fix Debian bug 340012
11049 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
11050 reported by Guillaume Melquiond.
11051
a3af26dd
PE
110522006-02-13 Paul Eggert <eggert@cs.ucla.edu>
11053
4d7bc38c
PE
11054 * NEWS: Clarify symbols versus types in unused-value warnings.
11055
a3af26dd
PE
11056 * configure.ac (AC_INIT): Bump version number.
11057
4e26c69e
PE
110582006-02-13 Paul Eggert <eggert@cs.ucla.edu>
11059
11060 * NEWS: Version 2.1a.
11061 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
11062 since C99 requires this.
11063
498e897c
PE
110642006-02-11 Paul Eggert <eggert@cs.ucla.edu>
11065
11066 * m4/c-working.m4: New file.
11067 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
11068
57bb17ca
PE
110692006-02-10 Paul Eggert <eggert@cs.ucla.edu>
11070
11071 * Makefile.maint: Merge from coreutils.
11072
0be105dc
PE
110732006-02-09 Paul Eggert <eggert@cs.ucla.edu>
11074
11075 More portability fixes for problems summarized by Nelson H. F. Beebe.
11076
11077 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
11078 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
11079 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
11080 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
11081 messes up because C++ code is compiled in 32-bit mode but linked
11082 in 64-bit mode.
11083
6fc0c024
PE
110842006-02-08 Paul Eggert <eggert@cs.ucla.edu>
11085
11086 More portability fixes for problems summarized by Nelson H. F. Beebe.
11087
7870f699
PE
11088 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
11089 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
11090
6fc0c024
PE
11091 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
11092 nodist_PROGRAMS, since we don't need to actually compile the
11093 example if we're just doing a plain 'make'. This avoids bothering
11094 the installer unnecessarily about problems due to weird C++
11095 compilers.
11096
fe6c2fde
PE
110972006-02-06 Paul Eggert <eggert@cs.ucla.edu>
11098
11099 More portability fixes for problems summarized by Nelson H. F. Beebe.
11100
11101 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
11102 than #include "...", and compile with -I'.'. The old method was
11103 not portable, according to Posix and the C standard, and it does
11104 not work with Sun C 5.7, where previous #line directives affect
11105 the working directory used in later #include "..." directives.
11106
927b425b
JMG
111072006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11108
11109 Various DJGGP specific issues in /djgpp
11110
d9735e9e
PE
111112006-02-02 Paul Eggert <eggert@cs.ucla.edu>
11112
11113 More portability fixes for problems summarized by Nelson H. F. Beebe.
11114
11115 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
11116 '#include <map>' works and that you can apply ++ to iterators.
11117
5a6755af
PE
111182006-02-01 Paul Eggert <eggert@cs.ucla.edu>
11119
67a0dc4f
PE
11120 Work around portability problems summarized by Nelson H. F. Beebe in
11121 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
11122
8c86f0ef
PE
11123 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
11124 that '#include <string>' works.
11125
de35dd59
PE
11126 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
11127 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
11128 "warning: sorry: semantics of inline function static data `const
11129 unsigned char translate_table[262]' are wrong (you'll wind up with
11130 multiple copies)".
11131
67a0dc4f
PE
11132 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
11133 or, xor to not_, and_, or_, and xor_, respectively. This works
11134 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
11135 random system header somewhere that includes the equivalent of
11136 <iso646.h>.
11137
5a6755af
PE
11138 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
11139 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 11140 Suite Version 2.0.
5a6755af 11141
3f001415
JD
111422006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
11143
11144 During deterministic GLR operation, user actions should be able to
11145 influence the parse by changing yychar. To make this easier to fix and
11146 to make glr.c easier to evolve in general, don't maintain yytoken in
11147 parallel with yychar; just compute yytoken when needed.
11148 * tests/glr-regression.at (Incorrect lookahead during deterministic
11149 GLR): Check that setting yychar in a user action has the intended
11150 effect.
11151 * data/glr.c (yyGLRStack): Remove yytokenp member.
11152 (yyclearin): Don't set *yytokenp.
11153 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
11154 yychar rather than *yytokenp to determine the current lookahead.
11155 Compute yytoken locally when needed.
11156 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
11157 point to.
11158
11159 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
11160 after `--report' documentation.
11161
e2a8c0f5
PE
111622006-01-30 Paul Eggert <eggert@cs.ucla.edu>
11163
11164 * src/parse-gram.y (grammar_declaration): Location of printer
11165 symbol is @1, not list->location. Bug reported by twlevo.
11166 * tests/input.at (Incompatible Aliases): Adjust to above change.
11167
6b702268
PE
111682006-01-29 Paul Eggert <eggert@cs.ucla.edu>
11169
27622431
PE
11170 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
11171 all the test at once. This makes the output easier to read in the
11172 normal case.
11173
6b702268
PE
11174 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
11175 got from <http://bro-ids.org/download.html>. The bug is that
11176 when two actions appeared in succession, the second one was
11177 scanned before the first one was added to the grammar rule
11178 as a midrule action. Bison then output the incorrect warning
11179 "parse.y:905.17-906.36: warning: unused value: $3".
11180 * src/parse-gram.y (BRACED_CODE, action): These are no longer
11181 associated with a value.
11182 (rhs): Don't invoke grammar_current_rule_action_append.
11183 (action): Invoke it here instead.
11184 * src/reader.c (grammar_midrule_action): Now extern.
11185 (grammar_current_rule_action_append): Don't invoke
11186 grammar_midrule_action; that is now the scanner's job.
11187 * src/reader.h (last_string, last_braced_code_loc):
11188 (grammar_midrule_action): New decls.
11189 * src/scan-gram.l (last_string): Now extern, sigh.
11190 (last_braced_code_loc): New extern variable.
11191 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
11192 rule already has an action.
11193 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
11194 * tests/input.at (AT_CHECK_UNUSED_VALUES):
11195 Add some tests to check that the above changes fixed the bug.
11196
d40ba6c2
PE
111972006-01-27 Paul Eggert <eggert@cs.ucla.edu>
11198
11199 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
11200 All used changed. Check whether the symbol has a destructor,
11201 not whether it is typed.
11202 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
11203 that the values are still reported as unused. All line numbers
11204 adjusted.
11205
401aace6
PE
112062006-01-23 Paul Eggert <eggert@cs.ucla.edu>
11207
11208 Work around a bug in bro 0.8, which underparenthesizes its
11209 definition of YYLLOC_DEFAULT.
11210 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
11211 their arguments.
11212 * data/lalr1.cc: Likewise.
11213 * data/yacc.cc: Likewise.
11214
06f01bc4
PE
112152006-01-22 Paul Eggert <eggert@cs.ucla.edu>
11216
401aace6
PE
11217 Work around a bug in Pike 7.0, and give the Pike folks a
11218 better way to override the usual int widths.
11219 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
11220 user can override the types.
11221 (short): #undef, to work around a bug in Pike 7.0.
11222 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
11223 (union yyalloc.yyss): Use yytype_int16 rather than short.
11224 All uses changed.
11225 (yysigned_char): Remove.
11226 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
11227 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
11228 * tests/regression.at (Web2c Actions): Adjust to above changes.
11229
11230 * src/reader.c (check_and_convert_grammar): New function.
11231 (reader): Close the input file even if something went wrong during
11232 parsing. Minor file descriptor leak reported by twlevo.
11233
06f01bc4
PE
11234 * src/assoc.c (assoc_to_string): Use a default: abort (); case
11235 to pacify gcc -Wswitch-default.
11236 * src/scan-gram.l (adjust_location): Use a default: break; case
11237 to pacify gcc -Wswitch-default.
11238 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
11239 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11240 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11241 Move these decls to scan-skel.l, since they don't need to be
11242 visible elsewhere.
11243 * src/scan-skel.l: Accept the above decls.
11244 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
11245 is used.
11246
02650b7f
PE
112472006-01-21 Paul Eggert <eggert@cs.ucla.edu>
11248
11249 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
11250 since we don't want to insist on a version number at the start
11251 of the changelog every time.
11252 * Makefile.maint: Sync from coreutils a bit better.
11253 (sc_trailing_blank): Renamed from sc_trailing_space.
11254 All uses changed.
11255 (sc_no_if_have_config_h, sc_require_config_h):
11256 (sc_prohibit_assert_without_use): New rules.
11257 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
11258 (sc_dd_max_sym_length): Fix leading spaces in rule.
11259 (sc_system_h_headers): Prefix with @.
11260 (sc_useless_cpp_parens, m4-check): Output line numbers.
11261 (changelog-check): Allow version only in head.
11262 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
11263 satisfy new Makefile.maint rule.
11264 * data/glr.c: Likewise.
11265 * data/glr.cc: Likewise.
11266 * data/lalr1.cc: Likewise.
11267 * data/yacc.c: Likewise.
11268 * lib/ebitsetv.c: Likewise.
11269 * lib/lbitset.c: Likewise.
11270 * lib/subpipe.c: Likewise.
11271 * lib/timevar.c: Likewise.
11272 * src/system.h: Likewise.
11273 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
11274 * djgpp/Makefile.maint: Add copyright notice.
11275 * djgpp/README.in: Likewise.
11276 * djgpp/config.bat: Likewise.
11277 * djgpp/config.site: Likewise.
11278 * djgpp/config_h.sed: Likewise.
11279 * djgpp/djunpack.bat: Likewise.
11280 * djgpp/config.sed: Fix copyright notice to match standard format.
11281 * djgpp/subpipe.h: Likewise.
11282 * lib/bitsetv-print.c: Likewise.
11283 * lib/bitsetv.c: Likewise.
11284 * lib/subpipe.h: Likewise.
11285 * lib/timevar.c: Likewise.
11286 * lib/timevar.h: Likewise.
11287 * djgpp/subpipe.c: Use standard recipe for config.h.
11288 * lib/abitset.c: Likewise.
11289 * lib/bitset.c: Likewise.
11290 * lib/bitset_stats.c: Likewise.
11291 * lib/bitsetv-print.c: Likewise.
11292 * lib/bitsetv.c: Likewise.
11293 * lib/ebitsetv.c: Likewise.
11294 * lib/get-errno.c: Likewise.
11295 * lib/lbitset.c: Likewise.
11296 * lib/subpipe.c: Likewise.
11297 * lib/timevar.c: Likewise.
11298 * lib/vbitset.c: Likewise.
11299 * tests/local.at: Likewise.
11300 * src/scan-gram.l: Don't include verify.h, since system.h does
11301 that for us.
11302 * .x-sc_require_config_h: New file.
11303 * .x-sc_unmarked_diagnostics: New file.
11304
287c78f6
PE
113052006-01-20 Paul Eggert <eggert@cs.ucla.edu>
11306
287c78f6
PE
11307 Be a bit more systematic about using 'abort'.
11308 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
11309 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
11310 Put 'default: abort ();' before some other case, to satisfy older
11311 pedantic compilers.
11312 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11313 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
11314 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
11315 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
11316 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
11317 (get_decision_str, get_orientation_str, get_node_alignment_str):
11318 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
11319 (get_linestyle_str, get_arrowstyle_str): Likewise.
11320 * src/conflicts.c (resolve_sr_conflict):
11321 Use a default case rather than one for the one remaining enum
11322 value, to catch invalid enum values as well.
11323 * src/lalr.c (set_goto_map, map_goto):
11324 Prefer "assert (FOO);" to "if (!FOO) abort ();".
11325 * src/nullable.c (nullable_compute, token_definitions_output):
11326 Likewise.
11327 * src/reader.c (packgram, reader): Likewise.
11328 * src/state.c (transitions_to, state_new, state_reduction_find):
11329 Likewise.
11330 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
11331 (symbol_pack): Likewise.
11332 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
11333 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
11334 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
11335 * src/system.h: Don't include <assert.h>.
11336 (assert): New macro.
11337
11338 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
11339 (Destructor Decl, Parser Function, Pure Calling):
11340 Describe rules for braces inside C code more carefully.
287c78f6 11341
c66dfadd
PE
113422006-01-19 Paul Eggert <eggert@cs.ucla.edu>
11343
c21493b8
PE
11344 Fix some porting glitches found by Nelson H. F. Beebe.
11345 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
11346 compilers that don't understand that abort () does not return.
11347 * src/state.c (transitions_to): Likewise.
11348 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
11349 that '#include <cstdlib>' works.
11350 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
11351 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
11352 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
11353 for the benefit of some pre-C99 compilers.
11354
b6e3facf
PE
11355 * bootstrap: Undo changes to gnulib files that autoreconf made.
11356
c66dfadd
PE
11357 Minor fixups to get 'make maintainer-check' to work.
11358 * configure.ac: Don't use -Wnested-externs, as it's incompatible
11359 with the new verify.h implementation.
11360 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
11361 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
11362 * data/yacc.c (YYUSE): Likewise.
11363 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
11364 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
11365 * src/parse-gram.y (declaration): Don't pass a string constant
11366 to a function that expects char *, since GCC might complain
11367 about the constant value.
11368 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
11369 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
11370 before #defining them.
11371 * tests/glr-regression.at
11372 (Incorrectly initialized location for empty right-hand side in GLR):
11373 In yyerror, use the msg arg.
11374 (Corrupted semantic options if user action cuts parse):
11375 (Incorrect lookahead during deterministic GLR):
11376 (Incorrect lookahead during nondeterministic GLR):
11377 Don't name a local var 'index'; it shadows string.h's 'index'.
11378
ed94ef2a
AD
113792006-01-19 Akim Demaille <akim@epita.fr>
11380
11381 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
11382 location, not just parts of it.
11383
e9ad4aec
PE
113842006-01-18 Paul Eggert <eggert@cs.ucla.edu>
11385
d6ca7905
PE
11386 * NEWS: Document the fact that multiple %unions are now allowed.
11387 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
11388 * TODO: This feature is now implemented, so remove it from
11389 the wishlist.
d6ca7905 11390
ef1b70e0
PE
11391 * Makefile.maint: Merge with coreutils Makefile.maint.
11392 (CVS_LIST): Use build-aux version if available.
11393 (VERSION_REGEXP): New macro.
11394 (syntax-check-rules): Add sc_no_if_have_config_h,
11395 sc_prohibit_assert_without_use, sc_require_config_h,
11396 sc_useless_cpp_parens.
11397 (sc_obsolete_symbols): Check for O_NDELAY.
11398 (sc_dd_max_sym_length): Track coreutils.
11399 (sc_unmarked_diagnostics): Look in all files, not just *.c.
11400 (sc_useless_cpp_parens): New rule.
11401 (news-date-check): Look for version or today's date.
11402 (changelog-check): Don't require version number near head.
11403 (copyright-check): Use current year instead of hardwiring 2005.
11404 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
11405 (announcement): Add --gpg-key-ID.
11406
11407 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
11408 with "file system".
11409
2073ce56 11410 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
11411 array. Problem reported by twlevo.
11412 * src/reader.c (packgram): Prepend a new sentinel before ritem.
11413 * src/lalr.c (build_relations): Rely on new sentinel.
11414 * src/gram.c (gram_free): Adjust to new sentinel.
11415
b7691f15
JD
114162006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
11417
11418 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
11419 yylookaheadNeeds. All uses updated.
11420 (yysplitStack): Rename local yynewLookaheadStatuses to
11421 yynewLookaheadNeeds.
11422 * data/glr-regression.at (Incorrect lookahead during nondeterministic
11423 GLR): In comments, change `lookahead status' to `lookahead need'.
11424
ddee1b06
PH
114252006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11426
11427 * data/glr.c (yysplitStack): A little stylistic rewrite.
11428
12f4614d
PH
114292006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11430
11431 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
11432
32c29292
JD
114332006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
11434
11435 * doc/bison.texinfo: Fix some typos.
11436 (GLR Semantic Actions): New subsection discussing special
11437 considerations because GLR semantic actions might be deferred.
11438 (Actions): Mention look-ahead usage of yylval.
11439 (Actions and Locations): Mention look-ahead usage of yylloc.
11440 (Special Features for Use in Actions): Add YYEOF entry and mention it
11441 in the yychar entry.
11442 In the yychar entry, remove mention of the local yychar case (pure
11443 parser) since this is irrelevant information when writing semantic
148d66d8 11444 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
11445 yychar is otherwise described as an external variable.
11446 In the yychar entry, don't call it the `current' look-ahead since it
11447 isn't when semantic actions are deferred.
11448 In the yychar and yyclearin entries, add note about deferred semantic
11449 actions.
11450 Add yylloc and yylval entries discussing look-ahead usage.
11451 (Look-Ahead Tokens): When discussing yychar, don't call it the
11452 `current' look-ahead, and do mention yylval and yylloc.
11453 (Error Recovery): Cross-reference `Action Features' when mentioning
11454 yyclearin.
148d66d8 11455 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
11456 look-ahead.
11457 In the yylloc and yylval entries, mention look-ahead usage.
11458
de366a2f 114592006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
11460
11461 * tests/glr-regression.at: Update copyright year to 2006.
11462
bf70fa87
JD
114632006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11464
11465 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
11466 use during nondeterministic operation to track which stacks have
11467 actually needed the current lookahead.
11468 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
11469 Allocate, deallocate, resize, and otherwise shuffle space for
11470 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
11471 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
11472 appropriately during nondeterministic operation.
11473 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
11474 members to store the current lookahead to be used by the deferred
11475 user action.
11476 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
11477 from which the RHS is taken. Set the lookahead members of the new
11478 yySemanticOption according to the lookahead status for stack yyk.
11479 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
11480 yyaddDeferredAction.
11481 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
11482 members of yySemanticOption before invoking yyuserAction, and then set
11483 them back to their current values afterward.
11484 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
11485 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
11486 * tests/glr-regression.at: Remove `.' from the ends of recent test case
11487 titles for consistency.
11488 (Leaked merged semantic value if user action cuts parse): In order to
11489 suppress lint warnings, use arguments in merge function, and assign
11490 char value < 128 in main.
11491 (Incorrect lookahead during deterministic GLR): New test case.
11492 (Incorrect lookahead during nondeterministic GLR): New test case.
11493
05449a2c
JD
114942006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11495
de366a2f 11496 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
11497 !yyvaluep as signal that no semantic value is available to print.
11498 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
11499 to print a semantic value.
11500
4158e0a1 115012006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 11502
4158e0a1
JD
11503 * tests/glr-regression.at: For consistency with my newer test cases,
11504 don't thank myself.
11505
d659304d
JD
115062006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
11507
11508 * data/glr.c (yyresolveValue): When merging semantic options, if at
11509 least one user action succeeds but a later one cuts the parse, then
11510 destroy the semantic value before returning rather than leaking it.
11511 (yyresolveStates): If a user action cuts the parse and thus
11512 yyresolveValue fails, ignore the (unset) semantic value rather than
11513 corrupting the yyGLRState, and empty the semantic options list since
11514 the user actions should have called all necessary destructors.
11515 Simplify code with YYCHK.
11516 * tests/glr-regression.at (Corrupted semantic options if user action
11517 cuts parse): New test case.
11518 (Undesirable destructors if user action cuts parse): New test case.
11519 Before applying any of this patch, this test case never actually failed
11520 for me... but only because the corrupted semantic options usually
11521 masked this bug.
11522 (Leaked merged semantic value if user action cuts parse): New test
11523 case.
11524
6ec2c0f2
AD
115252006-01-05 Akim Demaille <akim@epita.fr>
11526
11527 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
11528
1b9c21fb
PE
115292006-01-04 Paul Eggert <eggert@cs.ucla.edu>
11530
11531 * data/c.m4 (b4_c_modern): New macro, with a new provision for
11532 _MSC_VER. Problem reported by Cenzato Marco.
11533 (b4_c_function_def): Use it.
11534 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
11535 b4_c_modern.
11536 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
11537 than rolling our own.
11538
84866159
AD
115392006-01-04 Akim Demaille <akim@epita.fr>
11540
11541 Also warn about non-used mid-rule values.
11542 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
11543 member.
11544 (symbol_list_new): Adjust.
11545 * src/reader.c (symbol_typed_p): New.
11546 (grammar_rule_check): Use it.
11547 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
11548 Check its rule.
11549 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
11550 Use it.
11551 * tests/actions.at (Exotic Dollars): Adjust.
11552
378f4bd8
AD
115532006-01-04 Akim Demaille <akim@epita.fr>
11554
11555 * src/reader.c (grammar_midrule_action): If $$ is set in a
11556 mid-rule, move the `used' bit to its lhs.
11557 * tests/input.at (Unused values): New.
11558 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
11559
e2a21b6f
PE
115602006-01-03 Paul Eggert <eggert@cs.ucla.edu>
11561
54662697
PE
11562 * doc/bison.texinfo (Bison Options): Say more accurately what
11563 --yacc does.
11564 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
11565 about declarations in the grammar when in Yacc mode, as POSIX does
11566 not require a diagnostic when the grammar uses extensions.
11567
11568 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
11569
073f9288
PE
11570 Warn about dubious constructions like "%token T T".
11571 Reported by twlevo.
11572 * src/symtab.h (struct symbol.declared): New member.
11573 * src/symtab.c (symbol_new): Initialize it to false.
11574 (symbol_class_set): New arg DECLARING, specifying whether
11575 this is a declaration that we want to warn about, if there
11576 is more than one of them. All uses changed.
11577
1221b78a
PE
11578 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
11579 Allow multiple %union directives, whose contents concatenate.
11580 * src/parse-gram.y (grammar_declaration): Likewise.
11581 Use muscle_code_grow, so that we don't need stype_line any more.
11582 All uses changed.
11583
11584 * src/muscle_tab.c (muscle_grow): Fix comment.
11585
e2a21b6f
PE
11586 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
11587 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
11588 Update copyright year to 2006.
11589
8f7e3cf9
AD
115902006-01-03 Akim Demaille <akim@epita.fr>
11591
11592 Have glr.cc pass (some of) the calc.at tests.
11593 * data/glr.cc (b4_parse_param_orig): New.
11594 (b4_parse_param): Improve its definition, and bound it more
11595 clearly in the skeleton.
11596 (b4_epilogue): Append, instead of prepending, in order to keep
11597 #line consistency.
11598 Simplify the generation of auxiliary functions: locations and
11599 purity are mandated.
11600 (b4_global_tokens_and_yystype): Honor it.
11601 * data/location.cc (c++.m4): Don't include it.
11602 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
11603 and AT_SKEL_CC_IF.
11604 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
11605 AT_LALR1_CC_IF.
11606 Be sure to initialize the first position's filename.
11607 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11608 mandated anyway.
11609 (AT_CHECK_CALC_GLR_CC): New.
11610 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11611
3953ed88
AD
116122006-01-02 Akim Demaille <akim@epita.fr>
11613
11614 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11615 c.m4.
0a96ba81 11616 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
11617 * data/glr.cc: Do not include stack.hh.
11618
9ecafbbf
AD
116192006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11620
11621 * data/glr.c: Reformat whitespace with tabs.
11622 (b4_lpure_formals): Remove this unused m4 macro.
11623 * tests/cxx-type.at: Reformat whitespace with tabs.
11624 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11625 since it's a member. Rename type to isNterm for clarity.
11626
c4d497a0
AD
116272005-12-29 Akim <akim@sulaco.local>
11628
11629 Let glr.cc catch up with symbol_value_print.
11630 * data/glr.cc (b4_yysymprint_generate): Replace by...
11631 (b4_yy_symbol_print_generate): this.
11632 (yy_symbol_print, yy_symbol_value_print): Declare them.
11633
4517da37
PE
116342005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11635
11636 * src/location.h (boundary): Note that a line or column equal
11637 to INT_MAX indicates an overflow.
11638 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11639 (rule_length_overflow, increment_rule_length, add_column_width):
11640 New functions.
11641 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11642 (<SC_BRACED_CODE>"}"):
11643 Use increment_rule_length rather than incrementing it by hand.
11644 (adjust_location, handle_syncline): Diagnose overflow.
11645 (handle_action_dollar, handle_action_at):
11646 Fix bug with monstrosities like $-2147483648.
11647 Remove now-unnecessary checks.
11648 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11649 (convert_ucn_to_byte): Verify assumptions.
11650 (handle_syncline): New arg LOC. All callers changed.
11651 Don't store through a value derived from char const * pointer.
11652
11653 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11654 GCC warnings.
11655
e3233bf6
PE
116562005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11657
11658 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11659 Remove unnecessary forward static decls.
11660
8f3596a6
AD
116612005-12-27 Akim Demaille <akim@epita.fr>
11662
11663 * src/reader.c (grammar_current_rule_check): Also check that $$
11664 is used.
11665 Take the rule to check as argument, hence rename as...
11666 (grammar_rule_check): this.
11667 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11668 Rename as...
11669 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11670 (grammar_midrule_action, grammar_symbol_append): Now static.
11671 * tests/torture.at (input): Don't rely on the default action
11672 being always performed.
11673 * tests/calc.at: "Set" $$ even when the action is "cut" with
11674 YYERROR or other.
11675 * tests/actions.at (Exotic Dollars): Instead of using unused
11676 values, check that the warning is issued.
11677
721be13c
PE
116782005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11679
11680 * NEWS: Improve wording for unused-value warnings.
11681
a0af42fc
AD
116822005-12-22 Akim Demaille <akim@epita.fr>
11683
11684 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11685 (b4_yysymprint_generate): Rename as...
11686 (b4_yy_symbol_print_generate): this.
11687 Generate yy_symbol_print instead of yysymprint.
11688 Generate also yy_symbol_value_print, and use it.
11689
affac613
AD
116902005-12-22 Akim Demaille <akim@epita.fr>
11691
721be13c 11692 * NEWS: Warn about unused values.
affac613
AD
11693 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11694 a `used' member.
11695 (symbol_list_n_get, symbol_list_n_used_set): New.
11696 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11697 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11698 * src/reader.c (grammar_current_rule_check): Check that values are
11699 used.
11700 * src/symtab.c (symbol_print): Accept 0.
11701 * tests/existing.at: Remove the type information.
11702 Empty the actions.
11703 Remove useless actions (beware of mid-rule actions: perl -000
11704 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11705 * tests/actions.at (Exotic Dollars): Use unused values.
11706 * tests/calc.at: Likewise.
11707 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11708 Likewise.
11709
11710 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11711 rule_useful_p.
11712
9d9b8b70
PE
117132005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11714
8bb4c753
PE
11715 Undo 2005-12-01 tentative license wording change. The wording is
11716 still being reviewed by the lawyers, and we don't want to wait for
11717 them before publishing a test release. For now, revert to the
11718 previous wording.
11719 * NEWS: Undo 2005-12-01 change.
11720 * data/glr.c: Revert to previous license wording.
11721 * data/glr.cc: Likewise.
11722 * data/lalr1.cc: Likewise.
11723 * data/location.cc: Likewise.
11724 * data/yacc.c: Likewise.
11725
9d9b8b70
PE
11726 * NEWS: Reword %destructor vs YYABORT etc.
11727 * data/glr.c: Use American spacing, for consistency.
11728 * data/glr.cc: Likewise.
11729 * data/lalr1.cc: Likewise.
11730 * data/yacc.c: Likewise.
11731 * data/yacc.c: Reformat comments slightly.
11732 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11733 for consistency. Fix some spelling errors and reword recently-included
11734 text slightly.
11735 * tests/cxx-type.at: Cast results of malloc, for C++.
11736
2c3b392a
AD
117372005-12-21 Joel E. Denny <address@hidden>
11738
11739 * tests/cxx-type.at: Construct a tree, count the parents of shared
11740 nodes, and free each node once and only once. Previously, the memory
11741 for semantic values was leaked instead.
11742
d6cff4dc
AD
117432005-12-21 Joel E. Denny <address@hidden>
11744
11745 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11746 (yylval, yylloc): If pure, #define to yystackp->yyval and
11747 yystackp->yyloc similar to yychar and yynerrs.
11748 (yyparse): If pure, remove local yylval and yylloc. Add local
11749 yystackp to accommodate pure definitions of yylval and yylloc.
11750 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11751 yylvalp and yyllocp to &yylval and &yylloc.
11752 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11753 namespace. Previously, nerrs and char were missing, but lval and lloc
11754 weren't necessary.
11755 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11756 yylvalp and yyllocp parameters since, if pure, these are now always
11757 accessible through yystackp. If not pure, they are still accessible
11758 globally.
11759 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11760 `if (YYID (N))' to pacify lint.
11761
a85284cf
AD
117622005-12-21 Akim Demaille <akim@epita.fr>
11763
11764 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11765 destroy the RHS symbols of a rule.
11766 * data/yacc.c (yylen): Initialize to 0.
11767 Keep its value to the number of items to possibly shift.
11768 In particular, a regular successful parse that ends on YYFINAL by
11769 a (internal) YYACCEPT must not have yylen != 0.
11770 (yyerrorlab, yyreturn): Pop the RHS.
11771 Reorder a bit to emphasize the `shifting' bits of code.
11772 (YYPOPSTACK): Now accept a number of items to pop.
11773 * data/lalr1.cc: Likewise.
11774 * data/glr.c: Formatting changes.
11775 Use goto instead of fall through.
11776 * doc/bison.texinfo (Destructor Decl): Complete.
11777
d508c281
JMG
117782005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11779
11780 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11781 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11782 * djgpp/config.bat: Replace every occurence of the file name
11783 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11784 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11785 * djgpp/config.sed: Replace every occurence of the file name
11786 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11787 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11788 * djgpp/djunpack.bat: DJGPP specific file.
11789 * djgpp/fnchange.lst: DJGPP specific file.
11790 * djgpp/README.in: Add new information about how to unpack the bison
11791 source on MSDOS and other systems which have 8.3 file name restrictions
11792 using djunpack.bat and fnchange.lst.
11793
3e7a2cd9
PE
117942005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11795
11796 * bootstrap (build_cvs_prefix): Remove; unused.
11797 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11798 when getting gnulib.
11799
118002005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11801
11802 * data/glr.c: Reorder typedef declarations for structs to match order
11803 of struct declarations.
11804 Rename yystack everywhere to yystackp except in yyparse where it's not
11805 a pointer.
11806 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11807 consistency.
11808 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11809 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11810 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11811 lint.
11812
877519f8
PE
118132005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11814
0eca5a39
PE
11815 * tests/sets.at (Accept): Fix typos in regular expression used to
11816 sed out the final state number.
11817
2cec9080
PE
11818 Work around portability problem on Solaris 10: flex-generated
11819 files include <stdio.h> before <config.h>, which messes up
11820 because the latter defines __EXTENSIONS__. Address the problem
11821 by creating two new little files that include <config.h> first,
11822 then include the flex-generated files. Rewrite everyone else
11823 to include <config.h> first, as well.
11824 * lib/timevar.c: Always include "config.h".
11825 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11826 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11827 (EXTRA_bison_SOURCES): New macro.
11828 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11829 * src/system.h: Don't include config.h.
11830 * src/LR0.c: Include <config.h> first.
11831 * src/assoc.c: Likewise.
11832 * src/closure.c: Likewise.
11833 * src/complain.c: Likewise.
11834 * src/conflicts.c: Likewise.
11835 * src/derives.c: Likewise.
11836 * src/files.c: Likewise.
11837 * src/getargs.c: Likewise.
11838 * src/gram.c: Likewise.
11839 * src/lalr.c: Likewise.
11840 * src/location.c: Likewise.
11841 * src/main.c: Likewise.
11842 * src/muscle_tab.c: Likewise.
11843 * src/nullable.c: Likewise.
11844 * src/output.c: Likewise.
11845 * src/parse-gram.y: Likewise.
11846 * src/print.c: Likewise.
11847 * src/print_graph.c: Likewise.
11848 * src/reader.c: Likewise.
11849 * src/reduce.c: Likewise.
11850 * src/relation.c: Likewise.
11851 * src/state.c: Likewise.
11852 * src/symlist.c: Likewise.
11853 * src/symtab.c: Likewise.
11854 * src/tables.c: Likewise.
11855 * src/uniqstr.c: Likewise.
11856 * src/vcg.c: Likewise.
11857
877519f8
PE
11858 * src/parse-gram.y: Fix minor problems uncovered by lint.
11859 (current_lhs, current_lhs_location): Now static.
11860 (current_assoc): Remove unused variable.
11861
11862 Cleanups so that Bison-generated parsers have less lint.
11863 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11864 Prepend /*ARGSUSED*/, for lint's sake.
11865 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11866 definition if 'lint' is defined.
11867 (YYID): New macro (or function, if lint).
11868 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11869 * data/yacc.c: Likewise.
11870 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11871 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11872 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11873 is C++ only.
11874 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11875 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11876 Use YYID(0) rather than 0, for lint.
11877 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11878 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11879
f5228370
PE
118802005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11881
11882 * tests/glr-regression.at
11883 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11884 Close memory leak reported by twlevo.
11885
69ce078b
PE
118862005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11887
6ff99711
PE
11888 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11889 all stacks.
11890 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
11891 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11892 New test case.
11893 (Duplicated user destructor for lookahead): This test now is expected
11894 to succeed.
11895
af3412cd
PE
118962005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11897
32b5b719 11898 * NEWS: Document the following change.
af3412cd
PE
11899 * data/yacc.c: Say "parser skeleton" rather than "file", since
11900 it's no longer just a file.
11901 * data/glr.c: Grant a special exception for C GLR parsers, that
11902 reads like the already-existing exception for C LALR(1) parsers.
11903 * data/glr.cc: Likewise.
11904 * data/lalr1.cc: Likewise.
11905 * data/location.cc: Likewise.
11906 * data/yacc.c: Reword the "written by" statement to clarify that
11907 it was the parser skeleton, not the entire output file.
11908 * data/glr.c: Written by Paul Hilfinger.
11909 * data/glr.cc: Written by Akim Demaille.
11910 * data/lalr1.cc: Likewise.
11911
035aa4a0
PE
119122005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11913
d9963c85
PE
11914 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11915 Fix typos in previous change that broke 'make check'.
11916 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11917 supported in C.
11918 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11919 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11920 We can revert this once things settle down.
11921
035aa4a0
PE
11922 * src/conflicts.c (conflicts_print): Don't print file name twice
11923 when %expect fails because there were no conflicts.
11924 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11925 change.
11926 * tests/conflicts.at (%expect not enough, %expect too much):
11927 (%expect with reduce conflicts): Adjust to new behavior.
11928
119292005-11-18 Akim Demaille <akim@epita.fr>
11930
11931 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11932 errors.
11933 * NEWS: Document this.
11934 * doc/bison.texinfo (Expect Decl): Likewise.
11935
d1ff7a7c
AD
119362005-11-16 Akim Demaille <akim@epita.fr>
11937
11938 Generalize the display of semantic values and locations in traces.
11939 * data/glr.c (yy_reduce_print): Fix indices (again).
11940 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11941 literal integers.
11942 * data/lalr1.cc (yyreduce_print): Rename as...
11943 (yy_reduce_print): this.
11944 Display values and locations.
11945 * data/yacc.c (yy_reduce_print): Likewise.
11946 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11947 (yysymprint): Move higher to be visible from yy_reduce_print).
11948 (yyparse): Adjust.
11949 * tests/calc.at: Adjust the expected length of the traces.
11950
6de5398d
AD
119512005-11-14 Akim Demaille <akim@epita.fr>
11952
11953 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11954 from 1 to N, while values and location start at 0.
11955 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11956
a1373f55
AD
119572005-11-14 Akim Demaille <akim@epita.fr>
11958
11959 * data/glr.c (yy_reduce_print): Fix the $ number.
11960
613d8952
AD
119612005-11-14 Akim Demaille <akim@epita.fr>
11962
11963 "Use" parse parameters.
11964 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11965 * data/glr.c, data/glr.cc: Use them.
11966 * data/glr.c (YYUSE): Have a C++ definition that supports
11967 non-pointer types.
11968
b2741627
AD
119692005-11-14 Akim Demaille <akim@epita.fr>
11970
11971 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11972
5059b5c8
AD
119732005-11-14 Akim Demaille <akim@epita.fr>
11974
42249483
AD
11975 * data/glr.cc: New.
11976 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 11977
4626a15d
AD
119782005-11-12 Akim Demaille <akim@epita.fr>
11979
11980 Let position and location be PODs.
11981 * data/location.cc (position::initialize, location::initialize): New.
11982 (position::position, location::location): Define only if
11983 b4_location_constructors is defined.
11984 * data/lalr1.cc (b4_location_constructors): Define it for backward
11985 compatibility.
11986 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11987
119882005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
11989
11990 * data/lalr1.cc: Move the body of the ctor and dtor into the
11991 parser file (instead of the header).
11992 Wrap the implementations in a "namespace yy".
11993
119942005-11-12 Akim Demaille <akim@epita.fr>
11995
11996 Have glr.c include its header file when created.
11997 * data/glr.c (b4_shared_declarations): New.
11998 Output them verbatim in the parser if !%defines, otherwise
11999 output then in the header file, and include it instead.
12000
1989d947
AD
120012005-11-11 Akim Demaille <akim@epita.fr>
12002
12003 * data/glr.c: Comment changes.
12004
120052005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
12006
12007 When yydebug, report semantic and location values for reductions.
12008 * data/glr.c (yy_reduce_print): Report the semantic values and the
12009 locations.
12010 (YY_REDUCE_PRINT): Adjust.
12011 (yyglrReduce): Use them.
12012 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
12013 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
12014 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
12015 traces.
12016
02998094
AD
120172005-11-10 Akim Demaille <akim@epita.fr>
12018
12019 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
12020 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
12021 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
12022
5210672f
PE
120232005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
12024
12025 * m4/cxx.m4, examples/Makefile.am: Don't build
12026 examples/calc++ if no C++ compiler is available. (trivial change)
12027
a8991a1d
AD
120282005-11-09 Akim Demaille <akim@epita.fr>
12029
12030 * src/scan-skel.l: Use a couple of asserts.
12031
36b5e963
AD
120322005-11-03 Akim Demaille <akim@epita.fr>
12033
12034 In some (weird) cases, the final state number is incorrect.
12035 Reported by Alexandre Duret-Lutz.
12036 * src/LR0.c (state_list_append): Remove the computation of
12037 final_state.
12038 (save_reductions): Do it here.
12039 (get_state): Alpha conversion.
12040 (generate_states): Use a for loop.
12041 * src/gram.h (item_number_is_rule_number)
12042 (item_number_is_symbol_number): New.
12043 * src/state.c: Use assert.
12044 * src/system.h: Include assert.h.
12045 * tests/sets.at (Accept): New.
12046
44e7ead1
PH
120472005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12048
12049 * data/glr.c (yyfill): Adjust comment.
36b5e963 12050 (yyresolveAction): Initialize default location properly
44e7ead1
PH
12051 for empty right-hand sides.
12052 (yydoAction): Ditto.
12053 Add comment explaining apparently dead code.
36b5e963
AD
12054 * tests/glr-regression.at
12055 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 12056 New test.
36b5e963 12057
e10a80ee
PE
120582005-10-30 Paul Eggert <eggert@cs.ucla.edu>
12059
12060 * bootstrap (cleanup_gnulib): New function. Use it to clean up
12061 gnulib when interrupted. This fixes some race conditions and
12062 works around some portability problems (one noted by Paul
12063 Hilfinger).
12064
067b32ee
AD
120652005-10-22 Akim <akim@epita.fr>
12066
12067 * Makefile.cfg: Adjust to config -> build-aux.
12068 Reported by twledo.
12069
4b367315
AD
120702005-10-21 Akim Demaille <akim@epita.fr>
12071
12072 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
12073 the %parse-params.
12074 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
12075 * data/yacc.c (b4_Pure_if): Rename as...
12076 (b4_yacc_pure_if): this.
12077 (YY_SYMBOL_PRINT, yyparse): Adjust.
12078 * doc/bison.texinfo: Formatting changes.
12079
24cc23d9
AD
120802005-10-21 Akim Demaille <akim@epita.fr>
12081
12082 Finish the transition config -> build-aux.
12083 * configure.ac, Makefile.am: Use build-aux.
12084 * config/prev-version, config/announce-gen, config/Makefile.am:
12085 Move to...
12086 * build-aux/prev-version, build-aux/announce-gen,
12087 * build-aux/Makefile.am: here.
12088
d4476375
AD
120892005-10-14 Akim Demaille <akim@epita.fr>
12090
12091 * examples/calc++/test: Use set -x only when VERBOSE.
12092
302c0aee
PE
120932005-10-13 Paul Eggert <eggert@cs.ucla.edu>
12094
12095 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
12096 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
12097
7625ec2c
AD
120982005-10-13 Akim Demaille <akim@epita.fr>
12099
12100 * src/scan-skel.l: Output the base name parts of the parser and
12101 header file names.
302c0aee 12102 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
12103 additional checks.
12104 Use this to exercise C++ outputs in subdirs.
12105 Reported by Oleg Smolsky.
12106
ba0fe3c7
PE
121072005-10-12 Paul Eggert <eggert@cs.ucla.edu>
12108
12109 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
12110 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
12111 Problem reported by John P. Hartmann.
12112 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
12113 already defined it.
12114
9b8a5ce0
AD
121152005-10-12 Akim Demaille <akim@epita.fr>
12116
12117 * src/parse-gram.y (version_check): Exit 63 to please missing
12118 (stands for "version mismatch).
12119 * tests/input.at, doc/bison.texinfo: Adjust.
12120
4f6e011e
PE
121212005-10-10 Paul Eggert <eggert@cs.ucla.edu>
12122
12123 Work around portability problems with Visual Age C compiler
12124 (xlc and xlC_r) reported by John P. Hartmann.
12125 * data/location.cc (initial_column, initial_line): Remove.
12126 All uses replaced by 0 and 1.
12127 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
12128 that xlc complains about.
12129 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 12130 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 12131 as __STDC__.
4d7aa45e
PE
12132 * data/yacc.c (YYMODERN_C): New macro, which also looks at
12133 __STDC_VERSION__. Use it everywhere instead of looking at
12134 __STDC__ and __cplusplus.
4f6e011e 12135
a1b3bf8c
AD
121362005-10-10 Akim Demaille <akim@epita.fr>
12137
12138 * examples/calc++/test: Be quiet unless VERBOSE.
12139
412e44aa
PE
121402005-10-05 Paul Eggert <eggert@cs.ucla.edu>
12141
2a4647a3
PE
12142 * data/c.m4 (yydestruct, yysymprint):
12143 Use YYUSE instead of casting to void.
12144 * data/glr.c (YYUSE): New macro.
12145 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
12146 Use it instead of rolling our own.
12147 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
12148 (YYCHK1):
12149 Use /*CONSTCOND*/ to suppress lint warnings.
12150 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
12151 (YY_STACK_PRINT): Use 'false' not '0'.
12152 (YYUSE): New macro.
12153 (yysymprint_, yydestruct_): Use it instead of rolling our own.
12154 * data/yacc.c (YYUSE): New macro.
12155 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
12156 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
12157 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
12158
12159
412e44aa
PE
12160 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
12161 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
12162
88c6637f
PE
121632005-10-04 Paul Eggert <eggert@cs.ucla.edu>
12164
2f4f028d
PE
12165 Undo the parts of the unlocked-I/O change that substituted
12166 putc or puts for printf. This might hurt performance a bit,
12167 but some people prefer the printf style.
12168 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
12169 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
12170 All uses replaced by YYFPRINTF and YYDPRINTF.
12171 * data/yacc.c: Likewise.
12172 * lib/bitset.c (bitset_print): Likewise.
12173 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
12174 putc and puts.
12175 * lib/lbitset.c (debug_lbitset): Likewise.
12176 * src/closure.c (print_firsts, print_fderives): Likewise.
12177 * src/gram.c (grammar_dump): Likewise.
12178 * src/lalr.c (look_ahead_tokens_print): Likewise.
12179 * src/output.c (escaped_output): Likewise.
12180 (user_actions_output): Break apart two printfs.
12181 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
12182 * src/reduce.c (reduce_print): Likewise.
12183 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
12184 * src/system.h: Include unlocked-io.h rathe than stdio.h.
12185
88c6637f
PE
12186 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
12187 Use assignments rather than casts-to-void to suppress
12188 unused-variable warnings. This pacifies 'lint'.
12189 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
12190 unused-variable warnings.
12191
fb32e373
JMG
121922005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
12193
12194 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
12195
edb8f44f
PE
121962005-10-02 Paul Eggert <eggert@cs.ucla.edu>
12197
fb9c0b33
PE
12198 Use unlocked I/O for a minor performance improvement on hosts like
12199 GNU/Linux and Solaris that support unlocked I/O. The basic idea
12200 is to use the gnlib unlocked-io module, and to prefer putc and
12201 puts to printf when either will work (since the latter doesn't
12202 come in an unlocked flavor).
12203 * bootstrap (gnulib_modules): Add unlocked-io.
12204 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
12205 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
12206 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
12207 and similarly for puts and putc and printf.
12208 * data/yacc.c: Likewise.
12209 * lib/bitset.c (bitset_print): Likewise.
12210 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
12211 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
12212 to printf.
12213 * lib/lbitset.c (debug_lbitset): Likewise.
12214 * src/closure.c (print_firsts, print_fderives): Likewise.
12215 * src/gram.c (grammar_dump): Likewise.
12216 * src/lalr.c (look_ahead_tokens_print): Likewise.
12217 * src/output.c (escaped_output): Likewise.
12218 (user_actions_output): Coalesce two printfs.
2f4f028d 12219 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
12220 * src/reduce.c (reduce_print): Likewise.
12221 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 12222 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 12223
edb8f44f
PE
12224 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
12225 this confuses xgettext.
12226
b50d2359
AD
122272005-10-02 Akim Demaille <akim@epita.fr>
12228
12229 * bootstrap (gnulib_modules): Add strverscmp.
12230 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
12231 * m4/.cvsignore: Add strverscmp.m4.
12232 * src/parse-gram.y (%require): New token, new rule.
12233 (version_check): New.
12234 * src/scan-gram.l (%require): Adjust.
12235 * tests/input.at (AT_REQUIRE): New.
12236 Use it.
12237 * doc/bison.texinfo (Require Decl): New.
12238 (Calc++ Parser): Use %require.
12239
21667f64
AD
122402005-10-02 Akim Demaille <akim@epita.fr>
12241
12242 * data/location.cc: New.
12243
2b81e969
AD
122442005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
12245 Akim Demaille <akim@epita.fr>
12246
12247 Make sure -odir/foo.cc creates dir/location.hh etc.
12248 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
12249 (spec_file_prefix, spec_verbose_file, spec_graph_file)
12250 (spec_defines_file): Now const.
12251 (dir_prefix): New.
12252 (short_base_name): Remove.
12253 * src/files.c: Adjust.
12254 (dirname.h): Include.
12255 (base_name): Don't prototype it.
12256 (finput): Remove, duplicates gram_in.
12257 (full_base_name, short_base_name): Replace by...
12258 (all_but_ext, all_but_tab_ext): these.
12259 (compute_base_names): Rename as...
12260 (compute_file_name_parts): this.
12261 Update to compute the new variables, including dir_prefix.
12262 Adjust dependencies.
12263 * src/output.c (prepare): Output them.
12264 * src/reader.c: Adjust to use gram_in, not finput.
12265 * src/scan-skel.l (@dir_prefix@): New.
12266
ad6a9b97
JMG
122672005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
12268
12269 * lib/subpipe.c: New function end_of_output_subpipe() added
12270 to allow support for non-posix systems. This is a no-op function
12271 for posix systems.
12272
12273 * lib/subpipe.h: New function end_of_output_subpipe() added
12274 to allow support for non-posix systems. This is a no-op function
12275 for posix systems.
12276
12277 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
12278 handle the lack of pipe/fork functionality on non-posix systems.
12279
12280 * djgpp/Makefile.maint: DJGPP specific file.
12281
12282 * djgpp/README.in: DJGPP specific file.
12283
12284 * djgpp/config.bat: DJGPP specific configuration file.
12285
12286 * djgpp/config.sed: DJGPP specific configuration file.
12287
12288 * djgpp/config.site: DJGPP specific configuration file.
12289
12290 * djgpp/config_h.sed: DJGPP specific configuration file.
12291
12292 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
12293
12294 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
12295
fc695704
AD
122962005-10-02 Akim Demaille <akim@epita.fr>
12297
12298 * data/location.cc: New, extract from...
12299 * data/lalr1.cc: here.
12300 (location.hh): Include it after the user prologue, in case the
12301 filename type is defined by the user.
12302 Forward declation location and position before the pre-prologue.
12303 (yyresult_): Rename as...
12304 (yyresult): this, it's a local variable, not an attribute.
12305 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
12306
123072005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
12308
12309 * examples/extexi: Restore the #line generation.
12310
fb9712a9
AD
123112005-09-30 Akim Demaille <akim@epita.fr>,
12312 Alexandre Duret-Lutz <adl@gnu.org>
12313
12314 Move the token type and YYSTYPE in the parser class.
12315 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
12316 (parser::token): New, from the moved free definition of tokens.
12317 (parser::semantic_value): Now a full definition instead of an
12318 indirection to YYSTYPE.
12319 (b4_post_prologue): No longer included in the header file, but
12320 in the implementation file.
12321 * doc/bison.texi (C+ Language Interface): Update.
12322 * src/parse-gram.y: Support unary %define.
12323 * tests/actions.at: Define global_tokens_and_yystype for backward
12324 compatibility until we update the tests.
12325 * tests/calc.at: Idem.
12326 (first_line, first_column, last_line, last_column): Define for lalr1.cc
12327 to simplify the code.
12328
55f0c7b1
PE
123292005-09-29 Paul Eggert <eggert@cs.ucla.edu>
12330
12331 Port to SunOS 4.1.4, which lacks strtoul and strerror.
12332 Ah, the good old days! Problem reported by Peter Klein.
12333 * bootstrap (gnulib_modules): Add strerror, strtoul.
12334 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
12335 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
12336
fb9712a9 123372005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
12338
12339 * data/c.m4 (b4_error_verbose_if): New.
12340 * data/lalr1.cc: Use it.
12341 (YYERROR_VERBOSE_IF): Remove.
12342 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
12343 parser members, replaced by...
12344 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
12345 local variables.
12346 (yysyntax_error_): Takes the state number as argument.
12347 (yyreduce_print_): Use the argument yyrule, not the former
12348 attribute yyn_.
12349
8a6f72f3
PE
123502005-09-26 Paul Eggert <eggert@cs.ucla.edu>
12351
12352 * bootstrap (gnulib_modules): Add verify.
12353 * lib/.cvsignore: Add verify.h.
12354 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
12355 * src/system.h (verify): Remove.
12356 Include verify.h instead.
12357 * src/tables.c (tables_generate): Use new API for 'verify'.
12358
0d50976f
PE
123592005-09-21 Paul Eggert <eggert@cs.ucla.edu>
12360
ebc3737e
PE
12361 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
12362 local variables whose names begin with 'yy'.
12363 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12364 Trivial changes from Joel E. Denny.
12365
0d50976f
PE
12366 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
12367 it itself.
12368 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
12369 don't use alloca any more.
12370
12371 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
12372 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 12373 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
12374 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
12375 to match yacc.c, to test more hosts.
12376
a05b79df
PE
123772005-09-20 Paul Eggert <eggert@cs.ucla.edu>
12378
55289366
PE
12379 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
12380 doesn't affect behavior.
12381 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
12382 Solaris, AIX, MSC.
12383 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
12384 This works a bit better with glibc, if user code has already included
12385 stdlib.h.
12386 * doc/bison.texinfo (Bison Parser): Document that users can't
12387 arbitrarily use malloc and free for other purposes. Document
12388 that <alloca.h> and <malloc.h> might be included.
12389 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
12390 user must declare alloca.
12391
a05b79df
PE
12392 * HACKING (release): Forwarn the Translation Project about
12393 stable releses.
12394
3ab2ca22
AD
123952005-09-20 Akim Demaille <akim@epita.fr>
12396
12397 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
12398
a9739e7c
PE
123992005-09-19 Paul Eggert <eggert@cs.ucla.edu>
12400
a702593e
PE
12401 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
12402 (YYSTACK_ALLOC_MAXIMUM): Use it.
12403 (yysyntax_error): New function.
12404 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
12405 multiple syntax errors are reported, and alloca is being used.
12406 Instead, reallocate buffers twice as big each time, so that
12407 we waste at most half the allocated memory. Start with a small
12408 (128-byte) buffer that will suffice in most cases anyway.
12409 Use yysyntax_error to do most of the work.
12410
12411 * doc/bison.texinfo (Error Reporting, Table of Symbols):
12412 yynerrs is the number of errors reported, not the number of
12413 errors encountered.
12414
a9739e7c
PE
12415 * tests/glr-regression.at (Duplicated user destructor for lookahead):
12416 Mark it as expected to fail.
12417 Cast result of malloc; problem reported by twlevo@xs4all.nl.
12418 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
12419 Don't start user-code symbols with "yy", to avoid name space problems.
12420
f479c6c6
AD
124212005-09-19 Akim Demaille <akim@epita.fr>
12422
12423 Remove the traits, failed experiment.
12424 It never proved useful, and anyway because of the current
12425 definition, it was not possible to have several specialization of
12426 this traits, making it useless.
12427 * data/lalr1.cc (yy:traits): Remove.
12428 Inline its definitions in the parser class.
12429
e2586f82
AD
124302005-09-19 Akim Demaille <akim@epita.fr>
12431
12432 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
12433 least Mac OSX with a /usr/local install of gettext.
12434
2e8cf949
AD
124352005-09-19 Akim Demaille <akim@epita.fr>
12436
12437 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
12438 and yytoken for similarity with the other skeletons.
12439
c7fb0b90
AD
124402005-09-19 Akim Demaille <akim@epita.fr>
12441
4e26c69e 12442 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 12443
1bd0deda
PE
124442005-09-16 Paul Eggert <eggert@cs.ucla.edu>
12445
12446 * NEWS: Version 2.1.
12447
12448 * NEWS: Remove notice of yytname change, since it was never in an
12449 official release.
12450 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
12451 diagnostic.
12452 * src/output.c (prepare): Likewise.
12453 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
12454 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
12455 is not defined. This is an awful hack, but it's enough for now.
12456 All callers changed.
12457 * tests/glr-regression-at (make_value): Args are const pointers now,
12458 to avoid GCC warning.
12459 (Duplicated user destructor for lookahead): New test. Currently
12460 skipped. It fails on my host but I'm not sure it'll always fail.
12461
124622005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
12463
12464 * src/symtab.h (struct symbol): Declare the printer and destructor
12465 as const, to avoid accidental calls to free.
12466 (symbol_destructor_set, symbol_printer_set): Adjust.
12467 * src/symtab.c: Adjust.
12468
1bd0deda 124692005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
12470
12471 * data/c.m4 (b4_token_enums): New.
12472 (b4_token_defines): Rename as...
12473 (b4_token_enums_defines): this.
12474 (b4_token_defines): New, output only the #defines.
12475 * data/yacc.c, data/glr.c: Adjust.
12476 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
12477 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
12478 as default values.
12479
dbcdae2d
AD
124802005-09-16 Akim Demaille <akim@epita.fr>
12481
12482 * data/lalr1.cc (yylex_): Remove, inline its code.
12483 (yyreport_syntax_error_): Remove, replaced by...
12484 (yysyntax_error_): this which returns a string and leaves to the
12485 caller the call to the users' error function.
12486 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
12487 Move from members of the parser object...
12488 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
12489 to local variables of the parse function.
12490
70d8f291
AD
124912005-09-16 Akim Demaille <akim@epita.fr>
12492
12493 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
12494 since it's in Bison's name space.
12495
b47dbebe
PE
124962005-09-15 Paul Eggert <eggert@cs.ucla.edu>
12497
ae199bf1
PE
12498 * data/glr.c (yyresolveValue): Add default case to pacify
12499 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
12500
b47dbebe
PE
12501 * NEWS: Document when yyparse started to return 2.
12502 * doc/bison.texinfo (Parser Function): Document when yyparse
12503 returns 2.
12504
12505 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
12506 (b4_filename_type): Renamed back from b4_file_name_type. All uses
12507 changed.
12508 (class position): file_name -> filename (reverting). All uses changed.
12509
125102005-09-14 Paul Eggert <eggert@cs.ucla.edu>
12511
12512 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
12513 do anything if $@ exists. This reverts part of the 2005-07-07
12514 patch.
12515
00292f66
PE
125162005-09-11 Paul Eggert <eggert@cs.ucla.edu>
12517
12518 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
12519 contains obsolete information and isn't worth distributing as a
12520 separate file anyway.
12521 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
12522 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
12523 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
12524 (yyparse): Abort if user code uses longjmp to throw an unexpected
12525 value.
12526
a420f962
PE
125272005-09-09 Paul Eggert <eggert@cs.ucla.edu>
12528
00292f66
PE
12529 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
12530 Suggested by twlevo@xs4all.nl.
12531
127287e9
PE
12532 * data/glr.c (YYCHK1): Do not assume YYE is in range.
12533 This avoids a diagnostic from gcc -Wswitch-enum.
12534 Problem reported by twlevo@xs4all.nl.
12535
a420f962
PE
12536 * doc/bison.texinfo: Don't use "filename", as per GNU coding
12537 standards. Use "file name" or "file" or "name", depending on
12538 the context.
12539 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
12540 not to hack/foo.tab.c.
12541 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
12542 * data/glr.c: b4_filename -> b4_file_name.
12543 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
12544 All uses changed.
12545 (class position): filename -> file_name. All uses changed.
12546 * data/yacc.c: b4_filename -> b4_file_name.
12547 * lib/bitset.h: filename -> file_name in local vars.
12548 * lib/bitset_stats.c: Likewise.
12549 * src/files.c: Likewise.
12550 * src/scan-skel.l ("@output ".*\n): Likewise.
12551 * src/files.c (file_name_split): Renamed from filename_split.
12552 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
12553
125542005-09-08 Paul Eggert <eggert@cs.ucla.edu>
12555
12556 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
12557 to accommodate latest gnulib.
12558
12559 * tests/glr-regression.at (Duplicate representation of merged trees):
12560 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
12561
12562 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
12563 needed.
12564
42a6501d
PE
125652005-08-26 Paul Eggert <eggert@cs.ucla.edu>
12566
12567 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
12568 All uses changed. Invoke user destructor after an error during a
12569 split parse (trivial change from Joel E. Denny).
12570
12571 * tests/glr-regression.at
12572 (User destructor after an error during a split parse): New test case.
12573 Problem reported by Joel E. Denny in:
12574 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
12575
ef9a1faf
PE
125762005-08-25 Paul Eggert <eggert@cs.ucla.edu>
12577
5b4aaf78
PE
12578 * README-cvs: Give URLs for recommended tools.
12579 Mention Gzip version problem, and bootstrapping issues.
12580 Remove troubleshooting section, as it's somewhat obsolete.
12581
b5240ba5
PE
12582 * bootstrap (no_cache): New var, to accommodate different wget
12583 variants. Use it instead of '-C off'. Problem reported by
12584 twlevo@xs4all.nl.
12585
ef9a1faf
PE
12586 * data/glr.c (yydestroyStackItem): New function.
12587 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
12588 debugging information. Problem reported by Joel E. Denny.
12589
e6efa9da
AD
125902005-08-25 Akim Demaille <akim@epita.fr>
12591
12592 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
12593
adc90f13
PE
125942005-08-24 Paul Eggert <eggert@cs.ucla.edu>
12595
12596 * data/glr.c (yyrecoverSyntaxError, yyreturn):
12597 Don't invoke destructor on unresolved entries.
12598 * tests/glr-regression.at
12599 (User destructor for unresolved GLR semantic value): New test case.
12600 Problem reported by Joel E. Denny in:
12601 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
12602
f9315de5
PE
126032005-08-21 Paul Eggert <eggert@cs.ucla.edu>
12604
15d29c1f
PE
12605 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12606 Add strnlen.c.
12607 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12608 lib-prefix.m4, po.m4.
12609
dd5f2af2
PE
12610 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12611 in yydestruct diagnostic, since it might not be an error.
12612 Problem reported by Joel Denny near end of
12613 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 12614 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
12615 * data/yacc.c (yyreturn): Likewise.
12616 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12617
12618 * src/files.c: Remove obsolete FIXME comment.
12619
12620 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12621 with the other templates, and to fix bogus run-on messages such
12622 as the one reported at the end of
12623 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12624 All callers changed to avoid the newline.
12625 (yyprocessOneStack): Output two lines rather than one, to accommodate
12626 the above change. This changes the debug output format slightly.
12627
f9315de5
PE
12628 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12629 reported by Joel E. Denny in
12630 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12631 (trivial change).
12632 * tests/glr-regression.at (Duplicate representation of merged trees):
12633 New test, from Joel E. Denny in:
12634 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12635 * THANKS: Add Joel E. Denny.
12636
12637 * configure.ac (AC_INIT): Bump to 2.0c.
12638
04098407
PE
126392005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12640
12641 * NEWS: Version 2.0b.
12642
ca5d2013
PE
12643 * Makefile.am (SUBDIRS): Put examples before tests, so that
12644 "make check" doesn't finish with "All 1 tests passed".
12645
3d54b576
PE
12646 * tests/regression.at (Token definitions): Don't rely on
12647 AT_PARSER_CHECK for data that contains backslashes. It currently
12648 uses 'echo', and 'echo' isn't portable if its argument contains
12649 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12650 that the byte '\0xff' is not printable in the C locale; it is,
12651 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12652 not printable, so use '\0x81' to test.
12653
d53ae497
PE
12654 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12655 version of GCC, since the macro is used with non-GCC compilers.
12656
fc01665e
PE
12657 Fix core dump reported by Pablo De Napoli in
12658 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12659 * tests/regression.at (Invalid inputs with {}): New test.
12660 * src/parse-gram.y (token_name): Translate type before using
12661 it as an index.
12662
04098407
PE
12663 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12664 the user's name space. All uses changed to __attribute__
12665 ((__unused__)).
12666 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12667 Add __attribute__ ((__noreturn__)).
12668
12669 * etc/clcommit: Remove. We weren't using it, and it failed
12670 "make maintainer-distcheck".
12671 * Makefile.maint: Merge from coreutils.
12672 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12673 (syntax-check-rules): Change list of rules as described below.
12674 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12675 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12676 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12677 (sc_trailing_space): New rules.
12678 (sc_xalloc_h_in_src): Remove.
12679 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12680 (sc_space_tab, sc_error_exit_success, sc_changelog):
12681 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12682 (makefile-check, po-check, author_mark_check):
12683 (makefile_path_separator_check, copyright-check):
12684 Use grep -n, to make it easier to find violations.
12685 Use CVS_LIST and CVS_LIST_EXCEPT.
12686 (header_regexp, h_re): Remove.
12687 (dd_c): New macro.
12688 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12689 (my-distcheck): Use more-modern GCC flags.
12690 (signatures, %.asc): Remove.
12691 (rel-files, announcement): Remove signatures.
12692 Restore old updating code, even though we don't use it, so
12693 that we're the same as coreutils.
12694 (alpha, beta, major): Depend on news-date-check.
12695 Make the upload commands.
12696
12697 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12698 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12699 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12700 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12701 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12702 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12703 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12704 * tests/sets.at: Likewise.
12705
12706 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12707 we comment out the Autoconf version number.
12708 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12709 it's error-prone and "make maintainer-distcheck" rejects it.
12710
12711 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12712 Indent calls to "error" to pacify "make maintainer-distcheck",
12713 when the calls are not intended to be translated.
12714 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12715
12716 * src/Makefile.am (DEFS): Use +=, to pacify
12717 "make maintainer-distcheck".
12718 (bison_SOURCES): Add scan-skel.h.
12719 (sc_tight_scope): New rule, from coreutils.
12720
12721 * src/files.c (src_extension, header_extension):
12722 Now static, not extern.
12723 * src/getargs.c (short_options): Likewise.
12724 * src/muscle_tab.c (muscle_table): Likewise.
12725 * src/parse-gram.y (current_class, current_type, current_prec):
12726 Likewise.
12727 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12728 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12729 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12730 void, to avoid warning when NLS is disabled.
12731 * src/output.c: Include scan-skel.h.
12732 (scan_skel): Remove decl, since scan-skel.h does this.
12733 (output_skeleton):
12734 Indent calls to "error" to pacify "make maintainer-distcheck".
12735 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12736 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12737 "make maintainer-distcheck".
12738 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12739 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12740 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12741 (skel_lex_destroy, scan_skel): Move these decls to...
12742 * src/scan-skel.h: New file.
12743 * src/uniqstr.c (uniqstr_assert):
12744 Indent calls to "error" to pacify "make maintainer-distcheck".
12745
12746 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12747 not @VAR@.
12748
12749 * tests/torture.at: Revamp to avoid misuse of atoi that
12750 "make maintainer-distcheck" complained about.
12751
12752 * examples/extexi (message): Don't print a message more than once,
12753 and omit line-number decoration that makes Emacs compile think
12754 that informative messages are worth worrying about.
12755
127562005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12757
12758 * configure.ac: Update version number.
12759
12760 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12761 accidentally.
12762 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12763 autogenerated by the maintainer.
12764 * examples/calc++/.cvsignore: Add *.yy.
12765
12766 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12767 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12768 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12769
12770 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12771
12772 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12773 from maintainer-distcheck about casting the argument of 'free'.
12774
12775 * NEWS: Mention recent yytname changes.
12776 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12777
12778 * bootstrap: For translations that have not yet been upgraded to
12779 the new runtime-po domain, prime the pump by extracting the
12780 relevant strings from the obsolete translations. This code can be
12781 removed once the bison-runtime domain has been translated by each
12782 team.
12783
12784 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12785 now that token names are already quoted.
12786
12787 Fix problem reported by Anthony Heading.
12788 * data/glr.c (YYTOKEN_TABLE): New macro.
12789 (yytname): Define if YYTOKEN_TABLE.
12790 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12791 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12792 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12793 * src/output.c (prepare_symbols): Output token_table_flag.
12794
0ffda363
PE
127952005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12796
12797 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12798 again if the first call fails.
12799
12800 * data/glr.c (yytnamerr): New function.
12801 (yyreportSyntaxError): Use it to dequote most string literals.
12802 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12803 with other skeletons. All uses changed.
12804 (yytnameerr_): New function.
12805 (yyreport_syntax_error): Use it to dequote most string literals.
12806 * data/yacc.c (yytnamerr): New function.
12807 (yyerrlab): Use it to decode most string literals.
12808 * doc/bison.texinfo (Decl Summary, Calling Convention):
12809 Clarify quoting convention of yytname.
12810 * src/output.c (prepare_symbols): Quote all names. This undoes
12811 the 2005-04-17 change, which is now accomplished (mostly) via
12812 changes in the parsers as described above.
12813 * tests/regression.at (Token definitions, Web2c Actions):
12814 Undo most 2005-04-17 change here, too.
12815
128162005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12817
12818 Fix more problems reported by twlevo@xs4all.nl.
12819 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12820 remove trailing spaces. This loses the exit status of ./types,
12821 and isn't needed since ./types shouldn't be emitting trailing
12822 spaces.
12823 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12824 as the stack isn't valid in that case.
12825
12826 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12827 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12828 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12829 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12830 is used.
12831 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12832 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12833 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12834 Likewise.
12835
12836 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12837 overly-picky compilers that reject 'char *foo = "bar";'.
12838
12839 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12840 to FILE * parameter, not to stderr. This fixes a typo introduced
12841 in the 2005-07-12 change.
12842
12843 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12844 warnings from GCC 4.
12845
12846 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12847 (yyglrShiftDefer, yysplitStack):
12848 Remove unused parameters b4_pure_formals. All uses changed.
12849 (yyglrShift): Remove unused parameters b4_user_formals.
12850 All uses changed.
12851 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12852
6100a9aa
PE
128532005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12854
258b75ca
PE
12855 Destructor cleanups and regularization among the three skeletons.
12856 * NEWS: Document the behavior changes.
12857 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12858 stack before failing, as the cleanup code will do it for us now.
12859 * data/lalr1.cc (yyerrlab): Likewise.
12860 * data/glr.c (yyparse): Pop everything off the stack before
12861 freeing it, so that destructors get called properly.
12862 * data/lalr1.cc (yyreturn): Likewise.
12863 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12864 This is more consistent.
12865 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12866 why destructors might be called. 1.875 -> 2.1.
12867 (Destructor Decl, Decl Summary, Table of Symbols):
12868 Some English-language cleanups for %destructor.
12869 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12870 Add output line for destructor of start symbol.
12871 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12872 because of that same extra output line.
12873
1a059451
PE
12874 * NEWS: Document minor wording changes in diagnostics of
12875 Bison-generated parsers.
12876 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12877 Remove unused formals. All uses changed.
12878 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12879 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12880 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12881 Rename yyoverflowab to yyexhaustedlab.
12882 When memory exhaustion occurs during syntax-error reporting,
12883 report it separately rather than in a single diagnostic; this
12884 eases translation.
12885 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12886 (Memory Exhausted): Renamed from Parser Stack Overflow.
12887 Revamp wording slightly to prefer "memory exhaustion".
12888 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12889
97460c78
PE
12890 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12891
30757c8c
PE
12892 Add i18n support to the GLR skeleton. Partially fix the C++
12893 skeleton; a C++ expert needs to finish this. Remove debugging
12894 msgids; there's little point to having them translated, since they
12895 can be understood only by someone who can read the
12896 (English-language) source code.
12897
12898 Generate runtime-po/bison-runtime.pot automatically, so that we
12899 don't have to worry about garbage getting in that file. We'll
12900 make sure after the next official release that old msgids don't
12901 get lost. See
12902 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12903
12904 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12905 Now auto-generated.
12906 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12907 Fix typos in explanations of the runtime file.
12908 * bootstrap: Change gettext keyword from YYI18N to YY_.
12909 Use standard Makefile.in.in in runtime-po, since we'll arrange
12910 for backward-compatible bison-runtime.po files in a different way.
12911 * data/glr.c (YY_): New macro, from yacc.c.
12912 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12913 Translate messages intended for users.
12914 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12915 the wording in the other skeletons. We don't know that the memory
12916 is virtual.
12917 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12918 Use same method that yacc.c uses.
12919 Don't translate debugging messages.
12920 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12921 it doesn't work (yet), and requires C++ expertise to fix.
12922 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12923 Move defn to a more logical place, to be consistent with other
12924 skeletons.
12925 Don't translate debugging messages.
12926 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12927 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12928 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12929 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12930
ac8c5689
PE
12931 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12932 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12933 void, not int.
12934 * tests/glr-regression.at (Badly Collapsed GLR States):
12935 Likewise.
12936 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12937 yylex should return 0 at EOF rather than aborting.
12938
6100a9aa
PE
12939 Improve tests for stack overflow in GLR parser.
12940 Problem reported by twlevo@xs4all.nl.
12941 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12942 All uses removed.
12943 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12944 can handle the problem.
12945 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12946 (yyparse): New local variable yyresult to record the result.
12947 Use result of setjmp to set it, rather than storing itinto
12948 struct.
12949 (yyDone): Remove label.
12950 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12951 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12952 if YYABORT is used).
12953 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12954 yyparse status; put status > 1 into diagnostic.
12955 Check that status==2 works.
12956 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12957 Use exit status 3 for failure to open (which shouldn't happen).
12958
15f40952
PE
129592005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12960
67fd79c4
PE
12961 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12962 1 on syntax error; just let yyparse do its thing.
12963 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12964 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12965 (Exploding the Stack Size with Alloca):
12966 (Exploding the Stack Size with Malloc):
12967 Expect exit status 2, not 1, since the parser is supposed to blow
12968 its stack. Problem reported by twlevo@xs4all.nl.
12969
15f40952
PE
12970 * data/glr.c (yyparse): Don't assume that the initial calls
12971 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12972 Print a stack-overflow message and fail instead.
12973 Initialize the line-number information before creating the stack,
12974 so that the stack-overflow message can report line zero safely.
12975
f32c66b5
PE
129762005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12977
a22ff96f 12978 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
12979 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12980 (yyuserMerge): Provide a default case if b4_mergers is empty.
12981 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12982 * tests/glr-regression.at
12983 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 12984 Add casts to pacify C++ compilers.
1beb0b24
PE
12985 * tests/glr-regression.at (Improper merging of GLR delayed action
12986 sets): Declare yylex before using it.
f32c66b5 12987 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
12988 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12989 test for valgrind; valgrind is independent of g++.
12990 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12991 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12992 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12993 Use a destructor, so that we can expand the stack. Change
12994 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 12995
d741bd1b
PE
129962005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12997
12998 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12999 a valgrind failure. Problem reported by twlevo@xs4all.nl.
13000
0410a6e0
PE
130012005-07-13 Paul Eggert <eggert@cs.ucla.edu>
13002
13003 * PACKAGING: New file, suggested by Bruno Haible and taken from
13004 similar wording in gettext's PACKAGING file.
13005 * NEWS: Mention PACKAGING.
13006 * Makefile.am (EXTRA_DIST): Add PACKAGING.
13007
f7ab6a50
PE
130082005-07-12 Paul Eggert <eggert@cs.ucla.edu>
13009
baf785db 13010 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
13011 * bootstrap: Get runtime translations into runtime-po.
13012 Create runtime-po files automatically, if possible.
13013 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
13014 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
13015 does not infringe on the user's name space.
13016 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
13017 * doc/bison.texinfo (Internationalization): Revamp the English
13018 and Texinfo syntax a bit, to try to make it clearer.
13019 (Bison Options, Option Cross Key): Mention --print-localedir.
13020 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
13021 YYENABLE_NLS. Quote a bit more.
13022 * runtime-po/.cvsignore: New file.
13023 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
13024 * runtime-po/Rules-quot: Remove; now created by bootstrap.
13025 * runtime-po/quot.sed: Likewise.
13026 * runtime-po/boldquot.sed: Likewise.
13027 * runtime-po/en@quot.header: Likewise.
13028 * runtime-po/en@boldquot.header: Likewise.
13029 * runtime-po/insert-header.sin: Likewise.
13030 * runtime-po/remove-potcdate.sin: Likewise.
13031 * runtime-po/Makevars: Likewise.
13032 * runtime-po/LINGUAS: Likewise.
13033 * runtime-po/de.po: Likewise; we will rely on the translation project
13034 to maintain this, so "bootstrap" should get it.
0410a6e0 13035 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
13036 its value.
13037 * src/main.c (main): Bind the bison-runtime domain, too.
13038
130392005-07-12 Bruno Haible <bruno@clisp.org>
13040
13041 * data/yacc.c: Include <libintl.h> when NLS is enabled.
13042 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
13043 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
13044 * runtime-po: New directory.
13045 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
13046 $(DOMAIN).pot-update rule, so that old messages are never dropped.
13047 * runtime-po/Rules-quot: New file, copied from po/.
13048 * runtime-po/quot.sed: Likewise.
13049 * runtime-po/boldquot.sed: Likewise.
13050 * runtime-po/en@quot.header: Likewise.
13051 * runtime-po/en@boldquot.header: Likewise.
13052 * runtime-po/insert-header.sin: Likewise.
13053 * runtime-po/remove-potcdate.sin: Likewise.
13054 * runtime-po/Makevars: New file.
13055 * runtime-po/POTFILES.in: New file.
13056 * runtime-po/LINGUAS: New file.
13057 * runtime-po/bison-runtime.pot: New file.
13058 * runtime-po/de.po: New file.
13059 * m4/bison.m4: New file.
13060 * Makefile.am (SUBDIRS): Add runtime-po.
13061 (aclocaldir, aclocal_DATA): New variables.
13062 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
13063 Define aclocaldir.
13064 * src/getargs.c (usage): Document --print-localedir option.
13065 (PRINT_LOCALEDIR_OPTION): New enum item.
13066 (long_options): Add --print-localedir option.
13067 (getargs): Handle --print-localedir option.
13068 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
13069 (Internationalization): New section.
13070
22dda0f0
AD
130712005-07-12 Akim Demaille <akim@epita.fr>
13072
13073 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
13074 for consistency with the rest of the code.
13075 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
13076 Add separators.
13077
82b248ad
AD
130782005-07-12 Akim Demaille <akim@epita.fr>
13079
13080 * src/parse-gram.y: Use %printer instead of YYPRINT.
13081
fa0e9314
AD
130822005-07-12 Akim Demaille <akim@epita.fr>
13083
867a3e00
AD
13084 * src/symtab.h, src/symtab.c (symbol_print): New.
13085 * src/symlist.h, src/symlist.c (symbol_list_print): New.
13086 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
13087
130882005-07-12 Akim Demaille <akim@epita.fr>
13089
13090 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
13091 b4_at_dollar and b4_dollar_dollar.
13092
e054b190
PE
130932005-07-11 Paul Eggert <eggert@cs.ucla.edu>
13094
13095 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
13096 and Pennello's paper.
13097
34160ec4
PE
130982005-07-09 Paul Eggert <eggert@cs.ucla.edu>
13099
407d4a75
PE
13100 * data/yacc.c (yyparse): Undo previous patch. Instead,
13101 set yylsp[0] and yyvsp[0] only if the initial action
13102 sets yylloc and yylval, respectively.
13103
34160ec4
PE
13104 * data/yacc.c (yyparse): In the initial action, set
13105 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
13106 This avoids the use of undefined variables if the initial
13107 action does not set yylloc and/or yylval.
13108
c3d5a4a7
PE
131092005-07-07 Paul Eggert <eggert@cs.ucla.edu>
13110
b34d96c1
PE
13111 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
13112 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
13113 Remove from CVS. These files are automatically generated.
13114 * examples/extexi: Clarify that this file is now part of Bison,
13115 not GNU M4, and that it works with any POSIX-compatible Awk.
13116 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
13117 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
13118 so that we also get calc++-parser.yy. Geneate it.
13119 Use $(AWK), not gawk, since any conforming Awk will do.
13120 Put comment before action, since older 'make' can't handle comment
13121 in action.
13122 $(BUILT_SOURCES): List all built sources, not just some of them.
13123 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
13124 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
13125 $($(calc_sources_generated)): Remove unnecessary test for existence
13126 of target. (This had a shell syntax error anyway; a stray "x".)
13127 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
13128 calc++-parser.yy.
13129 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
13130
c3d5a4a7
PE
13131 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
13132 implied by the other modules.
13133
828c373b
AD
131342005-07-06 Akim Demaille <akim@epita.fr>
13135
13136 Bind examples/calc++ to the package.
13137 * examples/calc++/Makefile: Remove, replaced by...
13138 * examples/calc++/Makefile.am: ... this new file.
13139 * examples/calc++/test: Remove input.
13140 * examples/calc++/compile: Remove.
13141 * examples/Makefile.am: New.
13142 * configure.ac, Makefile.am: Adjust.
13143 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
13144
63cb01d6
PE
131452005-07-05 Paul Eggert <eggert@cs.ucla.edu>
13146
fd2df2ed
PE
13147 * data/glr.c (yyFail): Drastically simplify; since the format argument
13148 never had any % directives, we can simply pass it to yyerror.
13149 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
13150 be modified later, as that is the usual style in glr.c.
13151 Problems reported by Paul Hilfinger.
13152
63cb01d6
PE
13153 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
13154 and size overflow errors.
13155 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
13156 in case the user prolog sets feature-test macros like _GNU_SOURCE.
13157 (YYSIZEMAX): New macro.
13158 (yystpcpy): New function, taken from yacc.c.
13159 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
13160 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
13161 so that we don't have to maintain their signatures.
13162 (yyFail): Check for buffer overflow, by using vsnprintf rather
13163 than vsprintf. Allocate a bigger buffer if possible.
13164 Report an error if buffer allocation fails.
13165 (yyStackOverflow): New function.
13166 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
13167 the initialization was successful. It might fail if storage was
13168 exhausted.
13169 (yyexpandGLRStack): Add more checks for storage allocation failure.
13170 Use yyStackOverflow to report failures.
13171 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
13172 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
13173 Don't assume stack number fits in int.
13174 (yysplitStack): Check for storage allocation failure.
13175 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
13176 can print diagnostics on storage allocation failure. All callers
13177 changed.
13178 (yyresolveValue): Use yybool for boolean.
13179 (yyreportSyntaxError): Check for size-calculation overflow.
13180 This code is taken from yacc.c.
13181 (yyparse): Check for storage allocation errors when allocating
13182 the initial stack.
13183
1c59e0a1
AD
131842005-07-05 Akim Demaille <akim@epita.fr>
13185
13186 Extract calc++ from the documentation.
13187 * doc/bison.texinfo (Calc++): Add the extraction marks.
13188 * examples/extexi: New, from the aborted GNU Programming 2E.
13189 Separate the different paragraph of a file with empty lines.
13190 * examples/Makefile: Use it to extract the whole calc++ example.
13191
8a0adb01
AD
131922005-06-24 Akim Demaille <akim@epita.fr>
13193
13194 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
13195 class typedefs.
13196
12545799
AD
131972005-06-22 Akim Demaille <akim@epita.fr>
13198
13199 * doc/bison.texinfo (C++ Language Interface): First stab.
13200 (C++ Parsers): Remove.
13201
99be0235
AD
132022005-06-22 Akim Demaille <akim@epita.fr>
13203
13204 * data/lalr1.cc (yylex_): Honor %lex-param.
13205
0ffd4fd1
AD
132062005-06-22 Akim Demaille <akim@epita.fr>
13207
13208 Start a set of simple examples.
13209 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
13210 * examples/calc++/calc++-driver.hh,
13211 * examples/calc++/calc++-parser.yy,
13212 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
13213 * examples/calc++/compile, examples/calc++/test: New.
13214
0925ebb4
PE
132152005-06-09 Paul Eggert <eggert@cs.ucla.edu>
13216
13217 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
13218 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
13219 which stems from the 2005-05-27 patch.
13220
43d3b664
PH
132212005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13222
13223 * data/glr.c: Modify treatment of unused parameters to permit use
13224 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
13225
3062864d
PE
132262005-05-30 Paul Eggert <eggert@cs.ucla.edu>
13227
13228 Fix infringement on user name space reported by Janos Zoltan Szabo.
13229 * data/yacc.c (yyparse): strlen -> yystrlen.
13230
989b5b8e
AD
132312005-05-30 Akim Demaille <akim@epita.fr>
13232
13233 * data/lalr1.cc (_): New.
13234 Translate the various messages.
13235
bedf57f5
PE
132362005-05-27 Paul Eggert <eggert@cs.ucla.edu>
13237
13238 Fix infringement on user name space reported by Bruno Haible.
13239 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
13240 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
13241 the user's name space.
13242 (alloca): Include <stdlib.h> to get it, if it's not built in.
13243 (YYMALLOC, YYFREE): Define only if needed.
13244 (malloc, free): Declare, but only if needed, as this infringes on
13245 the user name space.
13246
4d1801f1
PE
132472005-05-25 Paul Eggert <eggert@cs.ucla.edu>
13248
13249 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
13250 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
13251 with %d format.
13252 * lib/ebitset.c (min, max): Undef before defining.
13253 * lib/vbitset.c (min, max): Likewise.
13254 * lib/subpipe.c (create_subpipe): Save local variables in case
13255 vfork clobbers them.
13256
132572005-05-24 Bruno Haible <bruno@clisp.org>
13258
13259 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
13260 error message syntax used by gcc-4.0.
13261
b94a9e1e
PE
132622005-05-23 Paul Eggert <eggert@cs.ucla.edu>
13263
85ac3861
PE
13264 * README: Mention m4 1.4.3. Remove obsolete advice about
13265 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
13266
b94a9e1e
PE
13267 * bootstrap: Remove workaround for problem I encountered with
13268 gettext 0.14.1; it seems to be fixed now.
13269
51c30d21
PE
132702005-05-22 Paul Eggert <eggert@cs.ucla.edu>
13271
009ce67d
PE
13272 * NEWS: Version 2.0a.
13273
f2a97c62
PE
13274 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
13275 the previous change.
13276
c8775f93
PE
13277 Various maintainer cleanups.
13278 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
13279 conftest*, for benefit of CVS commands run at the same time as
13280 "configure". Add build-aux, since "bootstrap" now creates it and
13281 its subfiles.
13282 * Makefile.cfg (move_if_change): Remove.
13283 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
13284 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
13285 (po_repo, do-po-update, po-update, wget_files, get-targets):
13286 (config.guess-url_prefix, config.sub-url_prefix):
13287 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
13288 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
13289 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
13290 Remove.
13291 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
13292 this is now the recommended name.
13293 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
13294 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
13295 ylwrap. These files now go into build-aux.
13296 * config/move-if-change: Remove.
13297 * config/prev-version.txt: Bump from 1.75 to 2.0.
13298
3ea5f0ec
PE
13299 * bootstrap: Add stdio-safer, unistd-safer modules.
13300 Remove m4/glibc2.m4 (introduced by latest gnulib, but
13301 we don't need it).
13302 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
13303 fopen-safer.c, stdio-safer.h, unistd-safer.h.
13304 * lib/subpipe.c: Include "unistd-safer.h".
13305 (create_subpipe): Make sure all the newly-created
13306 file descriptors are > 2, so that diagnostics don't
13307 get sent down them (which might cause Bison to hang, in theory).
13308 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
13309 * src/files.c (xfopen): Use fopen_safer, not fopen.
13310
51c30d21
PE
13311 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
13312 yesterday's yacc.c fix.
13313
cea1469d
PE
133142005-05-21 Paul Eggert <eggert@cs.ucla.edu>
13315
3ea5f0ec
PE
13316 * data/glr.c, data/lalr1.cc: Update copyright date.
13317
cea1469d
PE
13318 Fix a destructor bug reported by Wolfgang Spraul in
13319 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
13320 * data/yacc.c (yyabortlab): Don't call destructor, and
13321 don't set yychar to EMPTY.
13322 (yyoverflowlab): Don't call destructor.
13323 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
13324 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
13325 since we no longer output the message "discarding lookahead token
13326 end of input ()".
13327
5e6f62f2
PH
133282005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13329
13330 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
13331 fix a small glitch in debugging output.
13332 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
13333 after YY_SYMBOL_PRINT where needed.
13334
13335 (struct yyGLRState): Add some comments.
13336 (struct yySemanticOption): Add some comments.
13337 (union yyGLRStackItem): Add comment.
13338
13339 (yymergeOptionSets): Correct this to properly perform the union,
13340 avoiding infinite reported by Michael Rosien.
13341 Update comment.
13342
13343 * tests/glr-regression.at: Add test for GLR merging error reported
13344 by M. Rosien.
cea1469d 13345
0fb669f9
PE
133462005-05-13 Paul Eggert <eggert@cs.ucla.edu>
13347
13348 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
13349 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
13350 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
13351 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
13352 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
13353 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
13354 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
13355 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
13356 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
13357 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
13358 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
13359 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
13360 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
13361 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
13362 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
13363 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
13364 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
13365 src/derives.h, src/files.c, src/files.h, src/getargs.c,
13366 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
13367 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
13368 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
13369 src/output.h, src/parse-gram.c, src/parse-gram.h,
13370 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
13371 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
13372 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
13373 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
13374 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
13375 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
13376 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
13377 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
13378 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
13379 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
13380 tests/reduce.at, tests/regression.at, tests/sets.at,
13381 tests/synclines.at, tests/testsuite.at, tests/torture.at:
13382 Update FSF postal mail address.
13383
51f4735e
PE
133842005-05-11 Paul Eggert <eggert@cs.ucla.edu>
13385
13386 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
13387 Problem reported by Ralf Menzel.
13388
80ce3401
PE
133892005-05-01 Paul Eggert <eggert@cs.ucla.edu>
13390
13391 * tests/actions.at: Test that stack overflow invokes destructors.
13392 From Marcus Holland-Moritz.
13393 * data/yacc.c (yyerrlab): Move the code that destroys the stack
13394 from here....
13395 (yyreturn): to here. That way, destructors are called properly
13396 even if the stack overflows, or the user calls YYACCEPT or
13397 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
13398 (yyoverflowlab): Destroy the lookahead.
13399
134002005-04-24 Paul Eggert <eggert@cs.ucla.edu>
13401
13402 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
13403
72f000b0
PE
134042005-04-17 Paul Eggert <eggert@cs.ucla.edu>
13405
13406 * NEWS: Bison-generated C parsers no longer quote literal strings
13407 associated with tokens.
13408 * src/output.c (prepare_symbols): Don't escape strings,
13409 since users don't want to see C escapes.
13410 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
13411 in diagnostics.
c19683bb 13412 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
13413 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
13414
1094323f
PE
134152005-04-16 Paul Eggert <eggert@cs.ucla.edu>
13416
13417 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
13418 the data size is known to be too small and we can't increase it.
13419 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
13420
ca407bdf
PE
134212005-04-15 Paul Eggert <eggert@cs.ucla.edu>
13422
13423 * src/parse-gram.y: Include quotearg.h.
13424 (string_as_id): Quote $1 before using it as a key, since the
13425 lexer no longer quotes it for us.
13426 (string_content): Don't strip quotes, since lexer no longer
13427 quotes it for us.
13428 * src/scan-gram.l: Include quotearg.h.
13429 ("\""): Omit quote.
13430 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
13431 a key, since the rest of the lexer doesn't quote it.
13432 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
13433 * tests/regression.at (Token definitions): Check for backslashes
13434 in token strings.
13435
13436 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
13437 (YYSIZE_T): Define to unsigned long int when using an older compiler.
13438 (yyparse): Revamp code to generate long syntax error message, to
13439 make it easier to translate, and to avoid problems with arithmetic
13440 overflow. Change "virtual memory" to "memory" in diagnostic, since
13441 we don't know whether the memory is virtual.
13442
1ce59070
PE
134432005-04-13 Paul Eggert <eggert@cs.ucla.edu>
13444
13445 * NEWS: Bison-generated C parsers now use the _ macro to
13446 translate strings.
13447 * data/yacc.c (_) [!defined _]: New macro.
13448 All English strings wrapped inside this macro.
13449 * doc/bison.texinfo (Bison Parser): Document _.
13450 * po/POTFILES.in: Include src/parse-gram.c, since it now
13451 includes translateable strings that parse-gram.y doesn't.
13452
a749a695
PE
134532005-04-12 Paul Eggert <eggert@cs.ucla.edu>
13454
13455 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
13456 reverting the 2004-10-11 change to this function.
13457 (symbol_check_alias_consistency): Don't call symbol_type_set
13458 if the type name is already correct.
13459 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
13460
8fb1053b
PE
134612005-03-25 Paul Eggert <eggert@cs.ucla.edu>
13462
13463 * tests/regression.at (Token definitions): Don't use a token named
13464 c, as that generates a "#define c ..." that runs afoul of buggy
13465 stdlib.h that uses the identifier c as a member of struct
13466 drand48_data. Problem reported by Horst Wente.
13467
ff498c4a
PE
134682005-03-21 Paul Eggert <eggert@cs.ucla.edu>
13469
13470 * bootstrap: Change translation URL from
13471 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
13472 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
13473 redirection glitches. Problem reported by twlevo@xs4all.nl.
13474
65211d70
PE
134752005-03-20 Paul Eggert <eggert@cs.ucla.edu>
13476
13477 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
13478 after operands; POSIX says this isn't portable for the c99 command.
13479
9577fb1f
PE
134802005-03-18 Paul Eggert <eggert@cs.ucla.edu>
13481
13482 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
13483 immediately if a data overrun has occurred; this may help us track
13484 down what may be a spurious failure on MacOS.
13485
78b178f7
PE
134862005-03-17 Paul Eggert <eggert@cs.ucla.edu>
13487
a2599d0f
PE
13488 Respond to problems reported by twlevo@xs4all.nl.
13489
13490 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
13491
78b178f7
PE
13492 * src/vcg.h: Comment fix.
13493 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
13494 (G_CMAX): Change to -1 instead of INT_MAX.
13495
13496 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 13497
7296e729
PE
134982005-03-15 Paul Eggert <eggert@cs.ucla.edu>
13499
13500 * src/tables.c (state_number_to_vector_number): Put it inside an
13501 "#if 0", since it's not currently used. Problem reported by
13502 Roland McGrath.
13503
05ac60f3
PE
135042005-03-06 Paul Eggert <eggert@cs.ucla.edu>
13505
13506 * src/output.c (escaped_output): Renamed from
13507 escaped_file_name_output, since we now use it for symbol tags as
13508 well. All uses changed.
13509 (symbol_destructors_output, symbol_printers_output):
13510 Escape symbol tags too.
13511 Problem reported by Matyas Forstner in
13512 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
13513
13514 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
13515 not needed.
13516 * src/output.c (user_actions_output, token_definitions_output,
13517 symbol_destructors_output, symbol_printers_output): Likewise.
13518 * src/reader.c (prologue_augment): Likewise.
13519 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
13520
13521 * src/vcg.c (output_edge): Don't quote linestyle arg.
13522 Problem reported by twlevo@xs4all.nl.
13523
7eb453ac
PE
135242005-02-28 Paul Eggert <eggert@cs.ucla.edu>
13525
13526 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
13527 example, reported by Derek M Jones. Also, make the example even
13528 more outrageous, to better illustrate how bad the problem is.
13529
4c04c52a
PE
135302005-02-24 Paul Eggert <eggert@cs.ucla.edu>
13531
13532 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
13533 putsym. Typo reported by Sebastian Piping.
13534
a61e1620
PE
135352005-02-23 Paul Eggert <eggert@cs.ucla.edu>
13536
13537 * doc/bison.texinfo (Language and Grammar): some -> same
13538 (Epilogue): int he -> in the
13539 Typos reported by Sebastian Piping via Justin Pence.
13540
9ec93868
PE
135412005-02-07 Paul Eggert <eggert@cs.ucla.edu>
13542
13543 * tests/glr-regression.at (Improper handling of embedded actions
13544 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
13545 embedded actions and $-N in GLR parsers", work around an Autoconf bug
13546 with dollar signs in test names.
13547 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
13548 for a similar reason.
13549
73ce7e7e
PE
135502005-01-28 Paul Eggert <eggert@cs.ucla.edu>
13551
13552 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
13553 wants to redefine G_VIEW.
13554
2e72b98e
PE
135552005-01-27 Paul Eggert <eggert@cs.ucla.edu>
13556
13557 * src/vcg.c (get_view_str): Remove case for normal_view.
13558 Problem reported by twlevo@xs4all.nl.
13559
e0d634e5
PE
135602005-01-24 Paul Eggert <eggert@cs.ucla.edu>
13561
ccf830a4
PE
13562 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
13563 Problem reported by twlevo@xs4all.nl.
13564
e0d634e5
PE
13565 * doc/bison.texinfo: Change @dircategory from "GNU programming
13566 tools" to "Software development". Requested by Richard Stallman
13567 via Karl Berry.
13568
7bbc8cb0
PE
135692005-01-23 Paul Eggert <eggert@cs.ucla.edu>
13570
13571 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
13572 Problem reported by twlevo@xs4all.nl.
13573
08b770bc
PE
135742005-01-21 Paul Eggert <eggert@cs.ucla.edu>
13575
13576 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
13577 keyword; it's not needed with modern compilers, and it doesn't
13578 affect correctness with older compilers. Suggested by
13579 twlevo@xs4all.nl.
13580
95f22ad2
PE
135812005-01-17 Paul Eggert <eggert@cs.ucla.edu>
13582
13583 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
13584 gcc -Wswitch-default.
13585 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13586 * data/yacc.c (yyparse): Likewise.
13587
d229d15c
PE
135882005-01-12 Paul Eggert <eggert@cs.ucla.edu>
13589
13590 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
13591 already. Let config.h define any nonstandard values.
13592
ecadd90f
PE
135932005-01-10 Paul Eggert <eggert@cs.ucla.edu>
13594
13595 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
13596 for the benefit of slower hosts. Problem reported by
13597 Nelson H. F. Beebe.
13598
213744b5
PE
135992005-01-07 Paul Eggert <eggert@cs.ucla.edu>
13600
13601 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
13602 being defined and not used.
13603 * data/lalr1.cc (yyparse): Likewise.
13604 Use "if (false)" rather than "if (0)".
13605
249d3236
PE
136062005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13607
13608 * TODO: Mention that we should allow NUL bytes in tokens.
13609
987cc1fb
PE
136102005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13611
13612 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13613 Problem reported by Hans Aberg.
13614
08fe02d9
PE
136152005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13616
13617 * src/getargs.c (version): Happy new year; update overall
13618 program copyright date from 2004 to 2005.
13619
13620 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13621 Problem reported by Hans Aberg.
13622 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13623 (Output file names.): Add a test for the case when standard output
13624 is closed.
13625
010c0266
PE
136262004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13627
13628 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13629 to fix an oversight in the Bison 2.0 manual.
13630
da12206a
PE
136312004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13632
13633 * NEWS: Version 2.0. Reformat the existing news items since
13634 1.875, so that related items are grouped together.
3a4734aa 13635 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
13636 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13637
c935d934
PE
13638 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13639 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13640 otherwise, we're not testing alloca. Unfortunately there's no
13641 simple way to consult HAVE_ALLOCA here.
13642
da12206a
PE
13643 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13644 for yymsg, too.
13645
13646 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13647 hand. This avoids a warning about comparing int to size_t when
13648 GCC warnings are enabled.
13649
0a2c5137
PE
136502004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13651
d7e14fc0
PE
13652 * NEWS: Bison-generated parsers no longer default to using the
13653 alloca function (when available) to extend the parser stack, due
13654 to widespread problems in unchecked stack-overflow detection.
13655 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13656 responsibility to set it to a positive value. This lets the user
13657 specify a value that is not a preprocessor constant.
13658 * data/yacc.c (YYMAXDEPTH): Likewise.
13659 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13660 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13661 to be a compile-time constant. However, explain the constraints on it.
13662 Also, explain the constraints on YYINITDEPTH.
13663 (Table of Symbols): Explain that alloca is no longer the default.
13664 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13665 to 1.
13666
0a2c5137
PE
13667 * doc/bison.texinfo (Location Default Action): Mention that n must
13668 be zero when k is zero. Suggested by Frank Heckenbach.
13669
e019c247
AD
136702004-12-22 Akim Demaille <akim@epita.fr>
13671
13672 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13673 (parser::state_type, parser::semantic_type, parser::location_type):
13674 Private, not public.
13675 (parser::parse): Return ints, not bool.
13676 Returning a bool introduces a problem: 0 corresponds to false, and
13677 it seems weird to return false on success. Returning true changes
13678 the conventions for yyparse.
13679 Alternatively we could return void and send an exception.
13680 There is no clear consensus (yet?).
13681 (state_stack, semantic_stack, location_stack): Rename as...
13682 (state_stack_type, semantic_stack_type, location_stack_type): these.
13683 Private, not public.
13684 * tests/c++.at: New.
13685 * tests/testsuite.at, tests/Makefile.am: Adjust.
13686
72731bb7
AD
136872004-12-21 Akim Demaille <akim@epita.fr>
13688
13689 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13690
9a0d8bec
AD
136912004-12-21 Akim Demaille <akim@epita.fr>
13692
13693 Don't impose std::string for filenames.
13694
13695 * data/lalr1.cc (b4_filename_type): New.
13696 (position::filename): Use it.
13697 (parser.hh): Move the inclusion of stack.hh and location.hh below
13698 the user code, so that needed headers for the filename type can be
13699 included first.
72731bb7
AD
13700 Forward declare them before the user code.
13701 * tests/Makefile.am (check-local, installcheck-local): Pass
13702 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 13703
99880de5
AD
137042004-12-20 Akim Demaille <akim@epita.fr>
13705
13706 Use more STL like names: my_class instead of MyClass.
13707
13708 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13709 (SemanticStack, SemanticType, StateStack, StateType)
13710 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13711 (Parser::value): Rename as...
13712 (location_stack, location_type, rhs_number_type, semantic_stack)
13713 (semantic_type, state_stack, state_type, token_number_type, stack)
13714 (slice, traits, parser::yylloc, parser::yylval): these.
13715
13716 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13717
9bec482e
PE
137182004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13719
13720 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13721 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13722
f6fbd3da
PE
137232004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13724
13725 Remove uses of 'short int' and 'unsigned short int'. This raises
13726 some arbitrary limits. It uses more memory but nowadays that's
13727 not much of an issue.
13728
13729 This change does not affect the generated parsers; that's a different
13730 task, as some users will want to conserve memory there.
13731
13732 Ideally we should use size_t to represent all object counts, and
13733 something like ptrdiff_t to represent signed differences of object
13734 counts; but that will require more code-cleanup than I have the
13735 time to do right now.
13736
13737 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13738 Use size_t, not int or short int, to count objects.
13739 * src/closure.c (nritemset, closure): Likewise.
13740 * src/closure.h (nritemset, closure): Likewise.
13741 * src/nullable.c (nullable_compute): Likewise.
13742 * src/print.c (print_core): Likewise.
13743 * src/print_graph.c (print_core): Likewise.
13744 * src/state.c (state_compare, state_hash): Likewise.
13745 * src/state.h (struct state): Likewise.
13746 * src/tables.c (default_goto, goto_actions): Likewise.
13747
13748 * src/gram.h (rule_number, rule): Use int, not short int.
13749 * src/output.c (prepare_rules): Likewise.
13750 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13751 errs, reductions): Likewise.
13752 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13753 Likewise.
13754 * src/tables.c (vector_number, tally, action_number,
13755 ACTION_NUMBER_MINIMUM): Likewise.
13756 * src/output.c (muscle_insert_short_int_table): Remove.
13757
efeed023
AD
137582004-12-17 Akim Demaille <akim@epita.fr>
13759
13760 * data/lalr1.cc: Extensive Doxygenation.
13761 (error_): Rename as...
13762 (error): this, since it is visible to the user.
13763 Adjust callers.
13764 (Parser::message): Now an automatic variable from...
13765 (Parser::yyreport_syntax_error_): here.
13766 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13767 Parser::error.
13768 * tests/input.at: Escape $.
13769
bc82c5a5
PE
137702004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13771
13772 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13773 Parenthesize rhs to avoid obscure problems with mistakes like
13774 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13775 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13776 b4_rhs_location): Likewise.
13777 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13778 b4_rhs_location): Likewise.
13779
fd19f271
AD
137802004-12-16 Akim Demaille <akim@epita.fr>
13781
13782 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13783 yacc.c: be sure to stay within yycheck_.
13784 * tests/actions.at: Re-enable C++ tests.
13785
10454ea4
AD
137862004-12-16 Akim Demaille <akim@epita.fr>
13787
13788 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13789 real.
13790
c5b95ccf
AD
137912004-12-16 Akim Demaille <akim@epita.fr>
13792
13793 Use #define to handle the %name-prefix.
13794
13795 * data/glr.c, data/yacc.c: Comment changes.
13796 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13797 so that one can refer to yylex in the parser file, and have it
13798 renamed, as is the case with other skeletons.
13799
617a8f12
AD
138002004-12-16 Akim Demaille <akim@epita.fr>
13801
13802 Move lalr1.cc internals into yy*.
13803
13804 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13805 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13806 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13807 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13808 (empty_, final_, terror_, errcode_, ntokens_)
13809 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13810 (looka_, ilooka_, error_range_, nerrs_):
13811 Rename as...
13812 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13813 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13814 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13815 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13816 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13817 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13818 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13819 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13820 these.
13821
1e547e6e
PE
138222004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13823
13824 Fix some problems reported by twlevo at xs4all.
13825 * src/symtab.c (symbol_new): Report an error if the input grammar
13826 contains too many symbols. This is better than calling abort() later.
13827 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13828 (struct node, struct graph):
13829 Rename member expand to stretch. All uses changed.
13830 (struct graph): Remove member layoutalgorithm. All uses removed.
13831 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13832 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13833 All uses changed.
13834 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13835
735d6bd4
AD
138362004-12-15 Akim Demaille <akim@epita.fr>
13837
13838 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13839 Add more Doxygen comments.
13840 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13841 (report_syntax_error_, translate_): Rename as...
13842 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13843 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13844
2e1f5829
AD
138452004-12-15 Akim Demaille <akim@epita.fr>
13846
13847 * data/lalr1.cc (lex_): Rename as...
13848 (yylex_): this.
13849 Move the trace here.
13850 Take the %name-prefix into account.
13851 Reported by Alexandre Duret-Lutz.
13852
a3cb6248
AD
138532004-12-15 Akim Demaille <akim@epita.fr>
13854
13855 Simplify the C++ parser constructor.
13856
13857 * data/lalr1.cc (debug_): Rename as...
13858 (yydebug_): so that the parser's internals are always in the yy*
13859 pseudo namespace.
13860 Adjust uses.
13861 (b4_parse_param_decl): Remove the leading comma as it is now only
13862 called as unique argument list.
13863 (Parser::Parser): Remove the constructor accepting a location and
13864 an initial debugging level.
13865 Remove from the other ctor the argument for the debugging level.
13866 (debug_level_type, debug_level, set_debug_level): New.
13867
13868 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13869 constructor calls.
13870
07fed891
AD
138712004-12-15 Akim Demaille <akim@epita.fr>
13872
13873 Remove b4_root related material: failure experiment
a3cb6248 13874 (which goal was to allow to derive from a class).
07fed891
AD
13875
13876 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13877 definitions and uses.
13878
e603eaa5
PE
138792004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13880
13881 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13882 not 2, since it's not portable to subtract 1 from the start of an
13883 array. The new item 0 is never set or used. All uses changed.
13884
13885 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13886 the default definition of YYLLOC_DEFAULT. Problem reported
13887 by Frank Heckenbach.
13888
fafb007d
PE
138892004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13890
13891 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13892 the normal case and one for the error case. Just use the
13893 first one uniformly. Problem reported by Frank Heckenbach.
13894 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13895 use exactly the same macro in both places.
13896 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13897 so that the normal-case YYRHSLOC works for the error case too.
13898 All uses changed.
13899 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13900 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13901 * doc/bison.texinfo (Location Default Action): Don't claim that
13902 we have an array of locations. Use the same macro for both glr
13903 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13904 the index is 0.
13905
48814dcd
PE
139062004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13907
a4e1a53b
PE
13908 * HACKING: Update email addresses to send announcements to.
13909
48814dcd
PE
13910 * configure.ac (AC_INIT): Bump version to 1.875f.
13911
337116ba
PE
139122004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13913
13914 * NEWS: Version 1.875e.
13915 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13916
13917 * src/scan-skel.l: Include "complain.h", for "fatal".
13918
13919 * src/relation.h (relation_print, relation_digraph):
13920 Relation sizes are of type relation_node, not size_t (this is
13921 merely a doc fix, since the two types are equivalent).
13922 (relation_transpose): Relation sizes are of type relation_node,
13923 not int.
13924 * src/relation.c: Likewise.
13925 (top, infinity): Now of type relation_node, not int.
13926 (traverse, relation_transpose): Use relation_node, not int.
13927
13928 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13929 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13930 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13931
13932 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 13933 specifying whether the test should be skipped. Use it tp
337116ba 13934 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 13935 fail on some hosts, and should be skipped.
337116ba 13936
da2a7671
PE
139372004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13938
13939 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13940 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13941 unless otherwise specified below.
13942
13943 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13944 to allocate kernel_base, kernel_items, kernel_size, since
13945 they needn't be initialized to 0.
13946 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13947 * src/closure.c (new_closure): Likewise, for itemset.
13948 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13949 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13950 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13951 (build_relations): Likewise for edge, states1, includes.
13952 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13953 * src/reader.c (packgram): Likewise, for ritem, rules.
13954 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13955 * src/relation.c (relation_digraph): Likewise for VERTICES.
13956 (relation_transpose): Likewise for new_R, end_R.
13957 * src/symtab.c (symbols_token_translations_init): Likewise for
13958 token_translations.
13959 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13960 (token_actions): Likewise for yydefact, actrow, conflrow,
13961 conflict_list.
13962 (save_column): Likewise for froms[symno], tos[symno].
13963 (goto_actions): Likewise for state_count.
13964 (pack_table): Likewise for base, pos, check.
13965 (tables_generate): Likewise for width.
13966
13967 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13968 for initial core. Just have a separate core, so we needn't worry
13969 about whether kernel_size and kernel_base are initialized.
13970
13971 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13972 kernel_size, kernel_items): Remove unnecessary initialization.
13973 * src/conflicts.c (conflicts): Likewise.
13974 * src/derives.c (derives): Likewise.
13975 * src/muscle_tablc (muscle_insert): Likewise.
13976 * src/relation.c (relation_digraph): Likewise.
13977 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13978 conflrow, conflict_table, conflict_list, table, check):
13979 Likewise.
13980
13981 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13982 This is because all callers pass unsigned int.
13983 * src/closure.h (new_closure): Likewise.
13984
13985 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13986 (build_relations): Initialize includes[i] in all cases.
13987 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13988 and rules[ruleno].precsym. Initialize members in order.
13989 * src/relation.c (relation_transpose): Always initialize new_R[i]
13990 and end_R[i].
13991 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13992
13993 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13994 conflict_list[0] was always 0, but now it isn't initialized.
13995
13996 * src/table.c (table_grow): When conflict_table grew, the grown
13997 area wasn't cleared. Fix this.
13998
13999 * lib/.cvsignore: Add strdup.c, strdup.h.
14000 * m4/.cvsignore: Add strdup.m4.
14001
00baeeac
PE
140022004-12-07 Paul Eggert <eggert@cs.ucla.edu>
14003
14004 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
14005 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
14006 GOTO_NUMBER_MAXIMUM, since we occasionally compute
14007 ngotos + 1 without checking for overflow.
14008 (build_relations): Use END_NODE, not -1, to denote end of edges.
14009 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
14010 build_relations): Use goto_number, not int, for goto numbers.
14011 * src/tables.c (save_column, default_goto): Likewise.
14012
be3d9d42
AD
140132004-11-23 Akim Demaille <akim@epita.fr>
14014
14015 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
14016 of #defining from yystype.
14017 Don't typedef yystype, C++ does not need it.
14018 This lets it possible to forward declare it as union.
14019
78e526d5
PE
140202004-11-23 Paul Eggert <eggert@cs.ucla.edu>
14021
14022 * bootstrap (gnulib_modules): Add extensions.
14023 Problem reported by Jim Meyering.
14024
afbb696d
PE
140252004-11-22 Paul Eggert <eggert@cs.ucla.edu>
14026
14027 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
14028 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
14029 src/system.h, src/tables.c: XFREE -> free, to accommodate
14030 recent change to gnulib xalloc.h.
78e526d5 14031 Problem reported by Jim Meyering.
afbb696d 14032
c1f8f16a
AD
140332004-11-17 Akim Demaille <akim@epita.fr>
14034
14035 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
14036
db7e5eb5 140372004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
14038 Alexandre Duret-Lutz <adl@gnu.org>
14039
14040 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
14041 changes.
14042 (YYCDEBUG): Adjust.
14043 Use it instead of cdebug_.
14044 (Parser::debug_stream, Parser::set_debug_stream): New.
14045 (Parser::symprint_): Define cdebug_ for temporary backward
14046 compatibility.
14047 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
14048 debug_stream ().
14049
68e11668
AD
140502004-11-17 Akim Demaille <akim@epita.fr>
14051
14052 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
14053 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
14054 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
14055 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14056
97cbc73e
PE
140572004-10-27 Paul Eggert <eggert@cs.ucla.edu>
14058
14059 * data/glr.c (yyloc_default): Remove; not used.
14060 Problem reported by Frank Heckenbach.
14061
e342c3be
AD
140622004-10-25 Akim Demaille <akim@epita.fr>
14063
14064 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
14065 Introduce another definition to address simple location arrays.
14066 (yyGLRStack): New member: yyerror_range.
14067 (yyrecoverSyntaxError, yyparse): Update it.
14068 (yyrecoverSyntaxError): Use it when shifting the error token to
14069 have an accurate range, equivalent to the one computed by both
14070 yacc.c and lalr1.cc.
14071 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
14072 that column numbers start at column 0, as per GNU Coding
14073 Standards, the others tests, and the doc.
14074 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
14075 Adjust to the above change (first column is 0).
14076 And adjust the location of the "<error>", now covering the whole
14077 line.
14078
93602feb 140792004-10-22 Akim Demaille <akim@epita.fr>
04098407 14080 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
14081
14082 Remove some arbitrary limits on goto numbers and relations.
14083 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
14084 initial values, since they're never used.
14085 (set_goto_map): ngotos is now unsigned, so test for overflow
14086 by seeing whether it wraps around to zero.
14087 * src/lalr.h (goto_number): Now size_t, not short int.
14088 (GOTO_NUMBER_MAXIMUM): Remove.
14089 * src/relation.c (relation_print, traverse, relation_transpose):
14090 Check for END_NODE rather than looking at sign.
14091 * src/relation.h (END_NODE): New macro.
14092 (relation_node): Now size_t, not short int.
14093
dba08b04
PE
140942004-10-22 Paul Eggert <eggert@cs.ucla.edu>
14095
14096 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
14097 keyword, not an identifier. Problem reported by Baron Schwartz in
14098 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
14099
df09ef2e
AD
141002004-10-11 Akim Demaille <akim@epita.fr>
14101
14102 * src/symtab.c (symbol_check_alias_consistency): Also check
14103 type names, destructors, and printers.
14104 Reported by Alexandre Duret-Lutz.
14105 Recode the handling of associativity and precedence in terms
14106 of symbol_precedence_set.
14107 Accept no redeclaration at all, not even equal to the previous
14108 value.
14109 (redeclaration): New.
14110 Use it to factor redeclaration complaints.
14111 (symbol_make_alias): Don't set the type of the alias, let
14112 symbol_check_alias_consistency do it as for other features.
14113 * src/symtab.h (symbol): Add new member prec_location, and
14114 type_location.
14115 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
14116 * tests/input.at (Incompatible Aliases): New.
14117
146bc99d
PE
141182004-10-09 Paul Eggert <eggert@cs.ucla.edu>
14119
14120 .cvsignore fixes to accommodate gnulib changes,
14121 and the practice of naming build directories "_build".
14122 * .cvsignore: Add "_*". Sort.
14123 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
14124 * m4/.cvsignore: Add "*_gl.m4".
14125
e503aa60
AD
141262004-10-06 Akim Demaille <akim@epita.fr>
14127
14128 * src/parse-gram.y (add_param): Fix the truncation of trailing
14129 spaces.
14130
b4a20338
AD
141312004-10-05 Akim Demaille <akim@epita.fr>
14132
14133 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
14134 whether the reducion was empty or not. This leaves room to
14135 improve the use of YYLLOC_DEFAULT in such a case.
14136 lalr1.cc is still experimental, so changing this is acceptable.
14137 And finally, there are probably not many users who changed the
14138 handling of locations in GLR, so changing is admissible too.
14139
14140 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
14141 empty reduction, set @$ to an empty location ending the previously
14142 stacked symbol.
14143 Adjust uses to make sure the code is triggered on empty
14144 reductions.
14145 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
14146 expected output: empty reductions have empty locations.
14147
f85a5e6f
AD
141482004-09-29 Akim Demaille <akim@epita.fr>
14149
14150 * data/lalr1.cc: Move towards a more standard C++ coding style
14151 for templates: Class < T > -> Class<T>.
14152
b203fc2c
AD
141532004-09-29 Akim Demaille <akim@epita.fr>
14154
14155 * data/lalr1.cc: Reinstall the former ctor, for sake of
14156 compatibility, but warn it will be removed.
14157 Move towards a more standard C++ coding style (i.e., type *var ->
14158 type* var).
14159
5b7e1e73
PE
141602004-09-27 Paul Eggert <eggert@cs.ucla.edu>
14161
3fee967f
PE
14162 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
14163 since it's less likely to work if NULs are involved in the future.
5b7e1e73 14164
0dcca5c2
AD
141652004-09-27 Akim Demaille <akim@epita.fr>
14166
14167 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
14168
6dde1c82
AD
141692004-09-27 Akim Demaille <akim@epita.fr>
14170
14171 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 14172 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
14173 and argument names.
14174 (b4_cc_constructor_call): Likewise.
14175
b233d555
AD
141762004-09-24 Akim Demaille <akim@epita.fr>
14177
14178 * src/parse-gram.y (add_param): Strip the leading and trailing
14179 blanks from a formal argument declaration.
14180 (YY_LOCATION_PRINT): New.
14181
619404e3
AD
141822004-09-24 Akim Demaille <akim@epita.fr>
14183
14184 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
14185 after the location.
14186
dd8d9022
AD
141872004-09-24 Akim Demaille <akim@epita.fr>
14188
14189 * doc/bison.texinfo (Table of Symbols): Sort.
14190
0092f063
AD
141912004-09-21 Akim Demaille <akim@epita.fr>
14192
14193 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
14194 the useless parentheses.
14195 Suggested by Paul Eggert.
14196
451364ed
AD
141972004-09-20 Akim Demaille <akim@epita.fr>
14198
14199 Let the initial-action act on the look-ahead, and use it for the
14200 "initial push" (corresponding to an hypothetical beginning-of-file).
14201 And let lalr1.cc honor %initial-action.
14202
14203 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
14204 example.
14205 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
14206 (Parser::Parser): Remove the ctor that used to initialize it.
14207 (Parser::parse): Like in the other skeletons, issue the "starting
14208 parse" message before any action.
14209 Honor %initial-action.
14210 Initialize the stacks with the lookahead.
14211 * data/yacc.c: Let $$ and @$ in %initial-action designate the
14212 look-ahead.
14213 Push them in the stacks.
14214 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
14215
18d192f0
AD
142162004-09-20 Akim Demaille <akim@epita.fr>
14217
14218 * doc/bison.texinfo (Initial Action Decl): New.
14219
b8458aa5
AD
142202004-09-20 Akim Demaille <akim@epita.fr>
14221
14222 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
14223 clearer criterion to define it.
14224 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
14225 When reducing on an empty RHS, use the latest stacked location as
14226 location.
14227 yylloc is not always available.
14228 * data/glr.c: Likewise.
14229 Also, honor initial-actions.
14230
3fc16193
AD
142312004-09-20 Akim Demaille <akim@epita.fr>
14232
14233 * data/yacc.c (YY_LOCATION_PRINT): New.
14234 Define when we know YYLTYPE's structure, i.e., when the default
14235 YYLLOC_DEFAULT is used.
14236 * data/c.m4 (b4_yysymprint_generate): Use it.
14237 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
14238 value of the result.
14239 (error_start_): Replace with...
14240 (error_range_): this location array.
14241 This allows to replace code relying on the implementation of
14242 locations by portable code.
14243 * data/yacc.c (yylerrsp): Replace with...
14244 (yyerror_range): this.
14245 Every time a token is popped, update yyerror_range[0], to have an
14246 accurate location for the error token.
14247 * data/glr.c (YY_LOCATION_PRINT): New.
14248 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
14249 deference a pointer.
14250 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
14251 report the location in %printers.
14252
14253 * src/scan-skel.l: Instead of abort, report error messages to ease
14254 understanding skeleton scanning failures.
14255
ecfe33e7
AD
142562004-09-16 Akim Demaille <akim@epita.fr>
14257
14258 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
14259 (iterator, const_iterator): these, to be more in the C++ spirit.
14260 Also, return reverse iterators so that when displaying the stack
14261 we display its bottom first.
14262 (Parser::stack_print_, Parser::reduce_print_): Match the messages
14263 from yacc.c.
14264 We should probably use vector here though.
14265
1576d44d
AD
142662004-09-16 Akim Demaille <akim@epita.fr>
14267
14268 Have more complete shift traces.
14269
14270 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
14271 to report Shifts instead of ad hoc YYDPRINTF invocations,
14272 including for the error token.
14273 * data/lalr1.cc (symprint_): Output the location.
14274 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
14275 output the location within the %printer.
14276 Activate GLR tests, at least to make sure they compile properly.
14277 They still don't pass though.
14278 * tests/calc.at: Adjust expect verbose output, since now "Entering
14279 state..." is on a different line than the "Shifting" message.
14280
9c66f418
AD
142812004-09-08 Akim Demaille <akim@epita.fr>
14282
14283 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
14284 Bison directive from the Bison file to the invocation of this
14285 macro, so that these directives are passed to
14286 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
14287 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
14288 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
14289 the extra Bison directives instead of the whole series.
14290 Change the grammar so that there are recoverable errors, and
14291 unrecoverable errors. Now we can have the parser give up before
14292 consuming the whole input. As a result we now can observe that
14293 the lookahead is freed when needed.
14294 Change the parser source to parse argv[1] instead of a hard coded
14295 string.
14296 Simplify yylex, and give a value and location to EOF.
14297 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
14298 passed directives already coded in the file.
14299 Add some tests to check the location of "error".
14300 For some tests, the C++ parser is correct, and not yacc.c.
14301 For other tests, they provide different, but unsatisfying, values,
14302 so keep the C++ value so that at least one parser is "correct"
14303 according to the test suite.
14304 (Actions after errors): Remove, this is subsumed by the
14305 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
14306
52d5733f
AD
143072004-09-06 Akim Demaille <akim@epita.fr>
14308
14309 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 14310 (Parser::pop): New.
52d5733f
AD
14311 Use it.
14312
a0e68930
AD
143132004-09-06 Akim Demaille <akim@epita.fr>
14314
14315 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
14316 argument, an informative message.
14317 Call YY_SYMBOL_PRINT.
14318 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
14319 * data/lalr1.cc (destruct_): Likewise.
14320 In addition, no longer depend on b4_yysymprint_generate and
14321 b4_yydestruct_generate to generate these functions, do it "by
14322 hand".
14323
e757bb10
AD
143242004-09-03 Akim Demaille <akim@epita.fr>
14325
14326 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
14327 invoked, yydestruct the lookahead.
14328 * tests/calc.at (Calculator $1): Update the expected lengths of
14329 traces: there is an added line for the discarded lookahead.
14330 * doc/bison.texinfo (Destructor Decl): Some rewording.
14331 Define "discarded" symbols.
14332
0fe1f06d
AD
143332004-09-02 Akim Demaille <akim@epita.fr>
14334
14335 * data/lalr1.cc (translate_, destruct_): No reason to be static.
14336
284acc8b
AD
143372004-09-02 Akim Demaille <akim@epita.fr>
14338
14339 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
14340 (YYDSYMPRINTF): Rename as...
14341 (YY_SYMBOL_PRINT): this.
14342 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
14343 two.
14344 Use it instead of direct symprint_ calls.
14345 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
14346 one.
14347
a5eb1ed2
AD
143482004-09-02 Akim Demaille <akim@epita.fr>
14349
b7c72fe1
AD
14350 * data/lalr1.cc (b4_yysymprint_generate): New.
14351 (symprint_): New member function, defined when YYDEBUG.
14352 Use it consistently instead of token/nterm debugging output by
14353 hand.
a5eb1ed2
AD
14354 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
14355 %printer calls to use cdebug_ when using lalr1.cc.
14356
417141dd
AD
143572004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
14358
14359 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
14360 with #ifdef YYDEBUG.
14361
2fa09258
AD
143622004-08-26 Akim Demaille <akim@epita.fr>
14363
14364 * doc/bison.texinfo (Implementing Loops): Rename as...
14365 (Implementing Gotos/Loops): this.
14366
9378b508
PE
143672004-08-13 Paul Eggert <eggert@cs.ucla.edu>
14368
14369 Adjust to latest gnulib.
14370 * bootstrap (gnulib_modules): Add xalloc-die.
14371 Set LC_ALL=C so that file names sort consistently.
14372 Prefer the gnulib copies of gettext.m4, glibc21.m4,
14373 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
14374 uintmax_t.m4, ulonglong.m4.
14375 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
14376 po.m4 since we are now using _gl.m4 instead.
14377
87a8ad5c
PE
143782004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
14379
14380 * src/scan-action.l: Remove. Scanning of semantic actions is
14381 handled in scan-gram.l.
14382
dca81a78
PE
143832004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
14384
14385 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
14386
14387 * src/location.h (struct): The file member is a uniqstr.
14388 (equal_boundaries): Use UNIQSTR_EQ for comparison.
14389
c9cbf7c5
PE
143902004-07-22 Paul Eggert <eggert@cs.ucla.edu>
14391
14392 Fix bug with non-%union parsers that have printers or destructors,
14393 which led to a Bison core dump. Reported by Peter Fales in
14394 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 14395
c9cbf7c5
PE
14396 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
14397 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
14398 not to our own type.
14399 * src/output.c (symbol_destructors_output, symbol_printers_output):
14400 Don't assume %union.
14401 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
14402 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
14403 UNION-FLAG. All callers changed.
14404 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
14405 Use type char, not unsigned int, when declaring an array of char;
14406 this lets us remove a cast.
14407 (Printers and Destructors): Add non-%union test cases.
14408
fa7e68c3
PE
144092004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14410
14411 * doc/bison.texinfo: Minor editorial changes, mostly to the new
14412 GLR writeups. E.g., avoid frenchspacing and the future tense,
14413 change "lookahead" to "look-ahead", and change "wrt" to "with
14414 respect to".
2fa09258 14415
fa7e68c3
PE
144162004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14417
14418 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
14419 New sections, split off from the GLR Parsers section. Put the new
14420 Simple GLR Parser near the start of the GLR section, for clarity.
14421 Rewrite connective text.
14422
99a9344e
PE
144232004-06-21 Frank Heckenbach <frank@g-n-u.de>
14424
14425 * doc/bison.texinfo (Simple GLR Parsers): New section.
14426
8dd162d3
PE
144272004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14428
14429 * NEWS, TODO, doc/bison.texinfo:
14430 Use "look-ahead" instead of "lookahead", to be consistent.
14431 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
14432 while we're fixing "look-ahead".
14433 * src/conflicts.c (shift_set): Renamed from shiftset.
14434 (look_ahead_set): Renamed from lookaheadset.
14435 * src/print.c: Likewise.
14436 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
14437 name for "lookahead".
14438 (report_types, usage): Likewise.
14439 * src/getargs.h (report_look_ahead_tokens): Renamed from
14440 report_lookaheads.
14441 * src/lalr.c (compute_look_ahead_tokens): Renamed from
14442 compute_lookaheads.
14443 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
14444 (look_ahead_tokens_print): Renamed from lookaheads_print.
14445 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
14446 state_rule_lookaheads_print.
14447 * src/state.h: Likewise.
14448 (reductions.look_ahead_tokens): Renamed from lookaheads.
14449 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
14450 AT_DATA_LOOKAHEADS_GRAMMAR.
14451
57a90331
PE
144522004-06-03 Paul Eggert <eggert@cs.ucla.edu>
14453
14454 * README: Update location of patched M4 distribution.
14455
8ed3234a
PE
144562004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
14457
14458 Don't assume the C++ compiler takes the same arguments as the C compiler
14459 (trivial change).
14460 * configure.ac (O0CXXFLAGS): New var.
14461 * tests/atlocal.in (CXXFLAGS): Use it.
14462
07971983
PE
144632004-05-29 Paul Eggert <eggert@cs.ucla.edu>
14464
14465 Fix some "make check" problems with C++ reported by
14466 Albert Chin-A-Young for Tru64 C++ in this thread:
14467 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
14468
14469 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
14470 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14471 Output to a .cc file for C++, not to a .c file.
14472 * tests/calc.at (AT_CHECK_CALC): Likewise.
14473 * tests/regression.at (AT_CHECK_DANCER): Likewise.
14474 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
14475
29058652
PE
144762004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
14477
14478 * tests/calc.at, tests/actions.at: Workaround for SGI
14479 C++ compiler. (trivial change)
14480
62cb8a99
PE
144812004-05-27 Paul Eggert <eggert@cs.ucla.edu>
14482
fd418816
PE
14483 Spent a few hours checking out which prerequisite versions the
14484 current sources actually require. I went all the way back to
14485 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
14486 a seemingly endless set of combinations of versions more recent
14487 than that. The bottom line is that the current sources require
14488 fairly recent versions of the build tools, and it'll be some work
14489 to change this.
14490 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
14491 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
14492 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
14493 Add comments explaining why those particular versions are
14494 currently needed.
2fa09258 14495
62cb8a99
PE
14496 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
14497 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 14498 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
14499
14500 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
14501 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
14502
caa52c10
PE
145032004-05-26 Paul Eggert <eggert@cs.ucla.edu>
14504
14505 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
14506 0.11.5. Suggested by Bruno Haible.
14507 * bootstrap: Remove gettext version checking.
14508
14509 * doc/bison.texinfo (Decl Summary): Also mention that %union
14510 can depend on prerequisite types. Problem reported by Tim
14511 Van Holder.
14512
4bfd5e4e
PE
145132004-05-25 Paul Eggert <eggert@cs.ucla.edu>
14514
2cef3017
PE
14515 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
14516 * README-alpha: Don't tell people not to package this.
14517
b9c85d5c
PE
14518 * bootstrap: Don't assume $(...) works; use `...` instead.
14519 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
14520 gettext better.
14521
4bfd5e4e
PE
14522 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
14523 put into the -d output file, and mention what to do if YYSTYPE is
14524 defined as a macro.
14525
6a36ff94
PE
145262004-05-24 Paul Eggert <eggert@cs.ucla.edu>
14527
6712933e
PE
14528 Undo change made earlier today: it caused autopoint to not bring
14529 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
14530 autopoint's.
14531
14532 * bootstrap: Check that gettext version matches what's in
14533 configure.ac. Warn users to ignore robots.txt ERROR 404.
14534 * bootstrap: Undo today's earlier change (logged below).
14535 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 14536
6a36ff94
PE
14537 The gettext version checking is causing more trouble than it's
14538 curing; remove it. Problem reported by Paul Hilfinger.
14539
14540 * bootstrap: Issue a warning that one can expect a message
14541 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
14542 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
14543
209ea708
PE
145442004-05-23 Paul Eggert <eggert@cs.ucla.edu>
14545
14546 Ensure that the C++ compiler used for testing actually works on a
14547 simple test program; if not, skip the C++-related tests. Problem
14548 reported by Vin Shelton in:
161a71f3 14549 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
14550
14551 * m4/cxx.m4: New file.
14552 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
14553 * tests/atlocal.in (BISON_CXX_WORKS): Add.
14554 * tests/local.at (AT_COMPILE_CXX): Use it.
14555
41ca2549
PE
145562004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14557
383e69dc
PE
14558 * data/glr.c (yylloc): Output this macro even if locations are not
14559 being generated, as the GLR parser needs it even in that case.
14560 Problem reported by Troy A. Johnson
14561 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
14562
41ca2549
PE
14563 * configure.ac (AC_INIT): Update to 1.875e.
14564
e476c87d
PE
145652004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14566
14567 * NEWS: Version 1.875d.
14568 * configure.ac (AC_INIT): Likewise.
14569 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
14570
14571 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
14572 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
14573 lalr1.cc runs afoul of the first, and the last two are no longer
14574 supported by GCC 3.4.0.
14575 * README: Mention GNU m4 1.4 or later; mention m4 patches.
14576 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
14577
233a88ad
PE
145782004-05-06 Paul Eggert <eggert@cs.ucla.edu>
14579
14580 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
14581 unsigned int, for compatibility with latest gnulib hash module.
14582 * src/state.c (state_hash, state_hasher): Likewise.
14583 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
14584 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 14585
12ffdd28
PE
145862004-05-03 Paul Eggert <eggert@cs.ucla.edu>
14587
14588 * NEWS: Unescaped newlines are no longer allowed in char & strings.
14589
14590 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
14591 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
14592 character and string literals.
14593 (unexpected_end): New function.
14594 (unexpected_eof): Use it.
14595 (unexpected_newline): New function.
14596 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
14597 actions.
e476c87d 14598
12ffdd28
PE
14599 * NEWS: Document %expect-rr.
14600
14601 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
14602 Fix typo by replacing $1 with $option.
14603 Remove more 'intl'-related files.
9668e2be 14604 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
14605
14606 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14607 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14608 strtoul.c.
14609 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14610 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14611 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14612 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14613 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14614 * src/.cvsignore: Add *.output.
14615
14616 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14617 gets copied to the output file.
e476c87d 14618
1f65350a
PE
146192004-04-28 Paul Eggert <eggert@twinsun.com>
14620
14621 Get files from the gnulib and po repositories, instead of relying
14622 on them being in our CVS. Upgrade to latest versions of gnulib
14623 and Automake.
14624
14625 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14626 * bootstrap: Bootstrap from gnulib and po repositories.
14627 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14628 * README-cvs: Document these changes. Remove version numbers from
14629 mentions of build tools, since they change so often. Mention Flex.
14630
14631 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14632 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
14633 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14634 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 14635 does this for us.
12ffdd28
PE
14636 (AC_ISC_POSIX): Remove; we no longer support this
14637 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
14638 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14639 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14640 Do not check for C89 headers, except for locale.h which is used
14641 by the Yacc library and must port to K&R hosts.
14642 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14643 Do not check for C89 functions, except for setlocale which is
14644 used by the Yacc library.
14645 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14646 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14647 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14648 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14649 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14650 AM_GNU_GETTEXT): Remove; now done by:
14651 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14652 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14653 for us.
14654
14655 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14656 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14657 Define to empty, as gnulib.mk will do the rest for us.
14658 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14659 for us.
14660 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14661 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14662
14663 * src/files.c: Include gnulib's xstrndup.h.
14664
14665 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14666 (REALLOC): Use xnrealloc, for likewise.
14667 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14668 (strnlen, memrchr): Remove decls; functions no longer used.
14669 Include <stpcpy.h>.
14670
14671 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14672 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14673 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14674 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14675 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14676 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14677 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14678 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14679 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14680 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14681 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14682 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14683 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14684 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14685 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14686 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14687 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14688 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14689 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14690 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14691 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14692 Remove, as these files are now generated automatically
14693 by bootstrap or automake.
14694
14695 * po/ChangeLog: Remove: all but one entry was a duplicate
14696 of this file, and I moved that 2000-11-02 entry here.
14697
14698 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14699 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14700 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14701 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14702 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14703 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14704 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14705 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14706 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14707 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14708 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14709 xstrndup.h.
14710 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14711 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14712 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14713 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14714 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14715 * src/.cvsignore: Remove *_.c.
14716
14717
14718 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14719 support it. (The latest stable gzip doesn't.)
14720
147212004-04-27 Paul Eggert <eggert@twinsun.com>
14722
14723 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14724 case, as stos_ is now used by destructors due to the 2004-02-09
14725 change.
14726
14727 Remove more K&R C support.
14728 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14729 * lib/subpipe.c (errno): Remove decl.
14730 Include <stdlib.h> unconditionally.
14731 (EXIT_FAILURE): Remove macro.
14732 * src/complain.c (vfprintf, strerror): Remove.
14733 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14734 unconditionally.
14735 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14736 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14737 (strchr, strspn, memchr): Remove decls.
14738 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14739 unconditionally. Do not declare perror.
14740 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14741 unconditionally.
14742
14743 * src/complain.c (_): Remove useless defn, as system.h defines this.
14744
14745 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14746 with latest obstack.h.
14747 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14748 to procedure types, as obstack.h now does that for us.
14749 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14750
14751 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14752 so that this include file can stand alone.
14753 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14754 does this now. Include subpipe.h first after config.h, to
14755 test whether it can stand alone.
14756
14757 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14758 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14759 unused declaration.
14760
14761 * tests/synclines.at (%union synch line): Put a dummy member in
14762 the union, because empty unions aren't allowed in C. Caught
14763 by GCC 3.4.0.
14764
4f16766c
PE
147652004-04-13 Jim Meyering <jim@meyering.net>
14766
14767 * src/conflicts.c (conflicts_print): Correct format string typo:
14768 use `%%' to produce literal `%'. (trivial change)
14769
779e7ceb
PE
147702004-03-30 Paul Eggert <eggert@twinsun.com>
14771
14772 * src/getargs.c (version): Update copyright year to 2004.
14773
14774 * data/c.m4 (b4_int_type): Use 'short int' rather than
14775 'short', and similarly for 'long', 'unsigned', etc.
14776 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14777 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14778 yy_yypstack, yydumpstack): Likewise.
14779 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14780 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14781 Likewise.
14782 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14783 yy_stack_print, yyparse): Likewise.
14784 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14785 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14786 * lib/bitset.c (bitset_print): Likewise.
14787 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14788 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14789 * lib/bitsetv.c (bitsetv_dump): Likewise.
14790 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14791 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14792 Likewise.
14793 * src/LR0.c (allocate_itemsets): Likewise.
14794 * src/gram.h (rule_number, rule): Likewise.
14795 * src/lalr.h (goto_number): Likewise.
14796 * src/nullable.c (nullable_compute): Likewise.
14797 * src/output.c (prepare_rules): Likewise.
14798 * src/relation.c (relation_print, relation_digraph): Likewise.
14799 * src/relation.h (relation_node): Likewise.
14800 * src/state.h (state_number, transitions, errs, reductions,
14801 struct state): Likewise.
14802 * src/symtab.h (symbol_number, struct symbol): Likewise.
14803 * src/tables.c (vector_number, tally, action_number,
14804 default_goto, goto_actions): Likewise.
14805 * tests/existing.at (GNU Cim Grammar): Likewise.
14806 * tests/regression.at (Web2c Actions): Likewise.
14807
14808 * src/output.c (muscle_insert_short_int_table): Renamed from
14809 muscle_insert_short_table. All uses changed.
14810
d6328241
PH
148112004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14812
14813 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14814 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14815 Add %expect-rr rule.
4f16766c 14816
d6328241
PH
14817 * src/scan-gram.l: Recognize %expect-rr.
14818
4f16766c 14819 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 14820 expected_conflicts.
4f16766c 14821 (expected_rr_conflicts): Declare.
d6328241
PH
14822
14823 * src/conflicts.c (expected_sr_conflicts): Rename from
14824 expected_conflicts.
14825 (expected_rr_conflicts): Define.
14826 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14827 for GLR parsers.
14828 Use expected_sr_conflicts in place of expected_conflicts.
14829 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 14830
d6328241 14831 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 14832
1452af69
PE
148332004-03-08 Paul Eggert <eggert@gnu.org>
14834
14835 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 14836 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
14837
14838 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14839 in lalr1.cc.
14840 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14841 * src/scan-gram.l (scan_integer): New function.
14842 ({int}): Use it.
14843 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14844 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14845 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14846 Say "long int", not "long", for uniformity with GNU style.
14847
006d217d
PE
148482004-02-25 Paul Eggert <eggert@twinsun.com>
14849
14850 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14851 compilers. This fixes a problem with Intel's C++ compiler being
14852 chatty, reported by Guido Trentalancia in
161a71f3 14853 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 14854
c2729758
ADL
148552004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14856
14857 Support %destructor and merge error locations in lalr1.cc.
14858
14859 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14860 (Parser::stos_): Define unconditionally.
14861 (Parser::destruct_): New method. Generate its body with
14862 b4_yydestruct_generate.
14863 (Parser::error_start_): New attribute.
14864 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14865 token which are discarded.
14866 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14867 error_start_ when erroneous token are discarded.
14868 (Parser::parse) <yyerrlab1>: Compute the location of the error
14869 token so that it covers all the discarded tokens.
14870 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14871 it can be called with `%skeleton "lalr1.cc"', and do that.
14872
dd0e0635
PE
148732004-02-02 Paul Eggert <eggert@twinsun.com>
14874
14875 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14876 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14877 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14878 There's no need to mention top_builddir since Automake does that
14879 for us.
14880 (INCLUDES): Remove, as Automake says it's obsolescent.
14881 Contents migrated into AM_CPPFLAGS as described above.
14882 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14883
148842004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14885
14886 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14887 (yyreportSyntaxError): Handle case where lookahead token is
14888 YYEMPTY.
14889
be16239b
PH
148902004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14891
14892 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14893 resulting parsers are compilable with C++.
14894
5fa90832
PE
148952003-12-23 Paul Eggert <eggert@twinsun.com>
14896
14897 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14898 * src/output.c (output_skeleton): Rename local var.
14899 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14900 Bison tokens, as this runs afoul of the 2003-10-07 change that
14901 disallowed NUL bytes in character constants or string literals.
14902
14903 * tests/local.at: Require Autoconf 2.59's Autotest.
14904 * tests/testsuite.at: Don't include local.at, since we now assume
14905 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14906 including it.
14907 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14908 multiple inclusion warnings.
dd0e0635 14909
b165c324
AD
149102003-12-02 Akim Demaille <akim@epita.fr>
14911
14912 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14913 conditions.
14914 From Bruno Haible.
14915
26e06a21
ADL
149162003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14917
14918 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14919
92ac3705
PE
149202003-10-07 Paul Eggert <eggert@twinsun.com>
14921
6a5ecb38
PE
14922 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14923 if testsuite doesn't exist.
14924
92ac3705
PE
14925 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14926 literals, unfortunately.
14927 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14928 Complain about NUL bytes in character constants or string literals.
14929
91d2c560
PE
149302003-10-05 Paul Eggert <eggert@twinsun.com>
14931
14932 * NEWS: Don't document %no-default-prec, as it's still
14933 too experimental.
14934 * doc/bison.texinfo: Document %no-default-prec only if
14935 the defaultprec flag is set. Normally it's not.
14936
0cc3da3a
PE
149372003-10-04 Paul Eggert <eggert@twinsun.com>
14938
14939 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14940 non-modifiable lvalue, instead of a modifiable one.
14941 * doc/bison.texinfo (Actions): Document that $$ can
14942 be assigned to. Do not claim that $$ and $N are
14943 array element references: user code should not rely on this.
14944
22fccf95
PE
149452003-10-01 Paul Eggert <eggert@twinsun.com>
14946
14947 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14948 (grammar_declaration): Use it.
14949 * src/scan-gram.l: New token %no-default-prec.
14950 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14951 * NEWS, doc/bison.texinfo: Document the above.
14952
fc8f2965
AD
149532003-10-01 Akim Demaille <akim@epita.fr>
14954
14955 VCG no longer supports long_straight_phase.
14956
14957 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14958 * src/print_graph.c (print_graph): Adjust.
14959
39a06c25
PE
149602003-09-30 Frank Heckenbach <frank@g-n-u.de>
14961 and Paul Eggert <eggert@twinsun.com>
14962
14963 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14964 Table of Symbols): Document %default-prec.
14965 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14966 (grammar_declaration): Set default_prec on %default-prec.
14967 * src/scan-gram.l (%default-prec): New token.
14968 * src/reader.h (default_prec): New flag.
14969 * src/reader.c: Likewise.
14970 (packgram): Handle it.
14971 * tests/conflicts.at (%default-prec without %prec,
14972 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 14973
39a06c25
PE
149742003-09-30 Paul Eggert <eggert@twinsun.com>
14975
14976 * tests/testsuite.at: Include local.at, not input.at, fixing
14977 a typo in the 2003-08-25 patch.
14978
62b6aef9
AD
149792003-08-27 Akim Demaille <akim@epita.fr>
14980
14981 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14982 GCC warnings.
14983
89e1cc61
AD
149842003-08-26 Akim Demaille <akim@epita.fr>
14985
14986 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14987 "<\#" to avoid magic from Gnus when posting parts of this script.
14988
a08460b0
AD
149892003-08-26 Akim Demaille <akim@epita.fr>
14990
14991 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14992 (Parser::parse): here.
14993 Adjust: nerrs and errstatus is now replaced by...
14994 (Parser::nerrs_, Parser::errstatus_): New.
14995
603f1cfd
AD
149962003-08-25 Akim Demaille <akim@epita.fr>
14997
14998 * config/announce-gen, Makefile.cfg: New.
14999 * Makefile.am: Adjust.
15000 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
15001 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
15002
cd3684cf
AD
150032003-08-25 Akim Demaille <akim@epita.fr>
15004
15005 When reducing initial empty rules, Bison parser read an initial
15006 location that is not defined. This results in garbage, and that
15007 affects Bison's own parser. Therefore we need (i) to extend Bison
15008 to support a means to initialize this location, and (ii) to use
15009 this CVS Bison to fix CVS Bison's parser.
15010
15011 * src/reader.h, reader.c (epilogue_augment): Remove, replace
15012 with...
15013 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
15014 * src/parse-gram.y: Adjust.
15015 (%initial-action): New.
15016 (%error-verbose): Since we require CVS Bison, there is no reason
15017 not to use it.
15018 * src/scan-gram.l: Adjust.
15019 * src/Makefile.am (YACC): New, to make sure we use our own parser.
15020 * data/yacc.c (yyparse): Use b4_initial_action.
15021
4e03e201
AD
150222003-08-25 Akim Demaille <akim@epita.fr>
15023
15024 * doc/bison.texinfo: Don't promote stdout for error messages.
15025
8c182d05
AD
150262003-08-25 Akim Demaille <akim@epita.fr>
15027
15028 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
15029 From Alexandre Duret-Lutz.
15030
6a60c4cf
PE
150312003-08-25 Akim Demaille <akim@epita.fr>
15032
15033 Version 1.875c.
15034
25f66e1a
AD
150352003-08-25 Akim Demaille <akim@epita.fr>
15036
15037 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
15038 Use them.
15039
5348bfbe
AD
150402003-08-25 Akim Demaille <akim@epita.fr>
15041
15042 * data/lalr1.cc (Parser::reduce_print_): New.
15043 Use it.
15044
47301314
AD
150452003-08-25 Akim Demaille <akim@epita.fr>
15046
15047 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
15048 error recovery loops. This patch is based on
161a71f3 15049 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
15050 Also, augment the similarity between lalr1.cc and yacc.c.
15051 Note: the locations of error recovery rules are not correct yet.
15052
15053 * data/lalr1.cc: Comment changes to augment the similarity between
15054 lalr1.cc and yacc.c.
15055 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
15056 (yyerrlab1): Remove, but where it used to be (now the bottom part of
15057 yyerrlab), when hitting EOF, pop the whole stack here instead of
15058 merely falling thru the default error handling mechanism.
15059 (yyerrorlab): New label, with the old contents of YYERROR,
15060 plus the following change: pop the stack of rhs corresponding
15061 to the production that invoked YYERROR. That is how Yacc
15062 behaves (required by POSIX).
15063 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
15064 fail.
15065
1f7a61ff
AD
150662003-08-25 Akim Demaille <akim@epita.fr>
15067
15068 Tune local.at so that people can "autom4te -l autotest calc.at -o
15069 calc" for instance, to extract a sub test suite.
15070
15071 * tests/testsuite.at: Move the initialization, Autotest version
15072 requirement, and AT_TESTED invocation into...
15073 * tests/local.at: here.
15074 * tests/testsuite.at: Include it for compatibility with Autoconf
15075 2.57.
15076 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
15077 be ignore.
15078
327b5b56
PE
150792003-08-04 Paul Eggert <eggert@twinsun.com>
15080
15081 Rework code slightly to avoid gcc -Wtraditional warnings.
15082 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
15083 The returned value is now stored in *YY0. All callers changed.
15084 * src/output.c (merge_output): Adjust to the above change.
15085
0051e3ed
PE
150862003-07-26 Paul Eggert <eggert@twinsun.com>
15087
15088 * data/glr.c (YYASSERT): New macro.
15089 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
15090 yyresolveStates, yyprocessOneStack):
15091 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
15092 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 15093
137437c6
PE
150942003-07-25 Paul Eggert <eggert@twinsun.com>
15095
5b620e06
PE
15096 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
15097 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 15098 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
15099 by Frank Heckenbach, though I have omitted the structure-initialization
15100 part of his glr-knr.diff patch since I recall that the Portable
15101 C Compiler didn't require that change.
15102
137437c6
PE
15103 Let the user specify how to allocate and free memory.
15104 Derived from a suggestion by Frank Heckenbach in
161a71f3 15105 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
15106 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
15107 All uses of free, malloc, realloc changed to use these macros,
15108 and unnecessary casts removed.
15109 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
15110
ddb85ca5
PE
151112003-07-06 Matthias Mann <MatthiasMann@gmx.de>
15112
15113 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
15114 use s.empty() rather than s == "" to test for empty string; see
161a71f3 15115 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
15116 (trivial change)
15117
39910e09
AD
151182003-06-25 Akim Demaille <akim@epita.fr>
15119
15120 * config/depcomp, config/install-sh: Update from masters.
15121
0ae99356
PE
151222003-06-20 Paul Eggert <eggert@twinsun.com>
15123
15124 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
15125 and return properly parenthesized result.
15126 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
15127 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
15128 Remove unnecessary parentheses from uses.
15129 * doc/bison.texinfo (Location Default Action): Describe the
15130 conventions for parentheses.
15131
cd05d13c
PE
151322003-06-19 Paul Eggert <eggert@twinsun.com>
15133
81fd08ca
PE
15134 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
15135 yyreportTree): Do not assume that size_t is the same width as int,
15136 when printing sizes. Print sizes using an unsigned format.
15137 Problem reported by Frank Heckenbach in
161a71f3 15138 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 15139
cd05d13c
PE
15140 Port to Forte Developer 7 C compiler.
15141 * data/glr.c (struct YYLTYPE): If locations are not being used,
15142 declare a single dummy member, as empty structs do not conform
15143 to the C standard.
15144 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
15145 the Forte Developer 7 C compiler complains that end-of-loop
15146 code is not reached.
15147
4dcf140b
PE
151482003-06-17 Paul Eggert <eggert@twinsun.com>
15149
15150 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
15151 avoid warnings from picky compilers about redefinition of PARAMS.
15152
8dd76bee
PE
151532003-06-17 Paul Eggert <eggert@twinsun.com>
15154
15155 Version 1.875b.
15156
15157 * NEWS: Document 1.875b.
15158
15159 * lib/bbitset.h: Do not include config.h; that's the includer's job.
15160 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
15161 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
15162 Don't use 'index' in comments, as it's a builtin fn on some hosts.
15163 * lib/bitset_stats.c: Include gettext.h unconditionally, as
15164 per recent gettext manual's suggestion.
15165 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
15166 Use prototypes, not old-style definitions.
15167 * lib/lbitset.c (lbitset_unused_clear): Likewise.
15168 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
15169 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
15170 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
15171 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
15172 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
15173 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
15174 vbitset_or_and_cmp, vbitset_copy): Likewise.
15175
15176 * lib/libiberty.h: Do not include config.h; that's the includer's job.
15177 Do not include <stdlib.h>.
15178 (PARAMS): Define unconditionally for C89.
15179 (ATTRIBUTE_NORETURN): Remove.
15180 (ATTRIBUTE_UNUSED): Define unconditionally.
15181
15182 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 15183 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
15184 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
15185 * lib/vbitset.c, lib/vbitset.h: New files.
15186 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15187 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
15188 from libbitset.
15189
15190 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
15191 `How Can I Reset @code{yyparse}', since texinfo does not allow
15192 arbitrary @ in node names.
15193
15194 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
15195 shouldn't be needed according to the gettext 0.12.1 documentation
15196 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 15197 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 15198 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 15199 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 15200
8dd76bee
PE
15201 * lib/.cvsignore: Add stdbool.h.
15202 * m4/.cvsignore: Add nls.m4, po.m4.
15203
15204 Upgrade to CVS gnulib.
15205 * stdbool_.h: File renamed from stdbool.h.in.
15206 * configure.ac (AM_STDBOOL_H): Invoke this instead of
15207 AC_HEADER_STDBOOL.
15208 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
15209 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
15210 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
15211 (MOSTLYCLEANFILES): New var.
15212 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
15213 (stdbool.h): New rule.
15214 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
15215 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
15216 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
15217 m4/quote.m4: Upgrade to today's gnulib.
15218
15219 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
15220 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
15221 the tests right now.
15222 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
15223 yyerror are declared before use; C99 requires this.
15224
25005f6a
PH
152252003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15226
15227 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
15228 first.
15229 (yyrecoverSyntaxError): Correct the logic for setting and testing
15230 yyerrState.
15231 Correct comment on handling EOF.
15232 Allow states with only a default reduction, rather than failing
8dd76bee 15233 (I can't quite reconstruct why these were not allowed before).
25005f6a 15234
137437c6 15235 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 15236 buffer overruns, corrupting state.
8dd76bee
PE
15237
15238 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
15239 definition.
15240 * src/reader.h (max_left_semantic_context): New variable declaration.
15241 * src/scan-gram.l (max_left_semantic_context): Define.
15242 (handle_action_dollar): Update max_left_semantic_context.
15243 * data/glr.c (YYMAXLEFT): New definition.
15244 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
15245 (yyresolveAction): Ditto.
15246
15247 Fixes to problems with location handling in GLR parsers reported by
15248 Frank Heckenbach (2003/06/05).
15249
15250 * data/glr.c (YYLTYPE): Make trivial if locations not used.
15251 (YYRHSLOC): Add parentheses, and define only if locations used.
15252 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
15253 locations not used.
15254 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
15255 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 15256
25005f6a
PH
15257 * tests/cxx-type.at: Exercise location information; update tests
15258 to differentiate output with and without locations.
8dd76bee 15259 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
15260 because default YYLTYPE not yet defined.
15261 Change semantic actions to compute strings, rather than printing
15262 them directly (to test proper passing of semantics values). Change
15263 output to prefix notation and update test data and expected results.
15264 (yylex): Track locations.
15265 (stmtMerge): Return value rather than printing, and include arguments
15266 in value.
8dd76bee 15267
711f40b7
PE
152682003-06-03 Paul Eggert <eggert@twinsun.com>
15269
15270 Avoid warnings generated by GCC 2.95.4 when Bison is
15271 configured with --enable-gcc-warnings.
15272 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
15273 yy::]b4_parser_class_name[::translate_,
15274 yy::Stack::operator[] (unsigned),
15275 yy::Stack::operator[] (unsigned) const,
15276 yy::Slice::operator[] (unsigned),
15277 yy::Slice::operator[] (unsigned) const):
15278 Rename local vars to avoid warnings.
15279 * tests/glr-regression.at (Improper handling of embedded actions
15280 and $-N in GLR parsers): Remove unused local variable from yylex.
15281 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
15282 (void) as arg when not pure, since we now assume C89 when building
15283 Bison. Pacify GCC by using parameter.
15284
ac695f7d
PE
152852003-06-02 Paul Eggert <eggert@twinsun.com>
15286
15287 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
15288 yy::Location::lines, yy::Location::columns): Rename arguments
15289 to avoid shadowing; this removes a warning generated by GCC 3.3.
15290
26ec81e0
PE
152912003-06-01 Paul Eggert <eggert@twinsun.com>
15292
15293 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
15294 to g++, as GCC 3.3 complains if you do it.
15295 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
15296 everything that WARNING_CFLAGS has, except omit warnings
15297 not suitable for C++.
15298 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
15299 * tests/atlocal.in (CXXFLAGS): New var.
15300 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
15301
15302 Fix a GLR parser bug I reported in February; see
161a71f3 15303 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
15304 The problem was that GLR parsers did not conform to the C standard,
15305 because actions like { $1 = $2 + $3; } expanded to expressions
15306 that invoked YYFILL in separate subexpressions, and YYFILL assigned
15307 to a local variable. The C standard says that expressions
15308 like (var = f ()) + (var = f ()) have undefined behavior.
15309 Another problem was that GCC sometimes issues warnings that
15310 yyfill and its parameters are unused.
15311
15312 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
15313 as possibly unused.
15314 (yyfill): New function.
15315 (YYFILL): Use it.
15316 (yyuserAction): Change type of yynormal to bool, so that it matches
15317 the new yyfill signature. Mark it as possibly unused.
15318
15319
15320 Follow up on a bug I reported in February, where a Bison-generated
15321 parser can loop. Provide a test case and a fix for yacc.c. I
15322 don't have a fix for lalr1.cc or for glr.c, unfortunately.
15323 The original bug report is in:
161a71f3 15324 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
15325
15326 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
15327 macro's size was becoming unwieldy.
15328 (yyerrlab): Do not discard an empty lookahead symbol, as this
15329 might destroy garbage.
15330 (yyerrorlab): New label, with the old contents of YYERROR,
15331 plus the following change: pop the stack of rhs corresponding
15332 to the production that invoked YYERROR. That is how Yacc
15333 behaves, and POSIX requires this behavior.
15334 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
15335 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
15336 Define 'alarm' to do nothing if unistd.h is not available.
15337 Add a new rule "exp: '-' error;" to test the above change to
15338 data/yacc.c. Use 'alarm' to abort any test taking longer than
15339 10 seconds, as it's probably looping.
15340 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
15341 Also, the new yacc.c generates two fewer diagnostics for an
15342 existing test.
15343
d0829076
PE
153442003-05-24 Paul Eggert <eggert@twinsun.com>
15345
c6ae27df
PE
15346 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
15347 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
15348 This fixes a problem reported by John Bowman when the Compaq/HP
15349 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
15350 -ansi -Wall -gall).
15351 * data/yacc.c (union yyalloc): Likewise.
15352 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 15353
d0829076
PE
15354 Switch from 'int' to 'bool' where that makes sense.
15355
15356 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
15357 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
15358 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
15359 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
15360 Return or accept bool, not int. All callers changed.
15361 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
15362 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
15363 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
15364 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
15365 bitset_or_and_cmp_): Likewise.
15366 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
15367 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
15368 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
15369 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
15370 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
15371 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
15372 bitset_stats_or_and_cmp): Likewise.
15373 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
15374 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
15375 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
15376 ebitset_xor_cmp): Likewise.
15377 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
15378 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
15379 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
15380 lbitset_xor_cmp): Likewise.
15381 * lib/bbitset.h: Include <stdbool.h>.
15382 (struct bitset_vtable): The following members now return bool, not
15383 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
15384 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
15385 or_and_cmp).
15386 * src/conflicts.c (count_rr_conflicts): Likewise.
15387 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
15388 All uses changed.
15389 * lib/ebitset.c (ebitset_obstack_init): Likewise.
15390 * lib/lbitset.c (lbitset_obstack_init): Likewise.
15391 * src/getargs.c (debug_flag, defines_flag, locations_flag,
15392 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15393 graph_flag): Likewise.
15394 * src/getargs.h (debug_flag, defines_flag, locations_flag,
15395 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15396 graph_flag): Likewise.
15397 * src/output.c (error_verbose): Likewise.
15398 * src/output.h (error_verbose): Likewise.
15399 * src/reader.c (start_flag, typed): Likewise.
15400 * src/reader.h (typed): Likewise.
15401 * src/getargs.c (LOCATIONS_OPTION): New constant.
15402 (long_options, getargs): Use it.
15403 * src/lalr.c (build_relations): Use bool, not int.
15404 * src/nullable.c (nullable_compute): Likewise.
15405 * src/print.c (print_reductions): Likewise.
15406 * src/tables.c (action_row, pack_vector): Likewise.
15407 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
15408 * src/output.c (prepare): Use it.
15409 * src/output.c (token_definitions_output,
15410 symbol_destructors_output, symbol_destructors_output): Use string,
15411 not boolean integer, to keep track of whether to output separator.
15412 * src/print_graph.c (print_core): Likewise.
15413 * src/state.c (state_rule_lookaheads_print): Likewise.
15414
15415 * config/install-sh: Sync from automake 1.7.5.
15416
6b2584b7
PE
154172003-05-14 Paul Eggert <eggert@twinsun.com>
15418
15419 * src/parse-gram.y (rules_or_grammar_declaration): Require a
15420 semicolon after a grammar declaration, in the interest of possible
15421 future changes to the Bison input language.
15422 Do not allow a stray semicolon at the start of the grammar.
15423 (rhses.1): Allow one or more semicolons after any rule, including
15424 just before "|" as required by POSIX.
15425 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
15426 grammar.
15427
caf37a36
ADL
154282003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
15429
15430 %parse-param support for lalr1.cc.
15431
15432 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
15433 b4_cc_constructor_calls, b4_cc_constructor_call,
15434 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
15435 definitions.
15436 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
15437 parse-param arguments.
15438 (yy::b4_parser_class_name): Declare instance variables to
15439 hold parse-param arguments.
15440 * tests/calc.at: s/value/semantic_value/ because value clashes
15441 with a member of yy::b4_parser_class_name. Adjust C++ code
15442 to handle %parse-param. Enable %parse-param test in C++.
15443
3ab37077
PE
154442003-05-12 Paul Eggert <eggert@twinsun.com>
15445
15446 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
15447 English a bit. Fix fclose typo. Change "const char" to "char
15448 const", and use ANSI C rather than K&R for "main". Suggest
15449 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
15450 and suggest yy_switch_to_buffer.
15451
154522003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
15453
15454 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
15455 C89. This avoids a diagnostic on compilers that define __STDC__
15456 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 15457 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 15458
e743727f
PE
154592003-05-03 Paul Eggert <eggert@twinsun.com>
15460
15461 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
15462 Do not overrun array bounds.
15463 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 15464 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 15465
916708d5
AD
154662003-04-29 Akim Demaille <akim@epita.fr>
15467
15468 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
15469 * src/getargs.c, src/getargs.h: here, as bool, not int.
15470 (nondeterministic_parser): New.
15471 * src/parse-gram.y, src/scan-gram.l: Support
15472 %nondeterministic-parser.
15473 * src/output.c (prepare): Use nondeterministic_parser instead
15474 of glr_parser where appropriate.
15475 * src/tables.c (conflict_row, action_row, save_row)
15476 (token_actions, token_actions, pack_vector): Ditto.
15477
a06ea4aa
AD
154782003-04-29 Akim Demaille <akim@epita.fr>
15479
15480 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
15481
211074ca
AD
154822003-04-29 Akim Demaille <akim@epita.fr>
15483
15484 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
15485 with %pure-parser and %locations to exercise the patch from Yakov
15486 Markovitch below.
15487
6175ffe3
PE
154882003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
15489
15490 * data/yacc.c: (b4_lex_param): Corrected for the case where
15491 %lex-param is provided and %pure-parser isn't.
15492
b1e95857
PE
154932003-04-27 Paul Eggert <eggert@twinsun.com>
15494
15495 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 15496 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
15497 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
15498 if it is not defined.
15499 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
15500
acda9df6
PE
155012003-04-26 Paul Eggert <eggert@twinsun.com>
15502
3470c57b
PE
15503 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
15504 Declare to be of type suitable for the ninf value itself, not of
15505 type suitable for the corresponding table, since the latter might
15506 be unsigned but the ninf value might be negative. This fixes a
15507 bug reported by Alexandre Duret-Lutz in
161a71f3 15508 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 15509
acda9df6
PE
15510 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
15511 invokes it. We shouldn't invoke it twice because it will attempt
15512 to put error.o in the archive twice. This fixes a glitch reported
15513 by Martin Mokrejs in
161a71f3 15514 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 15515
b5250f26
PE
155162003-04-21 Paul Eggert <eggert@twinsun.com>
15517
15518 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
15519 to gnulib.
15520
089ac0f1
PE
155212003-04-21 Yakov Markovitch <Markovitch@iso.ru>
15522
15523 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
15524 Fix obvious typo that results in uncompilable GLR parsers
15525 when both %pure-parser and %locations are used. (trivial change)
15526
5ededac6
PE
155272003-04-17 Paul Eggert <eggert@twinsun.com>
15528
1b8f2fff
PE
15529 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
15530 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
15531 Do not insert the expected token via unput, as this runs afoul
15532 of a POSIX-compatibility bug in flex 2.5.31.
15533 All uses changed to BEGIN the parent state,
15534 since we no longer insert the expected token via unput.
15535 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
15536 that is no longer emitted after the above change.
15537
5ededac6
PE
15538 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
15539 the first one. This change is from Paul Hilfinger, and it fixes
15540 regression reported by Werner Lemberg in
161a71f3 15541 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
15542
15543 (resolve_sr_conflict): Don't invoke state_errs_set
15544 unless one or more tokens have been explicitly made errors.
15545 Otherwise, the above change causes Bison to abort.
15546
15547 * tests/existing.at (GNU pic Grammar): New test case, taken from
15548 Lemberg's email.
15549
b8be9132
AD
155502003-03-31 Akim Demaille <akim@epita.fr>
15551
15552 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
15553
d423d460
AD
155542003-03-31 Akim Demaille <akim@epita.fr>
15555
15556 * src/output.c (prepare_symbols): Avoid trailing spaces in the
15557 output.
15558
c7e441b4
AD
155592003-03-31 Akim Demaille <akim@epita.fr>
15560
15561 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
15562 From Paul Hilfinger.
15563
231897ad
AD
155642003-03-29 Akim Demaille <akim@epita.fr>
15565
15566 * m4/error.m4: Do not put under dynamic conditions some code which
15567 expansion is under static control.
15568
5b066063
AD
155692003-03-29 Akim Demaille <akim@epita.fr>
15570
15571 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
15572
22a74fec
AD
155732003-03-29 Akim Demaille <akim@epita.fr>
15574
15575 * doc/bison.texinfo (Strings are Destroyed): New.
15576
0eee27e7
PE
155772003-03-13 Paul Eggert <eggert@twinsun.com>
15578
15579 * .cvsignore: Add configure.lineno.
15580 * src/.cvsignore: Add yacc.
15581 * tests/.cvsignore: Add testsuite.log.
15582 * doc/fdl.texi: Sync with latest FSF version.
15583
f61aad93
PE
155842003-03-12 Paul Eggert <eggert@twinsun.com>
15585
537636c7
PE
15586 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
15587 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
15588 cursor, instead of leaving it undefined. This fixes a bug
15589 reported by Tim Van Holder in
161a71f3 15590 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
15591 * tests/input.at (Torturing the Scanner): Test the scanner on
15592 an empty input file, which was Tim Van Holder's test case.
15593
15594 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
15595 <sys/resource.h> can be included, include sys/time.h and
15596 sys/times.h first, if available. This works around the SunOS
15597 4.1.4 porting bug reported by Bruce Becker in
161a71f3 15598 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
15599
15600 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
15601 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
15602 AC_HEADER_SYS_WAIT.
15603
f61aad93
PE
15604 Merge changes from gnulib. This was prompted because the CVS
15605 snapshot didn't build on Solaris 7 due to strnlen problems.
15606
15607 These changes need to be merged back into gnulib:
15608 * lib/hash.c: Include <stdbool.h> unconditionally.
15609 * m4/onceonly.m4 (m4_quote): New macro.
15610 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15611 Quote AC_FOREACH variable-expansions properly.
15612 The 2003-01-03 obstack.h change also needs merging.
15613 {end of changes requiring merging}
5b066063 15614
f61aad93
PE
15615 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15616 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15617 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15618 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15619 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15620 New files, imported from gnulib.
15621 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15622 above.
15623
15624 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15625 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15626 gnulib sources.
15627
15628 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15629 Add.
15630 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15631 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15632 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15633 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15634 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15635 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15636 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15637 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15638 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15639 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15640 (jm_PREREQ_ARGMATCH): Remove.
15641 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15642 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15643
15644 * src/system.h: Include <stdbool.h> unconditionally.
15645
15646 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15647 assuming at least C89 in the bitset code for some time now.
15648
d2ffe116
AD
156492003-03-03 Akim Demaille <akim@epita.fr>
15650
15651 * ro.po: New.
15652
052826fd
AD
156532003-03-02 Akim Demaille <akim@epita.fr>
15654
15655 * doc/bison.texinfo (Table of Symbols): Reactivate the
15656 documentation for %lex-param, and %parse-param.
15657
c4749565
AD
156582003-03-02 Akim Demaille <akim@epita.fr>
15659
15660 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15661 generate verbose error messages.
15662 Use the number of tokens as an upper bound in yytname, as it
15663 cannot be a non terminal.
15664
d5286af1
AD
156652003-03-02 Akim Demaille <akim@epita.fr>
15666
15667 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15668 message.
15669
22e304a6
AD
156702003-03-02 Akim Demaille <akim@epita.fr>
15671
22e304a6
AD
15672 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15673 Use them to exercise yycheck overrun.
15674 Based on Andrew Suffield's grammar.
15675
67a25fed
AD
156762003-03-02 Akim Demaille <akim@epita.fr>
15677
15678 Create tests/local.at for Bison generic testing macros.
15679
15680 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15681 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15682 This new file.
15683 * tests/calc.at (AT_CHECK_CALC): Adjust.
15684 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15685 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15686 * tests/local.at: here.
15687 (AT_COMPILE_CXX): Tags the tests using it as c++.
15688 Ignore the test if CXX is not functional.
15689
9c2b381f
PE
156902003-03-01 Paul Eggert <eggert@twinsun.com>
15691
15692 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15693 not loc->end, since loc->end might contain garbage and this leads
15694 to undefined behavior on some platforms.
15695 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15696 depend on *loc, so that the reader doesn't give the the false
15697 impression that *loc is initialized.
15698 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15699 does not survive the return.
15700
0433ba88
AD
157012003-03-01 Akim Demaille <akim@epita.fr>
15702
15703 * src/scan-gram.l (code_start): Always initialize it when entering
15704 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15705 yylex invocation. An alternative would be making it static, but
15706 then it starts with the second %%'s beginning, instead of its end.
15707
b305ea69
PE
157082003-02-28 Paul Eggert <eggert@twinsun.com>
15709
15710 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15711 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 15712 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 15713
c3d25e01
PE
157142003-02-26 Paul Eggert <eggert@twinsun.com>
15715
15716 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15717 Remove Sequent/Pyramid discussion (nobody uses them any more).
15718 Merge VMS and MS-DOS discussion; these ports may well be dead
15719 but let's keep mentioning them for now. Put <> around email
15720 addresses. Add copyright notice.
15721
c267ffbc
PE
157222003-02-24 Paul Eggert <eggert@twinsun.com>
15723
15724 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15725 to avoid collision with flex use of yylineno.
15726 Problem reported by Bruce Lilly in
161a71f3 15727 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
15728 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15729 * data/yacc.c (yy_reduce_print): Likewise.
15730
15731 * config/depcomp: Sync with Automake 1.7.3.
15732
f939fc12
AD
157332003-02-21 Akim Demaille <akim@epita.fr>
15734
15735 * data/lalr1.cc: Use temporary variables instead of casts to
15736 change integer types.
15737 Suggested by Paul Eggert.
15738
95923bd6
AD
157392003-02-21 Akim Demaille <akim@epita.fr>
15740
15741 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15742 to avoid confusions with lalr1.cc's notion of Position.
15743 Suggested by Paul Eggert.
15744
2cdc240e
AD
157452003-02-20 Akim Demaille <akim@epita.fr>
15746
15747 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15748 before initial_columns.
15749 (location.hh): Use consistent variable names when defining the
15750 operator<<.
15751 Use "last" so that we subtract from Positions, not from unsigned.
15752
5d003116
AD
157532003-02-20 Akim Demaille <akim@epita.fr>
15754
15755 * data/lalr1.cc (position.hh): New subfile, including the extended
15756 and Doxygen'ed documentation of class Position.
15757 (location.hh): Use it.
15758 Document a` la Doxygen.
ba1ecc07 15759 With the help of Benoit Perrot.
5d003116 15760
d02b25f9
AD
157612003-02-20 Akim Demaille <akim@epita.fr>
15762
15763 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15764 AT_YACC_IF.
15765 Redefine AT_YYERROR_SEES_LOC_IF using it.
15766 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15767 not defined.
15768 Don't use the location in yy::Parser::error_ and
15769 yy::Parser::print_ when not %locations.
15770 Activate more lalr1.cc tests.
15771
0d1c3a04
AD
157722003-02-19 Akim Demaille <akim@epita.fr>
15773
15774 * data/lalr1.cc: When displaying a line number, be sure to make it
15775 an int.
15776
60a777aa
AD
157772003-02-19 Akim Demaille <akim@epita.fr>
15778
15779 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15780 Remove, useless.
15781 (YYABORT, YYACCEPT, YYERROR): New.
15782 * tests/calc.at: Renable the lalr1.cc test.
15783
0b86fc41
AD
157842003-02-19 Akim Demaille <akim@epita.fr>
15785
15786 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15787 error recovery, mixing with/without pops and discarding of the
15788 lookahead.
15789 Exercise YYERROR.
15790 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15791
da99a5dc
PE
157922003-02-17 Paul Eggert <eggert@twinsun.com>
15793
15794 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15795 * tests/testsuite.at (AT_COMPILE): Use them.
15796 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 15797 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 15798
93b8c255
PE
157992003-02-12 Paul Eggert <eggert@twinsun.com>
15800
15801 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15802 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 15803 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
15804 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15805 Check for malloc failure, for consistency with yacc.c.
15806 (yytname_size): Remove, for consistency with yacc.c.
15807
15808 The bug still remains in data/lalr1.cc, as I didn't have time
15809 to fix it there.
15810
7548fed2
AD
158112003-02-06 Akim Demaille <akim@epita.fr>
15812
15813 * configure.ac (GXX): Rename as...
15814 (CXX): this, to keep the original Autoconf semantics.
15815 Require 2.57.
15816 * data/lalr1.cc: Fix b4_copyright invocations.
15817 If YYDEBUG is not defined, don't depend upon name_ being defined.
15818 (location.hh): Include string and iostream.
15819 (Position::filename): New member.
15820 (Position::Position ()): New.
15821 (operator<< (Position)): New.
15822 (operator- (Position, int)): New.
15823 (Location::first, Location::last): Rename as...
15824 (Location::begin, Location::end): these, to mock the conventional
15825 iterator names.
15826 (operator<< (Location)): New.
15827 * tests/atlocal.in (CXX): New.
15828 * tests/testsuite.at (AT_COMPILE_CXX): New.
15829 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15830 locations in a more synthetic way.
15831 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15832 lalr1.cc is used.
15833 Adjust the C locations to match those from Emacs: first column is
15834 column 0.
15835 Change all the expected results.
15836 Conform to the GCS: simplify the locations when applicable.
15837 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15838 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15839 these CPP macros with the m4 macros new defined by...
15840 (AT_CHECK_PUSHDEFS): this, i.e.:
15841 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 15842 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
15843 New macros.
15844 (AT_CHECK_POPDEFS): Undefine them.
15845 (AT_CHECK_CALC_LALR1_CC): New.
15846 Use it for the first lalr1.cc test.
15847
43a176ef
AD
158482003-02-04 Akim Demaille <akim@epita.fr>
15849
15850 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15851 Location as is defined.
15852
fc049e9c
AD
158532003-02-04 Akim Demaille <akim@epita.fr>
15854
15855 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15856 name_ being defined.
15857
a737b216
PE
158582003-02-03 Paul Eggert <eggert@twinsun.com>
15859
15860 * src/gram.h (start_symbol): Remove unused decl.
15861
15862 Use more-consistent naming conventions for local vars.
15863
15864 * src/derives.c (derives_compute): Change type of local var from
15865 int to rule_number.
15866 * src/gram.c (grammar_rules_partial_print): Likewise.
15867 * src/print.c (print_core): Likewise.
15868 * src/reduce.c (reduce_grammar_tables): Likewise.
15869
15870 * src/gram.c (grammar_dump): Change name of item_number *
15871 local var from r to rp.
15872 * src/nullable.c (nullable_compute): Likewise.
15873
15874 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15875
15876 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15877 for symbol or symbol_number var.
15878 * src/reader.c (grammar_start_symbol_set): Likewise.
15879 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15880 Likewise.
15881 * src/state.c (transitions_to): Likewise.
15882 * src/state.h: Likewise.
15883 * src/tables.c (symbol_number_to_vector_number): Likewise.
15884
15885 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15886 char * var.
15887
15888 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15889 var.
15890
15891 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15892 var.
15893
15894 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15895 Use str, not s, for char * var. Use ch, not c, for character var.
15896 Use size for size var.
15897
15898 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15899 char * var.
15900 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15901 uniqstr var.
15902 * src/uniqstr.h: Likewise.
15903
15904 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15905 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15906 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15907 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15908 param to have same name as that of enum, so that we don't use
15909 "s" to stand for a non-state.
15910
68e93ad5
AD
159112003-02-02 Akim Demaille <akim@epita.fr>
15912
15913 * src/scan-skel.l: Scan more than one inert character per yylex
15914 invocation.
15915
92898986
PE
159162003-02-01 Paul Eggert <eggert@twinsun.com>
15917
15918 Version 1.875a.
15919
1d9d5d71
PE
15920 * po/LINGUAS: Add ms.
15921
0435d061
AD
159222003-01-30 Akim Demaille <akim@epita.fr>
15923
15924 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15925
6029a57f
PH
159262003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15927
15928 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15929 of $1.
0435d061
AD
15930
15931 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 15932 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 15933 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 15934
6029a57f
PH
15935 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15936 (b4_rhs_location): Ditto.
0435d061 15937 (yyfill): New function to copy from stack tree into array
6029a57f 15938 incrementally.
0435d061
AD
15939 (yyuserAction): Modify to allow incremental move of semantic values
15940 to rhs array when in GLR mode.
15941 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
15942 as needed.
15943 Remove dummy use of yystack, as there is now a guaranteed use.
15944 (yydoAction): Modify to allow incremental move of semantic values
15945 to rhs array when in GLR mode.
15946 (yyresolveAction): Ditto.
15947 (yyglrShiftDefer): Update comment.
0435d061 15948 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
15949 (yyglrReduce): Ditto.
15950 (yydoAction): Ditto
0435d061 15951
6029a57f
PH
15952 * tests/glr-regr1.at: Rename to ...
15953 * tests/glr-regression.at: Add new regression test for the problems
15954 described above (adapted from S. Eken).
15955 Update copyright notice.
15956 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15957 * tests/Makefile.am: Ditto.
15958
6cee6297
PE
159592003-01-28 Paul Eggert <eggert@twinsun.com>
15960
15961 * data/lalr1.cc: Do not use @output_header_name@ unless
15962 b4_defines_flag is set. This fixes two bugs reported by
15963 Tim Van Holder in
161a71f3
PE
15964 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15965 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 15966
b2a836b5
PE
159672003-01-21 Paul Eggert <eggert@twinsun.com>
15968
15969 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15970 we don't need to worry about yyerrlab1 being reported as an
15971 "unused label" by non-GCC C compilers. The downside is that if
15972 locations are used then a couple of statements are duplicated each
15973 time YYERROR is invoked, but the upside is that the warnings
15974 should vanish.
15975 (yyerrlab1): Move code to YERROR.
15976 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15977 This reverts some of the 2002-12-27 change.
15978
4196b931
PE
159792003-01-17 Paul Eggert <eggert@twinsun.com>
15980
15981 * src/output.c (symbol_printers_output): Fix typo that led
15982 to core dump. Problem reported by Antonio Rus in
161a71f3 15983 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 15984
3ae831b4
AD
159852003-01-13 Akim Demaille <akim@epita.fr>,
15986 Quoc Peyrot <chojin@lrde.epita.fr>,
15987 Robert Anisko <anisko_r@lrde.epita.fr>
15988
15989 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15990 when the stacks contain one element, as the loop would otherwise
15991 free the last state, and then use the top state (the one we just
15992 popped). This means that the initial elements will not be freed
15993 explicitly, as is the case in yacc.c; it is not a problem, as
15994 these elements have fake values.
15995
e3aa65c5
PE
159962003-01-11 Paul Eggert <eggert@twinsun.com>
15997
15998 * NEWS: %expect-violations are now just warnings, reverting
15999 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
16000 bootstrapping problem reported by Matthias Klose; see
161a71f3 16001 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
16002 * src/conflicts.c (conflicts_print): Likewise.
16003 * tests/conflicts.at (%expect not enough, %expect too much,
16004 %expect with reduce conflicts): Likewise.
16005 * doc/bison.texinfo (Expect Decl): Document this. Also mention
16006 that the warning is enabled if the number of conflicts changes
16007 (not necessarily increases).
16008
16009 * src/getargs.c (version): Update copyright year.
16010
f0057011
AD
160112003-01-09 Akim Demaille <akim@epita.fr>
16012
16013 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
16014
1ee6d2a0
PE
160152003-01-08 Paul Eggert <eggert@twinsun.com>
16016
16017 * Makefile.maint (WGETFLAGS):
16018 New macro, containing "-C off" to disable proxy caches.
16019 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
16020 (rel-check): Use $(WGET) instead of wget.
16021
d4fd77c4
PE
160222003-01-06 Paul Eggert <eggert@twinsun.com>
16023
16024 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
16025 the GLR paper of Scott, Johnstone and Hussain.
16026
464c6927
PE
160272003-01-04 Paul Eggert <eggert@twinsun.com>
16028
d600ee67
PE
16029 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
16030 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
16031 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
16032 (EXTRA_LIBRARIES): New var, for liby.a.
16033 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
16034 (EXTRA_SCRIPTS): New var, for yacc.
16035
464c6927
PE
16036 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
16037 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
16038 Problem reported by Nelson H. F. Beebe.
16039
160402003-01-03 Paul Eggert <eggert@twinsun.com>
16041
16042 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
16043 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
16044 when compiling Bison 1.875's `bitset bset = obstack_alloc
16045 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
16046
16047 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
16048 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
16049 grow to a huge size with typical invocation.
d600ee67 16050
464c6927
PE
16051 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
16052 Use the pattern recommended by Autoconf 2.57, except also protect
16053 against double-definition.
16054 * src/system.h: Likewise.
16055 Portability issues reported by Nelson H. F. Beebe.
d600ee67 16056
464c6927
PE
16057 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
16058 All uses changed. Provide a definition in both C and C++.
16059 (yytrue, yyfalse): Define even if defined (__cplusplus).
16060
16061 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
16062 Reported by Nelson H. F. Beebe.
d600ee67 16063
464c6927
PE
16064 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
16065
0f42c7d5
PE
160662003-01-02 Paul Eggert <eggert@twinsun.com>
16067
16068 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
16069 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
16070 Bug reported by Nelson H. F. Beebe.
16071
dc546b0f
PE
160722003-01-01 Paul Eggert <eggert@twinsun.com>
16073
16074 * Version 1.875.
16075
2c09b6a7
PE
160762002-12-30 Paul Eggert <eggert@twinsun.com>
16077
16078 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
16079 Moved here from...
16080 (<INITIAL>","): Here. This causes stray "," to be treated
16081 more uniformly.
16082
dc546b0f 16083 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
16084 last brace in braced code when not in Yacc mode, for compatibility
16085 with Bison 1.35. This resurrects the 2001-12-15 patch to
16086 src/reader.c.
16087
16088 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
16089 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
16090
535c0f63
PE
160912002-12-28 Paul Eggert <eggert@twinsun.com>
16092
16093 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
16094 that of SYM's type. This fixes Debian bug 168069, reported by
16095 Thomas Olsson.
d600ee67 16096
963fcc17
PE
160972002-12-28 Paul Eggert <eggert@twinsun.com>
16098
16099 Version 1.75f.
16100
16101 Switch back to the Yacc style of conflict reports, undoing some
16102 of the 2002-07-30 change.
16103 * doc/bison.texinfo (Understanding): Use Yacc style for
16104 conflict reports. Also, use new way of locating rules.
16105 * src/conflicts.c (conflict_report):
16106 Renamed from conflict_report_yacc, removing the old
16107 'conflict_report'. Translate the entire conflict report at once,
16108 so that we don't assume that "," has the same interpretation in
16109 all languages.
16110 (conflicts_output): Use Yacc-style conflict report for each state,
16111 instead of our more-complicated style.
16112 (conflicts_print): Use Yacc-style conflict report, except print
16113 the input file name when not emulating Yacc.
16114 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
16115 Conflicted Reduction, %expect not enough, %expect too much,
16116 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
16117 * tests/existing.at (GNU Cim Grammar): Likewise.
16118 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
16119
16120 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
16121 fatal): Don't invoke fflush; it's not needed and it might even be
16122 harmful for stdout, as stdout might not be open.
16123 * src/reduce.c (reduce_print): Likewise.
16124
b1efe548
PE
161252002-12-27 Paul Eggert <eggert@twinsun.com>
16126
16127 Fix a bug where error locations were not being recorded correctly.
16128 This problem was originally reported by Paul Hilfinger in
161a71f3 16129 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
16130
16131 * data/yacc.c (yyparse): New local var yylerrsp, to record the
16132 top of the location stack's error locations.
16133 (yyerrlab): Set it. When discarding a token, push its location
16134 onto yylerrsp so that we don't lose track of the error's end.
16135 (yyerrlab1): Now is only the target of YYERROR, so that we can
16136 properly record the location of the action that failed. For GCC
16137 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
16138 GCC warning about yyerrlab1 being unused if YYERROR is unused.
16139 (yyerrlab2): New label, which yyerrlab now falls through to.
16140 Compute the error's location by applying YYLLOC_DEFAULT to
16141 the locations of all the symbols that went into the error.
16142 * doc/bison.texinfo (Location Default Action): Mention that
16143 YYLLOC_DEFAULT is also invoked for syntax errors.
16144 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
16145 Error locations include the locations of all the tokens that were
16146 discarded, not just the last token.
d600ee67 16147
983c5c2c
PE
161482002-12-26 Paul Eggert <eggert@twinsun.com>
16149
b1efe548
PE
16150 * src/files.c: Include quote.h.
16151 (compute_output_file_names): Warn if we detect conflicting
16152 outputs to the same file. This should catch the misunderstanding
16153 exemplified by Debian Bug 165349, reported by Bruce Stephens..
16154
16155 * src/conflicts.c (conflicts_print): If the user specifies
16156 "%expect N", report an error if there are any reduce/reduce
16157 conflicts. This is what the manual says should happen.
16158 This fixes Debian bug 130890, reported by Anthony DeRobertis.
16159 * tests/conflicts.at (%expect with reduce conflicts): New test.
16160
983c5c2c
PE
16161 Don't use m4_include on relative file names, as it doesn't work as
16162 desired if there happens to be a file with that name under ".".
d600ee67 16163
983c5c2c
PE
16164 * m4sugar/version.m4: Remove; it was included but it wasn't used.
16165 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
16166 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
16167 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
16168 * src/output.c (output_skeleton): Use full path names when
16169 specifying a file to include; don't rely on include path, as
16170 it's unreliable when the working file contains a file with
16171 that name.
d600ee67 16172
983c5c2c
PE
161732002-12-25 Paul Eggert <eggert@twinsun.com>
16174
16175 Remove obsolete references to bison.simple and bison.hairy.
16176 Problem mentioned by Aubin Mahe in
161a71f3 16177 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
16178 * data/glr.c: Comment fix.
16179 * doc/bison.1: Remove references. Also, mention "yacc".
16180
16181 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
16182 with -g option.
16183
16184 * src/parse-gram.y (declaration): Use enum "report_states" rather
16185 than its numeric value 1.
16186
16187 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
16188 opening a new one. This fixes Debian bug 165349, reported by
16189 Bruce Stephens.
16190
23f2d9dc
PE
161912002-12-24 Paul Eggert <eggert@twinsun.com>
16192
16193 Version 1.75e.
16194
16195 * Makefile.maint (cvs-update): Don't assume that the shell
16196 supports $(...), as Solaris sh doesn't.
16197
16198 * src/parse-gram.y (lloc_default): Remove test for empty
16199 nonterminals at the end, since it didn't change the result.
16200
162012002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
16202
16203 If the user does not define YYSTYPE as a macro, Bison now declares it
16204 using typedef instead of defining it as a macro. POSIX requires this.
16205 For consistency, YYLTYPE is also declared instead of defined.
16206
16207 %union directives can now have a tag before the `{', e.g., the
16208 directive `%union foo {...}' now generates the C code
16209 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
16210 The default union tag is `YYSTYPE', for compatibility with Solaris 9
16211 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
16212 instead of `yyltype'.
16213
16214 `yystype' and `yyltype' are now obsolescent macros instead of being
16215 typedefs or tags; they are no longer documented and will be
16216 withdrawn in a future release.
16217
16218 * data/glr.c (b4_location_type): Remove.
16219 (YYSTYPE): Renamed from yystype.
16220 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
16221 (struct YYLTYPE): Renamed from struct yyltype.
16222 (YYLTYPE): Renamed from yyltype.
16223 (yyltype, yystype): New (and obsolescent) macros,
16224 for backward compatibility.
16225 * data/yacc.c: Likewise.
16226
16227 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
16228 does not specify a union tag. This is for compatibility with
16229 Solaris 9 yacc.
16230
16231 * src/parse-gram.y (add_param): 2nd arg is now char * not char
16232 const *, since it is now modified by stripping surrounding { }.
16233 (current_braced_code): Remove.
16234 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
16235 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
16236 trailing " {...}". Now of type <chars>.
16237 (grammar_declaration): Adjust to bundled tokens.
16238 (code_content): Remove; stripping is now done by add_param.
16239 (print_token_value): Print contents of bundled tokens.
16240 (token_name): New function.
16241
16242 * src/reader.h (braced_code, current_braced_code): Remove.
16243 (token_name): New decl.
16244
16245 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
16246 token_type, not braced_code code_kind. All uses changed.
16247 (SC_PRE_CODE): New state, for scanning after a keyword that
16248 has (or usually has) an immediately-following braced code.
16249 (token_type): New local var, to keep track of which token type
16250 to return when scanning braced code.
16251 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 16252 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
16253 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
16254 instead of returning a token type immediately.
16255 (<INITIAL>"{"): Set token type.
16256 (<SC_BRACED_CODE>"}"): Use it.
16257 (handle_action_dollar, handle_action_at): Now returns bool
16258 indicating success. Fail if ! current_rule; this prevents a core dump.
16259 (handle_symbol_code_dollar, handle_symbol_code_at):
16260 Remove; merge body into caller.
16261 (handle_dollar, handle_at): Complain in invalid contexts.
16262
16263 * NEWS, doc/bison.texinfo: Document the above.
16264 * NEWS: Fix years and program names in copyright notice.
16265
879ca4f8
PE
162662002-12-17 Paul Eggert <eggert@twinsun.com>
16267
16268 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
16269 Reporting, Table of Symbols): Omit mentions of %lex-param and
16270 %parse-param from the documentation for now.
16271
1c5fe69d
PE
162722002-12-15 Paul Eggert <eggert@twinsun.com>
16273
16274 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
16275 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
16276 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
16277 disagreed with the Bison documentation. Bug
16278 reported by Andrew Walrond.
d600ee67 16279
1c5fe69d
PE
16280 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
16281 as the caller now does that.
16282 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
16283 (YYEMPTY): Parenthesize right hand side, since others use it.
16284 (yyparse): Don't assume that our generated code is the only code
16285 that sets yychar.
16286
d1de5372
PE
162872002-12-13 Paul Eggert <eggert@twinsun.com>
16288
16289 Version 1.75d.
16290
16291 POSIX requires a "yacc" command.
16292 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
16293 (MOSTLYCLEANFILES): Add yacc.
16294 (yacc): New rule.
1c5fe69d 16295 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
16296 as an alias for bison y.
16297
16298 * po/LINGUAS: Add da.
d600ee67 16299
d1de5372
PE
16300 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
16301 problem with latest <getopt.h>.
16302 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
16303
16304 * doc/fdl.texi: Upgrade to 1.2.
16305 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
16306 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
16307 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
16308 gnulib.
16309 * config/install-sh: Sync with autotools.
16310
16311 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 16312 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
16313 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
16314 locations are requested.
16315 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
16316 locations are requested.
16317
d0f3fe23
PE
163182002-12-12 Paul Eggert <eggert@twinsun.com>
16319
16320 Remove unportable casts and storage allocation tricks.
16321 While we're at it, remove almost all casts, since they
16322 usually aren't needed and are a sign of trouble.
16323
16324 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
16325
16326 * src/derives.c (derives_compute): Do not subtract NTOKENS from
16327 the pointer DSET returned by malloc; this isn't portable.
16328 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
16329 Similarly for DERIVES.
16330 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
16331 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
16332 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
16333
16334 * src/derives.c (derives_compute): Do not bother invoking
16335 int_of_rule_number, since rule numbers are integers.
16336
16337 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
16338 rather than XMALLOC (char, N).
16339
16340 * src/files.c (filename_split): Rewrite to avoid cast.
16341
16342 * src/gram.h (symbol_number_as_item_number,
16343 item_number_as_symbol_number, rule_number_as_item_number,
16344 item_number_as_rule_number):
16345 Now inline functions rather than macros, to avoid casts.
16346 * src/state.h (state_number_as_int): Likewise.
16347 * src/tables.c (state_number_to_vector_number,
16348 symbol_number_to_vector_number): Likewise.
16349
16350 * src/gram.h (int_of_rule_number): Remove; no longer used.
16351
16352 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
16353 since the resulting storage is always stored into.
16354
16355 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
16356 where it's needed.
16357
16358 * src/muscle_tab.c (muscle_m4_output):
16359 Now inline. Return bool, not int.
16360 * src/state.c (state_compare): Likewise.
16361 * src/symtab.c (symbol_check_defined,
16362 symbol_check_alias_consistency, symbol_pack, symbol_translation,
16363 hash_compare_symbol, hash_symbol):
16364 Likewise.
16365 * src/uniqstr.c (uniqstr_print): Likewise.
16366 * src/muscle_tab.c (muscle_m4_output_processor):
16367 New function, to avoid casts.
16368 * src/state.c (state_comparator, stage_hasher): Likewise.
16369 * src/symtab.c (symbol_check_defined_processor,
16370 symbol_check_alias_consistency_processor, symbol_pack_processor,
16371 symbol_translation_processor, hash_symbol_comparator,
16372 hash_symbol_hasher): Likewise.
16373 * src/uniqstr.c (uniqstr_print_processor): Likewise.
16374 * src/muscle_tab.c (muscles_m4_output):
16375 Use new functions instead of casting old functions unportably.
16376 * src/state.c (state_hash_new): Likewise.
16377 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
16378 symbols_token_translations_init):
16379 Likewise.
16380 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
16381
16382 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
16383 var instead of casting to long, to avoid casts.
16384 (prepare_states): Use MALLOC rather than alloca, so that we don't
16385 have to worry about alloca.
16386 * src/state.c (state_hash_lookup): Likewise.
16387
16388 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
16389 local var instead of casting to unsigned char, to avoid casts.
16390
16391 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
16392 STATE_ALLOC): Remove.
16393 (transitions_new, errs_new, reductions_new, state_new): Use malloc
16394 rather than calloc, and use offsetof to avoid allocating slightly
16395 too much storage.
16396 (state_new): Initialize all members.
16397
16398 * src/state.c (state_hash): Use unsigned accumulator, not signed.
16399
16400 * src/symtab.c (symbol_free): Remove; unused.
16401 (symbol_get): Remove cast in lhs of assignment.
16402 (symbols_do): Now static. Accept generic arguments, not
16403 hashing-related ones.
16404
16405 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
16406 (symbol_processor): Remove.
16407 (symbols_do): Remove decl; now static.
16408
16409 * src/system.h (alloca): Remove; decl no longer needed.
16410 (<stddef.h>): Include, for offsetof.
16411 (<inttypes.>, <stdint.h>): Include if available.
16412 (uintptr_t): New type, if system lacks it.
16413 (CALLOC, MALLOC, REALLOC): New macros.
16414 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
16415 new macros.
16416
16417 * src/tables.c (table_size): Now int, to pacify GCC.
16418 (table_grow, table_ninf_remap): Use signed table size.
16419 (save_row): Don't bother initializing locals when not needed.
16420 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
16421 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
16422
16423 * src/vcg.h: Correct misspellings.
16424
16425 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
16426
16427
16428 * src/getargs.c (getargs): Don't assume EOF == -1.
16429
26b4a969
PE
164302002-12-09 Paul Eggert <eggert@twinsun.com>
16431
16432 Change identifier spellings to avoid collisions with names
16433 that are reserved by POSIX.
16434
16435 Don't use names ending in _t, since POSIX reserves them.
16436 For consistency, remove _e and _s endings -- they're weren't
16437 needed to remove ambiguity. All uses changed.
16438 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
16439 turn was just renamed from struniq_t.
16440 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
16441 which in turn was just renamed from struniq_processor_t.
16442 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
16443 in turn was renamed from hash_compare_struniq_t.
16444 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
16445 (state_list): Renamed from state_list_t.
16446 * src/assoc.h (assoc): Renamed from assoc_t.
16447 * src/conflicts.c (enum conflict_resolution): Renamed from
16448 enum conflict_resolution_e.
16449 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
16450 (rule_list): Renamed from rule_list_t.
16451 * src/getargs.h (enum trace): Renamed from enum trace_e.
16452 (enum report): Renamed from enum report_e.
16453 * src/gram.h (item_number): Renamed from item_number_t.
16454 (rule_number): Renamed from rule_number_t.
16455 (struct rule_s): Remove the "rule_s" part; not used.
16456 (rule): Renamed from rule_t.
16457 (rule_filter): Renamed from rule_filter_t.
16458 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
16459 (goto_list): Renamed from goto_list_t.
16460 * src/lalr.h (goto_number): Renamed from goto_number_t.
16461 * src/location.h (location): Renamed from location_t.
16462 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
16463 and moved here from:
16464 * src/muscle_tab.h (muscle_entry_t): here.
16465 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
16466 (rule_list): Renamed from rule_list_t.
16467 * src/print_graph.c (static_graph): Renamed from graph.
16468 * src/reader.h (braced_code): Renamed from braced_code_t.
16469 Remove brace_code_e tag.
16470 * src/relation.h (relation_node): Renamed from relation_node_t.
16471 (relation_nodes): Renamed from relation_nodes_t.
16472 (relation): Renamed from relation_t.
16473 * src/state.h (state_number): Renamed from state_number_t.
16474 (struct state): Renamed from struct state_s.
16475 (state): Renamed from state_t.
16476 (transitions): Renamed from transitions_t. Unused (and
16477 misspelled) transtion_s tag removed.
16478 (errs): Renamed from errs_t. Unused errs_s tag removed.
16479 (reductions): Renamed from reductions_t. Unused tag
16480 reductions_s removed.
16481 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
16482 (struct symbol_list): Renamed from struct symbol_list_s.
16483 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
16484 (struct symbol): Renamed from struct symbol_s.
16485 (symbol): Renamed from symbol_t.
16486 * src/tables.c (vector_number): Renamed from vector_number_t.
16487 (action_number): Renamed from action_t.
16488 * src/tables.h (base_number): Renamed from base_t.
16489 * src/vcg.h (enum color): Renamed from enum color_e.
16490 (enum textmode): Renamed from enum textmode_e.
16491 (enum shape): Renamed from enum shape_e.
16492 (struct colorentry): Renamed from struct colorentry_s.
16493 (struct classname): Renamed from struct classname_s.
16494 (struct infoname): Renamed from struct infoname_s.
16495 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
16496 (enum decision): Renamed from enum decision_e.
16497 (enum orientation): Renamed from enum orientation_e.
16498 (enum alignment): Renamed from enum alignment_e.
16499 (enum arrow_mode): Renamed from enum arrow_mode_e.
16500 (enum crossing_type): Renamed from enum crossing_type_e.
16501 (enum view): Renamed from enum view_e.
16502 (struct node): Renamed from struct node_s.
16503 (node): Renamed from node_t.
16504 (enum linestyle): Renamed from enum linestyle_e.
16505 (enum arrowstyle): Renamed from enum arrowstyle_e.
16506 (struct edge): Renamed from struct edge.
16507 (edge): Renamed from edge_t.
16508 (struct graph): Renamed from struct graph_s.
16509 (graph): Renamed from graph_t.
16510 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
16511 Rename value_t -> value.
16512 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
16513 value_t_as_yystype -> value_as_yystype.
16514
16515 Don't include <errno.h> in the mainstream code, since it
16516 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
16517 * lib/get-errno.c, lib/get-errno.h: New files.
16518 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
16519 get-errno.c.
16520 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
16521 * src/output.c (output_skeleton): Likewise.
16522 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
16523 instead of errno.
16524 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
16525 Likewise.
16526 (handle_action_dollar, handle_action_at): Likewise.
16527 * src/system.h: Do not include <errno.h>.
16528 (TAB_EXT): Renamed from EXT_TAB.
16529 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
16530
16531 Avoid str[a-z]*, since <string.h> reserves that name space.
16532 Change all instances of "struniq" in names to "uniqstr", and
16533 likewise for "STRUNIQ" and "UNIQSTR".
16534 * src/uniqstr.c: Renamed from src/struniq.c.
16535 * src/uniqstr.h: Renamed from src/struniq.h.
16536 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
16537 * src/files.c (strsuffix): Remove; unused.
16538 (concat2): Renamed from stringappend. Now static.
16539 * src/files.h (strsuffix, stringappend): Remove; unused.
16540 * src/parse-gram.y (<chars>): Renamed from <string>.
16541 (<uniqstr>): Renamed from <struniq>.
16542 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
16543 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
16544 (struct graph_s.expand): Renamed from struct graph_s.stretch.
16545 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
16546 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
16547 (N_EXPAND): Renamed from N_STRETCH.
16548
16549 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
16550 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
16551 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
16552 Remove; unused.
16553 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
16554 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
16555 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
16556 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
16557 (BASE_MAXIMUM): Renamed from BASE_MAX.
16558 (BASE_MINIMUM): Renamed from BASE_MIN.
16559 (ACTION_MAX): Remove; unused.
16560 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
16561 Unnecessary casts removed from above defines.
16562
16563
16564 Fix misspelling in names.
16565 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
16566 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
16567 G_NODE_ALIGNEMENT.
16568
16569
16570 * lib/timevar.c (timevar_report): Renamed from time_report,
16571 for consistency with other names.
16572 * lib/timevar.h (timevar_report): New decl.
16573 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
16574
16575
16576 Sort include-file uses.
16577
16578 Reorder all include files under src to be in the order "system.h".
16579 then the ../lib include files in angle brackets (alphabetized),
16580 then the . include files in double-quotes (alphabetized). Fix
16581 dependency breakages encountered in this process, as follows:
16582 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
16583 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
16584 * src/state.h: Include "symtab.h".
16585
996b1c7e
PE
165862002-12-08 Paul Eggert <eggert@twinsun.com>
16587
16588 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
16589 since this causes problems when __file__ contains character
16590 sequences like "@" that are treated specially by src/scan-skel.l.
16591 Instead, just use the file's basename. This fixes the bug
16592 reported by Martin Mokrejs in
161a71f3 16593 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 16594
e19c4e5d
PE
165952002-12-06 Paul Eggert <eggert@twinsun.com>
16596
16597 Add support for rules that do not have trailing semicolons, as
16598 POSIX requires. Improve the quality of locations in Bison
16599 diagnostics.
26b4a969 16600
e19c4e5d
PE
16601 * src/location.c: Include <quotearg.h>.
16602 (empty_location): Now const.
16603 (location_print): New function. Follow the recommendation of the
16604 GNU Coding Standards for locations that span file boundaries.
16605 * src/location.h: Do not include <quotearg.h>; no longer needed.
16606 (boundary): New type.
16607 (location_t): Use it. This allows locations to span file boundaries.
16608 All member uses changed: file -> start.file or end.file (as needed),
16609 first_line -> start.line, first_column -> start.column,
16610 last_line -> end.line, last_column -> end.column.
16611 (equal_boundaries): New function.
16612 (LOCATION_RESET, LOCATION_STEP): Remove.
16613 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16614 (empty_location): Now const.
16615 (location_print): New decl.
16616 * src/parse-gram.y (lloc_default): New function, which handles
16617 empty locations more accurately.
16618 (YYLLOC_DEFAULT): Use it.
16619 (%token COLON): Remove.
16620 (%token ID_COLON): New token.
26b4a969 16621 (rules): Use it.
e19c4e5d
PE
16622 (declarations, rules): Remove trailing semicolon.
16623 (declaration, rules_or_grammar_declaration):
16624 Allow empty (";") declaration.
16625 (symbol_def): Remove empty actions; no longer needed.
16626 (rules_or_grammar_declaration): Remove trailing semicolon.
16627 (semi_colon.opt): Remove.
16628 * src/reader.h: Include location.h.
16629 (scanner_cursor): New decl.
16630 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16631 rolling our own.
16632 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16633 of *loc.
16634 (STEP): Remove. No longer needed, now that adjust_location does
16635 the work. All uses removed.
16636 (scanner_cursor): New var.
16637 (adjust_location): Renamed from extend_location. It now sets
16638 *loc and adjusts the scanner cursor. All uses changed.
16639 Don't bother testing for CR.
16640 (handle_syncline): Remove location arg; now updates scanner cursor.
16641 All callers changed.
16642 (unexpected_end_of_file): Now accepts start boundary of token or
16643 comment, not location. All callers changed. Update scanner cursor,
16644 not the location.
16645 (SC_AFTER_IDENTIFIER): New state.
16646 (context_state): Renamed from c_context. All uses changed.
16647 (id_loc, code_start, token_start): New local vars.
16648 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16649 processing of Yacc white space and equivalents here.
16650 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16651 instead of returning ID immediately, since we need to search for
16652 a subsequent colon.
16653 (<INITIAL>"'", "\""): Save token_start.
16654 (<INITIAL>"%{", "{", "%%"): Save code_start.
16655 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16656 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16657 BEGIN context_state at end, not INITIAL.
16658 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16659 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16660 Return correct token start.
16661 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16662 the start of a character, string or multiline comment is found.
16663 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16664 Reduction): Adjust reported locations to match the more-precise
16665 results now expected.
16666 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16667 * tests/reduce.at (Useless Rules, Reduced Automaton,
16668 Underivable Rules): Likewise.
16669 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16670 or "|"' now that so many other tokens are allowed by the new grammar.
16671
16672 * src/complain.h (current_file): Remove duplicate decl;
16673 current_file is now owned by files.h.
16674 * src/complain.c, src/scan-gram.l: Include files.h.
16675
166762002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 16677
e19c4e5d
PE
16678 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16679 promotes to int; it might be unsigned int.
16680 * data/yacc.c (yy_reduce_print): Likewise.
16681
16682 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16683 be #defined in the prologue, not in the Bison declarations.
16684 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 16685
b64755e3
PE
166862002-12-02 Paul Eggert <eggert@twinsun.com>
16687
16688 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16689 * lib/strtoul.c: New file, from gnulib.
16690 This fixes a porting bug reported by Peter Klein in
161a71f3 16691 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 16692
6e746484
PE
166932002-11-30 Paul Eggert <eggert@twinsun.com>
16694
b64755e3
PE
16695 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16696 and put only a forward declaration in the prologue. This is for
16697 consistency with the other scanner helper functions.
16698
6ba55592
PE
16699 Type clashes now generate warnings, not errors, since it
16700 appears that POSIX may allow some grammars with type clashes.
16701 * src/reader.c (grammar_current_rule_check): Warn about
16702 type clashes instead of complaining.
16703 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16704
6e746484
PE
16705 Add Yacc library, since POSIX requires it.
16706 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16707 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16708 * lib/main.c, lib/yyerror.c: New files.
16709
16710 gram_error can be static; it need not be extern.
16711 * src/reader.h (gram_error): Remove decl.
16712 * src/parse-gram.y (gram_error): Now static. Add static decl.
16713 (print_token_value): Omit parameter names from forward decl,
16714 for consistency.
16715
88510f9c
PE
167162002-11-29 Paul Eggert <eggert@twinsun.com>
16717
6e746484
PE
16718 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16719 be declared before being used. E.g., one should typically
16720 declare them in the prologue. Use GNU coding style in examples.
16721 Put "const" consistently after the type it modifies. Mention
16722 that C99 supports "inline". Mention that yyerror traditionally
16723 returns "int".
16724
88510f9c
PE
16725 %parse-param and %lex-param now take just one argument, the
16726 declaration; the argument name is deduced from the declaration.
16727
16728 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16729 Reporting, Table of Symbols): Document this.
16730 * src/parse-gram.y (add_param): New function.
16731 (COMMA): Remove.
16732 (declaration): Implement new rule for %parse-param and %lex-param.
16733 * src/scan-gram.l: "," now elicits a warning, rather than being
16734 a token; this is more compatible with byacc.
16735 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16736
bb92250c
PE
167372002-11-27 Paul Eggert <eggert@twinsun.com>
16738
16739 Rename identifiers to avoid real and potential collisions.
16740
16741 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16742 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 16743 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
16744 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16745 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16746 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16747 All uses changed.
16748 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16749 The name "yycontrol" violates the name space rules, and this stuff
16750 wasn't being used anyway.
16751 (input): Remove action; this stuff wasn't being used.
16752 (gram_error): Rename local variable yylloc -> loc.
16753 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16754 (YY_DECL): Don't use "yy" at start of local variables.
16755 All uses changed, e.g., yylloc -> loc.
16756 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16757 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16758 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16759 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16760
16761 * src/parse-gram.y (gram_error): loc is now const *.
16762 * src/reader.h (gram_error): Likewise.
16763
3af4feb2
PE
167642002-11-24 Paul Eggert <eggert@twinsun.com>
16765
16766 Version 1.75c.
16767
16768 * tests/actions.at (Actions after errors): Use an output format
16769 more similar to that of the Printers and Destructors test.
16770 Test the position of the ';' token too.
16771 (Printers and Destructors): Likewise.
16772 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16773 unnecessarily alarming people when the test fails.
16774
16775 * data/yacc.c (yyerrlab1): Move this label down, so that the
16776 parser does not discard the lookahead token if the user code
16777 invokes YYERROR. This change is required for POSIX conformance.
16778
16779 * lib/error.c: Sync with gnulib.
16780
167812002-11-22 Paul Eggert <eggert@twinsun.com>
16782
16783 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16784 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16785 * lib/xmalloc.c: Likewise.
26b4a969 16786
58004308
PE
167872002-11-20 Paul Eggert <eggert@twinsun.com>
16788
16789 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16790
167912002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 16792
58004308
PE
16793 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16794 should use `if (! x) abort ();' rather than `assert (x);', and
16795 anyway it's one less thing to worry about configuring.
16796
16797 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16798 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16799 and replace all instances of assert with abort.
16800 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16801 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16802
16803 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16804 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16805 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16806 hash_find_entry, hash_rehash, hash_insert): Likewise.
16807 * src/conflicts.c (resolve_sr_conflict): Likewise.
16808 * src/lalr.c (set_goto_map, map_goto): Likewise.
16809 * src/nullable.c (nullable_compute): Likewise.
16810 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16811 * src/reader.c (packgram, reader): Likewise.
16812 * src/state.c (state_new, state_free, state_transitions_set,
16813 state_reduction_find): Likewise.
16814 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16815 symbol_pack): Likewise.
16816 * src/tables.c (conflict_row, pack_vector): Likewise.
16817 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16818 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16819 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16820 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16821
16822 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16823 (ARGMATCH_CONSTRAINT): New macro.
16824 (ARGMATCH_ASSERT): Use it.
16825
16826 * src/system.h (verify): New macro.
16827 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16828 rather than assert.
16829 * src/tables.c (tables_generate): Likewise.
16830
16831 * src/struniq.c (struniq_assert): Now returns void, and aborts
16832 if the assertion is false.
16833 (struniq_assert_p): Remove.
16834 * src/struniq.h: Likewise.
16835
76ae8198
PE
168362002-11-18 Paul Eggert <eggert@twinsun.com>
16837
16838 * data/glr.c (yygetLRActions): Replace `yyindex' with
16839 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16840 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 16841 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 16842
d3c4e709
AD
168432002-11-18 Akim Demaille <akim@epita.fr>
16844
16845 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16846 space.
16847 From Tim Van Holder.
16848
8d8a7238
PE
168492002-11-17 Paul Eggert <eggert@twinsun.com>
16850
16851 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16852 to "SyntaxError" for consistency with my 2002-11-15 change.
16853
16854 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16855 not define to {}, since this breaks the common use of `YYDPRINTF
16856 ((...));' if a single statement is desired (e.g. before `else').
16857 Work around GCC warnings by surrounding corresponding calls with
16858 {} if needed.
16859 (yyhasResolvedValue): Remove unused function.
16860 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16861 loop body.
16862 (yyreportSyntaxError): Renamed from yyreportParseError.
16863 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16864 All uses changed.
16865 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16866 extern when possible. Remove unused initializations.
16867
b0937b22
AD
168682002-11-16 Akim Demaille <akim@epita.fr>
16869
16870 Augment the similarity between GLR and LALR traces.
16871
16872 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16873 (YY_REDUCE_PRINT): New.
16874 (yyparse): Use them.
16875 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16876 YYDPRINT here.
16877 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16878 state reached after the reduction/recovery, since...
16879 (yyparse, yyprocessOneStack): Report the state we are entering in.
16880
c5e3e510
AD
168812002-11-16 Akim Demaille <akim@epita.fr>
16882
16883 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16884 Add support for --trace=skeleton.
16885 * src/scan-skel.l: %option debug.
16886 Scan strings of non-@ or \n instead of character by character.
16887 (scan_skel): Handle trace_skeleton.
16888 (QPUTS): New.
16889 (@output_parser_name@, @output_header_name@): ``Restore'' their
16890 support (used to be M4 macros).
16891 * data/yacc.c: Quote larger chunks, a la glr.c.
16892 * data/lalr1.cc: Likewise.
16893 The header guards are no longer available, so use some other
16894 string than `YYLSP_NEEDED'.
16895
4c6cc1db
AD
168962002-11-16 Akim Demaille <akim@epita.fr>
16897
16898 Make the ``Printers and Destructors'' test more verbose, taking
16899 `yacc.c''s behavior as (possibly wrong) reference.
16900
16901 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16902 instead of fprint on stdout.
16903 Set and report the last_line of the symbols.
16904 Consistently display values and locations.
16905
6d9e8019
PE
169062002-11-16 Paul Eggert <eggert@twinsun.com>
16907
16908 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16909
6e649e65
PE
169102002-11-15 Paul Eggert <eggert@twinsun.com>
16911
b25d88f6
PE
16912 * tests/actions.at (Actions after errors): New test case.
16913
6e649e65
PE
16914 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16915 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16916 tests/action.at, tests/calc.at, tests/conflicts.at,
16917 tests/cxx-type.at, tests/regression.at:
16918 "parse error" -> "syntax error" for POSIX compatibility.
16919 "parsing stack overflow..." -> "parser stack overflow" so
16920 that code matches Bison documentation.
16921
0f39aab9
AD
169222002-11-15 Akim Demaille <akim@epita.fr>
16923
16924 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16925 take two BRACED_CODE, not two string_content.
16926 Free the scanner's obstack when we are done.
16927 (code_content): New.
16928 * tests/calc.at: Adjust.
16929 * doc/bison.texinfo: Adjust.
16930 Also, make sure to include the `,' for these declarations.
16931
761c1926
AD
169322002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16933
16934 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16935 definition; avoids potential autoreconf problems.
16936
b0f98b10
AD
169372002-11-15 Akim Demaille <akim@epita.fr>
16938
16939 Always check the value returned by yyparse.
16940
16941 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16942 returned by yyparse.
16943 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16944 Adjust calls.
16945 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16946 returned by yyparse.
16947
970785f1
PH
169482002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16949
16950 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16951 on input.at test.
16952
8fcc7db1
PE
169532002-11-14 Paul Eggert <eggert@twinsun.com>
16954
7ec1b48e
PE
16955 * src/output.c (output_skeleton): Call xfopen instead of
16956 duplicating xfopen's body.
16957
cfff7583 16958 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 16959 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 16960
8fcc7db1
PE
16961 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16962 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16963 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16964 file twice in the grammar, as an extra check.
16965
16966 * tests/input.at (Torturing the Scanner): Surround the
16967 backslash-newline tests with "#if 0", to make it less likely that
16968 we'll run into compiler bugs. Bring back solitary \ inside
16969 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 16970 test backslash-newline in C character constant.
8fcc7db1 16971
4e8d992c
AD
169722002-11-14 Akim Demaille <akim@epita.fr>
16973
16974 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16975 status of the compiler.
f32b346d 16976 Calling `exit 1' is no longer needed.
4e8d992c
AD
16977 Reported by Nelson H. F. Beebe.
16978
9501dc6e
AD
169792002-11-14 Akim Demaille <akim@epita.fr>
16980
16981 * tests/atlocal.in (CPPFLAGS): We have config.h.
16982 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16983 New.
16984 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16985 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16986 * tests/regression.at, tests/torture.at: Use them for all the
16987 grammars that are to be compiled.
16988 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16989 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16990 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16991
18b519c0
AD
169922002-11-14 Akim Demaille <akim@epita.fr>
16993
16994 * doc/bison.texinfo: Various formatting changes (alignments in
16995 samples, additional @group/@end group, GCS in samples.
16996 Use @deffn instead of simple @table to define the directives,
16997 macros, variables etc.
16998
9a86cdb9
PE
169992002-11-13 Paul Eggert <eggert@twinsun.com>
17000
daa33def 17001 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 17002 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 17003
daa33def 17004 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 17005 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
17006 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
17007 * tests/headers.at (export YYLTYPE): Likewise.
17008
17009 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 17010 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 17011
9a86cdb9
PE
17012 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
17013 comments, since they're not portable. Use GNU coding style.
17014
9c1e26bd
AD
170152002-11-13 Akim Demaille <akim@epita.fr>
17016
17017 * data/yacc.c: Leave bigger chunks of quoted text.
17018 (YYDSYMPRINTF): New.
17019 Use it to report symbol activities.
17020 * data/glr.c (YYDSYMPRINTF): New.
17021 Use it.
17022
87f721cc
PE
170232002-11-12 Paul Eggert <eggert@twinsun.com>
17024
17025 Version 1.75b.
17026
17027 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
17028 (yyglrReduce): Return yyok, not 0.
17029 This should avoid the enumerated-type warnings reported
464c6927 17030 by Nelson H. F. Beebe in
161a71f3 17031 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
17032
17033 * lib/bbitset.h (BITSET_INLINE): Remove.
17034 * lib/bitset.h [! BITSET_INLINE]: Remove.
17035 (bitset_set, bitset_reset, bitset_test): Rename local vars
17036 to avoid shadowing warnings by GCC.
17037
17038 * data/glr.c (inline): Remove #define. It's the user's
17039 responsibility to #define it away, just like 'const'.
464c6927 17040 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 17041 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 17042
87f721cc
PE
17043 * Makefile.maint (po-check): Scan .l and .y files instead of the
17044 .c and the .h files that they generate. This fixes the bug
17045 reported by Tim Van Holder in:
161a71f3 17046 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
17047 Look for N_ as well as for _. Try to avoid matching #define for
17048 N_ and _.
17049 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
17050 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
17051 * src/scan-gram.l: Revamp regular expressions so that " and '
17052 do not confuse xgettext.
17053
17054 * src/struniq.h (struniq_new): Do not declare the return type
17055 to be 'const'; this violates the C standard.
17056 * src/struniq.c (struniq_new): Likewise.
17057
be14ade5
AD
170582002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
17059
17060 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
17061 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
17062 linker.
17063
05291fbc
AD
170642002-11-12 Akim Demaille <akim@epita.fr>
17065
17066 * Makefile.maint: Sync with Autoconf:
17067 (local_updates): New.
17068
1f5fd52e
AD
170692002-11-12 Akim Demaille <akim@epita.fr>
17070
17071 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
17072
283f1e64
AD
170732002-11-12 Akim Demaille <akim@epita.fr>
17074
17075 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
17076 locations.
17077
886b69d1
AD
170782002-11-12 Akim Demaille <akim@epita.fr>
17079
17080 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
17081 not yyvalue.
17082
3df37415
AD
170832002-11-12 Akim Demaille <akim@epita.fr>
17084
17085 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
17086 Use it to test the GLR parser.
17087
7bd6c77e
AD
170882002-11-12 Akim Demaille <akim@epita.fr>
17089
17090 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
17091 defines it.
17092 * data/glr.c (yystos): New.
17093 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
17094 (YYDSYMPRINT): New.
17095 (yyval): Don't define it, it is handled via M4.
17096 (yyrecoverParseError): Free verbosely the discarded symbols.
17097 * data/yacc.c (yysymprint): Remove, rather...
17098 (b4_yysymprint_generate): invoke.
17099 * data/c.m4 (b4_yysymprint_generate): New.
17100 Accept pointers as arguments, as opposed to the version from
17101 yacc.c.
17102 (b4_yydestruct_generate): Likewise.
17103 * tests/cations.at (Printers and Destructors): Use Bison directives
17104 instead of CPP macros.
17105 Don't rely on internal details.
17106
b0400cc6
AD
171072002-11-12 Akim Demaille <akim@epita.fr>
17108
17109 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
17110 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
17111 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
17112 it against YYEMPTY and so forth), work on yytoken (i.e., set
17113 it to YYEMPTY etc.).
17114 (yydestruct): Replace with a b4_yydestruct_generate invocation.
17115 (b4_symbol_actions): Remove.
17116 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
17117 for 0, end-of-input.
17118
72f889cc
AD
171192002-11-12 Akim Demaille <akim@epita.fr>
17120
17121 * doc/bison.texinfo (Destructor Decl): New.
17122
b1ae9233
AD
171232002-11-12 Akim Demaille <akim@epita.fr>
17124
17125 * src/tables.c (tables_generate): Use free for pointers that
17126 cannot be NULL, not XFREE.
17127 (pack_vector): Use assert, not fatal, for bound violations.
17128 * src/state.c (state_new): Likewise.
17129 * src/reader.c (reader): Likewise.
17130 * src/lalr.c (set_goto_map): Likewise.
72f889cc 17131 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
17132 the file name.
17133
7ec2d4cd
AD
171342002-11-12 Akim Demaille <akim@epita.fr>
17135
17136 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
17137 Restore.
17138 * src/scan-gram.l (last_string): Is global to the file, not to
17139 yylex.
17140 * src/parse-gram.y (input): Don't append the epilogue here,
17141 (epilogue.opt): do it here, and free the scanner's obstack.
17142 * src/reader.c (epilogue_set): Rename as...
17143 (epilogue_augment): this.
17144 * data/c.m4 (b4_epilogue): Defaults to empty.
17145
573a6cd3
AD
171462002-11-12 Akim Demaille <akim@epita.fr>
17147
17148 * src/getargs.c (long_options): Remove duplicates.
17149 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
17150 Remove.
17151 * doc/bison.rnh: Remove.
17152 * doc/bison.texinfo (VMS Invocation): Remove.
17153
95612cfa
AD
171542002-11-12 Akim Demaille <akim@epita.fr>
17155
17156 * src/struniq.h, src/struniq.c (struniq_t): Is const.
17157 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
17158
17159 Use struniq for symbols.
17160
17161 * src/symtab.h (symbol_t): The tag member is a struniq.
17162 (symbol_type_set): Adjust.
17163 * src/symtab.c (symbol_new): Takes a struniq.
17164 (symbol_free): Don't free the tag member.
17165 (hash_compare_symbol_t, hash_symbol_t): Rename as...
17166 (hash_compare_symbol, hash_symbol): these.
17167 Use the fact that tags as struniqs.
17168 (symbol_get): Use struniq_new.
17169 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
17170 Returns a strniq.
17171 * src/reader.h (merger_list, grammar_currentmerge_set): The name
17172 and type members are struniqs.
17173 * src/reader.c (get_merge_function)
17174 (grammar_current_rule_merge_set): Adjust.
17175 (TYPE, current_type): Are struniq.
17176
17177 Use struniq for file names.
17178
17179 * src/files.h, src/files.c (infile): Split into...
17180 (grammar_file, current_file): these.
17181 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
17182 * src/reduce.c (reduce_print): Likewise.
17183 * src/getargs.c (getargs): Likewise.
17184 * src/complain.h, src/complain.c: Likewise.
17185 * src/main.c (main): Call struniqs_new early enough to use it for
17186 file names.
17187 Don't free the input file name.
17188
3e6656f9
AD
171892002-11-12 Akim Demaille <akim@epita.fr>
17190
17191 * src/symtab.c (symbol_free): Remove dead deactivated code:
17192 type_name are properly removed.
17193 Don't use XFREE to free items that cannot be NULL.
17194 * src/struniq.h, src/struniq.c: New.
17195 * src/main.c (main): Initialize/free struniqs.
17196 * src/parse-gram.y (%union): Add astruniq member.
17197 (yyprint): Adjust.
17198 * src/scan-gram.l (<{tag}>): Return a struniq.
17199 Free the obstack bit that used to store it.
17200 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
17201
7672019c
PE
172022002-11-11 Paul Eggert <eggert@twinsun.com>
17203
17204 Revamp to fix many (but not all) of the C- and M4-related quoting
17205 problems. Among other things, this fixes the Bison bug reported
17206 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 17207 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
17208
17209 Use new @ escapes consistently. Represent brackets with @{ and @}
17210 rather than @<:@ and @:>@, since this works a bit better with dumb
17211 editors like vi. Represent @ with @@, since @ is now consistently
17212 an escape. Use @oline@ and @ofile@ rather than __oline__ and
17213 __ofile__, to avoid unexpected expansions. Similarly, use @output
17214 rather than #output.
17215
17216 * data/c.m4 (b4_copyright): Omit file name from comment, since
17217 the file name could contain "*/".
17218 (b4_synclines_flag): Don't quote the 2nd argument; it should already
17219 be quoted. All uses changed.
17220
17221 * data/glr.c: Use new @ escapes consistently.
17222 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
17223 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
17224 Remove, since they couldn't handle arbitrary characters in file
17225 names.
17226 * data/lalr1.cc: Likewise.
17227 * data/yacc.c: Likewise.
17228
17229 * src/files.c (output_infix): Remove; all uses removed.
17230 * src/files.h: Likewise.
17231
17232 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
17233 mishandled funny characters in file names, and anyway it isn't
17234 needed any more.
17235 * data/yacc.c: Likewise.
17236 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
17237
17238 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
17239 * data/yacc.c: Likewise.
17240
17241 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
17242 strings now.
17243 (muscle_init): Quote filename as a C string.
17244 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
17245 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
17246 * src/output.c (escaped_file_name_output): New function.
17247 (prepare_symbols): Quote tokens for M4.
17248 (prepare): Don't insert output_infix, output_prefix,
17249 output_parser_name, output_header_name; this is now down by scan-skel.
17250 Insert skeleton as a C string.
17251
17252 * src/output.c (user_actions_output, symbol_destructors_output,
17253 symbol_printers_output): Quote filenames for C and M4.
17254 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17255
17256 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
17257 escapes other than \\ and \'; this simplifies the code.
17258 (<SC_STRING>): Likewise, for \\ and \".
17259 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
17260 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
17261 Use new escapes @{ and @} for [ and ].
17262
17263 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
17264 them with auto vars.
17265 Switch to new escape scheme, where @ is the escape character uniformly.
17266 Abort if a stray escape character is found. Avoid unbounded input
17267 buffer when parsing non-escaped text.
17268
17269 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
17270 __oline__, #output, $@, and @{ do not have unintended meanings.
17271
acea4f3b
PE
172722002-11-09 Paul Eggert <eggert@twinsun.com>
17273
17274 Fix the test failure due to GCC warnings described in
161a71f3 17275 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
17276 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
17277 evaluate to 0 if it's impossible for NINF to be in the respective
17278 table.
17279 (yygetLRActions, yyrecoverParseError): Use them.
17280
17281 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
17282 counted in the token inserted at end of file. Now takes
17283 location_t *, not location_t, so that the location can be
17284 adjusted. All uses changed.
17285
17286 * tests/regression.at (Invalid inputs): Adjust wording in
17287 diagnostic to match the new behavior.
17288
17289 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
17290 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
17291 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
17292 abort ();'. This reduces the runtime of the "Many lookaheads"
17293 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
17294 GCC 3.2.
17295
20ef1ad5
PE
172962002-11-07 Paul Eggert <eggert@twinsun.com>
17297
17298 * src/parse-gram.y (CHARACTER): Remove unused token.
17299 All uses removed.
17300
17301 * src/scan-gram.l: Remove stack option. We no longer use the
17302 stack, since the stack was never deeper than 1; instead, use the
17303 new auto var c_context to record the stacked value.
17304
17305 Remove nounput option. At an unexpected end of file, we now unput
17306 the minimal input necessary to end cleanly; this simplifies the
17307 code.
17308
17309 Avoid unbounded token sizes where this is easy.
17310
17311 (unexpected_end_of_file): New function.
17312 Use it to systematize the error message on unexpected EOF.
17313 (last-string): Now auto, not static.
17314 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
17315 (scanner_last_string_free): Remove; not used.
17316 (percent_percent_count): Move decl to just before use.
17317 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
17318 not the (never otherwised-used) CHARACTER.
17319
93724f13
AD
173202002-11-07 Akim Demaille <akim@epita.fr>
17321
17322 Let yyerror always receive the msg as last argument, so that
17323 yyerror can be variadic.
17324
17325 * data/yacc.c (b4_yyerror_args): New.
17326 Use it when calling yyerror.
17327 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
17328 Use it when calling yyerror.
17329 * doc/bison.texinfo (Error Reporting): Adjust.
17330 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
17331 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
17332
6e40b4eb
AD
173332002-11-06 Akim Demaille <akim@epita.fr>
17334
17335 #line should have quoted strings.
17336 Ideally, this should be done by m4_quotearg.
17337
17338 * src/scan-skel.l: Include quotearg.h.
17339 Quote __ofile__.
17340 * src/output.c (symbol_printers_output)
17341 (symbol_destructors_output): Quote the file name.
17342
2dfbfc12
AD
173432002-11-06 Akim Demaille <akim@epita.fr>
17344
17345 * tests/regression.at (Invalid inputs): Adjust to the recent
17346 messages.
17347
437c2d80
AD
173482002-11-06 Akim Demaille <akim@epita.fr>
17349
17350 Restore --no-lines.
17351 Reported by Jim Kent.
17352
17353 * data/c.m4 (b4_syncline): New.
17354 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
17355 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
17356 * src/output.c (user_actions_output): Likewise.
17357 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 17358 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 17359
900c5db5
AD
173602002-11-06 Akim Demaille <akim@epita.fr>
17361
17362 * src/main.c (main): Free `infile'.
17363 * src/scan-gram.l (handle_syncline): New.
17364 Recognize `#line'.
17365 * src/output.c (user_actions_output, symbol_destructors_output)
17366 (symbol_printers_output): Use the location's file name, not
17367 infile.
17368 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17369
e183b123 173702002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 17371
e183b123 17372 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 17373 either has GLR conflict entries.
e183b123 17374
193eb6b7
PE
173752002-11-05 Paul Eggert <eggert@twinsun.com>
17376
e183b123
PE
17377 * src/scan-gram.l: Use more accurate diagnostics, e.g.
17378 "integer out of range" rather than "invalid value".
17379 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
17380 accordingly.
17381
193eb6b7
PE
17382 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
17383 Also, remove one static variable in the scanner.
17384
17385 * src/scan-gram.l (braces_level): Now auto, not static.
17386 Initialize to zero if the compiler is being picky.
17387 (INITIAL): Clear braces_level instead of incrementing it.
17388 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
17389 as POSIX 1003.1-2001 requires.
17390 * src/system.h (IF_LINT): New macro, taken from coreutils.
17391 * configure.ac: Define "lint" if --enable-gcc-warnings.
17392
29c01725
AD
173932002-11-05 Akim Demaille <akim@epita.fr>
17394
17395 * src/scan-gram.l: When it starts with `%', complain about the
17396 whole directive, not just that `invalid character: %'.
17397
8aeac3ca
AD
173982002-11-04 Akim Demaille <akim@epita.fr>
17399
17400 * Makefile.maint: Update from Autoconf.
17401 (update, cvs-update, po-update, do-po-update): New.
17402
793a58bb
AD
174032002-11-04 Akim Demaille <akim@epita.fr>
17404
17405 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
17406 and yyerror.
17407 Have yyerror `use' its arguments.
17408 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
17409 returns true when location & yacc & pure & parse-param.
17410 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
17411
c4d720cd
AD
174122002-11-04 Akim Demaille <akim@epita.fr>
17413
17414 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
17415 clashes.
17416 * src/scan-gram.l: Use [\'] instead of ['] to pacify
17417 font-lock-mode.
17418 Use complain_at.
17419 Use quote, not quote_n since LOCATION_PRINT no longer uses the
17420 slot 0.
17421
613a0dc5
PE
174222002-11-03 Paul Eggert <eggert@twinsun.com>
17423
17424 * src/reader.c (get_merge_function, grammar_current_rule_check):
17425 Use consistent diagnostics for reporting type name clashes.
17426 Quote the types with <>, for consistency with Yacc.
17427 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
17428
2a8d363a
AD
174292002-11-03 Akim Demaille <akim@epita.fr>
17430
17431 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
17432 New.
17433 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
17434 (b4_parse_param): Remove.
17435 Use b4_identification.
17436 Propagate b4_pure_args where needed to pass them to yyerror.
17437 * data/glr.m4 (b4_parse_param): Remove.
17438 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
17439 (b4_lpure_formals): New.
17440 Use b4_identification.
17441 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
17442 b4_user_formals and b4_user_args.
17443 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
17444 (yyreportAmbiguity): When using a pure parser, also need
17445 the location, and the parse-params.
17446 Adjust callers.
17447 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
17448 When using a pure parser, also need the parse-params.
17449 Adjust callers.
17450 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
17451 (%pure-parser + %parse-param) LALR and GLR parsers.
17452 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
17453 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
17454 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
17455 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
17456 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
17457 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
17458 * doc/bison.texinfo: Untabify the whole file.
17459 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
17460 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
17461 (Error Reporting): Adjust to these new directives.
17462 Document %error-verbose, deprecate YYERROR_VERBOSE.
17463
9e32add8
AD
174642002-11-03 Akim Demaille <akim@epita.fr>
17465
17466 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
17467 AT_CHECK_CALC_GLR invocations to use % directives, instead of
17468 command line options.
17469 * tests/cxx-type.at: Formatting changes.
17470
b02d90a5
PE
174712002-11-03 Paul Eggert <eggert@twinsun.com>
17472
17473 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
17474 to count columns correctly, and to check for invalid inputs.
9e32add8 17475
b02d90a5
PE
17476 Use mbsnwidth to count columns correctly. Account for tabs, too.
17477 Include mbswidth.h.
17478 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
17479 (extend_location): New function.
17480 (YY_LINES): Remove.
17481
17482 Handle CRLF in C code rather than in Lex code.
17483 (YY_INPUT): New macro.
17484 (no_cr_read): New function.
17485
17486 Scan UCNs, even though we don't fully handle them yet.
17487 (convert_ucn_to_byte): New function.
17488
17489 Handle backslash-newline correctly in C code.
17490 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
17491 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
17492 all uses changed.
17493 (tag, splice): New EREs. Do not allow NUL or newline in tags.
17494 Use {splice} wherever C allows backslash-newline.
17495 YY_STEP after space, newline, vertical-tab.
17496 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 17497
b02d90a5
PE
17498 (letter, id): Don't assume ASCII; e.g., spell out a-z.
17499
17500 ({int}, handle_action_dollar, handle_action_at): Check for integer
17501 overflow.
9e32add8 17502
b02d90a5
PE
17503 (YY_STEP): Omit trailing semicolon, so that it's more like C.
17504
17505 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
17506 as well as \000. Check for UCHAR_MAX, not 255.
17507 Allow \x with an arbitrary positive number of digits, as in C.
17508 Check for overflow here.
17509 Allow \? and UCNs, for compatibility with C.
17510
17511 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
17512 with quote slot used by complain_at.
17513
17514 * tests/input.at: Add tests for backslash-newline, m4 quotes
17515 in symbols, long literals, and funny escapes in strings.
17516
17517 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
17518 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
17519 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
17520 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
17521 * m4/mbswidth.m4: New file, from GNU coreutils.
17522
17523 * doc/bison.texinfo (Grammar Outline): Document // comments.
17524 (Symbols): Document that trigraphs have no special meaning in Bison,
17525 nor is backslash-newline allowed.
17526 (Actions): Document that trigraphs have no special meaning.
17527
17528 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
17529 no longer used.
17530
175312002-11-02 Paul Eggert <eggert@twinsun.com>
17532
17533 * src/reader.c: Don't include quote.h; not needed.
17534 (get_merge_function): Reword warning to be consistent with
17535 type clash diagnostic in grammar_current_rule_check.
17536
17537 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
17538 bug in trigraph handling.
17539
17540 * src/output.c (prepare_symbols): When printing token names,
17541 escape "[" as "@<:@" and likewise for "]".
17542
17543 * src/system.h (errno): Remove declaration, as we are now
17544 assuming C89 or better, and C89 guarantees errno.
17545
762b212b
PE
175462002-10-30 Paul Eggert <eggert@twinsun.com>
17547
17548 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
17549 Check for close failures.
17550 * src/files.h (xfclose): Return void, not int, since it always
17551 returned zero.
17552 * src/files.c (xfclose): Likewise. Report I/O error if ferror
17553 indicates one.
17554 * src/output.c (output_skeleton): Use xfclose rather than fclose
17555 and ferror. xfclose now checks ferror.
17556
17557 * data/glr.c (YYLEFTMOST_STATE): Remove.
17558 (yyreportTree): Use a stack-based leftmost state. This avoids
17559 our continuing battles with bogus warnings about initializers.
17560
56100c60
AD
175612002-10-30 Akim Demaille <akim@epita.fr>
17562
17563 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
17564 #if.
17565
51b4a04c
PH
175662002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17567
17568 * tests/glr-regr1.at: New test for reported regressions.
17569 * tests/testsuite.at: Add glr-regr1.at test.
17570 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 17571
bf1ebda2
PE
175722002-10-24 Paul Eggert <eggert@twinsun.com>
17573
5c16c6b1
PE
17574 Version 1.75a.
17575
bf1ebda2
PE
17576 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
17577 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
17578 we use malloc. Don't assume 'A' through 'Z' are contiguous.
17579 Don't assume strdup exists; POSIX says its an XSI extension.
17580 Check for buffer overflow on input.
17581
b526ee61
AD
175822002-10-24 Akim Demaille <akim@epita.fr>
17583
17584 * src/output.c (output_skeleton): Don't disable M4sugar comments
17585 too soon: it results in comments being expanded.
17586 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
17587 first output.
17588
f1886bb2
AD
175892002-10-24 Akim Demaille <akim@epita.fr>
17590
17591 * data/yacc.c (m4_int_type): New.
17592 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
17593 char' as only yacc.c wants K&R portability.
17594 * data/glr.c (yysigned_char): Remove.
17595 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
17596 Reported by Quoc Peyrot.
17597
c5576256
PE
175982002-10-23 Paul Eggert <eggert@twinsun.com>
17599
17600 * src/main.c (main): With --trace=time, report times even if a
17601 non-fatal error occurs. Formerly, the times were reported in some
17602 such cases but not in others.
17603 * src/reader.c (reader): Just return if a complaint has been issued,
17604 instead of exiting, so that 'main' can report times.
17605
27b0ffea
AD
176062002-10-22 Akim Demaille <akim@epita.fr>
17607
17608 * src/system.h: Include sys/types.
17609 Reported by Bert Deknuydt.
17610
223a7883
PE
176112002-10-23 Paul Eggert <eggert@twinsun.com>
17612
17613 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17614 Suggested by Art Haas.
17615
176162002-10-22 Paul Eggert <eggert@twinsun.com>
17617
17618 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17619 decl; not needed any more.
17620 * src/main.c (main): Use return to exit, undoing yesterday's change.
17621 The last OS that we could find where this wouldn't work is
17622 SunOS 3.5, and that's too old to worry about now.
17623
17624 * data/glr.c (struct yyltype): Define members even when not
17625 doing locations. This is more consistent with yacc.c, and it
17626 works around the following bug reports:
161a71f3
PE
17627 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17628 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 17629
223a7883
PE
17630 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17631 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17632 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17633
8b76775a
AD
176342002-10-22 Akim Demaille <akim@epita.fr>
17635
17636 * data/README: New.
17637
6db10d14
PE
176382002-10-21 Paul Eggert <eggert@twinsun.com>
17639
17640 Be consistent about 'bool'; the old code used an enum in one
17641 module and an int in another, and this violates the C standard.
17642 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17643 * configure.ac (AC_HEADER_STDBOOL): Add.
17644 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17645 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17646 * src/symtab.c (hash_compare_symbol_t): Likewise.
17647 * src/system.h (bool, false, true): Use a definition consistent
17648 with ../lib/hash.c. All uses changed.
17649
17650 * src/complain.c (warning_issued): Renamed from warn_message_count,
17651 so that we needn't worry about integer overflow (!).
17652 Now of type bool. All uses changed.
17653 (complaint_issued): Renamed from complain_message_count; likewise.
17654
17655 * src/main.c (main): Use exit to exit with failure.
27b0ffea 17656
6db10d14
PE
17657 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17658 rather than 1 and 0.
17659 * src/main.c (main): Likewise.
17660 * src/getargs.c (getargs): Likewise.
17661 * src/reader.c (reader): Likewise.
17662
17663 * src/getarg.c (getargs): Remove duplicate code for
17664 "Try `bison --help'".
17665
17666 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17667 What was that "2" for?
17668
17669 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17670 * src/getargs.c (usage): Likewise.
17671
17672 * src/getargs.c (getargs): When there are too few operands, report
17673 the last one. When there are too many, report the first extra
17674 one. This is how diffutils does it.
17675
92a060fd
PE
176762002-10-20 Paul Eggert <eggert@twinsun.com>
17677
17678 Remove K&R vestiges.
17679 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17680 * src/complain.c (VA_START): Remove. Assume prototypes.
17681 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17682 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17683 fatal): Assume prototypes.
17684 * src/complain.h: Assume prototypes.
17685 * src/system.h (PARAMS): Remove.
17686 Include <limits.h> unconditionally, since it's guaranteeed even
17687 for a freestanding C89 compiler.
17688 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17689 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 17690
e7cb57c0
AD
176912002-10-20 Akim Demaille <akim@epita.fr>
17692
17693 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17694 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17695 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17696 (yyresolveStates, yyresolveAction, yyresolveStack)
17697 (yyprocessOneStack): Use them.
17698 (yy_reduce_print): New.
17699 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17700
0245f82d
AD
177012002-10-20 Akim Demaille <akim@epita.fr>
17702
17703 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17704 arguments and output `void'.
17705 (b4_c_function): Rename as...
17706 (b4_c_function_def): this.
17707 (b4_c_function_decl, b4_c_ansi_function_def)
17708 (b4_c_ansi_function_decl): New.
17709 Change the interpretation of the arguments: before `int, foo', now
17710 `int foo, foo'.
17711 * data/yacc.c (yyparse): Prototype and define thanks to these.
17712 Adjust b4_c_function_def uses.
17713 * data/glr.c (yyparse): Likewise, but ANSI only.
17714
39912f52
AD
177152002-10-20 Akim Demaille <akim@epita.fr>
17716
17717 * src/output.c (prepare): Move the definition of `tokens_number',
17718 `nterms_number', `undef_token_number', `user_token_number_max'
17719 to...
17720 (prepare_tokens): Here.
17721 (prepare_tokens): Rename as...
17722 (prepare_symbols): this.
17723 (prepare): Move the definition of `rules_number' to...
17724 (prepare_rules): here.
17725 (prepare): Move the definition of `last', `final_state_number',
17726 `states_number' to...
17727 (prepare_states): here.
17728 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17729
20c1e2ad
AD
177302002-10-20 Akim Demaille <akim@epita.fr>
17731
17732 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17733
21964f43
AD
177342002-10-20 Akim Demaille <akim@epita.fr>
17735
17736 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17737 * data/c.m4: here.
17738
66d30cd4
AD
177392002-10-20 Akim Demaille <akim@epita.fr>
17740
17741 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17742 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17743 `pair'.
17744 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17745 `name' to...
17746 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17747 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17748 These.
17749
95f2c9fe
PE
177502002-10-19 Paul Eggert <eggert@twinsun.com>
17751
17752 Do not create a temporary file, as that involves security and
17753 cleanup headaches. Instead, use a pair of pipes.
17754 Derived from a suggestion by Florian Krohm.
17755 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17756 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17757 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17758 (BISON_PREREQ_SUBPIPE): Add.
17759 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17760 Add subpipe.h, subpipe.c.
17761 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17762 * po/POTFILES.in: Add lib/subpipe.c.
17763 * src/output.c: Include "subpipe.h".
17764 (m4_invoke): Remove decl.
17765 (scan_skel): New decl.
17766 (output_skeleton): Use pipe rather than temporary file for m4 input.
17767 Check that m4sugar.m4 is readable, to avoid deadlock.
17768 Check for pipe I/O error.
17769 * src/scan-skel.l (readpipe): Remove decl.
17770 (scan_skel): New function, to be used in place of m4_invoke.
17771 Read from stream rather than file.
66d30cd4 17772
95f2c9fe
PE
17773 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17774 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17775 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17776 this generates a more-accurate value anyway.
17777
17778 * lib/timevar.c (timervar_accumulate): Rename locals to
17779 avoid confusion with similarly-named more-global.
17780 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17781
17782 * src/output.c (prepare): Use xstrdup to convert char const *
17783 to char *, to avoid GCC warning.
17784
c19988b7
AD
177852002-10-19 Akim Demaille <akim@epita.fr>
17786
17787 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17788 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17789 Use them to have `calc.y' ready for %pure-parser.
17790 * data/yacc.c (YYLEX): Pass a yylex return type to
17791 b4_c_function_call.
17792
ae7453f2
AD
177932002-10-19 Akim Demaille <akim@epita.fr>
17794
17795 Prototype support of %lex-param and %parse-param.
17796
17797 * src/parse-gram.y: Add the definition of the %lex-param and
17798 %parse-param tokens, plus their rules.
17799 Drop the `_' version of %glr-parser.
17800 Add the "," token.
17801 * src/scan-gram.l (INITIAL): Scan them.
17802 * src/muscle_tab.c: Comment changes.
17803 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17804 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17805 (muscle_entry_s): The `value' member is no longer const.
17806 Adjust all dependencies.
17807 * src/muscle_tab.c (muscle_init): Adjust: use
17808 MUSCLE_INSERT_STRING.
17809 Initialize the obstack earlier.
17810 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17811 (muscle_pair_list_grow): New.
17812 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17813 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17814 * tests/calc.at: Use %locations, not --locations.
17815 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17816
0e575721
AD
178172002-10-19 Akim Demaille <akim@epita.fr>
17818
17819 * src/getargs.c (usage): Take status as argument and exit
17820 accordingly.
17821 Report the traditional `Try ... --help' message when status != 0.
17822 (usage, version): Don't take a FILE * as arg, it is pointless.
17823 (getargs): When there is an incorrect number of arguments, make it
17824 an error, and report it GNUlically thanks to `usage ()'.
17825
724ce7f5
PE
178262002-10-18 Paul Eggert <eggert@twinsun.com>
17827
3a781eb2
PE
17828 * data/glr.c (yyreportParseError): Don't assume that sprintf
17829 yields the length of the printed string, as this is not true
17830 on SunOS 4.1.4. Reported by Peter Klein.
17831
724ce7f5
PE
17832 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17833 * tests/conflicts.at (%nonassoc and eof): Likewise.
17834 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17835
473d0a75
AD
178362002-10-17 Akim Demaille <akim@epita.fr>
17837
17838 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17839 * src/getargs.c (trace_types, trace_args): Adjust.
17840 * src/reader.c (grammar_current_rule_prec_set)
17841 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17842 Standardize error messages.
17843 And s/@prec/%prec/!
17844 (reader): Use trace_flag to enable scanner/parser debugging,
17845 instead of an adhoc scheme.
17846 * src/scan-gram.l: Remove trailing debugging code.
17847
e76d2469
PE
178482002-10-16 Paul Eggert <eggert@twinsun.com>
17849
93e2236a
PE
17850 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17851 MUSCLE_TAB_H.
17852
e76d2469
PE
17853 * NEWS: Officially drop support for building Bison with K&R C,
17854 since it didn't work anyway and it's not worth worrying about.
17855 * Makefile.maint (wget_files): Remove ansi2knr.c.
17856 (ansi2knr.c-url_prefix): Remove.
17857 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17858 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17859 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17860
5bd1c419
PE
178612002-10-15 Paul Eggert <eggert@twinsun.com>
17862
17863 Stop using the "enum_" trick for K&R-style function definitions;
17864 it confused me, and I was the author! Instead, assume that people
17865 who want to use K&R C compilers (when using these modules in GCC,
17866 perhaps?) will run ansi2knr.
17867
17868 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17869 All uses of "enum_" changed to "enum ".
17870 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17871 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 17872
5bd1c419
PE
17873 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17874 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17875 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17876 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17877 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17878 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17879 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17880 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17881 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17882 Use function prototypes; this removes the need for declaring
17883 static functions simply to provide their prototypes.
17884 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17885 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17886 bitset_count_, bitset_create, bitset_dump, bitset_first,
17887 bitset_free, bitset_init, bitset_last, bitset_next,
17888 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17889 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17890 bitset_print, bitset_release_memory, bitset_toggle_,
17891 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17892 debug_bitset): Likewise.
17893 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17894 * lib/bitset_stats.c (bitset_log_histogram_print,
17895 bitset_percent_histogram_print, bitset_stats_and,
17896 bitset_stats_and_cmp, bitset_stats_and_or,
17897 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17898 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17899 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17900 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17901 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17902 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17903 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17904 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17905 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17906 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17907 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17908 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17909 bitset_stats_zero): Likewise.
17910 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17911 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17912 bitsetv_dump, debug_bitsetv): Likewise.
17913 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17914 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17915 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17916 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17917 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17918 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17919 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17920 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17921 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17922 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17923 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17924 Likewise.
17925 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17926 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17927 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17928 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17929 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17930 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17931 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17932 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17933 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17934 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17935 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 17936
ae26e1f0
AD
179372002-10-14 Akim Demaille <akim@epita.fr>
17938
17939 Version 1.75.
17940
d43baf71
AD
179412002-10-14 Akim Demaille <akim@epita.fr>
17942
17943 * tests/Makefile.am (maintainer-check-posix): New.
17944
7ebc83e3
AD
179452002-10-14 Akim Demaille <akim@epita.fr>
17946
17947 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17948 member.
17949
05846dae
AD
179502002-10-14 Akim Demaille <akim@epita.fr>
17951
17952 * src/tables.c (table_ninf_remap): base -> tab.
17953 Reported by Matt Rosing.
17954
1318e37d
PE
179552002-10-14 Paul Eggert <eggert@twinsun.com>
17956
447fbb17
PE
17957 * tests/action.at, tests/calc.at, tests/conflicts.at,
17958 tests/cxx-type.at, tests/headers.at, tests/input.at,
17959 tests/regression.at, tests/synclines.at, tests/torture.at:
17960 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17961 so that the tests still work even if POSIXLY_CORRECT is set.
17962 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 17963
1318e37d
PE
17964 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17965 for portability to K&R hosts. Fix typo: signed char is guaranteed
17966 only to 127, not to 128.
17967 * data/glr.c (yysigned_char): New type.
17968 * data/yacc.c (yysigned_char): Likewise.
17969 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17970
cc0f0794
PE
179712002-10-13 Paul Eggert <eggert@twinsun.com>
17972
5038f418
PE
17973 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17974 true due to limited range of data type" warning from GCC.
17975
cc0f0794
PE
17976 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17977 by wrapping enum yytokentype's definition inside #ifndef
17978 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17979
6fed0802
AD
179802002-10-13 Akim Demaille <akim@epita.fr>
17981
17982 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17983 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17984
32f0598d
AD
179852002-10-13 Akim Demaille <akim@epita.fr>
17986
17987 * Makefile.maint: Update from Autoconf 2.54.
17988 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17989
7ea9a33f
AD
179902002-10-13 Akim Demaille <akim@epita.fr>
17991
17992 * src/print.c (print_state): Separate the list of solved conflicts
17993 from the other items.
17994 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17995
ea99527d
AD
179962002-10-13 Akim Demaille <akim@epita.fr>
17997
17998 Let nondeterministic skeletons be usable with deterministic
17999 tables.
18000
18001 With the patch, GAWK compiled by GCC without -O2 passes its test
18002 suite using a GLR parser driven by LALR tables. It fails with -O2
18003 because `struct stat' gives two different answers on my machine:
18004 88 (definition of an auto var) and later 96 (memset on this var).
18005 Hence the stack is badly corrumpted. The headers inclusion is to
18006 blame: if I move the awk.h inclusion before GLR's system header
18007 inclusion, the two struct stat have the same size.
18008
18009 * src/tables.c (pack_table): Always create conflict_table.
18010 (token_actions): Always create conflict_list.
18011 * data/glr.c (YYFLAG): Remove, unused.
18012
f377f69f
AD
180132002-10-13 Akim Demaille <akim@epita.fr>
18014
18015 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
18016 (O0FLAGS): New.
18017 (VALGRIND, GXX): New.
18018 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
18019 * tests/bison.in: Run $PREBISON a pre-command.
18020 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
18021 (maintainer-check-g++): New.
18022 * Makefile.am (maintainer-check): New.
18023
2a1fe6ed
AD
180242002-10-13 Akim Demaille <akim@epita.fr>
18025
18026 * data/glr.c: Formatting changes.
18027 Tweak some trace messages to match yacc.c's.
18028
f50adbbd
AD
180292002-10-13 Akim Demaille <akim@epita.fr>
18030
18031 GLR parsers sometimes raise parse errors instead of performing the
18032 default reduction.
18033 Reported by Charles-Henry de Boysson.
18034
18035 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 18036 check the length of the traces when %glr.
f50adbbd
AD
18037 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
18038 GLR's traces.
18039 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
18040 Test GLR parsers.
18041 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
18042 (yyltype): Remove the yy prefix from the member names.
18043 (yytable): Complete its comment.
18044 (yygetLRActions): Map error action number from YYTABLE from
18045 YYTABLE_NINF to 0.
18046 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
18047 (which was a bug: it should have been YYTABEL_NINF, and yet it was
18048 not satisfying as we could compare an YYACTION computed from
18049 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
18050 only value for error actions.
18051 (yyreportParseError): In verbose parse error messages, don't issue
18052 `error' in the list of expected tokens.
18053 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
18054 next action to perform to match glr.c's decoding.
18055 (yytable): Complete its comment.
18056
bcbad5b9
PE
180572002-10-13 Paul Eggert <eggert@twinsun.com>
18058
18059 Fix problem reported by Henrik Grubbstroem in
161a71f3 18060 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
18061 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
18062 because the Bison parser reads the second action before reducing
18063 the first one.
18064 * src/scan-gram.l (rule_length): New static var.
18065 Use it to keep track of the rule length in the scanner, since
18066 we can't expect the parser to be in lock-step sync with the scanner.
18067 (handle_action_dollar, handle_action_at): Use this var.
18068 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 18069
14904b89
PE
180702002-10-12 Paul Eggert <eggert@twinsun.com>
18071
1fe611e5
PE
18072 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
18073 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
18074 Include <sys/time.h> when checking for clock_t and struct tms.
18075 Use same include order as source.
18076 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 18077 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 18078
1fe611e5
PE
18079 * lib/timevar.c: Update copyright date and clarify comments.
18080 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 18081
1fe611e5
PE
18082 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
18083 GCC version as of today, then merge Bison's changes.
18084 Change "GCC" to "Bison" in copyright notice. timevar.def's
18085 author is Akim, so change that too.
18086
98194095
PE
18087 * src/reader.c (grammar_current_rule_check):
18088 Don't worry about the default action if $$ is untyped.
18089 Prevents bogus warnings reported by Jim Gifford in
161a71f3 18090 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 18091
14904b89
PE
18092 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
18093 * data/glr.c, data/lalr1.cc, data/yacc.c:
18094 Output token definitions before the first part of user declarations.
18095 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 18096 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 18097
ff6dca18
PE
180982002-10-11 Paul Eggert <eggert@twinsun.com>
18099
18100 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
18101 (yyparse): here. This undoes some of the 2002-07-25 change.
18102 Compatibility problem reported by Ralf S. Engelschall with
18103 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
18104
eb714592
AD
181052002-10-11 Akim Demaille <akim@epita.fr>
18106
18107 * tests/regression.at Characters Escapes): New.
18108 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
18109 characters.
18110 Reported by Jan Nieuwenhuizen.
18111
b7195100
AD
181122002-10-11 Akim Demaille <akim@epita.fr>
18113
18114 * po/id.po: New.
18115
f28a0f2d
PE
181162002-10-10 Paul Eggert <eggert@twinsun.com>
18117
18118 Portability fixes for bitsets; this also avoids several GCC
18119 warnings.
18120
18121 * lib/abitset.c: Include <stddef.h>, for offsetof.
18122 * lib/lbitset.c: Likewise.
18123
18124 * lib/abitset.c (abitset_bytes): Return a size that is aligned
18125 properly for vectors of objects. Do not assume that adding a
18126 header size to a multiple of a word size yields a value that is
18127 properly aligned for the whole union.
18128 * lib/bitsetv.c (bitsetv_alloc): Likewise.
18129
18130 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
18131 unique names for structures.
18132 * lib/ebitset.c (ebitset_bytes): Likewise.
18133 * lib/lbitset.c (lbitset_bytes): Likewise.
18134
18135 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
18136 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
18137 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
18138 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
18139 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
18140 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
18141 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
18142 to improve the type-checking that GCC can do.
18143 * lib/bitset.c (bitset_op4_cmp): Likewise.
18144 * lib/bitset_stats.c (bitset_stats_count,
18145 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
18146 bitset_stats_copy, bitset_stats_disjoint_p,
18147 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
18148 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
18149 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
18150 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
18151 bitset_stats_and_or_cmp, bitset_stats_andn_or,
18152 bitset_stats_andn_or_cmp, bitset_stats_or_and,
18153 bitset_stats_or_and_cmp): Likewise.
18154 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
18155 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
18156 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
18157 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
18158
18159 * lib/abitset.h: Include bitset.h, not bbitset.h.
18160 * lib/ebitset.h: Likewise.
18161 * lib/lbitset.h: Likewise.
18162
18163 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
18164 All instances of parameters of type enum bitset_opts are now of
18165 type enum_bitset_opts, to conform to the C Standard, and similarly
18166 for enum_bitset_type.
18167 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
18168 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
18169
18170 Do not use "struct bitset_struct" to mean different things in
18171 different modules. Not only is this confusing, it violates
18172 the C Standard, which requires that structure types in different
18173 modules must be compatible if one is to be passed to the other.
18174 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
18175 All instances of "struct bitset_struct *" replaced with "bitset".
18176 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
18177 (union bitset_union, struct abitset_struct, struct ebitset_struct,
18178 struct lbitset_struct, struct bitset_stats_struct): New types.
18179 All uses of struct bitset_struct changed to union bitset_union,
18180 etc.
ba0fe3c7 18181 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
18182 struct bitset_struct): Remove.
18183 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
18184 struct bitset_struct): Remove.
18185 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
18186 bitset_struct): Remove.
18187 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
18188 Likewise.
18189
18190 Do not call a function of type T using a call that assumes the
18191 function is of a different type U. Standard C requires that a
18192 function must be called with a type that is compatible with its
18193 definition.
18194 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
18195 New decls.
18196 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
18197 New functions.
18198 * lib/ebitset.c (PFV): Remove.
18199 * lib/lbitset.c (PFV): Likewise.
18200 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
18201 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
18202 decls.
18203 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
18204 (ebitset_vtable): Use them.
18205 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
18206 lbitset_xor): New functions.
18207 (lbitset_vtable): Use them.
18208
18209 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
18210 Declare.
18211
18212 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
18213 GCC warning.
18214 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
18215 Use offsetof, for simplicity.
18216
6fbe4984
PE
182172002-10-06 Paul Eggert <eggert@twinsun.com>
18218
18219 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
18220 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 18221 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
18222 which was inadvertently undone by the 2002-09-30 patch.
18223 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
18224 the same width as int.
18225
420f93c8
PE
182262002-10-04 Paul Eggert <eggert@twinsun.com>
18227
18228 Version 1.50.
18229
18230 * configure.ac (AC_INIT), NEWS: Increment version number.
18231
18232 * doc/bison.texinfo: Minor spelling, grammar, and white space
18233 fixes.
18234 (Symbols): Mention that any negative value returned from yylex
18235 signifies end-of-input. Warn about negative chars. Mention
18236 the portable Standard C character set.
18237
18238 The GNU coding standard says CFLAGS and YFLAGS are reserved
18239 for the installer to set.
18240 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
18241 * src/Makefile.am (AM_CFLAGS): Likewise.
18242 (AM_YFLAGS): Renamed from YFLAGS.
18243
18244 Fix some MAX and MIN problems.
18245 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
18246 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
18247 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
18248 * src/reader.c (reader): Use it.
18249
18250 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
18251 POSIX 1003.1-2001 has removed fgrep.
18252
182532002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
18254
18255 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
18256 interpreted as signed.
18257 * lib/ebitset.c (ebitset_list): Fix bug.
18258
ff68026d
PE
182592002-10-01 Paul Eggert <eggert@twinsun.com>
18260
18261 More fixes for 64-bit hosts and large bitsets.
18262
18263 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
18264 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
18265 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
18266 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
18267 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
18268 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
18269 bitset_count_): Likewise.
18270 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
18271 bitset_first, bitset_last): Likewise.
18272 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
18273 bitset_stats_list_reverse, bitset_stats_size,
18274 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
18275 Likewise.
18276 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18277 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
18278 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
18279 bitsetv_reflexive_transitive_closure): Likewise.
18280 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
18281 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
18282 Likewise.
18283 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
18284 Likewise.
420f93c8 18285
ff68026d
PE
18286 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
18287 Use size_t, not unsigned int, to count bytes.
18288 * lib/abitset.h (abitset_bytes): Likewise.
18289 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
18290 Likewise.
18291 * lib/bitset.h (bitset_bytes): Likewise.
18292 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
18293 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
18294 * lib/bitsetv.c (bitsetv_alloc): Likewise.
18295 * lib/ebitset.c (ebitset_bytes): Likewise.
18296 * lib/ebitset.h (ebitset_bytes): Likewise.
18297 * lib/lbitset.c (lbitset_bytes): Likewise.
18298 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 18299
ff68026d
PE
18300 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
18301 abitset_subset_p, abitset_disjoint_p, abitset_and,
18302 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
18303 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
18304 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
18305 abitset_or_and, abitset_or_and_cmp):
18306 Use bitset_windex instead of unsigned int.
18307 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18308 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
18309 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
18310 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
18311 Likewise.
18312 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 18313
ff68026d
PE
18314 * lib/bitset.c (bitset_print):
18315 Use proper printf formats for widths of integer types.
18316 * lib/bitset_stats.c (bitset_percent_histogram_print,
18317 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
18318 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18319 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18320 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 18321
ff68026d
PE
18322 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
18323 BITSET_SIZE_MAX): New macros.
18324 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
18325 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
18326 to BITSET_WINDEX_MAX.
18327
18328 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
18329 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
18330 since we now return the bitset_bindex type (not int).
18331
18332 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
18333 when computing sizes.
18334 * lib/ebitset.c (ebitset_elts_grow): Likewise.
18335
18336 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
18337 and avoid cast to unsigned.
18338
6aa452a6
AD
183392002-09-30 Akim Demaille <akim@epita.fr>
18340
18341 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
18342 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
18343 Updates from Michael Hayes.
18344
927f7817
AD
183452002-09-30 Art Haas <ahaas@neosoft.com>
18346
18347 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
18348 invocations.
18349 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
18350 defined.
18351
9738f41e
AD
183522002-09-27 Akim Demaille <akim@epita.fr>
18353
18354 Version 1.49c.
18355
a5c75d7f
AD
183562002-09-27 Akim Demaille <akim@epita.fr>
18357
18358 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
18359 (Because of AC_LIBSOURCE).
18360
8280e179
AD
183612002-09-27 Akim Demaille <akim@epita.fr>
18362
18363 Playing with Autoscan.
18364
18365 * configure.ac: Remove the old LIBOBJ tweaks.
18366 (AC_REPLACE_FUNCS): Add strrchr and strtol.
18367 * lib/strrchr.c: New.
18368 * lib/strtol.c: New, from the Coreutils 4.5.1.
18369
ae64af35
AD
183702002-09-27 Akim Demaille <akim@epita.fr>
18371
18372 Playing with Autoscan.
18373
18374 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
18375 * lib/Makefile.am (libbison_a_SOURCES): No longer include
18376 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
18377 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
18378 Coreutils 4.5.1.
18379
d1a1114f
AD
183802002-09-24 Akim Demaille <akim@epita.fr>
18381
18382 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
18383 (Frequently Asked Questions, Parser Stack Overflow): New.
18384
b906441c
AD
183852002-09-13 Akim Demaille <akim@epita.fr>
18386
18387 Playing with autoscan.
18388
18389 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
18390 * src/files.c (skeleton_find): Remove, unused.
18391 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
18392 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
18393
bd701811
AD
183942002-09-13 Akim Demaille <akim@epita.fr>
18395
18396 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
18397 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
18398
e0a13e7b
AD
183992002-09-13 Akim Demaille <akim@epita.fr>
18400
18401 * configure.ac: Require 2.54.
18402 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
18403 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
18404 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
18405 Remove, provided by Autoconf macros.
18406
c97011bf
AD
184072002-09-12 Akim Demaille <akim@epita.fr>
18408
18409 * m4/prereq.m4: Update, from Coreutils 4.5.1.
18410
d862b1be
AD
184112002-09-12 Akim Demaille <akim@epita.fr>
18412
18413 * m4/prereq.m4: Update, from Fileutils 4.1.5.
18414 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
18415 Reported by Martin Mokrejs.
18416
3d38c03a
AD
184172002-09-10 Akim Demaille <akim@epita.fr>
18418
18419 * src/parse-gram.y: Associate a human readable string to each
18420 token type.
18421 * tests/regression.at (Invalid inputs): Adjust.
18422
b6347355
AD
184232002-09-10 Gary V. Vaughan <gary@gnu.org>
18424
18425 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
18426 with an Autoconf-2.5x style configure.ac.
18427
09ba4ab2
PE
184282002-09-06 Paul Eggert <eggert@twinsun.com>
18429
18430 * doc/bison.texinfo (Conditions): Make explicit that the GPL
18431 exception applies only to yacc.c. This is a modification of a
18432 patch originally suggested by Akim Demaille.
18433
21846f69
AD
184342002-09-06 Akim Demaille <akim@epita.fr>
18435
09ba4ab2
PE
18436 * data/c.m4 (b4_copyright): Move the GPL exception comment from
18437 here to...
18438 * data/yacc.c: here.
18439
21846f69
AD
18440 * data/lalr1.cc (struct yyltype): Don't define it, since we use
18441 LocationType.
18442 (b4_ltype): Default to yy::Location from location.hh.
18443
c0ad8bf3
AD
184442002-09-04 Jim Meyering <jim@meyering.net>
18445
18446 * data/yacc.c: Guard the declaration of yytoknum also with
18447 `#ifdef YYPRINT', so it is declared only when used.
18448
3a93251e
AD
184492002-09-04 Akim Demaille <akim@epita.fr>
18450
18451 * configure.in: Rename as...
18452 * configure.ac: this.
18453 Bump to 1.49c.
18454
427c0dda
AD
184552002-09-04 Akim Demaille <akim@epita.fr>
18456
18457 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
18458 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
18459 translate maintainer only messages.
18460
6a254321
PE
184612002-08-12 Paul Eggert <eggert@twinsun.com>
18462
645e30d1
PE
18463 Version 1.49b.
18464
6a254321
PE
18465 * Makefile.am (SUBDIRS): Remove intl.
18466 (DISTCLEANFILES): Remove.
18467 * NEWS: Mention that GNU M4 is now required. Clarify what is
18468 meant by "larger grammars". Mention the pt_BR translation.
18469 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
18470 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
18471 Bump version from 0.11.2 to 0.11.5.
18472 (BISON_PREREQ_STAGE): Remove.
18473 (AM_GNU_GETTEXT): Use external gettext.
18474 (AC_OUTPUT): Remove intl/Makefile.
18475
18476 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
18477
18478 * data/glr.c: Include string.h, for strlen.
18479 (yyreportParseError): Use size_t for yysize.
18480 (yy_yypstack): No longer nested inside yypstates, as nested
18481 functions are not portable. Do not assume size_t is the
18482 same width as int.
18483 (yypstates): Do not assume that ptrdiff_t is the same width
18484 as int, and similarly for yyposn and YYINDEX.
18485
18486 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
18487
18488 * lib/Makefile.am (INCLUDES): Do not include from the intl
18489 directory, which has been removed.
18490 * src/Makefile.am (INCLUDES): Likewise.
18491
18492 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
18493 (bitsets_sources, additional_bitsets_sources, timevars_sources):
18494 New vars.
18495
18496 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
18497 * tests/Makefile.am (EXTRA_DIST): Likewise.
18498
18499 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
18500 Do not assume that bitset_windex is the same width as unsigned.
18501
18502 * lib/abitset.c (abitset_unused_clear): Do not assume that
18503 bitset_word is the same width as int.
18504 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
18505 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
18506 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
18507 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
18508 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
18509
18510 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
18511 portability to one's complement hosts!).
18512 * lib/ebitset.c (ebitset_op1): Likewise.
18513 * lib/lbitset.c (lbitset_op1): Likewise.
18514
18515 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
18516 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
18517 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
18518 Sync with fileutils.
18519 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
18520 lib/gettext.h: Sync with diffutils.
18521
18522 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
18523 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
18524
18525 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
18526 PROTOTYPES to check for prototypes, and "defined __STDC__" to
18527 check for void *.
18528
18529 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
18530 size_t; the old version tried to do this but casted improperly.
18531 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
18532 (bitset_test): Now returns int, not unsigned long.
18533
18534 * lib/bitset_stats.c: Include "gettext.h".
18535 (_): New macro.
18536 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
18537 name locals "index", as it generates unnecessary warnings on some
18538 hosts that have an "index" function.
18539
18540 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
18541 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
18542 they need translation.
18543 * src/LR0.c (state_list_append, new_itemsets, get_state,
18544 append_states, generate_states): Likewise.
18545 * src/assoc.c (assoc_to_string): Likewise.
18546 * src/closure.c (print_closure, set_firsts, closure): Likewise.
18547 * src/gram.c (grammar_dump): Likewise.
18548 * src/injections.c (injections_compute): Likewise.
18549 * src/lalr.c (lookaheads_print): Likewise.
18550 * src/relation.c (relation_transpose): Likewise.
18551 * src/scan-gram.l: Likewise.
18552 * src/tables.c (table_grow, pack_vector): Likewise.
18553
18554 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
18555 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
18556 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
18557 * m4/mbstate_t.m4: Sync with fileutils.
18558 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
18559
18560 * po/LINGUAS: Add pt_BR.
18561 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
18562 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
18563 lib/timevar.c.
18564 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
18565 manual recommends.
18566 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
18567
18568 * src/complain.c (strerror_r): Remove decl; not needed.
18569 (strerror): Use same pattern as ../lib/error.c.
18570
18571 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
18572
18573 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
18574
18575 * src/main.c (main): Cast result of bindtextdomain and textdomain
18576 to void, to avoid a GCC warning when --disable-nls is in effect.
18577
18578 * src/scan-gram.l: Use strings rather than escapes when possible,
18579 to minimize the number of warnings from xgettext.
18580 (handle_action_dollar, handle_action_at): Don't use isdigit,
18581 as it mishandles negative chars and it may not work as expected
18582 outside the C locale.
18583
18584 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
18585 this is a GCC extension and is not portable to other compilers.
18586
18587 * src/system.h (alloca): Use same pattern as ../lib/error.c.
18588 Do not include <ctype.h>; no longer needed.
18589 Do not include <malloc.h>; no longer needed (and generates
18590 warnings on OpenBSD 3.0).
18591
18592 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
18593 it's not portable.
18594
18595 * tests/regression.at: Do not use 'cc -c input.c -o input';
18596 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
18597
18598 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
18599 exit status as failure, not just exit status 1. Sun C exits
18600 with status 2 sometimes.
18601
18602 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
18603 Use it for the two large tests.
18604
c8f002c7
AD
186052002-08-02 Akim Demaille <akim@epita.fr>
18606
18607 * src/conflicts.c (conflicts_output): Don't output rules never
18608 reduced here, since anyway that computation doesn't work.
18609 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18610 (rule_useless_p, rule_never_reduced_p): New.
18611 (grammar_rules_partial_print): Use a filter instead of a range.
18612 Display the title only if needed.
18613 (grammar_rules_print): Adjust.
18614 (grammar_rules_never_reduced_report): New.
18615 * src/tables.c (action_row): Move the computation of rules never
18616 reduced to...
18617 (token_actions): here.
18618 * src/main.c (main): Make the parser before making the report, so
18619 that rules never reduced are computed.
18620 Call grammar_rules_never_reduced_report.
18621 * src/print.c (print_results): Report rules never reduced.
18622 * tests/conflicts.at, tests/reduce.at: Adjust.
18623
cd08e51e
AD
186242002-08-01 Akim Demaille <akim@epita.fr>
18625
18626 Instead of attaching lookaheads and duplicating the rules being
18627 reduced by a state, attach the lookaheads to the reductions.
18628
18629 * src/state.h (state_t): Remove the `lookaheads',
18630 `lookaheads_rule' member.
18631 (reductions_t): Add a `lookaheads' member.
18632 Use a regular array for the `rules'.
18633 * src/state.c (reductions_new): Initialize the lookaheads member
18634 to 0.
18635 (state_rule_lookaheads_print): Adjust.
18636 * src/state.h, src/state.c (state_reductions_find): New.
18637 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18638 (count_rr_conflicts): Adjust.
18639 * src/lalr.c (LArule): Remove.
18640 (add_lookback_edge): Adjust.
18641 (state_lookaheads_count): New.
18642 (states_lookaheads_initialize): Merge into...
18643 (initialize_LA): this.
18644 (lalr_free): Adjust.
18645 * src/main.c (main): Don't free nullable and derives too early: it
18646 is used by --verbose.
18647 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18648
bb0027a9
AD
186492002-08-01 Akim Demaille <akim@epita.fr>
18650
18651 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18652 `rule_number_t**'.
18653 (set_derives, free_derives): Rename as...
18654 (derives_compute, derives_free): this.
18655 Adjust all dependencies.
18656 * src/nullable.c (set_nullable, free_nullable): Rename as...
18657 (nullable_compute, nullable_free): these.
18658 (rule_list_t): Store rule_t *, not rule_number_t.
18659 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18660 pointers, instead of their numbers.
18661 * src/main.c (main): Call nullable_free, and derives_free earlier,
18662 as they were lo longer used.
18663
3325ddc4
AD
186642002-08-01 Akim Demaille <akim@epita.fr>
18665
18666 * lib/timevar.c (get_time): Include children time.
18667 * src/lalr.h (LA, LArule): Don't export them: used with the
18668 state_t.
18669 * src/lalr.c (LA, LArule): Static.
18670 * src/lalr.h, src/lalr.c (lalr_free): New.
18671 * src/main.c (main): Call it.
18672 * src/tables.c (pack_vector): Check whether loc is >= to the
18673 table_size, not >.
18674 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18675 (tables_generate): do it, since that's also it which allocates
18676 them.
18677 Don't free LA and LArule, main does.
18678
c6f1a33c
AD
186792002-07-31 Akim Demaille <akim@epita.fr>
18680
18681 Separate parser tables computation and output.
18682
18683 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18684 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18685 (yydefgoto, yydefact, high): Move to...
18686 * src/tables.h, src/tables.c: here.
18687 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18688 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18689 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18690 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18691 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18692 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18693 (action_row, save_row, token_actions, save_column, default_goto)
18694 (goto_actions, sort_actions, matching_state, pack_vector)
18695 (table_ninf_remap, pack_table, prepare_actions): Move to...
18696 * src/tables.c: here.
18697 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18698 * src/output.c (token_actions, output_base, output_conflicts)
18699 (output_check): Merge into...
18700 (prepare_actions): this.
18701 (actions_output): Rename as...
18702 (user_actions_output): this.
18703 * src/main.c (main): Call tables_generate and tables_free.
18704
1509d42f
AD
187052002-07-31 Akim Demaille <akim@epita.fr>
18706
18707 Steal GCC's --time-report support.
18708
18709 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18710 stolen/adjusted from GCC.
18711 * m4/stage.m4: Remove time related checks.
18712 * m4/timevar.m4: New.
18713 * configure.in: Adjust.
18714 * src/system.h: Adjust to using timevar.h.
18715 * src/getargs.h, src/getargs.c: Support trace_time for
18716 --trace=time.
18717 * src/main.c (stage): Remove.
18718 (main): Replace `stage' invocations with timevar calls.
18719 * src/output.c: Insert pertinent timevar calls.
18720
273a74fa
AD
187212002-07-31 Akim Demaille <akim@epita.fr>
18722
18723 Let --trace have arguments.
18724
18725 * src/getargs.h (enum trace_e): New.
18726 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18727 (long_options, short_options): --trace/-T takes an optional
18728 argument.
18729 Change all the uses of trace_flag to reflect the new flags.
18730 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18731
18732 Strengthen `stage' portability.
18733
18734 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18735 * configure.in: Use it.
18736 Don't check for malloc.h and sys/times.h.
18737 * src/system.h: Include them when appropriate.
18738 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18739 times and struct tms are available.
18740
217598da
AD
187412002-07-30 Akim Demaille <akim@epita.fr>
18742
18743 In verbose parse error message, don't report `error' as an
18744 expected token.
18745 * tests/actions.at (Printers and Destructors): Adjust.
18746 * tests/calc.at (Calculator $1): Adjust.
18747 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18748 error message, do not report the parser accepts the error token in
18749 that state.
18750
52489d44
AD
187512002-07-30 Akim Demaille <akim@epita.fr>
18752
18753 Normalize conflict related messages.
18754
18755 * src/complain.h, src/complain.c (warn, complain): New.
18756 * src/conflicts.c (conflicts_print): Use them.
18757 (conflict_report_yacc): New, extracted from...
18758 (conflicts_print): here.
18759 * tests/conflicts.at, tests/existing.at: Adjust.
18760
e8832397
AD
187612002-07-30 Akim Demaille <akim@epita.fr>
18762
18763 Report rules which are never reduced by the parser: those hidden
18764 by conflicts.
18765
18766 * src/LR0.c (save_reductions): Don't make the final state too
18767 different: save its reduction (accept) instead of having a state
18768 without any action (no shift or goto, no reduce).
18769 Note: the final state is now a ``regular'' state, i.e., the
18770 parsers now contain `reduce 0' as default reduction.
18771 Nevertheless, since they decide to `accept' when yystate =
18772 final_state, they still will not reduce rule 0.
18773 * src/print.c (print_actions, print_reduction): Adjust.
18774 * src/output.c (action_row): Track reduced rules.
18775 (token_actions): Report rules never reduced.
18776 * tests/conflicts.at, tests/regression.at: Adjust.
18777
caf23d24
AD
187782002-07-30 Akim Demaille <akim@epita.fr>
18779
18780 `stage' was accidently included in a previous patch.
18781 Initiate its autoconfiscation.
18782
18783 * configure.in: Look for malloc.h and sys/times.h.
18784 * src/main.c (stage): Adjust.
18785 Report only when trace_flag.
18786
640748ee
AD
187872002-07-29 Akim Demaille <akim@epita.fr>
18788
18789 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18790 state_number_t.
18791 (errs_t): symbol_t*, not symbol_number_t.
18792 (reductions_t): rule_t*, not rule_number_t.
18793 (FOR_EACH_SHIFT): New.
18794 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18795 * src/print.c, src/print_graph.c: Adjust.
18796
88bce5a2
AD
187972002-07-29 Akim Demaille <akim@epita.fr>
18798
18799 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18800
18801 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18802 (endtoken, accept): these.
18803 * src/reader.c (reader): Set endtoken's default tag to "$end".
18804 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18805 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18806 Adjust.
18807
1bfb97db
AD
188082002-07-29 Akim Demaille <akim@epita.fr>
18809
18810 * src/reduce.c (reduce_grammar): When the language is empty,
18811 complain about the start symbol, not the axiom.
18812 Use its location.
18813 * tests/reduce.at (Empty Language): New.
18814
fc5734fe
AD
188152002-07-26 Akim Demaille <akim@epita.fr>
18816
18817 * src/reader.h, src/reader.c (gram_error): ... can't get
18818 yycontrol without making too strong assumptions on the parser
18819 itself.
18820 * src/output.c (prepare_tokens): Use the real 0th value of
18821 token_translations instead of `0'.
18822 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18823 visible here.
18824 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18825 for the time being: %locations ought to provide it to yyerror.
18826
3650b4b8
AD
188272002-07-25 Akim Demaille <akim@epita.fr>
18828
18829 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18830 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18831 * tests/regression.at (Web2c Actions): Adjust.
18832
4b3d3a8e
AD
188332002-07-25 Akim Demaille <akim@epita.fr>
18834
18835 Stop storing rules from 1 to nrules + 1.
18836
18837 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18838 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18839 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18840 Iterate from 0 to nrules.
18841 Use rule_number_as_item_number and item_number_as_rule_number.
18842 Adjust to `derive' now containing possibly 0.
18843 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18844 Handle the `- 1' part in rule numbers from/to item numbers.
18845 * src/conflicts.c (log_resolution): Fix the message which reversed
18846 shift and reduce.
18847 * src/output.c (action_row): Initialize default_rule to -1.
18848 (token_actions): Adjust.
18849 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18850 expected output.
18851 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18852
4a2a22f4
AD
188532002-07-25 Akim Demaille <akim@epita.fr>
18854
18855 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18856 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18857 (b4_c_knr_arg_decl): New.
18858 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18859 yyreport_parse_error.
18860
b8df3223
AD
188612002-07-25 Akim Demaille <akim@epita.fr>
18862
18863 * data/yacc.c (yyreport_parse_error): New, extracted from...
18864 (yyparse): here.
18865 (yydestruct, yysymprint): Move above yyparse.
18866 Be K&R compliant.
18867
a762e609
AD
188682002-07-25 Akim Demaille <akim@epita.fr>
18869
18870 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18871 replace...
18872 (b4_sint_type, b4_uint_type): these.
18873 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18874 * tests/regression.at (Web2c Actions): Adjust.
18875
12b0043a
AD
188762002-07-25 Akim Demaille <akim@epita.fr>
18877
18878 * src/gram.h (TIEM_NUMBER_MAX): New.
18879 (item_number_of_rule_number, rule_number_of_item_number): Rename
18880 as...
18881 (rule_number_as_item_number, item_number_as_rule_number): these.
18882 Adjust dependencies.
18883 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18884 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18885 (symbol_number_to_vector_number): New.
18886 (order): Of vector_number_t* type.
18887 (base_t, BASE_MAX, BASE_MIN): New.
18888 (froms, tos, width, pos, check): Of base_t type.
18889 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18890 (actrow): Of action_number_t type.
18891 (conflrow): Of unsigned int type.
18892 (table_ninf, base_ninf): New.
18893 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18894 (muscle_insert_int_table, muscle_insert_base_table)
18895 (muscle_insert_rule_number_table): New.
18896 (prepare_tokens): Output `toknum' as int_table.
18897 (action_row): Returns a rule_number_t.
18898 Use ACTION_MIN, not SHRT_MIN.
18899 (token_actions): yydefact is rule_number_t*.
18900 (table_ninf_remap): New.
18901 (pack_table): Use it for `base' and `table'.
18902 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18903 replaced with...
18904 (YYPACT_NINF, YYTABLE_NINF): these.
18905 (yypact, yytable): Compute their types instead of hard-coded
18906 `short'.
18907 * tests/regression.at (Web2c Actions): Adjust.
18908
5dde258a
AD
189092002-07-19 Akim Demaille <akim@epita.fr>
18910
18911 * src/scan-gram.l (id): Can start with an underscore.
18912
a945ec39
AD
189132002-07-16 Akim Demaille <akim@epita.fr>
18914
18915 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18916 Adjust all former `associativity' dependencies.
18917 * src/symtab.c (symbol_new): Default associativity is `undef', not
18918 `right'.
18919 (symbol_check_alias_consistence): Adjust.
18920
fae437e8
AD
189212002-07-09 Akim Demaille <akim@epita.fr>
18922
18923 * doc/bison.texinfo: Properly set the ``header'' part.
18924 Use @dircategory ``GNU programming tools'' as per Texinfo's
18925 documentation.
18926 Use @copying.
18927
1a715ef2
AD
189282002-07-09 Akim Demaille <akim@epita.fr>
18929
18930 * lib/quotearg.h: Protect against multiple inclusions.
18931 * src/location.h (location_t): Add a `file' member.
18932 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18933 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18934 `error_one_per_line' support.
18935
a5d50994
AD
189362002-07-09 Akim Demaille <akim@epita.fr>
18937
18938 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18939 * src/reader.c (lineno): Remove.
18940 Adjust all dependencies.
18941 (get_merge_function): Take a location and use complain_at.
18942 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18943 * tests/regression.at (Invalid inputs, Mixing %token styles):
18944 Adjust.
18945
b275314e
AD
189462002-07-09 Akim Demaille <akim@epita.fr>
18947
18948 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18949 recovery rule, and forbid extensions when --yacc.
18950 (gram_error): Use complain_at.
18951 * src/reader.c (reader): Exit if there were parse errors.
18952
865b9df1
AD
189532002-07-09 Akim Demaille <akim@epita.fr>
18954
18955 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18956 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18957 Reported by R Blake <blakers@mac.com>.
18958
c76e14da
AD
189592002-07-09 Akim Demaille <akim@epita.fr>
18960
18961 * data/yacc.c: Output the copyright notive in the header.
18962
7db2ed2d
AD
189632002-07-03 Akim Demaille <akim@epita.fr>
18964
18965 * src/output.c (froms, tos): Are state_number_t.
18966 (save_column): sp, sp1, and sp2 are state_number_t.
18967 (prepare): Rename `final' as `final_state_number', `nnts' as
18968 `nterms_number', `nrules' as `rules_number', `nstates' as
18969 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18970 unused.
18971 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18972 * data/lalr1.cc (nsym_): Remove, unused.
18973
e68e0410
AD
189742002-07-03 Akim Demaille <akim@epita.fr>
18975
18976 * src/lalr.h, src/lalr.c (goto_number_t): New.
18977 * src/lalr.c (goto_list_t): New.
18978 Propagate them.
18979 * src/nullable.c (rule_list_t): New.
18980 Propagate.
18981 * src/types.h: Remove.
18982
e1a4f3a4
AD
189832002-07-03 Akim Demaille <akim@epita.fr>
18984
18985 * src/closure.c (print_fderives): Use rule_rhs_print.
18986 * src/derives.c (print_derives): Use rule_rhs_print.
18987 (rule_list_t): New, replaces `shorts'.
18988 (set_derives): Add comments.
18989 * tests/sets.at (Nullable, Firsts): Adjust.
18990
536545f3
AD
189912002-07-03 Akim Demaille <akim@epita.fr>
18992
18993 * src/output.c (prepare_actions): Free `tally' and `width'.
18994 (prepare_actions): Allocate and free `order'.
18995 * src/symtab.c (symbols_free): Free `symbols'.
18996 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18997 * src/output.c (m4_invoke): Move to...
18998 * src/scan-skel.l: here.
18999 (<<EOF>>): Close yyout, and free its name.
19000
8b752b00
AD
190012002-07-03 Akim Demaille <akim@epita.fr>
19002
19003 Fix some memory leaks, and fix a bug: state 0 was examined twice.
19004
19005 * src/LR0.c (new_state): Merge into...
19006 (state_list_append): this.
19007 (new_states): Merge into...
19008 (generate_states): here.
19009 (set_states): Don't ensure a proper `errs' state member here, do it...
19010 * src/conflicts.c (conflicts_solve): here.
19011 * src/state.h, src/state.c: Comment changes.
19012 (state_t): Rename member `shifts' as `transitions'.
19013 Adjust all dependencies.
19014 (errs_new): For consistency, also take the values as argument.
19015 (errs_dup): Remove.
19016 (state_errs_set): New.
19017 (state_reductions_set, state_transitions_set): Assert that no
19018 previous value was assigned.
19019 (state_free): New.
19020 (states_free): Use it.
19021 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
19022 temporary storage: use `errs' and `nerrs' as elsewhere.
19023 (set_conflicts): Allocate and free this `errs'.
19024
613f5e1a
AD
190252002-07-02 Akim Demaille <akim@epita.fr>
19026
19027 * lib/libiberty.h: New.
19028 * lib: Update the bitset implementation from upstream.
19029 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
19030 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
19031 * src/main.c: Adjust bitset stats calls.
19032
26e0cadc
PE
190332002-07-01 Paul Eggert <eggert@twinsun.com>
19034
19035 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
19036 char, so that negative chars don't collide with $.
19037
1154cced
AD
190382002-06-30 Akim Demaille <akim@epita.fr>
19039
19040 Have the GLR tests be `warning' checked, and fix the warnings.
19041
19042 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
19043 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
19044 (yyremoveDeletes): `yyi' and `yyj' are size_t.
19045 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
19046 (yyaddDeferredAction): static.
19047 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
19048 (yyreportParseError): yyprefix is const.
19049 yytokenp is used only when verbose.
19050 (yy__GNUC__): Replace with __GNUC__.
19051 (yypdumpstack): yyi is size_t.
19052 (yypreference): Un-yy local variables and arguments, to avoid
19053 clashes with `yyr1'. Anyway, we are not in the user name space.
19054 (yytname_size): be an int, as is compared with ints.
19055 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
19056 Use them.
19057 * tests/cxx-gram.at: Use quotation to protect $1.
19058 Use AT_COMPILE to enable warnings hunts.
19059 Prototype yylex and yyerror.
19060 `Use' argc.
19061 Include `string.h', not `strings.h'.
19062 Produce and prototype stmtMerge only when used.
19063 yylex takes a location.
19064
97650f4e
AD
190652002-06-30 Akim Demaille <akim@epita.fr>
19066
19067 We spend a lot of time in quotearg, in particular when --verbose.
19068
19069 * src/symtab.c (symbol_get): Store a quoted version of the key.
19070 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
19071 Adjust all callers.
19072
d2576365
AD
190732002-06-30 Akim Demaille <akim@epita.fr>
19074
19075 * src/state.h (reductions_t): Rename member `nreds' as num.
19076 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
19077 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
19078
ccaf65bc
AD
190792002-06-30 Akim Demaille <akim@epita.fr>
19080
19081 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
19082 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
19083 (shifts_to): Rename as...
19084 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
19085 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
19086 (TRANSITION_IS_DISABLED, transitions_to): these.
19087
87675353
AD
190882002-06-30 Akim Demaille <akim@epita.fr>
19089
19090 * src/print.c (print_shifts, print_gotos): Merge into...
19091 (print_transitions): this.
19092 (print_transitions, print_errs, print_reductions): Align the
19093 lookaheads columns.
19094 (print_core, print_transitions, print_errs, print_state,
19095 print_grammar): Output empty lines separator before, not after.
19096 (state_default_rule_compute): Rename as...
19097 (state_default_rule): this.
19098 * tests/conflicts.at (Defaulted Conflicted Reduction),
19099 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
19100 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
19101
ce4ccb4b
AD
191022002-06-30 Akim Demaille <akim@epita.fr>
19103
19104 Display items as we display rules.
19105
19106 * src/gram.h, src/gram.c (rule_lhs_print): New.
19107 * src/gram.c (grammar_rules_partial_print): Use it.
19108 * src/print.c (print_core): Likewise.
19109 * tests/conflicts.at (Defaulted Conflicted Reduction),
19110 (Unresolved SR Conflicts): Adjust.
19111 (Unresolved SR Conflicts): Adjust and rename as...
19112 (Resolved SR Conflicts): this, as was meant.
19113 * tests/regression.at (Web2c Report): Adjust.
19114
bc933ef1
AD
191152002-06-30 Akim Demaille <akim@epita.fr>
19116
19117 * src/print.c (state_default_rule_compute): New, extracted from...
19118 (print_reductions): here.
19119 Pessimize, but clarify the code.
19120 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
19121
53d4308d
AD
191222002-06-30 Akim Demaille <akim@epita.fr>
19123
19124 * src/output.c (action_row): Let default_rule be always a rule
19125 number.
19126
574fb2d5
AD
191272002-06-30 Akim Demaille <akim@epita.fr>
19128
19129 * src/closure.c (print_firsts, print_fderives, closure):
19130 Use BITSET_EXECUTE.
19131 * src/lalr.c (lookaheads_print): Likewise.
19132 * src/state.c (state_rule_lookaheads_print): Likewise.
19133 * src/print_graph.c (print_core): Likewise.
19134 * src/print.c (print_reductions): Likewise.
19135 * src/output.c (action_row): Likewise.
19136 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
19137
05811fd7
AD
191382002-06-30 Akim Demaille <akim@epita.fr>
19139
19140 * src/print_graph.c: Use report_flag.
19141
0e4d5753
AD
191422002-06-30 Akim Demaille <akim@epita.fr>
19143
19144 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
19145 to...
19146 * src/relation.h, src/relation.c (traverse, relation_digraph)
19147 (relation_print, relation_transpose): New.
19148
24c7d800
AD
191492002-06-30 Akim Demaille <akim@epita.fr>
19150
19151 * src/state.h, src/state.c (shifts_to): New.
19152 * src/lalr.c (build_relations): Use it.
19153
9222837b
AD
191542002-06-30 Akim Demaille <akim@epita.fr>
19155
19156 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
19157 (item_number_of_rule_number, rule_number_of_item_number): New.
19158 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
19159 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19160 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
19161 Propagate their use.
19162 Much remains to be done, in particular wrt `shorts' from types.h.
19163
260008e5
AD
191642002-06-30 Akim Demaille <akim@epita.fr>
19165
19166 * src/symtab.c (symbol_new): Initialize the `printer' member.
19167
8a731ca8
AD
191682002-06-30 Akim Demaille <akim@epita.fr>
19169
19170 * src/LR0.c (save_reductions): Remove, replaced by...
19171 * src/state.h, src/state.c (state_reductions_set): New.
19172 (reductions, errs): Rename as...
19173 (reductions_t, errs_t): these.
19174 Adjust all dependencies.
19175
32e1e0a4
AD
191762002-06-30 Akim Demaille <akim@epita.fr>
19177
19178 * src/LR0.c (state_list_t, state_list_append): New.
19179 (first_state, last_state): Now symbol_list_t.
19180 (this_state): Remove.
19181 (new_itemsets, append_states, save_reductions): Take a state_t as
19182 argument.
19183 (set_states, generate_states): Adjust.
19184 (save_shifts): Remove, replaced by...
19185 * src/state.h, src/state.c (state_shifts_set): New.
19186 (shifts): Rename as...
19187 (shifts_t): this.
19188 Adjust all dependencies.
19189 * src/state.h (state_t): Remove the `next' member.
19190
e5fb6710
AD
191912002-06-30 Akim Demaille <akim@epita.fr>
19192
19193 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
19194 escaped in slot 0.
19195
c7ca99d4
AD
191962002-06-30 Akim Demaille <akim@epita.fr>
19197
19198 Use hash.h for the state hash table.
19199
19200 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
19201 (allocate_storage): Use state_hash_new.
19202 (free_storage): Use state_hash_free.
19203 (new_state, get_state): Adjust.
19204 * src/lalr.h, src/lalr.c (states): Move to...
19205 * src/states.h (state_t): Remove the `link' member, no longer
19206 used.
19207 * src/states.h, src/states.c: here.
19208 (state_hash_new, state_hash_free, state_hash_lookup)
19209 (state_hash_insert, states_free): New.
19210 * src/states.c (state_table, state_compare, state_hash): New.
19211 * src/output.c (output_actions): Do not free states now, since we
19212 still need to know the final_state number in `prepare', called
19213 afterwards. Do it...
19214 * src/main.c (main): here: call states_free after `output'.
19215
df0e7316
AD
192162002-06-30 Akim Demaille <akim@epita.fr>
19217
19218 * src/state.h, src/state.c (state_new): New, extracted from...
19219 * src/LR0.c (new_state): here.
19220 * src/state.h (STATE_ALLOC): Move to...
19221 * src/state.c: here.
19222 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
19223 * src/state.h, src/state.c: here.
19224
39f41916
AD
192252002-06-30 Akim Demaille <akim@epita.fr>
19226
19227 * src/reader.c (gensym): Rename as...
19228 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
19229 (getsym): Rename as...
19230 (symbol_get): this.
19231
d57650a5
AD
192322002-06-30 Akim Demaille <akim@epita.fr>
19233
19234 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
19235 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
19236 * src/output.c, src/print.c, src/print_graph.c: Propagate.
19237 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
19238
5a08f1ce
AD
192392002-06-30 Akim Demaille <akim@epita.fr>
19240
19241 Make the test suite pass with warnings checked.
19242
19243 * tests/actions.at (Printers and Destructors): Improve.
19244 Avoid unsigned vs. signed issues.
19245 * tests/calc.at: Don't exercise the scanner here, do it...
19246 * tests/input.at (Torturing the Scanner): here.
19247
720623af
PH
192482002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19249
88e7e941 19250 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
19251 reorganize first lines parallel to yacc.c.
19252
fb8135fa
AD
192532002-06-28 Akim Demaille <akim@epita.fr>
19254
19255 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
19256 (b4_token_enum, b4_token_defines): New, factored from...
19257 * data/lalr1.cc, data/yacc.c, glr.c: here.
19258
41442480
AD
192592002-06-28 Akim Demaille <akim@epita.fr>
19260
19261 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
19262 unused variables.
19263 * src/output.c (merger_output): static.
19264
e0e5bf84
AD
192652002-06-28 Akim Demaille <akim@epita.fr>
19266
ba0fe3c7 19267 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
19268 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
19269 pacify GCC.
19270 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 19271
676385e2
PH
192722002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19273
19274 Accumulated changelog for new GLR parsing features.
19275
6a254321 19276 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
19277 conflicts_total_count.
19278 * src/conflicts.h: Ditto.
19279 * src/output.c (token_actions): Use the new name.
19280 (output_conflicts): Change conflp => conflict_list_heads, and
19281 confl => conflict_list for better readability.
19282 * data/glr.c: Use the new names.
19283 * NEWS: Add self to GLR announcement.
e0e5bf84 19284
676385e2
PH
19285 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
19286
19287 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
19288 Akim Demaille.
19289
19290 * data/bison.glr: Change name to glr.c
19291 * data/glr.c: Renamed from bison.glr.
19292 * data/Makefile.am: Add glr.c
e0e5bf84
AD
19293
19294 * src/getargs.c:
19295
676385e2 19296 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 19297 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 19298
676385e2
PH
19299 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19300
19301 * data/bison.glr: Be sure to restore the
19302 current #line when returning to the skeleton contents after having
19303 exposed the input file's #line.
19304
19305 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19306
19307 * data/bison.glr: Bring up to date with changes to bison.simple.
19308
19309 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19310
19311 * data/bison.glr: Correct definitions that use b4_prefix.
19312 Various reformatting.
19313 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
19314 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
19315 yytokenp argument; now part of stack.
19316 (yychar): Define to behave as documented.
19317 (yyclearin): Ditto.
e0e5bf84 19318
676385e2
PH
19319 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19320
19321 * src/reader.h: Add declaration for free_merger_functions.
19322
19323 * src/reader.c (merge_functions): New variable.
19324 (get_merge_function): New function.
19325 (free_merger_functions): New function.
19326 (readgram): Check for %prec that is not followed by a symbol.
19327 Handle %dprec and %merge declarations.
19328 (packgram): Initialize dprec and merger fields in rules array.
19329
19330 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
19331 conflict_list_cnt, conflict_list_free): New variables.
19332 (table_grow): Also grow conflict_table.
e0e5bf84 19333 (prepare_rules): Output dprec and merger tables.
676385e2 19334 (conflict_row): New function.
e0e5bf84 19335 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
19336 default reduction in conflicted states for GLR parser so that there
19337 are spaces for the conflict lists.
19338 (save_row): Also save conflict information.
19339 (token_actions): Allocate conflict list.
19340 (merger_output): New function.
19341 (pack_vector): Pack conflict table, too.
19342 (output_conflicts): New function to output yyconflp and yyconfl.
19343 (output_check): Allocate conflict_tos.
19344 (output_actions): Output conflict tables, also.
19345 (output_skeleton): Output b4_mergers definition.
19346 (prepare): Output b4_max_rhs_length definition.
19347 Use 'bison.glr' as default skeleton for GLR parsers.
19348
19349 * src/gram.c (glr_parser): New flag.
19350 (grammar_free): Call free_merger_functions.
19351
19352 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
19353 all pairs of conflicting reductions, rather than just all tokens
19354 causing conflicts. Needed to size conflict tables.
e0e5bf84 19355 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
19356 interface.
19357 (conflicts_print): Ditto.
19358 (count_total_conflicts): New function.
19359
19360 * src/reader.h (merger_list): New type.
19361 (merge_functions): New variable.
19362
19363 * src/lex.h (tok_dprec, tok_merge): New token types.
19364
19365 * src/gram.h (rule_s): Add dprec and merger fields.
19366 (glr_parser): New flag.
19367
19368 * src/conflicts.h (count_total_conflicts): New function.
19369
19370 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
19371
19372 * doc/bison.texinfo (Generalized LR Parsing): New section.
19373 (GLR Parsers): New section.
19374 (Language and Grammar): Mention GLR parsing.
19375 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
19376 Correct typo ("tge" -> "the").
19377
19378 * data/bison.glr: New skeleton for GLR parsing.
19379
19380 * tests/cxx-gram.at: New tests for GLR parsing.
19381
19382 * tests/testsuite.at: Include cxx-gram.at.
19383
19384 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 19385
676385e2
PH
19386 * src/parse-gram.y:
19387
19388 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
19389
19390 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 19391
b5480d74 193922002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
19393
19394 * src/options.h, src/options.c: Remove.
19395 * src/getargs.c (short_options, long_options): New.
19396
60491a94
AD
193972002-06-27 Akim Demaille <akim@epita.fr>
19398
19399 * data/bison.simple, data/bison.c++: Rename as...
19400 * data/yacc.c, data/lalr1.cc: these.
19401 * doc/bison.texinfo (Environment Variables): Remove.
19402
9be0c25b
AD
194032002-06-25 Raja R Harinath <harinath@cs.umn.edu>
19404
19405 * src/getargs.c (report_argmatch): Initialize strtok().
19406
1ae72863
AD
194072002-06-20 Akim Demaille <akim@epita.fr>
19408
19409 * data/bison.simple (b4_symbol_actions): New, replaces...
19410 (b4_symbol_destructor, b4_symbol_printer): these.
19411 (yysymprint): Be sure to call YYPRINT only for tokens, and using
19412 user token numbers.
19413
87542d29
AD
194142002-06-20 Akim Demaille <akim@epita.fr>
19415
19416 * data/bison.simple (yydestructor): Rename as...
19417 (yydestruct): this.
19418
1a31ed21
AD
194192002-06-20 Akim Demaille <akim@epita.fr>
19420
19421 * src/symtab.h, src/symtab.c (symbol_type_set)
19422 (symbol_destructor_set, symbol_precedence_set): The location is
19423 the last argument.
19424 Adjust all callers.
19425
e776192e
AD
194262002-06-20 Akim Demaille <akim@epita.fr>
19427
19428 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
19429 internals.
19430 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
19431 Takes a location.
19432 * src/symtab.h, src/symtab.c (symbol_class_set)
19433 (symbol_user_token_number_set): Likewise.
19434 Adjust all callers.
19435 Promote complain_at.
19436 * tests/input.at (Type Clashes): Adjust.
19437
5c1180b3
AD
194382002-06-20 Akim Demaille <akim@epita.fr>
19439
19440 * data/bison.simple (YYLEX): Fix the declaration when
19441 %pure-parser.
19442
e3170060
AD
194432002-06-20 Akim Demaille <akim@epita.fr>
19444
19445 * data/bison.simple (yysymprint): Don't print the token number,
19446 just its name.
19447 * tests/actions.at (Destructors): Rename as...
19448 (Printers and Destructors): this.
19449 Also exercise %printer.
19450
253862fd
AD
194512002-06-20 Akim Demaille <akim@epita.fr>
19452
19453 * data/bison.simple (YYDSYMPRINT): New.
19454 Use it to remove many of the #if YYDEBUG/if (yydebug).
19455
366eea36
AD
194562002-06-20 Akim Demaille <akim@epita.fr>
19457
19458 * src/symtab.h, src/symtab.c (symbol_t): printer and
19459 printer_location are new members.
19460 (symbol_printer_set): New.
19461 * src/parse-gram.y (PERCENT_PRINTER): New token.
19462 Handle its associated rule.
19463 * src/scan-gram.l: Adjust.
19464 (handle_destructor_at, handle_destructor_dollar): Rename as...
19465 (handle_symbol_code_at, handle_symbol_code_dollar): these.
19466 * src/output.c (symbol_printers_output): New.
19467 (output_skeleton): Call it.
19468 * data/bison.simple (yysymprint): New. Cannot be named yyprint
19469 since there are already many grammar files with a user `yyprint'.
19470 Replace the calls to YYPRINT to calls to yysymprint.
19471 * tests/calc.at: Adjust.
19472 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
19473 taking advantage of parser very internal details (stack size!).
19474
4f25ebb0
AD
194752002-06-20 Akim Demaille <akim@epita.fr>
19476
19477 * src/scan-gram.l: Complete the scanner with the missing patterns
19478 to pacify Flex.
19479 Use `quote' and `symbol_tag_get' where appropriate.
19480
93b68a0e
AD
194812002-06-19 Akim Demaille <akim@epita.fr>
19482
19483 * tests/actions.at (Destructors): Augment to test locations.
19484 * data/bison.simple (yydestructor): Pass it the current location
19485 if locations are enabled.
19486 Prototype only when __STDC__ or C++.
19487 Change the argument names to move into the yy name space: there is
19488 user code here.
19489
58612f1d
AD
194902002-06-19 Akim Demaille <akim@epita.fr>
19491
74310291
AD
19492 * data/bison.simple (b4_pure_if): New.
19493 Use it instead of #ifdef YYPURE.
19494
194952002-06-19 Akim Demaille <akim@epita.fr>
19496
19497 * data/bison.simple (b4_location_if): New.
58612f1d
AD
19498 Use it instead of #ifdef YYLSP_NEEDED.
19499
f25bfb75
AD
195002002-06-19 Akim Demaille <akim@epita.fr>
19501
19502 Prepare @$ in %destructor, but currently don't bind it in the
19503 skeleton, as %location use is not cleaned up yet.
19504
19505 * src/scan-gram.l (handle_dollar, handle_destructor_at)
19506 (handle_action_at): New.
19507 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
19508 a braced_code_t and a location as additional arguments.
19509 (handle_destructor_dollar): Instead of requiring `b4_eval', just
19510 unquote one when outputting `b4_dollar_dollar'.
19511 Adjust callers.
19512 * data/bison.simple (b4_eval): Remove.
19513 (b4_symbol_destructor): Adjust.
19514 * tests/input.at (Invalid @n): Adjust.
19515
c732d2c6
AD
195162002-06-19 Zack Weinberg <zack@codesourcery.com>
19517
19518 * doc/bison.texinfo: Document ability to have multiple
19519 prologue sections.
19520
8c165d89
AD
195212002-06-18 Akim Demaille <akim@epita.fr>
19522
19523 * src/files.c (compute_base_names): When computing the output file
19524 names from the input file name, strip the directory part.
19525
ca98bf57
AD
195262002-06-18 Akim Demaille <akim@epita.fr>
19527
19528 * data/bison.simple.new: Comment changes.
19529 Reported by Andreas Schwab.
19530
0bfb02ff
AD
195312002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
19532
19533 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
19534 there are no `label `yyoverflowlab' defined but not used' warnings
19535 when yyoverflow is defined.
19536
24c0aad7
AD
195372002-06-18 Akim Demaille <akim@epita.fr>
19538
19539 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
19540 new member.
19541 (symbol_destructor_set): Adjust.
19542 * src/output.c (symbol_destructors_output): Output the destructor
19543 locations.
19544 Output the symbol name.
19545 * data/bison.simple (b4_symbol_destructor): Adjust.
19546
5719c109
AD
195472002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
19548 and Akim Demaille <akim@epita.fr>
19549
19550 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
19551 what's left on the stack when the error recovery hits EOF.
19552 * tests/actions.at (Destructors): Complete to exercise this case.
19553
9280d3ef
AD
195542002-06-17 Akim Demaille <akim@epita.fr>
19555
19556 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
19557 arguments is really empty, not only equal to `[]'.
19558 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
19559 member.
19560 (symbol_destructor_set): New.
19561 * src/output.c (symbol_destructors_output): New.
19562 * src/reader.h (brace_code_t, current_braced_code): New.
19563 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
19564 (handle_dollar): Rename as...
19565 (handle_action_dollar): this.
19566 (handle_destructor_dollar): New.
19567 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
19568 (grammar_declaration): Use it.
19569 * data/bison.simple (yystos): Is always defined.
19570 (yydestructor): New.
19571 * tests/actions.at (Destructors): New.
19572 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
19573
dafdc66f
AD
195742002-06-17 Akim Demaille <akim@epita.fr>
19575
19576 * src/symlist.h, src/symlist.c (symbol_list_length): New.
19577 * src/scan-gram.l (handle_dollar, handle_at): Compute the
19578 rule_length only when needed.
19579 * src/output.c (actions_output, token_definitions_output): Output
19580 the full M4 block.
19581 * src/symtab.c: Don't access directly to the symbol tag, use
19582 symbol_tag_get.
19583 * src/parse-gram.y: Use symbol_list_free.
19584
56c47203
AD
195852002-06-17 Akim Demaille <akim@epita.fr>
19586
19587 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
19588 (symbol_list_prepend, get_type_name): Move to...
19589 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
19590 (symbol_list_prepend, symbol_list_n_type_name_get): here.
19591 Adjust all callers.
19592 (symbol_list_free): New.
19593 * src/scan-gram.l (handle_dollar): Takes a location.
19594 * tests/input.at (Invalid $n): Adjust.
19595
1e0bab92
AD
195962002-06-17 Akim Demaille <akim@epita.fr>
19597
19598 * src/reader.h, src/reader.c (symbol_list_new): Export it.
19599 (symbol_list_prepend): New.
19600 * src/parse-gram.y (%union): `list' is a new member.
19601 (symbols.1): New, replaces...
19602 (terms_to_prec.1, nterms_to_type.1): these.
19603 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
19604 Take a location as additional argument.
19605 Adjust all callers.
19606
04e60654
AD
196072002-06-15 Akim Demaille <akim@epita.fr>
19608
19609 * src/parse-gram.y: Move %token in the declaration section so that
19610 we don't depend upon CVS Bison.
19611
10e5b8bd
AD
196122002-06-15 Akim Demaille <akim@epita.fr>
19613
19614 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19615 * src/print.c (print_core): Use it.
19616
9801d40c
AD
196172002-06-15 Akim Demaille <akim@epita.fr>
19618
19619 * src/conflicts.c (log_resolution): Accept the rule involved in
19620 the sr conflicts instead of the lookahead number that points to
19621 that rule.
19622 (flush_reduce): Accept the current lookahead vector as argument,
19623 instead of the index in LA.
19624 (resolve_sr_conflict): Accept the current number of lookahead
19625 bitset to consider for the STATE, instead of the index in LA.
19626 (set_conflicts): Adjust.
19627 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19628
c0263492
AD
196292002-06-15 Akim Demaille <akim@epita.fr>
19630
19631 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19632 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19633 Adjust all dependencies.
19634 * src/lalr.c (initialize_lookaheads): Split into...
19635 (states_lookaheads_count, states_lookaheads_initialize): these.
19636 (lalr): Adjust.
19637
9757c359
AD
196382002-06-15 Akim Demaille <akim@epita.fr>
19639
19640 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19641 out of...
19642 (grammar_rules_print): here.
19643 * src/reduce.c (reduce_output): Use it.
19644 * tests/reduce.at (Useless Rules, Reduced Automaton)
19645 (Underivable Rules): Adjust.
19646
6b98e4b5
AD
196472002-06-15 Akim Demaille <akim@epita.fr>
19648
19649 Copy BYacc's nice way to report the grammar.
19650
19651 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19652 New.
19653 Don't print the rules' location, it is confusing and useless.
19654 (rule_print): Use grammar_rhs_print.
19655 * src/print.c (print_grammar): Use grammar_rules_print.
19656
6b98e4b5
AD
196572002-06-15 Akim Demaille <akim@epita.fr>
19658
19659 Complete and rationalize `useless thing' warnings.
19660
19661 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19662 (symbol_tag_print): New.
19663 Use them everywhere in place of accessing directly the tag member.
19664 * src/gram.h, src/gram.c (rule_print): New.
19665 Use it where a rule used to be printed `by hand'.
19666 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19667 (reduce_grammar_tables): Report the useless rules.
19668 (reduce_print): Useless things are a warning, not an error.
19669 Report it as such.
19670 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19671 (Reduced Automaton, Underivable Rules): Adjust.
19672 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19673 * tests/conflicts.at (Unresolved SR Conflicts)
19674 (Solved SR Conflicts): Adjust.
19675
ee000ba4
AD
196762002-06-15 Akim Demaille <akim@epita.fr>
19677
19678 Let symbols have a location.
19679
19680 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19681 (getsym): Adjust.
19682 Adjust all callers.
19683 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19684 Use location_t, not int.
19685 * src/symtab.c (symbol_check_defined): Take advantage of the
19686 location.
19687 * tests/regression.at (Invalid inputs): Adjust.
19688
8efe435c
AD
196892002-06-15 Akim Demaille <akim@epita.fr>
19690
19691 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19692 (input): Don't try to initialize yylloc here, do it in the
19693 scanner.
19694 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19695 * src/gram.h (rule_t): Change line and action_line into location
19696 and action_location, of location_t type.
19697 Adjust all dependencies.
19698 * src/location.h, src/location.c (empty_location): New.
19699 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19700 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19701 (grammar_current_rule_symbol_append)
19702 (grammar_current_rule_action_append): Expect a location as argument.
19703 * src/reader.c (grammar_midrule_action): Adjust to attach an
19704 action's location as dummy symbol location.
19705 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19706 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19707 the line numbers.
19708
1921f1d7
AD
197092002-06-14 Akim Demaille <akim@epita.fr>
19710
19711 Grammar declarations may be found in the grammar section.
19712
19713 * src/parse-gram.y (rules_or_grammar_declaration): New.
19714 (declarations): Each declaration may end with a semicolon, not
19715 just...
19716 (grammar_declaration): `"%union"'.
19717 (grammar): Branch to rules_or_grammar_declaration.
19718
4515534c
AD
197192002-06-14 Akim Demaille <akim@epita.fr>
19720
19721 * src/main.c (main): Invoke scanner_free.
19722
f958596b
AD
197232002-06-14 Akim Demaille <akim@epita.fr>
19724
19725 * src/output.c (m4_invoke): Extracted from...
19726 (output_skeleton): here.
19727 Free tempfile.
19728
2c569025
AD
197292002-06-14 Akim Demaille <akim@epita.fr>
19730
19731 * src/parse-gram.y (directives, directive, gram)
19732 (grammar_directives, precedence_directives, precedence_directive):
19733 Rename as...
19734 (declarations, declaration, grammar, grammar_declaration)
19735 (precedence_declaration, precedence_declarator): these.
19736 (symbol_declaration): New.
19737
592e8d4d
AD
197382002-06-14 Akim Demaille <akim@epita.fr>
19739
19740 * src/files.c (action_obstack): Remove, unused.
19741 (output_obstack): Remove it, and all its dependencies, as it is no
19742 longer needed.
19743 * src/reader.c (epilogue_set): Build the epilogue in the
19744 muscle_obstack.
19745 * src/output.h, src/output.c (muscle_obstack): Move to...
19746 * src/muscle_tab.h, src/muscle_tab.h: here.
19747 (muscle_init): Initialize muscle_obstack.
19748 (muscle_free): New.
19749 * src/main.c (main): Call it.
19750
0c15323d
AD
197512002-06-14 Akim Demaille <akim@epita.fr>
19752
19753 * src/location.h: New, extracted from...
19754 * src/reader.h: here.
19755 * src/Makefile.am (noinst_HEADERS): Merge into
19756 (bison_SOURCES): this.
19757 Add location.h.
19758 * src/parse-gram.y: Use location_t instead of Bison's.
19759 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19760 Use location_t instead of ints.
19761
e96c9728
AD
197622002-06-14 Akim Demaille <akim@epita.fr>
19763
19764 * data/bison.simple, data/bison.c++: Be sure to restore the
19765 current #line when returning to the skeleton contents after having
19766 exposed the input file's #line.
19767
75d1fe16
AD
197682002-06-12 Akim Demaille <akim@epita.fr>
19769
19770 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19771 eager.
19772 * tests/actions.at (Exotic Dollars): New.
19773
6c35d22c
AD
197742002-06-12 Akim Demaille <akim@epita.fr>
19775
19776 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19777 ['"/] too eagerly.
19778 * tests/input.at (Torturing the Scanner): New.
19779
1d6412ad
AD
197802002-06-11 Akim Demaille <akim@epita.fr>
19781
19782 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19783 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19784 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19785 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19786 * src/reader.c (reader): Use it.
19787
4cdb01db
AD
197882002-06-11 Akim Demaille <akim@epita.fr>
19789
19790 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19791 Adjust all callers.
19792 (scanner_last_string_free): New.
19793
44995b2e
AD
197942002-06-11 Akim Demaille <akim@epita.fr>
19795
19796 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19797 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19798 (last_string, YY_OBS_FREE): New.
19799 Use them when returning an ID.
19800
e9955c83
AD
198012002-06-11 Akim Demaille <akim@epita.fr>
19802
19803 Have Bison grammars parsed by a Bison grammar.
19804
19805 * src/reader.c, src/reader.h (prologue_augment): New.
19806 * src/reader.c (copy_definition): Remove.
19807
19808 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19809 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19810 (grammar_current_rule_prec_set, grammar_current_rule_check)
19811 (grammar_current_rule_symbol_append)
19812 (grammar_current_rule_action_append): Export.
19813 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19814 (symbol_list_action_append): Remove.
19815 Hook the routines from reader.
19816 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19817 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19818
19819 * src/reader.c (read_declarations): Remove, unused.
19820
19821 * src/parse-gram.y: Handle the epilogue.
19822 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19823 (grammar_start_symbol_set): this.
19824 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19825 * src/reader.c (readgram): Remove, unused.
19826 (reader): Adjust to insert eoftoken and axiom where appropriate.
19827
19828 * src/reader.c (copy_dollar): Replace with...
19829 * src/scan-gram.h (handle_dollar): this.
19830 * src/parse-gram.y: Remove `%thong'.
19831
19832 * src/reader.c (copy_at): Replace with...
19833 * src/scan-gram.h (handle_at): this.
19834
19835 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19836 New.
19837
19838 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19839 time being.
19840
19841 * src/reader.h, src/reader.c (grammar_rule_end): New.
19842
19843 * src/parse.y (current_type, current_class): New.
19844 Implement `%nterm', `%token' support.
19845 Merge `%term' into `%token'.
19846 (string_as_id): New.
19847 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19848 type name.
19849
19850 * src/parse-gram.y: Be sure to handle properly the beginning of
19851 rules.
19852
19853 * src/parse-gram.y: Handle %type.
19854 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19855
19856 * src/parse-gram.y: More directives support.
19857 * src/options.c: No longer handle source directives.
19858
19859 * src/parse-gram.y: Fix %output.
19860
19861 * src/parse-gram.y: Handle %union.
19862 Use the prologue locations.
19863 * src/reader.c (parse_union_decl): Remove.
19864
19865 * src/reader.h, src/reader.c (epilogue_set): New.
19866 * src/parse-gram.y: Use it.
19867
19868 * data/bison.simple, data/bison.c++: b4_stype is now either not
19869 defined, then default to int, or to the contents of %union,
19870 without `union' itself.
19871 Adjust.
19872 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19873
19874 * src/output.c (actions_output): Don't output braces, as they are
19875 already handled by the scanner.
19876
19877 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19878 characters to themselves.
19879
19880 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19881 that the epilogue has a proper #line.
19882
19883 * src/parse-gram.y: Handle precedence/associativity.
19884
19885 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19886 a terminal.
19887 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19888 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19889 at all to define terminals that cannot be emitted.
19890
19891 * src/scan-gram.l: Escape M4 characters.
19892
19893 * src/scan-gram.l: Working properly with escapes in user
19894 strings/characters.
19895
19896 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19897 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19898 grammar.
19899 Use more modest sizes, as for the time being the parser does not
19900 release memory, and therefore the process swallows a huge amount
19901 of memory.
19902
19903 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19904 stricter %token grammar.
19905
19906 * src/symtab.h (associativity): Add `undef_assoc'.
19907 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19908 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19909
19910 * tests/regression.at (Invalid %directive): Remove, as it is now
19911 meaningless.
19912 (Invalid inputs): Adjust to the new error messages.
19913 (Token definitions): The new grammar doesn't allow too many
19914 eccentricities.
19915
19916 * src/lex.h, src/lex.c: Remove.
19917 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19918 (copy_character, copy_string2, copy_string, copy_identifier)
19919 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19920 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19921 (parse_action): Remove.
19922 * po/POTFILES.in: Adjust.
19923
2e047461
AD
199242002-06-11 Akim Demaille <akim@epita.fr>
19925
cd05d13c 19926 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
19927 rule's action member: return the action as a string.
19928 Don't require `rule_length' as an argument: compute it.
19929 (grammar_current_rule_symbol_append)
19930 (grammar_current_rule_action_append): New, eved out from
19931 (readgram): here.
19932 Remove `action_flag', `rulelength', unused now.
19933
9af3fbce
AD
199342002-06-11 Akim Demaille <akim@epita.fr>
19935
19936 * src/reader.c (grammar_current_rule_prec_set).
19937 (grammar_current_rule_check): New, eved out from...
19938 (readgram): here.
19939 Remove `xaction', `first_rhs': useless.
19940 * tests/input.at (Type clashes): New.
19941 * tests/existing.at (GNU Cim Grammar): Adjust.
19942
1485e106
AD
199432002-06-11 Akim Demaille <akim@epita.fr>
19944
19945 * src/reader.c (grammar_midrule_action): New, Eved out from
19946 (readgram): here.
19947
da4160c3
AD
199482002-06-11 Akim Demaille <akim@epita.fr>
19949
19950 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19951 New.
19952 (readgram): Use them as replacement of inlined code, crule and
19953 crule1.
19954
f6d0f937
AD
199552002-06-11 Akim Demaille <akim@epita.fr>
19956
19957 * src/reader.c (grammar_end, grammar_symbol_append): New.
19958 (readgram): Use them.
19959 Make the use of `p' as local as possible.
19960
69078d4b
AD
199612002-06-10 Akim Demaille <akim@epita.fr>
19962
19963 GCJ's parser requires the tokens to be defined before the prologue.
19964
19965 * data/bison.simple: Output the token definition before the user's
19966 prologue.
19967 * tests/regression.at (Braces parsing, Duplicate string)
19968 (Mixing %token styles): Check the output from bison.
19969 (Early token definitions): New.
19970
5e424082
AD
199712002-06-10 Akim Demaille <akim@epita.fr>
19972
19973 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19974 assigning twice the same user number to a token, so that we can
19975 use it in...
19976 * src/lex.c (lex): here.
19977 Also use `symbol_class_set' instead of hand written code.
19978 * src/reader.c (parse_assoc_decl): Likewise.
19979
44536b35
AD
199802002-06-10 Akim Demaille <akim@epita.fr>
19981
19982 * src/symtab.c, src/symtab.c (symbol_class_set)
19983 (symbol_user_token_number_set): New.
19984 * src/reader.c (parse_token_decl): Use them.
19985 Use a switch instead of ifs.
19986 Use a single argument.
19987
8b9f2372
AD
199882002-06-10 Akim Demaille <akim@epita.fr>
19989
19990 Remove `%thong' support as it is undocumented, unused, duplicates
19991 `%token's job, and creates useless e-mail traffic with people who
19992 want to know what it is, why it is undocumented, unused, and
19993 duplicates `%token's job.
19994
19995 * src/reader.c (parse_thong_decl): Remove.
19996 * src/options.c (option_table): Remove "thong".
19997 * src/lex.h (tok_thong): Remove.
19998
3ae2b51f
AD
199992002-06-10 Akim Demaille <akim@epita.fr>
20000
20001 * src/symtab.c, src/symtab.c (symbol_type_set)
20002 (symbol_precedence_set): New.
20003 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
20004 (value_components_used): Remove, unused.
20005
2f1afb73
AD
200062002-06-09 Akim Demaille <akim@epita.fr>
20007
20008 Move symbols handling code out of the reader.
20009
20010 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
20011 (axiom): Move to...
20012 * src/symtab.h, src/symtab.c: here.
20013
20014 * src/gram.c (start_symbol): Remove: use startsymbol->number.
20015 * src/reader.c (startval): Rename as...
20016 * src/symtab.h, src/symtab.c (startsymbol): this.
20017 * src/reader.c: Adjust.
20018
20019 * src/reader.c (symbol_check_defined, symbol_make_alias)
20020 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20021 (token_translations_init)
20022 Move to...
20023 * src/symtab.c: here.
20024 * src/reader.c (packsymbols): Move to...
20025 * src/symtab.h, src/symtab.c (symbols_pack): here.
20026 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
20027 argument.
20028
e9bca3ad
AD
200292002-06-03 Akim Demaille <akim@epita.fr>
20030
20031 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
20032 then statements.
20033
86eff183
AD
200342002-06-03 Akim Demaille <akim@epita.fr>
20035
20036 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
20037 structs with non literals.
20038 * src/scan-skel.l: never-interactive.
20039 * src/conflicts.c (enum conflict_resolution_e): No trailing
20040 comma.
20041 * src/getargs.c (usage): Split long literal strings.
20042 Reported by Hans Aberg.
20043
717be197
AD
200442002-05-28 Akim Demaille <akim@epita.fr>
20045
20046 * data/bison.c++: Use C++ ostreams.
20047 (cdebug_): New member.
20048
670ddffd
AD
200492002-05-28 Akim Demaille <akim@epita.fr>
20050
20051 * src/output.c (output_skeleton): Be sure to allocate enough room
20052 for `/' _and_ for `\0' in full_skeleton.
20053
769b430f
AD
200542002-05-28 Akim Demaille <akim@epita.fr>
20055
20056 * data/bison.c++: Catch up with bison.simple:
20057 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20058 and Paul Eggert <eggert@twinsun.com>: `error' handing.
20059 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
20060 and popping traces.
20061
7067cb36
PH
200622002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20063
20064 * src/output.c (output_skeleton): Put an explicit path in front of
20065 the skeleton file name, rather than relying on the -I directory,
20066 to partially alleviate effects of having a skeleton file lying around
20067 in the current directory.
769b430f 20068
4a713ec2
PH
200692002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20070
769b430f 20071 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
20072 obstack_printf should be obstack_fgrow1.
20073
b408954b
AD
200742002-05-26 Akim Demaille <akim@epita.fr>
20075
20076 * src/state.h (state_t): `solved_conflicts' is a new member.
20077 * src/LR0.c (new_state): Set it to 0.
20078 * src/conflicts.h, src/conflicts.c (print_conflicts)
20079 (free_conflicts, solve_conflicts): Rename as...
20080 (conflicts_print, conflicts_free, conflicts_solve): these.
20081 Adjust callers.
20082 * src/conflicts.c (enum conflict_resolution_e)
20083 (solved_conflicts_obstack): New, used by...
20084 (log_resolution): this.
20085 Adjust to attach the conflict resolution to each state.
20086 Complete the description with the precedence/associativity
20087 information.
20088 (resolve_sr_conflict): Adjust.
20089 * src/print.c (print_state): Output its solved_conflicts.
20090 * tests/conflicts.at (Unresolved SR Conflicts)
20091 (Solved SR Conflicts): Exercise --report=all.
20092
a49aecd5
AD
200932002-05-26 Akim Demaille <akim@epita.fr>
20094
20095 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
20096 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20097 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
20098 (token_number_t, item_number_as_token_number)
20099 (token_number_as_item_number, muscle_insert_token_number_table):
20100 Rename as...
20101 (symbol_number_t, item_number_as_symbol_number)
20102 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
20103 these, since it is more appropriate.
20104
5504898e
AD
201052002-05-26 Akim Demaille <akim@epita.fr>
20106
20107 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
20108 `Error:' lines.
20109 * data/bison.simple (yystos) [YYDEBUG]: New.
20110 (yyparse) [YYDEBUG]: Display the symbols which are popped during
20111 error recovery.
20112 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
20113
ec3bc396
AD
201142002-05-25 Akim Demaille <akim@epita.fr>
20115
20116 * doc/bison.texinfo (Debugging): Split into...
20117 (Tracing): this new section, its former contents, and...
20118 (Understanding): this new section.
20119 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
20120 by...
20121 (report_flag): this.
20122 Adjust all dependencies.
20123 (report_args, report_types, report_argmatch): New.
20124 (usage, getargs): Report/support -r, --report.
20125 * src/options.h
20126 (struct option_table_struct): Rename as..,
20127 (struct option_table_s): this.
20128 Rename the `set_flag' member to `flag' to match with getopt_long's
20129 struct.
20130 * src/options.c (option_table): Split verbose into an entry for
20131 %verbose, and another for --verbose.
20132 Support --report/-r, so remove -r from the obsolete --raw.
20133 * src/print.c: Attach full item sets and lookaheads reports to
20134 report_flag instead of trace_flag.
20135 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
20136
78df8250
PE
201372002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20138 and Paul Eggert <eggert@twinsun.com>
769b430f 20139
78df8250
PE
20140 * data/bison.simple (yyparse): Correct error handling to conform to
20141 POSIX and yacc. Specifically, after syntax error is discovered,
20142 do not reduce further before shifting the error token.
20143 Clean up the code a bit by removing the labels yyerrdefault,
20144 yyerrhandle, yyerrpop.
20145 * NEWS: Document the above.
20146
c0c9ea05
PH
201472002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20148
20149 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
20150 type; it isn't always big enough, since it doesn't necessarily
20151 include non-terminals.
769b430f 20152 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
20153 the latter can be removed.
20154 (yy_token_number_type): Remove, only one use.
20155 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
20156 don't use TokenNumberType as element type.
769b430f 20157
c0c9ea05
PH
20158 * tests/regression.at: Modify expected output to agree with change
20159 to yyr1 and yytranslate.
769b430f 20160
6390a83f
FK
201612002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
20162
20163 * src/reader.c (parse_action): Use copy_character instead of
20164 obstack_1grow.
20165
db7c8e9a
AD
201662002-05-13 Akim Demaille <akim@epita.fr>
20167
20168 * tests/regression.at (Token definitions): Prototype yylex and
20169 yyerror.
20170
fcc61800
PH
201712002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20172
158c687b 20173 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
20174 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
20175 32-bit arithmetic.
20176 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
20177
5683e9b2
AD
201782002-05-07 Akim Demaille <akim@epita.fr>
20179
20180 * tests/synclines.at: Be sure to prototype yylex and yyerror to
20181 avoid GCC warnings.
20182
0c2d3f4c
AD
201832002-05-07 Akim Demaille <akim@epita.fr>
20184
20185 Kill GCC warnings.
20186
20187 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
20188 over the RHS of each rule.
20189 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
20190 * src/state.h (state_t): Member `nitems' is unsigned short.
20191 * src/LR0.c (get_state): Adjust.
20192 * src/reader.c (packgram): Likewise.
20193 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
20194 `Type'.
20195 (muscle_insert_int_table): Remove, unused.
20196 (prepare_rules): Remove `max'.
20197
1565b720
AD
201982002-05-06 Akim Demaille <akim@epita.fr>
20199
20200 * src/closure.c (print_firsts): Display of the symbol tags.
20201 (bitmatrix_print): Move to...
20202 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
20203 here.
20204 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
20205
cfaee611
AD
202062002-05-06 Akim Demaille <akim@epita.fr>
20207
20208 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
20209 hash_do_for_each.
20210
458be8e0
AD
202112002-05-06 Akim Demaille <akim@epita.fr>
20212
20213 * src/LR0.c (new_state, get_state): Instead of using the global
20214 `kernel_size' and `kernel_base', have two new arguments:
20215 `core_size' and `core'.
20216 Adjust callers.
20217
a900a624
AD
202182002-05-06 Akim Demaille <akim@epita.fr>
20219
20220 * src/reader.c (packgram): No longer end `ritem' with a 0
20221 sentinel: it is not used.
20222
d4e7d3a1
AD
202232002-05-05 Akim Demaille <akim@epita.fr>
20224
20225 New experimental feature: display the lookaheads in the report and
20226 graph.
20227
20228 * src/print (print_core): When --trace-flag, display the rules
20229 lookaheads.
20230 * src/print_graph.c (print_core): Likewise.
20231 Swap the arguments.
20232 Adjust caller.
20233
39ceb25b
AD
202342002-05-05 Akim Demaille <akim@epita.fr>
20235
20236 * tests/torture.at (Many lookaheads): New test.
20237
5372019f
AD
202382002-05-05 Akim Demaille <akim@epita.fr>
20239
20240 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
20241 (GENERATE_MUSCLE_INSERT_TABLE): this.
20242 (output_int_table, output_unsigned_int_table, output_short_table)
20243 (output_token_number_table, output_item_number_table): Replace with...
20244 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
20245 (muscle_insert_short_table, muscle_insert_token_number_table)
20246 (muscle_insert_item_number_table): these.
20247 Adjust all callers.
20248 (prepare_tokens): Don't free `translations', since...
20249 * src/reader.h, src/reader.c (grammar_free): do it.
20250 Move to...
20251 * src/gram.h, src/gram.c (grammar_free): here.
20252 * data/bison.simple, data/bison.c++: b4_token_number_max is now
20253 b4_translate_max.
20254
5df5f6d5
AD
202552002-05-05 Akim Demaille <akim@epita.fr>
20256
20257 * src/output.c (output_unsigned_int_table): New.
20258 (prepare_rules): `i' is unsigned.
20259 `prhs', `rline', `r2' are unsigned int.
20260 Rename muscle `rhs_number_max' as `rhs_max'.
20261 Output muscles `prhs_max', `rline_max', and `r2_max'.
20262 Free rline and r1.
20263 * data/bison.simple, data/bison.c++: Adjust to use these muscles
20264 to compute types instead of constant types.
20265 * tests/regression.at (Web2c Actions): Adjust.
20266
b87f8b21
AD
202672002-05-04 Akim Demaille <akim@epita.fr>
20268
20269 * src/symtab.h (SALIAS, SUNDEF): Rename as...
20270 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
20271 Adjust dependencies.
20272 * src/output.c (token_definitions_output): Be sure not to output a
20273 `#define 'a'' when fed with `%token 'a' "a"'.
20274 * tests/regression.at (Token definitions): New.
20275
8bb936e4
PE
202762002-05-03 Paul Eggert <eggert@twinsun.com>
20277
20278 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
20279 for K&R C.
20280
202812002-05-03 gettextize <bug-gnu-gettext@gnu.org>
20282
20283 * Makefile.am (SUBDIRS): Remove intl.
20284 (EXTRA_DIST): Add config/config.rpath.
20285
53c71a12
AD
202862002-05-03 Akim Demaille <akim@epita.fr>
20287
20288 * data/bison.simple (m4_if): Don't output empty enums.
20289 And actually, output valid enum definitions :(.
20290
289dd0cf
AD
202912002-05-03 Akim Demaille <akim@epita.fr>
20292
20293 * configure.bat: Remove, completely obsolete.
20294 * Makefile.am (EXTRA_DIST): Adjust.
20295 Don't distribute config.rpath...
20296 * config/Makefile.am (EXTRA_DIST): Do it.
20297
db85e524
AD
202982002-05-03 Akim Demaille <akim@epita.fr>
20299
20300 * configure.in (GETTEXT_VERSION): New.
20301 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
20302
83ccf991
AD
203032002-05-03 Akim Demaille <akim@epita.fr>
20304
20305 * data/bison.simple (b4_token_enum): New.
20306 (b4_token_defines): Use it to output tokens both as #define and
20307 enums.
20308 Suggested by Paul Eggert.
20309 * src/output.c (token_definitions_output): Don't output spurious
20310 white spaces.
20311
1f418995
AD
203122002-05-03 Akim Demaille <akim@epita.fr>
20313
20314 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20315
45119f04
RA
203162002-05-02 Robert Anisko <robert@lrde.epita.fr>
20317
20318 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
20319 Update the stack class, give a try to deque as the default container.
20320
b2d52318
AD
203212002-05-02 Akim Demaille <akim@epita.fr>
20322
20323 * data/bison.simple (yyparse): Do not implement @$ = @1.
20324 (YYLLOC_DEFAULT): Adjust to do it.
20325 * doc/bison.texinfo (Location Default Action): Fix.
20326
3a8b4109
AD
203272002-05-02 Akim Demaille <akim@epita.fr>
20328
20329 * src/reader.c (parse_braces): Merge into...
20330 (parse_action): this.
20331
84614e13
AD
203322002-05-02 Akim Demaille <akim@epita.fr>
20333
20334 * configure.in (ALL_LINGUAS): Remove.
20335 * po/LINGUAS, hr.po: New.
20336
fdbcd8e2
AD
203372002-05-02 Akim Demaille <akim@epita.fr>
20338
20339 Remove the so called hairy (semantic) parsers.
20340
20341 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
20342 * src/gram.h, src/gram.c (semantic_parser): Remove.
20343 (rule_t): Remove the guard and guard_line members.
20344 * src/lex.h (token_t): remove tok_guard.
20345 * src/options.c (option_table): Remove %guard and %semantic_parser
20346 support.
20347 * src/output.c, src/output.h (guards_output): Remove.
20348 (prepare): Adjust.
20349 (token_definitions_output): Don't output the `T'
20350 tokens (???).
20351 (output_skeleton): Don't output the guards.
20352 * src/files.c, src/files.c (attrsfile): Remove.
20353 * src/reader.c (symbol_list): Remove the guard and guard_line
20354 members.
20355 Adjust dependencies.
20356 (parse_guard): Remove.
20357 * data/bison.hairy: Remove.
20358 * doc/bison.texinfo (Environment Variables): Remove occurrences of
20359 BISON_HAIRY.
20360
82b6cb3f
AD
203612002-05-02 Akim Demaille <akim@epita.fr>
20362
20363 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
20364 (parse_guard): Rename the formal argument `stack_offset' as
20365 `rule_length', which is more readable.
20366 Adjust callers.
20367 (copy_at, copy_dollar): Instead of outputting the hard coded
20368 values of $$, $n and so forth, output invocation to b4_lhs_value,
20369 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
20370 Note: this patch partially drops `semantic-parser' support: it
20371 always does `rule_length - n', where semantic parsers ought to
20372 always use `-n'.
82b6cb3f
AD
20373 * data/bison.simple, data/bison.c++ (b4_lhs_value)
20374 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
20375
6cbfbcc5
AD
203762002-05-02 Akim Demaille <akim@epita.fr>
20377
20378 * configure.in (AC_INIT): Bump to 1.49b.
20379 (AM_INIT_AUTOMAKE): Short invocation.
20380
b8548114
AD
203812002-05-02 Akim Demaille <akim@epita.fr>
20382
20383 Version 1.49a.
20384
c20cd1fa
AD
203852002-05-01 Akim Demaille <akim@epita.fr>
20386
20387 * src/skeleton.h: Remove.
20388
8a9566d4
AD
203892002-05-01 Akim Demaille <akim@epita.fr>
20390
20391 * src/skeleton.h: Fix the #endif.
20392 Reported by Magnus Fromreide.
20393
8c6d399a
PE
203942002-04-26 Paul Eggert <eggert@twinsun.com>
20395
20396 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
20397 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 20398 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 20399
2b7ed18a
RA
204002002-04-25 Robert Anisko <robert@lrde.epita.fr>
20401
20402 * src/scan-skel.l: Postprocess quadrigraphs.
20403
20404 * src/reader.c (copy_character): New function, used to output
20405 single characters while replacing `[' and `]' with quadrigraphs, to
20406 avoid troubles with M4 quotes.
20407 (copy_comment): Output characters with copy_character.
20408 (read_additionnal_code): Likewise.
20409 (copy_string2): Likewise.
20410 (copy_definition): Likewise.
20411
20412 * tests/calc.at: Exercise M4 quoting.
20413
34a89c50
AD
204142002-04-25 Akim Demaille <akim@epita.fr>
20415
20416 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
20417 between `!' and the command.
20418 Reported by Paul Eggert.
20419
0dd1580a
RA
204202002-04-24 Robert Anisko <robert@lrde.epita.fr>
20421
20422 * tests/calc.at: Exercise prologue splitting.
20423
20424 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
20425 `b4_post_prologue' instead of `b4_prologue'.
20426
20427 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
20428 muscles.
20429 (output): Free pre_prologue_obstack and post_prologue_obstack.
20430 * src/files.h, src/files.c (attrs_obstack): Remove.
20431 (pre_prologue_obstack, post_prologue_obstack): New.
20432 * src/reader.c (copy_definition): Add a parameter to specify the
20433 obstack to fill, instead of using attrs_obstack unconditionally.
20434 (read_declarations): Pass pre_prologue_obstack to copy_definition if
20435 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
20436
83c1796f
PE
204372002-04-23 Paul Eggert <eggert@twinsun.com>
20438
20439 * data/bison.simple: Remove unnecessary commentary and white
20440 space differences from 1_29-branch.
20441 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
20442
20443 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
20444 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
20445 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
20446 constructors or destructors.
20447
20448 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
20449
1207eeac
AD
204502002-04-23 Akim Demaille <akim@epita.fr>
20451
20452 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
20453 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
20454 location with columns.
20455 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
20456 All reported by Paul Eggert.
20457
78ab8f67
AD
204582002-04-22 Akim Demaille <akim@epita.fr>
20459
20460 * src/reduce.c (dump_grammar): Move to...
20461 * src/gram.h, src/gram.c (grammar_dump): here.
20462 Be sure to separate long item numbers.
20463 Don't read the members of a rule's prec if its nil.
20464
133c20e2
AD
204652002-04-22 Akim Demaille <akim@epita.fr>
20466
20467 * src/output.c (table_size, table_grow): New.
20468 (MAXTABLE): Remove, replace uses with table_size.
20469 (pack_vector): Instead of dying when the table is too big, grow it.
20470
9515e8a7
AD
204712002-04-22 Akim Demaille <akim@epita.fr>
20472
20473 * data/bison.simple (yyr1): Its type is that of a token number.
20474 * data/bison.c++ (r1_): Likewise.
20475 * tests/regression.at (Web2c Actions): Adjust.
20476
23c5a174
AD
204772002-04-22 Akim Demaille <akim@epita.fr>
20478
20479 * src/reader.c (token_translations_init): 256 is now the default
20480 value for the error token, i.e., it will be assigned another
20481 number if the user assigned 256 to one of her tokens.
20482 (reader): Don't force 256 to error.
20483 * doc/bison.texinfo (Symbols): Adjust.
20484 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
20485 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
20486 etc. instead of 10, 20, 30 (which was used to `jump' over error
20487 (256) and undefined (2)).
20488
5fbb0954
AD
204892002-04-22 Akim Demaille <akim@epita.fr>
20490
20491 Propagate more token_number_t.
20492
20493 * src/gram.h (token_number_as_item_number)
20494 (item_number_as_token_number): New.
20495 * src/output.c (GENERATE_OUTPUT_TABLE): New.
20496 Use it to create output_item_number_table and
20497 output_token_number_table.
20498 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
20499 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
20500 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
20501 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
20502
4f940944
AD
205032002-04-22 Akim Demaille <akim@epita.fr>
20504
20505 * src/output.h, src/output.c (get_lines_number): Remove.
20506
3ded9a63
AD
205072002-04-19 Akim Demaille <akim@epita.fr>
20508
20509 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
20510 as Lex/Flex'.
20511 (Debugging): More details about enabling the debugging features.
20512 (Table of Symbols): Describe $$, $n, @$, and @n.
20513 Suggested by Tim Josling.
20514
e0c471a9
AD
205152002-04-19 Akim Demaille <akim@epita.fr>
20516
20517 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
20518
fecc10cd
AD
205192002-04-10 Akim Demaille <akim@epita.fr>
20520
20521 * src/system.h: Rely on HAVE_LIMITS_H.
20522 Suggested by Paul Eggert.
20523
51dec47b
AD
205242002-04-09 Akim Demaille <akim@epita.fr>
20525
20526 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
20527 full stderr, and strip it according to the bison options, instead
20528 of composing the error message from different bits.
20529 This makes it easier to check for several error messages.
20530 Adjust all the invocations.
20531 Add an invocation exercising the error token.
20532 Add an invocation demonstrating a stupid error message.
20533 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
20534 Adjust the tests.
20535 Error message are for stderr, not stdout.
20536
007a50a4
AD
205372002-04-09 Akim Demaille <akim@epita.fr>
20538
20539 * src/gram.h, src/gram.c (error_token_number): Remove, use
20540 errtoken->number.
20541 * src/reader.c (reader): Don't specify the user token number (2)
20542 for $undefined, as it uselessly prevents using it.
20543 * src/gram.h (token_number_t): Move to...
20544 * src/symtab.h: here.
20545 (state_t.number): Is a token_number_t.
20546 * src/print.c, src/reader.c: Use undeftoken->number instead of
20547 hard coded 2.
20548 (Even though this 2 is not the same as above: the number of the
20549 undeftoken remains being 2, it is its user token number which
20550 might not be 2).
20551 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
20552 `user_token_number_max'.
20553 Output `undef_token_number'.
20554 * data/bison.simple, data/bison.c++: Use them.
20555 Be sure to map invalid yylex return values to
20556 `undef_token_number'. This saves us from gratuitous SEGV.
20557
20558 * tests/conflicts.at (Solved SR Conflicts)
20559 (Unresolved SR Conflicts): Adjust.
20560 * tests/regression.at (Web2c Actions): Adjust.
20561
06446ccf
AD
205622002-04-08 Akim Demaille <akim@epita.fr>
20563
20564 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
20565 Adding #line.
20566 Remove the duplicate `typedefs'.
20567 (RhsNumberType): Fix the declaration and various other typos.
20568 Use __ofile__.
20569 * data/bison.simple: Use __ofile__.
20570 * src/scan-skel.l: Handle __ofile__.
20571
62a3e4f0
AD
205722002-04-08 Akim Demaille <akim@epita.fr>
20573
20574 * src/gram.h (item_number_t): New, the type of item numbers in
20575 RITEM. Note that it must be able to code symbol numbers as
20576 positive number, and the negation of rule numbers as negative
20577 numbers.
20578 Adjust all dependencies (pretty many).
20579 * src/reduce.c (rule): Remove this `short *' pointer: use
20580 item_number_t.
20581 * src/system.h (MINSHORT, MAXSHORT): Remove.
20582 Include `limits.h'.
20583 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
20584 (shortcpy): Remove.
20585 (MAXTABLE): Move to...
20586 * src/output.c (MAXTABLE): here.
20587 (prepare_rules): Use output_int_table to output rhs.
20588 * data/bison.simple, data/bison.c++: Adjust.
20589 * tests/torture.at (Big triangle): Move the limit from 254 to
20590 500.
20591 * tests/regression.at (Web2c Actions): Ajust.
20592
20593 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
20594 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
20595 passes, but produces negative #line number, once fixed, GCC is
20596 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
20597 C), it passes.
20598 * src/state.h (state_h): Code input lines on ints, not shorts.
20599
bb88b0fc
AD
206002002-04-08 Akim Demaille <akim@epita.fr>
20601
20602 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
20603 and then the grammar.
20604
9a636f47
AD
206052002-04-08 Akim Demaille <akim@epita.fr>
20606
20607 * src/system.h: No longer using strndup.
20608
680e8701
AD
206092002-04-07 Akim Demaille <akim@epita.fr>
20610
20611 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20612 * src/output.c (output_table_data): Return the longest number.
20613 (prepare_tokens): Output `token_number_max').
20614 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20615 New.
20616 Use them to define yy_token_number_type/TokenNumberType.
20617 Use this type for yytranslate.
20618 * tests/torture.at (Big triangle): Push the limit from 124 to
20619 253.
20620 * tests/regression.at (Web2c Actions): Adjust.
20621
817e9f41
AD
206222002-04-07 Akim Demaille <akim@epita.fr>
20623
20624 * tests/torture.at (Big triangle): New.
20625 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20626 * tests/existing.at: here.
20627
5123689b
AD
206282002-04-07 Akim Demaille <akim@epita.fr>
20629
20630 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20631 nritems.
20632 Adjust dependencies.
20633
f3849179
AD
206342002-04-07 Akim Demaille <akim@epita.fr>
20635
20636 * src/reader.c: Normalize increments to prefix form.
20637
bd02036a
AD
206382002-04-07 Akim Demaille <akim@epita.fr>
20639
20640 * src/reader.c, symtab.c: Remove debugging code.
20641
db8837cb
AD
206422002-04-07 Akim Demaille <akim@epita.fr>
20643
20644 Rename all the `bucket's as `symbol_t'.
20645
20646 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20647 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20648 * src/symtab.c, src/symtab.h (bucket): Rename as...
20649 (symbol_t): this.
20650 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20651 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20652 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20653 (buckets_new, buckets_free, buckets_do): Rename as...
20654 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20655 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20656 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20657 (symbols_new, symbols_free, symbols_do): these.
20658
72a23c97
AD
206592002-04-07 Akim Demaille <akim@epita.fr>
20660
20661 Use lib/hash for the symbol table.
20662
20663 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20664 EOF.
20665 * src/lex.c (lex): Set the `number' member of new terminals.
20666 * src/reader.c (bucket_check_defined, bucket_make_alias)
20667 (bucket_check_alias_consistence, bucket_translation): New.
20668 (reader, grammar_free, readgram, token_translations_init)
20669 (packsymbols): Adjust.
20670 (reader): Number the predefined tokens.
20671 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20672 for predefined tokens.
20673 * src/symtab.h (bucket): Remove all the hash table related
20674 members.
20675 * src/symtab.c (symtab): Replace by...
20676 (bucket_table): this.
20677 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20678 (buckets_new, buckets_do): New.
20679
280a38c3
AD
206802002-04-07 Akim Demaille <akim@epita.fr>
20681
20682 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20683 (start_symbol, max_user_token_number, semantic_parser)
20684 (error_token_number): Initialize.
20685 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20686 Initialize.
20687 (reader): Don't.
20688 (errtoken, eoftoken, undeftoken, axiom): Extern.
20689
03b31c0c
AD
206902002-04-07 Akim Demaille <akim@epita.fr>
20691
20692 * src/gram.h (rule_s): prec and precsym are now pointers
20693 to the bucket giving the priority/associativity.
20694 Member `associativity' removed: useless.
20695 * src/reduce.c, src/conflicts.c: Adjust.
20696
8b3df748
AD
206972002-04-07 Akim Demaille <akim@epita.fr>
20698
20699 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20700 Properly escape the symbols' TAG when outputting them.
20701
e601aa1d
AD
207022002-04-07 Akim Demaille <akim@epita.fr>
20703
20704 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20705
b0299a2e
AD
207062002-04-07 Akim Demaille <akim@epita.fr>
20707
20708 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20709 (LArule): this, which is an array to rule_t*.
20710 * src/print.c, src/conflicts.c: Adjust.
20711
d7e1f00c
AD
207122002-04-07 Akim Demaille <akim@epita.fr>
20713
20714 * src/gram.h (rule_t): Rename `number' as `user_number'.
20715 `number' is a new member.
20716 Adjust dependencies.
20717 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20718
cc9305dd
AD
207192002-04-07 Akim Demaille <akim@epita.fr>
20720
20721 As a result of the previous patch, it is no longer needed
20722 to reorder ritem itself.
20723
20724 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20725
b0940840
AD
207262002-04-07 Akim Demaille <akim@epita.fr>
20727
20728 Be sure never to walk through RITEMS, but use only data related to
20729 the rules themselves. RITEMS should be banished.
20730
20731 * src/output.c (output_token_translations): Rename as...
20732 (prepare_tokens): this.
20733 In addition to `translate', prepare the muscles `tname' and
20734 `toknum', which were handled by...
20735 (output_rule_data): this.
20736 Remove, and move the remainder of its outputs into...
20737 (prepare_rules): this new routines, which also merges content from
20738 (output_gram): this.
20739 (prepare_rules): Be sure never to walk through RITEMS.
20740 (output_stos): Rename as...
20741 (prepare_stos): this.
20742 (output): Always invoke prepare_states, after all, just don't use it
20743 in the output if you don't need it.
20744
643a5994
AD
207452002-04-07 Akim Demaille <akim@epita.fr>
20746
20747 * src/LR0.c (new_state): Display `nstates' as the name of the
20748 newly created state.
20749 Adjust to initialize first_state and last_state if needed.
20750 Be sure to distinguish the initial from the final state.
20751 (new_states): Create the itemset of the initial state, and use
20752 new_state.
20753 * src/closure.c (closure): Now that the initial state has its
20754 items properly set, there is no need for a special case when
20755 creating `ruleset'.
20756
20757 As a result, now the rule 0, reducing to $axiom, is visible in the
20758 outputs. Adjust the test suite.
20759
20760 * tests/conflicts.at (Solved SR Conflicts)
20761 (Unresolved SR Conflicts): Adjust.
20762 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20763 * tests/conflicts.at (S/R in initial): New.
20764
b4c4ccc2
AD
207652002-04-07 Akim Demaille <akim@epita.fr>
20766
20767 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20768 the RHS of the rules.
20769 * src/output.c (output_gram): Likewise.
20770
bba97eb2
AD
207712002-04-07 Akim Demaille <akim@epita.fr>
20772
20773 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20774 bucket.
20775 Adjust all dependencies.
20776 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20777 `number' of the buckets too.
20778 * src/gram.h: Include `symtab.h'.
20779 (associativity): Move to...
20780 * src/symtab.h: here.
20781 No longer include `gram.h'.
20782
c3b407f4
AD
207832002-04-07 Akim Demaille <akim@epita.fr>
20784
20785 * src/gram.h, src/gram.c (rules_rhs_length): New.
20786 (ritem_longest_rhs): Use it.
20787 * src/gram.h (rule_t): `number' is a new member.
20788 * src/reader.c (packgram): Set it.
20789 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20790 the end of `rules', and count them out of `nrules'.
20791 (reduce_output, dump_grammar): Adjust.
20792 * src/print.c (print_grammar): It is no longer needed to check for
20793 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20794 * tests/reduce.at (Reduced Automaton): New test.
20795
11652ab3
AD
207962002-04-07 Akim Demaille <akim@epita.fr>
20797
20798 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20799 lacking `+ 1' to nrules, Bison reported as useless a token if it
20800 was used solely to set the precedence of the last rule...
20801
26b23c1a
AD
208022002-04-07 Akim Demaille <akim@epita.fr>
20803
20804 * data/bison.c++, data/bison.simple: Don't output the current file
20805 name in #line, to avoid useless diffs between two identical
20806 outputs under different names.
20807
18bcecb0
AD
208082002-04-07 Akim Demaille <akim@epita.fr>
20809
20810 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20811 Normalize loops to using `< nrules + 1', not `<= nrules'.
20812
fa770c86
AD
208132002-04-07 Akim Demaille <akim@epita.fr>
20814
20815 * TODO: Update.
20816
d9b739c3
AD
208172002-04-07 Akim Demaille <akim@epita.fr>
20818
20819 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20820 bucket.value as bucket.number.
20821
99013900
AD
208222002-04-07 Akim Demaille <akim@epita.fr>
20823
20824 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20825 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20826 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20827 RHS, instead of being an index in RITEMS.
20828
e966383b
PE
208292002-04-04 Paul Eggert <eggert@twinsun.com>
20830
20831 * doc/bison.texinfo: Update copyright date.
20832 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20833 (Symbols): Warn about running Bison in one character set,
20834 but compiling and/or running in an incompatible one.
20835 Warn about character code 256, too.
20836
208372002-04-03 Paul Eggert <eggert@twinsun.com>
20838
20839 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20840 YYERROR_VERBOSE is nonzero, not whether it is defined.
20841
20842 Merge changes from bison-1_29-branch.
c307773e 20843
8d6c48b9
PE
208442002-03-20 Paul Eggert <eggert@twinsun.com>
20845
20846 Merge fixes from Debian bison_1.34-1.diff.
20847
20848 * configure.in (AC_PREREQ): 2.53.
20849
e53c6322
AD
208502002-03-20 Akim Demaille <akim@epita.fr>
20851
20852 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20853
9ffbeca7
PE
208542002-03-19 Paul Eggert <eggert@twinsun.com>
20855
21db0b2a
PE
20856 * src/bison.simple (YYCOPY): New macro.
20857 (YYSTACK_RELOCATE): Use it.
20858 Remove Type arg; no longer needed. All callers changed.
20859 (yymemcpy): Remove; no longer needed.
20860
9ffbeca7
PE
20861 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20862 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20863
642cb8f8
AD
208642002-03-19 Akim Demaille <akim@epita.fr>
20865
20866 Test and fix the #line outputs.
20867
20868 * tests/atlocal.at (GCC): New.
20869 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 20870 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
20871 (Action synch line, Epilogue synch line): New tests.
20872 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20873 * data/bison.simple, data/bison.c++: Use it.
20874
3c31a486
AD
208752002-03-19 Akim Demaille <akim@epita.fr>
20876
20877 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20878 (Solved SR Conflicts, %expect not enough, %expect right)
20879 (%expect too much): Move to...
20880 * tests/conflicts.at: this new file.
20881
0d8bed56
AD
208822002-03-19 Akim Demaille <akim@epita.fr>
20883
20884 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20885 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20886 that we can move to enums for instance.
20887 * src/output.c (token_definitions_output): Output a list of
20888 `token-name, token-number' instead of the #define.
20889 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20890
9208d17f
AD
208912002-03-14 Akim Demaille <akim@epita.fr>
20892
20893 Use Gettext 0.11.1.
20894
af27eacb
RA
208952002-03-09 Robert Anisko <robert@lrde.epita.fr>
20896
20897 * data/bison.c++: Make the user able to add members to the generated
20898 parser by subclassing.
20899
9101a310
RA
209002002-03-05 Robert Anisko <robert@lrde.epita.fr>
20901
20902 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20903 a character.
20904 Reported by Nicolas Tisserand and Nicolas Burrus.
20905
fff9bf0b
RA
209062002-03-04 Robert Anisko <robert@lrde.epita.fr>
20907
20908 * src/reader.c: Warn about lacking semi-colons, do not complain.
20909
64dba31e
RA
209102002-03-04 Robert Anisko <robert@lrde.epita.fr>
20911
20912 * data/bison.c++: Remove a debug line.
20913
374f5a14
RA
209142002-03-04 Robert Anisko <robert@lrde.epita.fr>
20915
20916 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20917 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20918 provide a default implementation.
20919
bfcf1f3a
AD
209202002-03-04 Akim Demaille <akim@epita.fr>
20921
20922 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20923 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20924 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20925 * tests/semantic.at (Parsing Guards): Similarly.
20926 * src/reader.at (readgram): Complain if the last rule is not ended
20927 with a semi-colon.
20928
65ccf9fc
AD
209292002-03-04 Akim Demaille <akim@epita.fr>
20930
20931 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20932 * src/closure.c: here.
20933 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20934 RTC.
20935 * src/warshall.h, src/warshall.c: Remove.
20936 * tests/sets.at (Broken Closure): Adjust.
20937
d0039cbc
AD
209382002-03-04 Akim Demaille <akim@epita.fr>
20939
20940 * src/output.c (output_skeleton): tempdir is const.
20941 bytes_read is unused.
20942
345cea78
AD
209432002-03-04 Akim Demaille <akim@epita.fr>
20944
20945 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20946 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20947 Update.
20948 From Michael Hayes.
20949
564801f7
AD
209502002-03-04 Akim Demaille <akim@epita.fr>
20951
20952 * src/closure.c (closure): `r' is unused.
20953
e5352bc7
AD
209542002-03-04 Akim Demaille <akim@epita.fr>
20955
20956 * tests/sets.at (Broken Closure): Add the ending `;'.
20957 * src/reader.at (readgram): Complain if a rule is not ended with a
20958 semi-colon.
20959
914feea9
AD
209602002-03-04 Akim Demaille <akim@epita.fr>
20961
20962 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20963 (count_sr_conflicts): Use bitset_count.
20964 * src/reduce.c (inaccessable_symbols): Ditto.
20965 (bits_size): Remove.
20966 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20967
f0250de6
AD
209682002-03-04 Akim Demaille <akim@epita.fr>
20969
20970 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20971 * src/reduce.c: Remove the `bitset_zero's following the
20972 `bitset_create's, as now it is performed by the latter.
20973
ef017502
AD
209742002-03-04 Akim Demaille <akim@epita.fr>
20975
20976 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20977 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20978 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20979 latest sources from Michael.
20980
76514394
AD
209812002-03-04 Akim Demaille <akim@epita.fr>
20982
20983 * src/output.c (output): Don't free the grammar.
20984 * src/reader.c (grammar_free): New.
20985 * src/main.c (main): Call it and don't free symtab here.
20986
55024580
AD
209872002-03-04 Akim Demaille <akim@epita.fr>
20988
20989 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20990 before returning.
20991 Reported by Benoit Perrot.
20992
f9abaa2c
AD
209932002-03-04 Akim Demaille <akim@epita.fr>
20994
20995 Use bitset operations when possible, not loops over bits.
20996
20997 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20998 bitset_or.
20999 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
21000 * src/reduce.c (useless_nonterminals): Formatting changes.
21001 * src/warshall.c (TC): Use bitset_or.
21002
0e721e75
AD
210032002-03-04 Akim Demaille <akim@epita.fr>
21004
21005 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
21006 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
21007 Ditto.
21008
0fb1ffb1
AD
210092002-03-04 Akim Demaille <akim@epita.fr>
21010
21011 * src/lalr.c (F): Now a bitset*.
21012 Adjust all dependencies.
21013
b86796bf
AD
210142002-03-04 Akim Demaille <akim@epita.fr>
21015
21016 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
21017 Adjust all dependencies.
21018
602bbf31
AD
210192002-03-04 Akim Demaille <akim@epita.fr>
21020
21021 * src/L0.c, src/LR0.h (nstates): Be size_t.
21022 Adjust comparisons (signed vs unsigned).
21023 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
21024 bitset*.
21025 Adjust all dependencies.
21026
d8a0245c
AD
210272002-03-04 Akim Demaille <akim@epita.fr>
21028
21029 * src/closure.c (firsts): Now, also a bitset.
21030 Adjust all dependencies.
21031 (varsetsize): Remove, now unused.
21032 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
21033
34ba9743
AD
210342002-03-04 Akim Demaille <akim@epita.fr>
21035
21036 * src/print.c: Convert to use bitset.h, not hand coded iterations
21037 over ints.
21038
ed86e78c
AD
210392002-03-04 Akim Demaille <akim@epita.fr>
21040
21041 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
21042
dfdb1797
AD
210432002-03-04 Akim Demaille <akim@epita.fr>
21044
21045 * src/closure.c (ruleset): Be a bitset.
21046 (rulesetsize): Remove.
21047
7086e707
AD
210482002-03-04 Akim Demaille <akim@epita.fr>
21049
21050 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
21051 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
21052 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
21053 * src/closure.c (fderives): Be an array of bitsets.
21054
98254360
RA
210552002-02-28 Robert Anisko <robert@lrde.epita.fr>
21056
21057 * data/bison.c++: Merge the two generated headers. Insert a copyright
21058 notice in each output file.
21059
a75c057f
AD
210602002-02-28 Akim Demaille <akim@epita.fr>
21061
21062 * data/bison.c++: Copy the prologue of bison.simple to fetch
21063 useful M4 definitions, such as b4_header_guard.
21064
06b00abc
AD
210652002-02-25 Akim Demaille <akim@epita.fr>
21066
21067 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
21068 translator friendly scheme for the bgr
21069 copyright notice.
06b00abc 21070
70e7d534
AD
210712002-02-25 Akim Demaille <akim@epita.fr>
21072
21073 * src/output.c (header_output): Remove, now handled completely via
21074 M4.
21075
abe017f6
AD
210762002-02-25 Akim Demaille <akim@epita.fr>
21077
21078 * m4/m4.m4: New, from CVS Autoconf.
21079 * configure.in: Invoke it.
21080 * src/output.c (output_skeleton): Use its result instead of the
21081 hard coded name.
21082
381fb12e
AD
210832002-02-25 Akim Demaille <akim@epita.fr>
21084
21085 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
21086 Fileutils 4.1.5.
21087 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
21088 * src/output.c (output_skeleton): Use mkstemp to create a real
21089 temporary file.
21090 Move the filling of `skeleton' and its muscle to...
21091 (prepare): here.
21092 (output): Move the definition of the prologue muscle to...
21093 (prepare): here.
21094 * src/system.h (DEFAULT_TMPDIR): New.
21095
6f38107f
PE
210962002-02-14 Paul Eggert <eggert@twinsun.com>
21097
21098 Remove the support for C++ namespace cleanliness; it was
21099 causing more problems than it was curing, since it didn't work
21100 properly on some nonstandard C++ compilers. This can wait
21101 for a proper C++ parser.
21102
21103 * NEWS: Document this.
21104 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
21105 of C++, as it's treated like C now.
21106 * src/bison.simple (YYSTD): Remove.
21107 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
21108 Treat C++ just like Standard C instead of trying to support
21109 namespace cleanliness.
21110
80cce3da
AD
211112002-02-14 Akim Demaille <akim@epita.fr>
21112
21113 * tests/regression.at (else): Adjust to Andreas' change.
21114
842e8679
AD
211152002-02-14 Akim Demaille <akim@epita.fr>
21116
21117 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
21118
4bda3f10
AD
211192002-02-13 Andreas Schwab <schwab@suse.de>
21120
21121 * src/output.c (output_rule_data): Don't output NULL, it might
21122 not be defined yet.
21123
4162fa07 211242002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 21125
4162fa07
RA
21126 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
21127 (Copyright notice): Update.
b418ecd8 21128
bd16a5dc
AD
211292002-02-11 Akim Demaille <akim@epita.fr>
21130
21131 * tests/regression.at (%nonassoc and eof): Don't include
21132 nonportable headers.
21133
8d69a1a3
RA
211342002-02-08 Robert Anisko <robert@lrde.epita.fr>
21135
21136 * data/bison.c++: Correct error recovery. Make the user able to
21137 initialize the starting location.
21138
9b2d0677
AD
211392002-02-07 Akim Demaille <akim@epita.fr>
21140
21141 * tests/input.at: New.
21142
69e2658b
RA
211432002-02-07 Robert Anisko <robert@lrde.epita.fr>
21144
21145 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 21146 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
21147 directives around tables only needed for debugging.
21148
4aacc3a7
RA
211492002-02-07 Robert Anisko <robert@lrde.epita.fr>
21150
21151 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
21152 C++ parsers.
21153 (yy::b4_name::parse): Use print_.
21154
762a801e
RA
211552002-02-07 Robert Anisko <robert@lrde.epita.fr>
21156
21157 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
21158
4bb2bc3f
RA
211592002-02-07 Robert Anisko <robert@lrde.epita.fr>
21160
21161 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
21162 C++ parsers.
21163 (yy::b4_name::parse): Build verbose error messages, and use error_.
21164
6b45a3ca
RA
211652002-02-06 Robert Anisko <robert@lrde.epita.fr>
21166
21167 * data/bison.c++: Fix m4 quoting in comments.
21168
50997c6e
RA
211692002-02-06 Robert Anisko <robert@lrde.epita.fr>
21170
21171 * data/bison.c++: Adjust the parser code. Fix some muscles that were
21172 not expanded by m4.
21173
3f3eed27
AD
211742002-02-05 Akim Demaille <akim@epita.fr>
21175
21176 * data/bison.c++: Adjust to the M4 back end.
21177 More is certainly needed.
21178
be2a1a68
AD
211792002-02-05 Akim Demaille <akim@epita.fr>
21180
21181 Give a try to M4 as a back end.
21182
21183 * lib/readpipe.c: New, from wdiff.
21184 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
21185 BISON_HAIRY.
21186 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
21187 specific values. Now it is m4 that performs the lookup.
21188 * src/parse-skel.y: Remove.
21189 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
21190 * src/output.c (actions_output, guards_output)
21191 (token_definitions_output): No longer keeps track of the output
21192 line number, hence remove the second argument.
21193 (guards_output): Check against the guard member of a rule, not the
21194 action member.
21195 Adjust callers.
21196 (output_skeleton): Don't look for the skeleton location, let m4 do
21197 that.
21198 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
21199 file will be used.
21200 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
21201 (prepare): Given that for the time being changesyntax is not
21202 usable in M4, rename the muscles using `-' to `_'.
21203 Define `defines_flag', `output_parser_name' and `output_header_name'.
21204 * src/output.h (actions_output, guards_output)
21205 (token_definitions_output): Adjust prototypes.
21206 * src/scan-skel.l: Instead of scanning the skeletons, it now
21207 processes the output of m4: `__oline__' and `#output'.
21208 * data/bison.simple: Adjust to be used by M4(sugar).
21209 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
21210 to date.
21211 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
21212 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
21213 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
21214 shamelessly stolen from CVS Autoconf.
21215
beda758b
AD
212162002-02-05 Akim Demaille <akim@epita.fr>
21217
21218 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
21219 * configure.in: Check for the declarations of free and malloc.
21220 * src/muscle_tab.c: Adjust.
21221
5ece6d43
AD
212222002-02-05 Akim Demaille <akim@epita.fr>
21223
21224 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
21225 which have no values.
21226
5bb18f9a
AD
212272002-02-05 Akim Demaille <akim@epita.fr>
21228
21229 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
21230 * data/: here.
21231
894dd62e
PE
212322002-01-29 Paul Eggert <eggert@twinsun.com>
21233
21234 * src/bison.simple (YYSIZE_T): Do not define merely because
21235 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
21236 On some platforms, <alloca.h> does not declare YYSTD (size_t).
21237
82841af7
AD
212382002-01-27 Akim Demaille <akim@epita.fr>
21239
21240 Fix `%nonassoc and eof'.
21241
21242 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
21243 which were not properly copied! Replace
21244 memcpy (res->errs, src->errs, src->nerrs);
21245 with
21246 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
21247 !!!
21248 * tests/regression.at (%nonassoc and eof): Adjust to newest
21249 Autotest: `.' is not in the PATH.
21250
318b76e9
AD
212512002-01-27 Akim Demaille <akim@epita.fr>
21252
21253 * tests/sets.at (AT_EXTRACT_SETS): New.
21254 (Nullable): Use it.
21255 (Firsts): New.
21256
30d2f3d5
AD
212572002-01-26 Akim Demaille <akim@epita.fr>
21258
21259 * tests/actions.at, tests/calc.at, tests/headers.at,
21260 * tests/torture.at: Adjust to the newest Autotest which no longer
21261 forces `.' in the PATH.
21262
30f8c395
AD
212632002-01-25 Akim Demaille <akim@epita.fr>
21264
21265 * tests/regression.at (%nonassoc and eof): New.
21266 Suggested by Robert Anisko.
21267
29ae55f1
AD
212682002-01-24 Akim Demaille <akim@epita.fr>
21269
21270 Bison dumps core when trying to complain about broken input files.
21271 Reported by Cris van Pelt.
21272
21273 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
21274 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
21275 into...
21276 (Invalid inputs): Strengthen: exercise parse_percent_token.
21277
2b548aa6
RA
212782002-01-24 Robert Anisko <robert.anisko@epita.fr>
21279
21280 * src/Makefile.am: Add bison.c++.
21281 * src/bison.c++: New skeleton.
21282
bb0146c2
AD
212832002-01-21 Paolo Bonzini <bonzini@gnu.org>
21284
21285 * po/it.po: New.
21286
bec30531
AD
212872002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
21288
21289 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
21290
fc6edc45
MA
212912002-01-20 Marc Autret <marc@gnu.org>
21292
21293 * src/files.c (compute_output_file_names): Fix
21294
5e5d5415
MA
212952002-01-20 Marc Autret <marc@gnu.org>
21296
21297 * tests/output.at: New test.
21298 * src/files.c (compute_base_names): Don't map extensions when
21299 the YACC flag is set, use defaults.
21300 Reported by Evgeny Stambulchik.
21301
44ea3fbd
MA
213022002-01-20 Marc Autret <marc@gnu.org>
21303
ba0fe3c7
PE
21304 * src/system.h: Need to define __attribute__ away for non-GCC
21305 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
21306 Suggested by Albert Chin-A-Young.
21307
338963d1
TVH
213082002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
21309
21310 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
21311 canonical definition.
21312 * src/system.h: Use the canonical definition for PARAMS (avoids
21313 a conflict with the macro from lib/hash.h).
21314
c57b2479
AD
213152002-01-11 Akim Demaille <akim@epita.fr>
21316
21317 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 21318 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 21319
b85810ae
AD
213202002-01-09 Akim Demaille <akim@epita.fr>
21321
21322 * src/files.c, src/files.h (output_infix): New.
21323 (tab_extension): Remove.
21324 (compute_base_names): Compute the former, drop the latter.
21325 * src/output.c (prepare): Insert the muscles `output-infix', and
21326 `output-suffix'.
21327 * src/parse-skel.y (string, string.1): New.
21328 (section.header): Use it.
21329 (section.yacc): Remove.
21330 (prefix): Remove too.
21331 * src/scan-skel.l: Adjust.
21332 * src/bison.simple, src/bison.hairy: Adjust.
21333
cae60122
AD
213342002-01-09 Akim Demaille <akim@epita.fr>
21335
21336 * configure.in (WERROR_CFLAGS): Compute it.
21337 * src/Makefile.am (CFLAGS): Pass it.
21338 * tests/atlocal.in (CFLAGS): Idem.
21339 * src/files.c: Fix a few warnings.
21340 (get_extension_index): Remove, unused.
21341
ae404801
AD
213422002-01-08 Akim Demaille <akim@epita.fr>
21343
21344 * src/getargs.c (AS_FILE_NAME): New.
21345 (getargs): Use it to convert DOSish file names.
21346 * src/files.c (base_name): Rename as full_base_name to avoid
21347 clashes with `base_name ()'.
21348 (filename_split): New.
21349 (compute_base_names): N-th rewrite, using filename_split.
21350
22312b71
AD
213512002-01-08 Akim Demaille <akim@epita.fr>
21352
21353 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
21354 New, stolen from the Fileutils 4.1.
21355 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21356 * configure.in: Check for the presence of memrchr, and of its
21357 prototype.
21358
a67cef01
TVH
213592002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
21360
21361 * lib/hash.h (__P): Added definition for this macro.
21362 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
21363 BUILT_SOURCES, to ensure they are generated first.
21364 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
21365 %error-verbose to allow bootstrapping with bison 1.30x.
21366
2b25d624
AD
213672002-01-06 Akim Demaille <akim@epita.fr>
21368
21369 * src/reader.c (parse_braces): Don't fetch the next char, the
21370 convention is to fetch on entry.
21371 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
21372 'switch' without a following semicolon.
21373 * tests/regression.at (braces parsing): New.
21374
3460813b
AD
213752002-01-06 Akim Demaille <akim@epita.fr>
21376
21377 Bison is dead wrong in its RR conflict reports.
21378
21379 * tests/torture.at (GNU Cim Grammar): New.
21380 * src/conflicts.c (count_rr_conflicts): Fix.
21381
73784c64
AD
213822002-01-06 Akim Demaille <akim@epita.fr>
21383
21384 Creating package.m4 from configure.ac causes too many problems.
21385
21386 * tests/Makefile.am (package.m4): Create it by hand,
21387 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
21388
25d81090
AD
213892002-01-06 Akim Demaille <akim@epita.fr>
21390
21391 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
21392 skeleton.h.
21393
a9b8959e
PE
213942002-01-04 Paul Eggert <eggert@twinsun.com>
21395
21396 * doc/bison.texinfo (Debugging):
21397 Remove YYSTDERR; it's no longer defined or used.
21398 Also, s/cstdio.h/cstdio/.
21399
25d81090
AD
214002002-01-03 Akim Demaille <akim@epita.fr>
21401
21402 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
21403
1109455c
AD
214042002-01-03 Akim Demaille <akim@epita.fr>
21405
21406 * src/parse-skel.y (process_skeleton): Don't bind the parser's
21407 tracing code to --trace, wait for a better --trace option, with
21408 args.
21409
7ea5e977
AD
214102002-01-03 Akim Demaille <akim@epita.fr>
21411
21412 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
21413 The ISO C++ standard is extremely clear about it: stderr is
21414 considered a macro, not a regular symbol (see table 94 `Header
21415 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
21416 Therefore std:: does not apply to it. It still does with fprintf.
21417 Also, s/cstdio.h/cstdio/.
21418
fab5b110
AD
214192002-01-03 Akim Demaille <akim@epita.fr>
21420
21421 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
21422 for non system headers.
21423
aed7fd9b
AD
214242002-01-02 Akim Demaille <akim@epita.fr>
21425
21426 Equip the skeleton chain with location tracking, runtime trace,
21427 pure parser and scanner.
21428
21429 * src/parse-skel.y: Request a pure parser, locations, and prefix
21430 renaming.
21431 (%union): Having several members with the same type does not help
21432 type mismatches, simplify.
21433 (YYPRINT, yyprint): New.
21434 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
21435 (skel_error): this.
21436 Handle locations.
21437 * src/scan-skel.l: Adjust to these changes.
21438 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
21439 (LOCATION_PRINT, skel_control_t): New.
21440
24fad99e
AD
214412001-12-30 Akim Demaille <akim@epita.fr>
21442
21443 * src/parse-skel.y: Get rid of the shift/reduce conflict:
21444 replace `gb' with BLANKS.
21445 * src/scan-skel.l: Adjust.
21446
a4b36db4
AD
214472001-12-30 Akim Demaille <akim@epita.fr>
21448
21449 * src/system.h: We don't need nor want bcopy.
21450 Throw away MS-DOS crap: we don't need getpid.
21451 * configure.in: We don't need strndup. It was even causing
21452 problems: because Flex includes the headers *before* us,
21453 _GNU_SOURCE is not defined by config.h, and therefore strndup was
21454 not visible.
21455 * lib/xstrndup.c: New.
21456 * src/scan-skel.l: Use it.
21457 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
21458 * src/parse-skel.y: Use %directives instead of #defines.
21459
1239777d
AD
214602001-12-30 Akim Demaille <akim@epita.fr>
21461
21462 * src/skeleton.h: New.
21463 * src/output.c (output_parser, output_master_parser): Remove, dead
21464 code.
21465 * src/output.h (get_lines_number, actions_output, guards_output)
21466 (token_definitions_output): Prototype them.
21467 * src/parse-skel.y: Add the license notice.
21468 Include output.h and skeleton.h.
21469 (process_skeleton): Returns void, and takes a single parameter.
21470 * src/scan-skel.l: Add the license notice.
21471 Include skeleton.h.
21472 Don't use %option yylineno: it seems that then Flex imagines
21473 REJECT has been used, and therefore it won't reallocate its
21474 buffers (which makes no other sense to me than a bug). It results
21475 in warnings for `unused: yy_flex_realloc'.
21476
9b3add5b
RA
214772001-12-30 Robert Anisko <robert.anisko@epita.fr>
21478
21479 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21480 (MUSCLE_INSERT_PREFIX): ...to there.
21481 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21482 (MUSCLE_INSERT_PREFIX): Move from here...
21483
21484 * src/bison.hairy: Add a section directive. Put braces around muscle
21485 names. This parser skeleton is still broken, but Bison should not
21486 choke on a bad muscle 'syntax'.
21487 * src/bison.simple: Add a section directive. Put braces around muscle
21488 names.
21489
21490 * src/files.h (strsuffix, stringappend): Add declarations.
21491 (tab_extension): Add declaration.
21492 (short_base_name): Add declaration.
21493
21494 * src/files.c (strsuffix, stringappend): No longer static. These
21495 functions are used in the skeleton parser.
21496 (tab_extension): New.
21497 (compute_base_names): Use the computations done in this function
fab5b110 21498 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
21499 names.
21500 (short_base_name): No longer static.
21501
21502 * src/output.c (output_skeleton): New.
21503 (output): Disable call to output_master_parser, and give a try to
21504 a new skeleton handling system.
21505 (guards_output, actions_output): No longer static.
21506 (token_definitions_output, get_lines_number): No longer static.
21507
21508 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
21509
fab5b110 21510 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
21511 parse-skel.y.
21512
21513 * src/parse-skel.y: New file.
21514 * src/scan-skel.l: New file.
21515
b5b61c61
AD
215162001-12-29 Akim Demaille <akim@epita.fr>
21517
21518 %name-prefix is broken.
21519
21520 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
21521 Adjust all dependencies.
21522 * tests/headers.at (export YYLTYPE): Strengthen this test: use
21523 %name-prefix.
21524
21525 Renaming yylval but not yylloc is not consistent. Now we do.
21526
21527 * src/bison.simple: Prefix yylloc if used.
21528 * doc/bison.texinfo (Decl Summary): Document that.
21529
8c9a50be
AD
215302001-12-29 Akim Demaille <akim@epita.fr>
21531
21532 * doc/bison.texinfo: Promote `%long-directive' over
21533 `%long_directive'.
21534 Remove all references to fixed-output-files, yacc is enough.
21535
d99361e6
AD
215362001-12-29 Akim Demaille <akim@epita.fr>
21537
21538 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
21539 user prologue. These are defaults.
21540 * tests/actions.at (Mid-rule actions): Make sure the user can
21541 define YYDEBUG and YYERROR_VERBOSE.
21542
b9cecb91
AD
215432001-12-29 Akim Demaille <akim@epita.fr>
21544
21545 * src/output.c (header_output): Don't forget to export YYLTYPE and
21546 yylloc.
21547 * tests/headers.at (export YYLTYPE): New, make sure it does.
21548 * tests/regression.at (%union and --defines, Invalid CPP headers):
21549 Move to...
21550 * tests/headers.at: here.
21551
aea13e97
AD
215522001-12-29 Akim Demaille <akim@epita.fr>
21553
21554 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
21555
931394cb
AD
215562001-12-29 Akim Demaille <akim@epita.fr>
21557
21558 * tests/actions.at (Mid-rule actions): Output on a single line
21559 instead of several.
21560
704a47c4
AD
215612001-12-29 Akim Demaille <akim@epita.fr>
21562
21563 * doc/bison.texinfo: Formatting changes.
21564
091e20bb
AD
215652001-12-29 Akim Demaille <akim@epita.fr>
21566
21567 Don't store the token defs in a muscle, just be ready to output it
21568 on command. Now possible via `symbols'. Fixes a memory leak.
21569
21570 * src/output.c (token_definitions_output): New.
21571 (output_parser, header_output): Use it.
21572 * src/reader.c (symbols_save): Remove.
21573
cce71710
AD
215742001-12-29 Akim Demaille <akim@epita.fr>
21575
21576 * src/bison.simple: Do not provide a default for YYSTYPE and
21577 YYLTYPE before the user's prologue. Otherwise it's hardly... a
21578 default.
21579
82c035a8
AD
215802001-12-29 Akim Demaille <akim@epita.fr>
21581
21582 Mid-rule actions are simply... ignored!
21583
21584 * src/reader.c (readgram): Be sure to attach mid-rule actions to
21585 the empty-rule associated to the dummy symbol, not to the host
21586 rule.
21587 * tests/actions.at (Mid-rule actions): New.
21588
8419d367
AD
215892001-12-29 Akim Demaille <akim@epita.fr>
21590
21591 Memory leak.
21592
21593 * src/reader.c (reader): Free grammar.
21594
375d5806
AD
215952001-12-29 Akim Demaille <akim@epita.fr>
21596
21597 Memory leak.
21598
21599 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
21600 since it allocates it for each state, although only one is needed.
21601 (allocate_storage): Do it here.
21602
f51cb8ff
AD
216032001-12-29 Akim Demaille <akim@epita.fr>
21604
21605 * src/options.h, src/options.c (create_long_option_table): Rename
21606 as...
21607 (long_option_table_new): this, with a clearer prototype.
21608 (percent_table): Remove, unused,
21609 * src/getargs.c (getargs): Adjust.
21610
29e88316
AD
216112001-12-29 Akim Demaille <akim@epita.fr>
21612
21613 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21614 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21615 as states.
21616
b9f71f19
AD
216172001-12-29 Akim Demaille <akim@epita.fr>
21618
21619 * src/lalr.c (build_relations): Rename `states' as `states1'.
21620 Sorry, I don't understand exactly what it is, no better name...
21621
1a2b5d37
AD
216222001-12-29 Akim Demaille <akim@epita.fr>
21623
21624 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21625 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21626 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21627 as rules.
21628
1cca533e
AD
216292001-12-29 Akim Demaille <akim@epita.fr>
21630
21631 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21632 ago.
21633
c03ae966
AD
216342001-12-29 Akim Demaille <akim@epita.fr>
21635
21636 * src/reader.c, src/reader.h (user_toknums): Remove.
21637 Adjust all users to use symbols[i]->user_token_number.
21638
5a670b1e
AD
216392001-12-29 Akim Demaille <akim@epita.fr>
21640
21641 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21642 Adjust all users to use symbols[i]->prec or ->assoc.
21643
ad949da9
AD
216442001-12-29 Akim Demaille <akim@epita.fr>
21645
21646 * src/reader.c, src/reader.h (tags): Remove.
21647 Adjust all users to use symbols[i]->tag.
21648
0e78e603
AD
216492001-12-29 Akim Demaille <akim@epita.fr>
21650
21651 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21652 and rule_table.
21653 * src/reader.c (packsymbols): Fill this table.
21654 Drop sprec.
21655 * src/conflicts.c (resolve_sr_conflict): Adjust.
21656 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21657 single table.
21658 Use symbols[i]->tag instead of tags[i].
21659
213e640e
AD
216602001-12-29 Akim Demaille <akim@epita.fr>
21661
21662 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21663 In addition, put a comment in there, to replace...
21664 * tests/regression.at (%union and C comments): Remove.
21665
e7b8bef1
AD
216662001-12-29 Akim Demaille <akim@epita.fr>
21667
21668 * tests/regression.at (Web2c Actions): Blindly move the actual
21669 output as expected output. The contents *seem* right to me, but I
21670 can't pretend reading perfectly parser tables... Nonetheless, all
21671 the other tests pass correctly, the table look OK, even though the
21672 presence of `$axiom' is to be noted: AFAICS it is useless (but
21673 harmless).
21674
b68e7744
AD
216752001-12-29 Akim Demaille <akim@epita.fr>
21676
21677 * src/reader.c (readgram): Don't add the rule 0 if there were no
21678 rules read. In other words, add it _after_ having performed
21679 grammar sanity checks.
21680 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21681
78d5bae9
AD
216822001-12-29 Akim Demaille <akim@epita.fr>
21683
21684 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21685 visible, and some states have now a different number.
21686
ff442794
AD
216872001-12-29 Akim Demaille <akim@epita.fr>
21688
21689 * src/reader.c (readgram): Bind the initial rule's lineno to that
21690 of the first rule.
21691 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21692 (Solved SR Conflicts): Adjust rule 0's line number.
21693
610ab194
AD
216942001-12-29 Akim Demaille <akim@epita.fr>
21695
21696 Fix the `GAWK Grammar' failure.
21697
21698 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21699 the reductions of the first state which was mistakenly confused
21700 with the final state because precisely final_state was initialized
21701 to 0.
21702 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21703 now noticed by Bison.
21704 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21705 have a reduction on $default.
21706
29d29c8f
AD
217072001-12-29 Akim Demaille <akim@epita.fr>
21708
21709 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21710 rule line numbers.
21711 * src/closure.c (print_closure): Likewise.
21712 * src/derives.c (print_derives): Likewise.
21713 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21714 now.
21715
7c6b64d0
AD
217162001-12-29 Akim Demaille <akim@epita.fr>
21717
21718 * src/lalr.c (lookaheads_print): New.
21719 (lalr): Call it when --trace-flag.
21720 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21721 are dumped.
21722
3d4daee3
AD
217232001-12-29 Akim Demaille <akim@epita.fr>
21724
21725 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21726 when walking through ritem, even via rule->rhs.
21727 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21728 (useful_production, useless_nonterminals): Likewise.
21729 (reduce_grammar_tables): Likewise, plus update nritems.
21730 * src/nullable.c (set_nullable): Likewise.
21731 * src/lalr.c (build_relations): Likewise.
21732 * tests/sets.at (Nullable): Adjust.
21733 Fortunately, now, the $axiom is no longer nullable.
21734
9e7f6bbd
AD
217352001-12-29 Akim Demaille <akim@epita.fr>
21736
21737 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21738 the 0-sentinel.
21739 * src/gram.c (ritem_longest_rhs): Likewise.
21740 * src/reduce.c (nonterminals_reduce): Likewise.
21741 * src/print_graph.c (print_graph): Likewise.
21742 * src/output.c (output_rule_data): Likewise.
21743 * src/nullable.c (set_nullable): Likewise.
21744
255ef638
AD
217452001-12-29 Akim Demaille <akim@epita.fr>
21746
21747 * src/output.c: Comment changes.
21748
0d8a7363
AD
217492001-12-27 Paul Eggert <eggert@twinsun.com>
21750
21751 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21752 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21753 Sparc, as they were causing more porting problems than the
21754 (minor) performance improvement was worth.
21755
21756 Also, catch up with 1.31's YYSTD.
21757
3db472b9
AD
217582001-12-27 Akim Demaille <akim@epita.fr>
21759
21760 * src/output.c (output_gram): Rely on nritems, not the
21761 0-sentinel. See below.
21762 Use -1 as separator, not 0.
21763 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21764 Rely on -1 as separator in yyrhs, instead of 0.
21765 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21766 twice `Now at end of input', therefore there are two lines less to
21767 expect.
21768
b365aa05
AD
217692001-12-27 Akim Demaille <akim@epita.fr>
21770
21771 * tests/regression.at (Unresolved SR Conflicts):
21772 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21773 below.
21774
30171f79
AD
217752001-12-27 Akim Demaille <akim@epita.fr>
21776
21777 * src/LR0.c (new_state): Recognize the final state by the fact it
21778 is reached by eoftoken.
21779 (insert_start_shifting_state, insert_eof_shifting_state)
21780 (insert_accepting_state, augment_automaton): Remove, since now
21781 these states are automatically computed from the initial state.
21782 (generate_states): Adjust.
21783 * src/print.c: When reporting a rule number to the user, substract
21784 1, so that the axiom rule is rule 0, and the first user rule is 1.
21785 * src/reduce.c: Likewise.
21786 * src/print_graph.c (print_core): For the time being, just as for
21787 the report, depend upon --trace-flags to dump the full set of
21788 items.
21789 * src/reader.c (readgram): Once the grammar read, insert the rule
21790 0: `$axiom: START-SYMBOL $'.
21791 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21792 number of the states has changed (the final state is no longer
21793 necessarily the last), catch up.
21794
75142d45
AD
217952001-12-27 Akim Demaille <akim@epita.fr>
21796
21797 Try to make the use of the eoftoken valid. Given that its value
21798 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21799 is used instead of > 0 where appropriate, (ii), depend upon nritems
21800 instead of the 0-sentinel.
21801
21802 * src/gram.h, src/gram.c (nritems): New.
21803 Expected to be duplication of nitems, but for the time being...
21804 * src/reader.c (packgram): Assert nritems and nitems are equal.
21805 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21806 * src/closure.c (print_closure, print_fderives): Likewise.
21807 * src/gram.c (ritem_print): Likewise.
21808 * src/print.c (print_core, print_grammar): Likewise.
21809 * src/print_graph.c: Likewise.
21810
b7c49edf
AD
218112001-12-27 Akim Demaille <akim@epita.fr>
21812
21813 * src/main.c (main): If there are complains after grammar
21814 reductions, then output the report anyway if requested, then die.
21815 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21816 * src/reader.c (eoftoken): New.
21817 (parse_token_decl): If the token being defined has value `0', it
21818 is the eoftoken.
21819 (packsymbols): No longer hack `tags' to insert `$' by hand.
21820 Be sure to preserve the value of the eoftoken.
21821 (reader): Make sure eoftoken is defined.
21822 Initialize nsyms to 0: now eoftoken is created just like the others.
21823 * src/print.c (print_grammar): Don't special case the eof token.
21824 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21825 lie anyway, albeit pleasant.
21826 * tests/calc.at: Exercise error messages with eoftoken.
21827 Change the grammar so that empty input is invalid.
21828 Adjust expectations.
21829 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21830
ec2da99f
AD
218312001-12-27 Akim Demaille <akim@epita.fr>
21832
21833 * configure.in: Check the protos of strchr ans strspn.
21834 Replace strchr if needed.
21835 * src/system.h: Provide the protos of strchr, strspn and memchr if
21836 missing.
21837 * lib/strchr.c: New.
21838 * src/reader.c (symbols_save): Use strchr.
21839
8adfa272
AD
218402001-12-27 Akim Demaille <akim@epita.fr>
21841
21842 * src/print.c, src/print_graph.c (escape): New.
21843 Use it to quote the TAGS outputs.
21844 * src/print_graph.c (print_state): Now errors are in red, and
21845 reductions in green.
21846 Prefer high to wide: output the state number on a line of its own.
21847
80dac38c
AD
218482001-12-27 Akim Demaille <akim@epita.fr>
21849
21850 * src/state.h, src/state.c (reductions_new): New.
21851 * src/LR0.c (set_state_table): Let all the states have a
21852 `reductions', even if reduced to 0.
21853 (save_reductions): Adjust.
21854 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21855 * src/print.c (print_reductions, print_actions): Adjust.
21856 * src/output.c (action_row): Adjust.
21857
2cec70b9
AD
218582001-12-27 Akim Demaille <akim@epita.fr>
21859
21860 * src/state.h, src/state.c (errs_new, errs_dup): New.
21861 * src/LR0.c (set_state_table): Let all the states have an errs,
21862 even if reduced to 0.
21863 * src/print.c (print_errs, print_reductions): Adjust.
21864 * src/output.c (output_actions, action_row): Adjust.
21865 * src/conflicts.c (resolve_sr_conflict): Adjust.
21866
13ca549a
AD
218672001-12-27 Akim Demaille <akim@epita.fr>
21868
21869 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21870
5092aba5
AD
218712001-12-27 Akim Demaille <akim@epita.fr>
21872
21873 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21874 * src/print.c: here.
21875 (lookaheadset, shiftset): New, used as additional storage by
21876 print_reductions.
21877 (print_results): Adjust.
21878 (print_shifts, print_gotos, print_errs): New, extracted from...
21879 (print_actions): here.
21880 * src/print_graph.c (print_actions): Remove dead code.
21881
11e2beca
AD
218822001-12-27 Akim Demaille <akim@epita.fr>
21883
21884 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21885 `$n' and `@n'.
21886
dac3c910
AD
218872001-12-27 Akim Demaille <akim@epita.fr>
21888
21889 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21890 (build_relations): Adjust.
21891
d0b0fefa
AD
218922001-12-27 Akim Demaille <akim@epita.fr>
21893
21894 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21895 duplication.
21896
adc8c848
AD
218972001-12-27 Akim Demaille <akim@epita.fr>
21898
21899 * src/reader.c (packgram): Catch nitems overflows.
21900
14d293ac
AD
219012001-12-27 Akim Demaille <akim@epita.fr>
21902
21903 * src/files.c, src/files.h (guard_obstack): Remove.
21904 * src/output.c (output): Adjust.
21905 * src/reader.c (parse_braces): New, factoring...
21906 (copy_action, copy_guard): these two which are renamed as...
21907 (parse_action, parse_guard): these.
21908 As a voluntary consequence, using braces around guards is now
21909 mandatory.
21910
f499b062
AD
219112001-12-27 Akim Demaille <akim@epita.fr>
21912
21913 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21914 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21915 members.
21916 (symbol_list_new): Adjust.
21917 (copy_action): action_line is the first line, not the last.
21918 (copy_guard): Just as for actions, store the `action' only, not
21919 the switch/case/break flesh.
21920 Don't parse the user action that might follow the guard, let...
21921 (readgram): do it, i.e., now, there can be an action after a
21922 guard.
21923 In other words the guard is just explicitly optional.
21924 (packgram): Adjust.
21925 * src/output.c (guards_output): New.
21926 (output_parser): Call it when needed.
21927 (output): Also free the guard and attrs obstacks.
21928 * src/files.c, src/files.h (obstack_save): Remove.
21929 (output_files): Remove.
21930 As a result, if one needs the former `.act' file, using an
21931 appropriate skeleton which requires actions and guards is now
21932 required.
21933 * src/main.c (main): Adjust.
21934 * tests/semantic.at: New.
21935 * tests/regression.at: Use `input.y' as input file name.
21936 Avoid 8+3 problems by requiring input.c when the test needs the
21937 parser.
21938
d945f5cd
AD
219392001-12-27 Akim Demaille <akim@epita.fr>
21940
21941 * src/reader.c (symbol_list_new): Be sure to initialize all the
21942 fields.
21943
d200e455
AD
219442001-12-27 Akim Demaille <akim@epita.fr>
21945
21946 All the hacks using a final pseudo state are now useless.
21947
21948 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21949 * src/lalr.c (nLA): New.
21950 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21951 instead of lookaheadsp from the pseudo state (nstate + 1).
21952
f9507c28
AD
219532001-12-27 Akim Demaille <akim@epita.fr>
21954
21955 * src/output.c (action_row, token_actions): Use a state_t instead
21956 of a integer, and nlookaheads instead of the following state's
21957 lookaheadsp.
21958
065fbd27
AD
219592001-12-27 Akim Demaille <akim@epita.fr>
21960
21961 * src/conflicts.c (log_resolution, flush_shift)
21962 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21963 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21964 (conflicts_print, print_reductions): Use a state_t instead of an
21965 integer when referring to a state.
21966 As much as possible, depend upon nlookaheads, instead of the
21967 `lookaheadsp' member of the following state (since lookaheads of
21968 successive states are successive, the difference between state n + 1
21969 and n served as the number of lookaheads for state n).
21970 * src/lalr.c (add_lookback_edge): Likewise.
21971 * src/print.c (print_core, print_actions, print_state)
21972 (print_results): Likewise.
21973 * src/print_graph.c (print_core, print_actions, print_state)
21974 (print_graph): Likewise.
21975 * src/conflicts.h: Adjust.
21976
1b177bd7
AD
219772001-12-27 Akim Demaille <akim@epita.fr>
21978
21979 * src/bison.hairy: Formatting/comment changes.
21980 ANSIfy.
21981 Remove `register' indications.
21982 Add plenty of `static'.
21983
7742ddeb
AD
219842001-12-27 Akim Demaille <akim@epita.fr>
21985
21986 * src/output.c (prepare): Drop the muscle `ntbase' which
21987 duplicates ntokens.
21988 * src/bison.simple: Formatting/comment changes.
21989 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21990 is an undocumented synonym.
21991
1fa14068
AD
219922001-12-22 Akim Demaille <akim@epita.fr>
21993
21994 * src/output.c (output_table_data): Change the prototype to use
21995 `int' for array ranges: some invocations do pass an int, not a
21996 short.
21997 Reported by Wayne Green.
21998
b9752825
AD
219992001-12-22 Akim Demaille <akim@epita.fr>
22000
22001 Some actions of web2c.y are improperly triggered.
22002 Reported by Mike Castle.
22003
22004 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
22005 * tests/regression.at (Web2c): Rename as...
22006 (Web2c Report): this.
22007 (Web2c Actions): New.
22008
776209d6
AD
220092001-12-22 Akim Demaille <akim@epita.fr>
22010
22011 Reductions in web2c.y are improperly reported.
22012 Reported by Mike Castle.
22013
22014 * src/conflicts.c (print_reductions): Fix.
22015 * tests/regression.at (Web2c): New.
22016
275fc3ad
AD
220172001-12-18 Akim Demaille <akim@epita.fr>
22018
22019 Some host fail on `assert (!"foo")', which expands to
22020 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
22021 Reported by Nelson Beebee.
22022
22023 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
22024 `#define it_succeeded 0' and `assert (it_succeeded)'.
22025
897668ee
MA
220262001-12-17 Marc Autret <autret_m@epita.fr>
22027
22028 * src/bison.simple: Don't hard code the skeleton line and filename.
22029 * src/output.c (output_parser): Rename 'line' as 'output_line'.
22030 New line counter 'skeleton_line' (skeleton-line muscle).
22031
ab3399e0
PE
220322001-12-17 Paul Eggert <eggert@twinsun.com>
22033
22034 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
22035 YYDEBUG must be defined to a nonzero value.
22036
22037 * src/bison.simple (yytname): Do not assume that the user defines
22038 YYDEBUG to a properly parenthesized expression.
22039
3877f72b
AD
220402001-12-17 Akim Demaille <akim@epita.fr>
22041
22042 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
22043 nlookaheads is a new member.
22044 Adjust all users.
22045 * src/lalr.h (nlookaheads): Remove this orphan declaration.
22046 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
22047 state.
776209d6 22048
331dbc1b
AD
220492001-12-17 Akim Demaille <akim@epita.fr>
22050
22051 * src/files.h, src/files.c (open_files, close_files): Remove.
22052 * src/main.c (main): Don't open/close files, nor invoke lex_free,
22053 let...
22054 * src/reader.c (reader): Do it.
776209d6 22055
be750e4c
AD
220562001-12-17 Akim Demaille <akim@epita.fr>
22057
22058 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 22059
709ae8c6
AD
220602001-12-17 Akim Demaille <akim@epita.fr>
22061
22062 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
22063 (flush_reduce): New.
22064 (resolve_sr_conflict): Adjust.
776209d6 22065
f87685c3
AD
220662001-12-17 Akim Demaille <akim@epita.fr>
22067
22068 * src/output.c (output_obstack): Be static and rename as...
22069 (format_obstack): this, to avoid any confusion with files.c's
22070 output_obstack.
22071 * src/reader.h (muscle_obstack): Move to...
22072 * src/output.h: here, since it's defined in output.c.
22073
837491d8
AD
220742001-12-17 Akim Demaille <akim@epita.fr>
22075
22076 * src/output.c (action_row, save_column, default_goto)
22077 (sort_actions, matching_state, pack_vector): Better variable
22078 locality.
22079
796d61fb
AD
220802001-12-17 Akim Demaille <akim@epita.fr>
22081
22082 * src/output.c: Various formatting changes.
776209d6 22083
64d15509
AD
220842001-12-17 Akim Demaille <akim@epita.fr>
22085
22086 * src/files.c (output_files): Free the output_obstack.
22087 * src/main.c (main): Call print and print_graph conditionally.
22088 * src/print.c (print): Work unconditionally.
22089 * src/print_graph.c (print_graph): Work unconditionally.
22090 * src/conflicts.c (log_resolution): Output only if verbose_flag.
22091
fbc8ecb7
MA
220922001-12-16 Marc Autret <autret_m@epita.fr>
22093
22094 * src/output.c (actions_output): Fix. When we use %no-lines,
22095 there is one less line per action.
22096
f0440388
MA
220972001-12-16 Marc Autret <autret_m@epita.fr>
22098
22099 * src/bison.simple: Remove a useless #line directive.
22100 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
22101 * src/output.c (get_lines_number): New.
776209d6 22102 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
22103 output muscles.
22104 Fix line numbering.
22105 (actions_output): Computes the number of lines taken by actions.
22106 (output_master_parser): Insert new skeleton which is the name of
22107 the output parser file name.
22108
a79986b8
MA
221092001-12-15 Marc Autret <autret_m@epita.fr>
22110
22111 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
22112
4ec8e00f
MA
221132001-12-15 Marc Autret <autret_m@epita.fr>
22114
22115 * src/output.c (output_gram): Keep track of the hairy one.
22116
1a4648ff
AD
221172001-12-15 Akim Demaille <akim@epita.fr>
22118
22119 Make `make distcheck' work.
22120
22121 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
22122 system.h which uses libgettext.h.
22123
9c2c67e6
AD
221242001-12-15 Akim Demaille <akim@epita.fr>
22125
22126 * src/nullable.c (set_nullable): Useless rules must be skipped,
22127 otherwise, since we range over their symbols, we might look at a
22128 nonterminal which no longer ``exists'', i.e., it is not counted in
22129 `nvars', hence we overflow our arrays.
22130
93ede233
AD
221312001-12-15 Akim Demaille <akim@epita.fr>
22132
22133 The header can also be produced directly, without any obstack!
22134 Yahoo!
22135
22136 * src/files.c, src/files.h (defines_obstack): Remove.
22137 (compute_header_macro): Global.
22138 (defines_obstack_save): Remove.
22139 * src/reader.c (parse_union_decl): No longer output to
22140 defines_obstack: its content can be found in the `stype' muscle
22141 anyway.
22142 (output_token_translations): Merge into...
22143 (symbols_output): this.
22144 Rename as...
22145 (symbols_save): this.
22146 (reader): Adjust.
22147 * src/output.c (header_output): New.
22148 (output): Call it.
22149
2666f928
AD
221502001-12-15 Akim Demaille <akim@epita.fr>
22151
22152 * src/reader.c (parse_union_decl): Instead of handling two obstack
22153 simultaneously, use one to define the `stype' muscle, and use the
22154 value of the latter to fill defines_obstack.
22155 (copy_comment): Remove.
22156 (copy_comment2): Work for a single obstack.
22157 Rename as...
22158 (copy_comment): this.
22159
428046f8
AD
221602001-12-15 Akim Demaille <akim@epita.fr>
22161
22162 * src/lex.c, src/lex.h (xgetc): No longer static.
22163 * src/reader.c (parse_union_decl): Revamp.
22164
ea52d706
AD
221652001-12-15 Akim Demaille <akim@epita.fr>
22166
22167 Still making progress in separating Bison into (i) input, (ii)
22168 process, (iii) output: now we can directly output the parser file
22169 without using table_obstack at all.
22170
22171 * src/files.c, src/files.h (table_obstack): Bye bye.
22172 (parser_file_name): New.
22173 * src/files.c (compute_output_file_names): Compute it.
22174 * src/output.c (actions_output, output_parser)
22175 (output_master_parser): To a file instead of an obstack.
22176
3f96f4dc
AD
221772001-12-15 Akim Demaille <akim@epita.fr>
22178
22179 Attach actions to rules, instead of pre-outputting them to
22180 actions_obstack.
22181
22182 * src/gram.h (rule_t): action and action_line are new members.
22183 * src/reader.c (symbol_list): Likewise.
22184 (copy_action): Save the actions within the rule.
22185 (packgram): Save them in rule_table.
22186 * src/output.c (actions_output): New.
22187 (output_parser): Use it on `%%actions'.
22188 (output_rule_data): Don't free rule_table.
22189 (output): Do it.
22190 (prepare): Don't save the `action' muscle.
22191 * src/bison.simple: s/%%action/%%actions/.
22192
51576fb3
AD
221932001-12-15 Akim Demaille <akim@epita.fr>
22194
22195 * src/reader.c (copy_action): When --yacc, don't append a `;'
22196 to the user action: let it fail if lacking.
dee049eb 22197 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 22198
2648a72d
AD
221992001-12-14 Akim Demaille <akim@epita.fr>
22200
22201 * src/lex.c (literalchar): Simply return the char you decoded, non
22202 longer mess around with obstacks and int pointers.
22203 Adjust all callers.
22204
92790e5b
AD
222052001-12-14 Akim Demaille <akim@epita.fr>
22206
22207 * src/lex.c (literalchar): Don't escape the special characters,
22208 just decode them, and keep them as char (before, eol was output as
22209 the 2 char string `\n' etc.).
22210 * src/output.c (output_rule_data): Use quotearg to output the
22211 token strings.
22212
927c1557
PE
222132001-12-13 Paul Eggert <eggert@twinsun.com>
22214
22215 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
22216 Do not infringe on the global user namespace when using C++.
22217 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
22218 All uses of `fprintf' and `stderr' changed.
22219
22220 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
22221
ed8e1f68
AD
222222001-12-13 Akim Demaille <akim@epita.fr>
22223
22224 The computation of nullable is broken: it doesn't handle empty
22225 RHS's properly.
22226
22227 * tests/torture.at (GNU AWK Grammar): New.
22228 * tests/sets.at (Nullable): New.
22229 * src/nullable.c (set_nullable): Instead of blindly looping over
22230 `ritems', loop over the rules, and then over their rhs's.
22231
22232 Work around Autotest bugs.
22233
22234 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
22235 frame, because Autotest understand lines starting with a `+' as
22236 traces from the shell. Then, they are not processed properly.
22237 Admittedly an Autotest bug, but we don't have time to wait for
22238 Autotest to catch up.
22239 * tests/regression.at (Broken Closure): Adjust to the new table
22240 frames.
22241 Move to...
22242 * tests/sets.at: here.
22243
cb581495
AD
222442001-12-13 Akim Demaille <akim@epita.fr>
22245
22246 * src/closure.c (closure): Use nrules instead of playing tricks
22247 with BITS_PER_WORD.
22248
2e729273
AD
222492001-12-13 Akim Demaille <akim@epita.fr>
22250
22251 * src/print.c (print_actions): Output the handling of `$' as the
22252 traces do: shifting the token EOF. Before EOF was treated as a
22253 nonterminal.
22254 * tests/regression.at: Adjust some tests.
22255 * src/print_graph.c (print_core): Complete the set of items via
22256 closure. The next-to-final and final states are still unsatisfying,
22257 but that's to be addressed elsewhere.
22258 No longer output the rule numbers, but do output the state number.
22259 A single loop for the shifts + gotos is enough, but picked a
22260 distinct color for each.
22261 (print_graph): Initialize and finalize closure.
22262
107f7dfb
AD
222632001-12-13 Akim Demaille <akim@epita.fr>
22264
22265 * src/reader.c (readgram): Remove dead code, an strip useless
22266 braces.
22267 (get_type): Remove, unused.
22268
9b53a24f
AD
222692001-12-12 Akim Demaille <akim@epita.fr>
22270
22271 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
22272 on that of lib/error.c.
22273
dbfb6dcd
AD
222742001-12-12 Akim Demaille <akim@epita.fr>
22275
22276 Some hosts don't like `/' in includes.
22277
22278 * src/system.h: Include libgettext.h without qualifying the path.
22279 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
22280 $(top_srcdir).
22281
c25fb648
MA
222822001-12-11 Marc Autret <autret_m@epita.fr>
22283
22284 * src/output.c (output_parser): Remove useless muscle.
22285
710ddc4f
MA
222862001-12-11 Marc Autret <autret_m@epita.fr>
22287
22288 * src/bison.simple: Remove #line just before %%epilogue. It
22289 is now handled in ...
22290 * src/reader.c (read_additionnal_code): Add the output of a
22291 #line for the epilogue.
22292
e83d80b8
MA
222932001-12-10 Marc Autret <autret_m@epita.fr>
22294
927c1557 22295 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
22296 replace precedent remove.
22297 * src/bison.simple: Remove #line before %%prologue because
22298 %%input-line is wrong at this time.
22299
971d5158
MA
223002001-12-10 Marc Autret <autret_m@epita.fr>
22301
22302 * src/reader.c (symbols_output): Clean up.
927c1557 22303 * src/output.c (output_gram, output): Clean up.
971d5158 22304
5edafffd
AD
223052001-12-10 Akim Demaille <akim@epita.fr>
22306
22307 * src/lalr.c (initialize_lookaheads): New. Extracted from...
22308 * src/LR0.c (set_state_table): here.
22309 * src/lalr.c (lalr): Call it.
22310
0279f8e9
AD
223112001-12-10 Akim Demaille <akim@epita.fr>
22312
22313 * src/state.h (shifts): Remove the `number' member: shifts are
22314 attached to state, hence no longer need to be labelled with a
22315 state number.
22316
190c4f5f
AD
223172001-12-10 Akim Demaille <akim@epita.fr>
22318
22319 Now that states have a complete set of members, the linked list of
22320 shifts is useless: just fill directly the state's shifts member.
22321
22322 * src/state.h (shifts): Remove the `next' member.
22323 * src/LR0.c (first_state, last_state): Remove.
22324 Adjust the callers.
22325 (augment_automaton): Don't look for the shifts that must be added
22326 a shift on EOF: it is those of the state we looked for! But now,
22327 since shifts are attached, it is no longer needed to looking
22328 merely by its id: its number.
22329
2a73b93d
AD
223302001-12-10 Akim Demaille <akim@epita.fr>
22331
22332 * src/LR0.c (augment_automaton): Better variable locality.
22333 Remove an impossible branch: if there is a state corresponding to
22334 the start symbol being shifted, then there is shift for the start
22335 symbol from the initial state.
22336
74392f6a
AD
223372001-12-10 Akim Demaille <akim@epita.fr>
22338
22339 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
22340 only when appropriate: when insert_start_shifting_state' is not
22341 invoked.
22342 * tests/regression.at (Rule Line Numbers): Adjust.
22343
37c82725
AD
223442001-12-10 Akim Demaille <akim@epita.fr>
22345
22346 * src/LR0.c (augment_automaton): Now that all states have shifts,
22347 merge the two cases addition shifts to the initial state.
22348
6a164e0c
AD
223492001-12-10 Akim Demaille <akim@epita.fr>
22350
22351 * src/lalr.c (set_state_table): Move to...
22352 * src/LR0.c: here.
22353 * src/lalr.c (lalr): Don't call it...
22354 * src/LR0.c (generate_states): do it.
22355 * src/LR0.h (first_state): Remove, only the table is used.
22356
7215de24
AD
223572001-12-10 Akim Demaille <akim@epita.fr>
22358
22359 * src/LR0.h (first_shift, first_reduction): Remove.
22360 * src/lalr.c: Don't use first_shift: find shifts through the
22361 states.
22362
80e25d4d
AD
223632001-12-10 Akim Demaille <akim@epita.fr>
22364
22365 * src/LR0.c: Attach shifts to states as soon as they are
22366 computed.
22367 * src/lalr.c (set_state_table): Instead of assigning shifts to
22368 state, just assert that the mapping was properly done.
22369
0ab3728b
AD
223702001-12-10 Akim Demaille <akim@epita.fr>
22371
22372 * src/LR0.c (insert_start_shift): Rename as...
22373 (insert_start_shifting_state): this.
22374 (insert_eof_shifting_state, insert_accepting_state): New.
22375 (augment_automaton): Adjust.
22376 Better locality of the variables.
22377 When looking if the start_symbol is shifted from the initial
22378 state, using `while (... symbol != start_symbol ...)' sounds
22379 better than `while (... symbol < start_symbol ...)': If fail
22380 to see how the order between symbols could be relevant!
22381
78af9bbc
AD
223822001-12-10 Akim Demaille <akim@epita.fr>
22383
22384 * src/getargs.h: Don't declare `spec_name_prefix' and
22385 `spec_file_prefix', declared by src/files.h.
22386 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
22387 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
22388 * src/output.c (prepare): Adjust.
22389 * src/reader.c (symbols_output): Likewise.
22390 * src/vmsgetargs.c: Vaguely adjust, but who cares?
22391
bdef2a41
AD
223922001-12-10 Akim Demaille <akim@epita.fr>
22393
22394 * src/muscle_tab.c (muscle_init): NULL is a better default than
22395 `"0"'.
22396
3735969c
AD
223972001-12-10 Akim Demaille <akim@epita.fr>
22398
22399 * src/reader.c (reader): Calling symbols_output once is enough.
22400
49701457
AD
224012001-12-10 Akim Demaille <akim@epita.fr>
22402
22403 Now that states have a complete set of members, the linked list of
22404 reductions is useless: just fill directly the state's reductions
22405 member.
22406
22407 * src/state.h (struct reductions): Remove member `number' and
22408 `next'.
22409 * src/LR0.c (first_reduction, last_reduction): Remove.
22410 (save_reductions): Don't link the new reductions, store them in
22411 this_state.
22412 * src/lalr.c (set_state_table): No need to attach reductions to
22413 states, it's already done.
22414 * src/output.c (output_actions): No longer free the shifts, then
22415 the reductions, then the states: free all the states and their
22416 members.
22417
0edad749
AD
224182001-12-10 Akim Demaille <akim@epita.fr>
22419
22420 * src/options.c (OPTN, DRTV, BOTH): New.
22421 (option_table): Use them.
22422
0edad749
AD
22423 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
22424 the job of system.h.
22425 * src/options.c: Don't include stdio.h and xalloc.h for the same
22426 reasons.
22427
5449dd0f
AD
224282001-12-10 Akim Demaille <akim@epita.fr>
22429
22430 * src/output.c (output, prepare): Make sure the values of the
22431 muscles `action' and `prologue' are 0-terminated.
22432
a870c567
AD
224332001-12-10 Akim Demaille <akim@epita.fr>
22434
22435 Clean up GCC warnings.
22436
22437 * src/reader.c (copy_action): `buf' is not used.
22438 (parse_skel_decl): Be static.
22439 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
22440 * src/options.h (create_long_option_table): Have a real prototype.
22441 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
22442 (hash_delete_at): Return const void *.
22443 Adjust casts to preserve the const.
22444
80df8768
AD
224452001-12-10 Akim Demaille <akim@epita.fr>
22446
22447 * configure.in: Require 2.52g.
22448 M4 is not needed, but AUTOM4TE is.
22449 * m4/m4.m4: Remove.
22450 * tests/Makefile.am: Adjust.
22451
f693ad14
AD
224522001-12-10 Akim Demaille <akim@epita.fr>
22453
22454 One structure for states is enough, even though theoretically
22455 there are LR(0) states and LALR(1) states.
22456
22457 * src/lalr.h (state_t): Remove.
22458 (state_table): Be state_t **, not state_t *.
22459 * src/state.h (core, CORE_ALLOC): Rename as...
22460 (state_t, STATE_ALLOC): this.
22461 Add the LALR(1) members: shifts, reductions, errs.
22462 * src/LR0.c (state_table): Rename as...
22463 (state_hash): this, to avoid name clashes with the global
22464 `state_table'.
22465 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
22466 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
22467
74ffbcb6
AD
224682001-12-10 Akim Demaille <akim@epita.fr>
22469
22470 Bison dumps core on bash.y.
22471 Reported by Pascal Bart.
22472
22473 * src/warshall.c (bitmatrix_print): New.
22474 (TC): Use it.
ba0fe3c7 22475 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
22476 j must be the outer loop.
22477 * tests/regression.at (Broken Closure): New.
22478
07708e19
AD
224792001-12-05 Akim Demaille <akim@epita.fr>
22480
22481 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
22482 its argument.
ba1ecc07 22483 Reported by Peter Hamorsky.
07708e19 22484
92b16366
AD
224852001-12-05 Akim Demaille <akim@epita.fr>
22486
22487 * src/conflicts.c (err_table): Remove.
22488 (resolve_sr_conflict): Adjust.
22489 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
22490 Rename as...
22491 (state_t.reductions, state_t.shifts): this.
22492
076ab033
AD
224932001-12-05 Akim Demaille <akim@epita.fr>
22494
22495 * src/reduce.c (reduce_grammar_tables): No longer disable the
22496 removal of useless rules via CPP but via `if (0)', so that the
22497 compiler still check the code is valid.
22498 For instance, it should have noticed `rline' no longer exists: use
22499 the `line' member of rule_t.
22500 * src/gram.c (dummy, rline): Remove, unused.
22501
3843c413
AD
225022001-12-05 Akim Demaille <akim@epita.fr>
22503
22504 * src/output.c (pack_vector): Use assert, not berror.
22505 * src/main.c (berror): Remove, unused.
22506
43168960
AD
225072001-12-05 Akim Demaille <akim@epita.fr>
22508
22509 New experimental feature: if --verbose --trace output all the
22510 items of a state, not only its kernel.
22511
22512 * src/print.c (print_core): If `trace_flag', then invoke closure
22513 before outputting the items of the state (print_core is no longer
22514 a correct name them).
22515 (print_results): Invoke new_closure/free_closure if needed.
22516
b2872512
AD
225172001-12-05 Akim Demaille <akim@epita.fr>
22518
22519 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
22520 * src/closure.c, src/closure.h (itemsetsize): Rename as...
22521 (nitemset): for consistency with the rest of the project.
22522
23cbcc6c
AD
225232001-12-05 Akim Demaille <akim@epita.fr>
22524
22525 * src/closure.c (print_closure): Improve.
22526 (closure): Use it for printing input and output.
22527
03ec521c
AD
225282001-12-05 Akim Demaille <akim@epita.fr>
22529
22530 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
22531 indexed by nonterminals.
22532
3a7456dd
AD
225332001-12-05 Akim Demaille <akim@epita.fr>
22534
22535 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
22536 what it was!).
22537 * src/warshall.h: Remove accidental duplication of the content.
22538
1cbcf2e7
AD
225392001-12-05 Akim Demaille <akim@epita.fr>
22540
22541 * src/closure.c (set_fderives): De-obfuscate.
22542
84182270
AD
225432001-12-05 Akim Demaille <akim@epita.fr>
22544
22545 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
22546
3f6f053c
AD
225472001-12-05 Akim Demaille <akim@epita.fr>
22548
22549 * src/closure.c (set_firsts): De-obfuscate.
22550
7a5350ba
AD
225512001-12-05 Akim Demaille <akim@epita.fr>
22552
22553 * src/output.c (action_row): De-obfuscate
22554 using the good o' techniques: arrays not pointers, variable
22555 locality, BITISSET, RESETBIT etc.
22556
d954473d
AD
225572001-12-05 Akim Demaille <akim@epita.fr>
22558
22559 Pessimize the code to simplify it: from now on, all the states
22560 have a valid SHIFTS, which NSHIFTS is possibly 0.
22561
22562 * src/LR0.c (shifts_new): Be global and move to..
22563 * src/state.c, src/state.h: here.
22564 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
22565 * src/print_graph: Adjust.
22566
9839bbe5
AD
225672001-12-05 Akim Demaille <akim@epita.fr>
22568
22569 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
22570 * src/conflicts.c: Use it.
22571 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
22572 incorrectly ``simplified''.
22573
9f136c07
AD
225742001-12-05 Akim Demaille <akim@epita.fr>
22575
22576 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
22577 using the good o' techniques: arrays not pointers, variable
22578 locality, BITISSET, RESETBIT etc.
22579
b608206e
AD
225802001-12-05 Akim Demaille <akim@epita.fr>
22581
22582 * src/state.h (SHIFT_SYMBOL): New.
22583 * src/conflicts.c: Use it to deobfuscate.
22584
52afa962
AD
225852001-12-05 Akim Demaille <akim@epita.fr>
22586
22587 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
22588 (print_reductions): De-obfuscate using the good o' techniques:
22589 arrays not pointers, variable locality, BITISSET.
22590
e74dc321
AD
225912001-12-05 Akim Demaille <akim@epita.fr>
22592
22593 * src/conflicts.c (print_reductions): Arrays, not pointers.
22594 Use BITISSET.
22595
768fca83
AD
225962001-12-05 Akim Demaille <akim@epita.fr>
22597
22598 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22599
a17e599f
AD
226002001-12-05 Akim Demaille <akim@epita.fr>
22601
22602 * src/conflicts.c (print_reductions): Improve variable locality.
22603
a04bc341
AD
226042001-12-05 Akim Demaille <akim@epita.fr>
22605
22606 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22607
c8ea038e
AD
226082001-12-05 Akim Demaille <akim@epita.fr>
22609
22610 * src/conflicts.c (print_reductions): Improve variable locality.
22611
aa2aab3c
AD
226122001-12-05 Akim Demaille <akim@epita.fr>
22613
22614 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22615 * src/lalr.c: Use them.
22616
b178c8cc
AD
226172001-12-05 Akim Demaille <akim@epita.fr>
22618
22619 * src/LR0.c (augment_automaton): Formatting changes.
22620 Better variable locality.
22621
f67d13aa
AD
226222001-12-05 Akim Demaille <akim@epita.fr>
22623
22624 * src/lalr.c (matrix_print): New.
22625 (transpose): Use it.
22626 Use arrays instead of pointers.
22627
c2713865
AD
226282001-12-05 Akim Demaille <akim@epita.fr>
22629
22630 * src/lalr.c (maxrhs): Move to...
22631 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22632 * src/lalr.c (build_relations): Adjust.
22633
9887c18a
AD
226342001-12-05 Akim Demaille <akim@epita.fr>
22635
22636 * src/lalr.c (transpose): Free the memory allocated to the
22637 argument, as it is replaced by the results by the unique caller.
22638 (build_relations): Merely invoke transpose: it handles the memory
22639 deallocation.
22640 Improve variable locality.
22641 Avoid variables used as mere abbreviations.
22642 (compute_lookaheads): Use arrays instead of pointers.
22643
4d4f699c
AD
226442001-12-05 Akim Demaille <akim@epita.fr>
22645
22646 * src/lalr.c (initialize_F): Improve variable locality.
22647 Avoid variables used as mere abbreviations.
22648
80a69750
AD
226492001-12-05 Akim Demaille <akim@epita.fr>
22650
22651 * src/derives.c (print_derives): Display the ruleno.
22652 * src/lalr.c (initialize_F, transpose): Better variable locality
22653 to improve readability.
22654 Avoid variables used as mere abbreviations.
22655
fe961097
AD
226562001-12-05 Akim Demaille <akim@epita.fr>
22657
22658 * src/lalr.c (traverse): Use arrays instead of pointers.
22659
e3e4e814
AD
226602001-12-05 Akim Demaille <akim@epita.fr>
22661
22662 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22663 the handling of squeue.
22664 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22665
630e182b
AD
226662001-12-05 Akim Demaille <akim@epita.fr>
22667
22668 Because useless nonterminals are now kept alive (instead of being
22669 `destroyed'), we now sometimes examine them, and store information
22670 related to them. Hence we need to know their number, and adjust
22671 memory allocations.
22672
22673 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22674 static.
22675 * src/LR0.c (allocate_itemsets): The memory allocated to
22676 `symbol_count' was used for two different purpose: once to count
22677 the number of occurrences of each symbol, and later reassigned to
22678 `shift_symbol', containing the symbol that can be shifted from a
22679 given state.
22680 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22681 only, and...
22682 (new_itemsets): Allocate `shift_symbol' here.
22683 (allocate_itemsets): symbol_count includes useless nonterminals.
22684 Make room for them.
22685 (free_storage): Use `free', not `XFREE', for pointers that cannot
22686 be null.
22687
81b51460
AD
226882001-12-05 Akim Demaille <akim@epita.fr>
22689
22690 * src/nullable.c (set_nullable): Deobfuscate the handling of
22691 ritem.
22692 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22693
3067fbef
AD
226942001-12-05 Akim Demaille <akim@epita.fr>
22695
22696 * src/gram.c, src/gram.h (ritem_print): New.
22697 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22698 (This useless function was defined only to work around VMS linkers
22699 that can't handle compilation units with variables only).
22700 * src/reduce.c (dump_grammar): Use it to trace the construction of
22701 ritem.
22702
c2bea5f9
PE
227032001-12-04 Paul Eggert <eggert@twinsun.com>
22704
7d27c823
PE
22705 * src/bison.simple (union yyalloc): Change member names
22706 to be the same as the stack names.
22707 (yyparse): yyptr is now union yyalloc *, not char *.
22708 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22709 and may generate better code on some machines.
c2bea5f9
PE
22710 (yystpcpy): Use prototype if __STDC__ is defined, not just
22711 if __cplusplus is defined.
35687a9d 22712
2c8a9dfa
AD
227132001-11-30 Akim Demaille <akim@epita.fr>
22714
22715 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22716 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22717 Gettext doesn't compile cleanly, and dies with -Werror.
22718 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22719 Include WARNING_CFLAGS here.
22720 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22721 before being defined.
22722
f4e421e6
AD
227232001-11-27 Paul Eggert <eggert@twinsun.com>
22724
22725 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22726 First arg is int, not unsigned.
22727 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22728 (SIZE_MAX, UINT_MAX): New macros.
22729 (quotearg_n_options): Abort if N is negative.
22730 Avoid overflow check on hosts where size_t is 64 bits and int
22731 is 32 bits, as overflow is impossible there.
22732 Fix off-by-one typo that caused unnecessary reallocation.
22733
7093d0f5
AD
227342001-11-29 Paul Eggert <eggert@twinsun.com>
22735
22736 Name space cleanup in generated parser.
22737
22738 * doc/bison.texinfo (Bison Parser): Discuss system headers
22739 and their effect on the user name space.
22740
22741 * src/bison.simple:
22742 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22743 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22744 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22745
22746 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22747 on user names when possible.
22748
22749 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22750 Simplify test for whather <alloca.h> exists.
22751
22752 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22753
22754 (<stdio.h>): Include if YYDEBUG.
22755
22756 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22757 ! defined (yyoverflow) && ! defined (yymemcpy).
22758
22759 (yymemcpy, yyparse): Rename local variables as needed so that
22760 they all begin with 'yy'.
22761
22762 (yystrlen, yystpcpy): New functions.
22763
22764 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22765 All uses changed.
22766
22767 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22768 instead of relying on string.h functions. Use YYSTACK_ALLOC
22769 and YYSTACK_FREE instead of malloc and free.
22770
fd51e5ff
AD
227712001-11-30 Akim Demaille <akim@epita.fr>
22772
22773 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22774 before their first uses.
22775 (YYBISON, YYPURE): Move to the top of the output.
22776
7d13ff5f
AD
227772001-11-30 Akim Demaille <akim@epita.fr>
22778
22779 * tests/reduce.at (Useless Nonterminals): Fix.
22780
892a3995
AD
227812001-11-30 Akim Demaille <akim@epita.fr>
22782
22783 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22784 if body instead of `;' to pacify GCC's warnings.
22785
68f1e3ed
AD
227862001-11-30 Akim Demaille <akim@epita.fr>
22787
22788 Instead of mapping the LHS of unused rules to -1, keep the LHS
22789 valid, but flag the rules as invalid.
22790
22791 * src/gram.h (rule_t): `useful' is a new member.
22792 * src/print.c (print_grammar): Adjust.
22793 * src/derives.c (set_derives): Likewise.
22794 * src/reader.c (packgram, reduce_output): Likewise.
22795 * src/reduce.c (reduce_grammar_tables): Likewise.
22796 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22797
d2d1b42b
AD
227982001-11-30 Akim Demaille <akim@epita.fr>
22799
22800 * src/reduce.c (reduce_output): Formatting changes.
22801 * src/print.c (print_results, print_grammar): Likewise.
22802 * tests/regression.at (Rule Line Numbers)
22803 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22804
760b53a8
AD
228052001-11-30 Akim Demaille <akim@epita.fr>
22806
22807 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22808 useless nonterminals, move them at the end of the symbol arrays.
22809 (reduce_output): Adjust.
22810 * tests/reduce.at (Useless Nonterminals): Adjust.
22811
00238958
AD
228122001-11-30 Akim Demaille <akim@epita.fr>
22813
22814 * src/reduce.c: Various comment/formatting changes.
22815 (nonterminals_reduce): New, extracted from...
22816 (reduce_grammar_tables): here.
22817 (reduce_grammar): Call nonterminals_reduce.
22818
396452de
PE
228192001-11-29 Paul Eggert <eggert@twinsun.com>
22820
22821 * src/bison.simple (YYSTACK_REALLOC): Remove.
22822 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22823 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22824 New macros.
22825 (union yyalloc): New type.
22826 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22827 an arbitrary restriction on hosts where size_t is wider than int.
22828
22829 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22830 a parser stack overflow. Allocate just one block of memory for all
22831 three stacks, instead of allocating three blocks; this typically is
22832 faster and reduces fragmentation.
22833
22834 Do not limit the number of items in the stack to a value that fits
22835 in 'int', as this is an arbitrary limit on hosts with 64-bit
22836 size_t and 32-bit int.
22837
147e184c
MA
228382001-11-29 Marc Autret <autret_m@epita.fr>
22839
22840 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22841 of defining YYERROR_VERBOSE.
22842 [AT_DATA]: $4 is now out of C declarations in the prologue.
22843
426cf563
MA
228442001-11-28 Marc Autret <autret_m@epita.fr>
22845
22846 * src/reader.c (parse_dquoted_param): New.
22847 (parse_skel_decl): Use it.
22848 * src/lex.h: Add its prototype.
22849 * src/lex.c (literalchar): Become not static.
22850
c7925b99
MA
228512001-11-28 Marc Autret <autret_m@epita.fr>
22852
22853 * src/output.h: And put its extern declaration here.
22854 * src/output.c (error_verbose): Define here.
22855 (prepare): Echo name modification.
22856 * src/getargs.h: Clean its extern declaration.
22857 * src/getargs.c (error_verbose_flag): Remove.
22858 (getargs): Remove case 'e'.
22859 * src/options.c (option_table): 'error-verbose' is now seen as simple
22860 percent option.
22861 Include output.h.
22862
22863 * src/reader.c (read_declarations): Remove case tok_include.
22864 (parse_include_decl): Remove.
22865 * src/lex.h (token_t): Remove tok_include.
22866 * src/options.c (option_table): 'include' is now a simple command line
22867 option.
22868
5b5d1929
MA
228692001-11-28 Marc Autret <autret_m@epita.fr>
22870
22871 * src/bison.simple: Adjust muscle names.
22872 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22873 * src/output.c (prepare): s/_/-/ for the muscles names.
22874 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22875
8850be4b
MA
228762001-11-28 Marc Autret <autret_m@epita.fr>
22877
22878 * src/bison.simple: Fix debug.
22879 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22880
4a38e613
AD
228812001-11-28 Akim Demaille <akim@epita.fr>
22882
22883 * src/LR0.c (shifts_new): New.
22884 (save_shifts, insert_start_shift, augment_automaton): Use it.
22885
4b35e1c1
AD
228862001-11-28 Akim Demaille <akim@epita.fr>
22887
22888 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22889 keep ruleno only.
22890
d2b04478
AD
228912001-11-28 Akim Demaille <akim@epita.fr>
22892
22893 * src/closure.c (closure): Instead of looping over word in array
22894 then bits in words, loop over bits in array.
22895
2c4c30aa
AD
228962001-11-28 Akim Demaille <akim@epita.fr>
22897
22898 * src/closure.c (closure): No longer optimize the special case
22899 where all the bits of `ruleset[r]' are set to 0, to make the code
22900 clearer.
22901
576890b7
AD
229022001-11-28 Akim Demaille <akim@epita.fr>
22903
22904 * src/closure.c (closure): `r' and `c' are new variables, used to
22905 de-obfuscate accesses to RULESET and CORE.
22906
cb487d7d
AD
229072001-11-28 Akim Demaille <akim@epita.fr>
22908
22909 * src/reduce.c (reduce_print): Use ngettext.
22910 (dump_grammar): Improve the trace accuracy.
22911
6013d43f
AD
229122001-11-28 Akim Demaille <akim@epita.fr>
22913
22914 * src/reduce.c (dump_grammar): Don't translate trace messages.
22915
cb4956ee
AD
229162001-11-28 Akim Demaille <akim@epita.fr>
22917
22918 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22919 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22920 as all tags are free'ed afterwards.
22921 From Enrico Scholz.
22922
648185ab
PE
229232001-11-27 Paul Eggert <eggert@twinsun.com>
22924
22925 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22926 use alloca when we didn't want to, and vice versa.
22927
68254a03
MA
229282001-11-27 Marc Autret <autret_m@epita.fr>
22929
9113b58f
AD
22930 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22931 initialization.
68254a03
MA
22932 * src/output.c (prepare): Remove its update.
22933
04d843a2
MA
229342001-11-27 Marc Autret <autret_m@epita.fr>
22935
22936 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22937 Use %error-verbose.
22938
d2079671 229392001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
22940
22941 * src/bison.simple: Remove YYERROR_VERBOSE using.
22942 Use %%error_verbose.
22943 (yyparse): Likewise.
22944 * src/output.c (prepare): Give its final value.
22945 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22946 * src/getargs.h: Add its extern declaration.
22947 * src/getargs.c (error_verbose_flag): New int.
22948 (getargs): Update to catch new case.
22949 * src/options.c (option_table): 'error-verbose' is a new option.
22950 (shortopts): Update.
22951
e0327bc8
AD
229522001-11-27 Akim Demaille <akim@epita.fr>
22953
22954 * src/system.h: Use intl/libgettext.h.
22955 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22956
000f1a3c
AD
229572001-11-27 Akim Demaille <akim@epita.fr>
22958
22959 * tests/torture.at (Exploding the Stack Size with Malloc):
22960 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22961
26cfe0be
AD
229622001-11-27 Akim Demaille <akim@epita.fr>
22963
22964 * src/files.c: Include error.h.
22965 Reported by Hans Aberg.
22966
f6bd5427
MA
229672001-11-26 Marc Autret <autret_m@epita.fr>
22968
d2079671 22969 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
22970 (read_declarations): Add case tok_include.
22971 * src/getargs.h (include): Add its extern definition.
22972 * src/getargs.c (include): New const char *.
22973 (getargs): Add case '-I'.
22974 * src/options.c (option_table): Add include as command line and
22975 percent option.
22976 * src/lex.h (token_t): Add tok_include.
22977
2ca209c1
AD
229782001-11-26 Akim Demaille <akim@epita.fr>
22979
22980 * src/reader.c (readgram): Make sure rules for mid-rule actions
22981 have a lineno equal to that of their host rule.
22982 Reported by Hans Aberg.
22983 * tests/regression.at (Rule Line Numbers): New.
22984
0e41b407
AD
229852001-11-26 Akim Demaille <akim@epita.fr>
22986
22987 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22988 size_ts.
22989
229902001-11-26 Akim Demaille <akim@epita.fr>
22991
22992 * src/complain.c, src/complain.h (error): Remove, provided by
22993 lib/error.[ch].
22994
e0c40012
AD
229952001-11-26 Akim Demaille <akim@epita.fr>
22996
22997 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22998 issue an error message.
22999 * tests/regression.at (Invalid %directive): New.
23000 Reported by Hans Aberg.
23001
5e147124
AD
230022001-11-26 Akim Demaille <akim@epita.fr>
23003
23004 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
23005 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
23006
a034c8b8
AD
230072001-11-26 Akim Demaille <akim@epita.fr>
23008
23009 * src/conflicts.c (conflicts_print): Don't complain at all when
23010 there are no reduce/reduce conflicts, and as many shift/reduce
23011 conflicts as expected.
23012 * tests/regression.at (%expect right): Adjust.
23013
c64a20f3
AD
230142001-11-23 Akim Demaille <akim@epita.fr>
23015
23016 * lib/alloca.c: Update, from fileutils.
23017
5b0d29bb
AD
230182001-11-23 Akim Demaille <akim@epita.fr>
23019
23020 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
23021
722c4bfe
AD
230222001-11-23 Akim Demaille <akim@epita.fr>
23023
23024 * src/system.h: Include alloca.h.
23025 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
23026
6255b435
AD
230272001-11-23 Akim Demaille <akim@epita.fr>
23028
23029 * src/print_graph.c (print_actions): Remove `rule', unused.
23030 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
23031 pacify GCC's signed < unsigned warnings.
23032 * src/closure.c (itemsetsize): Likewise.
23033 * src/reader.c (symbol_list_new): Static.
23034
b29b2ed5
AD
230352001-11-23 Akim Demaille <akim@epita.fr>
23036
23037 Attaching lineno to buckets is stupid, since only one copy of each
23038 symbol is kept, only the line of the first occurrence is kept too.
23039
23040 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
23041 * src/reader.c (rline_allocated): Remove, unused.
23042 (symbol_list): Have a `line' member.
23043 (symbol_list_new): New.
23044 (readgram): Use it.
23045 * src/print.c (print_grammar): Output the rule line numbers.
23046 * tests/regression.at (Solved SR Conflicts)
23047 (Unresolved SR Conflicts): Adjust.
23048 Reported by Hans Aberg.
23049
a81b1d4a
MA
230502001-11-22 Marc Autret <autret_m@epita.fr>
23051
23052 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
23053
c1ecb3c1
MA
230542001-11-22 Marc Autret <autret_m@epita.fr>
23055
23056 * src/muscle_tab.c (muscle_init): Remove initialization of
23057 skeleton muscle.
23058 * src/output.c (output_master_parser): Do it here.
23059
fbe01355
AD
230602001-11-20 Akim Demaille <akim@epita.fr>
23061
23062 * po/sv.po: New.
23063 * configure.in (ALL_LINGUAS): Adjust.
23064 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
23065 longer contains strings to translate.
23066
81e895c0
AD
230672001-11-19 Akim Demaille <akim@epita.fr>
23068
23069 * src/conflicts.c (conflicts_print): Add a missing \n.
23070
6bb1878b
AD
230712001-11-19 Akim Demaille <akim@epita.fr>
23072
23073 * src/nullable.c (nullable_print): New.
23074 (set_nullable): Call it when tracing.
23075 Better locality of variables.
23076
d9ec2d07
AD
230772001-11-19 Akim Demaille <akim@epita.fr>
23078
23079 * src/print.c (print_actions): Better locality of variables.
23080
720e5c1b
AD
230812001-11-19 Akim Demaille <akim@epita.fr>
23082
23083 * src/derives.c (print_derives): Fix and enrich.
23084 * src/closure.c (print_fderives): Likewise.
23085
fb908786
AD
230862001-11-19 Akim Demaille <akim@epita.fr>
23087
23088 * src/closure.c (itemsetend): Remove, replaced with...
23089 (itemsetsize): new.
23090
125ecb56
AD
230912001-11-19 Akim Demaille <akim@epita.fr>
23092
23093 * src/LR0.c (kernel_end): Remove, replaced with...
23094 (kernel_size): new.
23095
d8cf039f
AD
230962001-11-19 Akim Demaille <akim@epita.fr>
23097
23098 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
23099 to clarify.
23100
7bec0760
AD
231012001-11-19 Akim Demaille <akim@epita.fr>
23102
23103 * src/closure.c (closure): Use arrays instead of pointers to clarify.
23104
c87d4863
AD
231052001-11-19 Akim Demaille <akim@epita.fr>
23106
23107 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
23108 trace messages.
23109 * src/LR0.c: Likewise.
23110 (allocate_itemsets): Use arrays instead of pointers to clarify.
23111
9bfe901c
AD
231122001-11-19 Akim Demaille <akim@epita.fr>
23113
23114 * src/getargs.c (statistics_flag): Replace with...
23115 (trace_flag): New.
23116 (longopts): Accept --trace instead of --statistics.
23117 * src/getargs.h, src/options.c: Adjust.
23118 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
23119 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
23120
97db7bd4
AD
231212001-11-19 Akim Demaille <akim@epita.fr>
23122
cc72668c 23123 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
23124 pointers to clarify the code.
23125 (save_reductions, save_shifts): Factor common parts of alternatives.
23126
2c5f66ed
AD
231272001-11-19 Akim Demaille <akim@epita.fr>
23128
23129 * src/LR0.c (new_state, get_state): Complete TRACE code.
23130 * src/closure.c: Include `reader.h' to get `tags', needed by the
23131 trace code.
23132 Rename the conditional DEBUG as TRACE.
23133 Output consistently TRACEs to stderr, not stdout.
23134 * src/derives.c: Likewise.
23135 * src/reduce.c: (inaccessable_symbols): Using if is better style
23136 than goto.
23137 Use `#if TRACE' instead of `#if 0' for tracing code.
23138
300f275f
AD
231392001-11-19 Akim Demaille <akim@epita.fr>
23140
23141 * src/system.h (LIST_FREE, shortcpy): New.
23142 * src/LR0.c: Use them.
23143 * src/output.c (free_itemsets, free_reductions, free_shifts):
23144 Remove, replaced by LIST_FREE.
23145
f59c437a
AD
231462001-11-19 Akim Demaille <akim@epita.fr>
23147
23148 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
23149 (REDUCTIONS_ALLOC): New.
23150 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
23151 allocation.
23152
6986fd9e
AD
231532001-11-19 Akim Demaille <akim@epita.fr>
23154
23155 * src/LR0.c (new_state): Complete trace code.
23156 * src/nullable.c (set_nullable): Don't translate traces.
23157
4bc30f78
AD
231582001-11-19 Akim Demaille <akim@epita.fr>
23159
23160 * src/print_graph.c (print_core): Better locality of variables.
23161 * src/print.c (print_core): Likewise.
23162
08a946e0
AD
231632001-11-19 Akim Demaille <akim@epita.fr>
23164
23165 * src/vcg.c: You do the output, so you are responsible of the
23166 handling of VCG syntax, in particular: use quotearg.
23167 * src/print_graph.c: Don't.
23168 (print_actions): Don't output the actions as part of the nodes,
23169 since that's the job of the edges.
23170 (print_state): Don't output by hand: fill the node description,
9bfe901c 23171 and ask for its output.
08a946e0 23172
f0473484
AD
231732001-11-19 Akim Demaille <akim@epita.fr>
23174
cc72668c
AD
23175 * src/bison.simple (yyparse): When verbosely reporting an error,
23176 no longer put additional quotes around token names.
f0473484
AD
23177 * tests/calc.at: Adjust.
23178
e41dc700
AD
231792001-11-19 Akim Demaille <akim@epita.fr>
23180
23181 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
23182 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
23183 * src/output.c: Adjust.
23184
652a871c
AD
231852001-11-19 Akim Demaille <akim@epita.fr>
23186
23187 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
23188 (rule_t): this.
23189 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
23190
b2ed6e58
AD
231912001-11-19 Akim Demaille <akim@epita.fr>
23192
23193 * src/gram.h (rule_t): New.
23194 (rule_table): New.
23195 (rrhs, rlhs): Remove, part of state_t.
23196 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
23197 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
23198 * src/reader.c, src/reduce.c: Adjust.
23199
edad7067
AD
232002001-11-19 Akim Demaille <akim@epita.fr>
23201
23202 * src/reader.c (symbols_output): New, extracted from...
23203 (packsymbols): Here.
23204 (reader): Call it.
23205
3feec034
AD
232062001-11-19 Akim Demaille <akim@epita.fr>
23207
23208 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
23209 (maxrhs): this new function.
23210
ddcd5fdf
AD
232112001-11-19 Akim Demaille <akim@epita.fr>
23212
cc72668c 23213 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
23214 Adjust.
23215
bb527fc2
AD
232162001-11-19 Akim Demaille <akim@epita.fr>
23217
cc72668c 23218 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
23219 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23220 * src/lalr.c: Adjust.
23221
a845a697
AD
232222001-11-19 Akim Demaille <akim@epita.fr>
23223
23224 * src/lalr.c (initialize_LA): Only initialize LA. Let...
23225 (set_state_table): handle the `lookaheads' members.
23226
f004bf6a
AD
232272001-11-19 Akim Demaille <akim@epita.fr>
23228
cc72668c
AD
23229 * src/lalr.h (lookaheads): Removed array, whose contents is now
23230 a member of...
f004bf6a
AD
23231 (state_t): this structure.
23232 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23233 Adjust.
23234
de326cc0
AD
232352001-11-19 Akim Demaille <akim@epita.fr>
23236
cc72668c
AD
23237 * src/lalr.h (consistent): Removed array, whose contents is now
23238 a member of...
de326cc0
AD
23239 (state_t): this structure.
23240 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23241 Adjust.
23242
90b4416b
AD
232432001-11-19 Akim Demaille <akim@epita.fr>
23244
cc72668c
AD
23245 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
23246 contents are now members of...
90b4416b
AD
23247 (state_t): this structure.
23248 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23249 Adjust.
23250
9703cc49
AD
232512001-11-19 Akim Demaille <akim@epita.fr>
23252
23253 * src/lalr.h (state_t): New.
23254 (state_table): Be a state_t * instead of a core **.
23255 (accessing_symbol): Remove, part of state_t.
23256 * src/lalr.c: Adjust.
23257 (set_accessing_symbol): Merge into...
23258 (set_state_table): this.
23259 * src/print_graph.c, src/conflicts.c: Adjust.
23260
d803322e
AD
232612001-11-14 Akim Demaille <akim@epita.fr>
23262
23263 * tests/calc.at, tests/output.at, tests/regression.at,
23264 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
23265 now the tests are run in private dirs, therefore AC_CLEANUP and
23266 family can be simplified to 0-ary.
23267 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
23268 use abs. path to find config.h.
23269 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
23270 stderr, there can be way too much random noise.
23271 Instead pass -Werror to GCC and rely on the exit status.
23272 Reported by Wolfram Wagner.
23273
3d76b07d
AD
232742001-11-14 Akim Demaille <akim@epita.fr>
23275
23276 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
23277 defined only if yyoverflow is defined, to avoid `warning: unused
23278 variable `yyvs1''.
23279 Reported by The Test Suite.
23280
09b503c8
AD
232812001-11-14 Akim Demaille <akim@epita.fr>
23282
23283 * src/print.c: Include reduce.h.
23284 Reported by Hans Aberg.
23285
232862001-11-14 Akim Demaille <akim@epita.fr>
23287
23288 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
23289 Revert a previous patch: these are really const.
23290 * src/conflicts.c (conflict_report): Additional useless pair of
23291 braces to pacify GCC's warnings for `if () if () {} else {}'.
23292 * src/lex.c (parse_percent_token): Replace equal_offset with
23293 arg_offset.
23294 arg is const.
23295 Be sure to strdup `arg' when used, since there is no reason for
23296 token_buffer not to change.
23297
0f37a994
AD
232982001-11-14 Akim Demaille <akim@epita.fr>
23299
23300 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
23301 definition.
23302 * src/main.c (main): Use them.
23303 Suggested by Hans Aberg.
23304
d39d93b8
AD
233052001-11-12 Akim Demaille <akim@epita.fr>
23306
23307 * src/system.h (ngettext): Now that we use ngettext, be sure to
23308 provide a default definition when NLS are not used.
23309
9edcd895
AD
233102001-11-12 Akim Demaille <akim@epita.fr>
23311
23312 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
23313 Use @kbd to denote user input.
23314 (Language and Grammar): ANSIfy the example.
23315 Adjust its layout for info/notinfo.
23316 (Location Tracking Calc): Output error messages to stderr.
23317 Output locations in a more GNUtically correct way.
23318 Fix a couple of Englishos.
23319 Adjust @group/@end group pairs.
23320
7da99ede
AD
233212001-11-12 Akim Demaille <akim@epita.fr>
23322
e3aa65c5 23323 %expect was not functioning at all.
7da99ede
AD
23324
23325 * src/conflicts.c (expected_conflicts): Set to -1.
23326 (conflict_report): Use ngettext.
23327 (conflicts_print): Check %expect and make its violation an error.
23328 * doc/bison.texinfo (Expect Decl): Adjust.
23329 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
23330 * tests/regression.at (%expect not enough, %expect right)
23331 (%expect too much): New.
23332
ba9dda1a
AD
233332001-11-12 Akim Demaille <akim@epita.fr>
23334
23335 * tests/regression.at (Conflicts): Rename as...
23336 (Unresolved SR Conflicts): this.
23337 (Solved SR Conflicts): New.
23338
337c5bd1
AD
233392001-11-12 Akim Demaille <akim@epita.fr>
23340
23341 * src/reduce.c (print_results): Rename as...
23342 (reduce_output): This.
23343 Output to OUT, passed as argument, instead of output_obstack.
23344 (dump_grammar): Likewise.
23345 (reduce_free): New.
23346 Also free V1.
23347 (reduce_grammar): No longer call reduce_output, since...
23348 * src/print.c (print_results): do it.
23349 * src/main.c (main): Call reduce_free;
23350
c73a41af
AD
233512001-11-12 Akim Demaille <akim@epita.fr>
23352
23353 * src/conflicts.c (print_reductions): Accept OUT as argument.
23354 Output to it, not to output_obstack.
23355 * src/print.c (print_actions): Adjust.
23356
0df87bb6
AD
233572001-11-12 Akim Demaille <akim@epita.fr>
23358
23359 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
23360 the result instead of using...
23361 (src_total, rrc_total, src_count, rrc_count): Remove.
23362 (any_conflicts): Remove.
23363 (print_conflicts): Split into...
23364 (conflicts_print, conflicts_output): New.
23365 * src/conflicts.h: Adjust.
23366 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 23367 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
23368 * tests/regression.at (Conflicts): New.
23369 Reported by Tom Lane.
23370
e4d3d4de
AD
233712001-11-12 Akim Demaille <akim@epita.fr>
23372
23373 * tests/regression.at (Invalid input): Remove, duplicate with
23374 ``Invalid input: 1''.
23375
6d7d248e
AD
233762001-11-12 Akim Demaille <akim@epita.fr>
23377
23378 * tests/torture.at (AT_DATA_STACK_TORTURE)
23379 (Exploding the Stack Size with Alloca)
23380 (Exploding the Stack Size with Malloc): New.
23381
e9e4c321
AD
233822001-11-12 Akim Demaille <akim@epita.fr>
23383
23384 * src/bison.simple (YYSTACK_REALLOC): New.
23385 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 23386 Reported by Per Allansson.
e9e4c321 23387
5f7e0832
AD
233882001-11-12 Pascal Bart <pascal.bart@epita.fr>
23389
23390 * src/bison.simple: Define type yystype instead of YYSTYPE, and
23391 define CPP macro, which substitute YYSTYPE by yystype.
23392 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
23393 with yyltype/YYLTYPE. This allows inclusion of the generated
23394 header within the parser if the compiler, such as GGC, accepts
23395 multiple equivalent #defines.
23396 From Akim.
23397
e3f1699f
AD
233982001-11-05 Akim Demaille <akim@epita.fr>
23399
23400 * src/reader.c (symbols_output): New, extracted from...
23401 (packsymbols): here.
23402 (reader): Adjust.
23403
65be0866
AD
234042001-11-05 Akim Demaille <akim@epita.fr>
23405
23406 * src/lex.c (parse_percent_token): s/quotearg/quote/.
23407
e4d910bf
AD
234082001-11-05 Akim Demaille <akim@epita.fr>
23409
23410 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
23411 pattern.
23412
951366c1
AD
234132001-11-05 Akim Demaille <akim@epita.fr>
23414
23415 * src/options.h (struct option_table_struct): set_flags is void*.
23416 * src/options.c (longopts): Support `--output' and `%output'.
23417 (usage): Adjust.
23418 * src/lex.h (tok_setopt): Remove, replaced with...
23419 (tok_intopt, tok_stropt): these new guys.
23420 * src/lex.c (getopt.h): Not needed.
23421 (token_buffer, unlexed_token_buffer): Not const.
23422 (percent_table): Promote `-' over `_' in directive names.
23423 Active `%name-prefix', `file-prefix', and `output'.
23424 (parse_percent_token): Accept possible arguments to directives.
23425 Promote `-' over `_' in directive names.
23426
d8988b2f
AD
234272001-11-04 Akim Demaille <akim@epita.fr>
23428
23429 * doc/bison.texinfo (Decl Summary): Split the list into
23430 `directives for grammars' and `directives for bison'.
23431 Sort'em.
23432 Add description of `%name-prefix', `file-prefix', and `output'.
23433 Promote `-' over `_' in directive names.
23434 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
23435 Simplify the description of `--name-prefix'.
23436 Promote `-' over `_' in directive names.
23437 Promote `--output' over `--output-file'.
23438 Fix the description of `--defines'.
23439 * tests/output.at: Exercise %file-prefix and %output.
23440
6468d18e
AD
234412001-11-02 Akim Demaille <akim@epita.fr>
23442
23443 * doc/refcard.tex: Update.
23444
6b7e85b9
AD
234452001-11-02 Akim Demaille <akim@epita.fr>
23446
23447 * src/symtab.h (SUNDEF): New.
23448 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
23449 stand for `uninitialized', instead of 0.
23450 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
23451 * src/lex.c (lex): Adjust.
23452
23453 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
23454 Number it 0.
23455 Let yylex return it instead of a plain 0.
23456 Reported by Dick Streefland.
23457
cd5aafcf
AD
234582001-11-02 Akim Demaille <akim@epita.fr>
23459
23460 * tests/regression.at (Mixing %token styles): New test.
23461
037ca2f1
AD
234622001-11-02 Akim Demaille <akim@epita.fr>
23463
23464 * src/reader.c (parse_thong_decl): Formatting changes.
23465 (token_translations_init): New, extracted from...
23466 (packsymbols): Here.
23467 Adjust.
23468
270a173c
AD
234692001-11-01 Akim Demaille <akim@epita.fr>
23470
23471 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
23472 Check that `9foo.y' produces correct cpp guards.
23473 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
23474 guards.
23475 Reported by Wwp.
23476
561f9a30
AD
234772001-11-01 Akim Demaille <akim@epita.fr>
23478
23479 * tests/regression.at (Invalid input: 2): New.
23480 * src/lex.c (unlexed_token_buffer): New.
23481 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
23482 too.
23483 Reported by Wwp.
23484
f987e9d2
AD
234852001-11-01 Akim Demaille <akim@epita.fr>
23486
23487 * tests/calc.at: Catch up with 1.30.
23488 * configure.in: Bump to 1.49a.
23489 Adjust to newer Autotest.
23490
0846f581
PB
234912001-10-19 Pascal Bart <pascal.bart@epita.fr>
23492
23493 * src/conflicts.c: Move global variables rrc_total and src_total ...
23494 (print_conflicts): here.
23495 * src/output.c (output): Free global variable user_toknums.
23496 * src/lex.c (token_obstack): Become static.
23497
3c1a79b3
AD
234982001-10-18 Akim Demaille <akim@epita.fr>
23499
23500 * tests/atlocal.in (GCC): Add.
23501 * tests/calc.at: s/m4_match/m4_bmatch/.
23502 s/m4_patsubst/m4_bpatsubst/.
23503 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
23504 * configure.in: AC_SUBST(GCC).
23505
5d52e7d0
MA
235062001-10-14 Marc Autret <autret_m@epita.fr>
23507
23508 * src/options.c (create_long_option_table): Fix.
23509
631aa1d3
AD
235102001-10-10 Akim Demaille <akim@epita.fr>
23511
23512 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
23513
f6ec6d13
AD
235142001-10-04 Akim Demaille <akim@epita.fr>
23515
23516 * src/reader.c (parse_union_decl): Push the caracters in
23517 union_obstack, not attrs_obstack.
23518
342b8b6e
AD
235192001-10-04 Akim Demaille <akim@epita.fr>
23520
23521 Merge in the branch 1.29.
23522
23523 * src/reader.c (packsymbols): Use a temporary obstack for
23524 `%%tokendef', since output_stack is already used elsewhere.
23525
23526 2001-10-02 Akim Demaille <akim@epita.fr>
23527
23528 Bump 1.29d.
23529
23530 2001-10-02 Akim Demaille <akim@epita.fr>
23531
23532 Version 1.29c.
23533
23534 2001-10-02 Akim Demaille <akim@epita.fr>
23535
23536 * tests/regression.at (Invalid CPP headers): New.
23537 From Alexander Belopolsky.
23538 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
23539
23540 2001-10-02 Akim Demaille <akim@epita.fr>
23541
23542 * tests/regression.at (Invalid input): New.
23543 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
23544 Reported by Shura.
23545
23546 2001-10-02 Akim Demaille <akim@epita.fr>
23547
23548 * tests/calc.at: Now that --debug works, the tests must be adjusted.
23549
23550 2001-10-02 Akim Demaille <akim@epita.fr>
23551
23552 * src/output.c (output_parser): Assert `skeleton'.
23553 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
23554 systems.
23555 From Shura.
23556
23557 2001-10-01 Marc Autret <autret_m@epita.fr>
23558
23559 * src/lex.h: Echo modifications.
23560 * src/lex.c (unlex): Parameter is now token_t.
23561 From Hans Aberg.
23562
23563 2001-10-01 Marc Autret <autret_m@epita.fr>
23564
23565 * src/main.c: Include lex.h.
23566 From Hans Aberg.
23567
23568 2001-09-29 Akim Demaille <akim@epita.fr>
23569
23570 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
23571
23572 2001-09-28 Akim Demaille <akim@epita.fr>
23573
23574 * tests/testsuite.at: Update to newer Autotest.
23575 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
23576
23577 2001-09-27 Akim Demaille <akim@epita.fr>
23578
23579 Position independent wrapper.
23580
23581 * tests/bison: Remove.
23582 * tests/bison.in: New.
23583 * configure.in: Adjust.
23584
23585 2001-09-27 Paul Eggert <eggert@twinsun.com>
23586
23587 Port quotearg fixes from tar 1.13.24.
23588
23589 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23590 tm to be declared.
23591 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23592 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23593
23594 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
23595 * m4/mbrtowc.m4: New file.
23596 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
23597 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
23598
23599 2001-09-27 Akim Demaille <akim@epita.fr>
23600
23601 Bump to 1.29c.
23602
23603 2001-09-27 Akim Demaille <akim@epita.fr>
23604
23605 Version 1.29b.
23606
23607 2001-09-25 Akim Demaille <akim@epita.fr>
23608
23609 * src/system.h: Include `xalloc.h'.
23610 Remove it from the C files.
23611 * src/files.c (output_files): Free the obstacks.
23612 * src/lex.c (init_lex): Rename as...
23613 (lex_init): this.
23614 (lex_free): New.
23615 * src/main.c (main): Use it.
23616
23617 2001-09-24 Marc Autret <autret_m@epita.fr>
23618
23619 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23620 to output informations in fout (FILE*).
23621 (open_graph, close_graph): Likewise.
23622 (output_graph, output_edge, output_node): Likewise.
23623 * src/vcg.h: Update function prototypes.
23624 * src/print_graph.c (print_graph): Open output graph file.
23625 (print_actions): Adjust.
23626 * src/files.h: Remove extern declaration.
23627 * src/files.c: Remove graph_obstack declaration.
23628 (open_files): Remove graph_obstack initialization.
23629 (output_files): Remove graph_obstack saving.
23630
23631 2001-09-24 Marc Autret <autret_m@epita.fr>
23632
23633 * src/files.c (compute_output_file_names): Fix.
23634
23635 2001-09-24 Marc Autret <autret_m@epita.fr>,
23636 Akim Demaille <akim@epita.fr>
23637
23638 * src/reader.c (reader): Remove call to free_symtab ().
23639 * src/main.c (main): Call it here.
23640 Include symtab.h.
23641 * src/conflicts.c (initialize_conflicts): Rename as...
23642 (solve_conflicts): this.
23643 * src/print.c (print_core, print_actions, print_state)
23644 (print_grammar): Dump to a file instead a `output_obstack'.
23645 (print_results): Dump `output_obstack', and then proceed with the
23646 FILE *.
23647 * src/files.c (compute_output_file_names, close_files): New.
23648 (output_files): Adjust.
23649 * src/main.c (main): Adjust.
23650
23651 2001-09-23 Marc Autret <autret_m@epita.fr>
23652
23653 * src/files.c (compute_header_macro): Computes header macro name
23654 from spec_defines_file when given.
23655
23656 2001-09-23 Marc Autret <autret_m@epita.fr>
23657
23658 * src/files.c (output_files): Add default extensions.
23659
23660 2001-09-22 Akim Demaille <akim@epita.fr>
23661
23662 * src/conflicts.c (finalize_conflicts): Rename as...
23663 (free_conflicts): this.
23664
23665 2001-09-22 Akim Demaille <akim@epita.fr>
23666
23667 * src/gram.c (gram_free): Rename back as...
23668 (dummy): this.
23669 (output_token_translations): Free `token_translations'.
23670 * src/symtab.c (free_symtab): Free the tag field.
23671
23672 2001-09-22 Akim Demaille <akim@epita.fr>
23673
23674 Remove `translations' as it is always set to true.
23675
23676 * src/gram.h: Adjust.
23677 * src/reader.c (packsymbols, parse_token_decl): Adjust
23678 * src/print.c (print_grammar): Adjust.
23679 * src/output.c (output_token_translations): Adjust.
23680 * src/lex.c (lex): Adjust.
23681 * src/gram.c: Be sure the set pointers to NULL.
23682 (dummy): Rename as...
23683 (gram_free): this.
23684
23685 2001-09-22 Akim Demaille <akim@epita.fr>
23686
23687 * configure.in: Invoke AM_LIB_DMALLOC.
23688 * src/system.h: Use dmalloc.
23689 * src/LR0.c: Be sure to have pointers initialized to NULL.
23690 (allocate_itemsets): Allocate kernel_items only if needed.
23691
23692 2001-09-22 Akim Demaille <akim@epita.fr>
23693
23694 * configure.in: Bump to 1.29b.
23695 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23696 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23697 need xmalloc.c in calc.y.
23698 From Pascal Bart.
23699
23700 2001-09-21 Akim Demaille <akim@epita.fr>
23701
23702 Version 1.29a.
23703 * Makefile.maint, config/config.guess, config/config.sub,
23704 * config/missing: Update from masters.
23705 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23706 upon package.m4.
23707 * configure.in (ALL_LINGUAS): Add `tr'.
23708
23709 2001-09-21 Akim Demaille <akim@epita.fr>
23710
23711 * tests/Makefile.am (package.m4): Move to...
23712 ($(srcdir)/$(TESTSUITE)): here.
23713
23714 2001-09-20 Akim Demaille <akim@epita.fr>
23715
23716 * src/complain.c: No longer try to be standalone: use system.h.
23717 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23718 * src/complain.h: Likewise.
23719 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23720 Remove the unused variable `n'.
23721 From Albert Chin-A-Young.
23722
23723 2001-09-18 Marc Autret <autret_m@epita.fr>
23724
23725 * doc/bison.1: Update.
23726 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23727 descriptions.
23728 (Option Cross Key): Update.
23729 Add --graph.
23730
23731 2001-09-18 Marc Autret <autret_m@epita.fr>
23732
23733 * tests/regression.at: New test (comment in %union).
23734
23735 2001-09-18 Marc Autret <autret_m@epita.fr>
23736
23737 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23738 do that.
23739 Reported by Keith Browne.
23740
23741 2001-09-18 Marc Autret <autret_m@epita.fr>
23742
23743 * tests/output.at: Add tests for --defines and --graph.
23744
23745 2001-09-18 Marc Autret <autret_m@epita.fr>
23746
23747 * tests/output.at: Removes tests of %{header,src}_extension features.
23748
23749 2001-09-18 Akim Demaille <akim@epita.fr>
23750
23751 * tests/Makefile.am (package.m4): New.
23752 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23753 (_AT_CHECK_CALC_ERROR): Likewise.
23754 Factor the `, ' part of verbose error messages.
23755
23756 2001-09-18 Marc Autret <autret_m@epita.fr>
23757
23758 * src/getargs.c (longopts): Declare --defines and --graph as options
23759 with optional arguments.
23760 * src/files.h: Add extern declarations.
23761 * src/files.c (spec_graph_file, spec_defines_file): New.
23762 (output_files): Update.
23763 Remove CPP-outed code.
23764
23765 2001-09-18 Marc Autret <autret_m@epita.fr>
23766
23767 Turn off %{source,header}_extension feature.
23768
23769 * src/files.c (compute_exts_from_gf): Update.
23770 (compute_exts_from_src): Update.
23771 (output_files): CPP-out useless code.
23772 * src/files.h: Remove {header,source}_extension extern declarations.
23773 * src/reader.c (parse_dquoted_param): CPP-out.
23774 (parse_header_extension_decl): Remove.
23775 (parse_source_extension_decl): Remove.
23776 (read_declarations): Remove cases tok_{hdrext,srcext}.
23777 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23778 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23779
23780 2001-09-10 Akim Demaille <akim@epita.fr>
23781
23782 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23783 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23784 (AT_CHECK_OUTPUT): this.
23785 Merely check ls' exit status, its output is useless.
23786
23787 2001-09-10 Akim Demaille <akim@epita.fr>
23788
23789 * tests/calc.at: Use m4_match.
23790 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23791
23792 2001-09-10 Marc Autret <autret_m@epita.fr>,
23793 Akim Demaille <akim@epita.fr>
23794
23795 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23796 enum color_e.
23797 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23798 to `normal'.
23799 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23800 * src/lex.h: Adjust prototype.
23801 (token_t): Add `tok_undef'.
23802 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23803 (parse_percent_token): Now returns token_t.
23804 Add default statement in switch.
23805 (lex): Separate `c' as an input variable, from the token_t result
23806 part.
23807 (unlexed): Is a token_t.
23808
23809 2001-09-10 Akim Demaille <akim@epita.fr>
23810
23811 * configure.in: Bump to 1.29a.
23812
23813 2001-09-07 Akim Demaille <akim@epita.fr>
23814
23815 Version 1.29.
23816
23817 2001-08-30 Akim Demaille <akim@epita.fr>
23818
23819 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23820 * m4/atconfig.m4: Remove.
23821 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23822 * tests/bison: New.
23823 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23824 m4_if, m4_patsubst, and m4_regexp.
23825 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23826 `input' file instead of echo.
23827
23828 2001-08-29 Akim Demaille <akim@epita.fr>
23829
23830 Bump to 1.28e.
23831
23832 2001-08-29 Akim Demaille <akim@epita.fr>
23833
23834 Version 1.28d.
23835
23836 2001-08-29 Paul Eggert <eggert@twinsun.com>
23837
23838 * src/bison.simple (yyparse): Don't take the address of an
23839 item before the start of an array, as that doesn't conform to
23840 the C Standard.
23841
23842 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23843
23844 * doc/bison.texinfo (Location Tracking Calc): New node.
23845
23846 2001-08-29 Paul Eggert <eggert@twinsun.com>
23847
23848 * src/output.c (output): Do not define const, as this now
23849 causes more problems than it cures.
23850
23851 2001-08-29 Akim Demaille <akim@epita.fr>
23852
23853 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23854 the nodes.
23855 Be sure to tag the `detailmenu'.
23856
23857 2001-08-29 Akim Demaille <akim@epita.fr>
23858
23859 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23860 download in a tmp dir.
23861
23862 2001-08-28 Marc Autret <autret_m@epita.fr>
23863
23864 * config/depcomp: New file.
23865
23866 2001-08-28 Marc Autret <autret_m@epita.fr>
23867
23868 * doc/bison.1 (mandoc): Adjust.
23869 From Juan Manuel Guerrero.
23870
23871 2001-08-28 Marc Autret <autret_m@epita.fr>
23872
23873 * src/print_graph.c (print_state): Fix.
23874
23875 2001-08-27 Marc Autret <autret_m@epita.fr>
23876
23877 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23878 char * members.
23879 Echo modifications to the functions prototypes.
23880 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23881
23882 2001-08-27 Marc Autret <autret_m@epita.fr>
23883
23884 * src/vcg.c: Include `xalloc.h'.
23885 (add_colorentry): New.
23886 (add_classname): New.
23887 (add_infoname): New.
23888 * src/vcg.h: Add new prototypes.
23889
23890 2001-08-27 Akim Demaille <akim@epita.fr>
23891
23892 * Makefile.maint: Sync. again with CVS Autoconf.
23893
23894 2001-08-27 Akim Demaille <akim@epita.fr>
23895
23896 * Makefile.maint: Formatting changes.
23897 (po-update, cvs-update, update): New targets.
23898 (AMTAR): Remove.
23899
23900 2001-08-27 Akim Demaille <akim@epita.fr>
23901
23902 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23903 * Makefile.maint: Sync. with CVS Autoconf.
23904
23905 2001-08-27 Marc Autret <autret_m@epita.fr>
23906
23907 * src/vcg.h (struct infoname_s): New.
23908 (struct colorentry_s): New.
23909 (graph_s): New fields {vertical,horizontal}_order in structure.
23910 Add `infoname' field.
23911 Add `colorentry' field;
23912 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23913 (G_HORIZONTAL_ORDER): New.
23914 (G_INFONAME): New.
23915 (G_COLORENTRY): New.
23916 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23917 Add output of `infoname'.
23918 Add output of `colorentry'.
23919
23920 2001-08-27 Marc Autret <autret_m@epita.fr>
23921
23922 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23923 This one shadowed a global parameter.
23924
23925 2001-08-24 Marc Autret <autret_m@epita.fr>
23926
23927 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23928 instead of `unsigned'.
23929 (print_state): Do not call obstack_object_size () in obstack_grow ()
23930 to avoid macro variables shadowing.
23931
23932 2001-08-23 Marc Autret <autret_m@epita.fr>
23933
23934 * src/lex.c (percent_table): Typo: s/naem/name/.
23935 Add graph option.
23936 Normalize new options declarations.
23937
23938 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23939
23940 * tests/suite.at: Exercise %header_extension and %source_extension.
23941
23942 2001-08-16 Marc Autret <autret_m@epita.fr>
23943
23944 * src/reader.c (parse_dquoted_param): New.
23945 (parse_header_extension_decl): Use it.
23946 (parse_source_extension_decl): Likewise.
23947
23948 2001-08-16 Marc Autret <autret_m@epita.fr>
23949
23950 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23951 (get_xxxx_str): Use assert () instead of complain ().
23952 Remove return invokations in default cases.
23953 (get_decision_str): Modify default behaviour. Remove second argument.
23954 Echo modifications on calls.
23955 (output_graph): Fix.
23956
23957 2001-08-16 Marc Autret <autret_m@epita.fr>
23958
23959 * src/getargs.c (usage): Update with ``-g, --graph''.
23960
23961 2001-08-16 Marc Autret <autret_m@epita.fr>
23962
23963 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23964 (Option Cross Key): Likewise.
23965 * doc/bison.1: Update.
23966
1c8c2190
PB
239672001-09-25 Pascal Bart <pascal.bart@epita.fr>
23968
23969 * src/output.c (output_master_parser): Don't finish action_obstack.
23970 (output_parser): Don't care about the muscle action, here.
23971 (prepare): Copy the action_obstack in the action muscle.
23972 (output): Free action_obstack.
23973
180d45ba
PB
239742001-09-23 Pascal Bart <pascal.bart@epita.fr>
23975
23976 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23977 will contain `%union' declaration.
23978 (parse_union_decl): Delete #line directive output.
23979 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23980 informations about %union.
23981 (parse_union_decl): Copy the union_obstack in the muscle stype.
23982 * src/bison.simple: Add new #line directive.
23983 Add typdef %%stype YYSTYPE.
23984
c51d1a19
PB
239852001-09-23 Pascal Bart <pascal.bart@epita.fr>
23986
23987 * src/bison.simple: Add new `#line' directive.
23988
6f9344da
PB
239892001-09-22 Pascal Bart <pascal.bart@epita.fr>
23990
23991 * src/bison.simple: New `#line' directive.
23992 * src/output.c (output_parser): Support new dynamic muscle input_line.
23993
652def80
MA
239942001-09-22 Marc Autret <autret_m@epita.fr>
23995
23996 * src/output.c (output_master_parser): New.
23997 (output_parser): Be more re-entrant.
23998
25b222fa
MA
239992001-09-21 Marc Autret <autret_m@epita.fr>
24000
24001 * src/reader.c (copy_definition, parse_union_decl): Update and use
24002 `linef' muscle.
24003 (copy_action): Likewise.
24004 Use obstack_1grow ().
24005 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
24006
6bc35ae5
MA
240072001-09-21 Marc Autret <autret_m@epita.fr>
24008
24009 * src/options.c (option_table): Adjust.
24010 * src/lex.c (parse_percent_token): Fix.
24011
c0629aa1
PB
240122001-09-20 Pascal Bart <pascal.bart@epita.fr>
24013
24014 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 24015
82b6d266
PB
240162001-09-20 Pascal Bart <pascal.bart@epita.fr>
24017
24018 * src/lex.c (parse_percent_token): Change type of variable `tx', which
24019 is now an option_table_struct*.
24020 (option_strcmp): New function option_strcmp.
24021 (parse_percent_token): Call option_strcmp.
24022 * src/getargs.c (xalloc.h, options.h): Include it.
24023 (getargs): Call create_long_option_table.
24024 (getargs): Free longopts at the end of the function.
24025 (shortopts): Move in options.c.
24026 * src/options.c (create_long_option_table): New function. Convert
24027 information from option_table to option structure.
24028 * src/reader.c (options.h): Include it.
24029
24030 * src/Makefile.am: Adjust.
24031 * src/options.c (option_table): Create from longopts and percent_table.
24032 * src/getargs.c (longopts): Delete.
24033 * src/lex.c (struct percent_table_struct): Delete.
24034 (percent_table): Delete.
24035 (options.h): Include it.
24036 * src/options.c: Create.
24037 * src/options.h: Create.
24038 Declare enum opt_access_e.
24039 Define struct option_table_struct.
24040
75f5aaea
MA
240412001-09-20 Marc Autret <autret_m@epita.fr>
24042
24043 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
24044 sections of Bison.
24045
f508cb0a
PB
240462001-09-19 Pascal Bart <pascal.bart@epita.fr>
24047
24048 * src/bison.simple: s/%%filename/%%skeleton.
24049 * src/muscle_tab.c (getargs.h): Include it.
24050 (muscle_init): Insert new muscle skeleton.
24051
13105fc1
PB
240522001-09-18 Pascal Bart <pascal.bart@epita.fr>
24053
24054 * src/output.c (output_parser): Delete unused variable actions_dumped.
24055
b0c4483e
PB
240562001-09-07 Pascal Bart <pascal.bart@epita.fr>
24057
24058 * src/output.c (output): Delete call to reader_output_yylsp.
24059 * src/reader.c (reader): Likewise.
ba0fe3c7 24060 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 24061
11d82f03
MA
240622001-09-02 Marc Autret <autret_m@epita.fr>
24063
24064 * src/reader.c: Include muscle_tab.h.
24065 (parse_union_decl): Update.
24066 (parse_macro_decl): Rename parse_muscle_decl.
24067 Update to use renamed functions and variable.
24068 (read_declarations, copy_action, read_additionnal_code, : Updated
24069 with correct variables and functions names.
24070 (packsymbols, reader): Likewise.
342b8b6e 24071
11d82f03 24072 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 24073
11d82f03
MA
24074 * src/output.c: Include muscle_tab.h
24075 In all functions using macro_insert, change by using muscle_insert ().
24076 (macro_obstack): Rename muscle_obstack.
24077 Echo modifications in the whole file.
24078 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
24079 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
24080 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
24081
24082 * src/muscle_tab.h: Update double inclusion macros.
24083 (macro_entry_s): Rename muscle_entry_s.
24084 Update prototypes.
342b8b6e 24085
11d82f03
MA
24086 * src/muscle_tab.c: Include muscle_tab.h.
24087 Rename macro_tabble to muscle_table.
24088 (mhash1, mhash2, mcmp): Use muscle_entry.
24089 (macro_init): Rename muscle_init. Update.
24090 (macro_insert): Rename muscle_insert. Update.
24091 (macro_find): Rename muscle_find. Update.
24092
24093 * src/main.c: Include muscle_tab.h.
24094 (main): Call muscle_init ().
24095 * src/Makefile.am (bison_SOURCES): Echo modifications.
24096
93a37297
MA
240972001-09-02 Marc Autret <autret_m@epita.fr>
24098
f753cd62 24099 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 24100
f753cd62
MA
24101 * src/muscle_tab.c, src/muscle_tab.h: Add files.
24102
241032001-09-02 Marc Autret <autret_m@epita.fr>
24104
24105 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 24106
682d48cd
PB
241072001-09-01 Pascal Bart <pascal.bart@epita.fr>
24108
342b8b6e 24109 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
24110 filename.
24111
087c8fda
MA
241122001-09-01 Marc Autret <autret_m@epita.fr>
24113
24114 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
24115 to an explicit value to activate the feature. We do it here.
24116
dda680cb
PB
241172001-08-31 Pascal Bart <pascal.bart@epita.fr>
24118
24119 * src/output.c (prepare): Delete the `filename' muscule insertion.
24120 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
24121 (parse_union_decl): Likewise.
24122 * src/macrotab.c (macro_init): Initialize filename by infile.
24123
9e644e64
MA
241242001-08-31 Marc Autret <autret_m@epita.fr>
24125
24126 * src/bison.simple (YYLSP_NEEDED): New definition.
24127 * src/output.c (prepare): Add macro insertion of `locations_flag'
24128
17da6427
PB
241292001-08-31 Pascal Bart <pascal.bart@epita.fr>
24130
24131 * src/output.c (prepare): Delete insertion of previous muscles,
24132 and insert the `prefix' muscles.
24133 * src/macrotab.c (macro_init): Likewise.
24134 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 24135 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
24136 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
24137 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 24138 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
24139 name_prefix.
24140
e8cb70b9
PB
241412001-08-31 Pascal Bart <pascal.bart@epita.fr>
24142
24143 * src/main.c (main): Standardize.
24144 * src/output.c (output_table_data, output_parser): Likewise.
24145 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
24146
63c2d5de
MA
241472001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
24148
342b8b6e 24149 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
24150 %%epilogue.
24151 * src/output.c (output): Rename %%declarations to %%prologue.
24152 * src/bison.simple: Echo modifications.
342b8b6e 24153
d8cb5183
MA
241542001-08-31 Marc Autret <autret_m@epita.fr>
24155
24156 * src/reader.c (readgram): CleanUp.
24157 (output_token_defines): Likewise.
24158 (packsymbols): Likewise.
24159 (reader): Likewise.
24160 * src/output.c (output): CPP-out useless code.
24161
6c686258
PB
241622001-08-31 Pascal Bart <pascal.bart@epita.fr>
24163
342b8b6e 24164 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
24165 output_trailers and output_headers.
24166 * src/output.h: Remove obsolete functions prototypes of output_headers
24167 and output_trailers.
24168
8f451ef7
PB
241692001-08-30 Pascal Bart <pascal.bart@epita.fr>
24170
24171 * src/main.c: Include macrotab.h.
342b8b6e 24172 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
24173 Adjust functions prototypes.
24174 * src/macrotab.c (macro_insert): Constify key and value.
24175 (macro_find): Constify key.
24176 (macro_insert): Include 'xalloc.h'
24177 (macro_insert): Use XMALLOC.
24178 (macro_find): Constify return value.
24179 * src/output.c (output_table_data): Rename table to table_data.
24180 (output_parser): Constify macro_key, macro_value.
24181
997b6fd0 241822001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
24183
24184 * src/reader.c (parse_skel_decl): New.
342b8b6e 24185 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
24186 * src/lex.h (token_t): New token `tok_skel'.
24187 * src/lex.c (percent_table): Add skeleton option entry.
24188 Standardize.
24189
ff48177d
MA
241902001-08-29 Marc Autret <autret_m@epita.fr>
24191
24192 * src/bison.simple: Add %%user_code directive at the end.
24193 * src/reader.c (read_additionnal_code): New.
24194 (reader): Use it.
24195 * src/output.c (output_program): Remove.
24196 (output): Update.
24197
b33160bf
MA
241982001-08-28 Marc Autret <autret_m@epita.fr>
24199
24200 * src/output.c (output_actions): Clean up.
4e5caae2 24201 (output_gram): CPP-out useless code.
b33160bf
MA
24202 * src/reader.c (reader): Clean up, CPP-out useless code.
24203
d1a2daf7
PB
242042001-08-28 Pascal Bart <pascal.bart@epita.fr>
24205
342b8b6e 24206 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 24207 directive.
d1a2daf7
PB
24208 * src/bison.simple: Add `%%definitions'.
24209
2b763dfe
MA
242102001-08-28 Marc Autret <autret_m@epita.fr>
24211
24212 * config/depcomp: New file.
24213
f1a87ef6
PE
242142001-08-27 Paul Eggert <eggert@twinsun.com>
24215
24216 * src/bison.simple (yyparse): Don't take the address of an
24217 item before the start of an array, as that doesn't conform to
24218 the C Standard.
24219
82e236e2
RA
242202001-08-27 Robert Anisko <robert.anisko@epita.fr>
24221
f1a87ef6 24222 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
24223 obstack. It was done too late here.
24224
24225 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
24226 completely wrong.
24227 (reader): Initialize the macro obstack here, since we need it to grow
24228 '%define' directives.
24229
24230 * src/reader.h: Declare the macro obstack as extern.
24231
b0cfa28a
RA
242322001-08-27 Robert Anisko <robert.anisko@epita.fr>
24233
24234 * src/output.c (output_parser): Fix. Store single '%' characters in
24235 the output obstack instead of throwing them away.
24236
6fc74234
AD
242372001-08-27 Akim Demaille <akim@epita.fr>
24238
24239 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
24240
9c76d118
RA
242412001-08-25 Robert Anisko <robert.anisko@epita.fr>
24242
24243 * lib/Makefile.am: Adjust.
24244
a8289c62
RA
242452001-08-25 Robert Anisko <robert.anisko@epita.fr>
24246
24247 * src/bison.simple: Update and add '%%' directives.
24248
b6610515
RA
242492001-08-25 Robert Anisko <robert.anisko@epita.fr>
24250
24251 * src/reader.c (reader): Remove calls to 'output_headers' and
24252 'output_trailers'. Remove some C output.
24253 (readgram): Disable a piece of code that was writing a default
24254 definition for 'YYSTYPE'.
24255 (reader_output_yylsp): Remove.
24256 (packsymbols): Output token defintions to a macro.
24257 (copy_definition): Disable C output.
6fc74234 24258
b6610515
RA
24259 * src/reader.c (parse_macro_decl): New function used to parse macro
24260 declarations.
24261 (copy_string2): Put the body of copy_string into this new function.
24262 Add a parameter to let the caller choose whether he wants to copy the
24263 string delimiters or not.
24264 (copy_string): Be a simple call to copy_string2 with the last argument
24265 bound to true.
24266 (read_declarations): Add case for macro definition.
24267 (copy_identifier): New.
6fc74234 24268 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
24269 rather than lex.
24270
26f609ff
RA
242712001-08-25 Robert Anisko <robert.anisko@epita.fr>
24272
24273 * src/output.c (prepare): Add prefixed names.
24274 (output_parser): Output semantic actions.
24275 (output_parser): Fix bug on '%%line' directives.
6fc74234 24276
26f609ff
RA
24277 * src/output.c (output_headers): Remove. The C code printed by this
24278 function should now be in the skeletons.
24279 (output_trailers): Remove.
24280 (output): Disable call to 'reader_output_yylsp'.
24281 (output_rule_data): Do not output tables to the table obstack.
24282
24283 * src/output.c: Remove some C dedicated output.
24284 Improve the use of macro and output obstacks.
24285 (output_defines): Remove.
6fc74234 24286
26f609ff
RA
24287 * src/output.c (output_token_translations): Associate 'translate'
24288 table with a macro. No output to the table obstack.
24289 (output_gram): Same for 'rhs' and 'prhs'.
24290 (output_stos): Same for 'stos'.
24291 (output_rule_data): Same for 'r1' and 'r2'.
24292 (token_actions): Same for 'defact'.
24293 (goto_actions): Same for 'defgoto'.
24294 (output_base): Same for 'pact' and 'pgoto'.
24295 (output_table): Same for 'table'.
24296 (output_check): Same for 'check'.
6fc74234 24297
26f609ff
RA
24298 * src/output.c (output_table_data): New function.
24299 (output_short_table): Remove.
24300 (output_short_or_char_table): Remove.
6fc74234 24301
26f609ff
RA
24302 * src/output.c (output_parser): Replace most of the skeleton copy code
24303 with something new. Skeletons are now processed character by character
24304 rather than line by line, and Bison looks for '%%' macros. This is the
24305 first step in making Bison's output process (a lot) more flexible.
24306 (output_parser): Use the macro table.
24307
6f43b113
RA
243082001-08-25 Robert Anisko <robert.anisko@epita.fr>
24309
24310 * src/main.c (main): Initialize the macro table.
24311
dd3127cf
RA
243122001-08-25 Robert Anisko <robert.anisko@epita.fr>
24313
24314 * src/lex.c (percent_table): Add tok_define.
24315 * src/lex.h: Add tok_define.
24316
aa321494
RA
243172001-08-25 Robert Anisko <robert.anisko@epita.fr>
24318
24319 * src/macrotab.c: New file.
24320 * src/macrotab.h: New file.
24321 * src/Makefile.am: Update.
24322
68bd3b6b
RA
243232001-08-25 Robert Anisko <robert.anisko@epita.fr>
24324
24325 * lib/hash.c: New file.
24326 * lib/hash.h: New file.
24327 * lib/Makefile.am: Update.
24328
45f8dd1e
AD
243292001-08-15 Akim Demaille <akim@epita.fr>
24330
24331 Version 1.28c.
24332
40a64a7a 243332001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
24334
24335 * src/reader.c (readgram): Indent output macro YYSTYPE.
24336 (packsymbols): Likewise.
24337 (output_token_defines): Likewise.
24338 * src/files.c: Standardize.
24339 (compute_header_macro): New.
24340 (defines_obstack_save): New. Use compute_header_macro.
24341 (output_files): Update. Use defines_obstack_save.
24342
f9a8293a
AD
243432001-08-15 Akim Demaille <akim@epita.fr>
24344
24345 * doc/bison.texinfo (Table of Symbols): Document
24346 YYSTACK_USE_ALLOCA.
24347
150ca7a7
AD
243482001-08-15 Akim Demaille <akim@epita.fr>
24349
24350 * missing: Update from CVS Automake.
24351 * config/config.guess, config/config.sub, config/texinfo.tex:
24352 Update from gnu.org.
24353
69b5cec4
AD
243542001-08-15 Akim Demaille <akim@epita.fr>
24355
24356 * Makefile.maint: Sync with CVS Autoconf.
24357
f2b5126e
PB
243582001-08-14 Pascal Bart <pascal.bart@epita.fr>
24359
69b5cec4 24360 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
24361 `fdl.texi'.
24362 * doc/fdl.texi: Add to package.
24363
4ecbf796
MA
243642001-08-14 Marc Autret <autret_m@epita.fr>
24365
24366 Turn on %{source,header}_extension features.
24367
69b5cec4 24368 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
24369 source_extension.
24370 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 24371 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
24372 between options.
24373
95fb5662
MA
243742001-08-14 Marc Autret <autret_m@epita.fr>
24375
24376 * src/files.c (compute_base_names): Add extensions computing when
24377 `--file-prefix' used.
24378 Standardize function calls.
24379
78d09da9
MA
243802001-08-13 Marc Autret <autret_m@epita.fr>
24381
69b5cec4 24382 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
24383 defining it (defined but null disables alloca).
24384
5a009f2c
MA
243852001-08-13 Marc Autret <autret_m@epita.fr>
24386
24387 * src/bison.simple (_yy_memcpy): CPP reformat.
24388
1e41465a
PB
243892001-08-13 Pascal Bart <pascal.bart@epita.fr>
24390
24391 * tests/atconfig.in (CPPFLAGS): Fix.
24392
c67a198d
PB
243932001-08-10 Pascal Bart <pascal.bart@epita.fr>
24394
79282c6c 24395 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
24396 `gpl.texi'.
24397 * doc/gpl.texi: Add to package.
24398
09a6de7e
MA
243992001-08-10 Marc Autret <autret_m@epita.fr>
24400
24401 * src/print_graph.h: Fix.
24402 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
24403
b77b9ee0
AD
244042001-08-10 Akim Demaille <akim@epita.fr>
24405
24406 * src/system.h: Provide default declarations for stpcpy, strndup,
24407 and strnlen.
24408
3e259915
MA
244092001-08-10 Robert Anisko <anisko_r@epita.fr>
24410
24411 * doc/bison.texinfo (Locations): Update @$ stuff.
24412
ca96bc2d
MA
244132001-08-09 Robert Anisko <anisko_r@epita.fr>
24414
24415 * src/bison.simple (YYLLOC_DEFAULT): Update.
24416 (yyparse): Adjust.
24417
fdc6758b
MA
244182001-08-08 Marc Autret <autret_m@epita.fr>
24419
b77b9ee0 24420 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
24421 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
24422 Reported by Fabrice Bauzac.
957d4dbf 24423
600cad3b
MA
244242001-08-08 Marc Autret <autret_m@epita.fr>
24425
24426 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
24427 * src/vcg.c (output_node): Fix.
24428 * src/vcg.h: Cleanup.
24429 * src/print_graph.c: Add comments.
b77b9ee0 24430 (node_output_size): New global variable. Simplify the formatting of
600cad3b 24431 the VCG graph output.
b77b9ee0 24432 (print_actions): Unused code is now used. It notifies the final state
600cad3b 24433 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 24434 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
24435 blue.
24436 Get the current node name and node_obstack by argument.
24437 (node_obstack): New variable.
24438 (print_state): Manage node_obstack.
24439 (print_core): Use node_obstack given by argument.
24440 A node is not only computed here but in print_actions also.
24441 (print_graph): CPP out useless code instead of commenting it.
24442
976e528f
AD
244432001-08-07 Pascal Bart <pascal.bart@epita.fr>
24444
24445 * tests/atconfig.in (CPPFLAGS): Fix.
24446
20e8e5ca
AD
244472001-08-07 Akim Demaille <akim@epita.fr>
24448
24449 * src/print_graph.c (quote): New.
24450 (print_core): Use it.
24451
957d4dbf 244522001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 24453
3e3da797
AD
24454 * src/vcg.c (complain.h): Include it.
24455 Unepitaize `return' invocations.
c4b66126 24456 [NDEBUG] (main): Remove.
79282c6c 24457 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
24458 * src/files.c (open_files): Initialize graph_obstack.
24459 * src/print_graph.c (print_actions): CPP out useless code.
24460 (print_core): Don't output the last `\n' in labels.
24461 Use `quote'.
24462 * src/files.c (output_files): Output the VCG file.
24463 * src/main.c (main): Invoke print_graph ();
3e3da797 24464
957d4dbf 244652001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
24466
24467 Automaton VCG graph output.
24468 Using option ``-g'' or long option ``--graph'', you can generate
24469 a gram_filename.vcg file containing a VCG description of the LALR (1)
24470 automaton of your grammar.
24471
24472 * src/main.c: Call to print_graph() function.
24473 * src/getargs.h: Update.
24474 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
24475 (graph_flag): New flag.
24476 (longopts): Update.
24477 (getargs): Add case `g'.
24478 * src/files.c (graph_obstack): New obstack struct.
24479 (open_files): Initialize new obstack.
24480 (output_files): Saves graph_obstack if required.
24481 * src/files.h (graph_obstack): New extern declaration.
24482 * src/Makefile.am: Add new source files.
24483
927c1557 244842001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
24485
24486 * src/print_graph.c, src/print_graph.h (graph): New.
24487 * src/vcg.h: New file.
24488 * src/vcg.c: New file, VCG graph handling.
24489
7333d403
AD
244902001-08-06 Marc Autret <autret_m@epita.fr>
24491
24492 Add of %source_extension and %header_extension which specify
24493 the source or/and the header output file extension.
24494
24495 * src/files.c (compute_base_names): Remove initialisation of
24496 src_extension and header_extension.
24497 (compute_exts_from_gf): Update.
24498 (compute_exts_from_src): Update.
24499 (output_files): Update.
24500 * src/reader.c (parse_header_extension_decl): New.
24501 (parse_source_extension_decl): New.
24502 (read_declarations): New case statements for the new tokens.
24503 * src/lex.c (percent_table): Add entries for %source_extension
24504 and %header_extension.
24505 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
24506
84163231
AD
245072001-08-06 Marc Autret <autret_m@epita.fr>
24508
24509 * configure.in: Bump to 1.28c.
24510 * doc/bison.texinfo: Texinfo thingies.
24511
8303fc42
AD
245122001-08-04 Pascal Bart <pascal.bart@epita.fr>
24513
24514 * tests/atconfig.in (CPPFLAGS): Add.
24515 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
24516
70a84437
AD
245172001-08-03 Akim Demaille <akim@epita.fr>
24518
24519 Version 1.28b.
24520
2ce10144
AD
245212001-08-03 Akim Demaille <akim@epita.fr>
24522
24523 * tests/Makefile.am (check-local): Ship testsuite.
24524 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
24525 Include `string.h'.
24526
1e3e4bc1
AD
245272001-08-03 Akim Demaille <akim@epita.fr>
24528
24529 * configure.in: Try using -Wformat when compiling.
24530
42b45b7f
AD
245312001-08-03 Akim Demaille <akim@epita.fr>
24532
24533 * configure.in: Bump to 1.28b.
24534
8f13fe33
AD
245352001-08-03 Akim Demaille <akim@epita.fr>
24536
24537 * src/complain.c: Adjust strerror_r portability issues.
24538
b37ba92c
AD
245392001-08-03 Akim Demaille <akim@epita.fr>
24540
24541 Version 1.28a.
24542
b0ce6046
AD
245432001-08-03 Akim Demaille <akim@epita.fr>
24544
24545 * src/getargs.c, src/getarg.h (skeleton)): Constify.
24546 * src/lex.c (literalchar): Avoid name clashes on `buf'.
24547 * src/getargs.c: Include complain.h.
24548 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
24549 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
24550
d01c415b
AD
245512001-08-03 Akim Demaille <akim@epita.fr>
24552
24553 * src/reader.c (readgram): Display hidden chars in error messages.
24554
459dd1a6
AD
245552001-08-03 Akim Demaille <akim@epita.fr>
24556
24557 Update to gettext 0.10.39.
24558
53b74c0c
AD
245592001-08-03 Akim Demaille <akim@epita.fr>
24560
24561 * lib/strspn.c: New.
24562
234a3be3
AD
245632001-08-01 Marc Autret <autret_m@epita.fr>
24564
24565 * doc/bison.texinfo: Update.
24566 * doc/bison.1 (mandoc): Update.
24567 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
24568 * src/files.c: Support output files extensions computing.
24569 (src_extension): New static variable.
24570 (header_extension): New static variable.
24571 (tr): New function.
24572 (get_extension_index): New function, gets the index of an extension
24573 filename in a string.
24574 (compute_exts_from_gf): New function, computes extensions from the
24575 grammar file extension.
24576 (compute_exts_from_src): New functions, computes extensions from the
24577 C source file extension, file given by ``-o'' option.
24578 (compute_base_names): Update.
24579 (output_files): Update.
24580
847bf1f5
AD
245812001-08-01 Robert Anisko <anisko_r@epita.fr>
24582
d995fee7 24583 * doc/bison.texi: Document @$.
847bf1f5
AD
24584 (Locations): New section.
24585
d074a105
AD
245862001-07-18 Akim Demaille <akim@epita.fr>
24587
24588 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
24589 * config/prev-version.txt, config/move-if-change: New.
24590 * Makefile.am: Adjust.
24591
3419715d
AD
245922001-07-08 Pascal Bart <pascal.bart@epita.fr>
24593
24594 * src/bison.simple (yyparse): Suppress warning `comparaison
24595 between signed and unsigned'.
24596
62ab6972
AD
245972001-07-05 Pascal Bart <pascal.bart@epita.fr>
24598
24599 * src/getargs.h (raw_flag): Remove.
24600 * src/getargs.c: Die on `-r'/`--raw'.
24601 * src/lex.c (parse_percent_token): Die on `%raw'.
24602 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
24603 * tests/calc.at: Suppress test with option `--raw'.
24604
1e24cc5b
AD
246052001-07-14 Akim Demaille <akim@epita.fr>
24606
24607 * config/: New.
24608 * configure.in: Require Autoconf 2.50.
24609 Update to gettext 0.10.38.
24610
32dfccf8
AD
246112001-03-16 Akim Demaille <akim@epita.fr>
24612
24613 * doc/bison.texinfo: ANSIfy the examples.
24614
cd5bd6ac
AD
246152001-03-16 Akim Demaille <akim@epita.fr>
24616
24617 * getargs.c (skeleton): New variable.
24618 (longopts): --skeleton is a new option.
24619 (shortopts, getargs): -S is a new option.
24620 * getargs.h: Declare skeleton.
24621 * output.c (output_parser): Use it.
24622
5141b016
AD
246232001-03-16 Akim Demaille <akim@epita.fr>
24624
24625 * m4/strerror_r.m4: New.
24626 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24627 * lib/error.h, lib/error.c: Update.
24628
447992b9
AD
246292001-03-16 Akim Demaille <akim@epita.fr>
24630
24631 * src/getargs.c (longopts): Clean up.
24632
274d42ce
AD
246332001-02-21 Akim Demaille <akim@epita.fr>
24634
24635 * src/reader.c (gensym): `gensym_count' is your own.
24636 Use a static buf to create the symbol name, as token_buffer is no
24637 longer a buffer.
24638
22c821f3
AD
246392001-02-08 Akim Demaille <akim@epita.fr>
24640
24641 * src/conflicts.c (conflict_report): Be sure not to append to res
24642 between two calls, which could happen if both first sprintf were
24643 skipped, but not the first cp += strlen.
24644
18569462
AD
246452001-02-08 Akim Demaille <akim@epita.fr>
24646
24647 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24648 New, from fileutils 4.0.37.
24649 * configure.in: Require Autoconf 2.49c. I took some time before
24650 making this decision. This is the only way out for portability
24651 issues in Bison, it would mean way too much duplicate effort to
24652 import in Bison features implemented in 2.49c since 2.13.
24653 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24654
0d8f3c8a
AD
246552001-02-02 Akim Demaille <akim@epita.fr>
24656
24657 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 24658 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 24659
f17bcd1f
AD
246602001-01-19 Akim Demaille <akim@epita.fr>
24661
24662 Get rid of the ad hoc handling of token_buffer in the scanner: use
24663 the obstacks.
24664
24665 * src/lex.c (token_obstack): New.
24666 (init_lex): Initialize it. No longer call...
24667 (grow_token_buffer): this. Remove it.
24668 Adjust all the places which used it to use the obstack.
24669
511e79b3
AD
246702001-01-19 Akim Demaille <akim@epita.fr>
24671
24672 * src/lex.h: Rename all the tokens:
24673 s/\bENDFILE\b/tok_eof/g;
24674 s/\bIDENTIFIER\b/tok_identifier/g;
24675 etc.
24676 Let them be enums, not #define, to ease debugging.
24677 Adjust all the code.
24678
0d6508ef
AD
246792001-01-18 Akim Demaille <akim@epita.fr>
24680
24681 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24682 * src/lex.c (maxtoken, grow_token_buffer): Static.
24683
6deb4447
AD
246842001-01-18 Akim Demaille <akim@epita.fr>
24685
24686 Since we now use obstacks, more % directives can be enabled.
24687
24688 * src/lex.c (percent_table): Also accept `%yacc',
24689 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24690 `%debug'.
24691 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24692 instead of returning a token.
24693 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24694 * src/reader.c (read_declarations): Adjust.
24695 * src/files.c (open_files): Don't call `compute_base_names', don't
24696 compute `attrsfile' since they depend upon data which might be
24697 *in* the input file now.
24698 (output_files): Do it here.
24699 * src/output.c (output_headers): Document the fact that this patch
24700 introduces a guaranteed SEGV for semantic parsers.
24701 * doc/bison.texinfo: Document them.
24702 * tests/suite.at: Exercise these %options.
24703
ff4423cc
AD
247042000-12-20 Akim Demaille <akim@epita.fr>
24705
24706 Also handle the output file (--verbose) with obstacks.
24707
24708 * files.c (foutput): Remove.
24709 (output_obstack): New.
24710 Adjust all dependencies.
24711 * src/conflicts.c: Return a string.
24712 * src/system.h (obstack_grow_string): Rename as...
24713 (obstack_sgrow): this. Be ready to work with non literals.
24714 (obstack_fgrow4): New.
24715
956dba3a
AD
247162000-12-20 Akim Demaille <akim@epita.fr>
24717
24718 * src/files.c (open_files): Fix the computation of short_base_name
24719 in the case of `-o foo.tab.c'.
24720
337bab46
AD
247212000-12-20 Akim Demaille <akim@epita.fr>
24722
24723 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24724 (copy_dollar): Now that everything uses obstacks, get rid of the
24725 FILE * parameters.
24726
5d3214b8
AD
247272000-12-20 Akim Demaille <akim@epita.fr>
24728
24729 * src/files.c (open_files): Actually the `.output' file is based
24730 on the short_base_name, not base_name.
24731 * tests/suite.at (Checking output file names): Adjust.
24732
29092a57
AD
247332000-12-20 Akim Demaille <akim@epita.fr>
24734
24735 * src/bison.s1: Remove, we now use directly...
24736 * src/bison.simple: this.
24737 * src/Makefile.am: Use pkgdata instead of data.
24738
ea5607fd
AD
247392000-12-20 Akim Demaille <akim@epita.fr>
24740
24741 * src/files.c (guard_obstack): New.
24742 (open_files): Initialize it.
24743 (output_files): Dump it...
24744 * src/files.h: Export it.
24745 * src/reader.c (copy_guard): Use it.
24746
27110317
AD
247472000-12-19 Akim Demaille <akim@epita.fr>
24748
24749 * src/files.c (outfile, defsfile, actfile): Removed as global
24750 vars.
24751 (open_files): Don't compute them.
24752 (output_files): Adjust.
24753 (base_name, short_base_name): Be global.
24754 Adjust dependencies.
24755
19c50364
AD
247562000-12-19 Akim Demaille <akim@epita.fr>
24757
24758 * src/files.c (strsuffix): New.
24759 (stringappend): Be just like strcat but allocate.
24760 (base_names): Eve out from open_files.
24761 Try to simplify the rather hairy computation of base_name and
24762 short_base_name.
24763 (open_files): Use it.
24764 * tests/suite.at (Checking output file names): New test.
24765
573c1d9f
AD
247662000-12-19 Akim Demaille <akim@epita.fr>
24767
24768 * src/system.h (obstack_grow_literal_string): Rename as...
24769 (obstack_grow_string): this.
24770 * src/output.c (output_parser): Recognize `%% actions' instead of
24771 `$'.
24772 * src/bison.s1: s/$/%% actions/.
24773 * src/bison.hairy: Likewise.
24774
ef7ddedd
AD
247752000-12-19 Akim Demaille <akim@epita.fr>
24776
24777 * src/output.c (output_parser): Compute the `#line' lines when
24778 there are.
24779 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24780 Suggested by Hans Aberg.
24781
ff61dabd
AD
247822000-12-19 Akim Demaille <akim@epita.fr>
24783
24784 Let the handling of the skeleton files be local to the procedures
24785 that use it.
24786
24787 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24788 longer static.
24789 (fparser, open_extra_files): Remove.
24790 (open_files, output_files): Don't take care of fparser.
24791 * src/files.h: Adjust.
24792 * src/output.c (output_parser): Open and close the file to the
24793 skeleton.
24794 * src/reader.c (read_declarations): When %semantic_parser, open
24795 fguard.
24796
55b96341
AD
247972000-12-19 Akim Demaille <akim@epita.fr>
24798
24799 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24800 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24801
358c15b7
AD
248022000-12-19 Akim Demaille <akim@epita.fr>
24803
24804 * src/files.c (open_files): Yipee! We no longer need all the code
24805 looking for `/tmp' since we have no tmp file.
24806
7de3329e
AD
248072000-12-19 Akim Demaille <akim@epita.fr>
24808
24809 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24810 New macros.
24811 * src/files.c (open_files): Less dependency on MSDOS etc.
24812
3abcd459
AD
248132000-12-14 Akim Demaille <akim@epita.fr>
24814
24815 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24816 Provide a default definition.
24817 Use it when executing the default @ action.
24818 * src/reader.c (reader_output_yylsp): No longer include
24819 `timestamp' and `text' in the default YYLTYPE.
24820
2a91a95e
AD
248212000-12-12 Akim Demaille <akim@epita.fr>
24822
24823 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24824 (copy_guard): Quote the file names.
24825 Reported by Laurent Mascherpa.
24826
14d3eb9b
AD
248272000-12-12 Akim Demaille <akim@epita.fr>
24828
24829 * src/output.c (output_headers, output_program, output): Be sure
24830 to escape special characters when outputting filenames.
24831 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24832 (output_headers): Don't depend on them, Use ACTSTR.
24833
d7045ec6
AD
248342000-11-17 Akim Demaille <akim@epita.fr>
24835
24836 * lib/obstack.h: Formatting changes.
24837 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24838 prevents type checking.
24839 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24840 cast the value to (void *): assigning a `foo *' to a `void *'
24841 variable is valid.
24842 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24843 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24844 append characters.
24845
6fd54b73
AD
248462000-11-17 Akim Demaille <akim@epita.fr>
24847
24848 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24849 as...
24850 (suite.m4, regression.m4, calc.m4): these.
24851 * tests/atgeneral.m4: Update from CVS Autoconf.
24852
4c50eae6
AD
248532000-11-17 Akim Demaille <akim@epita.fr>
24854
24855 * tests/regression.m4 (%union and --defines): New test,
24856 demonstrating a current bug in the obstack implementation.
24857
a35f64ea
AD
248582000-11-17 Akim Demaille <akim@epita.fr>
24859
24860 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24861 macros.
24862 Use them to declare the variables which are global or local to
24863 `yyparse'.
24864
7de23534
AD
248652000-11-17 Akim Demaille <akim@epita.fr>
24866
24867 * acconfig.h: Remove, no longer used.
24868
aa7815f5
AD
248692000-11-07 Akim Demaille <akim@epita.fr>
24870
24871 * src: s/Copyright (C)/Copyright/g.
24872
5af1f549
AD
248732000-11-07 Akim Demaille <akim@epita.fr>
24874
24875 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24876 defining.
24877 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24878
553e2b22
AD
248792000-11-07 Akim Demaille <akim@epita.fr>
24880
24881 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24882 Merge in a single CPP if/else.
24883
8a4f41d6
AD
248842000-11-07 Akim Demaille <akim@epita.fr>
24885
24886 * src/output.c (output): Remove useless variables.
24887 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24888 argument `data' for consistency with the prototypes.
24889 Qualify it `const'.
24890 (obstack_copy, obstack_copy0): Rename the second argument as
24891 `address' for consistency. Qualify it `const'.
24892 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24893 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24894 `const' their input argument (`data' or `address').
24895 Adjust the corresponding macros to include `const' in casts.
24896
095a3fb5
AD
248972000-11-03 Akim Demaille <akim@epita.fr>
24898
24899 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24900 s/PFILE1/BISON_HAIRY/.
24901 Adjust dependencies.
24902
d1cdce7c
AD
249032000-11-03 Akim Demaille <akim@epita.fr>
24904
090c5ebf 24905 For some reason, this was not applied.
d1cdce7c
AD
24906
24907 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24908 `unlink': it's no longer used.
24909
9311529b
AD
249102000-11-03 Akim Demaille <akim@epita.fr>
24911
24912 * src/files.c (skeleton_find): New function, eved out of...
24913 (open_files, open_extra_files): here.
24914
d8880f69
AD
249152000-11-03 Akim Demaille <akim@epita.fr>
24916
24917 Don't use `atexit'.
24918
24919 * src/files.c (obstack_save): New function.
24920 (done): Rename as...
24921 (output_files): this.
24922 Use `obstack_save'.
24923 * src/main.c (main): Don't use `atexit' to register `done', since
24924 it no longer has to remove tmp files, just call `output_files'
24925 when there are no errors.
24926
0dbb648e
AD
249272000-11-02 Akim Demaille <akim@epita.fr>
24928
24929 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24930 `unlink': it's no longer used.
24931 * src/files.h: Formatting changes.
24932
896fe5c1
AD
249332000-11-02 Akim Demaille <akim@epita.fr>
24934
24935 Remove the last uses of mktemp and unlink/delete.
24936
24937 * src/files.c (fdefines, ftable): Removed.
24938 (defines_ostack, table_obstack): New.
24939 Adjust dependencies of the former into uses of the latter.
24940 * src/output.c (output_short_or_char_table, output_short_table):
24941 Convert to using obstacks.
24942 * src/reader.c (copy_comment2): Accept one FILE * and two
24943 obstacks.
24944 (output_token_defines, reader_output_yylsp): Use obstacks.
24945 * src/system.h (obstack_fgrow3): New.
1f65350a 24946 * po/POTFILES.in: Adjust.
896fe5c1 24947
dd60faec
AD
249482000-11-01 Akim Demaille <akim@epita.fr>
24949
24950 Change each use of `fattrs' into a use of `attrs_obstack'.
24951
24952 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24953 * src/files.c (fattrs): Remove.
24954 (attrs_obstack): New.
24955 Adjust all dependencies.
24956 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24957
8c7ebe49
AD
249582000-11-01 Akim Demaille <akim@epita.fr>
24959
24960 Introduce obstacks.
24961 Change each use of `faction' into a use of `action_obstack'.
24962
24963 * lib/obstack.h, lib/obstack.c: New files.
24964 * src/files.c (faction): Remove.
24965 (action_obstack): New.
24966 Adjust all dependencies.
24967
77aee789
AD
249682000-10-20 Akim Demaille <akim@epita.fr>
24969
24970 * lib/quote.h (PARAMS): New macro. Use it.
24971
43591cec
AD
249722000-10-16 Akim Demaille <akim@epita.fr>
24973
24974 * src/output.c (output_short_or_char_table): New function.
24975 (output_short_table, output_token_translations): Use it.
24976 (goto_actions): Use output_short_table.
24977
1e9798d5
AD
249782000-10-16 Akim Demaille <akim@epita.fr>
24979
24980 * src/symtab.c (bucket_new): New function.
24981 (getsym): Use it.
24982
24983 * src/output.c (output_short_table): New argument to display the
24984 comment associated with the table.
24985 Adjust dependencies.
24986 (output_gram): Use it.
24987 (output_rule_data): Nicer output layout for YYTNAME.
24988
f282676b
AD
249892000-10-16 Akim Demaille <akim@epita.fr>
24990
24991 * src/lex.c (read_typename): New function.
24992 (lex): Use it.
24993 * src/reader.c (copy_dollar): Likewise.
24994
550a72a3
AD
249952000-10-16 Akim Demaille <akim@epita.fr>
24996
24997 * src/reader.c (copy_comment2): Expect the input stream to be on
24998 the `/' which is suspected to open a comment, instead of being
24999 called after `//' or `/*' was read.
25000 (copy_comment, copy_definition, parse_union_decl, copy_action)
25001 (copy_guard): Adjust.
25002
131e2fef
AD
250032000-10-16 Akim Demaille <akim@epita.fr>
25004
25005 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
25006 `read_signed_integer'.
25007
79282c5a
AD
250082000-10-16 Akim Demaille <akim@epita.fr>
25009
25010 * src/reader.c (copy_dollar): New function.
25011 (copy_guard, copy_action): Use it.
25012
ff4a34be
AD
250132000-10-16 Akim Demaille <akim@epita.fr>
25014
25015 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
25016 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
25017 New files, from Fileutils 4.0.27.
25018 * src/main.c (printable_version): Remove.
25019 * src/lex.c, src/reader.c: Use `quote'.
25020
250212000-10-04 Akim Demaille <akim@epita.fr>
25022
25023 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
25024
14ded682
AD
250252000-10-04 Akim Demaille <akim@epita.fr>
25026
25027 * doc/bison.texinfo: Various typos spotted by Neil Booth.
25028
8e03724b
AD
250292000-10-04 Akim Demaille <akim@epita.fr>
25030
25031 When a literal string is used to define two different tokens,
25032 `bison -v' segfaults.
25033 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
25034
25035 * tests/regression.m4: New file.
25036 Include the core of the sample provided by Piotr Gackiewicz.
25037 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
25038 properly.
25039
a9e64249
AD
250402000-10-04 Akim Demaille <akim@epita.fr>
25041
25042 * src/reader.c (parse_expect_decl): Keep `count' within the size
25043 of `buffer'.
25044 From Neil Booth.
25045
da9abf43
AD
250462000-10-02 Paul Eggert <eggert@twinsun.com>
25047
25048 * bison.s1 (yyparse): Assign the default value
25049 unconditionally, to avoid a GCC warning and make the parser a
25050 tad smaller.
25051
c33638bb
AD
250522000-10-02 Akim Demaille <akim@epita.fr>
25053
25054 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
25055 options.
25056
444c570a
AD
250572000-10-02 Akim Demaille <akim@epita.fr>
25058
25059 * src/derives.c, src/print.c, src/reduce.c: To ease the
25060 translation, move some `\n' out of the translated strings.
25061
89cab50d
AD
250622000-10-02 Akim Demaille <akim@epita.fr>
25063
25064 The location tracking mechanism is precious for parse error
25065 messages. Nevertheless, it is enabled only when `@n' is used in
25066 the grammar, which is a different issue (you can use it in error
25067 message, but not in the grammar per se). Therefore, there should
25068 be another means to enable it.
25069
25070 * src/getargs.c (getargs): Support `--locations'.
25071 (usage): Report it.
25072 * src/getargs.h (locationsflag): Export it.
25073 * src/lex.c (percent_table): Support `%locations'.
25074 * src/reader.c (yylsp_needed): Remove this variable, now replaced
25075 with `locationsflag'.
25076 * doc/bison.texinfo: Document `--locations' and `%locations'.
25077 Sort the options.
25078 * tests/calc.m4: Test it.
25079
25080 For regularity of the names, replace each
25081 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
25082 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
25083 In addition replace each `flag' with `_flag'.
25084
d6c2cba0
AD
250852000-10-02 Akim Demaille <akim@epita.fr>
25086
25087 Also test parse error messages, including with YYERROR_VERBOSE.
25088
25089 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
25090 associative).
25091 Use it to check the computations.
25092 Use it to check `nonassoc' is honored.
25093 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
25094 `--yyerror-verbose'.
25095 (_AT_CHECK_CALC): Adjust to this option.
25096 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
25097
5a35a6cb
AD
250982000-10-02 Akim Demaille <akim@epita.fr>
25099
25100 Test also `--verbose', `--defines' and `--name-prefix'. Testing
25101 the latter demonstrates a flaw in the handling of non debugging
25102 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
25103 was used in order to simplify:
25104
25105 #if YYDEBUG
25106 if (yydebug)
25107 {
25108 ...
25109 }
25110 #endif
25111
25112 into
25113
25114 if (yydebug)
25115 {
25116 ...
25117 }
25118
25119 unfortunately this leads to a CPP conflict when
25120 `--name-prefix=foo' is used since it produces `#define yydebug
25121 foodebug'.
25122
25123 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
25124 (YYDPRINTF): New macro.
25125 Spread its use.
25126 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
25127 the bison options.
25128 Also test `--verbose', `--defines' and `--name-prefix'.
25129
71da9eea
AD
251302000-10-02 Akim Demaille <akim@epita.fr>
25131
25132 Improve the readability of the produced parsers.
25133
25134 * src/bison.s1: Formatting changes.
25135 Improve the comment related to the `$' mark.
25136 (yydefault): Don't fall through to `yyresume': `goto' there.
25137 * src/output.c (output_parser): When the `$' is met, skip the end
25138 of its line.
25139 New variable, `number_of_dollar_signs', to check there's exactly
25140 one `$' in the parser skeleton.
25141
95e36146
AD
251422000-10-02 Akim Demaille <akim@epita.fr>
25143
25144 * lib/xstrdup.c: New file, from the fileutils.
25145 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
25146 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
25147 instead of strlen + xmalloc + strcpy.
25148 * src/symtab.c (copys): Remove, use xstrdup instead.
25149
d7020c20
AD
251502000-10-02 Akim Demaille <akim@epita.fr>
25151
25152 * src/gram.h (associativity): New enum type which replaces the
25153 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
25154 `right_assoc', `left_assoc' and `non_assoc'.
25155 Adjust all dependencies.
25156 * src/reader.c: Formatting changes.
25157 (LTYPESTR): Don't define it, use it as a literal in
25158 `reader_output_yylsp'.
25159 * src/symtab.h (symbol_class): New enum type which replaces the
25160 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
25161 `sunknown', `stoken and `snterm'.
25162
1916f98e
AD
251632000-10-02 Akim Demaille <akim@epita.fr>
25164
25165 * src/getargs.c (fixed_outfiles): Rename as...
25166 (yaccflag): for consistency and accuracy.
25167 Adjust dependencies.
25168
d7913476
AD
251692000-10-02 Akim Demaille <akim@epita.fr>
25170
25171 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
25172 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
25173 difficult and introduced a lot of core dump. It turns out that
25174 Bison used an implementation of `xmalloc' based on `calloc', and
25175 at various places it does depend upon the initialization to 0. I
25176 have not tried to isolate the pertinent places, and all the former
25177 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
25178 someone should address this issue.
25179
25180 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
25181 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
25182 files.
25183 Adjust dependencies.
25184 * src/warshall.h: New file.
25185 Propagate.
25186
340ef489
AD
251872000-10-02 Akim Demaille <akim@epita.fr>
25188
25189 Various anti-`extern in *.c' changes.
25190
25191 * src/system.h: Include `assert.h'.
25192
b2ca4022
AD
251932000-10-02 Akim Demaille <akim@epita.fr>
25194
25195 * src/state.h (nstates, final_state, first_state, first_shift)
25196 (first_reduction): Move their exportation from here...
25197 * src/LR0.h: to here.
25198 Adjust dependencies.
25199 * src/getargs.c (statisticsflag): New variable.
25200 Add support for `--statistics'.
25201 Adjust dependencies.
25202
25203 Remove a lot of now useless `extern' statements in most files.
25204
403b315b
AD
252052000-10-02 Akim Demaille <akim@epita.fr>
25206
25207 * src/LR0.h: New file.
25208 Propagate its use.
25209
07a58c13
AD
252102000-10-02 Akim Demaille <akim@epita.fr>
25211
25212 * src/print.h: New file.
25213 Propagate its use.
25214 * src/print.c: Formatting and ordering changes.
25215 (verbose, terse): Replace with...
25216 (print_results): this new function.
25217 Adjust dependencies.
25218
0619caf0
AD
252192000-10-02 Akim Demaille <akim@epita.fr>
25220
25221 * src/conflicts.c (conflict_report): New function.
25222 (conflict_log, verbose_conflict_log): Replace with...
25223 (print_conflicts): this function.
25224 Adjust dependencies.
25225 * src/conflicts.h: New file.
25226 Propagate its inclusion.
25227
3519ec76
AD
252282000-10-02 Akim Demaille <akim@epita.fr>
25229
25230 * src/nullable.h: New file.
25231 Propagate its inclusion.
25232 * src/nullable.c: Formatting changes.
25233
015acc48
AD
252342000-10-02 Akim Demaille <akim@epita.fr>
25235
25236 * src/reduce.h: New file.
25237 Propagate its inclusion.
25238 * src/reduce.c: Topological sort and other formatting changes.
25239 (bool, TRUE, FALSE): Move their definition to...
25240 * src/system.h: here.
25241
8963a27b
AD
252422000-10-02 Akim Demaille <akim@epita.fr>
25243
25244 * src/files.c: Formatting changes.
25245 (tryopen, tryclose, openfiles): Rename as...
25246 (xfopen, xfclose, open_files): this.
25247 (stringappend): static.
25248 * src/files.h: Complete the list of exported symbols.
25249 Propagate its use.
25250
a70083a3
AD
252512000-10-02 Akim Demaille <akim@epita.fr>
25252
25253 * src/reader.h: New file.
25254 Propagate its use instead of tedious list of `extern' and
25255 prototypes.
25256 * src/reader.c: Formatting changes, topological sort,
25257 s/register//.
25258
abadc117
AD
252592000-10-02 Akim Demaille <akim@epita.fr>
25260
25261 * src/lex.h: Prototype `lex.c' exported functions.
25262 * src/reader.c: Adjust.
25263 * src/lex.c: Formatting changes.
25264 (safegetc): Rename as...
25265 (xgetc): this.
25266
720d742f
AD
252672000-10-02 Akim Demaille <akim@epita.fr>
25268
25269 * src/lalr.h: New file.
25270 Propagate its inclusion instead of prototypes and `extern'.
25271 * src/lalr.c: Formatting changes, topological sorting etc.
25272
f2acea59
AD
252732000-10-02 Akim Demaille <akim@epita.fr>
25274
25275 * src/output.c (token_actions): Introduce a temporary array,
25276 YYDEFACT, that makes it possible for this function to use
25277 output_short_table.
25278
d019d655
AD
252792000-10-02 Akim Demaille <akim@epita.fr>
25280
25281 `user_toknums' is output as a `short[]' in `output.c', while it is
25282 defined as a `int[]' in `reader.c'. For consistency with the
25283 other output tables, `user_toknums' is now defined as a table of
25284 shorts.
25285
25286 * src/reader.c (user_toknums): Be a short table instead of an int
25287 table.
25288 Adjust dependencies.
25289
25290 Factor the short table outputs.
25291
25292 * src/output.c (output_short_table): New function.
25293 * src/output.c (output_gram, output_stos, output_rule_data)
25294 (output_base, output_table, output_check): Use it.
25295
6c89f1c1
AD
252962000-10-02 Akim Demaille <akim@epita.fr>
25297
25298 * src/output.c (output): Topological sort of the functions, in
25299 order to get rid of the `static' prototypes.
25300 No longer use `register'.
25301 * src/output.h: New file.
25302 Propagate its inclusion in files explicitly prototyping functions
25303 from output.c.
25304
d9efd181
AD
253052000-09-21 Akim Demaille <akim@epita.fr>
25306
25307 * src/atgeneral.m4: Update from Autoconf.
25308
c29240e7 253092000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
25310
25311 * src/closure.h: New file.
25312 * src/closure.c: Formatting changes, topological sort over the
25313 functions, use of closure.h.
25314 (initialize_closure, finalize_closure): Rename as...
25315 (new_closure, free_closure): these. Adjust dependencies.
25316 * src/LR0.c: Formatting changes, topological sort, use of
25317 cloture.h.
25318 (initialize_states): Rename as...
25319 (new_states): this.
25320 * src/Makefile.am (noinst_HEADERS): Adjust.
25321
499daa50
AD
253222000-09-20 Akim Demaille <akim@epita.fr>
25323
25324 * src/acconfig.h: Don't protect config.h against multiple
25325 inclusion.
25326 Don't define PARAMS.
25327 * src/system.h: Define PARAMS.
25328 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
25329 purpose of config.h. system.h must not try to fix wrong
25330 definitions in config.h.
25331
cc84fd5d
AD
253322000-09-20 Akim Demaille <akim@epita.fr>
25333
25334 * src/derives.h: New file.
25335 * src/main.c, src/derives.h: Use it.
25336 Formatting changes.
25337 * src/Makefile.am (noinst_HEADERS): Adjust.
25338
db5b3a89
AD
253392000-09-20 Akim Demaille <akim@epita.fr>
25340
25341 * tests/atgeneral.m4: Update from Autoconf.
25342 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
25343 (AT_CHECK_CALC): New macros.
25344 Use these macros to test bison with options `', `--raw',
25345 `--debug', `--yacc', `--yacc --debug'.
25346
ceed8467
AD
253472000-09-19 Akim Demaille <akim@epita.fr>
25348
25349 * src/output.c: Formatting changes.
25350 * src/machine.h: Remove, leaving its contents in...
25351 * src/system.h: here.
25352 Include stdio.h.
25353 Adjust all dependencies on stdio.h and machine.h.
25354 * src/getargs.h: New file.
25355 Let all `extern' declarations about getargs.c be replaced with
25356 inclusion of `getargs.h'.
25357 * src/Makefile.am (noinst_HEADERS): Adjust.
25358
25359 * tests/calc.m4 (yyin): Be initialized in main, not on the global
25360 scope.
25361 (yyerror): Returns void, not int.
25362 * doc/bison.texinfo: Formatting changes.
25363
05a1d24b
AD
253642000-09-19 Akim Demaille <akim@epita.fr>
25365
25366 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
25367 portable.
25368
cbd25751
AD
253692000-09-18 Akim Demaille <akim@epita.fr>
25370
25371 * configure.in: Append WARNING_CFLAGS to CFLAGS.
25372 * src/Makefile.am (INCLUDES): Don't.
25373 Be ready to fetch headers in lib/.
25374
13863333
AD
253752000-09-18 Akim Demaille <akim@epita.fr>
25376
25377 * doc/bison.texinfo: Update the copyright.
25378 ANSIfy and GNUify the examples.
25379 Remove the old menu.
25380
0d533154
AD
253812000-09-18 Akim Demaille <akim@epita.fr>
25382
25383 First set of tests: use the `calc' example from the documentation.
25384
25385 * src/bison.s1 (yyparse): Condition the code using `yytname' which
25386 is defined only when YYDEBUG is.
25387 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
25388 * src/files.c (tryopen, tryclose): Formatting changes.
25389 Move to the top and be static.
25390 * src/reader.c (read_signed_integer): Likewise.
25391 * tests/calc.m4: New file.
25392 * Makefile.am, suite.m4: Adjust.
25393 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
25394
e79137ac
AD
253952000-09-18 Akim Demaille <akim@epita.fr>
25396
25397 Add support for an Autotest test suite for Bison.
25398
25399 * m4/m4.m4, m4/atconfig.m4: New files.
25400 * m4/Makefile.am (EXTRA_DIST): Adjust.
25401 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
25402 files.
25403 * src/getargs.c: Display a more standard --version message.
25404 * src/reader.c (reader): Formatting changes.
25405 No longer depend upon VERSION_STRING.
25406 * configure.in: No longer use `dnl'.
25407 Set up the test suite and the new directory `tests/.
25408 (VERSION_STRING): Remove.
25409
27821bff
AD
254102000-04-14 Akim Demaille <akim@epita.fr>
25411
25412 * src/reader.c (copy_comment2): New function, same as former
25413 `copy_comment', but outputs into two FILE *.
25414 (copy_comment): Use it.
25415 (parse_union_decl): Use it.
25416 (get_type, parse_start_decl): Use the same `invalid' message.
25417 (parse_start_decl, parse_union_decl): Use the same `multiple'
25418 message.
25419 (parse_union_decl, copy_guard, copy_action): Use the same
25420 `unmatched' message.
25421 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
25422
cfe5fbc0
AD
254232000-03-31 Akim Demaille <akim@epita.fr>
25424
25425 * src/files.c (tryopen, tryclose): Move to the top.
25426 Be static.
25427
cb7db13e
AD
254282000-03-31 Akim Demaille <akim@epita.fr>
25429
25430 * src/main.c (main): Don't call `done', exit does it.
25431
a0f6b076
AD
254322000-03-31 Akim Demaille <akim@epita.fr>
25433
36281465
AD
25434 * allocate.c: s/return (foo)/return foo/.
25435 * lalr.c: Likewise.
25436 * LR0.c: Likewise.
25437 * output.c: Likewise.
25438 * reader.c: Likewise.
25439 * symtab.c: Likewise.
25440 * vmsgetargs.c: Likewise.
25441
254422000-03-31 Akim Demaille <akim@epita.fr>
25443
25444 Clean up the error reporting functions.
a0f6b076
AD
25445
25446 * src/report.c: New file.
25447 * src/report.h: Likewise.
25448 * src/Makefile.am: Adjust.
25449 * m4/error.m4: New file.
25450 * m4/Makefile.am: Adjust.
25451 * configure.in (jm_PREREQ_ERROR): Call it.
25452 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
25453 Remove.
25454 (fatal, fatals): Remove. All callers use complain.c::fatal.
25455 (warn, warni, warns, warnss, warnss): Remove. All callers use
25456 complain.c::complain.
25457 (toomany): Remove, use fatal instead.
25458 * src/files.c (done): No argument, use complain_message_count.
25459 * src/main.c (main): Register `done' to `atexit'.
25460
25461 * src/getargs.c (usage): More `fputs', less `fprintf'.
25462
18539825
AD
254632000-03-28 Akim Demaille <akim@epita.fr>
25464
25465 * lib/: New directory.
25466 * Makefile.am (SUBDIRS): Adjust.
25467 * configure.in: Adjust.
25468 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
25469 useless.
25470 * src/alloca.c: Moved to lib/.
25471 * src/getopt.c: Likewise.
25472 * src/getopt1.c: Likewise.
25473 * src/getopt.h: Likewise.
25474 * src/ansi2knr.c: Likewise.
25475 * src/ansi2knr.1: Likewise.
25476 * src/Makefile.am: Adjust.
25477 * lib/Makefile.am: New file.
25478
9f306f2a
AD
254792000-03-28 Akim Demaille <akim@epita.fr>
25480
25481 * src/getargs.c (usage): Refresh the help message.
25482
0ba347b6
AD
254832000-03-17 Akim Demaille <akim@epita.fr>
25484
25485 * src/getopt1.c: Updated from textutils 2.0e
25486 * src/getopt.c: Likewise.
25487 * src/getopt.h: Likewise.
25488
dbe7f271
AD
254892000-03-17 Akim Demaille <akim@epita.fr>
25490
25491 * src/Makefile.am (bison.simple): Fix the awk program: quote only
25492 the file name, not the whole `#line LINE FILE'.
25493
75bbe78d
AD
254942000-03-17 Akim Demaille <akim@epita.fr>
25495
25496 On syntax errors, report the token on which we choked.
25497
aa5fd0ee
AD
25498 * src/bison.s1 (yyparse): In the label yyerrlab, when
25499 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 25500
7b306f52
AD
255012000-03-17 Akim Demaille <akim@epita.fr>
25502
aa5fd0ee 25503 * src/reader.c (copy_at): New function.
7b306f52
AD
25504 (copy_guard): Use it.
25505 (copy_action): Use it.
25506
e87b5700
AD
255072000-03-17 Akim Demaille <akim@epita.fr>
25508
25509 Be kind to translators, save some useless translations.
25510
aa5fd0ee 25511 * src/main.c (banner): New function.
e87b5700
AD
25512 (fatal_banner): Use it.
25513 (warn_banner): Use it.
25514
ae3c3164
AD
255152000-03-17 Akim Demaille <akim@epita.fr>
25516
aa5fd0ee
AD
25517 * src/reader.c (copy_definition): Use copy_string and
25518 copy_comment. Removed now unused `match', `ended',
25519 `cplus_comment'.
ae3c3164
AD
25520 (copy_comment, copy_string): Moved, to be visible from
25521 copy_definition.
25522
4dc58e7c
AD
255232000-03-17 Akim Demaille <akim@epita.fr>
25524
aa5fd0ee
AD
25525 * src/reader.c (copy_string): Declare `static inline'. No
25526 problems with inline, since it is checked by configure.
4dc58e7c
AD
25527 (copy_comment): Likewise.
25528
0a6384c4
AD
255292000-03-17 Akim Demaille <akim@epita.fr>
25530
aa5fd0ee 25531 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 25532
3cef001a
AD
255332000-03-17 Akim Demaille <akim@epita.fr>
25534
aa5fd0ee 25535 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
25536 (copy_action): Use it. Removed now unused `match', `ended',
25537 `cplus_comment'.
25538 (copy_guard): Likewise.
25539
ca36d2ef
AD
255402000-03-17 Akim Demaille <akim@epita.fr>
25541
aa5fd0ee 25542 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
25543 (copy_action): Use it.
25544 (copy_guard): Likewise.
25545
6666f98f
AD
255462000-03-17 Akim Demaille <akim@epita.fr>
25547
25548 Change the handling of @s so that they behave exactly like $s.
25549 There is now a pseudo variable @$ (readble and writable), location
25550 of the lhs of the rule (by default ranging from the location of
25551 the first symbol of the rhs, to the location of the last symbol,
25552 or, if the rhs is empty, YYLLOC).
25553
25554 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
25555 yyval.
25556 (yyparse): When providing a default semantic action, provide a
25557 default location action.
25558 (after the $): No longer change `*YYLSP', just stack YYLOC the
25559 same way you stack YYVAL.
25560 * src/reader.c (read_declarations): Use warns.
25561 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
25562 (copy_action, case '@'): Likewise.
25563 Use a standard error message, to save useless work from
25564 translators.
25565
41aca2e0
AD
255662000-03-17 Akim Demaille <akim@epita.fr>
25567
aa5fd0ee
AD
25568 * src/bison.s1: Formatting and cosmetics changes.
25569 * src/reader.c: Likewise.
41aca2e0
AD
25570 Update the Copyright notice.
25571
dc08c1d5
AD
255722000-03-17 Akim Demaille <akim@epita.fr>
25573
aa5fd0ee
AD
25574 * src/bison.s1 (#line): All set to `#line' only, since the
25575 Makefile now handles them.
dc08c1d5 25576
9ee3c97b
AD
255772000-03-16 Akim Demaille <akim@epita.fr>
25578
25579 * src/output.c (output_rule_data): Output the documentation of
25580 some of the tables.
25581 (Copyright notice): Update.
25582 Formatting changes.
25583
0de741ca
AD
255842000-03-16 Akim Demaille <akim@epita.fr>
25585
25586 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
25587 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
25588 One `#if YYDEBUG' remains, since it uses variables which are
25589 defined only if `YYDEBUG != 0'.
25590
bb10be54
AD
255912000-03-16 Akim Demaille <akim@epita.fr>
25592
25593 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
25594 and related variables so that the similarities are highlighted.
25595
b07b484a
AD
255962000-03-16 Akim Demaille <akim@epita.fr>
25597
25598 * src/bison.s1: Properly indent CPP directives.
25599
361f60b3
AD
256002000-03-16 Akim Demaille <akim@epita.fr>
25601
25602 * src/bison.s1: Properly indent the `alloca' CPP section.
25603
8c44d3ec
AD
256042000-03-16 Akim Demaille <akim@epita.fr>
25605
25606 Do not hard code values of directories in `configure.in'.
25607 Update the `configure' tool chain.
25608
25609 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25610 src/makefile.am.
25611 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25612 (AC_OUTPUT): Add m4/Makefile.
25613 Bump to bison 1.28a, 1.29 has never been released.
25614 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25615 handled via src/Makefile.am.
25616 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25617 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25618 autoheader.
25619 * Makefile.am (SUBDIRS): Add m4.
25620 (ACLOCAL_AM_FLAGS): New variable.
25621 (AUTOMAKE_OPTIONS): Add check-news.
25622 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25623 the proper line number and file name.
25624 (DEFS): Propagate the location of bison library files and of the
25625 locale files.
25626 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25627 builddir.
25628 * acinclude.m4: Remove, replaced by the directory m4.
25629 * m4/Makefile.am (EXTRA_DIST): New variable.
25630 * m4/gettext.m4: New file, from the fileutils.
25631 * m4/lcmessage.m4: Likewise
25632 * m4/progtest.m4: Likewise.
25633 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25634
f95997e7
AD
256352000-03-10 Akim Demaille <akim@epita.fr>
25636
25637 * src/closure.c:
25638 Formatting changes of various comments.
25639 Respect the GNU coding standards at various places.
25640 Don't use `_()' when no translation is needed.
25641
256421999-12-13 Jesse Thilo <jthilo@gnu.org>
25643
25644 * src/files.c:
25645 OS/2 honors TMPDIR environment variable.
25646
256471999-12-13 Jesse Thilo <jthilo@gnu.org>
25648
25649 * doc/bison.texinfo: Tweaked spelling and grammar.
25650 Updated ISBN.
25651 Removed reference to price of printed copy.
25652 Mention BISON_SIMPLE and BISON_HAIRY.
25653
256541999-12-13 Jesse Thilo <jthilo@gnu.org>
25655
25656 * configure.in, NEWS:
25657 Bison 1.29 released.
25658
256591999-10-27 Jesse Thilo <jthilo@gnu.org>
25660
25661 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25662 Added reference card.
25663
256641999-07-26 Jesse Thilo <jthilo@gnu.org>
25665
25666 * po/ru.po: Added Russian translation.
25667
256681999-07-26 Jesse Thilo <jthilo@gnu.org>
25669
25670 * configure.in: Added Russian translation.
25671
256721999-07-06 Jesse Thilo <jthilo@gnu.org>
25673
25674 * configure.in, NEWS, README:
25675 Released version 1.28.
25676
256771999-06-14 Jesse Thilo <jthilo@gnu.org>
25678
25679 * src/system.h:
25680 Squashed redefinition warning on some systems.
25681
25682 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25683 Have configure build version string instead of relying on ANSI string
25684 concatentation.
25685
256861999-06-14 Jesse Thilo <jthilo@gnu.org>
25687
25688 * po/POTFILES.in: Got rid of version.c.
25689
256901999-06-14 Jesse Thilo <jthilo@gnu.org>
25691
25692 * acconfig.h, configure.in:
25693 Have configure build version string instead of relying on ANSI string
25694 concatentation.
25695
256961999-06-08 Jesse Thilo <jthilo@gnu.org>
25697
25698 * doc/bison.1:
25699 Dropped mention of `+' for long-named options.
25700
257011999-05-30 Jesse Thilo <jthilo@gnu.org>
25702
25703 * src/files.c: Added <unistd.h> for unlink().
25704
25705 * src/Makefile.am, src/system.h:
25706 I18n fixes.
25707
257081999-05-30 Jesse Thilo <jthilo@gnu.org>
25709
25710 * README: Added a FAQ list.
25711
25712 * configure.in, acconfig.h:
25713 I18n fixes.
25714
257151999-05-30 Jesse Thilo <jthilo@gnu.org>
25716
25717 * doc/FAQ, doc/Makefile.am:
25718 Added a FAQ list.
25719
257201999-05-19 Jesse Thilo <jthilo@gnu.org>
25721
25722 * src/alloc.h, src/symtab.h, src/version.c:
25723 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25724
257251999-04-18 Jesse Thilo <jthilo@gnu.org>
25726
25727 * src/.cvsignore, src/Makefile.am:
25728 Reorganized: sources in `src', documentation in `doc'.
25729
25730 * src/lex.c (literalchar):
25731 fixed the code for escaping double quotes (thanks
25732 Jonathan Czisny.)
25733
257341999-04-18 Jesse Thilo <jthilo@gnu.org>
25735
25736 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25737 Adjusted paths to reflect directory reorganization.
25738
257391999-04-18 Jesse Thilo <jthilo@gnu.org>
25740
25741 * doc/.cvsignore, doc/Makefile.am:
25742 Reorganized: sources in `src', documentation in `doc'.
25743
257441999-04-18 Jesse Thilo <jthilo@gnu.org>
25745
25746 * configure.in:
25747 Updated AC_INIT file to reflect directory reorganization.
25748
25749 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25750 Reorganized: sources in `src', documentation in `doc'.
25751
257521999-04-13 Jesse Thilo <jthilo@gnu.org>
25753
25754 * src/allocate.c:
25755 Don't declare calloc() and realloc() if not necessary.
25756
257571999-04-13 Jesse Thilo <jthilo@gnu.org>
25758
25759 * configure.in, acconfig.h, acinclude.m4:
25760 Don't declare calloc() and realloc() if not necessary.
25761
257621999-03-23 Jesse Thilo <jthilo@gnu.org>
25763
25764 * po/.cvsignore: Added i18n support.
25765
257661999-03-23 Jesse Thilo <jthilo@gnu.org>
25767
25768 * acconfig.h, configure.in, Makefile.am:
25769 Added i18n support.
25770
257711999-03-22 Jesse Thilo <jthilo@gnu.org>
25772
25773 * src/bison.s1: Fixed #line numbers.
25774
257751999-03-15 Jesse Thilo <jthilo@gnu.org>
25776
25777 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25778 Added PO files from Translation Project.
25779
257801999-03-03 Jesse Thilo <jthilo@gnu.org>
25781
25782 * Makefile.am:
25783 Added support for non-ANSI compilers (ansi2knr).
25784
257851999-02-16 Jesse Thilo <jthilo@gnu.org>
25786
25787 * configure.in: Bumped version number to 1.27.
25788
25789 * Makefile.am:
25790 Added `bison.simple' to list of files removed by `make distclean'.
25791
257921999-02-12 Jesse Thilo <jthilo@gnu.org>
25793
25794 * src/files.c, src/files.h:
25795 Defined locations of parser files in config.h instead of Makefile.
25796
257971999-02-12 Jesse Thilo <jthilo@gnu.org>
25798
25799 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25800 Defined locations of parser files in config.h instead of Makefile.
25801
258021999-02-09 Jesse Thilo <jthilo@gnu.org>
25803
25804 * Makefile.am:
25805 Removed inappropriate use of $< macro.
25806
258071999-02-05 Jesse Thilo <jthilo@gnu.org>
25808
25809 * po/Makefile.in.in, po/POTFILES.in:
25810 Add `po' directory skeleton.
25811
258121999-01-27 Jesse Thilo <jthilo@gnu.org>
25813
25814 * README: Document help-bison list.
25815
25816 * configure.in: Add check for mkstemp().
25817
258181999-01-20 Jesse Thilo <jthilo@gnu.org>
25819
25820 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25821 Hush a few compiler warnings.
25822
25823 * src/files.c:
25824 Add tryclose(), which verifies that fclose was successful.
25825 Hush a couple of compiler warnings.
25826
258271999-01-20 Jesse Thilo <jthilo@gnu.org>
25828
25829 * Makefile.am, OChangeLog:
25830 ChangeLog is now automatically generated. Include the old version as
25831 OChangeLog.
25832
258331999-01-14 Jesse Thilo <jthilo@gnu.org>
25834
25835 * 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:
25836 Update FSF address.
25837
258381999-01-14 Jesse Thilo <jthilo@gnu.org>
25839
25840 * doc/bison.texinfo: Fix formatting glitch.
25841
25842 * doc/bison.texinfo: Update FSF address.
25843
258441999-01-14 Jesse Thilo <jthilo@gnu.org>
25845
25846 * acconfig.h: Update FSF address.
25847
258481999-01-08 Jesse Thilo <jthilo@gnu.org>
25849
25850 * src/system.h:
25851 Don't define PACKAGE here, since config.h defines it.
25852
258531998-12-30 Jesse Thilo <jthilo@gnu.org>
25854
25855 * src/reader.c: Update copyright date.
25856
25857 * src/main.c:
25858 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25859 favor of output directly to stderr (avoids buffer overruns).
25860
25861 * src/reader.c: Some checks for premature EOF.
25862
25863 * 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:
25864 Use prototypes if the compiler understands them.
25865
25866 * src/files.c: Honor TMPDIR on Unix hosts.
25867 Use prototypes if the compiler understands them.
25868
25869 * src/reader.c:
25870 Fix a couple of buffer overrun bugs.
25871 Use prototypes if the compiler understands them.
25872
25873 * src/system.h: Include unistd.h and ctype.h.
25874 Use #ifdef instead of #if for NLS symbols.
25875
258761998-12-30 Jesse Thilo <jthilo@gnu.org>
25877
25878 * doc/bison.texinfo:
25879 Delete comment "consider using @set for edition number, etc..." since
25880 we now are doing so.
25881
258821998-12-30 Jesse Thilo <jthilo@gnu.org>
25883
25884 * configure.in:
25885 Use prototypes if the compiler understands them.
25886
25887 * NEWS: Document 1.26 highlights.
25888
25889 * Makefile.am: Require Automake 1.3 or later.
25890
25891 * acconfig.h:
25892 Use prototypes if the compiler understands them.
25893
258941998-12-29 Jesse Thilo <jthilo@gnu.org>
25895
25896 * src/version.c:
25897 Use VERSION symbol from automake for version number.
25898
258991998-12-29 Jesse Thilo <jthilo@gnu.org>
25900
25901 * acconfig.h, configure.in, version.cin:
25902 Use VERSION symbol from automake for version number.
25903
259041998-11-28 Jesse Thilo <jthilo@gnu.org>
25905
25906 * Makefile.am:
25907 Distribute original version of simple parser (bison.s1), not built
25908 version (bison.simple).
25909
259101998-11-28 Jesse Thilo <jthilo@gnu.org>
25911
25912 * doc/bison.texinfo: Add info dir entry.
25913
25914 * doc/bison.texinfo:
25915 Let automake put version number into documentation.
25916
259171998-11-26 Jesse Thilo <jthilo@gnu.org>
25918
25919 * src/bison.cld, src/build.com, src/vmshlp.mar:
25920 Add non-RCS files from /gd/gnu/bison.
25921
259221998-11-26 Jesse Thilo <jthilo@gnu.org>
25923
25924 * doc/bison.1:
25925 Document the BISON_HAIRY and BISON_SIMPLE variables.
25926
259271998-11-25 Jesse Thilo <jthilo@gnu.org>
25928
25929 * src/version.c: Build version.c automatically.
25930
25931 * src/reader.c:
25932 Fix token numbering (used to start at 258, not 257).
25933
25934 * src/system.h: Include config.h.
25935
25936 * src/getargs.c: Update bug report address.
25937
25938 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25939 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25940
259411998-11-25 Jesse Thilo <jthilo@gnu.org>
25942
25943 * Makefile.am:
25944 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25945
25946 * configure.in, version.cin:
25947 Build version.c automatically.
25948
25949 * AUTHORS: Add AUTHORS file.
25950
25951 * README: Update bug report address.
25952
25953 * bison.simple:
25954 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25955
25956 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25957 Add automake stuff.
25958
259591998-11-25 Jesse Thilo <jthilo@gnu.org>
25960
25961 * doc/bison.texinfo: Clean up some formatting.
25962
259631998-05-05 Richard Stallman <rms@gnu.org>
25964
25965 * doc/bison.texinfo:
25966 Explain better why to make a pure parser.
25967
259681998-01-05 Richard Stallman <rms@gnu.org>
25969
25970 * src/files.c (openfiles):
25971 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25972 find a temporary directory, if possible. Do not unlink files while
25973 they are open.
25974
259751997-08-25 Richard Stallman <rms@gnu.org>
25976
25977 * src/reader.c (stack_offset;):
25978 Change some warni to warns.
25979
25980 * src/lex.c (literalchar): Use warns, not warni.
25981
259821997-06-28 Richard Stallman <rms@gnu.org>
25983
25984 * src/bison.s1: Add a Bison version comment.
25985
25986 * src/main.c (fatal, warn, berror):
25987 Use program_name.
25988
259891997-06-28 Richard Stallman <rms@gnu.org>
25990
25991 * Makefile.in (bison_version): New variable.
25992 (dist): Use that variable.
25993 (bison.s1): Substitute the Bison version into bison.simple.
25994
25995 * bison.simple: Add a Bison version comment.
25996
259971997-06-18 Richard Stallman <rms@gnu.org>
25998
25999 * src/main.c (fatal, warn, berror):
26000 Make error messages standard.
26001 (toomany): Improve error message text.
26002
26003 * 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:
26004 new.h renamed to alloc.h.
26005
260061997-06-18 Richard Stallman <rms@gnu.org>
26007
26008 * Makefile.in: new.h renamed to alloc.h.
26009
260101997-05-24 Richard Stallman <rms@gnu.org>
26011
26012 * src/lex.c (literalchar):
26013 Fix the code for escaping \, " and '.
26014
26015 (lex): Avoid trouble when there are many chars
26016 to discard in a char literal with just several chars in it.
26017
260181997-05-17 Richard Stallman <rms@gnu.org>
26019
26020 * src/bison.s1:
26021 Use malloc, if using alloca is troublesome.
26022 (YYSTACK_USE_ALLOCA): New flag macro.
26023 Define it for some systems and compilers.
26024 (YYSTACK_ALLOC): New macro.
26025 (yyparse): Use YYSTACK_ALLOC to allocate stack.
26026 If it was malloc'd, free it.
26027
260281997-05-17 Richard Stallman <rms@gnu.org>
26029
26030 * bison.simple:
26031 Use malloc, if using alloca is troublesome.
26032 (YYSTACK_USE_ALLOCA): New flag macro.
26033 Define it for some systems and compilers.
26034 (YYSTACK_ALLOC): New macro.
26035 (yyparse): Use YYSTACK_ALLOC to allocate stack.
26036 If it was malloc'd, free it.
26037
260381997-04-23 Richard Stallman <rms@gnu.org>
26039
26040 * src/bison.s1:
26041 (alloca) [__hpux]: Always define as __builtin_alloca.
26042
260431997-04-23 Richard Stallman <rms@gnu.org>
26044
26045 * bison.simple:
26046 (alloca) [__hpux]: Always define as __builtin_alloca.
26047
260481997-04-22 Richard Stallman <rms@gnu.org>
26049
26050 * src/bison.s1:
26051 [__hpux]: Include alloca.h (right for HPUX 10)
26052 instead of declaring alloca (right for HPUX 9).
26053
26054 * src/bison.s1 (__yy_memcpy):
26055 Declare arg `count' as unsigned int.
26056 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
26057
260581997-04-22 Richard Stallman <rms@gnu.org>
26059
26060 * bison.simple:
26061 [__hpux]: Include alloca.h (right for HPUX 10)
26062 instead of declaring alloca (right for HPUX 9).
26063
26064 * bison.simple (__yy_memcpy):
26065 Declare arg `count' as unsigned int.
26066 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
26067
260681997-01-03 Richard Stallman <rms@gnu.org>
26069
26070 * src/allocate.c: [__STDC__ or _MSC_VER]:
26071 Declare calloc and realloc to return void *.
26072
260731997-01-02 Richard Stallman <rms@gnu.org>
26074
26075 * src/system.h:
26076 [_MSC_VER]: Include stdlib.h and process.h.
26077 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
26078
26079 * src/main.c (main): Return FAILURE as a value.
26080 (printable_version): Declare arg as int, not char.
26081
260821997-01-02 Richard Stallman <rms@gnu.org>
26083
26084 * Makefile.in (dist):
26085 Explicitly check for symlinks, and copy them.
26086
260871996-12-19 Richard Stallman <rms@gnu.org>
26088
26089 * src/files.c:
26090 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
26091
260921996-12-18 Paul Eggert <eggert@gnu.org>
26093
26094 * src/bison.s1 (yyparse):
26095 If __GNUC__ and YYPARSE_PARAM are both defined,
26096 declare yyparse to have a void * argument.
26097
260981996-12-18 Paul Eggert <eggert@gnu.org>
26099
26100 * bison.simple (yyparse):
26101 If __GNUC__ and YYPARSE_PARAM are both defined,
26102 declare yyparse to have a void * argument.
26103
261041996-12-17 Richard Stallman <rms@gnu.org>
26105
26106 * src/reduce.c (nbits): Add some casts.
26107
261081996-08-12 Richard Stallman <rms@gnu.org>
26109
26110 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
26111
261121996-08-12 Richard Stallman <rms@gnu.org>
26113
26114 * bison.simple: Test _MSDOS as well as _MSDOS_.
26115
261161996-07-31 Richard Stallman <rms@gnu.org>
26117
26118 * src/bison.s1:
26119 [__sun && __i386]: Include alloca.h.
26120
261211996-07-31 Richard Stallman <rms@gnu.org>
26122
26123 * bison.simple:
26124 [__sun && __i386]: Include alloca.h.
26125
261261996-07-30 Richard Stallman <rms@gnu.org>
26127
26128 * src/bison.s1: Comment change.
26129
26130 * src/bison.s1: Test _MSDOS_, not MSDOS.
26131
261321996-07-30 Richard Stallman <rms@gnu.org>
26133
26134 * bison.simple: Comment change.
26135
26136 * bison.simple: Test _MSDOS_, not MSDOS.
26137
261381996-06-01 Richard Stallman <rms@gnu.org>
26139
26140 * 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:
26141 Insert `_' macro around many string constants.
26142
26143 * src/main.c:
26144 Insert `_' macro around many string constants.
26145
26146 (main): Call setlocale, bindtextdomain and textdomain.
26147
26148 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
26149 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
26150 [ENABLE_NLS]: Include libintl.h.
26151 [ENABLE_NLS] (gettext): Define.
26152 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
26153 (N_, PACKAGE, LOCALEDIR): New macros.
26154
261551996-06-01 Richard Stallman <rms@gnu.org>
26156
26157 * POTFILES.in: New file.
26158
26159 * Makefile.in (allocate.o):
26160 Define target explicitly.
26161
26162 * Makefile.in (CFLAGS): Set to @CFLAGS@.
26163 (LDFLAGS): Set to @LDFLAGS@.
26164 (configure): Run autoconf only if preceding `cd' succeeds.
26165 (bison.s1): Redirect output to temporary file then move the
26166 temporary to the target, rather than redirecting directly to bison.s1.
26167 (clean): Remove config.status and config.log.
26168 (distclean): Don't remove config.status here.
26169
261701996-05-12 Richard Stallman <rms@gnu.org>
26171
26172 * src/bison.s1:
26173 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
26174
261751996-05-12 Richard Stallman <rms@gnu.org>
26176
26177 * bison.simple:
26178 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
26179
261801996-05-11 Richard Stallman <rms@gnu.org>
26181
26182 * src/bison.s1 (__yy_memcpy):
26183 Really reorder the args, as was supposedly done on Feb 14 1995.
26184 (yyparse): Calls changed accordingly.
26185
261861996-05-11 Richard Stallman <rms@gnu.org>
26187
26188 * Makefile.in (dist): Don't use $(srcdir).
26189
26190 * bison.simple (__yy_memcpy):
26191 Really reorder the args, as was supposedly done on Feb 14 1995.
26192 (yyparse): Calls changed accordingly.
26193
261941996-01-27 Richard Stallman <rms@gnu.org>
26195
26196 * src/output.c (output_rule_data):
26197 Test YYERROR_VERBOSE in the conditional
26198 around the definition of ttyname.
26199
262001995-12-29 Richard Stallman <rms@gnu.org>
26201
26202 * src/bison.s1:
26203 Fix line numbers in #line commands.
26204
262051995-12-29 Richard Stallman <rms@gnu.org>
26206
26207 * bison.simple:
26208 Fix line numbers in #line commands.
26209
262101995-12-27 Richard Stallman <rms@gnu.org>
26211
26212 * src/bison.s1 (YYPARSE_PARAM_DECL):
26213 In C++, make it always null.
26214 (YYPARSE_PARAM_ARG): New macro.
26215 (yyparse): Use YYPARSE_PARAM_ARG.
26216
262171995-12-27 Richard Stallman <rms@gnu.org>
26218
26219 * bison.simple (YYPARSE_PARAM_DECL):
26220 In C++, make it always null.
26221 (YYPARSE_PARAM_ARG): New macro.
26222 (yyparse): Use YYPARSE_PARAM_ARG.
26223
262241995-11-29 Richard Stallman <rms@gnu.org>
26225
26226 * doc/bison.texinfo:
26227 Describe literal string tokens, %raw, %no_lines, %token_table.
26228
262291995-11-29 Daniel Hagerty <hag@gnu.org>
26230
26231 * doc/bison.texinfo: Fixed update date
26232
262331995-10-16 Richard Stallman <rms@gnu.org>
26234
26235 * src/version.c: Version 1.25.
26236
262371995-10-16 Richard Stallman <rms@gnu.org>
26238
26239 * NEWS: *** empty log message ***
26240
262411995-10-16 Richard Stallman <rms@gnu.org>
26242
26243 * doc/bison.1, doc/bison.rnh:
26244 Add new options.
26245
262461995-10-15 Richard Stallman <rms@gnu.org>
26247
26248 * src/vmsgetargs.c, src/getargs.c:
26249 Added -n, -k, and -raw switches.
26250 (noparserflag, toknumflag, rawtoknumflag): New variables.
26251
26252 * src/symtab.h (SALIAS):
26253 New #define for adding aliases to %token.
26254 (struct bucket): Added `alias' field.
26255
26256 * src/reduce.c (reduce_grammar):
26257 Revise error message.
26258 (print_notices): Remove final `.' from error message.
26259
26260 * src/reader.c (reader_output_yylsp):
26261 New function.
26262 (readgram): Use `#if 0' around code that accepted %command
26263 inside grammar rules: The documentation doesn't allow it,
26264 and it will fail since the %command processors scan for the next %.
26265 (parse_token_decl): Extended the %token
26266 declaration to allow a multi-character symbol as an alias.
26267 (parse_thong_decl): New function.
26268 (read_declarations): Added %thong declarations.
26269 (read_declarations): Handle NOOP to deal with allowing
26270 % declarations as another means to specify the flags.
26271 (readgram): Allow %prec prior to semantics embedded in a rule.
26272 (skip_to_char, read_declarations, copy_definition)
26273 (parse_token_decl, parse_start_decl, parse_type_decl)
26274 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
26275 (get_type_name, copy_guard, copy_action, readgram)
26276 (get_type, packsymbols): Revised most error messages.
26277 Changed `fatal' to `warnxxx' to avoid aborting for error.
26278 Revised and use multiple warnxxx functions to avoid using VARARGS1.
26279 (read_declarations): Improve the error message for
26280 an invalid character. Do not abort.
26281 (read_declarations, copy_guard, copy_action): Use
26282 printable_version to avoid unprintable characters in printed output.
26283 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
26284 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
26285 Allow the type of a non-terminal can be given
26286 more than once, as long as all specifications give the same type.
26287
26288 * src/output.c:
26289 (output_headers, output_trailers, output, output_gram)
26290 (output_rule_data): Implement noparserflag variable.
26291 Implement toknumflag variable.
26292 (output): Call reader_output_yylsp to output LTYPESTR.
26293
26294 * src/main.c (main):
26295 If reader sees an error, don't process the grammar.
26296 (fatals): Updated to not use VARARGS1.
26297 (printable_version, int_to_string, warn, warni, warns, warnss)
26298 (warnsss): New error reporting functions. Avoid abort for error.
26299
26300 * src/lex.h:
26301 Added THONG and NOOP for alias processing.
26302 Added SETOPT for the new code that allows setting options with %flags.
26303
26304 * src/lex.c:
26305 Include getopt.h. Add some extern decls.
26306 (safegetc): New function to deal with EOF gracefully.
26307 (literalchar); new function to deal with reading \ escapes.
26308 (lex): Use literalchar.
26309 (lex): Implemented "..." tokens.
26310 (literalchar, lex, parse_percent_token): Made tokenbuffer
26311 always contain the token. This includes growing the token
26312 buffer while reading an integer.
26313 (parse_percent_token): Replaced if-else statement with percent_table.
26314 (parse_percent_token): Added % declarations as another
26315 way to specify the flags -n, -l, and -r. Also added hooks for
26316 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
26317 major changes to files.c.
26318 (lex) Retain in the incoming stream a character following
26319 an incorrect '/'.
26320 (skip_white_space, lex): Revised most error messages
26321 and changed fatal to warn to avoid aborting.
26322 (percent_table): Added %thong declarations.
26323
26324 * src/gram.h: Comment changes.
26325
26326 * src/files.c (openfiles, open_extra_files, done):
26327 Add faction flag
26328 and actfile file. Handle noparserflag. Both for -n switch.
26329
26330 * src/conflicts.c (resolve_sr_conflict):
26331 Remove use of alloca.
26332
263331995-06-01 Jim Meyering <meyering@gnu.org>
26334
26335 * doc/bison.texinfo: *** empty log message ***
26336
263371995-05-06 Richard Stallman <rms@gnu.org>
26338
26339 * src/bison.s1: Comment change.
26340
263411995-05-06 Richard Stallman <rms@gnu.org>
26342
26343 * bison.simple: Comment change.
26344
263451995-05-03 Richard Stallman <rms@gnu.org>
26346
26347 * src/version.c: Version now 1.24.
26348
26349 * src/bison.s1: Change distribution terms.
26350
26351 * src/version.c: Version now 1.23.
26352
263531995-05-03 Richard Stallman <rms@gnu.org>
26354
26355 * doc/bison.texinfo:
26356 Rewrite "Conditions for Using Bison".
26357 Update version to 1.24.
26358
263591995-05-03 Richard Stallman <rms@gnu.org>
26360
26361 * bison.simple: Change distribution terms.
26362
263631995-02-23 Richard Stallman <rms@gnu.org>
26364
26365 * src/files.c: Test __VMS_POSIX as well as VMS.
26366
263671995-02-14 Jim Meyering <meyering@gnu.org>
26368
26369 * src/bison.s1 (__yy_memcpy):
26370 Renamed from __yy_bcopy to avoid
26371 confusion. Reverse FROM and TO arguments to be consistent with
26372 those of memcpy.
26373
263741995-02-14 Jim Meyering <meyering@gnu.org>
26375
26376 * bison.simple (__yy_memcpy):
26377 Renamed from __yy_bcopy to avoid
26378 confusion. Reverse FROM and TO arguments to be consistent with
26379 those of memcpy.
26380
263811994-11-10 David J. MacKenzie <djm@gnu.org>
26382
26383 * NEWS: reformat
26384
26385 * NEWS: New file.
26386
26387 * Makefile.in (DISTFILES): Include NEWS.
26388
26389 * Makefile.in (DISTFILES):
26390 Include install-sh, not install.sh.
26391
26392 * configure.in: Update to Autoconf v2 macro names.
26393
263941994-10-05 David J. MacKenzie <djm@gnu.org>
26395
26396 * Makefile.in: fix typo
26397
26398 * Makefile.in (prefix, exec_prefix):
26399 Let configure set them.
26400
264011994-09-28 David J. MacKenzie <djm@gnu.org>
26402
26403 * Makefile.in: Set datadir to $(prefix)/share.
26404
264051994-09-15 Richard Stallman <rms@gnu.org>
26406
26407 * src/bison.s1:
26408 Update copyright notice and GPL version.
26409
264101994-09-15 Richard Stallman <rms@gnu.org>
26411
26412 * bison.simple:
26413 Update copyright notice and GPL version.
26414
264151994-07-12 Richard Stallman <rms@gnu.org>
26416
26417 * src/reduce.c, src/reader.c:
26418 entered into RCS
26419
264201994-05-05 David J. MacKenzie <djm@gnu.org>
26421
26422 * Makefile.in: entered into RCS
26423
264241994-03-26 Richard Stallman <rms@gnu.org>
26425
26426 * src/bison.s1: entered into RCS
26427
264281994-03-26 Richard Stallman <rms@gnu.org>
26429
26430 * bison.simple: entered into RCS
26431
264321994-03-25 Richard Stallman <rms@gnu.org>
26433
26434 * src/main.c: entered into RCS
26435
264361994-03-24 Richard Stallman <rms@gnu.org>
26437
26438 * src/conflicts.c: entered into RCS
26439
264401994-01-02 Richard Stallman <rms@gnu.org>
26441
26442 * Makefile.in: *** empty log message ***
26443
264441993-11-21 Richard Stallman <rms@gnu.org>
26445
26446 * src/bison.s1: *** empty log message ***
26447
264481993-11-21 Richard Stallman <rms@gnu.org>
26449
26450 * doc/bison.texinfo: entered into RCS
26451
26452 * doc/bison.texinfo: *** empty log message ***
26453
264541993-11-21 Richard Stallman <rms@gnu.org>
26455
26456 * bison.simple: *** empty log message ***
26457
264581993-10-25 David J. MacKenzie <djm@gnu.org>
26459
26460 * doc/bison.texinfo: *** empty log message ***
26461
264621993-10-19 Richard Stallman <rms@gnu.org>
26463
26464 * src/bison.s1: *** empty log message ***
26465
264661993-10-19 Richard Stallman <rms@gnu.org>
26467
26468 * bison.simple: *** empty log message ***
26469
264701993-10-14 Richard Stallman <rms@gnu.org>
26471
26472 * src/bison.s1: *** empty log message ***
26473
264741993-10-14 Richard Stallman <rms@gnu.org>
26475
26476 * bison.simple: *** empty log message ***
26477
264781993-09-14 David J. MacKenzie <djm@gnu.org>
26479
26480 * doc/bison.texinfo: *** empty log message ***
26481
264821993-09-13 Noah Friedman <friedman@gnu.org>
26483
26484 * Makefile.in: *** empty log message ***
26485
264861993-09-10 Richard Stallman <rms@gnu.org>
26487
26488 * src/conflicts.c: *** empty log message ***
26489
26490 * src/system.h: entered into RCS
26491
264921993-09-10 Richard Stallman <rms@gnu.org>
26493
26494 * doc/bison.1: entered into RCS
26495
264961993-09-06 Noah Friedman <friedman@gnu.org>
26497
26498 * src/version.c: entered into RCS
26499
265001993-09-06 Noah Friedman <friedman@gnu.org>
26501
26502 * Makefile.in: *** empty log message ***
26503
265041993-07-30 David J. MacKenzie <djm@gnu.org>
26505
26506 * Makefile.in: *** empty log message ***
26507
265081993-07-24 Richard Stallman <rms@gnu.org>
26509
26510 * src/bison.s1: *** empty log message ***
26511
265121993-07-24 Richard Stallman <rms@gnu.org>
26513
26514 * bison.simple: *** empty log message ***
26515
265161993-07-08 David J. MacKenzie <djm@gnu.org>
26517
26518 * Makefile.in: *** empty log message ***
26519
265201993-07-04 Richard Stallman <rms@gnu.org>
26521
26522 * src/bison.s1: *** empty log message ***
26523
265241993-07-04 Richard Stallman <rms@gnu.org>
26525
26526 * bison.simple: *** empty log message ***
26527
265281993-06-26 David J. MacKenzie <djm@gnu.org>
26529
26530 * src/getargs.c: entered into RCS
26531
265321993-06-26 David J. MacKenzie <djm@gnu.org>
26533
26534 * doc/bison.texinfo: *** empty log message ***
26535
26536 * doc/bison.1: New file.
26537
265381993-06-25 Richard Stallman <rms@gnu.org>
26539
26540 * src/getargs.c: New file.
26541
265421993-06-16 Richard Stallman <rms@gnu.org>
26543
26544 * src/bison.s1: *** empty log message ***
26545
265461993-06-16 Richard Stallman <rms@gnu.org>
26547
26548 * bison.simple: *** empty log message ***
26549
265501993-06-03 Richard Stallman <rms@gnu.org>
26551
26552 * src/bison.s1: New file.
26553
265541993-06-03 Richard Stallman <rms@gnu.org>
26555
26556 * doc/bison.texinfo: *** empty log message ***
26557
265581993-06-03 Richard Stallman <rms@gnu.org>
26559
26560 * bison.simple: New file.
26561
265621993-05-19 Richard Stallman <rms@gnu.org>
26563
26564 * doc/bison.texinfo: New file.
26565
265661993-05-07 Noah Friedman <friedman@gnu.org>
26567
26568 * Makefile.in: *** empty log message ***
26569
265701993-04-28 Noah Friedman <friedman@gnu.org>
26571
26572 * src/reader.c: *** empty log message ***
26573
265741993-04-23 Noah Friedman <friedman@gnu.org>
26575
26576 * src/alloc.h: entered into RCS
26577
265781993-04-20 David J. MacKenzie <djm@gnu.org>
26579
26580 * src/version.c: *** empty log message ***
26581
26582 * src/files.c, src/allocate.c:
26583 entered into RCS
26584
26585 * src/reader.c: *** empty log message ***
26586
26587 * src/lex.c: entered into RCS
26588
26589 * src/conflicts.c: New file.
26590
26591 * src/symtab.c: entered into RCS
26592
26593 * src/alloc.h: New file.
26594
26595 * src/LR0.c: entered into RCS
26596
265971993-04-18 Noah Friedman <friedman@gnu.org>
26598
26599 * src/reader.c: New file.
26600
26601 * src/version.c: *** empty log message ***
26602
266031993-04-18 Noah Friedman <friedman@gnu.org>
26604
26605 * Makefile.in: *** empty log message ***
26606
266071993-04-17 Noah Friedman <friedman@gnu.org>
26608
26609 * Makefile.in: *** empty log message ***
26610
266111993-04-15 Richard Stallman <rms@gnu.org>
26612
26613 * src/main.c, src/files.c:
26614 New file.
26615
266161993-04-15 Noah Friedman <friedman@gnu.org>
26617
26618 * configure.in: entered into RCS
26619
26620 * configure.in: *** empty log message ***
26621
26622 * configure.in: New file.
26623
266241993-04-14 Richard Stallman <rms@gnu.org>
26625
26626 * Makefile.in: New file.
26627
266281993-04-13 Richard Stallman <rms@gnu.org>
26629
26630 * src/version.c: New file.
26631
266321993-03-25 Richard Stallman <rms@gnu.org>
26633
26634 * src/output.c: entered into RCS
26635
266361992-09-25 Richard Stallman <rms@gnu.org>
26637
26638 * configure.bat: entered into RCS
26639
266401992-06-22 Richard Stallman <rms@gnu.org>
26641
26642 * src/vmsgetargs.c: entered into RCS
26643
266441992-06-22 Richard Stallman <rms@gnu.org>
26645
26646 * doc/bison.rnh: entered into RCS
26647
266481992-04-20 David J. MacKenzie <djm@gnu.org>
26649
26650 * README: entered into RCS
26651
266521992-01-22 Richard Stallman <rms@gnu.org>
26653
26654 * src/machine.h: entered into RCS
26655
266561991-12-21 Richard Stallman <rms@gnu.org>
26657
26658 * src/lalr.c, src/closure.c:
26659 entered into RCS
26660
266611991-12-20 Richard Stallman <rms@gnu.org>
26662
26663 * src/state.h: entered into RCS
26664
266651991-12-18 Richard Stallman <rms@gnu.org>
26666
26667 * src/print.c, src/nullable.c, src/derives.c:
26668 entered into RCS
26669
266701991-11-03 David J. MacKenzie <djm@gnu.org>
26671
26672 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26673 entered into RCS
26674
266751988-09-09 Richard Stallman <rms@gnu.org>
26676
26677 * src/bison.hairy: entered into RCS
26678
266791987-12-16 Richard Stallman <rms@gnu.org>
26680
26681 * REFERENCES: entered into RCS
dc546b0f 26682
f294a2c2 26683
04098407 26684 -----
f294a2c2 26685
575619af
JD
26686 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26687 Inc.
f294a2c2 26688
04098407
PE
26689 Copying and distribution of this file, with or without
26690 modification, are permitted provided the copyright notice and this
26691 notice are preserved.