]> git.saurik.com Git - bison.git/blame - ChangeLog
tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
[bison.git] / ChangeLog
CommitLineData
9fc4c025
JD
12011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
2
3 tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
4 Reported by Jim Meyering at
5 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
6 * tests/actions.at
7 (Default %printer and %destructor for mid-rule values): Define
8 YYLLOC_DEFAULT so that it uses its Rhs argument.
9
67b8cfbd
JD
102011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
11
12 glr.c: omit yyresolveLocations when locations are disabled.
13 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
14 about yyresolveLocations's local yyrhsloc. When locations are
15 enabled, there's no such warning because YYLLOC_DEFAULT then uses
16 yyrhsloc. Reported by Jim Meyering at
17 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
18 * data/glr.c (yyresolveLocations): Omit definition when locations
19 are disabled.
20 (yyresolveValue): Omit yyresolveLocations invocation when
21 locations are disabled.
22
a801089c
JD
232011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
24
25 gnulib, autoconf: update.
26 * README-hacking (Updating a submodule): Give advice on how to
27 determine the versions of gnulib and autoconf to which we should
28 update.
29 (Release Procedure): Note that submodules should be updated.
30 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
31 suggested in updated gnulib NEWS.
32 * gnulib: Choose a stable snapshot according to advice in Bison's
33 README-hacking.
34 * po/POTFILES.in (lib/pipe.c): Rename to...
35 (lib/spawn-pipe.c): ... this.
36 * src/output.c: Update to include spawn-pipe.h.
37 * submodules/autoconf: Update to latest for improvement in m4.m4
38 that excludes M4 with buggy strstr. The only other changes to
39 files that we use are copyright updates.
40
2f658d53
JD
412011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
42
43 Fix missing updates to GPLv3.
44 Reported by Tys Lefering at
45 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
46 * src/print-xml.c, src/print-xml.h: In these files.
47
786743d5
JD
482011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
49
50 Add -Wconflicts-sr and -Wconflicts-rr.
51 Thus, conflict reports are now affected by -Werror and -Wnone
52 (unless %expect or %expect-rr is specified). Reported by George
53 Neuner at
54 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
55 * NEWS (2.5): Document.
56 * doc/bison.texinfo (Bison Options): Document.
57 * src/complain.c, src/complain.h (set_warning_issued): Export
58 function.
59 * src/conflicts.c (conflicts_print): Suppress conflict report
60 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
61 conflicts as errors if -Werror.
62 * src/getargs.c (warnings_flag): Initialize with
63 warnings_conflicts_sr and warnings_conflicts_rr as well.
64 (warnings_args, warnings_types): Add entries for
65 warnings_conflicts_sr and warnings_conflicts_rr.
66 (usage): Update.
67 * src/getargs.h (enum warnings): Add entries for
68 warnings_conflicts_sr and warnings_conflicts_rr.
69 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
70 group.
71 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
72 conflict report can produce a "warnings being treated as errors"
73 message. Also, check that stderr is now fully scrubbed by -Wnone
74 when the exit status is 0.
75
e4a14879
JD
762011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
77
78 Pacify maintainer-check-posix.
79 Adding command-line options after the grammar file name is not
80 permitted, so disable checks that do that when
81 maintainer-check-posix is running.
82 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
83 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
84 remove an unnecessary m4_if.
85
c39014ae
JD
862011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
87
88 Add -Wother so -Wnone suppresses all warnings.
89 Reported by George Neuner at
90 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
91 * NEWS (2.5): Document.
92 * THANKS (George Neuner): Add.
93 * doc/bison.texinfo (Bison Options): Document.
94 * src/complain.c, src/complain.h
95 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
96 (midrule_value_at): New warning function, similar to yacc_at in
97 that it's controlled by its own warning category.
98 * src/getargs.c (warnings_flag): Initialize to warnings_other.
99 (warnings_args, warnings_types): Add entry for warnings_other.
100 (usage): Update.
101 * src/getargs.h (enum warnings): Add entry for warnings_other.
102 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
103 don't print useless rules.
104 * src/reader.c (symbol_should_be_used): Rather than adjusting the
105 return value based on whether midrule value warnings are enabled,
106 accept a new parameter for telling the caller whether true is
107 being returned for a potential midrule warning.
108 (grammar_rule_check): Use midrule_value_at for midrule value
109 warnings, and continue to use warn_at for all other warnings. Let
110 them check whether the warnings are enabled.
111 * tests/local.at (AT_BISON_CHECK): Update documentation.
112 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
113 disable all warnings exercised in the test suite.
114
bf0e44e8
JD
1152011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
116
117 Don't let -Wnone disable -Werror.
118 Discussed at
119 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
120 * NEWS (2.5): Document.
121 * src/getargs.c (flags_argmatch): Accept a new argument that
122 specifies what flags "all" and thus "none" affect.
123 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
124 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
125 New test group.
126
86408959
JD
1272011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
128
129 * NEWS (2.5): Document fix for -Wno-CATEGORY.
130
709c7d11
JD
1312011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
132
133 doc: fix confusing citation of LAC publication.
134 Suggested by Akim Demaille.
135 * doc/bison.texinfo (LAC): Here.
136
f0ad1b2f
JD
1372011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
138
139 lr.default-reductions: rename "full" value to "most".
140 Unlike "consistent" and "accepting", "full" doesn't answer the
141 question of "which states".
142 * doc/bison.texinfo (%define Summary): Update.
143 (Default Reductions): Update.
144 * src/print.c (print_reductions): Update.
145 * src/reader.c (prepare_percent_define_front_end_variables):
146 Update.
147 * src/tables.c (action_row): Update.
148 * tests/input.at (%define enum variables): Update.
149 * tests/reduce.at (%define lr.default-reductions): Update.
150
f9d52903
JD
1512011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
152
153 * src/parse-gram.c, src/parse-gram.h: Regenerate.
154
a4d1bf6a
AD
1552011-03-09 Akim Demaille <akim@lrde.epita.fr>
156
157 named references: fix double free.
158 In `rhs[name]: "a" | "b"', do not free "name" twice.
159 Reported by Tys Lefering.
160 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
161 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
162 * src/parse-gram.y (current_lhs): Rename as...
163 (current_lhs_symbol): this.
164 (current_lhs): New function. Use it to free the current lhs
165 named reference.
166 * src/reader.c: Bind lhs to a copy of the current named reference.
167 * src/symlist.c: Rely on free (0) being valid.
168 * tests/named-refs.at: Test this.
169
17d7bf83
AD
1702011-03-09 Akim Demaille <akim@lrde.epita.fr>
171
172 tests: style changes.
173 * tests/named-refs.at (Redundant words in LHS brackets)
174 (Unresolved references): here.
175
02803d55
JD
1762011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
177
178 java: fix parser tracing bug.
179 * NEWS (2.5): Document.
180 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
181 element.
182
1a33f4f6
JD
1832011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
184
185 java: finish fixing parser stack popping bug.
186 * NEWS (2.5): Document.
187 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
188 in clearing the location stack. Also fix pop function that
189 accepts no arguments.
190
3f8ffd15
AB
1912011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
192
193 java: fix parser stack popping bug.
194 Reported at
195 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
196 * THANKS (Angelo Borsotti): Add.
197 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
198 in clearing the value stack. Previously, the top element of the
199 stack wasn't cleared and so the value was not garbage collected.
200
15e46f2d
JD
2012011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
202
203 doc: cite publication for LAC.
204 * doc/bison.texinfo (LAC): Here.
205
cc09e5be
JD
2062011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
207
208 doc: clean up terminology for mysterious conflicts.
209 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
210 (Mysterious Conflicts): ... this, which is already the section
211 title and the name used in the index. Update all cross-references
212 to this node. Also, don't imply that R/R conflicts are the only
213 kind of mysterious conflict.
214
32493bc8
JD
2152011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
216
217 lr.default-reductions: rename "all" value to "full".
218 States that shift the error token do not have default reductions,
219 and GLR disables some default reductions, so "all" was a misnomer.
220 * doc/bison.texinfo (%define Summary): Update.
221 (Default Reductions): Update.
222 * src/print.c (print_reductions): Update.
223 * src/reader.c (prepare_percent_define_front_end_variables):
224 Update.
225 * src/tables.c (action_row): Update.
226 * tests/input.at (%define enum variables): Update.
227 * tests/reduce.at (%define lr.default-reductions): Update.
228
7fceb615
JD
2292011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
230
231 doc: create a new Tuning LR section in the manual.
232 And clean up all other documentation of the features described
233 there.
234 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
235 bit, update the cross-references to the manual, and point out that
236 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
237 That is, as the referenced section in the manual documents, LAC
238 does not fix infinite parsing loops on syntax errors.
239 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
240 IELR, and LR in @cindex.
241 (%define Summary): Condense the entries for lr.default-reductions,
242 lr.keep-unreachable-states, lr.type, and parse.lac into brief
243 summaries, and cross-reference the appropriate subsections of
244 Tuning LR. For parse.lac, mention that it's only implemented for
245 deterministic parsers in C. In parse.error entry, mention LAC,
246 and add cross-reference to the LAC section.
247 (Error Reporting): When mentioning parse.error, mention LAC, and
248 add cross-reference to the LAC section.
249 (Tuning LR): New section with an extended version of the
250 documentation removed from %define Summary. Change all
251 cross-references in the manual to point here instead of there.
252 (Calc++ Parser): When mentioning parse.error, mention LAC, and add
253 cross-reference to the LAC section.
254 (Table of Symbols): In %error-verbose entry, add cross-reference
255 to Error Reporting.
256 (Glossary): Capitalize entry titles consistently. Add definitions
257 for "defaulted state" and "unreachable state". Expand IELR
258 acronym in IELR's entry.
259
5e528941
JD
2602011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
261
262 doc: add bibliography to manual.
263 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
264 bibliography instead of citing publications directly.
265 (Generalized LR Parsing): Likewise.
266 (Bibliography): New section. Not all entries are cross-referenced
267 yet, but that will come in future patches.
268
6771a463
JD
2692011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
270
271 java: test and document previous bug fix.
272 * NEWS (2.5): Document it.
273 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
274 invocations, pass a location that spans multiple tokens. Change
275 yyerror to report all of a location rather than just the begin
276 position. Extend yylex and Position to count tokens on a line.
277 Remove getHashCode as it's unused. Update all expected output.
278
aa3bcdf3
BK
2792011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
280
281 java: fix location handling bug.
282 Reported at
283 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
284 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
285 reversed access to location stack.
286 * THANKS (Bernd Kiefer): Add.
287
84072495
JD
2882011-02-13 Joel E. Denny <joeldenny@joeldenny.org>
289
290 doc: fix some minor inconsistencies.
291 * doc/bison.texinfo (%define Summary): Fix mislabeled entry for
292 lex_symbol.
293 (%code Summary): For consistency with the variable list in the
294 %define Summary, enclose the list of %code qualifiers in a table
295 instead of an itemize.
296
51151d91
JD
2972011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
298
299 doc: clean up new subsections in manual.
300 * doc/bison.texinfo (%define Summary): Reword so it reads well as
301 a separate section. For example, add an intro, and move most of
302 the text outside of the @deffn so it is not indented so far.
303 (%code Summary): Likewise.
304 (Table of Symbols): Reword %code entry to match the %code entry in
305 Decl Summary.
306
35c1e5f0
JD
3072011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
308
309 doc: finish splitting apart the manual's Decl Summary section.
310 Suggested by Akim Demaille at
311 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
312 * doc/bison.texinfo (Decl Summary): Extract most of the %define
313 entry into...
314 (%define Summary): ... this new subsection, and update all
315 cross-references. For readability of the patches, rewriting of
316 the text so it makes sense as a separate subsection will come in a
317 later patch. Moreover, the majority of the text describing the
318 various new LR features should likely move to another new section
319 somewhere.
320
e0c07222
JD
3212011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
322
323 doc: begin to split apart the manual's Decl Summary section.
324 Discussed in thread starting at
325 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
326 * doc/bison.texinfo (Decl Summary): Extract most of the %code
327 entry into...
328 (%code Summary): ... this new subsection, and update all
329 cross-references. For readability of the patches, rewriting of
330 the text so it makes sense as a separate subsection will come in a
331 later patch.
332
ff7571c0
JD
3332011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
334
335 doc: clean up naming of various Bison files.
336 The Bison manual's names for various files associated with a Bison
337 parser has devolved into inconsistency. This patch makes the
338 naming consistent for the most important files. First, it chooses
339 "grammar file" over "input file". The former appears to be more
340 traditional in the Bison manual, and Bison has other input
341 files (skeletons). Second, it chooses "parser implementation
342 file" over names like "parser file", "parser source file", "parser
343 source code file", and "parser output file". The new name makes
344 it clearer where Bison generates the main parser implementation,
345 and it is easily distinguishable from "parser header file".
346 * doc/bison.texinfo: Implement throughout.
347
679e9935
JD
3482011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
349
350 doc: give credit to more of Bison's developers.
351 * doc/bison.texinfo (Introduction): Don't imply that only Robert
352 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
353 Bison. However, I don't have time to write a full history, so
354 just point readers to THANKS and ChangeLog.
355
af28d414
JD
3562011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
357
358 doc: document experimental features better.
359 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
360 LR(1) are experimental. Mention Java. Normally experimental
361 features probably shouldn't be mentioned in the introduction.
362 However, if Bison's limitations to LALR(1), C, and C++ are so
363 important that they should be mentioned here, then it's important
364 to point out that Bison is beginning to escape those limitations.
365 Moreover, these particular experimental features have very little
366 chance of being removed.
367 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
368 experimental.
369
82f3355e
JD
3702011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
371
372 Do not allow identifiers that start with a dash.
373 This cleans up our previous fixes for a bug whereby Bison
374 discarded `.field' in `$-1.field'. The previous fixes were less
375 restrictive about where a dash could appear in an identifier, but
376 the restrictions were hard to explain. That bug was reported and
377 this final fix was originally suggested by Paul Hilfinger. This
378 also fixes a remaining bug reported by Paul Eggert whereby Bison
379 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
380 identifier. Now, `-' cannot be an identifier. Discussed in
381 threads beginning at
382 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
383 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
384 * NEWS (2.5): Update entry describing the dash extension to
385 grammar symbol names. Also, move that entry before the named
386 references entry because the latter mentions the former.
387 * doc/bison.texinfo (Symbol): Update documentation for symbol
388 names. As suggested by Paul Eggert, mention the effect of periods
389 and dashes on named references.
390 (Decl Summary): Update documentation for unquoted %define values,
391 which, as a side effect, can no longer start with dashes either.
392 * src/scan-code.l (id): Implement.
393 * src/scan-gram.l (id): Implement.
394 * tests/actions.at (Exotic Dollars): Extend test group to exercise
395 bug reported by Paul Hilfinger.
396 * tests/input.at (Symbols): Update test group, and extend to
397 exercise bug reported by Paul Eggert.
398 * tests/named-refs.at (Stray symbols in brackets): Update test
399 group.
400 ($ or @ followed by . or -): Likewise.
401 * tests/regression.at (Invalid inputs): Likewise.
402
fe3cae17
JD
4032011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
404
405 * data/yacc.c: Fix last apostrophe warning from xgettext.
406
3c9b20ff
PE
4072011-01-09 Paul Eggert <eggert@cs.ucla.edu>
408
409 Fix minor problems encountered by a fresh bootstrap.
410 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
411 as they confuse xgettext, which tries to parse them as C character
412 constants in a preprocessor directive.
413 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
414 that expression might not promote to int on some platforms.
415 * src/parse-gram.c, src/parse-gram.h: Regenerate.
416
5c9efc75
JD
4172011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
418
419 Improve error messages for `$' or `@' followed by `.' or `-'.
420 Previously, for this special case of an invalid reference, the
421 usual "symbol not found in production:" was printed. However,
422 because the symbol name was parsed as the empty string, that
423 message was followed immediately by a newline instead of a symbol
424 name. In reality, this is a syntax error, so the reference is
425 invalid regardless of the symbols actually appearing in the
426 production. Discussed at
427 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
428 * src/scan-code.l (parse_ref): Report the above case as a syntax
429 error. Other than that, continue to handle this case like any
430 other invalid reference that Bison manages to parse because
431 "possibly meant" messages can still be helpful to the user.
432 * tests/named-refs.at ($ or @ followed by . or -): New test group.
433
8a4281b9
JD
4342011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
435
436 doc: don't use @acronym.
437 Lately, many GNU packages are dropping it. See
438 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
439 * doc/bison.texinfo: Remove all uses.
440
e0319547
AR
4412011-01-05 Alex Rozenman <rozenman@gmail.com>
442
443 Do not allow identifiers that start with a negative number.
444 Reported by Paul Hilfinger as a side effect of named references
445 support at
446 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
447 Suggested by Paul Eggert.
448 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
449 * src/scan-gram.l ({letter}, {id}): Likewise.
450
15fe6bb4
JD
4512011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
452
453 * ChangeLog (2011-01-02): improve description.
454
355bdbdc
JD
4552011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
456
457 maint: don't update copyright years in bootstrap.
458 * .x-update-copyright: Add entry for bootstrap.
459 * bootstrap: Remove 2011 from copyright years. The bootstrap
460 version we're currently using comes from an older version of
461 gnulib.
462 * bootstrap.conf (bootstrap_sync): Add comments explaining this
463 issue.
464
575619af
JD
4652011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
466
467 maint: run "make update-copyright".
468
cb3f7f33
JD
4692011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
470
15fe6bb4 471 maint: prepare to use year ranges in copyright notices.
cb3f7f33 472 * README (Copyright statements): New section explaining the range
15fe6bb4
JD
473 notation. The GNU maintainers document requires this explanation:
474 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
475 I copied our explanation from coreutils.
cb3f7f33
JD
476 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
477 disabled Bison's automated use of ranges.
478 * cfg.mk (update-copyright-env): Likewise.
479
1eb63504
JD
4802011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
481
482 Correct my email address.
483 * ChangeLog: In all recent entries.
484 * THANKS (Joel E. Denny): Here.
485
4862010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
d397d9f0
JD
487
488 doc: cleanup.
489 * NEWS (2.5): Try to sort entries according to how interesting
490 users might find them.
491
1eb63504 4922010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
f1b238df
JD
493
494 doc: cleanup.
495 * NEWS (2.5): Make some minor improvements to wording, and format
496 entries more consistently.
497 * doc/bison.texinfo (Language and Grammar): Point out that IELR
498 and canonical LR are experimental features.
499 (Decl Summary): In list of %define variables, make wording more
500 consistent. Improve discussion of using LALR for GLR.
501
1eb63504 5022010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
fcf834f9
JD
503
504 parse.lac: document.
505 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
506 other corrections to verbose syntax error messages.
507 * doc/bison.texinfo (Decl Summary): Rewrite entries for
508 lr.default-reductions and lr.type to be clearer, to mention
509 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
510 for parse.lac.
511 (Glossary): Add entry for LAC.
512
1eb63504 5132010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
107844a3
JD
514
515 parse.lac: implement exploratory stack reallocations.
516 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
517 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
518 with values of "failures" (default) or "full".
519 (b4_declare_parser_state_variables): Add yyesa, yyes, and
520 yyes_capacity variables.
521 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
522 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
523 LAC requested.
524 (YYCOPY_NEEDED): New cpp macro.
525 (YYCOPY): Define if LAC requested.
526 (yy_lac_stack_realloc): New function implementing stack
527 reallocations. Use YYMAXDEPTH for maximum stack size given that
528 the stack should never need to grow larger than the main state
529 stack needs to grow without LAC.
530 (YY_LAC_ESTABLISH): Update yy_lac invocation.
531 (yy_lac): Add arguments for exploratory stack memory data
532 recorded in the main parser. Invoke yy_lac_stack_realloc when
533 reallocation is necessary.
534 (yysyntax_error): Add the same new arguments and pass them to
535 yy_lac.
536 (yypstate_delete): Free yyes if necessary.
537 (yyesa, yyes, yyes_capacity): #define these to yypstate members
538 in the case of push parsing.
539 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
540 Update yysyntax_error invocations. At yyreturn, free yyes if
541 necessary.
542 * src/parse-gram.y: %define parse.lac full.
543 * tests/input.at (LAC: errors for %define): Extend for
544 parse.lac-memory-trace.
545 * tests/regression.at (LAC: Exploratory stack): Extend to check
546 that stack reallocs happen when expected.
547 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
548 parse.lac.es-capacity-initial.
549
1eb63504 5502010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
bf35c71c
JD
551
552 parse.lac: implement as %define variable.
553 LAC = lookahead correction. See discussion at
554 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
555 However, one point there must be corrected: because of %nonassoc,
556 LAC is *not* always redundant for lr.type=canonical-lr.
557 * data/yacc.c: Accept values of "none" (default) or "full" for
558 parse.lac. Accept %define parse.lac.es-capacity to specify
559 capacity of LAC's temporary exploratory stack. It defaults to 20
560 and, for now, will not grow dynamically.
561 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
562 parse.lac!=none.
563 (YYBACKUP): Invoke YY_LAC_DISCARD.
564 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
565 yy_lac and track when it needs to be invoked
566 (yy_lac): New function that, given the current stack, determines
567 whether a token can eventually be shifted. Return status mimics
568 yyparse return status.
569 (yysyntax_error): Change yystate argument to yyssp so stack top
570 can be passed to yy_lac. If LAC is requested, build expected
571 token list by invoking yy_lac for every token instead of just
572 checking the current state for lookaheads. Return 2 if yy_lac
573 exhausts memory.
574 (yyparse, yypush_parse): Use local variable yy_lac_established and
575 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
576 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
577 is requested.
578 * tests/conflicts.at (%nonassoc and eof): Extend to check the
579 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
580 (parse.error=verbose and consistent errors): Likewise.
581 (LAC: %nonassoc requires splitting canonical LR states): New test
582 group demonstrating how LAC can fix canonical LR.
583 * tests/input.at (LAC: Errors for %define): New test group.
584 * tests/regression.at (LAC: Exploratory stack): New test group.
585 (LAC: Memory exhaustion): New test group.
586
1eb63504 5872010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
10bae98a
JD
588
589 build: use gnulib's new bootstrap_sync option.
590 Now, whenever we update bison's copy of gnulib, bootstrap will
591 update itself the next time it's run.
592 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
593 * bootstrap.conf (bootstrap_sync): Set to true.
594 * gnulib: Update to latest so bootstrap is in sync now.
595
1eb63504 5962010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
d2060f06
JD
597
598 yysyntax_error: fix for consistent error with lookahead.
599 * NEWS (2.5): Document.
600 * data/yacc.c (yysyntax_error): In a verbose syntax error
601 message while in a consistent state with a default action (which
602 must be an error action given that yysyntax_error is being
603 invoked), continue to drop the expected token list, but don't
604 drop the unexpected token unless there actually is no lookahead.
605 Moreover, handle that internally instead of returning 1 to tell
606 the caller to do it. With that meaning of 1 gone, renumber
607 return codes more usefully.
608 (yyparse, yypush_parse): Update yysyntax_error usage. Most
609 importantly, set yytoken to YYEMPTY when there's no lookahead.
610 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
611 unexpected token unless there actually is no lookahead.
612 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
613 pass yyempty_ not yyla.type to yysyntax_error_.
614 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
615 token unless there actually is no lookahead.
616 * data/lalr1.java (YYParser::parse): If there's no lookahead,
617 set yytoken to yyempty_ before invoking yysyntax_error.
618 (YYParser::yysyntax_error): Again, don't drop the unexpected
619 token unless there actually is no lookahead.
620 * tests/conflicts.at (parse.error=verbose and consistent
621 errors): Extend test group to further reveal how the previous
622 use of the simple "syntax error" message was too general. Test
623 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
624 failure.
625 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
626 to...
627 * tests/local.at: ... here.
628 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
629 (AT_BISON_OPTION_POPDEFS): Pop it.
630 (AT_FULL_COMPILE): Extend to handle Java.
631
1eb63504 6322010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
25a648d8
JD
633
634 yysyntax_error: more preparation for readability of next patch.
635 There are no behavioral changes here.
636 * data/glr.c (yyreportSyntaxError): Reorganize.
637 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
638 * tests/conflicts.at (parse.error=verbose and consistent errors):
639 Reorganize.
640
1eb63504 6412010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
b4bbc4a0
JD
642
643 yysyntax_error: prepare for readability of next patches.
644 These are purely whitespace changes that result in ugly code
645 but that make the next couple of patches much easier to read.
646 * data/glr.c (yyreportSyntaxError): Reindent.
647 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
648 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
649 * data/yacc.c (yysyntax_error): Reindent.
650
71431084
JD
6512010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
652
653 Fix memory leak.
654 * src/output.c (prepare_rules): Free temporary array.
655
34db451c
JD
6562010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
657
658 yysyntax_error: improve invocation readability.
659 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
660 invocation, get rid of the while loop, which is misleading
661 because there are really at most two iterations.
662
9d6bc5c4
JD
6632010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
664
665 * ChangeLog: Correct some errors in previous entries.
666
e503b9cb
JD
6672010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
668
669 maint: re-anchor all .gitignore entries.
670 * bootstrap: Copy from gnulib's latest for the fix to
671 automatically anchor entries it constructs.
672 * gnulib: Update to latest just so it has the same bootstrap.
673 * .gitignore, build-aux/.gitignore, doc/.gitignore:
674 * lib/.gitignore, m4/.gitignore, po/.gitignore:
675 * runtime-po/.gitignore: Re-anchor all entries.
676
95aed8db
PE
6772010-10-08 Paul Eggert <eggert@cs.ucla.edu>
678
8ff146cd
PE
679 Fix portability problem on OpenBSD 4.7.
680
681 Jim Meyering reported this in
682 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
683 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
684 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
685 for quite some time.
686 * src/parse-gram.c, src/parse-gram.h: Regenerate.
687 * tests/regression.at: Tamper with the renamed witness.
688
95aed8db
PE
689 Adjust to recent changes to gnulib bootstrap.
690
691 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
692 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
693 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
694 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
695 anymore and don't know of anybody else who does. If someone needs
696 these files, they can resurrect them.
697 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
698 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
699 Omit leading '/', since bootstrap omits it.
700 Adjust file names to match current contents better.
701 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
702 installed just for us.
703 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
704 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
705 needed somehow. Don't have time to look into why.
706 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
707 the GNU malloc behavior, where malloc (0) != NULL unless we're
708 out of storage? If not, we can omit malloc-gnu; but for now I left
709 it in to be safe.
710 (vc_ignore): Remove.
711 (gnulib_mk_hook): New function.
712 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
713 uses that convention.
714
39f5757a
PH
7152010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
716
717 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
718 possible change of value.
719
d467f443
PH
7202010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
721
722 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
723 compiler errors when using %debug.
724 Add declaration of yylow when locations in use to avoid compilation
725 error.
726 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
727 on whether we are in split mode, for consistency with behavior of
728 non-GLR parsing.
729
c49784f5
AD
7302010-09-01 Akim Demaille <demaille@gostai.com>
731
732 Address GCC warnings about shadowed local variables (yyflag).
733 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
734 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
735 yyrule, and yyflag.
736
64877e5e
JD
7372010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
738
739 Version 2.4.3.
740 * NEWS (2.4.3): Set date.
741
83af6585
JD
7422010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
743
744 maint: add gettext version to release announcements.
745 Suggested by Paul Hilfinger at
746 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
747 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
748 * cfg.mk (bootstrap-tools): Add gettext.
749
93d7dde9
JD
7502010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
751
752 doc: fix -W and %expect documentation some.
753 * NEWS (2.4.3): Mention that there are documentation fixes.
754 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
755 turns conflicts into errors not warnings.
756 (Shift/Reduce): Likewise.
757 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
758
2bfcac9a
JD
7592010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
760
761 -Werror: fix for rules useless in parser after conflicts.
762 * NEWS (2.4.3): Document fix.
763 * src/complain.c (error_message): Extend to handle incomplete
764 error messages so warn and warn_at can be used in more cases.
765 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
766 -Werror is always obeyed.
767 * src/reduce.c (reduce_print): Use warn so that the "warnings
768 being treated as errors" message is printed consistently before
769 the first warning message. This makes testing easier.
770 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
771 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
772 --warnings=error when warnings appear in bison's stderr.
773
c61d4fa1
JD
7742010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
775
776 maint: enable gnits only at stable releases.
777 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
778 version string should disable gnits. Explain in comments.
779
825c88e8
JD
7802010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
781
782 i18n: update.
783 * po/POTFILES.in: Add src/graphviz.c.
784
343c3db8
JD
7852010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
786
787 i18n: fix for gnulib.
788 * po/POTFILES.in: Add remaining gnulib files that have
789 translatable strings.
790
42765f8e
JD
7912010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
792
793 build: fix our adjustments for gnulib files in lib.
794 * configure.ac: For prepending lib/ to the values of config
795 variables, fix detection of empty values. Also, due to recent
796 gnulib changes, add LIBUNISTRING_UNITYPES_H and
797 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
798
e35bc778
JD
7992010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
800
801 maint: use announce-gen's new --mail-headers.
802 * HACKING (Announce): Update instructions.
803 * cfg.mk (announcement_Cc_): Define.
804 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
805 required by latest gnulib.
806 * gnulib: Update to latest.
807
b6ca79e8
JD
8082010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
809
810 tests: handle Valgrind that complains about >&-.
811 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
812 (Output files: -dv >&-): Skip test group if running
813 maintainer-check-valgrind.
814
ca2a6d15
PH
8152010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
816
817 * NEWS: Describe new semantic-predicate feature.
9d6bc5c4
JD
818 * data/c.m4 (b4_predicate_case): New definition.
819 * data/java.m4 (b4_predicate_case): New definition.
820 * data/glr.c (yyimmediate): Add definition.
821 (yydoAction): Remove comment, now obsolete.
822 Do YY_REDUCE_PRINT here.
823 (yyglrReduce): Alter comment to indicate that semantic values
824 need not be deferred.
825 Remove YY_REDUCE_PRINT from here; done in yydoAction.
826 (yyprocessOneStack): Pass immediate flag.
827 Delete stacks rejected by predicates in newly split-off parsers.
828 Change handling of yyerr so that only current stack gets deleted
829 when semantic predicate fails.
830 (yyfillin): Don't crash if a semantic value is unresolved (as may
831 happen in predicate rules).
832 Copy lr state as well in debugging mode.
833 Update comment on setting of yysval to include yyloc as well.
834 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
835 Report unresolved RHS values.
836 (yyimmediate): New table.
837 * src/gram.h (struct rule): Add is_predicate field.
838 * src/output.c (user_actions_output): Use b4_predicate_case for
839 predicates.
840 (prepare_symbols): Output yyimmediate.
841 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
842 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
843 argument.
844 * src/scan-code.h (struct code_props): Add is_predicate field.
845 (code_props_rule_action_init): New interface.
846 * src/parse-gram.y (%?{...}): New token.
847 (rhs): Add %?{...} rule.
848 * src/parse-gram.c: Regenerate.
849 * src/parse-gram.h: Regenerate.
850 * src/reader.c (grammar_current_rule_action_append): Add
851 immediate argument.
852 (grammar_midrule_action): Use new interface for
853 code_props_rule_action_init.
854 (grammar_current_rule_action_append): Ditto.
855 (packgram): Transfer is_predicate value.
856 * src/reader.h (grammar_current_rule_action_append): New interface.
857 * doc/bison.texinfo: Document semantic predicates (%?).
858
859 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
860 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
861 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
862 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
863 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
864 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
865 names in comments and mention all parameters.
866 (struct yyGLRState): Fix description of yyposn field.
867 (yyresolveLocations): Correct comment so as not to imply action when
868 yyn1==0.
c49784f5 869
7d424de1
PE
8702010-06-17 Paul Eggert <eggert@cs.ucla.edu>
871
804e83b2
PE
872 Update from GFDL GFDL 1.2 to 1.3.
873 * doc/bison.texinfo: Update GFDL version number.
874 * doc/fdl.texi: Update to version 1.3, taken from:
875 http://www.gnu.org/licenses/fdl.texi
876
7d424de1
PE
877 Do not use date ranges in copyright notices.
878 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
879
880 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
881 * TODO, bootstrap, bootstrap.conf:
882 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
883 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
884 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
885 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
886 * data/lalr1.java, data/local.mk, data/location.cc:
887 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
888 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
889 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
890 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
891 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
892 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
893 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
894 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
895 * examples/calc++/Makefile.am, examples/extexi:
896 * examples/local.mk, lib/abitset.c, lib/abitset.h:
897 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
898 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
899 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
900 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
901 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
902 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
903 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
904 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
905 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
906 * src/AnnotationList.c, src/AnnotationList.h:
907 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
908 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
909 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
910 * src/complain.h, src/conflicts.c, src/conflicts.h:
911 * src/derives.c, src/derives.h, src/files.c, src/files.h:
912 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
913 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
914 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
915 * src/location.c, src/location.h, src/main.c:
916 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
917 * src/named-ref.h, src/nullable.c, src/nullable.h:
918 * src/output.c, src/output.h, src/parse-gram.y:
919 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
920 * src/print_graph.c, src/print_graph.h, src/reader.c:
921 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
922 * src/relation.h, src/scan-code.h, src/scan-code.l:
923 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
924 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
925 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
926 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
927 * tests/actions.at, tests/atlocal.in, tests/c++.at:
928 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
929 * tests/existing.at, tests/glr-regression.at:
930 * tests/headers.at, tests/input.at, tests/java.at:
931 * tests/local.at, tests/local.mk, tests/named-refs.at:
932 * tests/output.at, tests/push.at, tests/reduce.at:
933 * tests/regression.at, tests/sets.at, tests/skeletons.at:
934 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
935 Don't use date ranges in copyright notices.
936
38435078
AD
9372010-05-11 Akim Demaille <demaille@gostai.com>
938
939 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
940 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
941 header file to the implementation file, after the user %code
942 sections.
943 * NEWS (2.5): Document this.
944
e944aaff
AD
9452010-05-11 Akim Demaille <demaille@gostai.com>
946
947 doc: please Emacs.
948 * doc/bison.texinfo (Local Variables): Move this after the
949 LocalWords, since the latter are looked for in the whole document,
950 while the former are looked for only at its end.
951 Require american spell checking.
952
86e5b440
AD
9532010-05-10 Akim Demaille <demaille@gostai.com>
954
955 doc: fix lalr1.cc documentation.
956 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
957 (C++ Bison Interface): Fix lalr1.cc skeleton name.
958 (C++ Parser Interface): Fix semantic_type and location_type names.
959 Document yy::parser::token.
960 Reported by Jerry Quinn.
961
bb9191dd
AD
9622010-05-10 Akim Demaille <demaille@gostai.com>
963
964 c++: use YYRHSLOC.
965 * data/lalr1.cc (YYRHSLOC): New.
966 (YYLLOC_DEFAULT): Use it.
967 * data/glr.cc: If location_type was user defined, do not include
968 location.hh, and do not produce location.hh and position.hh.
969 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
970 Check that glr.cc supports user defined location_type.
971 * NEWS: Document this.
972
8aec287e
AD
9732010-05-07 Akim Demaille <demaille@gostai.com>
974
975 doc: fix typo.
976 * tests/synclines.at: here.
977
c826013f
AD
9782010-05-04 Akim Demaille <demaille@gostai.com>
979
980 tests: enhance AT_SYNCLINES_COMPILE.
981 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
982 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
983 taken care of in AT_SYNCLINES_COMPILE.
984
7789b6e3
AD
9852010-05-04 Akim Demaille <demaille@gostai.com>
986
987 lalr1.cc: don't generate location.hh when location_type is defined
988 * data/bison.m4 (b4_percent_define_get): Accept a default value.
989 * data/c++.m4: Do not provide a default value for the %define
990 variable location_type, rather, use b4_percent_define_get with a
991 default argument where its value is needed.
992 * data/lalr1.cc: Do not load location.cc (which outputs both
993 location.hh and position.hh) if the user defined location_type.
994 Do not include location.hh either.
995
19ad326b
AD
9962010-05-04 Akim Demaille <demaille@gostai.com>
997
998 lalr1.cc: minor refactoring.
999 * data/lalr1.cc: Don't issue empty namespaces.
1000
f5da8149
AD
10012010-05-04 Akim Demaille <demaille@gostai.com>
1002
1003 tests: fix %printer.
1004 Currently, there is no check that %printer ... <foo> (nor
1005 %destructor) is about an existing <foo> type. This C++ test had
1006 it wrong (<::std::string> vs. <std::string>).
1007
1008 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
1009 pretty-printing of lists into something better for parser traces.
1010 Update the expected output.
1011 Fix correspondance between %type/%token and %printer.
1012
49976d5c
AD
10132010-05-04 Akim Demaille <demaille@gostai.com>
1014
1015 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
1016 * tests/calc.at (Span): Instead of begin/end, as in the built-in
1017 location class, use first and last.
1018 Define YYLLOC_DEFAULT to adjust to these changes.
1019 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
1020 location_type changes.
1021
bc81de36
JD
10222010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1023
1024 tests: fix maintainer-xml-check.
1025 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
1026 Update output to include comments now produced by --graph.
1027 (xsl:template match="automaton"): As for --graph, name the
1028 digraph after the grammar file.
1029 * src/print-xml.c (escape_bufs): Enlarge array.
1030 (print_xml): Add bug-report and url attributes to
1031 bison-xml-report element.
1032
b7666378
JD
10332010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1034
1035 In DOT output, convert from "/*" comments to "//" comments.
1036 This handles the possibility that a "*/" might appear in
1037 variable portions of those comments at some point in the future.
1038 * src/graphviz.c (start_graph): Implement.
1039
9b5049bd
JD
10402010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1041
1042 Document that undefined %prec identifier warnings will remain.
1043 * NEWS (2.4.3): Here.
1044 (2.4.2): Here.
1045
02354690
JD
10462010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1047
1048 Revert 2009-12-30 change for undefined %prec token complaints.
1049 That is, keep them as warnings because that should be sufficient
1050 to satisfy POSIX without creating backward compatibility issues.
1051 Suggested by Richard Stallman at
1052 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
1053 * NEWS (2.5): Remove mention of complaint.
56e92e0b
JD
1054 * src/reader.c (grammar_rule_check): Convert complaint back to
1055 warning.
02354690
JD
1056 * tests/input.at (%prec's token must be defined): Update.
1057
a7ddefd1
JD
10582010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1059
1060 build: don't require src/bison during bootstrap.
1061 Suggested by Eric Blake at
1062 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
1063 * bootstrap.conf (bootstrap_epilogue): New function to make sure
1064 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
1065
c1bd4b2b
JD
10662010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1067
1068 i18n: fix untranslatable string.
1069 Reported by Goran Uddeborg at
1070 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
1071 * src/muscle-tab.c (muscle_percent_define_insert): Here.
1072
67f1a2c2
AD
10732010-04-13 Akim Demaille <demaille@gostai.com>
1074
1075 tests: calc: minor refactoring.
1076 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
1077
4f756f88
AD
10782010-04-13 Akim Demaille <demaille@gostai.com>
1079
1080 tests: calc: simplify location management.
1081 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
1082 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
1083 define the appropriate AT_LOC accessors.
1084 * tests/calc.at: Use AT_LOC accessors.
1085
24bb8c8c
AD
10862010-04-13 Akim Demaille <demaille@gostai.com>
1087
1088 test location_type.
1089 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1090 Define AT_LOCATION_TYPE_IF.
1091 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1092 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1093 used, provide a user location type and use it.
1094 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1095
af129079
AD
10962010-04-13 Akim Demaille <demaille@gostai.com>
1097
1098 tests: check fclose's return value.
1099 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1100
36dc3637
AD
11012010-04-13 Akim Demaille <demaille@gostai.com>
1102
1103 tests: don't depend on the actual location type.
1104 * tests/calc.at: Use yy::parser::location_type rather than
1105 yy::location, since the former is always right, and might point to
1106 another type than the latter.
1107
c499231d
AD
11082010-04-13 Akim Demaille <demaille@gostai.com>
1109
1110 formatting changes.
1111 * tests/calc.at: Formatting changes.
1112
7799ef15
AD
11132010-04-13 Akim Demaille <demaille@gostai.com>
1114
1115 lalr1.cc: remove useless forward declaration.
1116 * data/lalr1.cc: Include location.hh before stack.hh.
1117 Remove the useless forward declarations of position and location.
1118 Reported by Chris Morley.
1119 * data/glr.cc: Likewise.
1120
06cb07d5
JD
11212010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1122
1123 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1124
4586c8cd
JD
11252010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1126
1127 tests: fix for newer Sun Studio C++.
1128 Reported by Dagobert Michelsen at
1129 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1130 * THANKS (Dagobert Michelsen): Add.
1131 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1132 Autoconf macro for handling the restrict keyword.
1133 * gnulib: Update to latest, which no longer overrides that macro
1134 from Autoconf.
1135
44c2b42d
JD
11362010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1137
1138 portability: fix pointer arithmetic to conform to C standard.
1139 Reported by Tys Lefering at
1140 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1141 This fix is already implemented in glr.c and does not apply to
1142 lalr1.java.
1143 * data/lalr1.cc (yy::parser::parse): Increase size of
1144 yyerror_range and adjust subscripting so you don't have to
1145 subtract one from the beginning of the array.
1146 * data/yacc.c (b4_declare_parser_state_variables,
1147 yyparse, yypush_parse): Likewise.
1148
218287f5
AD
11492010-04-05 Akim Demaille <demaille@gostai.com>
1150
1151 remove useless include.
1152 * src/graphviz.h: Don't include stdbool.h.
1153
8176ab33
AD
11542010-04-05 Akim Demaille <demaille@gostai.com>
1155
1156 graph: sign the output file.
1157 * src/graphviz.c (start_graph): Issue comments about Bison.
1158 Suggested by Tys Lefering.
1159
4ad3921d
JD
11602010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1161
1162 portability: fix test suite for GCC 4.5's new #error message.
1163 Reported by Tys Lefering at
1164 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1165 * NEWS (2.4.3): Mention.
1166 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1167
10a697de
AD
11682010-03-30 Akim Demaille <demaille@gostai.com>
1169
1170 fix comments.
1171 * src/graphviz.h: Add missing license notice.
1172 Document.
1173
d6b347e4
AD
11742010-03-25 Akim Demaille <demaille@gostai.com>
1175
1176 tests: fix 250: parse.error=verbose overflow.
1177 * tests/regression.at (parse.error=verbose overflow): Avoid the
1178 double inclusion of stdlib.h as it triggers hard errors.
1179
b8675840
JD
11802010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1181
1182 portability: fix for BSD make.
1183 Reported by Johan van Selst at
1184 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1185 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
1186 this dependency list as in package.m4's target rule.
1187
8b9e021f
JD
11882010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1189
1190 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1191 Reported by Johan van Selst at
1192 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1193 * NEWS (2.4.3): New.
1194 * THANKS (Johan van Selst): Add.
1195 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
1196 targets so that gnulib's new c++defs.h is matched.
1197 * gnulib: Update to latest.
1198
96a381c5
JD
11992010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1200
1201 maint: update for changes to gnulib's announce-gen.
1202 * HACKING (Announce): RELEASE_TYPE=major must now be written
1203 RELEASE_TYPE=stable.
1204
e19a049c
JD
12052010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1206
1207 Version 2.4.2.
1208 * NEWS (2.4.2): Set version and date. For the recent test suite
1209 portability fixes, don't be so optimistic about their success
1210 given the lack of feedback on the affected platforms.
1211
890aeb28
JD
12122010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1213
1214 tests: fix maintainer-xml-check for recent changes.
1215 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1216 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1217 output file whose name conflicts with a previous output file
1218 is now never generated.
1219
f39ab286
JD
12202010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1221
1222 portability: fix several issues with M4 subprocess.
1223
1224 M4's output pipe was not being drained upon fatal errors during
1225 scan_skel. As a result, broken-pipe messages from M4 were seen
1226 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1227 failure in the test suite. The problem was that, on platforms
1228 where the default disposition for SIGPIPE is ignore instead of
1229 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1230 then reported it. However, there's some sort of race condition,
1231 because the new test group occasionally succeeded.
1232 Reported by Albert Chin at
1233 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1234
1235 There were also problems with the test suite livelocking on
1236 Tru64 5.1b. Reported by Didier Godefroy at
1237 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1238 Switching to create_pipe_bidi suggested by Akim Demaille.
1239
1240 To attempt to solve both of these problems, switch to gnulib's
1241 create_pipe_bidi and register M4 process as a slave. Along the
1242 way, clean up file name conflict handling, which was affected by
1243 the broken-pipe problem before the switch.
1244 * NEWS (2.4.2): Document.
1245 * THANKS (Didier Godefroy): Add.
1246 * bootstrap.conf (gnulib_modules): Add pipe.
1247 * gnulib: Update to latest to make sure we have all the latest
1248 fixes.
1249 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
1250 subpipe.c.
1251 * po/POTFILES.in (lib/subpipe.c): Remove.
1252 * src/files.c (compute_output_file_names): Update invocations
1253 of output_file_name_check.
1254 (output_file_name_check): In the case that the grammar file
1255 would be overwritten, use complain instead of fatal, but replace
1256 the output file name with /dev/null. Use the /dev/null solution
1257 for the case of two conflicting output files as well because it
1258 seems safer in case Bison one day tries to open both files at
1259 the same time.
1260 * src/files.h (output_file_name_check): Update prototype.
1261 * src/output.c (output_skeleton): Use create_pipe_bidi and
1262 wait_subprocess. Assert that scan_skel completely drains the
1263 pipe.
1264 * src/scan-skel.l (at_directive_perform): Update
1265 output_file_name_check invocation.
1266 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1267 grammar file actually isn't overwritten.
1268 (Conflicting output files: -o foo.y): Update expected output.
1269 * tests/skeletons.at (Fatal errors but M4 continues producing
1270 output): New test group.
1271
e32050b0
JD
12722010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1273
1274 Update POTFILES.
1275 * HACKING (Release Procedure): Add reminder about keeping
1276 POTFILES files up-to-date.
1277 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1278
efc4ed4a
JD
12792010-02-01 Joel E. Denny <jdenny@clemson.edu>
1280
1281 Code cleanup.
1282 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1283 which is already defined in atconfig.
1284
95611b56
JD
12852010-01-22 Joel E. Denny <jdenny@clemson.edu>
1286
1287 tests: fix missing include caught by g++ 4.4.1.
1288 Reported by Tys Lefering.
1289 * HACKING (Release checks): Add note about trying a recent GCC.
1290 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
1291 cstdlib for abort.
1292 (_AT_DATA_EXPECT2_Y): Likewise.
1293
d6e40cba
JD
12942010-01-21 Joel E. Denny <jdenny@clemson.edu>
1295
1296 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1297
80b70223
JD
12982010-01-21 Joel E. Denny <jdenny@clemson.edu>
1299
1300 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1301 * HACKING (Release Procedure): Update notes on copyright years.
1302 * Makefile.am (update-package-copyright-year): New target rule.
1303 * build-aux/update-package-copyright-year: New file.
1304 * cfg.mk (update-copyright): Add update-package-copyright-year
1305 as a dependency.
1306
3320a276
JD
13072010-01-19 Joel E. Denny <jdenny@clemson.edu>
1308
1309 * bootstrap: Import improvements from latest gnulib.
1310
e30c0477
JD
13112010-01-19 Joel E. Denny <jdenny@clemson.edu>
1312
1313 build: require Automake 1.11.1 to avoid a security flaw.
1314 * HACKING (Release Procedure): Don't document Automake security
1315 flaw here.
1316 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1317 why here.
1318
a538eeb1
JD
13192010-01-19 Joel E. Denny <jdenny@clemson.edu>
1320
1321 gnulib: update to latest.
1322
d6bdb90a
JD
13232010-01-19 Joel E. Denny <jdenny@clemson.edu>
1324
1325 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1326
326e5cf8
JD
13272010-01-15 Joel E. Denny <jdenny@clemson.edu>
1328
1329 Thank the developer of the initial push parser implementation.
1330 This unfortunate oversight is several years old.
1331 * THANKS (Odd Arild Olsen): Add.
1332
fca9c5ef
JD
13332010-01-04 Joel E. Denny <jdenny@clemson.edu>
1334
1335 Fix some comments concerning LR(0) versus LALR(1).
1336
1337 Stop equating LR(0) with nondeterminism and LALR(1) with
1338 determinism. That is, if all states are consistent, then LR(0)
1339 tables are deterministic. On the other hand, LALR(1) tables
1340 might be nondeterministic before conflict resolution, and GLR
1341 permits LALR(1) tables to remain nondeterministic.
1342 * src/LR0.c, src/LR0.h: Here.
1343 * src/lalr.c, src/lalr.h: Here.
1344 * src/main.c (main): Here.
1345 * src/state.c, src/state.h: Here.
1346
1347 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1348 parser tables.
1349
e141f4d4
JD
13502010-01-04 Joel E. Denny <jdenny@clemson.edu>
1351
1352 maint: run "make update-copyright"
1353
882be728
JD
13542009-12-30 Joel E. Denny <jdenny@clemson.edu>
1355
1356 POSIX: complain if %prec's token was not defined.
1357 * NEWS (2.5): Document.
1358 * src/reader.c (grammar_rule_check): Convert warning to
1359 complaint.
1360 * tests/input.at (%prec's token must be defined): Update.
1361
8bb3a2e7
JD
13622009-12-30 Joel E. Denny <jdenny@clemson.edu>
1363
1364 POSIX: warn if %prec's token was not defined.
1365 Reported by Florian Krohm at
1366 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1367 * NEWS (2.4.2): Document.
1368 * src/reader.c (grammar_rule_check): Implement.
1369 (grammar_current_rule_prec_set): Add comments explaining that we
1370 here assume a %prec identifier is a token, but we still manage
1371 to support POSIX.
1372 * tests/input.at (%prec's token must be defined): New test
1373 group.
1374
505e1551
JD
13752009-12-31 Joel E. Denny <jdenny@clemson.edu>
1376
1377 * HACKING (Release Procedure): Recommend a secure automake.
1378
b8d19cf8
JD
13792009-12-29 Joel E. Denny <jdenny@clemson.edu>
1380
1381 portability: `<' and `>' are not always defined on addresses.
1382 Specifically, don't sort objects by their memory addresses when
1383 they're not allocated in the same array or other object. Though
1384 I haven't found a test case where that fails on my platform, C
1385 says the behavior is undefined.
1386 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1387 FIXME. Use new id field of InadequacyList nodes rather than
1388 their memory addresses when sorting.
1389 (AnnotationList__compute_from_inadequacies): Add
1390 inadequacy_list_node_count argument to pass to
1391 InadequacyList__new_conflict.
1392 * src/AnnotationList.h
1393 (AnnotationList__compute_from_inadequacies): Update prototype
1394 and documentation for new argument.
1395 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1396 node_count argument and use it to assign a unique ID.
1397 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1398 (InadequacyList): Add id field.
1399 (InadequacyList__new_conflict): Update prototype and
1400 documentation for new argument.
1401 * src/ielr.c (ielr_compute_annotation_lists): Update
1402 AnnotationList__compute_from_inadequacies invocation.
1403
df222dfa
JD
14042009-12-20 Joel E. Denny <jdenny@clemson.edu>
1405
1406 Fix handling of yychar manipulation in user semantic actions.
1407 The problem was that yacc.c didn't always update the yychar
1408 translation afterwards. However, other skeletons appear to be
1409 fine. glr.c appears to already translate yychar before every
1410 use. lalr1.cc does not define yychar and does not document its
1411 replacement, yyla, for users. It does provide yyclearin, but
1412 that does not manipulate yyla and thus requires no translation
1413 update. In lalr1.java, yychar is out of scope during semantic
1414 actions.
1415 * NEWS (2.5): Document.
1416 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1417 yytoken here.
1418 (yyparse, yypush_parse): Instead, translate before every use of
1419 yytoken, and add comments explaining this approach.
1420 * tests/actions.at (Destroying lookahead assigned by semantic
1421 action): New test group checking that translation happens before
1422 lookahead destructor calls at parser return. Previously,
1423 incorrect destructors were called.
1424 * tests/conflicts.at (parse.error=verbose and consistent
1425 errors): New test group checking that translation happens at
1426 syntax error detection before the associated verbose error
1427 message and the associated lookahead destructor calls. While
1428 the destructor call is fixed by this patch, the verbose error
1429 message is currently incorrect due to another bug (see
1430 comments in test group), so this is an expected failure for now.
1431
4395a9ff
JD
14322009-12-21 Joel E. Denny <jdenny@clemson.edu>
1433
1434 YYFAIL: warn about uses and remove from lalr1.java.
1435 * NEWS (2.5): Document.
9d6bc5c4 1436 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
4395a9ff
JD
1437 and make it private. Update all uses.
1438 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1439
1625df5b
JD
14402009-12-21 Joel E. Denny <jdenny@clemson.edu>
1441
1442 YYFAIL: deprecate.
1443 * NEWS (2.4.2): Document deprecation and the phase-out plan.
9d6bc5c4 1444 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1625df5b
JD
1445 deprecation.
1446 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1447 YYFAIL from GCC cpp's -Wunused-macros.
1448 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1449 documentation.
1450 (LocalWords): Remove YYFAIL.
1451
5335b65a
JD
14522009-12-20 Joel E. Denny <jdenny@clemson.edu>
1453
1454 tests: cleanup.
1455 * tests/c++.at (Syntax error discarding no lookahead): Don't
1456 ignore stderr. Instead, eliminate remaining warnings.
1457
d59beda0
JD
14582009-12-18 Joel E. Denny <jdenny@clemson.edu>
1459
1460 lalr1.cc: don't discard non-existent lookahead on syntax error.
9d6bc5c4 1461 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
d59beda0
JD
1462 * tests/c++.at (Syntax error discarding no lookahead): New test
1463 group.
1464
387b4d50
JD
14652009-12-17 Joel E. Denny <jdenny@clemson.edu>
1466
1467 Code cleanup.
1468 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1469 function, which is no longer used.
1470
a603c6e0
JD
14712009-12-16 Joel E. Denny <jdenny@clemson.edu>
1472
1473 Add gcc's -Wundef to test suite and fix another warning from it.
1474 * NEWS (2.4.2): Update description of -Wundef fix.
1475 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1476 (WARN_CFLAGS_TEST): New substitution.
1477 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1478 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1479 WARN_CFLAGS.
1480 (NO_WERROR_CFLAGS): Likewise.
1481 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1482
19750d31
JD
14832009-12-16 Joel E. Denny <jdenny@clemson.edu>
1484
1485 * data/yacc.c: Reformat m4 a little.
1486
c938d650
JD
14872009-12-16 Joel E. Denny <jdenny@clemson.edu>
1488
1489 Document gcc -Wundef fix.
1490 * NEWS (2.4.2): Here.
1491 * THANKS (Jonathan Nieder): Add.
1492
fcd32abd
JN
14932009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1494
1495 Simplify y.tab.c when location tracking is disabled.
1496 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1497 tracking is not enabled. Instead, unconditionally define
1498 YY_LOCATION_PRINT as a no-op for backward compatibility.
1499
ae93128c
JN
15002009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1501
1502 Avoid warnings from gcc -Wundef y.tab.c.
1503 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1504 defined before using them.
1505 * data/lalr1.cc: Likewise.
1506 * data/yacc.c: Likewise.
1507
c843aaab
JD
15082009-12-15 Joel E. Denny <jdenny@clemson.edu>
1509
1510 autoconf: update to latest for fix of M4 detection.
1511 Reported by Eric Blake.
1512 * submodules/autoconf: Update.
1513
5c99151a
JD
15142009-12-15 Joel E. Denny <jdenny@clemson.edu>
1515
1516 portability: use -DGNULIB_POSIXCHECK.
1517 Reported by Eric Blake. See discussions at
1518 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1519 and
1520 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1521 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1522 * bootstrap.conf (gnulib_modules): Add all the printf modules
1523 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1524 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1525 (excluded_files): Remove m4/printf-posix.m4.
1526 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1527 lib/libbison.a so gnulib libraries can be linked.
1528
75f94c6d
JD
15292009-12-15 Joel E. Denny <jdenny@clemson.edu>
1530
1531 gnulib: update for fix of fprintf-posix, which we'll use soon.
1532 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1533 targets so that gnulib's new arg-nonnull.h and link-warning.h
1534 are matched.
1535 * gnulib: Update.
1536
ca01f454
JD
15372009-12-14 Joel E. Denny <jdenny@clemson.edu>
1538
1539 Enable assertion output and --disable-assert for configure.
1540 * bootstrap.conf (gnulib_modules): Add assert module.
1541 * src/system.h (aver): Define as assert, and summarize the
1542 discussion on this issue.
1543
9dc3ee6d
JD
15442009-12-14 Joel E. Denny <jdenny@clemson.edu>
1545
1546 Expand GLR acronym in summary of Bison.
1547 Based on discussion with Akim Demaille starting at
1548 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1549 * doc/bison.texinfo (Introduction): Here.
1550 * src/getargs.c (usage): Here.
1551
d013372c
AR
15522009-10-03 Alex Rozenman <rozenman@gmail.com>
1553
1554 Document named references.
1555 * doc/bison.texinfo (Actions): Add new example and xref to
1556 Using Named References node.
1557 (Using Named References): New node.
1558
5297ebb3
JD
15592009-10-16 Joel E. Denny <jdenny@clemson.edu>
1560
1561 cleanup.
1562 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1563 of char*.
1564 (Sbitset__isEmpty): Use Sbitset instead of char*.
1565 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1566 instead of char. This helps to avoid casting errors.
1567 (Sbitset__or): Use Sbitset instead of char*.
1568
175620d3
JD
15692009-10-16 Joel E. Denny <jdenny@clemson.edu>
1570
1571 portability: don't assume 8-bit bytes.
1572 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1573 * src/Sbitset.h (Sbitset__nbytes): Here.
1574 (Sbitset__byteAddress): Here.
1575 (Sbitset__bit_mask): Here.
1576 (Sbitset__last_byte_mask): Here.
1577 (Sbitset__ones): Here.
1578 (SBITSET__FOR_EACH): Here.
1579
786578e3
JD
15802009-10-11 Joel E. Denny <jdenny@clemson.edu>
1581
1582 portability: use va_start and va_end in the same function.
1583 * src/complain.c (error_message): Move va_end from here...
1584 (ERROR_MESSAGE): ... to here.
1585
416a9da6
JD
15862009-10-08 Joel E. Denny <jdenny@clemson.edu>
1587
1588 * data/bison.m4: Update comments for rename to muscle-tab.h.
1589
10659d0e
JD
15902009-10-07 Joel E. Denny <jdenny@clemson.edu>
1591
1592 Minor code cleanup.
1593 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1594 replace all uses with UNIQSTR_CONCAT.
1595 * src/uniqstr.c (uniqstr_vsprintf): New function.
1596 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1597 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1598 macros.
1599
3c5362b8
JD
16002009-10-06 Joel E. Denny <jdenny@clemson.edu>
1601
1602 * TODO (Complaint submessage indentation): New.
1603
b143f404
JD
16042009-10-04 Joel E. Denny <jdenny@clemson.edu>
1605
1606 Minor code cleanup.
1607 * src/parse-gram.y: Clean up sorting of declarations.
1608 Use types to simplify %printer declarations where possible.
1609 Provide %printer for BRACKETED_ID and symbol.prec.
1610 * src/symtab.c: Whitespace change.
1611
7439c5c0
JD
16122009-10-04 Joel E. Denny <jdenny@clemson.edu>
1613
1614 tests: skip tests of file names that platform does not support.
1615 Reported by Michael Raskin at
1616 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1617 * THANKS (Michael Raskin): Add.
1618 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1619 to fail at least for file names containing ":" or "\".
1620
45319f13
JD
16212009-09-23 Joel E. Denny <jdenny@clemson.edu>
1622
1623 yysyntax_error: avoid duplicate lookahead collection.
1624 Except when memory reallocation is required, this change
1625 eliminates the need to invoke yysyntax_error twice and thus to
1626 repeat the collection of lookaheads. It also prepares for
1627 future extensions that will make those repetitions more
1628 expensive and that will require additional memory management in
1629 yysyntax_error. Finally, it fixes an obscure bug already
1630 exercised in the test suite.
1631 * data/yacc.c (yysyntax_error): Add arguments for message
1632 buffer variables stored in the parser. Instead of size, return
1633 status similar to yyparse status but indicating success of
1634 message creation. Other than the actual reallocation of the
1635 message buffer, import and clean up memory management code
1636 from...
1637 (yyparse, yypush_parse): ... here.
1638 * tests/regression.at (parse.error=verbose overflow): No longer
1639 an expected failure.
1640
52cea04a
JD
16412009-09-23 Joel E. Denny <jdenny@clemson.edu>
1642
1643 yysyntax_error: test memory management more.
1644 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1645 * tests/regression.at (parse.error=verbose and
1646 YYSTACK_USE_ALLOCA): New test group.
1647 (parse.error=verbose overflow): New test group that reveals an
1648 obscure bug. Expected fail for now.
1649
37318e2f
JD
16502009-10-04 Joel E. Denny <jdenny@clemson.edu>
1651
1652 benchmarks: use %debug consistently among grammars.
1653 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1654 %debug by default. It can affect the timings even if yydebug=0.
1655 (generate_grammar_calc): For consistency with other grammars,
1656 use YYDEBUG environment variable to set yydebug.
1657
f74d6d25
JD
16582009-10-03 Joel E. Denny <jdenny@clemson.edu>
1659
1660 Remove dead code.
1661 * src/symtab.c (symbol_pack): Here because every symbol's number
1662 is always defined by this time.
1663
5b1ff423
AR
16642009-10-03 Alex Rozenman <rozenman@gmail.com>
1665
1666 Add additional space after periods in NEWS.
1667 * NEWS (2.5): here.
1668
47eced30
JD
16692009-09-29 Joel E. Denny <jdenny@clemson.edu>
1670
1671 Use the correct conversion specifier for size_t.
1672 Reported by Jim Meyering.
1673 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1674 because Sbitset__Index is size_t.
1675 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1676
d8f68fc2
JD
16772009-09-27 Joel E. Denny <jdenny@clemson.edu>
1678
1679 tests: don't abuse AT_BISON_CHECK.
1680 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1681 additional shell commands outside of AT_BISON_CHECK.
1682
43aabb70
JD
16832009-09-26 Joel E. Denny <jdenny@clemson.edu>
1684
1685 tests: check that parse-gram.y's IELR and LALR are identical.
1686 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1687 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1688 group.
1689
66381412
AR
16902009-09-19 Alex Rozenman <rozenman@gmail.com>
1691
1692 Keep sub-messages aligned. Fix strings for translation.
5b1ff423
AR
1693 * src/location.h (location_print): Add return value.
1694 * src/location.c (location_print): Return number of printed
66381412 1695 characters.
5b1ff423
AR
1696 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1697 new functions.
1698 * src/complain.cpp (indent_ptr): New static variable.
1699 (error_message, complain_at_indent, warn_at_indent): Implement
1700 the alignment mechanism.
1701 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1702 for translations. Use new alignment mechanism.
1703 * tests/named-ref.at: Adjust test-cases.
66381412
AR
1704 * NEWS (2.5): Add an announcement about named references.
1705
a6ca4ce2
AD
17062009-09-17 Akim Demaille <demaille@gostai.com>
1707
1708 doc: fixes.
1709 * doc/bison.texinfo: here.
1710 Reported by Alex Rozenman.
1711
3cdc21cf
AD
17122009-09-16 Akim Demaille <demaille@gostai.com>
1713
1714 doc: lalr1.cc and variants.
1715 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1716 "variant" %define variables.
1717 (C++ Semantic Values): Split into...
1718 (C++ Unions, C++ Variants): these.
1719 The latter is new.
1720 (C++ Parser Interface): Fix type names.
1721 Document parser::syntax_error.
1722 Document the fact that locations are not mandatory.
1723 (C++ Scanner Interface): Split into...
1724 (Split Symbols, Complete Symbols): these.
1725 The later is new.
1726 (Calc++ Parsing Driver): Use variants.
1727 Add more comments.
1728 Adjust style.
1729 (Calc++ Parser): Declare all the tokens, no
1730 longer accept raw characters.
1731 Remove %union.
1732 Adjust types and printers.
1733 Remove destructors.
1734 (Calc++ Scanner): Use make_<SYMBOL> functions.
1735 Use strerror in error message.
1736
f50bfcd6
AD
17372009-09-16 Akim Demaille <demaille@gostai.com>
1738
1739 doc: spell checking.
1740 * doc/bison.texinfo: here.
1741
6b5a0de9
AD
17422009-09-16 Akim Demaille <demaille@gostai.com>
1743
1744 doc: comment changes.
1745 * doc/bison.texinfo: Comment changes.
1746
2b08bceb
AD
17472009-09-16 Akim Demaille <demaille@gostai.com>
1748
1749 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1750 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1751 constructor to take a token_type instead of the (internal) symbol
1752 number.
1753 Call yytranslate_.
1754 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1755 don't call yytranslate_ here.
1756
c981ce9b
AD
17572009-09-16 Akim Demaille <demaille@gostai.com>
1758
1759 TODO: statistics.
1760 * TODO (Figures): New.
1761
00d80a9c
JD
17622009-09-13 Joel E. Denny <jdenny@clemson.edu>
1763
1764 tests: clean up push.at test group titles.
1765 * tests/push.at: Remove "Push Parsing: " from test group titles
1766 because these are already under the banner "Push Parsing Tests".
1767
f64e406b
AR
17682009-09-12 Alex Rozenman <rozenman@gmail.com>
1769
1770 Provide an additional sub-message for clarity.
1771 Add "symbol not found in production" error message when
1772 an "invalid reference" is detected in named references
1773 resolution.
1774 * src/scan-code.l: Update "invalid reference" case.
1775 * tests/named-ref.at: Adjust test-cases.
1776
bb31eb56
JD
17772009-09-10 Joel E. Denny <jdenny@clemson.edu>
1778
1779 Clean up yacc.c a little.
1780 * data/yacc.c: Clean up M4 for readability, and make output
1781 whitespace more consistent. For the main parse function
1782 comment, instead of saying "yyparse or yypush_parse", say either
1783 "yyparse" or "yypush_parse" depending on which it actually is.
1784
2d399888
JD
17852009-09-10 Joel E. Denny <jdenny@clemson.edu>
1786
1787 Fix --enable-gcc-warnings.
1788 * src/parse-gram.y (%printer <param>): Handle param_none.
1789
ff601366
AD
17902009-09-09 Akim Demaille <demaille@gostai.com>
1791
1792 lalr1.cc: syntax_error as exceptions.
1793 It is common to use sort of factories in the user actions. These
1794 factories may check some "syntactic" constraints that are not
1795 enforced by the grammar itself. This is possible using YYERROR
1796 within the action itself. Provide the user with a means to throw
1797 a syntax_error exception.
1798
1799 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1800 Declare and define yy::parser::syntax_error.
1801 * data/lalr1.cc: Include stdexcept.
1802 (yy::parser::parse): Wrap the user action within a try/catch.
1803 * data/glr.cc: Include stdexcept.
1804
29660062
AD
18052009-09-09 Akim Demaille <demaille@gostai.com>
1806
1807 lalr1.cc: add missing "inline".
1808 * data/c++.m4 (b4_public_types_define): Add missing inline to
1809 implementations provided in headers.
1810
2055a44e
AD
18112009-09-09 Akim Demaille <demaille@gostai.com>
1812
1813 %param: documentation.
1814 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1815 changes.
1816 * doc/bison.texinfo: Document that %lex-param and %parse-param
1817 are n-ary.
1818 Changes some examples to demonstrate it.
1819 (Calc++ Parser): Use %param.
1820
dd875058
AD
18212009-09-09 Akim Demaille <demaille@gostai.com>
1822
1823 Regen.
1824
f71db70b
AD
18252009-09-09 Akim Demaille <demaille@gostai.com>
1826
1827 style changes.
1828 * src/parse-gram.y (add_param): Scope changes.
1829
eaca4c11
AD
18302009-09-09 Akim Demaille <demaille@gostai.com>
1831
1832 %parse: support several arguments.
1833 * src/parse-gram.y (current_param): New.
1834 (param_type): Add param_none.
1835 (params): New nonterminal.
1836 Use it.
1837
b18cdd91
AD
18382009-09-09 Akim Demaille <demaille@gostai.com>
1839
1840 Regen.
1841
a7706735
AD
18422009-09-09 Akim Demaille <demaille@gostai.com>
1843
1844 %param.
1845 Provide a means to factor lex-param and parse-param common
1846 declarations.
1847
1848 * src/parse-gram.y (param_type): New.
1849 Define a %printer for it.
1850 (add_param): Use it.
1851 (%parse-param, %lex-param): Merge into...
1852 (%parse): this new token.
1853 Adjust the grammar to use it.
1854 * src/scan-gram.l (RETURN_VALUE): New.
1855 (RETURN_PERCENT_FLAG): Use it.
1856 (RETURN_PERCENT_PARAM): New.
1857 Use it to support %parse-param, %lex-param and %param.
1858
9789acf0
JD
18592009-09-03 Joel E. Denny <jdenny@clemson.edu>
1860
1861 Use aver not assert.
1862 * src/output.c: Don't include assert.h.
1863 (output_skeleton): Use aver not assert.
1864 * src/system.h (aver): In documentation of why, add links to
1865 Paul Eggert's explanations in the mailing lists.
1866
61bc57e5
AR
18672009-09-05 Alex Rozenman <rozenman@gmail.com>
1868
1869 Use "Unresolved reference" error message when no symbols were found
1870 in a symbolic reference resolution. Remove .expr and -expr from
1871 the shown reference when the reference is unresolved.
1872 * src/scan-code.l: Change the error message, adjust location columns,
1873 rename variable "exact_mode" to "explicit_bracketing".
1874 * tests/named-ref.at: Adjust existing tests and add a new one.
1875
f4c75eaf
AD
18762009-09-04 Akim Demaille <demaille@gostai.com>
1877
1878 Adjust synclines in src/parse-gram.[ch].
1879 * tests/bison.in: Do some magic (including working around issues
1880 with ylwrap) when this wrapper is used to compile
1881 src/parse-gram.y.
1882
c6abeab1
JD
18832009-09-03 Joel E. Denny <jdenny@clemson.edu>
1884
1885 Complain about unused %define variables and %code qualifiers.
1886 * NEWS (2.5): Document.
1887 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1888 * doc/bison.texinfo (Decl Summary): Document complaint, and
1889 improve %define documentation a little otherwise.
1890 * tests/input.at (Reject unused %code qualifiers): Update.
1891 (%define errors): Update.
1892 (%define, --define, --force-define): Update.
1893 (%define backward compatibility): Update.
1894 (Unused %define api.pure): Update.
1895 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1896
82db7cdb
JD
18972009-09-03 Joel E. Denny <jdenny@clemson.edu>
1898
1899 Don't suppress warnings about unused parse.error.
1900 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1901 %define variable parse.error unless b4_error_verbose_flag is
1902 actually expanded in a skeleton.
1903
2755de8f
AD
19042009-09-03 Akim Demaille <demaille@gostai.com>
1905
1906 * NEWS (2.4.2): Add "Internationalization" item.
1907
1deef26d
AD
19082009-09-03 Akim Demaille <demaille@gostai.com>
1909
1910 bootstrap: fix/improve find_tool.
1911 * bootstrap (find_tool): Improve error messages.
1912 Fix typo about find_tool_names.
1913
2646cd54
JD
19142009-08-29 Joel E. Denny <jdenny@clemson.edu>
1915
1916 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1917 See
1918 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1919 * src/scan-code.h (code_props_rule_action_init): Rename
1920 named_ref arg to name so it doesn't shadow named_ref type. This
1921 makes it consistent with the function definition in scan-code.l
1922 anyway.
1923
cf499cff
JD
19242009-08-28 Joel E. Denny <jdenny@clemson.edu>
1925
1926 %define: accept unquoted values.
1927 * NEWS (2.5): Group all %define changes together, and document
1928 this one. Remove quotes in IELR and canonical LR entry.
1929 * doc/bison.texinfo: Remove quotes in most examples throughout.
1930 (Decl Summary): Update %define documentation.
1931 (Table of Symbols): Likewise.
1932 * src/ielr.c (LrType): Update documentation.
1933 * src/parse-gram.y (content.opt): Add production for ID.
1934 * tests/actions.at: Remove quotes in most tests.
1935 * tests/calc.at: Likewise.
1936 * tests/existing.at: Likewise.
1937 * tests/input.at: Likewise.
1938 * tests/local.at: Likewise.
1939 * tests/push.at: Likewise.
1940 * tests/reduce.at: Likewise.
1941 * tests/torture.at: Likewise.
1942
6ba96404
JD
19432009-08-28 Joel E. Denny <jdenny@clemson.edu>
1944
1945 %define lr.type: make values lowercase IDs.
1946 That is, "LALR" => "lalr", "IELR" => "ielr", and
1947 "canonical LR" => "canonical-lr".
1948 * NEWS (2.5): Update documentation.
1949 * doc/bison.texinfo (Decl Summary): Likewise.
1950 * src/ielr.c (ielr): Use new values.
1951 * src/ielr.h (ielr): Update documentation.
1952 * src/reader.c (prepare_percent_define_front_end_variables): Use
1953 and validate new values.
1954 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1955 grammars.
1956 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1957
4413bbd3
EB
19582009-08-27 Eric Blake <ebb9@byu.net>
1959
1960 scan-gram: avoid portability trap with ctype usage.
1961 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1962 Avoid compiler warning.
1963
b70c7fb4
JD
19642009-08-27 Joel E. Denny <jdenny@clemson.edu>
1965
1966 tests: use perl for printing special sequences to files.
1967 And skip tests if perl is not available. This is better than
1968 playing tricks with shell portability. Suggested by Akim
1969 Demaille.
1970 * tests/input.at (Bad character literals): Use it here for
1971 omitting final newlines.
1972 (Bad escapes in literals): Use it here for special characters.
1973
d1cc31c5
JD
19742009-08-26 Joel E. Denny <jdenny@clemson.edu>
1975
1976 tests: show a use of %define lr.default-reductions "consistent"
1977 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1978 prevents the omission of expected tokens for %error-verbose.
1979
3bed3a75
AD
19802009-08-26 Akim Demaille <demaille@gostai.com>
1981
1982 tests: portability fix.
1983 * tests/input.at (Bad escapes in literals): Don't expect "echo
1984 '\0'" to output \ then 0.
1985
aa0cb40d
JD
19862009-08-26 Joel E. Denny <jdenny@clemson.edu>
1987
1988 Actually handle the yytable zero value correctly this time.
1989 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
1990 zero values in the YYTABLE comments.
1991 * data/glr.c (yytable_value_is_error): Don't check for zero
1992 value.
1993 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1994 * data/yacc.c (yytable_value_is_error): Likewise.
1995 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1996 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1997 * src/tables.h: In header comments, explain why it's useless to
1998 check for a zero value in yytable.
1999
f2b30bdf
JD
20002009-08-25 Joel E. Denny <jdenny@clemson.edu>
2001
2002 More fixes related to last two patches.
2003 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
2004 comments: zero indicates syntax error not default action.
2005 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
2006 defined.
2007 * data/glr.c (yyis_pact_ninf): Rename to...
2008 (yypact_value_is_default): ... this.
2009 (yyisDefaultedState): Update for rename.
2010 (yyis_table_ninf): Rename to...
2011 (yytable_value_is_error): ... this, and check for value zero
2012 besides just YYTABLE_NINF.
2013 (yygetLRActions): Check for default value from yypact. It
2014 appears that this check is always performed before this function
2015 is invoked, and so adding the check here is probably redundant.
2016 However, the code may evolve after this subtlety is forgotten.
2017 Also, update for rename to yytable_value_is_error. Because that
2018 macro now checks for zero, a different but equivalent branch of
2019 the if-then-else here is evaluated.
2020 (yyreportSyntaxError): Update for rename to
2021 yytable_value_is_error. The zero condition was mishandled
2022 before.
2023 (yyrecoverSyntaxError): Update for renames. No behavioral
2024 changes.
2025 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
2026 New function.
2027 (yy_table_value_is_error_): New function.
2028 (parse): Use new functions where possible. No behavioral
2029 changes.
2030 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
2031 The zero condition was mishandled before.
2032 * data/yacc.c (yyis_pact_ninf): Rename to...
2033 (yypact_value_is_default): ... this.
2034 (yyis_table_ninf): Rename to...
2035 (yytable_value_is_error): ... this, and check for value zero
2036 besides just YYTABLE_NINF.
2037 (yysyntax_error): Update for rename to yytable_value_is_error.
2038 The zero condition was mishandled before.
2039 (yyparse): Update for renames. No behavioral changes.
2040 * src/tables.h: Improve comments about yypact, yytable, etc.
2041 more. Most importantly, say yytable value of zero means syntax
2042 error not default action.
2043
53f036ce
JD
20442009-08-25 Joel E. Denny <jdenny@clemson.edu>
2045
2046 Fix %error-verbose for conflicts resolved by %nonassoc.
2047 * NEWS (2.5): Document.
2048 * data/glr.c (yyreportSyntaxError): Fix this by checking
2049 yyis_table_ninf.
2050 * data/yacc.c (yysyntax_error): Likewise.
2051 * data/lalr1.cc (yysyntax_error_): Fix this by checking
2052 yytable_ninf_.
2053 * data/lalr1.java (yysyntax_error): Likewise.
2054 * tests/conflicts.at (%nonassoc and eof): Update expected output
2055 and remove FIXME.
2056
87412882
JD
20572009-08-25 Joel E. Denny <jdenny@clemson.edu>
2058
2059 Some code and documentation improvements.
2060 * data/c.m4 (b4_table_value_equals): New macro to capture
2061 some repeated code.
2062 * data/glr.c (yyis_pact_ninf): Use it here.
2063 (yyis_table_ninf): Likewise.
2064 (yyreportSyntaxError): Improve internal comments.
2065 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
2066 Use it everywhere possible.
2067 (yyis_table_ninf): Likewise.
2068 (yysyntax_error): Improve internal comments.
2069 * data/lalr1.cc (yysyntax_error_): Likewise.
2070 * data/lalr1.java (yysyntax_error): Likewise.
2071 * src/tables.h: Improve comments about yypact, yytable, etc.
2072
e6c849d8
JD
20732009-08-21 Joel E. Denny <jdenny@clemson.edu>
2074
2075 Use locale when quoting.
2076 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
2077 quote rather than implementing quoting here.
2078
d8911864
EB
20792009-08-20 Eric Blake <ebb9@byu.net>
2080
b0778bdd
EB
2081 Make previous patch more robust.
2082 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
2083 argmatch.h.
2084 (output_skeleton): Use it.
2085 Suggested by Akim Demaille.
2086
d8911864
EB
2087 Import latest m4/m4.m4.
2088 * submodules/autoconf: Update to autoconf 2.64.
2089 * configure.ac (M4_GNU_OPTION): New define.
2090 * src/output.c (output_skeleton): Use it to resolve FIXME.
2091 * NEWS: Mention this.
2092
c2724603
JD
20932009-08-19 Joel E. Denny <jdenny@clemson.edu>
2094
2095 Fix complaints about escape sequences.
2096 Discussed starting at
2097 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
2098 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
2099 For a \0 and similar escape sequences meaning the null
2100 character, report an invalid escape sequence instead of an
2101 invalid null character because the latter does not actually
2102 appear in the user's input.
2103 In all escape sequence complaints, don't escape the initial
2104 backslash, and don't quote when the sequence appears at the end
2105 of the complaint line unless there's whitespace that quotearg
2106 won't escape.
2107 Consistently say "invalid" not "unrecognized".
2108 Consistently prefer "empty character literal" over "extra
2109 characters in character literal" warning for invalid escape
2110 sequences; that is, consistently discard those sequences.
2111 * tests/input.at (Bad escapes in literals): New.
2112
17aed602
AD
21132009-08-19 Akim Demaille <demaille@gostai.com>
2114
2115 doc: fixes.
2116 * doc/bison.texinfo: Fix minor Texinfo errors.
2117
9142239a
AD
21182009-08-19 Akim Demaille <demaille@gostai.com>
2119
2120 tests: distcc compliance.
2121 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
2122 error messages from the output.
2123
171ad99d
AD
21242009-08-19 Akim Demaille <demaille@gostai.com>
2125
2126 variables: simplify the upgrade of namespace into api.namespace.
2127
2128 This patch simplifies "variables: rename namespace as
2129 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
2130 Suggested by Joel E. Denny in
2131 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
2132
2133 * src/muscle-tab.c (muscle_percent_variable_update): New.
2134 (muscle_percent_define_insert): Use it in replacement of the
2135 previous tr invocation.
2136 Remove variable_tr, no longer needed.
2137 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2138 Remove.
2139 * data/c++.m4: No longer handle namespace -> api.namespace.
2140 * tests/input.at (%define backward compatibility): Check that
2141 namespace is treated as api.namespace.
2142
d59e456d
AD
21432009-08-19 Akim Demaille <demaille@gostai.com>
2144
2145 doc: %initial-action to initialize yylloc.
2146 Reported by Bill Allombert.
2147 * doc/bison.texinfo: Set fill-column to 76.
2148 (Location Type): Document the use of %initial-action to initialize
2149 yylloc.
2150
ceb8b8e6
AD
21512009-08-19 Akim Demaille <demaille@gostai.com>
2152
2153 lalr1.cc: use state_type.
2154 * data/lalr1.cc (yysyntax_error_): Use state_type.
2155 Move argument names into yy*.
2156
7580c379
AD
21572009-08-19 Akim Demaille <demaille@gostai.com>
2158
2159 lalr1.cc: get rid of yyparse's yystate.
2160 yystate and yystack_[0].state are equal, keep only the latter.
2161 The former was also used as a temporary variable to compute the
2162 post-reduction state. Move this computation into an auxiliary
2163 function.
2164
2165 * data/glr.c (yyLRgotoState): Fuse variable definition and first
2166 assignment.
2167 * data/lalr1.cc (yy_lr_goto_state_): New.
2168 (yyparse): Use it.
2169 Replace remaining uses of yystate by yystate_[0].state.
2170 Remove the former.
2171
c4dc4c46
AD
21722009-08-19 Akim Demaille <demaille@gostai.com>
2173
2174 lalr1.cc: destroy $$ when YYERROR is called.
2175 * data/lalr1.cc (yyreduce): Compute the resulting state before
2176 running the user action so that yylhs is a valid symbol.
2177 (yyerrorlab): Since yylhs is complete (it knows its type), we can
2178 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
2179 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
2180
c67e466f
JD
21812009-08-18 Joel E. Denny <jdenny@clemson.edu>
2182
2183 maint: update for gnulib's recent update-copyright changes
2184 * gnulib: Update.
2185 * .x-update-copyright (COPYING): Add as it's no longer implied
2186 when .x-update-copyright is present.
2187 * cfg.mk (update-copyright-local): Remove, now ignored.
2188 (update-copyright): Declare update-b4-copyright as a dependency.
2189
af6d2358
AD
21902009-08-17 Akim Demaille <demaille@gostai.com>
2191
2192 build: require gettext 0.17.
2193
2194 Suggested by Bruno Haible.
2195 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
2196 * configure.ac: require gettext 0.17 to ensure compatibility with
2197 gnulib.
2198
91a2b9b1
AD
21992009-08-17 Akim Demaille <demaille@gostai.com>
2200
2201 build: lower gettext requirements.
2202
2203 Bison was uselessly requiring the formatstring macros from
2204 gettext, which resulted in mo files not being installed on systems
2205 that perfectly supported Bison mo files. Lower the requirement.
2206 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
2207
b0778bdd
EB
2208 * configure.ac: Require need-ngettext instead of
2209 need-formatstring-macros.
2210 Reported by Martin Jabocs.
2211 Suggested by Bruno Haible.
2212 * INSTALL: Restructure.
2213 (Internationalization): New.
91a2b9b1 2214
585935e8
JD
22152009-08-14 Joel E. Denny <jdenny@clemson.edu>
2216
2217 maint: fix use of copyright year intervals.
2218 * gnulib: Update.
2219 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
2220 as now recommended in gnulib/NEWS.
2221 * build-aux/update-b4-copyright: Fix.
2222 * cfg.mk (update-copyright-env): Configure update-copyright.
2223
83b60c97
JD
22242009-08-13 Joel E. Denny <jdenny@clemson.edu>
2225
2226 Make it easier to write deterministic tests.
2227 Continues Akim's work from his 2009-06-10 commits.
2228 * src/reader.c (check_and_convert_grammar): Don't add any
2229 symbols after the first symbols_do invocation.
2230 * src/symtab.c (symbols_sorted): New static global.
2231 (user_token_number_redeclaration): Update comments.
2232 (symbol_from_uniqstr): If a new symbol is being created, assert
2233 that symbols_sorted hasn't been allocated yet.
2234 (symbols_free): Free symbols_sorted.
2235 (symbols_cmp, symbols_cmp_qsort): New functions.
2236 (symbols_do): Sort symbol_table into symbols_sorted on first
2237 invocation.
2238 * tests/input.at (Numbered tokens): Recombine tests now that the
2239 output should be deterministic across multiple numbers.
2240
28169bab
AD
22412009-08-12 Akim Demaille <demaille@gostai.com>
2242
2243 tests: GCC 4.5 compliance.
2244 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
2245 messages about #error.
2246
9f14e187
AD
22472009-08-12 Akim Demaille <demaille@gostai.com>
2248
2249 build: fix the generation of the documentation.
2250 Some of our targets use "bison --help", but they can't depend on
2251 "bison" itself (to avoid additional requirements on the user), so
2252 they used to call "make src/bison" in the commands. Then
2253 concurrent builds may fail: one make might be aiming one of its
2254 jobs at compiling src/bison, and another job at generating the man
2255 page. If the latter is faster than the former, then we have two
2256 makes that concurrently try to compile src/bison.
2257
2258 This might also be a more convincing explanation for the failure
2259 described in the patch "build: fix paths".
2260
2261 * Makefile.am (SUFFIXES): Initialize.
2262 * build-aux/move-if-change: New, symlink to gnulib's.
2263 * build-aux/local.mk: Ship it.
2264 * doc/common.x: Remove, merged into...
2265 * doc/bison.x: here.
2266 * doc/local.mk (doc/bison.help): New.
2267 ($(CROSS_OPTIONS_TEXI)): Depend on it.
2268 Use src/bison.
2269 (.x.1): Replace with...
2270 (doc/bison.1): this explicit, simpler, target.
2271 (common_dep): Remove, inlined where appropriate.
2272 (SUFFIXES, PREPATH): Remove, unused.
2273
d1b55e81
AD
22742009-08-12 Akim Demaille <demaille@gostai.com>
2275
2276 gnulib: improve prefixing.
2277 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
2278 change the value of...
2279 (gl_LIBOBJS): this.
2280 Adjust more variables.
2281 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
2282 gl_LIBOBJS.
2283 (prefix): Also transform rules whose targets have slashes.
2284 Use $prefix liberally.
2285 Map @MKDIR_P@ to $(MKDIR_P).
2286 Prefix directories that are mkdir'd.
2287
838205d5
AD
22882009-08-12 Akim Demaille <demaille@gostai.com>
2289
2290 build: fix paths.
2291 When using $(top_builddir) inconsistently, Make (including GNU
2292 Make) is sometimes confused. As a result it may want to build
2293 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
2294 file, different names) concurrently, which, amusingly enough,
2295 might end with:
2296
2297 ranlib lib/libbison.a
2298 ranlib lib/libbison.a
2299 make[2]: *** [lib/libbison.a] Segmentation fault
2300
2301 on OS X.
2302
2303 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
2304 needed.
2305
67af7198
AD
23062009-08-12 Akim Demaille <demaille@gostai.com>
2307
2308 distcheck: fix.
2309
b0778bdd 2310 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
67af7198 2311
c467dc42
JD
23122009-08-10 Joel E. Denny <jdenny@clemson.edu>
2313
2314 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
2315
dfaa4860
JD
23162009-08-10 Joel E. Denny <jdenny@clemson.edu>
2317
2318 Miscellaneous code readability improvements.
2319
2320 * src/reader.c (reader): Move %define front-end variable
2321 defaults and checking into...
2322 (prepare_percent_define_front_end_variables): ... this new
2323 function.
2324
2325 * src/scan-gram.l (INITIAL): For consistency with string
2326 literals, don't store open quote on character literal. It's
2327 discarded before returning anyway.
2328 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2329 Make length test more readable, and make the character stored
2330 for an empty literal more obvious while consistent with the
2331 previous behavior.
2332
2333 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2334 USER_NUMBER_HAS_STRING_ALIAS throughout.
2335 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2336 that is repeated in symtab.h. Improve argument names to make it
2337 clear which side of the symbol-string alias pair is which.
2338 (symbol_check_alias_consistency): Improve local variable names
2339 for the same purpose.
2340 * src/symtab.h (struct symbol): Make comments about aliases
2341 clearer.
2342 (symbol_make_alias): Improve comments and argument name.
2343 * src/output.c (token_definitions_output): Update for rename to
2344 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2345
ce268795
AR
23462009-08-08 Alex Rozenman <rozenman@gmail.com>
2347
2348 Convert "misleading reference" messages to warnings.
2349 * src/scan-code.l: New function 'show_sub_messages', more
2350 factoring.
2351 * tests/named-ref.at: Adjust tests.
2352
401b73af
JD
23532009-08-06 Joel E. Denny <jdenny@clemson.edu>
2354
2355 maint: run "make update-copyright"
2356
a1a9422d
JD
23572009-08-06 Joel E. Denny <jdenny@clemson.edu>
2358
2359 maint: make update-b4-copyright easier to use
2360 * build-aux/update-b4-copyright: In warnings, report line
2361 numbers rather than character positions.
2362 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2363 that update-copyright runs it.
2364 * gnulib: Update.
2365
0b61a8ec
JD
23662009-08-05 Joel E. Denny <jdenny@clemson.edu>
2367
2368 maint: clean up update-b4-copyright code
2369 * build-aux/update-b4-copyright: Do not accept 2-digit
2370 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2371 Don't accept a `[' in a b4_copyright argument.
2372 Format code more consistently.
2373 Don't assume b4*copyright never occurs.
2374
269e222e
JD
23752009-08-04 Joel E. Denny <jdenny@clemson.edu>
2376
2377 maint: automate b4_copyright updates.
2378 * Makefile.am (update-b4-copyright): New target rule.
2379 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
2380 * build-aux/update-b4-copyright: New.
2381 * data/yacc.c: Remove stray characters around b4_copyright
2382 invocations.
2383
35905f2b
JD
23842009-08-04 Joel E. Denny <jdenny@clemson.edu>
2385
2386 maint: automate annual package-wide copyright-year update.
2387 * .x-update-copyright: New.
2388 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2389 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2390 update-copyright. Remove gnumakefile, which is implied by
2391 maintainer-makefile.
2392 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2393 * gnulib: Update.
2394 * maint.mk: Remove, now copied from gnulib.
2395 * examples/extexi: Add missing "(C)" in copyright statement so
2396 update-copyright can recognize it.
2397 * src/LR0.h: Likewise.
2398 * src/print.h: Likewise.
2399 * src/print_graph.h: Likewise.
2400 * src/gram.c: Add missing comma in copyright statement.
2401 * src/gram.h: Likewise.
2402
b30e18dc
JD
24032009-08-04 Joel E. Denny <jdenny@clemson.edu>
2404
2405 Fix "make distcheck".
2406 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2407 of just calc.stamp.
2408
8d90395d
JD
24092009-08-01 Joel E. Denny <jdenny@clemson.edu>
2410
2411 Pacify "gcc -Wunused" for the input function from Flex.
2412 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2413 and later.
2414 * src/scan-code.l: Add "%option noinput", which I cannot find in
2415 the Flex manual, but which Flex has supported since at least as
2416 far back as 2.5.4. However, if any of our developers still use
2417 Flex 2.5.4, they'll need to stop configuring with
2418 --enable-gcc-warnings because "%option noinput" didn't work
2419 correctly until Flex 2.5.6.
2420 * src/scan-gram.l: Likewise.
2421 * src/scan-skel.l: Likewise.
2422
ba4184ec
AR
24232009-07-31 Alex Rozenman <rozenman@gmail.com>
2424
2425 Fix --enable-gcc-warnings problems.
2426 * src/reader.c: Adjust variable names.
2427 * src/scan-code.l: Fix prototypes and adjust names.
2428 * src/named-ref.c: Remove redundant "if".
2429
91a2af97
JD
24302009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2431
2432 Fix a --enable-gcc-warnings problem.
2433 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2434 variable.
2435
3208e3f4
JD
24362009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2437
2438 Warn about character literals not of length one.
2439 * NEWS (2.5): Document.
2440 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2441 the length.
2442 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2443 * tests/input.at (Bad character literals): New test group.
2444
5add20ab 24452009-07-24 Alex Rozenman <rozenman@gmail.com>
13cdf208
AR
2446
2447 Fix some memory leaks.
2448 * src/named-ref.c: Add a pointer check (named_ref_free).
2449 * src/scan-code.l: New function (variant_table_free). Called in
2450 code_scanner_free.
2451 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2452
e459fb0e
JD
24532009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2454
2455 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2456
c4be5517
JD
24572009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2458
2459 Some M4 cleanup in the testsuite.
2460 Suggested by Eric Blake at
2461 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2462 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2463 complicate the code by distinguishing between a missing value
2464 and an empty string value for an optional argument. This fix is
2465 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2466 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2467 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2468 arguments are not needed because of the following changes.
2469 Fix stale comments.
2470 Bison developers should use GNU M4 and should not use
2471 POSIXLY_CORRECT when building the test suite, so do not
2472 complicate the code by avoiding $10 and above.
2473 Do not quote an empty string value for an optional argument, and
2474 do not distinguish between a missing value and an empty string
2475 value.
2476
feeb56cd
JD
24772009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2478
2479 Revert unnecessary column realignment in --help output.
2480 Reported by Akim Demaille at
2481 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2482 * src/getargs.c (usage): Here.
2483
5add20ab 24842009-07-04 Alex Rozenman <rozenman@gmail.com>
629e4def
AR
2485
2486 Alphabetical order in src/local.mk.
2487 * src/local.mk: Adjust.
2488
5add20ab 24892009-07-04 Alex Rozenman <rozenman@gmail.com>
872b52bc
AR
2490
2491 Style changes and factoring.
2492 * src/named-ref.h: Add comments.
2493 * src/parse-gram.y: Readability and style changes.
2494 * src/reader.c: Factoring: assign_named_ref function.
2495 * src/scan-code.l: Factoring and style changes. Rename
2496 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2497 Use "unsigned" type for variant index. Improve readablity.
2498 * src/scan-gram.l: Change error messages and add comments.
2499 * src/symlist.h: symbol_list_null: New function decl.
2500 * src/symlist.c: symbol_list_null: Implement here.
2501 * tests/named-refs.at: Adjust for new error messages.
2502
83ea2423
EB
25032009-06-29 Eric Blake <ebb9@byu.net>
2504
2505 scan-code: avoid compiler warnings
2506 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2507
5ece73ea
AD
25082009-06-29 Akim Demaille <demaille@gostai.com>
2509
2510 build: avoid concurrent extraction of calc++.
2511 * examples/calc++/Makefile.am (calc.stamp): New.
2512 Depend on it to create the sources of calc++ so that concurrent
2513 builds don't launch several "extexi" in parallel.
2514 Not only this is inefficient, this also builds incorrect sources
2515 with several extractions mixed together.
2516
ad597a78
AD
25172009-06-29 Akim Demaille <demaille@gostai.com>
2518
2519 parse.error: fix.
2520 * data/bison.m4: Move code related to specific variables after the
2521 definition of the variable-maintaining macros so that we don't
2522 "invoke" b4_percent_define_check_values before it is defined.
2523
31b850d2
AD
25242009-06-29 Akim Demaille <demaille@gostai.com>
2525
2526 variables: parse.error
2527
2528 Implement, document, and test the replacement of %error-verbose
2529 by %define parse.error "verbose".
2530 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2531 values of the parse.error variable.
2532 Make "simple" its default value.
2533 Check the valid values.
2534 * src/parse-gram.y: Use %define parse.error.
2535 (PERCENT_ERROR_VERBOSE): New token.
2536 Support it.
2537 * src/scan-gram.l: Support %error-verbose.
2538
2539 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2540 %define error-verbose by that of %define parse.error.
2541 * NEWS: Document it.
2542
2543 * tests/actions.at, tests/calc.at: Use parse.error instead of
2544 %error-verbose.
2545
b9f1d9a4
AR
25462009-06-27 Alex Rozenman <rozenman@gmail.com>
2547
2548 Implement support for named symbol references.
2549 * src/parse-gram.y: Add new syntax (named_ref.opt).
2550 * src/reader.c: Store named refs in symbol lists.
2551 * src/reader.h: New argument for symbol_append and
2552 action_append functions.
2553 * src/scan-code.h: Add new field (named_ref) into
2554 code_props data structure. Keeps named ref of midrule
2555 actions.
2556 * src/scan-code.l: Support for named refs in semantic
2557 action code. New function 'parse_named_ref'.
2558 * src/scan-gram.l: Support bracketed id.
2559 * src/symlist.c: Store named refs in symbol lists.
2560 * src/symlist.h: New field in symbol list: named_ref.
2561 * src/named-ref.h: New file, a struct for named_ref.
2562 * src/named-ref.cp: New file, named_ref_new function.
2563 * src/local.mk: Add two new files.
2564 * tests/testsuite.at: Include new test group:
2565 * tests/named-refs.at: this new file.
2566
b5c212b6
AD
25672009-06-25 Akim Demaille <demaille@gostai.com>
2568
2569 hash: check insertion for memory exhaustion.
2570 * src/uniqstr.c (uniqstr_new): New.
2571
67501061
AD
25722009-06-24 Akim Demaille <demaille@gostai.com>
2573
2574 variables: rename namespace as api.namespace.
2575 Discussed in
2576 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2577
2578 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2579 New.
2580 (b4_percent_define_use): New.
2581 Use it where applicable.
2582 * data/c++.m4: Replace uses of the variable "namespace" by
2583 "api.namespace".
2584 Default the latter to the former.
2585 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2586 obsolete.
2587 Document api.namespace.
2588 Use @samp to document %define uses, keep @code for identifiers.
2589 * NEWS: Likewise.
2590 * tests/c++.at, tests/input.at: Test api.namespace instead of
2591 namespace. (The tests passed with namespace.)
2592
41976786
AD
25932009-06-11 Akim Demaille <demaille@gostai.com>
2594
2595 style changes.
2596 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2597 * src/print-xml.c: Style changes.
2598 * tests/conflicts.at: Comment changes.
2599
44bb9084
AD
26002009-06-11 Akim Demaille <demaille@gostai.com>
2601
2602 xml: beware of user strings used to give a %prec to rules.
2603 * tests/conflicts.at (%prec with user strings): New.
2604 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2605 XML output.
2606
04d1e39d
AD
26072009-06-11 Akim Demaille <demaille@gostai.com>
2608
2609 hash: check insertion for memory exhaustion.
2610 * src/muscle-tab.c (muscle_insert, muscle_grow)
2611 * src/state.c (state_hash_insert): Check the return value of
2612 hash_insert.
2613
a8873669
AD
26142009-06-11 Akim Demaille <demaille@gostai.com>
2615
2616 tests: honor TESTSUITEFLAGS in every check target.
2617 * tests/local.mk (RUN_TESTSUITE): New.
2618 (check-local, installcheck-local, maintainer-check-g++)
2619 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2620
8893145a
AD
26212009-06-10 Akim Demaille <demaille@gostai.com>
2622
2623 deterministic test suite.
2624 Some consistency checks on symbols are performed after all the
2625 symbols were read, by an iteration over the symbol table. This
2626 traversal is nondeterministic, which can be a problem for test
2627 cases.
2628 Avoid this.
2629 Addresses another form of nondeterminism reported by Joel E. Denny.
2630 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2631
2632 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2633 test in two.
2634 Use different file names for the three tests to make the
2635 maintenance easier.
2636
92d7a23a
AD
26372009-06-10 Akim Demaille <demaille@gostai.com>
2638
2639 gnulib: update.
b0778bdd
EB
2640 * gnulib: Update to latest.
2641 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2642 * m4/.gitignore: Regen.
2643 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2644 Call xalloc_die on hash_insert failures.
2645 Requested by the new __warn_unused_result__ attribute of
2646 hash_insert.
92d7a23a 2647
12cf133f
AD
26482009-06-10 Akim Demaille <demaille@gostai.com>
2649
2650 deterministic user-token-number redeclaration errors.
2651 Address nondeterminism reported by Joel E. Denny.
2652 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2653
2654 * src/uniqstr.h: Comment changes.
2655 * src/location.h (boundary_cmp, location_cmp): New.
2656 * src/symtab.c (user_token_number_redeclaration): New.
2657 (symbol_translation): Use it.
2658 * tests/input.at (Numbered tokens): Adjust the expected output.
2659
796a2b0a
AD
26602009-05-25 Akim Demaille <demaille@gostai.com>
2661
2662 build: avoid ignored errors.
2663 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2664 errors, they pollute the output.
2665
0b6d43c5
JD
26662009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2667
2668 Convert multiple variable definition warnings to complaints.
2669 * NEWS (2.5): Add a new entry for that change.
2670 * doc/bison.texinfo (Decl Summary): Update %define entry.
2671 (Bison Options): Update -D/--define/-F/--force-define entry.
2672 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2673 * src/muscle-tab.h (muscle_percent_define_insert): Update
2674 comments.
2675 * tests/input.at (`%define errors'): Update.
2676 (`%define, --define, --force-define'): Update.
2677
de5ab940
JD
26782009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2679
2680 -F/--force-define and relative %define/-D/--define priorities.
2681 * NEWS (2.5): Add documentation to -D/--define entry.
2682 * build-aux/cross-options.pl: Hard-code association of
2683 --force-define with %define.
2684 * doc/bison.texinfo (Decl Summary): In %define entry,
2685 cross-reference command-line options.
2686 (Bison Options): Add documentation to -D/--define entry.
2687 (Option Cross Key): Widen column for --force-define row.
2688 * src/getargs.c (usage): Document -F/--force-define. Realign
2689 options in output.
2690 (short_options, long_options, getargs): Parse -F/--force-define,
2691 and update muscle_percent_define_insert invocations.
2692 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2693 (muscle_percent_define_insert): Add argument with that type.
2694 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2695 -F/--force-define behavior and priorities.
2696 (muscle_percent_define_ensure): Update
2697 muscle_percent_define_insert invocation.
2698 * src/parse-gram.y (prologue_declaration): Update
2699 muscle_percent_define_insert invocations.
2700 * tests/input.at (`%define, --define'): Rename to...
2701 (`%define, --define, --force-define'): ... this and extend.
2702
f8e7258f
JD
27032009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2704
2705 Update some comments to make sense for -D.
2706 * data/bison.m4 (b4_check_user_names): In header comments, say
2707 "user occurrence" instead of "grammar occurrence".
2708 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2709 (muscle_percent_code_grow): Likewise just for consistency.
2710
b987342b
JD
27112009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2712
2713 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2714
4977e0a7
JD
27152009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2716
2717 Handle a trailing `:' in a user-supplied C++ namespace better.
2718 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2719 among the closing braces here. This fix might make the
2720 generated code easier to debug, but otherwise it should be
2721 insignificant because a trailing `:' is a C++ error already.
2722
9b04dad7
AD
27232009-05-19 Akim Demaille <demaille@gostai.com>
2724
2725 remove useless variable.
2726 * src/getargs.c (skeleton_arg): Remove now useless variable.
2727 Should help the compiler see that this printf-like call is sane.
2728
4c6622c2
AD
27292009-05-15 Akim Demaille <demaille@gostai.com>
2730
2731 Rename token.prefix as api.tokens.prefix.
2732 Discussed here.
2733 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2734
2735 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2736 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2737 (token.prefix): Rename as...
2738 (api.tokens.prefix): this.
2739
3c248d70
AD
27402009-05-11 Akim Demaille <demaille@gostai.com>
2741
2742 doc: use C++ headers.
2743 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2744 headers.
2745
99c08fb6
AD
27462009-05-11 Akim Demaille <demaille@gostai.com>
2747
2748 doc: token.prefix
2749 * doc/bison.simple (Decl Summary): Document token.prefix.
2750 (Calc++ Parser): Various fixes.
2751 Formatting changes.
2752 Use token.prefix.
2753 Introduce a macro TOKEN to shorten the code and make it more
2754 readable.
2755 (Calc++ Scanner): Adjust.
2756 * NEWS (Variable token.prefix): New.
2757
84a1cb5a
AD
27582009-05-04 Akim Demaille <demaille@gostai.com>
2759
2760 bison: catch bad symbol names.
2761 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2762 * tests/input.at: Adjust.
2763
cdf3f113
AD
27642009-05-04 Akim Demaille <demaille@gostai.com>
2765
2766 identifiers: dashes are letters.
2767 Dashes can now start identifiers (symbols and directives).
84a1cb5a 2768
cdf3f113
AD
2769 * src/scan-gram.l ({letter}): Add dash.
2770 ({id}): Remove it.
2771 * tests/input.at (Symbols): Adjust.
2772 Remove stray comment.
2773 * tests/regression.at (Invalid inputs): Adjust error message.
2774 * doc/bison.texinfo (Symbols): Update.
2775
98a345a2
JD
27762009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2777
2778 Declare %code to be a permanent feature.
2779 * NEWS (2.4.2): Here.
2780 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2781 experimental.
2782 (Decl Summary): Likewise.
2783
67212941
JD
27842009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2785
2786 Convert underscores to dashes in some %define variable names.
2787 For now, just api.push-pull and lr.keep-unreachable-states.
2788 Maintain old names for backward compatibility.
2789 * NEWS (2.5): Document.
2790 * data/c.m4 (b4_identification): Update comment.
2791 * data/yacc.c: Update access.
2792 * doc/bison.texinfo: Update.
2793 * etc/bench.pl.in (bench_push_parser): Update use.
2794 * src/files.c (tr): Move to...
2795 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2796 think of a better place to expose it. My logic is that, for all
2797 uses of tr so far, command-line arguments can be involved, and
2798 getargs.h is already included.
2799 * src/main.c (main): Update access.
2800 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2801 variable names to new variable names before assigning value.
2802 * src/reader.c (reader): Update setting default.
2803 * tests/calc.at: Update uses.
2804 * tests/conflicts.at (Unreachable States After Conflict
2805 Resolution): Update use.
2806 * tests/input.at (%define enum variables): Update use.
2807 (%define backward compatibility): New test group.
2808 * tests/push.at: Update uses.
2809 * tests/reduce.at: Update uses.
2810 * tests/torture.at: Update uses.
2811
ba5c6d94
JD
28122009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2813
2814 Set all front-end %define defaults in one place.
2815 * src/main.c (main): Move lr.keep_unreachable_states default...
2816 * src/reader.c (reader): ... to here.
2817
5bab9d08
JD
28182009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2819
2820 Rename lr.default_reductions to lr.default-reductions.
2821 * NEWS (2.5): Here.
2822 * doc/bison.texinfo: Here.
2823 * src/lalr.c (initialize_LA): Here.
2824 * src/print.c (print_reductions): Here.
2825 * src/reader.c (reader): Here.
2826 * src/tables.c (action_row): Here.
2827 * tests/input.at (%define enum variables): Here.
2828 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2829
d521ee19
JD
28302009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2831
2832 Pacify ./configure --enable-gcc-warnings.
2833 * tests/input.at (Symbols): Prototype yyerror and yylex.
2834
28352009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
c9aded4b
JD
2836
2837 Document how `%define "var" "value"' is not M4-friendly.
2838 * src/parse-gram.y (variable): In comments here.
2839
8f0d265e
JD
28402009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2841
2842 Clean up recent patches a little.
2843 Reported by Akim Demaille.
2844 * doc/bison.texinfo (Understanding): Fix typos.
2845 * src/print.c (print_reductions): Don't use negated variable.
2846
f4909773
JD
28472009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2848
2849 List accepted values for a %define enum variable with an invalid value.
2850 Suggested by Akim Demaille at
2851 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2852 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2853 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2854 * tests/input.at (%define lr.default_reductions invalid values): Merge
2855 into...
2856 (%define enum variables): ... here, and update output.
2857
110ef36a
JD
28582009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2859
2860 Rename "default rule" to "default reduction".
2861 This includes changing variable names in code, changing
2862 comments, and renaming %define lr.default_rules to %define
2863 lr.default_reductions.
2864 * NEWS (2.5): Update IELR documentation.
2865 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2866 documentation.
2867 * data/glr.c, data/lalr1.java: Sync copyright dates.
2868 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2869 and lr.type documentation. Make some other wording
2870 improvements.
2871 (Glossary): Adjust cross-references and Default Reduction
2872 definition.
2873 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2874 Remove a confusing comment pointed out by Akim Demaille.
2875 (initialize_LA): Adjust code.
2876 * src/print-xml.c (print_reductions): Adjust code.
2877 * src/print.c (print_reductions): Adjust code.
2878 * src/reader.c (reader): Adjust code.
2879 * src/tables.c (action_row): Adjust code.
2880 (token_actions): Adjust code.
2881 * src/tables.h: Adjust YYDEFACT documentation.
2882 * tests/input.at (%define lr.default_rules invalid values):
2883 Rename test group to...
2884 (%define lr.default_reductions invalid values): ... this, and
2885 update grammar file and expected output.
2886 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2887 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2888
746ee38c
AD
28892009-04-21 Akim Demaille <demaille@gostai.com>
2890
2891 tests: check the use of dashes and periods in symbols.
2892 * tests/input.at (Symbol): New test group.
2893
eb45ef3b
JD
28942009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2895
2896 Document %define lr.type and lr.default_rules.
2897 * NEWS (2.5): Add an entry.
2898 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2899 besides just LALR(1) and GLR(1).
2900 * doc/bison.texinfo (Introduction): Likewise.
2901 (Language and Grammar): Bison is no longer limited to LALR(1)
2902 restrictions.
2903 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2904 when trying to distinguish from GLR. Talk about LR(1) grammars
2905 rather than LALR(1) grammars.
2906 (Decl Summary): In %define api.push_pull entry, say it applies
2907 to deterministic parsers in C rather than LALR(1) parsers in C.
2908 Add lr.default_rules entry.
2909 Add lr.type entry.
2910 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2911 restrictions.
2912 (Generalized LR Parsing): Same changes as for the previous GLR
2913 section.
2914 (Memory Management): Say deterministic rather than LALR(1).
2915 (Understanding): Correct some bison output.
2916 Index discussion of "accepting state".
2917 Say deterministic rather than LALR(1).
2918 (Bison Options): In --yacc entry, say deterministic rather than
2919 LALR(1).
2920 In --report, --graph, and --xml entries, just don't mention
2921 LALR(1).
2922 (C++ Parsers): Say deterministic rather than LALR(1).
2923 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2924 (Glossary): Add Accepting State, Consistent State, Default Rule,
2925 and IELR(1) definitions.
2926 In Generalized LR (GLR) definition, make same changes as in
2927 previous GLR sections.
2928 In LALR(1) definition, say Bison uses LALR(1) by default rather
2929 than implying Bison is limited to LALR(1).
2930 (LocalWords): Add IELR.
2931
db34f798
JD
29322009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2933
2934 Finish implementing %define lr.type.
2935 Its value can be "LALR", "IELR", or "canonical LR".
2936 * lib/timevar.def (TV_IELR_PHASE1): New var.
2937 (TV_IELR_PHASE2): New var.
2938 (TV_IELR_PHASE3): New var.
2939 (TV_IELR_PHASE4): New var.
2940 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2941 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2942 Sbitset.h, ielr.h, and ielr.c.
2943 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2944 trace_types): Add trace_ielr.
2945 * src/lalr.h, src/lalr.c (ngotos): Export it.
2946 (F): Rename to...
2947 (goto_follows): ... this, update all uses, and export it.
2948 (set_goto_map): Export it.
2949 (map_goto): Export it.
2950 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2951 handled in ielr.
2952 (initialize_LA): Export it. Move lookback allocation to...
2953 (lalr): ... here because, for canonical LR, initialize_LA must
2954 be invoked but lookback and much of the rest of LALR isn't
2955 needed.
2956 * main.c (main): Instead of lalr, invoke ielr, which invokes
2957 lalr.
2958 * src/reader.c (reader): Default lr.type to "LALR".
2959 Default lr.default_rules to "accepting" if lr.type is "canonical
2960 LR". Leave the default as "all" otherwise.
2961 Check for a valid lr.type value.
2962 * src/state.h, src/state.c (struct state_list): Add state_list
2963 member.
2964 (state_new): Initialize state_list member to NULL.
2965 (state_new_isocore): New function, exported.
2966 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2967 exercises all values of lr.type.
2968 (GNU AWK Grammar): Rename test group to...
2969 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2970 AT_TEST_EXISTING_GRAMMAR.
2971 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2972 (GNU pic Grammar): Rename test group to...
2973 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2974 AT_TEST_EXISTING_GRAMMAR.
2975 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2976 all values of lr.type.
2977 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2978 (Lane Split): Likewise.
2979 (Complex Lane Split): Likewise.
2980 (Split During Added Lookahead Propagation): Likewise.
2981
7fe11bb5
JD
29822009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2983
2984 Add new files for IELR and canonical LR implementation.
2985 * src/AnnotationList.c: New.
2986 * src/AnnotationList.h: New.
2987 * src/InadequacyList.c: New.
2988 * src/InadequacyList.h: New.
2989 * src/Sbitset.c: New.
2990 * src/Sbitset.h: New.
2991 * src/ielr.c: New.
2992 * src/ielr.h: New.
2993
7254f6a8
JD
29942009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2995
2996 Implement %define lr.default_rules.
2997 Its value describes the states that are permitted to contain
2998 default rules: "all", "consistent", or "accepting".
2999 * src/reader.c (reader): Default lr.default_rules to "all".
3000 Check for a valid lr.default_rules value.
3001 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
3002 is "accepting", then only mark the accepting state as
3003 consistent.
3004 (initialize_LA): Tell state_lookahead_tokens_count whether
3005 lr.default_rules is "accepting".
3006 * src/tables.c (action_row): If lr.default_rules is not "all",
3007 then disable default rules in inconsistent states.
3008 * src/print.c (print_reductions): Use this opportunity to
3009 perform some assertions about whether lr.default_rules was
3010 obeyed correctly.
3011 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
3012 helps with checking the parser tables for a grammar.
3013 * tests/input.at (%define lr.default_rules invalid values): New
3014 test group.
3015 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
3016 AT_TEST_TABLES_AND_PARSE.
3017 (`no %define lr.default_rules'): New test group generated by
3018 AT_TEST_LR_DEFAULT_RULES.
3019 (`%define lr.default_rules "all"'): Likewise.
3020 (`%define lr.default_rules "consistent"'): Likewise.
3021 (`%define lr.default_rules "accepting"'): Likewise.
3022
72e727f2
AD
30232009-04-20 Akim Demaille <demaille@gostai.com>
3024
3025 Formatting change.
3026
90462b8d
AD
30272009-04-20 Akim Demaille <demaille@gostai.com>
3028
3029 bison: factoring.
3030 * src/output.c (token_definitions_output): Use symbol_id_get
3031 instead of duplicating its logic.
3032 * TODO (YYERRCODE): Extend.
3033
4f646c37
AD
30342009-04-20 Akim Demaille <demaille@gostai.com>
3035
71b00ed8
AD
3036 variables: prefer error-verbose to error_verbose.
3037 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
3038 instead of error_verbose.
3039 * src/scan-gram.l (%error-verbose): Map to the error-verbose
3040 variable.
3041 * doc/bison.texinfo: Promote %define error-verbose instead of
3042 %error-verbose.
3043 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
3044
30452009-04-15 Akim Demaille <demaille@gostai.com>
3046
4f646c37
AD
3047 variables: accept dashes.
3048 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
3049 underscores.
3050 * src/scan-gram.l ({id}): Also accept dashes after the initial
3051 letter.
3052 ({directive}): Use {id}.
3053 * src/parse-gram.y: Comment and formatting changes.
3054 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
3055 symbols.
3056 * src/complain.h, src/complain.c (yacc_at): New.
3057 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
3058 symbol names.
3059 * src/output.c (token_definitions_output): Do not #define token
3060 names with dashes.
3061
184e3179
AD
30622009-04-20 Akim Demaille <demaille@gostai.com>
3063
3064 Consistently refer to Yacc, not YACC.
3065 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
3066
41253c3a
JD
30672009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
3068
3069 Pacify make maintainer-check-posix.
3070 * tests/input.at (%define, --define): Move bison command-line
3071 options before grammar file name.
3072
197b82ba
JD
30732009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3074
3075 Document semicolon warnings.
3076 * NEWS (2.5): Here.
3077
0c90a1f5
AD
30782009-04-14 Akim Demaille <demaille@gostai.com>
3079
3080 variables: use `parse.assert' instead of `assert'.
3081 * TODO (assert): Remove.
3082 * data/bison.m4 (b4_assert_if): Replace with...
3083 (b4_parse_assert_if): this.
3084 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
3085 * doc/bison.texinfo (Decl Summary): Document parse.assert.
3086
fa819509
AD
30872009-04-14 Akim Demaille <demaille@gostai.com>
3088
16dc0d90 3089 variables: use `parse.trace' instead of `debug'.
fa819509
AD
3090 * src/getargs.c (getargs): Map -t to %define trace.parse.
3091 * src/scan-gram.l (%debug): Map to %define trace.parse.
3092 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
3093 names to `_' in macro names.
3094 (b4_debug_if): Replace with...
3095 (b4_parse_trace_if): this.
3096 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3097 * data/yacc.c: Adjust.
3098 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
3099 Use @code to label the variable list.
3100 Document the variable parse.trace.
3101 (Tracing): Promote the parse.trace variable.
3102 * TODO: %printer is not documented.
3103
f7dae1ea
AD
31042009-04-14 Akim Demaille <demaille@gostai.com>
3105
3106 doc: minor fixes.
3107 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
3108 (Table of Symbols): Remove duplicate entry for %debug.
3109
3535c071
EB
31102009-04-10 Eric Blake <ebb9@byu.net>
3111
3112 submodules: update to latest
3113 * submodules/autoconf: Use latest upstream Autoconf.
3114
cf48f675
EB
31152009-04-06 Eric Blake <ebb9@byu.net>
3116
3117 Work around autoconf 2.63b bug in testsuite.
3118 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
3119 autoconf bug related to # in test.
3120
50cca368
JD
31212009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3122
3123 * NEWS (2.5): New section. Describe new -D/--define feature.
3124
3583d96b
AD
31252009-04-06 Akim Demaille <demaille@gostai.com>
3126
3127 Regen.
3128 * src/parse-gram.h, src/parse-gram.c: Regen.
3129
00f5d575
AD
31302009-04-06 Akim Demaille <demaille@gostai.com>
3131
3132 rename muscle_tab.* as muscle-tab.* for consistency.
3133 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
3134 * src/muscle-tab.h, src/muscle-tab.c: these.
3135 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
3136 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
3137
76bf5102
AD
31382009-04-06 Akim Demaille <demaille@gostai.com>
3139
3140 Makefile: introduce $(BISON).
3141 * src/local.mk (BISON): New.
3142 (YACC): Use it.
3143
bc0f5737
AD
31442009-04-06 Akim Demaille <demaille@gostai.com>
3145
3146 parser: handle %locations as %define locations.
3147 * src/getargs.h, src/getargs.c (locations_flag): Remove.
3148 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
3149 to set "locations" to true.
3150 * src/output.c (prepare): Don't output "locations".
3151 * src/scan-gram.l (%locations): Handle it as a %<flag>.
3152 * src/parse-gram.y: It's no longer a token.
3153 Don't handle it.
3154 * data/bison.m4 (b4_locations_if): Define it with
3155 b4_percent_define_if_define.
3156 * data/c.m4, data/glr.cc: Adjust.
3157
697c912f
AD
31582009-04-06 Akim Demaille <demaille@gostai.com>
3159
3160 Regen.
3161 * src/parse-gram.c: Regen.
3162
4920ae8b
AD
31632009-04-06 Akim Demaille <demaille@gostai.com>
3164
3165 muscle: factor the handling of obsolete of obsolete directives.
3166 Suggested by Joel E. Denny.
50cca368 3167
4920ae8b
AD
3168 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
3169 New, extracted from...
3170 * src/parse-gram.y (prologue_declaration: pure-parser): here.
3171 Remove it.
3172 (prologue_declaration: "%<flag>"): Use
3173 muscle_percent_define_ensure.
3174 (%error-verbose, %pure-parser): No longer tokens.
3175 * src/scan-gram.l (pure-parser): Return as a %<flag>.
3176
1d5b3c08
JD
31772009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3178
3179 Fix options documentation.
3180 * build-aux/cross-options.pl: As in --help output, write optional
3181 arguments as [=ARG] not =[ARG].
3182 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
3183
62c99cf4
JD
31842009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3185
3186 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
3187 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
3188 requirements for a correct m4 are stricter.
3189 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
3190 * configure.ac: Update to use AC_PROG_GNU_M4.
3191 Reported by Eric Blake.
3192
1c93f35b
JD
31932009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3194
3195 Help with updating web manual.
3196 * HACKING: Incorporate instructions from gnulib/doc/README.
3197 * bootstrap.conf (gnulib_modules): Add gendocs.
3198
86cfae0a
AD
31992009-04-03 Akim Demaille <demaille@gostai.com>
3200
3201 Regen.
3202 * src/parse-gram.h, src/parse-gram.c: Regen.
3203
ba061fa6
AD
32042009-04-03 Akim Demaille <demaille@gostai.com>
3205
3206 Factor %FLAG at scan level.
3207 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
3208 definitions and associated rules, replaced by....
3209 (PERCENT_FLAG): this new token type, and rule.
3210 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
3211 Use it for %debug and %error-verbose.
3212
b19ebeb3
AD
32132009-04-03 Akim Demaille <demaille@gostai.com>
3214
3215 Regen.
3216 * src/parse-gram.h, src/parse-gram.c: Regen.
3217
001a16a9
AD
32182009-04-03 Akim Demaille <demaille@gostai.com>
3219
3220 Treat %debug as %define debug.
3221 * data/bison.m4 (b4_debug_if): New.
3222 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
3223 * data/lalr1.java: Use it instead of b4_debug_flag.
3224 * src/getargs.h, src/getargs.c (debug_flag): Remove.
3225 * src/output.c (prepare): Don't output it.
3226 * src/parse-gram.y: Treat %debug as %define debug.
3227
32282009-04-03 Akim Demaille <demaille@gostai.com>
3229
3230 Treat %error-verbose as %define error_verbose.
3231 This allows to pass -Derror_verbose on the command line. Better
3232 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
3233 ERROR_VERBOSE being defined as false or true.
3234 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
3235 on b4_percent_define_ifdef, for does not check the defined value,
3236 but only whether the symbol is defined, rely on
3237 b4_percent_define_flag_if, so that a value of "false" is processed
3238 as a false.
3239 If not defined, define the flag to "false".
3240 (b4_error_verbose_if): New.
3241 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
3242 b4_error_verbose_flag.
3243 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
3244 * src/output.c (prepare): Don't output it.
3245 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
3246
92822aff
JD
32472009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3248
3249 Fix strange %define locations for default values.
3250 Reported by Akim Demaille at
3251 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
3252 and discussed again starting at
3253 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
3254 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
3255 because location information is bogus.
3256 Use angle brackets to delimit fake file name because square brackets
3257 look like underexpanded m4. Choose a better fake file name.
3258 Use negative line numbers.
3259 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
3260 * src/location.c (location_print): If line for a boundary is negative,
3261 only print that boundary's file name.
3262 * src/location.h: Document that.
3263 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3264 defaults): Update output.
3265
e021191b
JD
32662009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3267
3268 Pacify ./configure --enable-gcc-warnings.
3269 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
3270 in lib won't compile with it.
3271 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
3272
78f65418
AD
32732009-03-31 Akim Demaille <demaille@gostai.com>
3274
3275 bootstrap: --help to stdout.
3276 * bootstrap (usage): Don't send --help to stderr.
3277 Use a here doc instead of a long string.
3278
f7e241f4
AD
32792009-03-31 Akim Demaille <demaille@gostai.com>
3280
3281 bootstrap: README-hacking no longer exists
3282 * bootstrap (checkout_only_file): Set to HACKING.
3283
31d3e510
AD
32842009-03-26 Akim Demaille <demaille@gostai.com>
3285
3286 doc: merge HACKING and README-hacking.
3287 Two files is confusing.
3288 Reported by Alexandre Duret-Lutz.
1f9d8248 3289
31d3e510
AD
3290 * README-hacking: Merge into...
3291 * HACKING (Working from the repository): here.
3292
81535bfa
AD
32932009-03-26 Akim Demaille <demaille@gostai.com>
3294
3295 doc: update README-hacking.
3296 * README-hacking: We now use git and git submodules.
3297 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
3298
56f772e9
AD
32992009-03-26 Akim Demaille <demaille@gostai.com>
3300
3301 lalr1.cc: avoid GCC 4.3 warnings.
3302 GCC 4.3 now warns about "a || b && c" and asks for explicit
3303 parentheses.
3304 Reported by Alexandre Duret-Lutz.
3305 * data/location.cc: Update copyright years.
3306 (Position::operator==): Use parens to make precedence explicit.
3307 Compare lines and columns first, as they are more likely to be
3308 different, and they are faster to compare.
3309
11c073b7
AD
33102009-03-26 Akim Demaille <demaille@gostai.com>
3311
3312 gnulib: update.
3313 * gnulib: Update to latest.
3314 * src/local.mk (AM_CFLAGS): Move to...
3315 * Makefile.am: here.
3316 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
3317 AM_CFLAGS.
3318
91be6b28
AD
33192009-03-02 Akim Demaille <demaille@gostai.com>
3320
3321 Comment changes.
3322
cbf25ce7
AD
33232009-03-02 Akim Demaille <demaille@gostai.com>
3324
3325 Share b4_yytranslate_define.
3326 * data/lalr1.cc (b4_yytranslate_define): Move to...
3327 * data/c++.m4: here.
3328
882f02ed
AD
33292009-03-02 Akim Demaille <demaille@gostai.com>
3330
3331 Use locations in the variant example.
1f9d8248
AD
3332 Yes, this obfuscates the point of this example, variants only.
3333 But glr.cc cannot work (yet?) without locations. This change
3334 makes it easier to use this example with glr.cc.
11c073b7 3335
882f02ed
AD
3336 * examples/variant.yy (assert): %define it.
3337 (locations): Request them.
3338 (yylex): Bind the location to the stage.
3339
0623bacc
AD
33402009-03-02 Akim Demaille <demaille@gostai.com>
3341
3342 Dub make_TOKEN as a public type interface.
3343 * data/c++.m4 (b4_symbol_constructor_declare)
3344 (b4_symbol_constructor_define): New empty stubs.
3345 (b4_public_types_declare, b4_public_types_define): Use them.
3346 * data/lalr1.cc (b4_symbol_constructor_declare)
3347 (b4_symbol_constructor_declare_)
3348 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
3349 Move to...
3350 * data/variant.hh: here.
3351 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
3352 needed.
3353 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
3354 b4_symbol_constructor_declare, as it is now done by
3355 b4_public_types_define and b4_public_types_declare.
3356
5f5a90df
AD
33572009-03-02 Akim Demaille <demaille@gostai.com>
3358
3359 Coding style changes.
3360 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3361 (b4_symbol_constructor_declarations)
3362 (b4_symbol_constructor_definition_)
3363 (b4_symbol_constructor_definitions)
3364 (b4_yytranslate_definition): Rename as...
3365 (b4_symbol_constructor_declare_)
3366 (b4_symbol_constructor_declare)
3367 (b4_symbol_constructor_define_)
3368 (b4_symbol_constructor_define)
3369 (b4_yytranslate_define): these.
3370 * data/variant.hh (b4_variant_definition): Rename as...
3371 (b4_variant_define): this.
3372
b47b6ff7
AD
33732009-03-02 Akim Demaille <demaille@gostai.com>
3374
3375 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
3376 * data/bison.m4 (b4_percent_define_if_define): New.
3377 * data/c++.m4 (b4_variant_if): Move to...
3378 * data/bison.m4: Here, using b4_percent_define_if_define.
3379 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
3380 * data/bison.m4: Here, using b4_percent_define_if_define.
3381
1d6b689b
AD
33822009-03-02 Akim Demaille <demaille@gostai.com>
3383
3384 Dub symbol_type_base as a public type.
3385 * data/c++.m4 (b4_public_types_declare): Now define
3386 symbol_type_base and symbol_type.
3387 (b4_public_types_define): New.
3388 In both cases, the definitions are taken verbatim from lalr1.cc.
3389 * data/lalr1.cc: Adjust.
3390
4f84717d
AD
33912009-03-02 Akim Demaille <demaille@gostai.com>
3392
3393 b4_public_types_declare.
3394 * data/c++.m4 (b4_public_types_declare): New.
3395 * data/glr.cc, data/lalr1.cc: Use it.
3396
b9e4eb5b
AD
33972009-03-02 Akim Demaille <demaille@gostai.com>
3398
3399 b4_semantic_type_declare.
3400 * data/c++.m4 (b4_semantic_type_declare): New.
3401 Factors and generalizes what was in glr.cc and lalr1.cc.
3402 * data/variant.hh (b4_semantic_type_declare): Redefine it for
3403 variants.
3404 * data/lalr1.cc, data/glr.cc: Use it.
3405
6a6e7f0c
AD
34062009-02-26 Akim Demaille <demaille@gostai.com>
3407
3408 Upgrade gnulib.
3409 * gnulib: Upgrade from master.
3410 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
3411 Regen.
3412
e9e61b00
AD
34132009-02-25 Akim Demaille <demaille@gostai.com>
3414
3415 Remove useless arguments.
3416 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3417 relevant.
3418
3eead995
AD
34192009-02-25 Akim Demaille <demaille@gostai.com>
3420
3421 Comment changes.
3422 * data/lalr1.cc: here.
3423
87f28efe
AD
34242009-02-25 Akim Demaille <demaille@gostai.com>
3425
3426 Fix glr.cc's debug level handling.
3427 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3428 glr.c which is used.
3429 (debug_level, set_debug_level): Adjust.
3430
9be2a009
AD
34312009-02-25 Akim Demaille <demaille@gostai.com>
3432
3433 Copyright years.
3434 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3435
07a6e87d
AD
34362009-02-25 Akim Demaille <demaille@gostai.com>
3437
3438 Style changes.
3439 * etc/bench.pl.in (generate_grammar_list): Consitently use
3440 location_type, not yy::location.
3441
33c78bd2
AD
34422009-02-25 Akim Demaille <demaille@gostai.com>
3443
3444 Comment change.
3445 * data/lalr1.cc: here.
3446
49572920
AD
34472009-02-19 Akim Demaille <demaille@gostai.com>
3448
3449 Make yyparser::error public.
3450 * data/lalr1.cc: here.
3451 There is no good reason to keep it private (and it is convenient
3452 to use it from the scanner for instance). It is already public in
3453 glr.cc.
3454
88654b47
AD
34552009-02-19 Akim Demaille <demaille@gostai.com>
3456
3457 Comment changes.
3458 * data/glr.cc: here.
3459
4524c55b
AD
34602009-02-19 Akim Demaille <demaille@gostai.com>
3461
3462 Remove trailing blanks.
6a6e7f0c
AD
3463 The epilogue has its own ending \n, no need to add another.
3464
4524c55b
AD
3465 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3466 epilogue.
3467 * data/glr.cc: dnl when extending the epilogue.
3468 Remove stray "private:".
3469
6ceccee8
AD
34702009-02-19 Akim Demaille <demaille@gostai.com>
3471
3472 Use b4_c_modern.
3473 * data/c.m4 (b4_c_function_decl): Here.
3474
9c6a8966
AD
34752009-02-19 Akim Demaille <demaille@gostai.com>
3476
3477 Comment changes.
3478 * data/lalr1.cc: here.
3479
507aa0e2
AD
34802009-02-19 Akim Demaille <demaille@gostai.com>
3481
3482 Extract variant.hh
3483 * data/variant.hh: New, extracted from...
3484 * data/lalr1.cc: here.
3485 Adjust.
3486 * data/local.mk: Adjust.
3487
51bacae6
AD
34882009-02-19 Akim Demaille <demaille@gostai.com>
3489
3490 Extract stack.hh from lalr1.cc.
3491 * data/stack.hh: New.
3492 * data/lalr1.cc: Extract from here.
3493 * data/local.mk: Adjust.
3494
06c3084f
JD
34952009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3496
3497 Add reminder about uploading public key to keys.gnupg.net.
3498 * HACKING (Release Procedure): Here.
3499
0ea583d2
AD
35002009-01-28 Akim Demaille <demaille@gostai.com>
3501
3502 * NEWS: Update information about 2.4.1 and 2.4.2.
3503
402b123d
AD
35042008-11-04 Akim Demaille <demaille@gostai.com>
3505
3506 Reformat NEWS.
3507 * NEWS: Use more outline-mode markup.
3508 Suggested by Jim Meyering.
3509
74553c98
AD
35102009-01-08 Akim Demaille <demaille@gostai.com>
3511
3512 Fix grep portability issues.
3513 Grep on Solaris does not support -q.
3514 Reported by Summum Bonum.
3515
3516 * NEWS: Add a stub for 2.4.2.
3517 * THANKS: Add Summum Bonum.
3518 * tests/atlocal.in (EGREP): New.
3519 (CC, CXX, XSLTPROC): Make it possible to override them via
3520 envvars.
3521 * tests/java.at: Use $EGREP instead of egrep.
3522 Use AT_CHECK's ignore instead of grep's -q.
3523
84eedf86
AD
35242008-12-11 Akim Demaille <demaille@gostai.com>
3525
3526 Pass the token type to yysyntax_error.
3527 * data/yacc.c (yysyntax_error): Take the transated token instead
3528 of the raw number.
3529 Adjust callers.
3530 * TODO: Update.
3531
5860cc8c
AD
35322008-12-11 Akim Demaille <demaille@gostai.com>
3533
3534 Formatting changes.
3535 * data/glr.c: Formatting changes.
3536
2b008529
AD
35372008-12-11 Akim Demaille <demaille@gostai.com>
3538
3539 Propagate i18n changes into glr.c.
3540 * TODO: Update.
3541 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3542 building the error message format dynamically.
3543 * data/lalr1.java: Formatting changes.
3544
2cd1af95
AD
35452008-12-11 Akim Demaille <demaille@gostai.com>
3546
3547 Use testsuite -C.
3548 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3549 Solves problems when top_srcdir is an absolute path.
3550 Suggested by Eric Blake.
3551 * configure.ac: Require Autoconf 2.62.
3552
eeb29422
AD
35532008-12-11 Akim Demaille <demaille@gostai.com>
3554
3555 Simplify the i18n of the error messages.
3556 * data/lalr1.cc: Comment changes.
3557 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3558 lalr1.cc instead of building dynamically the format string.
3559
6617622c
AD
35602008-12-08 Akim Demaille <demaille@gostai.com>
3561
3562 Fix portability issue in the test suite.
3563 * tests/local.at (AT_MATCHES_CHECK): New.
3564 Based on Perl instead of Sed. Sed has too many portability
3565 pitfalls, not ever Sed is GNU Sed.
3566 * tests/actions.at (Fix user actions without a trailing semicolon):
3567 Use it.
3568
2ca1136c
AD
35692008-12-08 Akim Demaille <demaille@gostai.com>
3570
3571 Update data/README.
3572 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3573
6c63b895
AD
35742008-12-08 Akim Demaille <demaille@gostai.com>
3575
3576 Install autoconf as a submodule to get m4sugar.
3577 * .gitmodules: Add submodules/autoconf.
3578 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3579 submodules/autoconf.
3580
417e31d2
AD
35812008-12-08 Akim Demaille <demaille@gostai.com>
3582
3583 Test token.prefix in all the skeletons.
3584 * data/java.m4 (b4_token_enum): Use the token.prefix.
3585 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3586 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3587 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3588 * tests/java.at: Comment changes.
3589 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3590 (Java parser class and package names): Add token.prefix check.
3591
97abf544
AD
35922008-12-08 Akim Demaille <demaille@gostai.com>
3593
3594 Fix regeneration of atconfig.
3595 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3596 remove it: now that there is no tests/Makefile.am, the top-level
3597 Makefile properly updates atconfig when needed.
3598
e8cd1ad6
DJ
35992008-12-07 Di-an Jan <dianj@freeshell.org>
3600
3601 Implement the FIXME that ends an user action with a semicolon
3602 if it seems necessary.
3603 * src/scan-code.l (flex rules section): Flag cpp directive from
3604 any `#' to the first unescaped end-of-line. Semicolon is not
3605 needed after `;', `{', '}', or cpp directives and is needed after
3606 any other token (whitespaces and comments have no effect).
3607 * tests/actions.at (Fix user actions without a trailing semicolon):
3608 New test.
3609 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3610 to make user actions complete statements.
3611 Adjust column numbers in error messages.
3612 * tests/regression.at (Fix user actions without a trailing semicolon):
3613 Remove. Covered by new test.
3614
ce9447fc
AD
36152008-12-07 Akim Demaille <demaille@gostai.com>
3616
3617 Update gnulib.
3618 * gnulib: Update from master.
3619
d333175f
EB
36202008-12-05 Eric Blake <ebb9@byu.net>
3621
3622 Avoid compiler warning.
3623 * src/output.c (muscle_insert_item_number_table): Delete unused
3624 function.
3625
215b40ac
EB
36262008-12-02 Eric Blake <ebb9@byu.net>
3627
3628 Build testsuite with newer autoconf.
3629 * tests/output.at (m4_expand): Don't override in newer autoconf,
3630 where the underlying implementation changed.
3631 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3632 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3633 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3634 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3635 since some of them contain unbalanced ')'.
3636
3bb21113
AD
36372008-12-01 Akim Demaille <demaille@gostai.com>
3638
3639 Use b4_symbol for printers and destructors everywhere.
3640 * data/bison.m4 (b4_symbol_action_location): New.
3641 * data/c.m4 (b4_symbol_actions): Remove.
3642 Adjust all callers to use by b4_symbol_foreach and the corresponding
3643 b4_symbol_printer/destructor macro.
3644 * data/glr.cc: Adjust.
3645 * data/lalr1.java: Adjust the %destructor sanity check.
3646 * src/output.c (symbol_code_props_output): Remove, we no longer
3647 need the b4_symbol_printers/destructors tables.
3648
fb7c5b1f
AD
36492008-12-01 Akim Demaille <demaille@gostai.com>
3650
3651 Use b4_symbol_case_.
3652 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3653 b4_symbol_case_.
3654
cf6fb222
AD
36552008-12-01 Akim Demaille <demaille@gostai.com>
3656
3657 Move b4_symbol based macro to bison.m4.
3658 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3659 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3660 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3661 (b4_type_foreach): Move to...
3662 * data/bison.m4: Here.
3663 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3664 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 3665
e3c52a63
AD
36662008-12-01 Akim Demaille <demaille@gostai.com>
3667
3668 b4_symbol/type_foreach.
3669 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3670 Use them.
3671
2bde9113
AD
36722008-12-01 Akim Demaille <demaille@gostai.com>
3673
3674 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
3675 Instead of defining complex list of tuples to define various
3676 properties of the symbols, we now prefer to define symbols as
3677 "structs" in m4: using the symbol key (its number), and the
3678 property name, b4_symbol gives it value. Use this to handle
3679 destructors and printers.
3680
2bde9113
AD
3681 * src/output.c (CODE_PROP): New.
3682 (prepare_symbol_definitions): Use it to define the printer and
3683 destructor related attributes of the symbols.
3684 * data/lalr1.cc (b4_symbol_actions): Rename as...
3685 (b4_symbol_action): this.
3686 Use b4_symbol instead of 6 arguments.
3687 (b4_symbol_printer, b4_symbol_destructor): New.
3688 Use them instead of b4_symbol_actions.
3689
44494bf6
AD
36902008-12-01 Akim Demaille <demaille@gostai.com>
3691
3692 Avoid capturing variables too easily.
3693 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3694 v__ and p__ instead of v and p.
3695
fad814bd
AD
36962008-12-01 Akim Demaille <demaille@gostai.com>
3697
3698 Remove spurious empty line before syncline.
3699 * data/bison.m4 (b4_syncline): Don't output an empty line before
3700 the output.
3701
feda5527
AD
37022008-11-26 Akim Demaille <demaille@gostai.com>
3703
3704 Convert lib/Makefile.am into lib/local.mk.
3705 The real problem is rather gnulib.mk, which itself is extracted
3706 from a Makefile.am that gnulib expects to the "recursive". The
3707 tool prefix-gnulib-mk converts such a gnulib.mk to be
3708 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3709
3710 * etc/prefix-gnulib-mk: New.
3711 * bootstrap (slurp): Use it to convert further gnulib.mk.
3712 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3713 are deeper.
3714 * lib/Makefile.am: Rename as...
3715 * lib/local.mk: this.
3716 Adjust to be prefixed.
3717 * Makefile.am, configure.ac: Adjust.
3718 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3719
56ddee7f
AD
37202008-11-26 Akim Demaille <demaille@gostai.com>
3721
3722 s/_FLAGS/FLAGS/.
3723 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3724 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3725 Reported by Eric Blake.
3726
728e89a0
AD
37272008-11-26 Akim Demaille <demaille@gostai.com>
3728
3729 Use b4_parser_tables_define in glr.cc.
3730 * data/glr.c: Use b4_parser_tables_define instead of defining the
3731 (deterministic integral) tables by hand.
3732
2c1bf9bd
AD
37332008-11-26 Akim Demaille <demaille@gostai.com>
3734
3735 Use b4_parser_tables_define in Java.
3736 * data/java.m4 (b4_typed_parser_table): Rename as...
3737 (b4_typed_parser_table_define): this, for consistency.
3738 Accept a comment as $4.
3739 Move $2 into yy*_.
3740 (b4_integral_parser_table): Rename as...
3741 (b4_integral_parser_table_define): this.
3742 * data/lalr1.java: Adjust all uses.
3743 Use b4_parser_tables_define instead of generation by hand.
3744
ba206cf4
AD
37452008-11-26 Akim Demaille <demaille@gostai.com>
3746
3747 Prepare the convergence bw C style and Java table generation.
3748 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3749 (b4_tables_define): Rename as...
3750 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3751 (b4_parser_tables_define): these.
3752 * data/c.m4 (b4_table_define): Rename as...
3753 (b4_integral_parser_table_define): this.
3754 * data/lalr1.cc: Adjust.
3755 (b4_table_define, b4_table_declare): Rename as...
3756 (b4_integral_parser_table_define)
3757 (b4_integral_parser_table_declare): these.
3758 (yyrline_): Move the comment where it is actually used.
3759 * data/yacc.c: Adjust.
3760 (yyrline): Use b4_integral_parser_table_define.
3761
d12f8e49
AD
37622008-11-26 Akim Demaille <demaille@gostai.com>
3763
3764 Regen.
3765 * src/parse-gram.h, src/parse-gram.c: Regen.
3766
0991e29b
AD
37672008-11-26 Akim Demaille <demaille@gostai.com>
3768
3769 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3770 * data/lalr1.cc (b4_tables_map): Move to...
3771 * data/bison.m4: here.
3772 Update the comment for yytable during the flight.
3773 (b4_tables_declare, b4_tables_define): New.
3774 * data/lalr1.cc: Use them.
3775 * data/c.m4 (b4_table_define): New.
3776 * data/yacc.c: Use b4_tables_define instead of output the tables
3777 by hand.
3778 * tests/regression.at (Web2c Actions): Adjust the expected output,
3779 the order of the tables changed.
3780
3d3bc1fe
AD
37812008-11-26 Akim Demaille <demaille@gostai.com>
3782
3783 Get rid of (yy)rhs and (yy)prhs.
3784 These tables are no longer needed in the parsers, and they don't seem to
3785 be useful. They are not documented either.
feda5527 3786
3d3bc1fe
AD
3787 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3788 Adjust the computation of (yy)r2.
3789
08c81469
AD
37902008-11-26 Akim Demaille <demaille@gostai.com>
3791
3792 Rule length is unsigned.
3793 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3794
932b0c96
AD
37952008-11-26 Akim Demaille <demaille@gostai.com>
3796
3797 Get rid of lalr1-split.cc.
3798 It was no longer maintainer.
feda5527 3799
932b0c96
AD
3800 * data/lalr1-split.cc: Remove.
3801 * etc/bench.pl.in (bench_fusion_parser): Remove.
3802 Adjust.
3803
8452c667
AD
38042008-11-26 Akim Demaille <demaille@gostai.com>
3805
3806 Use yy* consistently.
3807 * data/glr.c: Now that yyrhs no longer exists as a global
3808 variable, rename local "rhs" variables into "yyrhs" for
3809 consistency.
3810
783aa653
AD
38112008-11-25 Akim Demaille <demaille@gostai.com>
3812
3813 Get rid of yyrhs and yyprhs in glr.c.
3814 * data/glr.c (yyrhs, yyprhs): Remove.
3815 Instead, use the state stack and yystos.
3816
6130b755
AD
38172008-11-25 Akim Demaille <demaille@gostai.com>
3818
3819 Flag glr tests.
3820 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3821 as an Autotest keyword.
3822
95a7b1c9
AD
38232008-11-25 Akim Demaille <demaille@gostai.com>
3824
3825 Prefer TESTSUITE_FLAGS.
3826 TESTSUITEFLAGS is barely readable.
feda5527 3827
95a7b1c9
AD
3828 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3829 for backward compatibility.
3830 Use the former instead of the latter.
3831
b4f18401
AD
38322008-11-25 Akim Demaille <demaille@gostai.com>
3833
3834 Get rid of yyrhs and yyprhs in larl1.java.
3835 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3836 (yy_reduce_print): Rather, use yystos_ and the state stack.
3837
c265fd6b
AD
38382008-11-25 Akim Demaille <demaille@gostai.com>
3839
3840 Formatting changes.
3841
68dbdee8
AD
38422008-11-25 Akim Demaille <demaille@gostai.com>
3843
3844 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
3845 They were used to get the symbol types, given a rule number, when
3846 displaying the top of the stack before a reduction. But the
3847 symbol type is available from the state stack. This has two be
3848 benefits: two tables less in the parser (making it smaller), and a
3849 more consistent use of the three stacks which will help to fuse
3850 them.
feda5527 3851
68dbdee8
AD
3852 * data/yacc.c (yyprhs, yyrhs): Remove.
3853 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3854 (yy_reduce_print): Take yyssp as argument.
3855 Use it, together with yystos, to get the symbol type.
3856 * tests/regression.at (Web2c Report): Remove these tables from the
3857 expected output.
3858
6ab1adbe
AD
38592008-11-25 Akim Demaille <demaille@gostai.com>
3860
3861 b4_tables_map.
3862 The point is to factor the generation of the tables across skeletons.
3863 This is language dependant.
feda5527 3864
6ab1adbe
AD
3865 * data/c.m4 (b4_comment_): New.
3866 Should be usable to define how to generate tables independently of
3867 the language.
3868 (b4_c_comment): New.
3869 (b4_comment): Bounce to b4_c_comment.
3870 Now support $2 = [PREFIX] for indentation.
3871 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3872 there is no comment.
3873 Indent it properly when there is one.
3874 Output the ending semicolon.
3875 (b4_table_define): Space changes.
3876 Output the ending semicolon.
3877 (b4_tables_map): New.
3878 Use it twice instead of declaring and defining the (integral)
3879 tables by hand.
3880
0fddb3d5
AD
38812008-11-25 Akim Demaille <demaille@gostai.com>
3882
3883 b4_table_declare.
3884 * data/lalr1.cc (b4_table_declare): New.
3885 Use it to declare the tables defined with b4_table_define.
3886 (b4_table_define): Declare a third arg to match b4_table_declare
3887 signature.
3888 Move all the comments around invocations of b4_table_define into
3889 the invocations itselves.
3890 Move things around to have the order for declarations and
3891 definitions.
3892
c4ddc0fb
AD
38932008-11-25 Akim Demaille <demaille@gostai.com>
3894
3895 Formatting changes.
3896 * data/lalr1.java: here.
3897
e0c653e7
AD
38982008-11-25 Akim Demaille <demaille@gostai.com>
3899
3900 b4_args is more general than only C++.
3901 * data/lalr1.cc (b4_args, _b4_args): Move to...
3902 * data/bison.m4: here.
3903
4182a0a1
DJ
39042008-11-21 Di-an Jan <dianj@freeshell.org>
3905
3906 Implement no-XXX arguments for --warnings, --report, --trace.
3907 * src/getargs.c (flags_argmatch): Handles no-XXX.
3908 Fix typo in doxygen comment.
3909
01466c3e
AD
39102008-11-21 Akim Demaille <demaille@gostai.com>
3911
3912 Display the changes in cross-options.texi.
3913 * build-aux/cross-options.pl ($sep): New, to separate items.
3914 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3915 changes.
3916
a7c09cba
DJ
39172008-11-20 Di-an Jan <dianj@freeshell.org>
3918
3919 Improves options in the manual.
3920 * doc/bison.texinfo (-g, -x): Add space before argument.
3921 (Option Cross Key): Implement FIXME: listing directives also.
3922 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3923 (Short Option): Special case -d. Put arguments inside @option.
feda5527 3924 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
3925 src/scan-gram.l (actual name passed as the first argument)
3926 with special case for %define.
3927 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3928 to build-aux/cross-options.pl.
3929 * src/getargs.c (usage): Document limitations of cross-options.pl.
3930 * src/scan-gram.l: Likewise.
3931
6c88b51e
JD
39322008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3933
3934 Fix unexpanded macros in GLR defines file.
3935 Reported by Csaba Raduly at
3936 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3937 * THANKS (Csaba Raduly): Add.
3938 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3939 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3940 lexer in a separate module that includes the defines file.
3941 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3942 source.
3943 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3944 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3945 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3946 (AT_DATA_SOURCE_PROLOGUE): New.
3947 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3948 (AT_DATA_SOURCE): New.
3949 (AT_FULL_COMPILE): Extend to support an additional source file.
3950
1e034807
AD
39512008-11-18 Akim Demaille <demaille@gostai.com>
3952
3953 More TODO.
3954 * TODO: More short term issues.
3955
e3dda35c
AD
39562008-11-18 Akim Demaille <demaille@gostai.com>
3957
3958 Regen.
3959 * src/parse-gram.h, src/parse-gram.c: Regen.
3960
bd187d7b
AD
39612008-11-18 Akim Demaille <demaille@gostai.com>
3962
3963 Use b4_subtract where possible.
3964 * data/lalr1.cc (b4_subtract): Move to...
3965 * data/bison.m4: here.
3966 * data/glr.c (b4_rhs_data): Use it.
3967 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3968
6085ab0d
AD
39692008-11-18 Akim Demaille <demaille@gostai.com>
3970
3971 Remove incorrect mode specification.
3972 * data/glr.cc: Don't pretend it's C code.
3973
9ce405ce
JD
39742008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3975
3976 Simplify last patch slightly.
3977 * src/getargs.c (getargs): Here.
3978
a8beef7e
JD
39792008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3980
3981 Fix last warning from --enable-gcc-warnings.
3982 * src/getargs.c (getargs): Don't assign const address to non-const
3983 pointer.
3984
d50eea6d
JD
39852008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3986
3987 Don't let maintainer-*-check targets force a version update.
3988 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3989 handled.
3990
f5f419de
DJ
39912008-11-17 Di-an Jan <dianj@freeshell.org>
3992
3993 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3994 Align menus. Adjust word wrapping. Use node names for menu names.
3995 (Examples): Don't abbreviate node names.
3996 (LocalWords): Remove abbreviations.
3997 (Copying): Make description a sentence.
d50eea6d 3998 (Java Action Features): Remove period to match the rest of menu.
f5f419de 3999
d73e55e0
DJ
40002008-11-17 Di-an Jan <dianj@freeshell.org>
4001
4002 Handles several --enable-gcc-warnings.
4003 * src/getargs.c (command_line_location): Set parameters to void.
4004 * src/output.c (symbol_type_name_cmp): Make static.
4005 (symbols_by_type_name): Set parameters to void.
4006 (symbol_definitions_output): Remove unused parameter. Rename as...
4007 (prepare_symbol_definitions): this.
4008 (muscles_output): Move symbol_definitions_output to...
4009 (output): here as prepare_symbol_definitions.
4010 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 4011 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 4012
68c989de
DJ
40132008-11-17 Di-an Jan <dianj@freeshell.org>
4014
4015 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
4016 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
4017
23ce6f4c
AD
40182008-11-16 Akim Demaille <demaille@gostai.com>
4019
4020 Add missing $(EXEEXT).
4021 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
4022 "src/bison$(EXEEXT)".
4023 Reported by Di-an Jan.
4024
dd704c35
AD
40252008-11-15 Akim Demaille <demaille@gostai.com>
4026
4027 * TODO: Update.
4028
dab244d5
AD
40292008-11-15 Akim Demaille <demaille@gostai.com>
4030
4031 Formatting changes.
4032 * tests/input.at: here.
4033
4b4da9fb
AD
40342008-11-15 Akim Demaille <demaille@gostai.com>
4035
4036 Remove duplicate header inclusion.
4037 * src/LR0.c: here.
4038
4ea3f53d
AD
40392008-11-15 Akim Demaille <demaille@gostai.com>
4040
4041 * src/parse-gram.h, src/parse-gram.c: Regen.
4042
cb823b6f
AD
40432008-11-15 Akim Demaille <demaille@gostai.com>
4044
4045 Support parametric types.
b06df3c2
AD
4046
4047 There are two issues to handle: first scanning nested angle
4048 bracket pairs to support types such as std::pair< std::string,
4049 std::list<std::string> > >.
4050
4051 Another issue is to address idiosyncracies of C++: do not glue two
4052 closing angle brackets together (otherwise it's operator>>), and
4053 avoid sticking blindly a TYPE to the opening <, as it can result
4054 in '<:' which is a digraph for '['.
4055
cb823b6f
AD
4056 * src/scan-gram.l (brace_level): Rename as...
4057 (nesting): this.
4058 (SC_TAG): New.
4059 Implement support for complex tags.
b06df3c2 4060 (tag): Accept
cb823b6f
AD
4061 , but not <.
4062 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
4063 (b4_symbol_variant): Leave space around types as parameters.
4064 * examples/variant.yy: Use nested template types and leading ::.
4065 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
4066 Rename as...
4067 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
4068 * tests/c++.at: Test parametric types.
4069
7b6e6753
AD
40702008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4071
4072 Test token.prefix.
4073 This is not sufficient, but we test at least that the make_SYMBOL
4074 interface is not affected by token.prefix. A more general test
4075 will be implemented when the support of token.prefix is generalized
4076 to more skeletons.
b06df3c2 4077
7b6e6753
AD
4078 * tests/c++.at: One more variant test, using token.prefix.
4079
dddec537
AD
40802008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4081
4082 Test the make_TOKEN interface.
4083 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
4084 Factor the common code in yylex.
4085 Use it to test "%define lex_symbol".
4086
7d3e21ba
AD
40872008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4088
4089 Formatting change.
4090
4fc55348
AD
40912008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4092
4093 Simplify code for variants bench marks.
4094 * etc/bench.pl.in (&generate_grammar_list): Define and use
4095 location_type.
4096 Factor the common code in yylex.
4097
070e6509
AD
40982008-11-15 Akim Demaille <demaille@gostai.com>
4099
4100 Better error message.
4101 * bootstrap (find_tool): Fix the error message.
4102
0078681b
AD
41032008-11-15 Akim Demaille <demaille@gostai.com>
4104
4105 Update variant.yy to newest interface.
4106 * examples/variant.yy: Define lex_symbol.
4107 Adjust.
4108
ff084799
AD
41092008-11-15 Akim Demaille <demaille@gostai.com>
4110
4111 Don't use locations in variant.yy.
4112 * examples/variant.yy: Adjust to not using locations.
4113
b0d79ec6
AD
41142008-11-15 Akim Demaille <demaille@gostai.com>
4115
4116 Comment changes.
4117 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
4118 comments for the license.
4119
d4977ce3
AD
41202008-11-15 Akim Demaille <demaille@gostai.com>
4121
4122 Remove tests/Makefile.am.
4123 * tests/Makefile.am: Rename as...
4124 * tests/local.mk: this.
4125 * Makefile.am, configure.ac: Adjust.
4126 * Makefile.am (DISTCLEANFILES): Define.
4127 (maintainer-check, maintainer-xml-check, maintainer-push-check):
4128 Remove, we no longer need to bounce to the real targets.
4129
87f1149a
AD
41302008-11-15 Akim Demaille <demaille@gostai.com>
4131
4132 Comment changes.
4133
36415906
AD
41342008-11-15 Akim Demaille <demaille@gostai.com>
4135
4136 djgpp/local.mk.
4137 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
4138 * djgpp/local.mk: this new file.
4139
e2c2f696
AD
41402008-11-15 Akim Demaille <demaille@gostai.com>
4141
4142 Remove doc/Makefile.am.
4143 * doc/Makefile.am: Rename as...
4144 * doc/local.mk: this.
4145 Adjust paths
4146 * Makefile.am, configure.ac: Adjust.
4147 * Makefile.am (MOSTLYCLEANFILES): New.
4148 * src/local.mk: Adjust.
4149
2ead32e6
AD
41502008-11-15 Akim Demaille <demaille@gostai.com>
4151
4152 Move sc_tight_scope into maint.mk.
b06df3c2
AD
4153 It does not work, and I don't know how it was supposed to work: it
4154 seems to be looking for sources in the build tree. I just moved
4155 it at a better place, fixing it is still required.
4156
2ead32e6
AD
4157 * src/local.mk (echo): Remove.
4158 (sc_tight_scope): Move to...
4159 * maint.mk: here.
4160
2df9ec37
AD
41612008-11-15 Akim Demaille <demaille@gostai.com>
4162
4163 Regen.
4164 * src/parse-gram.h, src/parse-gram.h: Regen.
4165
0305d25e
AD
41662008-11-15 Akim Demaille <demaille@gostai.com>
4167
4168 Remove src/Makefile.am.
4169 * src/Makefile.am: Rename as...
4170 * src/local.mk: this.
4171 Prefix all the paths with src/.
4172 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
4173 (AM_CPPFLAGS): Find find in builddir/src.
4174 (YACC): Move the flags into...
4175 (AM_YFLAGS): here.
4176 * maint.mk (sc_tight_scope): Disable.
4177 It used to bounce to the version in src/Makefile.am which is now
4178 part of this very Makefile.
4179 * Makefile.am, configure.ac: Adjust.
4180 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
4181 include "..." to find files "here": we are no longer in src/, so
4182 qualify the includes with src/.
4183 * doc/Makefile.am (PREPATH): No longer include the top_builddir
4184 prefix.
4185 (.x.1): Adjust to be able to create src/foo from the top level
4186 Makefile, instead of going bounce to src/Makefile the creation of
4187 foo.
4188
5277c0a3
AD
41892008-11-15 Akim Demaille <demaille@gostai.com>
4190
4191 Remove useless variable.
4192 * doc/Makefile.am (srcsrcdir): Remove.
4193
6a5aa0cd
AD
41942008-11-15 Akim Demaille <demaille@gostai.com>
4195
4196 Remove data/Makefile.am.
4197 * data/Makefile.am: Rename as...
4198 * data/local.mk: this.
4199 Adjust paths.
4200 * Makefile.am, configure.ac: Adjust.
4201
7cb794dc
AD
42022008-11-15 Akim Demaille <demaille@gostai.com>
4203
4204 Remove etc/Makefile.am.
4205 * etc/Makefile.am: Rename as...
4206 * etc/local.mk: this.
4207 Adjust.
4208 * Makefile.am, configure.ac: Adjust.
4209
cd409e3b
AD
42102008-11-15 Akim Demaille <demaille@gostai.com>
4211
4212 Remove examples/local.mk.
4213 examples/calc++/Makefile.am might be interesting to keep as is, since
4214 it is an example in itself.
2df9ec37 4215
cd409e3b
AD
4216 * examples/Makefile.am: Rename as...
4217 * examples/local.mk: this.
4218 Adjust.
4219 * Makefile.am, configure.ac: Adjust.
4220
9a1e4214
AD
42212008-11-15 Akim Demaille <demaille@gostai.com>
4222
4223 Remove build-aux/Makefile.am.
4224 Recursive Makefiles are really way too slow, let's get rid of some of
4225 them.
2df9ec37 4226
9a1e4214
AD
4227 * build-aux/Makefile.am: Rename as...
4228 * build-aux/local.mk: this.
4229 Adjust paths.
4230 * Makefile.am, configure.ac: Adjust.
4231
0634493c
AD
42322008-11-15 Akim Demaille <demaille@gostai.com>
4233
4234 Provide convenience constructors for locations and positions.
4235 * data/location.cc (position::position): Accept file, line and
4236 column as arguments with default values.
4237 Always qualify initial line and column literals as unsigned.
4238 (location::location): Provide convenience constructors.
4239
fe1b448a
AD
42402008-11-15 Akim Demaille <demaille@gostai.com>
4241
b06df3c2
AD
4242 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
4243 token type.
fe1b448a
AD
4244 Using template buys us nothing, and makes it uselessly complex to
4245 construct a symbol. Besides, it could not be generalized to other
4246 languages, while make_FOO would work in C/Java etc.
2df9ec37 4247
fe1b448a
AD
4248 * data/lalr1.cc (b4_symbol_): New.
4249 (b4_symbol): Use it.
4250 (b4_symbol_constructor_declaration_)
4251 (b4_symbol_constructor_definition_): Instead of generating
4252 specializations of an overloaded template function, just generate
4253 several functions whose names are forged from the token names
4254 without the token.prefix.
4255 (b4_symbol_constructor_declarations): Generate them for all the
4256 symbols, not just by class of symbol type, now that instead of
4257 specializing a function template by the token, we generate a
4258 function named after the token.
4259 (b4_symbol_constructor_specialization_)
4260 (b4_symbol_constructor_specializations): Remove.
4261 * etc/bench.pl.in: Adjust to this new API.
4262
5679f311
AD
42632008-11-13 Akim Demaille <demaille@gostai.com>
4264
4265 %define token.prefix.
b06df3c2
AD
4266 Provide a means to add a prefix to the name of the tokens as
4267 output in the generated files. Because of name clashes, it is
4268 good to have such a prefix such as TOK_ that protects from names
4269 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 4270
5679f311
AD
4271 * data/bison.m4 (token.prefix): Empty by default.
4272 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
4273 * data/lalr1.cc (b4_symbol): Ditto.
4274
3204049e
AD
42752008-11-13 Akim Demaille <demaille@gostai.com>
4276
4277 Compute at M4 time some of the subtractions.
90290ce5 4278 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
4279 (b4_rhs_data): Use it.
4280
202598d3
AD
42812008-11-13 Akim Demaille <demaille@gostai.com>
4282
4283 symbol::token.
b06df3c2 4284 This allows the user to get the type of a token returned by yylex.
2df9ec37 4285
202598d3
AD
4286 * data/lalr1.cc (symbol::token): New.
4287 (yytoknum_): Define when %define lex_symbol, independently of
4288 %debug.
4289 (yytoken_number_): Move into...
4290 (symbol::token): here, since that's the only use.
4291 The other one is YYPRINT which was not officially supported
4292 by lalr1.cc, and anyway it did not work since YYPRINT uses this
4293 array under a different name (yytoknum).
4294
fc2476c7
AD
42952008-11-13 Akim Demaille <demaille@gostai.com>
4296
4297 YYERRCODE.
4298 * TODO (YYERRCODE): Mention the case of $undef.
4299
865f1e9f
AD
43002008-11-13 Akim Demaille <demaille@gostai.com>
4301
4302 TODO: YYPRINT.
4303 * TODO (YYPRINT): New.
4304
cb0b136a
AD
43052008-11-13 Akim Demaille <demaille@gostai.com>
4306
4307 Comment changes.
4308 * data/lalr1.cc, data/yacc.c: Fix the description of the
4309 yytranslate and yytoknum tables.
4310
2c086d29
AD
43112008-11-13 Akim Demaille <demaille@gostai.com>
4312
4313 Define make_symbol in the header.
b06df3c2
AD
4314 To reach good performances these functions should be inlined (yet
4315 this is to measure precisely). To this end they must be available
4316 to the caller.
2df9ec37 4317
2c086d29
AD
4318 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
4319 location_type with the class name.
4320 Since will now be output in the header, declare "inline".
4321 No longer use b4_symbol_constructor_specializations, but
4322 b4_symbol_constructor_definitions in the header.
4323 Don't call it in the *.cc file.
4324
1c4af381
AD
43252008-11-13 Akim Demaille <demaille@gostai.com>
4326
4327 Define yytranslate in the header for lex_symbol.
4328 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
4329 into the header file when using %define lex_symbol.
4330 (yytranslate_): Declare inline.
4331
e51b0a82
AD
43322008-11-13 Akim Demaille <demaille@gostai.com>
4333
b06df3c2
AD
4334 Define the constructors of symbol_type in
4335 b4_symbol_constructor_definitions.
e51b0a82 4336 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
4337 forthcoming patch will move elsewhere. Hence the interest of
4338 putting them together.
2df9ec37 4339
b06df3c2
AD
4340 The stack_symbol_type does not need to be moved, it is used only
4341 by the parser.
2df9ec37 4342
e51b0a82
AD
4343 * data/lalr1.cc: Move symbol_type and symbol_base_type
4344 constructors into...
4345 (b4_symbol_constructor_definitions): here.
4346 Adjust.
4347
78835571
AD
43482008-11-13 Akim Demaille <demaille@gostai.com>
4349
4350 Make it easier to move the definition of yytranslate_.
4351 Forthcoming changes will make it possible to use yytranslate_
4352 from outside the parser implementation file.
2df9ec37 4353
78835571
AD
4354 * data/lalr1.cc (b4_yytranslate_definition): New.
4355 Use it.
4356
c1e6c88c
AD
43572008-11-13 Akim Demaille <demaille@gostai.com>
4358
4359 Remove useless class specification.
4360 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
4361 to refer to the class name to use a type defined by the class for
4362 arguments of member functions.
4363
4654b0c0
AD
43642008-11-13 Akim Demaille <demaille@gostai.com>
4365
4366 Finer input type for yytranslate.
4367 This patch is debatable: the tradition expects yylex to return an int
4368 which happens to correspond to token_number (which is an enum). This
4369 allows for instance to return characters (such as '*' etc.). But this
4370 goes against the stronger typing I am trying to have with the new
4371 lex interface which return a symbol_type. So in this case, feed
4372 yytranslate_ with a token_type.
2df9ec37 4373
4654b0c0
AD
4374 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
4375 expect a token_type.
4376
dd735e4e
AD
43772008-11-13 Akim Demaille <demaille@gostai.com>
4378
4379 Honor lex-params in %define lex_symbol mode.
4380 * data/lalr1.cc: Use b4_lex_param.
4381
6659366c
AD
43822008-11-13 Akim Demaille <demaille@gostai.com>
4383
4384 Simplify names.
4385 * src/output.c (symbol_definitions_output): Rename symbol
4386 attributes type_name and has_type_name as type and has_type.
4387 * data/lalr1.cc: Adjust uses.
4388
e9805e57
AD
43892008-11-13 Akim Demaille <demaille@gostai.com>
4390
4391 Use b4_type_names for the union type.
b06df3c2
AD
4392 The union used to compute the size of the variant used to iterate
4393 over the type of all the symbols, with a lot of redundancy. Now
4394 iterate over the lists of symbols having the same type-name.
2df9ec37 4395
e9805e57
AD
4396 * data/lalr1.cc (b4_char_sizeof_): New.
4397 (b4_char_sizeof): Use it.
4398 Adjust to be called with a list of numbers instead of a single
4399 number.
4400 Adjust its caller for new-line issues.
4401
aea10ef4
AD
44022008-11-13 Akim Demaille <demaille@gostai.com>
4403
4404 Define the "identifier" of a symbol.
b06df3c2
AD
4405 Symbols may have several string representations, for instance if
4406 they have an alias. What I call its "id" is a string that can be
4407 used as an identifier. May not exist.
2df9ec37 4408
b06df3c2
AD
4409 Currently the symbols which have the "tag_is_id" flag set are
4410 those that don't have an alias. Look harder for the id.
2df9ec37 4411
aea10ef4
AD
4412 * src/output.c (is_identifier): Move to...
4413 * src/symtab.c (is_identifier): here.
4414 * src/symtab.h, src/symtab.c (symbol_id_get): New.
4415 * src/output.c (symbol_definitions_output): Use it to define "id"
4416 and "has_id".
4417 Remove the definition of "tag_is_id".
4418 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4419 "tag_is_id" were used to produce code.
4420 We still use "tag" for documentation.
4421
2ea7730c
AD
44222008-11-11 Akim Demaille <demaille@gostai.com>
4423
4424 Locations are no longer required by lalr1.cc.
4425 * data/lalr1.cc (_b4_args, b4_args): New.
4426 Adjust all uses of locations to make them optional.
4427 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4428 (AT_CHECK_NAMESPACE): Check the use of locations.
4429 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4430 without locations with lalr1.cc.
4431 Test these cases.
4432 * tests/output.at: Check lalr1.cc with and without location
4433 support.
4434 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4435 Don't use locations.
4436
7ca2266a
AD
44372008-11-11 Akim Demaille <demaille@gostai.com>
4438
4439 AT_FULL_COMPILE.
4440 * tests/local.at (AT_FULL_COMPILE): New.
4441 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4442
1a7a65f9
AD
44432008-11-11 Akim Demaille <demaille@gostai.com>
4444
4445 Support parens in calc++.
4446 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4447 * examples/calc++/test (run): Check the expected output.
4448 Adjust callers.
4449 Check parens too.
4450
c944f7f2
AD
44512008-11-11 Akim Demaille <demaille@gostai.com>
4452
4453 Simplify lalr1.cc since %defines is mandatory.
4454 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4455
dada3cd1
AD
44562008-11-11 Akim Demaille <demaille@gostai.com>
4457
4458 TODO: yyfmt.
4459 * TODO (yysyntax_error): New item.
4460
422c18f4
AD
44612008-11-11 Akim Demaille <demaille@gostai.com>
4462
4463 Prefer M4 to CPP.
4464 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4465 YYERROR_VERBOSE.
4466
a0ffc175
AD
44672008-11-11 Akim Demaille <demaille@gostai.com>
4468
4469 Support i18n of the parse error messages.
4470 * TODO (lalr1.cc/I18n): Remove.
4471 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4472 error messages, as done in yacc.c.
4473 Stay within the yy* pseudo namespace.
4474
00a8a083
AD
44752008-11-11 Akim Demaille <demaille@gostai.com>
4476
4477 More TODO.
4478 * TODO (single stack, yysyntax_error): New.
4479
09277875
AD
44802008-11-11 Akim Demaille <demaille@gostai.com>
4481
4482 Make it possible to return a symbol_type from yylex.
4483 * data/lalr1.cc (b4_lex_symbol_if): New.
4484 (parse): When lex_symbol is defined, expected yylex to return the
4485 complete lookahead.
4486 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4487 yylex interface.
4488 (bench_variant_parser): Exercise it.
4489
64c1b92a
AD
44902008-11-11 Akim Demaille <demaille@gostai.com>
4491
4492 Remove useless bench case.
4493 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4494 no longer used.
4495
2722aa42
AD
44962008-11-11 Akim Demaille <demaille@gostai.com>
4497
4498 Improve display of directives.
4499 * etc/bench.pl.in (parse_term): Don't add useless eol.
4500
918eb7c5
AD
45012008-11-11 Akim Demaille <demaille@gostai.com>
4502
4503 Use string_cast in the bench.
4504 * etc/bench.pl.in (generate_grammar_list): Define and use
4505 string_cast.
4506
39be9022
AD
45072008-11-11 Akim Demaille <demaille@gostai.com>
4508
4509 Replace yychar with a Boolean.
4510 * data/lalr1.cc (parse::yychar): Replace by...
4511 (parse::yyempty): this.
4512
a2e3fa77
AD
45132008-11-11 Akim Demaille <demaille@gostai.com>
4514
4515 Factor the tables.
4516 * TODO: New item.
4517
aba12ad1
AD
45182008-11-11 Akim Demaille <demaille@gostai.com>
4519
4520 Let yytranslate handle the eof case.
4521 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4522 Adjust callers.
4523 No longer expect yychar to be equal to yyeof_, rather, test the
4524 lookahead's (translated) kind.
4525
27cb5b59
AD
45262008-11-11 Akim Demaille <demaille@gostai.com>
4527
4528 yychar cannot be empty in yyerrlab.
4529 * TODO (yychar == yyempty_): New.
4530 * data/lalr1.cc: Remove the handling of this case.
4531 This eases forthcoming changes related to yychar and yytranslate.
4532
fce629c0
AD
45332008-11-11 Akim Demaille <demaille@gostai.com>
4534
4535 Bench: syntactic sugar for %define/#define.
4536 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4537 (&bench_push_parser, bench_variant_parser): Use this feature.
4538 (&eat): New.
4539 Use it.
4540
ce671960
AD
45412008-11-11 Akim Demaille <demaille@gostai.com>
4542
4543 Less memory pressure on the "list" bench.
4544 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4545 the values, to limit memory pressure.
4546
2873fdf8
AD
45472008-11-11 Akim Demaille <demaille@gostai.com>
4548
4549 Introduce make_symbol.
b06df3c2
AD
4550 make_symbol provides a means to construct a full symbol (kind,
4551 value, location) in a single shot. It is meant to be a Symbol
4552 constructor, parameterized by the symbol kind so that overloading
4553 would prevent incorrect kind/value pairs. Unfortunately
4554 parameterized constructors do not work well in C++ (unless the
4555 parameter also appears as an argument, which is not acceptable),
4556 hence the use of a function instead of a constructor.
2df9ec37 4557
2873fdf8
AD
4558 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4559 (b4_symbol_constructor_declarations)
4560 (b4_symbol_constructor_specialization_)
4561 (b4_symbol_constructor_specializations)
4562 (b4_symbol_constructor_definition_)
4563 (b4_symbol_constructor_definitions): New.
4564 Use them where appropriate to generate declaration, declaration of
4565 the specializations, and implementations of the templated
4566 overloaded function "make_symbol".
4567 (variant::variant): Always define a default ctor.
4568 Also provide a copy ctor.
4569 (symbol_base_type, symbol_type): New ctor overloads for value-less
4570 symbols.
4571 (symbol_type): Now public, so that functions such as yylex can use
4572 it.
4573
8be046d7
AD
45742008-11-11 Akim Demaille <demaille@gostai.com>
4575
4576 Inform m4 whether a tag is a valid id.
4577 * src/output.c (is_identifier): New.
4578 (symbol_definitions_output): Use it to define tag_is_id.
4579 But maybe this should be done at m4 level?
4580
de62edee
AD
45812008-11-11 Akim Demaille <demaille@gostai.com>
4582
4583 Test 214 was failing: it greps with a pattern containing [ ]*
4584 which obviously meant to catch spaces and tabs, but contained only
4585 spaces. Tabulations in sources are a nuisance, so to simplify the
4586 matter, get rid of all the tabulations in the Java sources. The
4587 other skeletons will be treated equally later.
4588
4589 * data/java.m4, data/lalr1.java: Untabify.
4590 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4591 tabulations are no longer generated.
4592
905f0697
PB
45932008-11-11 Paolo Bonzini <bonzini@gnu.org>
4594
4595 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4596 * configure.ac: Adjust usage.
4597 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4598 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4599 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4600
09ccae9b
DJ
46012008-11-10 Di-an Jan <dianj@freeshell.org>
4602
4603 Workaround Java's ``code too large'' problem for parser tables
4604 in most cases, by using one function per initialization.
4605 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4606 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4607 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4608 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4609 (yytname_): Use b4_typed_parser_table.
4610 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4611 ``code too large'' error.
4612
1979121c
DJ
46132008-11-10 Di-an Jan <dianj@freeshell.org>
4614
4615 * NEWS: Document them.
de62edee 4616
1979121c
DJ
4617 General Java skeleton improvements.
4618 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4619 using gcj < 4.3 in the testsuite, according to comments in
4620 gnulib/m4/javacomp.m4.
4621 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4622 location_type, position_type): Remove extraneous brackets from
4623 b4_percent_define_default.
4624 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4625 m4_define and m4_define_default.
4626 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4627 which marks the end of user code with appropriate syncline, like all
4628 the other skeletons.
4629 (b4_user_post_prologue): Add. Don't silently drop.
4630 (yylex): Remove.
4631 (parse): Inline yylex.
4632 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4633 (%{...%}): Fix typo of %code imports.
4634 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4635
4636 Support annotations on parser class with %define annotations.
4637 * data/lalr1.java (annotations): Add to parser class modifier.
4638 * doc/bison.texinfo (Java Parser Interface): Document
4639 %define annotations.
4640 (Java Declarations Summary): Document %define annotations.
4641 * tests/java.at (Java parser class modifiers): Test annotations.
4642
4643 Do not generate code for %error-verbose unless requested.
4644 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4645 Make private. Make conditional on %error-verbose.
4646 (getErrorVerbose, setErrorVerbose): New.
4647 (yytnamerr_): Make conditional on %error-verbose.
4648 (yysyntax_error): Make some code conditional on %error-verbose.
4649 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4650 about %error-verbose having no effect.
4651 (getErrorVerbose, setErrorVerbose): Document.
4652
4653 Move constants for token names to Lexer interface.
4654 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4655 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4656 (parse): Qualify EOF to Lexer.EOF.
4657 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4658 EOF and token names to Java Lexer Interface.
4659 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4660
4661 Make yyerror public.
4662 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4663 (yyerror): Change to public. Add Javadoc comments. Use longer
4664 parameter names. Make the body rather than the declarator
4665 conditional on %locations.
4666 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4667
4668 Allow user to add code to the constructor with %code init.
4669 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4670 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4671 Add %code init to the front of the constructor body.
4672 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4673 and %define init_throws.
4674 (Java Declarations Summary): Document %code init and
4675 %define init_throws.
4676 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4677 (Java constructor init and init_throws): Add tests.
de62edee 4678
42f832d6
AD
46792008-11-10 Akim Demaille <demaille@gostai.com>
4680
4681 Update TODO.
4682 * TODO (-D): is implemented.
4683 (associativity): Same precedence must have the same associativity.
4684 For instance, how can a * b / c be parsed if * is %left and / is
4685 %right?
4686 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4687
247efe34
AD
46882008-11-10 Akim Demaille <demaille@gostai.com>
4689
4690 Formatting changes.
4691
5d731440
AD
46922008-11-10 Akim Demaille <demaille@gostai.com>
4693
4694 More information about the symbols.
4695 * src/output.c (type_names_output): Document all the symbols,
4696 including those that don't have a type-name.
4697 (symbol_definitions_output): Define "is_token" and
4698 "has_type_name".
4699 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4700 type-name, now that they are defined too in b4_type_names.
4701
21db118b
AD
47022008-11-10 Akim Demaille <demaille@gostai.com>
4703
4704 Regen.
4705
6ed15cde
AD
47062008-11-10 Akim Demaille <demaille@gostai.com>
4707
4708 Make parser::yytranslate static.
b06df3c2
AD
4709 Small speedup (1%) on the list grammar. And makes yytranslate_
4710 available in non member functions.
de62edee 4711
6ed15cde
AD
4712 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4713 function.
4714
30bb2edc
AD
47152008-11-10 Akim Demaille <demaille@gostai.com>
4716
4717 Avoid trailing spaces.
4718 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4719 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4720 they can be empty, and anyway this incorrectly indents the first
4721 action.
4722
b3a28fd4
AD
47232008-11-10 Akim Demaille <demaille@gostai.com>
4724
4725 Comment changes.
4726
914202bd
AD
47272008-11-10 Akim Demaille <demaille@gostai.com>
4728
4729 Use "enum" for integral constants.
4730 This is just nicer to read, I observed no speedup.
de62edee 4731
914202bd
AD
4732 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4733 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4734 (yyuser_token_number_max_, yyundef_token_): Move into...
4735 (yytranslate_): here.
4736
c17f9a4a
AD
47372008-11-10 Akim Demaille <demaille@gostai.com>
4738
4739 Shortcuts in bench directives.
4740 * etc/bench.pl.in (parse_dirs): New.
4741 Use it.
4742 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4743 Create the benches in "benches/".
4744
b9855ea5
AD
47452008-11-10 Akim Demaille <demaille@gostai.com>
4746
4747 Formatting changes.
4748 * data/lalr1.cc: here.
4749
6e097787
AD
47502008-11-10 Akim Demaille <demaille@gostai.com>
4751
4752 Adjust verbose message to using emacs.
4753 * etc/bench.pl.in: Inform compilation-mode when we change the
4754 directory.
4755 (generate_grammar_list): Recognize %define "variant" in addition
4756 to %define variant.
4757
4c3cc7da
AD
47582008-11-10 Akim Demaille <demaille@gostai.com>
4759
4760 Classify symbols by type-name.
4761 * src/uniqstr.h (UNIQSTR_CMP): New.
4762 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4763 (type_names_output): New.
4764 (muscles_output): Use it.
4765 * data/lalr1.cc (b4_symbol_action_): Remove.
4766 (b4_symbol_case_, b4_type_action_): New.
4767 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4768
d69c9694
AD
47692008-11-10 Akim Demaille <demaille@gostai.com>
4770
4771 Change the handling of the symbols in the skeletons.
4772 Before we were using tables which lines were the symbols and which
4773 columns were things like number, tag, type-name etc. It is was
4774 difficult to extend: each time a column was added, all the numbers had
4775 to be updated (you asked for colon $2, not for "tag"). Also, it was
4776 hard to filter these tables when only a subset of the symbols (say the
4777 tokens, or the nterms, or the tokens that have and external number
4778 *and* a type-name) was of interest.
de62edee 4779
d69c9694
AD
4780 Now instead of monolithic tables, we define one macro per cell. For
4781 instance "b4_symbol(0, tag)" is a macro name which contents is
4782 self-decriptive. The macro "b4_symbol" provides easier access to
4783 these cells.
de62edee 4784
d69c9694
AD
4785 * src/output.c (type_names_output): Remove.
4786 (symbol_numbers_output, symbol_definitions_output): New.
4787 (muscles_output): Call them.
4788 (prepare_symbols): Define b4_symbols_number.
4789
5263bea9
AD
47902008-11-10 Akim Demaille <demaille@gostai.com>
4791
4792 --trace=muscles
4793 * src/getargs.h, src/getargs.c (trace_muscle): New.
4794 (trace_types, trace_args): Support it.
4795 * src/output.c (output_skeleton): Use it.
4796
4175f6bb
AD
47972008-11-10 Akim Demaille <demaille@gostai.com>
4798
4799 muscles_output.
4800 * src/output.c (muscles_output): New, extracted from...
4801 (output_skeleton): here.
4802 Adjust.
4803
1de69d6a
AD
48042008-11-10 Akim Demaille <demaille@gostai.com>
4805
4806 Formatting changes.
4807
36db78a7
AD
48082008-11-10 Akim Demaille <demaille@gostai.com>
4809
4810 Update the variant example.
4811 * examples/variant.yy: Formatting changes.
4812 One stage build.
4813
e5eb92e7
AD
48142008-11-10 Akim Demaille <demaille@gostai.com>
4815
4816 Support constructor with an argument.
4817 This improves the "list" bench by 2%.
de62edee 4818
e5eb92e7
AD
4819 * data/lalr1.cc (variant::build): Add an overloaded version with
4820 an argument.
4821 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4822
76307410
AD
48232008-11-10 Akim Demaille <demaille@gostai.com>
4824
4825 Test variants.
4826 * tests/c++.at (AT_CHECK_VARIANTS): New.
4827 Use it with and without %define assert.
4828
d78f0ac9
AD
48292008-11-10 Akim Demaille <demaille@gostai.com>
4830
4831 Add %precedence support.
4832 Unfortunately it is not possible to reuse the %prec directive. This
4833 is because to please POSIX, we do not require to end the rules with a
4834 semicolon. As a result,
de62edee 4835
d78f0ac9 4836 foo: bar %prec baz
de62edee 4837
d78f0ac9
AD
4838 is ambiguous: either a rule which precedence is that of baz, or a rule,
4839 and then a declaration of the precedence of the token baz.
de62edee 4840
d78f0ac9
AD
4841 * doc/bison.texinfo: Document %precedence.
4842 (Precedence Only): New.
4843 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4844 * src/conflicts.c (resolve_sr_conflict): Support it.
4845 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4846 Parse it.
4847 * tests/calc.at: Use %precedence for NEG.
4848 * tests/conflicts.at (%precedence does not suffice)
4849 (%precedence suffices): New tests.
4850
c85be41a
AD
48512008-11-09 Akim Demaille <demaille@gostai.com>
4852
4853 Make benches in a sub dirs.
4854 * etc/bench.pl.in ($dir): New.
4855 Use it.
4856 Check the use of constructors with an argument.
4857 (bench_variant_parser): Fix.
4858
db65ca1f
AD
48592008-11-09 Akim Demaille <demaille@gostai.com>
4860
4861 fix eof condition
4862
9b0efa5b
AD
48632008-11-09 Akim Demaille <demaille@gostai.com>
4864
4865 Fix --help.
4866
432ac57a
AD
48672008-11-09 Akim Demaille <demaille@gostai.com>
4868
4869 Require the generation of parse-gram.output.
4870 * src/Makefile.am (YACC): Pass --report=all.
4871
deef2a0a
AD
48722008-11-09 Akim Demaille <demaille@gostai.com>
4873
4874 Formatting changes.
4875
df72984a
AD
48762008-11-09 Akim Demaille <demaille@gostai.com>
4877
4878 Update TODO.
4879 * TODO: Remove obsolete items.
4880 Update others.
4881
f10e19fd
AD
48822008-11-09 Akim Demaille <demaille@gostai.com>
4883
4884 Enhance bench.pl.
4885 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4886 (@token, $grammar, $bench): New.
4887 (generate_grammar_variant): Rename as...
4888 (generate_grammar_list): this.
4889 (generate_grammar): Adjust.
4890 (bench_grammar): Rename as...
4891 (bench): this.
4892 Use it in the various bench-marking routines.
4893 (-b, -g): New options.
4894
5de9c593
AD
48952008-11-09 Akim Demaille <demaille@gostai.com>
4896
4897 Use a static hierarchy for symbols in the C++ parser.
4898 * data/lalr1.cc (symbol_base_type, symbol_type)
4899 (stack_symbol_type): Make it a static hierarchy.
4900 Adjust dependencies.
4901
757f8f98
AD
49022008-11-09 Akim Demaille <demaille@gostai.com>
4903
4904 bench.pl -d, --directive.
4905 * etc/bench.pl.in (@directive): New.
4906 (&bench_grammar): Use it.
4907 (&bench_list_grammar): New, to provide access to the "variant"
4908 grammar.
4909 Use it.
4910 (getopts): Support -d, --directive.
4911
d3be4f6d
AD
49122008-11-09 Akim Demaille <demaille@gostai.com>
4913
4914 Use inline for small operations.
4915 * data/lalr1.cc (symbol_base_type, symbol_type)
4916 (stack_symbol_type): Declare constructor and other operations as
4917 inline.
4918 (yy_destroy_): Inline.
4919
1f7d007b
AD
49202008-11-09 Akim Demaille <demaille@gostai.com>
4921
4922 Introduce a hierarchy for symbols.
4923 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4924 (data_type): Rename as...
4925 (stack_symbol_type): this.
4926 Derive from symbol_base_type.
4927 (yy_symbol_value_print_): Merge into...
4928 (yy_symbol_print_): this.
4929 Rename as...
4930 (yy_print_): this.
4931 (yydestruct_): Rename as...
4932 (yy_destroy_): this.
4933 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4934 (parser::parse): yyla is now of symbol_type.
4935 Use its type member instead of yytoken.
4936
bc0b0477
AD
49372008-11-09 Akim Demaille <demaille@gostai.com>
4938
4939 Rename data_type and stack_symbol_type.
4940 * data/lalr1.cc (data_type): Rename as...
4941 (stack_symbol_type): this.
4942
57295d14
AD
49432008-11-09 Akim Demaille <demaille@gostai.com>
4944
4945 Handle semantic value and location together.
4946 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4947 yydata.value and yydata.location.
4948 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4949 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4950 single arg.
4951 Adjust all callers.
4952 (yydestruct_): New overload for a stack symbol.
4953
e9b0834e
AD
49542008-11-09 Akim Demaille <demaille@gostai.com>
4955
4956 Push a complete symbol, not connected parts.
4957 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4958 state, value and location.
4959 Adjust callers.
4960
6082531a
AD
49612008-11-09 Akim Demaille <demaille@gostai.com>
4962
4963 Agregate yylval and yylloc.
4964 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4965 (parser::yyla): this.
4966
33c195cc
AD
49672008-11-09 Akim Demaille <demaille@gostai.com>
4968
4969 Rely on the state stack to display reduction traces.
b06df3c2
AD
4970 To display rhs symbols before a reduction, we used information
4971 about the rule reduced, which required the tables yyrhs and
4972 yyprhs. Now use rely only on the state stack to get the same
4973 information.
de62edee 4974
33c195cc
AD
4975 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
4976 Use them.
4977 (parser::yyrhs_, parser::yyprhs_): Remove.
4978 (parser::yy_reduce_print_): Use the state stack.
4979
e1f93869
AD
49802008-11-09 Akim Demaille <demaille@gostai.com>
4981
4982 Fuse yyval and yyloc into yylhs.
4983 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
4984 yylhs.
4985 (parse): Replace yyval and yyloc with yylhs.value and
4986 yylhs.location.
4987 After a user action, compute yylhs.state earlier.
4988 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
4989 fresh error_token.
4990
2935744b
DJ
49912008-11-09 Di-an Jan <dianj@freeshell.org>
4992
4993 Remove unused variable.
4994 * src/output.c (type_names_output): Remove unused variable sep.
4995
bbf9ca37
PB
49962008-11-09 Paolo Bonzini <bonzini@gnu.org>
4997
4998 Change tests/output.at quoting.
4999 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
5000 expanding arguments.
5001
d9a9b96b
JD
50022008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
5003
5004 Don't add a semicolon to actions for %skeleton or %language.
5005 It breaks Java test cases as reported by Akim Demaille.
5006 * src/scan-code.l: Implement.
5007
51365192
JD
50082008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
5009
5010 Clean up %skeleton and %language priority implementation.
5011 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
5012 remove static qualifier because others will soon need to see it.
5013 (language_prio): Likewise.
5014 (getargs): Use command_line_prio rather than 0.
5015 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
5016 enum fields.
5017 (skeleton_prio): Extern it.
5018 (language_prio): Extern it.
5019 * src/parse-gram.y: Use grammar_prio rather than 1.
5020
9380cfd0
AD
50212008-11-07 Akim Demaille <demaille@gostai.com>
5022
5023 Moving push traces into yypush_.
5024 * data/lalr1.cc (yypush_): Now takes a optional trace message.
5025 Adjust all uses.
5026
8901f32e
AD
50272008-11-07 Akim Demaille <demaille@gostai.com>
5028
5029 The single-stack C++ parser is now the standard one.
5030 * data/lalr1.cc: Rename as...
5031 * data/lalr1-split.cc: this.
5032 * data/lalr1-fusion.cc: Rename as...
5033 * data/lalr1.cc: this.
5034 * etc/bench.pl.in: Adjust.
5035
8cdabf02
AD
50362008-11-07 Akim Demaille <demaille@gostai.com>
5037
5038 Avoid empty-if warnings.
5039 Reported by Quentin Hocquet.
de62edee 5040
8cdabf02
AD
5041 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
5042 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
5043
5a893c2b
AD
50442008-11-07 Akim Demaille <demaille@gostai.com>
5045
5046 Pass command line location to skeleton_arg and language_argmatch.
5047 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
5048 The location argument is now mandatory.
5049 Adjust all dependencies.
5050 (getargs): Use command_line_location.
5051
58697c6d
AD
50522008-11-07 Akim Demaille <demaille@gostai.com>
5053
5054 -D, --define.
5055 * src/getargs.c (usage): Document -D.
5056 Fix help string for --locations.
5057 (command_line_location): New.
5058 (short_options, long_options, getargs): Support -D, --define.
5059 (getargs): Move -d support at the right place.
5060 * doc/bison.texinfo (Bison Options): Update.
5061 * tests/input.at (%define, --define): New.
5062
9fe5a457
AD
50632008-11-07 Akim Demaille <demaille@gostai.com>
5064
5065 Initialize the muscle table before parsing the command line.
5066 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
5067 (getargs): Define file_name.
5068 * src/main.c (main): Initialize muscle_tab before calling
5069 getargs.
5070 * src/muscle_tab.c (muscle_init): No longer define file_name, as
5071 its value is not available yet.
5072
56c5eca9
AD
50732008-11-07 Akim Demaille <demaille@gostai.com>
5074
5075 Locations without columns for command line arguments.
5076 * src/location.c (location_print): Don't display negative columns.
5077 * src/location.h: Document this.
5078
9b9e0a7d
AD
50792008-11-07 Akim Demaille <demaille@gostai.com>
5080
5081 Fix --help.
5082 * src/getargs.c (usage): Fix help string for -W.
5083
74eae918
AD
50842008-11-07 Akim Demaille <demaille@gostai.com>
5085
5086 Handle more general types of option arguments.
5087 * build-aux/cross-options.pl: The argument ends at the first
5088 space, not the first non-symbol character.
5089 Use @var for each word appearing the argument description.
5090
a3d4c6fb
AD
50912008-11-07 Akim Demaille <demaille@gostai.com>
5092
5093 Destroy the variants that remain on the stack in case of error.
5094 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
5095 destructor.
5096 Display the value only if yymsg is nonnull.
5097 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
5098
2d32fc9f
AD
50992008-11-07 Akim Demaille <demaille@gostai.com>
5100
5101 Add "%define assert" to variants.
5102 This is used to help the user catch cases where some value gets
5103 ovewritten by a new one. This should not happen, as this will
5104 probably leak.
de62edee 5105
2d32fc9f
AD
5106 Unfortunately this uncovered a bug in the C++ parser itself: the
5107 lookahead value was not destroyed between two calls to yylex. For
5108 instance if the previous lookahead was a std::string, and then an int,
5109 then the value of the std::string was correctly taken (i.e., the
5110 lookahead was now an empty string), but std::string structure itself
5111 was not reclaimed.
de62edee 5112
2d32fc9f
AD
5113 This is now done in variant::build(other&) (which is used to take the
5114 value of the lookahead): other is not only stolen from its value, it
5115 is also destroyed. This incurs a new performance penalty of a few
5116 percent, and union becomes faster again.
de62edee 5117
2d32fc9f
AD
5118 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
5119 (b4_variant_if): New.
5120 (variant::built): New.
5121 Use it whereever the status of the variant changes.
5122 * etc/bench.pl.in: Check the penalty of %define assert.
5123
f6038cb8
AD
51242008-11-07 Akim Demaille <demaille@gostai.com>
5125
5126 Use "%define variant" in bench.pl.
5127 * etc/bench.pl.in: No longer use the pseudo directive %variants,
5128 just use %define variants.
5129
ccde1f98
AD
51302008-11-07 Akim Demaille <demaille@gostai.com>
5131
5132 Regen.
5133 * src/parse-gram.h, src/parse-gram.c: Regen.
5134
58bd33b7
JD
51352008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
5136
5137 Fix user actions without a trailing semicolon.
5138 Reported by Sergei Steshenko at
5139 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
5140 * THANKS (Sergei Steshenko): Add.
5141 * src/scan-code.l (SC_RULE_ACTION): Fix it.
5142 * tests/regression.at (Fix user actions without a trailing semicolon):
5143 New test case.
5144
639867b5
AD
51452008-11-04 Akim Demaille <demaille@gostai.com>
5146
5147 Use b4_copyright_years.
5148 * data/yacc.c (b4_copyright_years): New.
5149 Fix its value according to the comments in the file.
5150 Use it and undefine it.
5151
3c262606
AD
51522008-11-04 Akim Demaille <demaille@gostai.com>
5153
5154 Formatting changes.
5155 * data/lalr1-fusion.cc, src/parse-gram.y: here.
5156
a2b93d52
AD
51572008-11-04 Akim Demaille <demaille@gostai.com>
5158
5159 Formatting changes.
5160 * data/lalr1-fusion.cc: here.
5161
3a2803df
AD
51622008-11-04 Akim Demaille <demaille@gostai.com>
5163
5164 Use strict on bench.pl.
5165 * etc/bench.pl.in (&run, &generate_grammar): New.
5166 Rename the grammar generating functions for consistency.
5167 Change the interface so that the list of benches to run is passed
5168 as (optionless) arguments.
5169 (&compile): Use &run.
5170
a0d4650a
AD
51712008-11-04 Akim Demaille <demaille@gostai.com>
5172
5173 Remove spurious initial empty lines.
5174 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
5175 * data/yacc.c: End the @output lines with an @.
5176
cac9e09b
AD
51772008-11-04 Akim Demaille <demaille@gostai.com>
5178
5179 Improve the display of sizes.
5180 * etc/bench.p.in: Higher precision.
5181 Sort by decreasing size.
5182
4af4348a
AD
51832008-11-04 Akim Demaille <demaille@gostai.com>
5184
5185 Don't memcpy C++ structures.
5186 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
5187 arguments.
5188 (variant::build): New overload for
5189 copy-construction-that-destroys.
5190 (variant::swap): New.
5191 (parser::yypush_): Use it in variant mode.
5192
ef05c4d6
AD
51932008-11-04 Akim Demaille <demaille@gostai.com>
5194
5195 Better defaults for bench.pl.
5196 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
5197 default values.
5198 Adjust &verbose uses.
5199 (-q, --quiet): New.
5200
9718cfa9
AD
52012008-11-04 Akim Demaille <demaille@gostai.com>
5202
5203 Make variant.yy more complex.
5204 std::list cannot be copied via memcpy, they are more demanding than
5205 std::string. Use one std::list to strengthen the test.
de62edee 5206
9718cfa9
AD
5207 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
5208 Adjust.
5209 Create a list of strings, instead of a single large string.
5210
a6df593d
AD
52112008-11-04 Akim Demaille <demaille@gostai.com>
5212
5213 bench.pl --bench.
5214 * etc/bench.pl.in (--bench, $bench): New.
5215
006a0303
AD
52162008-11-04 Akim Demaille <demaille@gostai.com>
5217
5218 Sort methods.
5219 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
5220 Define it after as().
5221
faef3466
AD
52222008-11-04 Akim Demaille <demaille@gostai.com>
5223
5224 Useless parens.
5225 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
5226
2141aded
AD
52272008-11-04 Akim Demaille <demaille@gostai.com>
5228
5229 Issue missing synclines after user actions.
5230 * data/c.m4 (b4_case): Issue synclines on the output file.
5231
e426d17b
AD
52322008-11-04 Akim Demaille <demaille@gostai.com>
5233
5234 Remove trailing empty line.
5235 * data/lalr1-fusion.cc: Don't add an empty line after the user's
5236 epilogue.
5237
a9ce3f54
AD
52382008-11-04 Akim Demaille <demaille@gostai.com>
5239
5240 Fix output of copyright years.
5241 * data/bison.m4 (b4_copyright): Fix the indentation of the
5242 copyright year paragraph.
5243 Use b4_copyright_years when no years are given.
5244 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
5245 (b4_copyright_years): New.
5246 Use it.
5247
59c544c2
AD
52482008-11-04 Akim Demaille <demaille@gostai.com>
5249
5250 Avoid the spurious initial empty line.
5251 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
5252 the end of @output request to suppress the empty line that
5253 results.
5254
96b15448
AD
52552008-11-04 Akim Demaille <demaille@gostai.com>
5256
5257 Remove parser::rhs_number_type.
5258 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
5259 (yyrhs_): Use b4_table_define.
5260
f0633174
AD
52612008-11-04 Akim Demaille <demaille@gostai.com>
5262
5263 Fix iteration type.
5264 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
5265
417b8004
AD
52662008-11-04 Akim Demaille <demaille@gostai.com>
5267
5268 Factor the declaration of the integer tables.
5269 * data/lalr1-fusion.cc (b4_table_define): New.
5270 Use it.
5271
1a5246c6
AD
52722008-11-03 Akim Demaille <demaille@gostai.com>
5273
5274 Fix indentation of tables in lalr1.cc
5275 * data/lalr1-fusion.cc: Fix the indentation.
5276
f8a95c9c
AD
52772008-11-03 Akim Demaille <demaille@gostai.com>
5278
5279 Destroy the lhs symbols after reduction.
5280 * data/lalr1-fusion.cc (parse): After the user action, when in
5281 variant mode, destroy the lhs symbols.
5282
d7f4d823
AD
52832008-11-03 Akim Demaille <demaille@gostai.com>
5284
5285 Simplify yysyntax_error_ use.
5286 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
5287 type, but make it unnamed in the declaration when it is not used.
5288
8b9c89fb
AD
52892008-11-03 Akim Demaille <demaille@gostai.com>
5290
5291 Let yy::variant::build return an lvalue.
5292 * data/lalr1-fusion.cc (variant::build): Return a reference to the
5293 object.
5294
83243c24
AD
52952008-11-03 Akim Demaille <demaille@gostai.com>
5296
5297 Define yy::variant only when needed.
5298 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
5299 used.
5300
429b4848
AD
53012008-11-03 Akim Demaille <demaille@gostai.com>
5302
5303 Bench the three-stack lalr1.cc.
5304 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
5305 one-stack one.
5306
414c76a4
AD
53072008-11-03 Akim Demaille <demaille@gostai.com>
5308
5309 Fail on parse error in calc++.
5310 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
5311 status.
5312 * examples/calc++/test ($me, $number, $exit, run): New.
5313 Use them to propagate errors to the exit status.
5314
8a5783fd
AD
53152008-11-03 Akim Demaille <demaille@gostai.com>
5316
5317 Don't specify the skeleton twice in the example.
5318 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
5319 file does what is needed.
5320
0cc5bead
AD
53212008-11-03 Akim Demaille <demaille@gostai.com>
5322
5323 bench: Improve output.
5324 * etc/bench.pl.in (bench_grammar): Tune the printf format.
5325
5b421a4e
AD
53262008-11-03 Akim Demaille <demaille@gostai.com>
5327
5328 bench: check impact of %debug on variants.
5329 * etc/bench.pl.in (variant_grammar): Fix the computation of
5330 $variant.
5331 Generate a grammar file that can work with or without %debug.
5332 Do use the @directive.
5333 (bench_variant_parser): Check impact of %debug.
5334 (@directives): Rename all the occurrences to...
5335 (@directive): this, for consistency.
5336
d11ee647
AD
53372008-11-03 Akim Demaille <demaille@gostai.com>
5338
5339 bench: report the size too.
5340 * etc/bench.pl.in ($iterations): Defaults to -3.
5341 (&bench_grammar): Require hireswallclock.
5342 Compute and display the size of the result.
5343 More comments.
5344
e1b74b92
AD
53452008-11-03 Akim Demaille <demaille@gostai.com>
5346
5347 bench: More use of the verbosity level.
5348 * etc/bench.pl.in ($verbose, &verbose): New.
5349 Use them.
5350 More POD documentation.
5351
7e5f9c54
AD
53522008-11-03 Akim Demaille <demaille@gostai.com>
5353
5354 bench.pl: a command line interface
5355 * etc/bench.pl.in: More doc.
5356 Some fixes in the documentation.
5357 ($cflags, $iterations, &help, &getopt): New.
5358 Use them.
5359 (&variant_grammar): Let the number of stages be 10 times what is
5360 specified.
5361
7109a18d
AD
53622008-11-03 Akim Demaille <demaille@gostai.com>
5363
5364 Bench the use of Boost.Variants.
5365 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
5366 New.
5367 (&compile): Be ready to compile C++ parsers.
5368 (&bench_push_parser): Move debug information to the outermost
5369 level.
5370 * THANKS: Add Michiel De Wilde.
5371
922730fe
AD
53722008-11-03 Akim Demaille <demaille@gostai.com>
5373
5374 bench.pl: Pass directives as a list instead of as a string.
5375 * etc/bench.pl.in (&directives): New.
5376 (&triangular_grammar, &calc_grammar): Use it to format the Bison
5377 directives.
5378 (&triangular_grammar): Do use the directives (were ignored).
5379 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
5380 directives.
5381
7484f1d4
AD
53822008-11-03 Akim Demaille <demaille@gostai.com>
5383
5384 Improve genericity of bench.pl.
5385 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
5386 argument.
5387 (&bench_push_parser): New.
5388 Call it.
5389
15129f25
AD
53902008-11-03 Akim Demaille <demaille@gostai.com>
5391
5392 Add documentation to bench.pl.
5393 * etc/bench.pl.in: Comment changes.
5394
0e0ed236
AD
53952008-11-03 Akim Demaille <demaille@gostai.com>
5396
5397 Fuse the three stacks into a single one.
de62edee 5398
b06df3c2
AD
5399 In order to make it easy to perform benchmarks to ensure that
5400 there are no performance loss, lalr1.cc is forked into
5401 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
5402 lalr1.cc.
5403
5404 Meanwhile, to make sure that lalr1-fusion.cc is correctly
5405 exercized by the test suite, the user must install a symbolic link
5406 from lalr1.cc to it.
de62edee 5407
b06df3c2
AD
5408 Instead of having three stacks (state, value, location), use a
5409 stack of triples. This considerably simplifies the code (and it
5410 will be easier not to require locations as currently does the C++
5411 parser), and also gives a 10% speedup according to
5412 etc/bench (probably mainly since memory allocation is done once
5413 instead of three times).
de62edee 5414
0e0ed236
AD
5415 Another motivation is to make it easier to destruct properly
5416 semantic values: now that they are bound to their state (hence
5417 symbol type) it will be easier to call the appropriate destructor.
de62edee 5418
0e0ed236 5419 These changes should probably benefit the C parser too.
de62edee 5420
b06df3c2
AD
5421 * data/lalr1.cc: Copy as...
5422 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
5423 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5424 from c++.m4.
5425 (state_stack_type, semantic_stack_type, location_stack_type)
5426 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5427 (data_type, stack_type, yystack_): New.
5428 (YYLLOC_DEFAULT, yypush_): Adjust.
5429 (yyerror_range): Now based on data_type, not location_type.
5430
7dedf26e
AD
54312008-11-03 Akim Demaille <demaille@gostai.com>
5432
5433 Push the state, value, and location at the same time.
5434 This is needed to prepare a forthcoming patch that fuses the three
5435 stacks into one.
de62edee 5436
7dedf26e
AD
5437 * data/lalr1.cc (parser::yypush_): New.
5438 (parser::yynewstate): Change the semantics: instead of arriving to
5439 this label when value and location have been pushed, but yystate
5440 is to be pushed on the state stack, now the three of them must
5441 have been pushed before. yystate still must be the new state.
5442 This allows to use yypush_ everywhere instead of individual
5443 handling of the stacks.
5444
c4585f1e
AD
54452008-11-03 Akim Demaille <demaille@gostai.com>
5446
5447 Prefer references to pointers.
5448 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5449 definition to use references instead of pointers.
5450 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5451 Take the value and location as references.
5452 Adjust callers.
5453
56017c17
AD
54542008-11-03 Akim Demaille <demaille@gostai.com>
5455
5456 stack::size instead of stack::height.
5457 * data/lalr1.cc (stack::height): Rename as...
5458 (stack::size): this.
5459 Fix the output type.
5460 Comment changes.
5461
5ab8c47b
AD
54622008-11-03 Akim Demaille <demaille@gostai.com>
5463
5464 Use variants to support objects as semantic values.
b06df3c2
AD
5465 This patch was inspired by work by Michiel De Wilde. But he used
5466 Boost variants which (i) requires Boost on the user side, (ii) is
5467 slow, and (iii) has useless overhead (the parser knows the type of
5468 the semantic value there is no reason to duplicate this
5469 information as Boost.Variants do).
5470
5471 This implementation reserves a buffer large enough to store the
5472 largest objects. yy::variant implements this buffer. It was
5473 implemented with Quentin Hocquet.
de62edee 5474
5ab8c47b
AD
5475 * src/output.c (type_names_output): New.
5476 (output_skeleton): Invoke it.
5477 * data/c++.m4 (b4_variant_if): New.
5478 (b4_symbol_value): If needed, provide a definition for variants.
5479 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5480 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5481 (b4_char_sizeof, yy::variant): New.
5482 (parser::parse): If variants are requested, define
5483 parser::union_type, parser::variant, change the definition of
5484 semantic_type, construct $$ before running the user action instead
5485 of performing a default $$ = $1.
5486 * examples/variant.yy: New.
5487 Based on an example by Michiel De Wilde.
5488
1fa5d8bb
AD
54892008-11-03 Akim Demaille <demaille@gostai.com>
5490
5491 Parameterize the extraction of semantic values.
5492 To make future changes easier, no longer rely on ".TYPE" being the
5493 way to get a semantic value.
de62edee 5494
1fa5d8bb
AD
5495 * data/c.m4 (b4_symbol_value): New.
5496 Use it.
5497 * data/c++.m4, data/yacc.c: Use it.
5498 * data/glr.c: Use b4_symbol_value.
5499 (b4_rhs_data): New.
5500 Use it.
5501
91ba8a55
AD
55022008-11-03 Akim Demaille <demaille@gostai.com>
5503
5504 Prepare easier M4 changes.
5505 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5506 future changes.
5507
c9ba9e59
JD
55082008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5509
5510 Initiate further development.
5511 * NEWS: Create an empty section for new entries.
5512 * gnulib: Update submodule to HEAD.
5513
bfb40910
JD
55142008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5515
5516 * NEWS: Version 2.4.
5517
241fda7a
JD
55182008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5519
5520 Prepare for next release.
5521 * NEWS: Briefly mention changes since 2.3b.
5522 * README: Say GNU m4 1.4.6, which we've been requiring in release
5523 announcements already, not 1.4.3, which breaks the build.
5524
ed4d67dc
JD
55252008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5526
5527 Say %language is experimental.
5528 We're thinking of extending it's effect on output file naming. See the
5529 thread at
5530 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5531 * NEWS: Say it's experimental.
5532 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5533 recommend it over %skeleton for now.
5534 (Bison Options): Likewise.
5535 (C++ Bison Interface): Use %skeleton not %language.
5536 (Calc++ Parser): Use %skeleton not %language.
5537 * src/getargs.c (usage): Say it's experimental.
5538
e254a580
DJ
55392008-11-01 Di-an Jan <dianj@freeshell.org>
5540 Paolo Bonzini <bonzini@gnu.org>
5541
5542 Support all Java parser class modifiers.
5543 * data/java.m4 (b4_percent_define_get3): New.
5544 (b4_final_if, b4_strictfp_if): New.
5545 * data/lalr1.java (final, strictfp, extends, implements): Support.
5546 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5547 documentation.
5548 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5549 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5550 (AT_CHECK_JAVA_GREP): New.
5551 (Java parser class modifiers): New test.
5552 (Java parser class extends and implements): New test.
5553
5554 Model exception propagation better with throws and lex_throws.
5555 * data/java.m4 (b4_list2): New.
5556 (throws): Change default.
5557 * data/lalr1.java (yyaction): Add throws.
5558 (parse): Add lex_throws in addition to throws.
5559 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5560 * tests/java.at (Java throws specifications): New test.
5561
5562 Improve documentation for Java parsers.
5563 * doc/bison.texinfo (Java Parsers): Add subsections.
5564 Don't quote first argument of %define.
5565 (Java Bison Interface): Document output files. Move documentation
5566 of parser class and merge into Java Parser Interface. Document
5567 features that error out. Document directives with no effect.
5568 Move note about Javadoc higher.
5569 (Java Semantic Values): Explicitly mention stype.
5570 Document that generic types cannot be used.
5571 (Java Location Values): Use @deftypeivar. Document constructors.
5572 Correct return value for toString.
5573 (Java Parser Interface): List undocumented constants/fields.
5574 Move documentation of fields added by %parse-param closer to list
5575 of members. Document that token names are added as fields.
5576 Document constructors accurately. Remove error method.
5577 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5578 Interface. Describe %code lexer and yylex accutately.
5579 Remove documentation that does not match the code.
5580 (Java Action Features): New.
5581 (Java Differences): Add reference. Add item on semantic values.
5582 Add note about @{ ... @}. Clarify %% epilogue placement.
5583 (Java Declarations Summary): New.
5584
5585 Fix Java skeleton.
5586 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5587 (b4_remove_comma): Quote test argument.
5588 (b4_identification): Remove "bison" field.
5589 * tests/java.at (Java parser class and package names): New test.
5590 (Java %parse-param and %lex-param): New test.
5591 (Java stype, position_class and location_class): New test.
5592
f259e4e6
PB
55932008-10-31 Di-an Jan <dianj@freeshell.org>
5594
5595 * data/lalr1.jave: Update copyright years.
5596 (YYParser): Correct name of "generated from" file in Javadoc:
5597 use b4_file_name instead of @ofile@.
5598 (Location constructor): Correct Javadoc parameter name.
5599 (yylloc): Add missing opening m4 quote after b4_location_if.
5600 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5601 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5602 (YYParser constructor): Correct Javadoc parameter name.
5603
cae5057f
JD
56042008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5605
5606 Always put auxiliary code files in the same dir as other output files.
5607 * src/files.c (compute_file_name_parts): When the user specifies
5608 --output but not --file-prefix, extract the directory prefix from the
5609 file prefix not from the grammar file name. This affects the location
5610 of files like location.hh generated by the C++ skeleton. The includes
5611 in the other output files require this fix.
5612 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5613 for expected output files.
5614 (Output files): Add a test for the above.
5615
4af432ba
JD
56162008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5617
5618 * gnulib: Update submodule to HEAD.
5619
e26d4e43
JD
56202008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5621
5622 Update copyright year.
5623 * src/files.c: Here.
5624
c0ee9e21
DJ
56252008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5626
5627 Don't overwrite the input file.
5628 * src/files.c (output_file_name_check): Fatal error if using input file
5629 for output.
5630 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5631 argument.
5632 (Conflicting output files): Add test.
5633
482dc52f
AD
56342008-10-28 Akim Demaille <demaille@gostai.com>
5635
5636 Space changes.
5637 * data/lalr1.cc: Formatting changes.
5638
52cbbe84
AD
56392008-10-28 Akim Demaille <demaille@gostai.com>
5640
5641 Don't define debugging functions when !YYDEBUG.
5642 * data/lalr1.cc (debug_stream, set_debug_stream)
5643 (debug_level_type, debug_level, set_debug_level): Don't
5644 declare them when YYDEBUG is not defined.
5645 The implementation are already YYDEBUG-aware.
5646
0925d5bf
AD
56472008-10-28 Akim Demaille <demaille@gostai.com>
5648
5649 Prefer "continue" for empty loop bodies.
5650 * etc/bench.pl.in: Use "continue" instead of {}.
5651
cf98343c
AD
56522008-10-28 Akim Demaille <demaille@gostai.com>
5653
5654 Space and comments changes.
5655 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5656 * data/c.m4, data/lalr1.cc: Space changes.
5657
9f467b7d
AD
56582008-10-28 Akim Demaille <demaille@gostai.com>
5659
5660 Make gnulib a submodule.
5661 * gnulib: New.
5662 * .gitmodules (gnulib): New.
5663
0f0e1ace
JD
56642008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5665
5666 Fix yyerror_range for user-defined location type in C++. Reported by
5667 Georg Sauthoff at
5668 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5669 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5670 * THANKS (Georg Sauthoff): Add.
5671
548e2104
JD
56722008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5673
5674 Update several administrative files mainly to facilitate releasing.
5675 * HACKING (Administrivia): Make the git-merge-changelog notes more
5676 helpful.
5677 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5678 (Release Procedure): Update for git and add numerous details that were
5679 previously missing.
5680 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5681 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5682 that announcements don't claim we bootstrapped with whatever bison
5683 happened to be in PATH. Add flex as a bootstrap tool.
5684 * Makefile.maint: Remove, previously replaced by maint.mk.
5685 * Makefile.cfg: Remove, and migrate settings to...
5686 * cfg.mk: ... here for the sake of `make announcement'.
5687 * bootstrap.conf (gnulib_modules): Add announce-gen.
5688 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5689 Berry.
5690
ddf17a6e
PB
56912008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5692
5693 Small but important bugfixes for the Java skeleton.
5694 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5695 (yy_symbol_print): Call toString on yyvaluep.
5696
e1145ad8
AD
56972008-08-29 Akim Demaille <demaille@gostai.com>
5698
5699 Clarify UPDATED use.
215b40ac 5700 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 5701 not to the release date of Bison.
215b40ac 5702 Reported by Joel E. Denny.
e1145ad8 5703
0df72d78
AD
57042008-08-29 Akim Demaille <demaille@gostai.com>
5705
5706 * README: Update FAQ pointer.
5707 Reported by Joel E. Denny.
5708
9a90b6bb
EB
57092008-08-27 Eric Blake <ebb9@byu.net>
5710
5711 Resync m4sugar from autoconf.
5712 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5713 (m4_init): Adjust to latest m4.git changes.
5714 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5715 effects.
5716 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5717 (_m4_list_cmp): Reduce side effects.
5718
65015668
AD
57192008-08-27 Akim Demaille <demaille@gostai.com>
5720
5721 Check yyerrok in calc.at.
215b40ac
EB
5722 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5723 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5724 expected.
65015668 5725
98e26a92
AD
57262008-08-27 Akim Demaille <demaille@gostai.com>
5727
5728 Support yyerrok in lalr1.cc.
5729 YYBACKUP is still to import back into lalr1.cc.
215b40ac 5730 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 5731
86c0e784
JD
57322008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5733
5734 For maintainer-check*, don't recompile for a $(VERSION) update.
5735 * cfg.mk: New file.
5736 (_is-dist-target): Override the one in GNUmakefile.
5737 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5738
88511166
JD
57392008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5740
5741 Update for recent change to gnulib.
5742 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5743 string.h now.
5744
6bbb2ed5
EB
57452008-08-15 Eric Blake <ebb9@byu.net>
5746
d67c52e8
EB
5747 Remaining m4sugar merge from autoconf.
5748 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5749 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5750 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5751 * src/output.c (output_skeleton): Tell m4 how to find it.
5752
6bbb2ed5
EB
5753 Partial m4sugar merge from autoconf: m4_map.
5754 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5755 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5756 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5757 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5758 for empty list.
5759 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5760 Likewise.
5761 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5762 declares it.
5763
8dce3875
JD
57642008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5765
5766 Keep .version and PACKAGE_VERSION in sync.
5767 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5768 dependency, and add comments justifying this in more detail. Discussed
5769 starting at
5770 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5771
882a1fbf
EB
57722008-08-06 Eric Blake <ebb9@byu.net>
5773
a3764451
EB
5774 Partial m4sugar merge from autoconf: m4_shiftn.
5775 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5776 (m4_shift2, m4_shift3): New macros.
5777 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5778 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5779 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5780 * data/java.m4 (b4_remove_comma): Likewise.
5781
882a1fbf
EB
5782 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5783 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5784 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5785 (m4_init): Consolidate wrapped text into single m4_wrap.
5786 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5787 in wrapped text.
5788
a30e920d
EB
57892008-08-05 Eric Blake <ebb9@byu.net>
5790
dfcc5959
EB
5791 Partial m4sugar merge from autoconf: builtins, version.m4.
5792 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5793 (m4_prepend): Remove, as it is unused and inherently quadratic,
5794 whereas m4_append is linear in newer m4.
5795 (m4_mkstemp): New builtin.
5796 (m4_symbols): Make rename conditional.
5797 (m4_version_prereq): Ensure fatal error if used in bison, which
5798 intentionally lacks version.m4.
5799
a30e920d
EB
5800 Fix comments in m4sugar.
5801 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5802
445b7470
JD
58032008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5804
5805 Update for recent .gitignore fix in Gnulib.
5806 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5807 anchored .gitignore entries.
5808
a1e50014
JD
58092008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5810
5811 Set gnu or gnits strictness.
5812 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5813 development and gnits strictness for releases. Based on Eric Blake's
5814 suggestion at
5815 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5816
d43f77e7
PB
58172008-07-31 Paolo Bonzini <bonzini@gnu.org>
5818
5819 * NEWS: Clarify documentation of %language.
5820
fee2ed87
PB
58212008-07-31 Paolo Bonzini <bonzini@gnu.org>
5822
5823 Support usage of git-merge-changelog.
5824 * .gitattributes: New.
5825 * HACKING: Document usage of git-merge-changelog.
5826 * bootstrap: Install git-merge-changelog entries in .git/config
5827 if appropriate.
5828
78029cd5
JD
58292008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5830
5831 Remove remaining dependence on CVS Id keyword.
5832 * ChangeLog: For the sake of people still using CVS, don't use dollars
5833 when mentioning Id.
5834 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5835 unusual anyway.
5836 * data/xslt/xml2dot.xsl: Likewise.
5837 * data/xslt/xml2text.xsl: Likewise.
5838 * data/xslt/xml2xhtml.xsl: Likewise.
5839 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5840 * doc/Makefile.am (neutralize): Remove, no longer needed.
5841 (.x.1): Don't use neutralize.
5842 (edit): Don't substitute for ID.
5843 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5844
c53d18b1
JD
58452008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5846
5847 Fix dependence on computed configure variables.
5848 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5849 $(top_srcdir)/configure.ac so that changes to computed variables, such
5850 as PACKAGE_VERSION, are seen.
5851 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5852
5523ac79
JD
58532008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5854
5855 Update copyright dates for recent changes.
5856 * Makefile.am: Here.
5857 * src/Makefile.am: Here.
5858 * src/reduce.c: Here.
5859 * tests/reduce.at: Here.
5860
8fa36911
JD
58612008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5862
5863 Use git-version-gen for version names between releases.
5864 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5865 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5866 * .prev-version: New.
5867 * .version.in: Remove.
78029cd5 5868 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
5869 revision.
5870 * GNUmakefile: Remove, now copied from Gnulib.
5871 * Makefile.am: Add code suggested by comments in
5872 build-aux/git-version-gen.
5873 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5874 .prev-version, and .version.
5875 * NEWS (2.3b+): Rename to...
5876 (?.?): ... this because we're dropping the "+" version naming scheme,
5877 but, in general, we still can't be sure of our next release name.
5878 * bootstrap: Add a quick hack to remove from .gitignore the
5879 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5880 entry. This should really be fixed in gnulib instead.
5881 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5882 * configure.ac (AC_INIT): Set version name by invoking
5883 build-aux/git-version-gen.
5884 (AC_CONFIG_FILES): Remove .version, now generated by
5885 build-aux/git-version-gen.
5886 * maint.mk: New, copied from coreutils.
5887 * doc/.cvsignore (bison.1): Add.
5888 * doc/.gitignore (/bison.1): Add.
5889 * doc/bison.1: Remove, generated.
5890 * src/.cvsignore (revision.c): Remove.
5891 * src/.gitignore (/revision.c): Remove.
5892 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5893 (BUILT_SOURCES): Remove revision.c.
5894 (revision.c): Remove.
5895 * src/getargs.c (version): Don't print revision after the VERSION.
5896 * src/revision.h: Remove.
5897
bcf07cb7
JD
58982008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5899
5900 Fix untranslatable composition of sentences. Reported by Goran
5901 Uddeborg at
5902 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5903 * THANKS (Goran Uddeborg): Add.
5904 * src/reduce.c (reduce_print): Report the number of nonterminals and
5905 rules useless in the grammar in separate sentences.
5906 * tests/reduce.at (Useless Rules): Update output.
5907 (Reduced Automaton): Likewise.
5908 (Underivable Rules): Likewise.
5909 (Empty Language): Likewise.
5910
9aacab9a
JD
59112008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5912
5913 Fix some .gitignore and .cvsignore problems.
5914 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5915 (insert_vc_ignore): ... this new function, which prepends `/' to all
5916 .gitignore entries before passing them to insert_sorted_if_absent.
5917 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5918 .cvsignore files are maintained even though Bison developers run
5919 bootstrap while using Git.
5920 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5921 unneeded by Bison.
5922 (gnulib): Add.
5923 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5924 unneeded. Reported by Eric Blake.
5925 * lib/.gitignore (/*~): Add.
5926 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5927 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5928 Blake.
5929 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5930
a9fc7990
JD
59312008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5932
5933 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5934 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5935 * bootstrap.conf (gnulib_modules): Add unsetenv.
5936 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5937 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5938 (/setenv.m4): Add.
5939 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5940 the first argument because it may become position-dependent, and unset
5941 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5942 Add comments explaining these issues in more detail.
5943
0f1d6f10
JD
59442008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5945
5946 Add .gitignore everywhere based on .cvsignore.
5947 * .gitignore: New.
5948 * build-aux/.gitignore: New.
5949 * data/.gitignore: New.
5950 * doc/.gitignore: New.
5951 * etc/.gitignore: New.
5952 * examples/.gitignore: New.
5953 * examples/calc++/.gitignore: New.
5954 * lib/.gitignore: New.
5955 * m4/.gitignore: New.
5956 * po/.gitignore: New.
5957 * runtime-po/.gitignore: New.
5958 * src/.gitignore: New.
5959 * tests/.gitignore: New.
5960
7bd1665a
JD
59612008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5962
5963 * NEWS (2.3b+): New section, empty for now.
5964 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5965
72c5b982
JD
59662008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5967
5968 * NEWS (2.3b): Update release date since there has been a delay in
5969 getting the announcements and tarballs out.
5970
bd02cd5d
JD
59712008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5972
5973 * NEWS: Version 2.3b.
5974 * configure.ac (AC_INIT): Likewise.
5975 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
5976
9126263e
JD
59772008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
5978
5979 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
5980 been doing it for years.
5981 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
5982 (Release Procedure): Add FIXME about make alpha being unmaintained.
5983
fa6aa7b3
JD
59842008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
5985
5986 * data/yacc.c: Reformat m4 a little for readability.
5987 * src/lalr.c (build_relations): Correct comment.
5988
d30b312d
JMG
59892008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5990
5991 DJGPP specific issue.
5992 * djgpp/config.sed: Fixes required to run configure scripts generated
5993 by autoconf 2.62.
5994
138d4cd9
JD
59952008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5996
5997 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
5998 coordinator@translationproject.org.
5999
8f7e2e1f
JD
60002008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6001
6002 * THANKS: Add Eric Blake.
6003
f55efa38
JD
60042008-04-23 Eric Blake <ebb9@byu.net>
6005
6006 Revert prior patch, by working around autoconf regression.
6007 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
6008 ("Output file name: ("): Uncomment test.
6009 ("Output file name: )"): Likewise.
6010 Based on an idea from Noah Misch.
6011
096c9f9d
JD
60122008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6013
6014 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
6015 2.61. Reported by Juan Manuel Guerrero at
6016 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
6017 * tests/output.at ("Output file name: ("): Comment out test case for
6018 now.
6019 ("Output file name: )"): Likewise.
6020
0f664b89
JD
60212008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6022
6023 * GNUmakefile: Update git-version-gen invocation so make dist
6024 succeeds.
6025
1cfe6375
JD
60262008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6027
6028 Update to the current gnulib CVS repository, and fix trigraph handling
6029 in Bison.
6030 * bootstrap: Update gnulib CVS repository URL.
6031 (symlink_to_dir): Encapsulate the code that guarantees the destination
6032 directory exists into...
6033 (check_dst_dir): ... this new function, and...
6034 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
6035 fail when copying files into lib/uniwidth/.
6036 * src/output.c (prepare_symbols): When writing yytname muscles, where
6037 symbol names will be encoded in C-string literals, tell quotearg to
6038 escape trigraphs. This used to be the default in gnulib.
6039 * tests/regression.at (Token definitions): Because of the change in
6040 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
6041 escapes trigraphs in symbol names. Thus, yytname no longer has
6042 trigraphs unnecessarily doubly escaped. Update test case output.
6043 Extend test case to be sure Bison's own error messages will no longer
6044 have trigraphs in symbol names unnecessarily escaped once.
6045
74c52fc8
JD
60462008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
6047
6048 Fix make dist infinite loop reported by Juan Manuel Guerrero at
6049 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
6050 * .cvsignore: Add .version.
6051 * .version.in: New.
6052 * bootstrap.conf (gnulib_modules): Add git-version-gen.
6053 * configure.ac (AC_CONFIG_FILES): Add .version.
6054 * build-aux/.cvsignore: Add git-version-gen.
6055
8e55b3aa
JD
60562008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6057
6058 * NEWS (2.3a+): Mention that -g now takes an argument.
6059 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
6060 consistency. Update the -g and -x entries now that they take
6061 arguments. Use brackets to indicate optional arguments.
6062 * src/getargs.c (usage): Explain the relationship between arguments of
6063 long and short options more completely. Document --defines and -d
6064 separately since the former takes an argument but, for POSIX Yacc, the
6065 latter does not.
6066 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 6067 (getargs): Sort cases.
8e55b3aa 6068
59c5ac72
AD
60692008-02-28 Akim Demaille <demaille@gostai.com>
6070
6071 * doc/bison.texinfo: Fix a few typos.
6072
118d4978
AD
60732008-02-28 Akim Demaille <akim@epita.fr>
6074
6075 * doc/bison.texinfo (Bison Options): Document -W.
6076 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
6077
7020f1e9
AD
60782008-02-28 Akim Demaille <akim@epita.fr>
6079
6080 * src/getargs.c (short_options): Split and sort for readability.
6081 -g and -x take optional arguments, just like their long options.
6082 * build-aux/cross-options.pl: Use /x to make the regexp easier to
6083 understand.
6084 Fix the handling of $opt which resulted in all the argument to be
6085 considered as optional.
6086
59da312b
JD
60872008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
6088
6089 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
6090 say its interface is experimental.
6091 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6092 Java.
6093 (Bison Options): In the -L and --language entry, mention Java.
6094 (Java Bison Interface): Say the interface is experimental.
6095 * src/getargs.c (usage): Mention -L and --language.
6096
6097 * NEWS (2.3a+): Say the push parsing interface is experimental.
6098 * doc/bison.texinfo (Push Decl): Likewise.
6099 (Decl Summary): Likewise in the "%define api.push_pull" entry.
6100 (Push Parser Function): Likewise.
6101 (Pull Parser Function): Likewise.
6102 (Parser Create Function): Likewise.
6103 (Parser Delete Function): Likewise.
6104 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
6105 yypull_parse, and yypush_parse entries.
6106
6107 * NEWS (2.3a+): Mention XML support, and say the schema is
6108 experimental.
6109 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
6110 * src/getargs.c (usage): Say the XML schema is experimental.
6111
6112 * NEWS (2.3a+): Say option instead of flag.
6113
2bb3ebec
WP
61142008-02-21 Wojciech Polak <polak@gnu.org>
6115
6116 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
6117 text.
6118
333e670c
JD
61192008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
6120
6121 Fix impure push parser compile error reported by Bob Rossi at
6122 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
6123 * data/yacc.c: Clean up whitespace in the output a little.
6124 (yypstate_allocated): Define for impure push parsers regardless of
6125 whether the pull interface is also requested.
6126 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
6127 check impure push parsers without the pull interface.
6128
6129 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
6130 yyerror takes arguments specified by %parse-param while yypstate_new
6131 does not.
6132 * doc/bison.texinfo (Parser Create Function): Document that
6133 yypstate_new returns 0 for multiple impure parser instances.
6134 * tests/push.at (Push Parsing: Multiple impure instances): Update
6135 expected stderr output.
6136
798096e1
JD
61372008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6138
6139 * runtime-po/POTFILES.in (push.c): Remove.
6140
9ca7f077
JD
61412008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6142
6143 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
6144 * data/push.c: Rename to...
6145 * data/yacc.c: ... this, overwriting it.
6146 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
6147 `%push-pull-parser' -> `%define api.push_pull "both"'.
6148 Remove old yacc.c tests, and update push.c tests to yacc.c.
6149
42ee26bb
JD
61502008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6151
6152 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
6153 `"%code top" blocks' instead of `%code "top" blocks'.
6154 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
6155 Clean up whitespace in the output a little.
6156
b1cc23c4
JD
61572008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6158
6159 Fix documentation problems reported by Tim Josling at
6160 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
6161 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
6162 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
6163 integers. Explain the effect of literal string aliases on error
6164 messages. Copy token 0 documentation from the C++ skeleton
6165 documentation.
6166
ab7f29f8
JD
61672008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6168
6169 Accept a token number in a %left, %right, or %nonassoc for POSIX
6170 conformance. Reported by Tim Josling at
6171 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
6172 * NEWS (2.3a+): Mention.
6173 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
6174 and code numbers are treated by precedence declarations.
6175 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
6176 of symbols.1.
6177 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
6178 of symbol.
6179 (symbol.prec): New, just like symbol but allows INT.
6180 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
6181 longer holds.
6182 * tests/regression.at (Token number in precedence declaration): New
6183 test case.
6184
a924ef36
JMG
61852008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6186
6187 DJGPP specific issues.
6188 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
6189 be changed. Copyright timestamp adjusted.
6190 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
6191 be changed. Copyright timestamp adjusted.
6192 * djgpp/config.site: Copyright timestamp adjusted.
6193 * djgpp/config_h.sed: Copyright timestamp adjusted.
6194 * djgpp/djunpack.bat: Copyright timestamp adjusted.
6195 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
6196 filename translation list.
6197 * djgpp/subpipe.c (init_subpipe): Check the environment variables
6198 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
6199 files shall be created. Before trying to use the temp dir where the
6200 environment variable points to check that the dir really exists. If
6201 not default to the cwd as temp dir. Copyright timestamp adjusted.
6202 * djgpp/subpipe.h: Copyright timestamp adjusted.
6203 * djgpp/testsuite.sed: Copyright timestamp adjusted.
6204
389c8cfd
PE
62052008-01-30 Paul Eggert <eggert@cs.ucla.edu>
6206
6207 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
6208
5d1cfef4
PE
62092008-01-09 Paul Eggert <eggert@cs.ucla.edu>
6210
6211 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
6212 Problem reported by Claudio Saavedra in
6213 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
6214
e2dcf996
WP
62152008-01-05 Wojciech Polak <polak@gnu.org>
6216
6217 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
6218 document's title with the input grammar file name.
6219
da730230
JD
62202007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
6221
6222 Automate regression testing of the XML/XSLT implementation. Discussed
6223 starting at
6224 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
6225 * configure.ac (XSLTPROC): New substitution.
6226 * Makefile.am (maintainer-xml-check): New phony target invoking...
6227 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
6228 invoking make maintainer-check with BISON_TEST_XML=1.
6229 * tests/atlocal.in (XSLTPROC): New.
6230 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
6231 not to report reachable memory when Bison is expected to have a
6232 non-zero exit status and (2) to compare XML/XSLT output with --graph
6233 and --report=all output for every working grammar when
6234 BISON_TEST_XML=1.
6235 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
6236 (AT_BISON_CHECK_XML): New.
6237 (AT_QUELL_VALGRIND): New.
6238 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
6239 (AT_CHECK): ... don't redefine this since this was the old way to
6240 quell Valgrind.
6241 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
6242 AT_BISON_CHECK invocations.
6243 * tests/c++.at: Likewise.
6244 * tests/calc.at: Likewise.
6245 * tests/conflicts.at: Likewise.
6246 * tests/cxx-type.at: Likewise.
6247 * tests/existing.at: Likewise.
6248 * tests/glr-regression.at: Likewise.
6249 * tests/headers.at: Likewise.
6250 * tests/input.at: Likewise.
6251 * tests/java.at: Likewise.
6252 * tests/output.at: Likewise.
6253 * tests/push.at: Likewise.
6254 * tests/reduce.at: Likewise.
6255 * tests/regression.at: Likewise.
6256 * tests/sets.at: Likewise.
6257 * tests/skeletons.at: Likewise.
6258 * tests/synclines.at: Likewise.
6259 * tests/torture.at: Likewise.
6260 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
6261 tends to hang xsltproc.
6262 (Big horizontal): Likewise.
6263
408476bc
JD
62642007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6265
6266 In XML output, remove redundant class attribute on symbol element.
6267 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
6268 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
6269 look up a symbol to determine whether it's a nonterminal or terminal.
6270 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
6271 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
6272
6273 Add prec/assoc information to XML output.
6274 * src/gram.c (grammar_rules_print_xml): For each rule that has a
6275 %prec, add a percent_prec attribute.
6276 * src/print-xml.c (print_grammar): For each terminal that has a
6277 precedence or associativity, add a prec or assoc attribute.
6278 (xml_indent): New.
6279 (xml_puts): Use xml_indent.
6280 (xml_printf): Use xml_indent.
6281 * src/print-xml.h (xml_indent): Prototype.
6282
6283 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
6284 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6285
d4a26c48
JD
62862007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6287
6288 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
6289 (bison:ruleByNumber): ... this for clarity.
6290 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
6291 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
6292 (xsl:template match="reduction"): Update.
6293 (xsl:template match="item"): Update.
6294 (xsl:template match="reduction"): Update.
6295
6296 In the XML output, don't print the list of rules where symbols appear.
6297 Compute it in XSLT instead. Discussed at
6298 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
6299 * data/xslt/bison.xsl (bison:ruleByLhs): New.
6300 (bison:ruleByRhs): New.
6301 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
6302 bison:ruleByRhs.
6303 (xsl:template match="terminal/rule"): Remove.
6304 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6305 bison:ruleByRhs.
6306 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6307 Remove.
6308 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
6309 bison:ruleByRhs and mode="number-link" for rule template.
6310 (xsl:template match="terminal/rule"): Remove.
6311 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6312 bison:ruleByRhs and mode="number-link" for rule template.
6313 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6314 Rewrite as...
6315 (xsl:template match="rule" mode="number-link"): ... this.
6316 * src/print-xml.c (print_grammar): Don't print the list of rules.
6317
ef1b4273
JD
63182007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6319
6320 Don't let --report affect XML output; always print all information.
6321 Discussed at
6322 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
6323 * src/conflicts.c (log_resolution): Implement.
6324 * src/print-xml.c (print_core): Implement.
6325 (print_state): Implement.
6326 (print_xml): Implement.
6327
6328 * NEWS (2.3a+): Fix quotes.
6329 * src/parse-gram.y (prologue_declaration): For consistency with -v,
6330 don't let %verbose clear the list specified by --report.
6331
0f6cd9e3
AD
63322007-11-26 Akim Demaille <akim@epita.fr>
6333
6334 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
6335
d80fb37a
JD
63362007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
6337
6338 In the XML output, list useless and unused symbols and rules with the
6339 useful ones and add a "usefulness" attribute. Discussed starting at
6340 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
6341 * src/gram.c (grammar_rules_partial_print_xml): Remove.
6342 (grammar_rules_print_xml): Print all rules instead of just those
6343 useful in the grammar, and add a "usefulness" attribute.
6344 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
6345 * src/print-xml.c (print_rules_useless_in_parser): Remove.
6346 (print_grammar): Print all nonterminals instead of just useful ones,
6347 and add a "usefulness" attribute to nonterminals and terminals.
6348 (print_xml): Don't print a separate "reductions" or
6349 "rules-useless-in-parser" element.
6350 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
6351 (reduce_xml): Remove.
6352 (reduce_token_unused_in_grammar): New.
6353 (reduce_nonterminal_useless_in_grammar): New.
6354 * src/reduce.h (reduce_xml): Remove prototype.
6355 (reduce_token_unused_in_grammar): Add prototype.
6356 (reduce_nonterminal_useless_in_grammar): Add prototype.
6357 * data/xslt/xml2text.xsl: Update for XML changes.
6358 * data/xslt/xml2xhtml.xsl: Update for XML changes.
6359 * tests/reduce.at (Useless Terminals): Update output.
6360 (Useless Rules): Update output.
6361 (Reduced Automaton): Update output.
6362
6363 Say "Terminals unused in grammar" instead of "Unused terminals".
6364 * NEWS (2.3a+): Update.
6365 * doc/bison.texinfo (Understanding): Update example output.
6366 * src/reduce.c (reduce_output): Implement.
6367 * data/xslt/xml2text.xsl: Implement.
6368 * data/xslt/xml2xhtml.xsl: Implement.
6369
1bb2bd75
JD
63702007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
6371
6372 Accept --report-file=FILE to override the default `.output' filename.
6373 * NEWS (2.3a+): Mention.
6374 * doc/bison.texinfo (Bison Options): Add an entry.
6375 * src/files.c (compute_output_file_names): Don't override
6376 spec_verbose_file if already set.
6377 * src/getargs.c (usage): Document --report-file.
6378 (REPORT_FILE_OPTION): New anonymous enum member.
6379 (long_options): Add entry for it.
6380 (getargs): Add case for it setting spec_verbose_file.
6381
6382 * build-aux/cross-options.pl: Don't record a short option just because
6383 there's an arg.
6384 * doc/.cvsignore: Add yacc.1.
6385
a005a9c4
AD
63862007-11-14 Akim Demaille <akim@epita.fr>
6387
6388 * doc/yacc.1.in: New.
6389 * configure.ac, doc/Makefile.am: Adjust.
6390 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
6391 config.h symbol.
6392 Use AC_SUBST for assignments too.
6393 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
6394
cff03fb2
JD
63952007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6396
6397 * src/gram.c: Remove comments that duplicate comments in gram.h.
6398
6399 When reporting useless rules and nonterminals, say "useless in grammar"
6400 instead of "useless", and say "useless in parser" instead of "never
6401 reduced". Discussed starting at
6402 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
6403 * NEWS (2.3a+): Mention this change.
6404 * data/xslt/xml2text.xsl: Update output text and expected input XML
6405 element names to match changes below.
6406 * data/xslt/xml2xhtml.xsl: Likewise.
6407 (xsl:template match="bison-xml-report"): Add missing entry in Table of
6408 Contents: "Rules useless in parser due to conflicts".
6409 * doc/bison.texinfo (Decl Summary): Reword a little.
6410 (Understanding): Update example output for changes below.
6411 * src/gram.c: (rule_useful_p): Rename to...
6412 (rule_useful_in_grammar_p): ... this.
6413 (rule_useless_p): Rename to...
6414 (rule_useless_in_grammar_p): ... this.
6415 (rule_never_reduced_p): Rename to...
6416 (rule_useless_in_parser_p): ... this.
6417 (grammar_rules_print): Update for renames.
6418 (grammar_rules_print_xml): Update for renames.
6419 (grammar_rules_never_reduced_report): Rename to...
6420 (grammar_rules_useless_report): ... this since it is used for either
6421 kind of useless rule.
6422 * src/gram.h: Reword comments and update function names in prototypes.
6423 * src/main.c (main): Say "rule useless in parser due to conflicts".
6424 * src/print-xml.c (print_rules_never_reduced): Rename to...
6425 (print_rules_useless_in_parser): ... this, and rename output XML
6426 element "rules-never-reduced" to "rules-useless-in-parser".
6427 (print_xml): Update for rename.
6428 * src/print.c (print_results): Say "Rules useless in parser due to
6429 conflicts".
6430 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6431 (nonterminals_reduce): Say "nonterminal useless in grammar".
6432 (reduce_output): Say "Nonterminals useless in grammar".
6433 Say "Rules useless in grammar".
6434 (reduce_xml): Rename output XML element "useless" to
6435 "useless-in-grammar".
6436 (reduce_print): Don't report the count of grammatically useless rules
6437 as "rules never reduced" just because %yacc is specified.
6438 In the correct report of this count, say nonterminal(s) and rule(s)
6439 "useless in grammar".
6440 * tests/conflicts.at (S/R in initial): Update expected output.
6441 (Defaulted Conflicted Reduction): Likewise.
6442 (Unreachable States After Conflict Resolution): Likewise.
6443 * tests/existing.at (GNU pic Grammar): Likewise.
6444 * tests/reduce.at (Useless Nonterminals): Likewise.
6445 (Useless Rules): Likewise.
6446 (Reduced Automaton): Likewise.
6447 (Underivable Rules): Likewise.
6448 (Empty Language): Likewise.
6449
66f0441d
JD
64502007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6451
6452 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6453 here document and before the EOF so that BSD's implementation of Bourne
6454 shell doesn't parse the delimiter as part of the here document.
6455 * doc/.cvsignore: Add cross-options.texi.
6456 * src/getargs.c (usage): Add a blank line after the warning categories.
6457
d0ee4105
PB
64582007-11-08 Paolo Bonzini <bonzini@gnu.org>
6459
6460 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6461
e8b1fb9b
AD
64622007-11-05 Akim Demaille <akim@epita.fr>
6463
6464 Remove Id: from bison.1.
6465 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6466 (perl -0777 -pi -e 's/\.PP\nId): New.
6467 (.x.1): Use it to ignore the version control revision.
6468
2f7a96b5
AD
64692007-11-05 Akim Demaille <demaille@gostai.com>
6470
6471 * build-aux/Makefile.am: Ship cross-options.pl.
6472 * doc/Makefile.am: Always refer to cross-options.texi with
6473 $(srcdir).
6474 (MAINTAINERCLEANFILES): Add it.
6475
f4101aa6
AD
64762007-11-04 Akim Demaille <demaille@gostai.com>
6477
6478 Generate the long/short option cross-table.
6479 * build-aux/cross-options.pl: New.
6480 * doc/Makefile.am (cross-options.texi): New.
6481 * doc/bison.texinfo: Use it.
6482
727a1401
AD
64832007-11-04 Akim Demaille <demaille@gostai.com>
6484
6485 Generate bison.1 using help2man.
6486 * doc/common.x, doc/bison.x: New.
6487 * doc/Makefile.am (bison.1, .x.1): New.
6488 The code is taken from autoconf-2.61/man/Makefile.am.
6489 * configure.ac: Look for help2man.
6490
6aeb9c57
AD
64912007-11-04 Akim Demaille <demaille@gostai.com>
6492
6493 Complete --help.
6494 * src/getargs.c (usage): Document -W, make it clear that -d,
6495 -g and -x have optional arguments.
6496
d7be4085
AD
64972007-11-04 Akim Demaille <demaille@gostai.com>
6498
6499 Find sha1sum when named gsha1sum.
6500 * bootstrap (find_tool): New.
6501 ($SHA1SUM): New.
6502
d9df47b6
JD
65032007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6504
6505 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6506 at
6507 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6508 * NEWS (2.3a+): Mention.
6509 * data/bison.m4 (b4_pure_if): Don't define it here.
6510 * data/c.m4 (b4_identification): Depend on individual skeletons to
6511 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6512 values of the %define variables api.pure or api.push_pull. Define
6513 YYPURE, YYPUSH, and YYPULL accordingly.
6514 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6515 glr.cc has already defined b4_pure_flag.
6516 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6517 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 6518 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
6519 * doc/bison.texinfo (Pure Decl): Update.
6520 (Push Decl): Update.
6521 (Decl Summary): Add api.pure to %define entry.
6522 In %pure-parser entry, say it's deprecated and reference %define.
6523 (Pure Calling): Update.
6524 (Error Reporting): Update.
6525 (C++ Scanner Interface): Update.
6526 (How Can I Reset the Parser): Update.
6527 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6528 reference %define.
6529 * src/getargs.c (pure_parser): Remove global variable.
6530 * src/getargs.h (pure_parser): Remove extern.
6531 * src/output.c (prepare): Don't define pure_flag muscle.
6532 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6533 wrapper around `%define api.pure'.
6534 * tests/calc.at (Simple LALR Calculator): Update.
6535 (Simple GLR Calculator): Update.
6536 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6537 Update.
6538 (GLR: Resolve ambiguity, pure, locations): Update.
6539 (GLR: Merge conflicting parses, pure, no locations): Update.
6540 (GLR: Merge conflicting parses, pure, locations): Update.
6541 * tests/glr-regression.at (Uninitialized location when reporting
6542 ambiguity): Update
6543 * tests/input.at (Unused %define api.pure): New test case.
6544 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6545 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6546 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6547
c373bf8b
JD
65482007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6549
6550 %define push_pull -> %define api.push_pull. Discussed starting at
6551 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6552 * data/push.c: Expect the new name.
6553 * data/yacc.c: Likewise.
6554 * doc/bison.texinfo (Push Decl): Update.
6555 (Decl Summary): Update %define entry.
6556 (Push Parser Function): Update.
6557 (Pull Parser Function): Update.
6558 (Parser Create Function): Update.
6559 (Parser Delete Function): Update.
6560 * tests/calc.at (Simple LALR Calculator): Update.
6561 * tests/input.at (%define enum variables): Update.
6562 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6563 (Push Parsing: Multiple impure instances): Update.
6564 (Push Parsing: Unsupported Skeletons): Update.
6565 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6566 (Exploding the Stack Size with Malloc): Update.
6567
6568 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6569 other entries some.
6570
32f19b6b
JD
65712007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6572
6573 For the XML output's terminal element, rename @number to @token-number,
6574 and add @symbol-number. In the nonterminal element, rename @number to
6575 @symbol-number. Discussed starting at
6576 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6577 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6578 renames.
6579 (xsl:template match="nonterminal"): Likewise.
6580 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6581 (xsl:template match="nonterminal"): Likewise.
6582 * src/print-xml.c (print_grammar): Implement.
6583
255a6b90
JD
65842007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6585
6586 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6587 2007-10-11 change, the child elements here are items not rules.
408476bc 6588 (xsl:template match="item"): New.
255a6b90
JD
6589 (xsl:template match="rule"): Update for new reduced itemset.
6590 (xsl:template match="point"): Remove.
6591 (xsl:template match="empty"): For consistency with --graph, don't
6592 output "/* empty */".
6593 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6594 line-wrap, don't pass a negative value as first-line-length since this
6595 won't work with the following changes.
6596 (xsl:template name="line-wrap"): Simplify slightly.
6597 (xsl:template name="ws-search"): Eliminate recursion.
6598 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6599 set next to an item whose dot is not at the end of the RHS even if it
6600 happens to be associated with the same rule.
6601
88c78747
JD
66022007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6603
31984206
JD
6604 Add %define lr.keep_unreachable_states.
6605 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6606 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6607 * src/main.c (main): Implement it.
6608 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6609 Extend to test it, and fix a typo.
6610
66112007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6612
6613 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
6614 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6615 the example .output text.
6616 * tests/regression.at (Extra lookahead sets in report): Improve wording
6617 of comments.
6618
b7a70162
WP
66192007-10-17 Wojciech Polak <polak@gnu.org>
6620
6621 * src/print-xml.c (print_grammar): Renamed
6622 <terminal> and <nonterminal> attributes:
6623 "type" to "number" and "symbol" to "name".
6624 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6625 Use new attribute names.
6626 (xsl:template match="nonterminal"): Likewise.
6627 * data/xslt/xml2xhtml.xsl: Likewise.
6628
a0de5091
JD
66292007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6630
6631 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6632 (Option Cross Key): Likewise.
6633
6634 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6635 next to an item whose dot is not at the end of the RHS even if it
6636 happens to be associated with the same rule.
6637 * src/print.c (print_core): Likewise.
6638 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6639 (Resolved SR Conflicts): Update output.
6640 * tests/regression.at (Extra lookahead sets in report): New test case.
6641
4c20d18d
WP
66422007-10-11 Wojciech Polak <polak@gnu.org>
6643
6644 * src/print-xml.c (print_core): Remove item set
6645 redundancy.
6646 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6647 Improve processing time. Suggested by Joel E. Denny.
6648 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6649 Write xsl:param "required" attribute as comment.
6650 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6651 (xsl:template match="rule"): Support new reduced itemset.
6652 (xsl:template match="point"): Remove.
6653 * data/xslt/xml2xhtml.xsl: Likewise.
6654
f506ad1c
JD
66552007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6656
6657 * src/getargs.c (version): Update copyright year.
6658
21f1b063
JD
66592007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6660
6661 Make xml2dot.xsl and --graph produce the same output.
6662 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
6663 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6664 escaped later.
6665 (xsl:template name="output-node"): Use the new escape template instead
6666 of the string-replace template directly.
6667 (xsl:template name="output-edge"): Likewise.
6668 (xsl:template name="escape"): New, escapes backslashes and newlines in
6669 addition to quotation marks.
6670 * src/graphviz.c (start_graph, output_node, output_edge): Add
6671 whitespace to output for legibility.
6672
6673 Make xml2text.xsl and --report produce the same output, and remove the
6674 XML "conflicts" element since a conflict summary is easily extracted
6675 from the automaton.
6676 * data/xslt/bison.xsl: New.
6677 (xsl:template match="state" mode="bison:count-conflicts): New.
6678 * data/xslt/xml2text.xsl: Import bison.xsl.
6679 (xsl:template match="bison-xml-report"): Instead of styling the
6680 "conflicts" element, style the "automaton" element with mode
6681 "conflicts". Unlike the former, the latter lists S/R and R/R
6682 conflicts for a state on the same line.
6683 (xsl:template match="conflicts"): Remove.
6684 (xsl:template match="conflict"): Remove.
6685 (xsl:template match="terminal"): Line-wrap the list of rules in which
6686 the terminal is used.
6687 (xsl:template match="nonterminal"): Likewise for nonterminals.
6688 (xsl:template match="automaton" mode="conflicts"): New.
6689 (xsl:template match="state" mode="conflicts"): New.
6690 (xsl:template name="line-wrap"): New.
6691 (xsl:template name="ws-search"): New.
6692 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6693 (xsl:template match="bison-xml-report"): Instead of styling the
6694 "conflicts" element, style the "automaton" element with mode
6695 "conflicts."
6696 (xsl:template match="conflicts"): Remove.
6697 (xsl:template match="conflict"): Remove.
6698 (xsl:template match="automaton" mode="conflicts"): New.
6699 (xsl:template match="state" mode="conflicts): New.
6700 * src/conflicts.c (conflicts_output_xml): Remove.
6701 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6702 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6703 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6704 the corresponding XSLT is easier. Also, never wrap between a word and
6705 the comma that follows it.
6706
793fbca5
JD
67072007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6708
6709 Improve C++ namespace support. Discussed starting at
6710 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6711 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6712 b4_namespace_close): New macros that interpret the %define variable
6713 "namespace" so its value can contain "::" to indicate nested
6714 namespaces.
6715 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6716 the above macros.
6717 * data/lalr1.cc (b4_namespace): Likewise.
6718 * data/location.cc (b4_namespace): Likewise.
6719 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6720 inside a new table in the general %define entry. Document `%define
6721 namespace' there as well. Point the %name-prefix entry to it since it
6722 explains it more completely in the case of C++.
6723 (C++ Bison Interface): Mention `%define namespace' instead of
6724 %name-prefix.
6725 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6726 entry suffices.
6727 * tests/c++.at (Relative namespace references): New test case.
6728 (Absolute namespace references): New test case.
6729 (Syntactically invalid namespace references): New test case.
6730 * tests/input.at (C++ namespace reference errors): New test case.
6731
35b8730d
JD
67322007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6733
6734 Add syncline support and location accessor to internal %define
6735 interfaces.
6736 * data/bison.m4 (b4_percent_define_get_loc): New.
6737 (b4_percent_define_get_syncline): New.
6738 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6739 (b4_percent_define_default): Record defining location as line 1 rather
6740 than 0 for the sake of synchronizing #line's, and define
6741 b4_percent_define_syncline(VARIABLE).
6742 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6743 * src/muscle_tab.c (muscle_syncline_grow): New.
6744 (muscle_code_grow): Use muscle_syncline_grow.
6745 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6746 define b4_percent_define_syncline(VARIABLE).
6747 (muscle_percent_define_get_loc): New.
6748 (muscle_percent_define_get_syncline): New.
6749 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6750 remove some unused variables.
6751 (muscle_percent_define_default): Record defining location as line 1
6752 rather than 0 for the sake of synchronizing #line's, and define
6753 b4_percent_define_syncline(VARIABLE).
6754 (muscle_percent_define_check_values): Use
6755 muscle_percent_define_get_loc.
6756 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6757 (muscle_percent_define_get_syncline): Prototype.
6758 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6759 defaults): Update output for location change.
6760 (Complaining during macro argument expansion): Extend to test
6761 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6762
7dc4a694
JD
67632007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6764
6765 Fix some error-reporting macro bugs.
6766 * data/bison.m4 (b4_cat): New.
6767 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6768 to stdout so they don't become arguments to other macros. Update
6769 comments and add examples.
6770 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6771 add examples.
6772 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6773 after printing the error directive so that M4 doesn't report subsequent
6774 problems that are induced by this problem.
6775 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6776 instead of just in them. Recognize @\n in both places. Both expand to
6777 the empty string. Needed by b4_cat.
6778 * tests/skeletons.at (Complaining during macro argument expansion):
6779 New test case.
6780 (Fatal errors make M4 exit immediately): New test case.
6781
d4bd2295
JD
67822007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6783
6784 Implement --print-datadir.
6785 * src/getargs.c (usage): Mention.
6786 (PRINT_DATADIR_OPTION): New anonymous enum member.
6787 (long_options): Add entry for it.
6788 (getargs): Add case for it calling compute_pkgdatadir.
6789 * src/output.c (output_skeleton): Encapsulate data directory
6790 computation from here...
6791 (prepare): ... and from here...
6792 (compute_pkgdatadir): ... into this new function.
6793 * src/output.h (compute_pkgdatadir): Prototype.
6794
34cdeddf
JD
67952007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6796
6797 * src/print-xml.c (escape_bufs): New static global variable
6798 replacing...
6799 (xml_escape_n): ... the static local variable buf here.
6800 (print_xml): Free memory for escape_bufs.
6801 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6802
d782395d
JD
68032007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6804
6805 Replace `%push-parser' and `%push-pull-parser' with
6806 `%define push_pull "push"' and `%define push_pull "both"'.
6807 `%define push_pull "pull"' is the default.
6808 * doc/bison.texinfo (Push Decl, Push Parser Function,
6809 Pull Parser Function, Parser Create Function, Parser Delete Function):
6810 Update declarations.
6811 (Decl Summary, Table of Symbols): Replace %push-parser and
6812 %push-pull-parser entries with a %define push_pull entry.
6813 * data/bison.m4 (b4_percent_define_check_values): New macro.
6814 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6815 definitions...
6816 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6817 definitions...
6818 * data/push.c: ... to here and compute them from the value of the
6819 %define variable push_pull.
6820 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6821 parsing requests here...
6822 * data/yacc.c: ... hack this to switch to push.c any time
6823 b4_use_push_pull_flag or the %define variable push_pull is set. This
6824 will go away when we mv push.c yacc.c.
6825 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6826 push parsing is not supported since unused %define variables are
6827 reported anyway.
6828 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6829 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6830 comments for consistency with b4_percent_define_check_values.
6831 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6832 muscles.
6833 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6834 Remove.
6835 (prologue_declaration): Remove %push-parser and %push-pull-parser
6836 rules.
6837 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6838 * tests/calc.at: Update declarations.
6839 * tests/input.at (%define enum variables): New test case.
6840 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6841 declaration.
6842 (Push Parsing: Multiple impure instances): Update declaration.
6843 (Push Parsing: Unsupported Skeletons): New test case.
6844 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6845 declaration.
6846 (Exploding the Stack Size with Malloc): Update declaration.
6847
3f999f78
WP
68482007-09-24 Wojciech Polak <polak@gnu.org>
6849
6850 Add XSLT transformations.
6851
6852 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6853 * data/xslt/xml2text.xsl: Transform XML into plain text.
6854 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6855 * data/Makefile.am (xsltdir): New variable.
6856 (dist_xslt_DATA): Add xslt/*.xsl files.
6857
a4f75309
PE
68582007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6859
6860 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6861 Problem reported by Wojciech Polak.
6862 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6863 (xml_printf): Undo change I made on 21 September; that is,
6864 indent 2 spaces, not 1.
6865
ad5feac4
JD
68662007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6867
6868 Pacify ./configure --enable-gcc-warnings.
6869 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6870 `char const *' instead of `char *'.
6871 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6872 local variable `sep'.
6873
41d7a5f2
PE
68742007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6875
6876 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6877 elsewhere.
6878 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6879 (xml_printf): Indent just 1 space for level.
6880 (e_char, xlate_char): Remove.
6881 (xml_escape_string): Rewrite to avoid undefined behavior (used
6882 storage that was freed from the stack).
6883 (xml_escape_n): Don't bother checking for subscript error.
6884
3f999f78
WP
68852007-09-21 Wojciech Polak <polak@gnu.org>
6886
6887 Add Bison XML Automaton Report.
41d7a5f2
PE
6888
6889 Add support for an -x option to generate an XML report.
6890 It is not documented yet.
6891 * src/print-xml.c: New file.
6892 * src/print-xml.h: Likewise.
6893 * lib/timevar.def (TV_XML): New var.
6894 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6895 * src/conflicts.c: Include print-xml.h.
6896 (solved_conflicts_xml_obstack): New var.
6897 (log_resolution, conflicts_solve, conflicts_free):
6898 Add support for XML report.
6899 (conflicts_output_val): New function.
6900 * src/conflicts.h (conflicts_output_val): New decl.
6901 * src/files.c (spec_xml_file): New var.
6902 (compute_output_file_names, output_file_names_free): Add XML support.
6903 * src/files.h (spec_xml_file): New decl.
6904 * src/getargs.c (xml_flag): New var.
6905 (usage, short_options, long_options, getargs): Add XML support.
6906 * src/getargs.h (xml_flag): New decl.
6907 * src/gram.c: Include print-xml.h.
6908 (rule_lhs_print_xml, rule_rhs_print_xml):
6909 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6910 New functions.
6911 * src/gram.h: Declare external ones.
6912 * src/main.c: Include print-xml.h.
6913 (main): Add XML support.
6914 * src/reduce.c: Include print-xml.h.
6915 (reduce_xml): New function.
6916 * src/reduce.h: Declare it.
6917 * src/state.c: Include print-xml.h.
6918 (state_new): Add XML support.
6919 (state_rule_lookahead_tokens_print_xml): New function.
6920 * src/state.h: Declare it.
6921 (struct state): New member solved_conflicts_xml.
6922 * src/symtab.c (symbol_class_get_string): New function.
6923 * src/symtab.h: Declare it.
6924
6d8e724d
PE
69252007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6926
6927 * GNUmakefile: Switch to coreutils's version.
6928 * bootstrap: Likewise.
6929 * Makefile.cfg: Adjust to new GNUmakefile.
6930 * README-hacking: Likewise.
6931
6932 Import from gnulib:
6933
6934 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6935 Bruno Haible <bruno@clisp.org>
6936
6937 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6938 and is a script that invokes bison. Tighten the code. Add comments.
6939
922bdd7f
JD
69402007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6941
6942 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6943 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6944 * doc/bison.texinfo (Decl Summary): Fix.
6945 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6946 * tests/input.at (Boolean %define variables): Update output.
6947 * tests/skeletons.at (%define boolean variables: invalid skeleton
6948 defaults): Rename to...
6949 (%define Boolean variables: invalid skeleton defaults): ... this and
6950 update output.
6951
1b17b01d
JD
69522007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6953
6954 In impure push mode, don't allow more than one yypstate to be allocated
6955 since multiple impure parsers would corrupt yynerrs.
6956 * data/push.c (yypstate_allocated): New static global variable
6957 initialized to 0.
6958 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6959 exhaustion if yypstate_allocated is 1, but still return 2.
6960 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6961 already 1. Otherwise, set it to 1.
6962 (yypstate_delete): Set it to 0.
6963 * tests/push.at (Push Parsing: Multiple impure instances): New test
6964 case.
6965
9987d1b3
JD
69662007-08-17 Bob Rossi <bob@brasko.net>
6967
6968 * doc/bison.texinfo (Push Decl): Document the push parser.
6969 (Table of Symbols): Ditto.
6970 (Pure Decl): Ditto.
6971 (Decl Summary): Ditto.
6972 (Multiple Parsers, Push Parser Function, Pull Parser Function,
6973 Parser Create Function, Parser Delete Function):
6974 Add new push parser symbols.
6975 (Table of Symbols): Document push-parser, push-pull-parser,
6976 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
6977
f16b0819
PE
69782007-08-15 Paul Eggert <eggert@cs.ucla.edu>
6979
6980 Update to GPLv3.
6981 * doc/gpl-3.0.texi: New file.
6982 * doc/gpl.texi: Remove.
6983 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
6984 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
6985 * README-hacking, TODO, bootstrap, bootstrap.conf:
6986 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
6987 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
6988 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
6989 * data/lalr1.cc, data/lalr1.java, data/location.cc:
6990 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
6991 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
6992 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
6993 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
6994 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
6995 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
6996 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
6997 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
6998 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
6999 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
7000 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
7001 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
7002 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
7003 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
7004 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
7005 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
7006 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
7007 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
7008 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
7009 * src/complain.c, src/complain.h, src/conflicts.c:
7010 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
7011 * src/files.h, src/flex-scanner.h, src/getargs.c:
7012 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
7013 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
7014 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
7015 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
7016 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
7017 * src/print.c, src/print.h, src/print_graph.c:
7018 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
7019 * src/reduce.h, src/relation.c, src/relation.h:
7020 * src/revision.h, src/scan-code.h, src/scan-code.l:
7021 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
7022 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
7023 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
7024 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
7025 * tests/Makefile.am, tests/actions.at, tests/c++.at:
7026 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
7027 * tests/existing.at, tests/glr-regression.at:
7028 * tests/headers.at, tests/input.at, tests/java.at:
7029 * tests/local.at, tests/output.at, tests/push.at:
7030 * tests/reduce.at, tests/regression.at, tests/sets.at:
7031 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
7032 * tests/torture.at:
7033 Update to GPLv3.
7034
728c4be2
JD
70352007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7036
7037 Get rid of broken %no-parser, -n, and --no-parser implementation and
7038 documentation.
7039 * TODO: Don't mention them.
7040 * doc/bison.1: Likewise.
7041 * doc/bison.texinfo (Decl Summary): Likewise.
7042 (Bison Options): Likewise.
7043 (Option Cross Key): Likewise.
7044 * src/getargs.c (no_parser_flag): Remove global variable.
7045 (usage): Don't print description of -n and --no-parser.
7046 (long_options): Remove --no-parser entry here.
7047 (getargs): Remove -n case in the switch here.
7048 * src/getargs.h (no_parser_flag): Remove extern.
7049 * tests/regression.at (Web2c Actions): Remove comment that mentions
7050 --no-parser.
7051
5d31a216
JD
70522007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7053
7054 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
7055 name user variables starting with `yy'. Just pass NULL instead of a
7056 dummy local &yylval to yypush_parse.
7057 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
7058 starting with `yy'.
7059
a2ea208d
JD
70602007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
7061
7062 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
7063 true since it's then always used regardless of whether yyoverflow is
7064 defined. Reported by Christian Burger at
7065 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
7066 * THANKS: Add Christian Burger.
7067
91661ebb
JD
7068 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7069 node names: say "Decl Summary" not "Bison Declaration Summary".
7070
cbd50549
JD
70712007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
7072
7073 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
7074 determine whether this function has already complained about an invalid
7075 value for a %define boolean variable, don't check whether Bison has
7076 ever examined the value. As written, the check was a tautology.
7077 Instead, record and check for this complaint using a separate muscle.
7078
eb1b0740
JD
70792007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
7080
7081 Fix push parsing memory leak reported by Brandon Lucia at
7082 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
7083 * THANKS: Add Brandon Lucia.
7084 * data/push.c (yypstate_delete): Free the stack if it was reallocated
7085 but the parse never completed and thus freed it.
7086 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
7087 * tests/testsuite.at: Include push.at.
7088 * test/push.at: New.
7089 (Push Parsing: Memory Leak for Early Deletion): New test case.
7090
9d774aff
JD
70912007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
7092
7093 Improve handling of multiple S/R conflicts in the same state and of S/R
7094 conflicts involving multiple reductions.
7095 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
7096 set for a state here or Bison will abort if it is reassigned on a
7097 later conflicted reduction in the same state.
7098 Similarly, don't finalize and assign the solved conflicts report here
7099 or it will be lost if it is reassigned on a later conflicted reduction
7100 in the same state.
7101 (set_conflicts): Instead, assign them both here after all S/R conflicts
7102 in the state have been fully examined.
7103 * src/print.c (shift_set): Rename to...
7104 (no_reduce_set): ... this.
7105 (print_reductions): Update for rename, and add %nonassoc error action
7106 tokens to no_reduce_set so that, when printing the first remaining
7107 reduction on an error action token, the reduction is enclosed in
7108 brackets.
7109 (print_results): Update for rename.
7110 * tests/conflicts.at (Solved conflicts report for multiple reductions
7111 in a state): New test case.
7112 (%nonassoc error actions for multiple reductions in a state): New test
7113 case.
7114
7115 * src/main.c (main): Don't depend on C99 features.
7116
10159d2a
JD
71172007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
7118
7119 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
7120 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
7121 uniwidth.
10159d2a 7122
953b3935
JD
71232007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
7124
7125 * bootstrap (slurp): Create target directories that don't exist.
7126 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
7127
6ce2d93a
JD
71282007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7129
7130 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
7131 than item number.
7132 * closure.c (closure): Likewise.
7133 * state.h (reductions): Comment sorting of rules.
7134 (state): Comment sorting of items.
7135
ce3448d5
JD
71362007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
7137
7138 Fix C++ test cases after recent Gnulib changes. Discussed starting at
7139 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
7140 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
7141 definition in order to avoid Gnulib headers since we don't use config.h
7142 here.
7143 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
7144 rather than AT_DATA so that config.h is included.
7145
8a86eef0
JD
71462007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
7147
7148 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
7149 instead of fprintf. Guard these functions with #if YYDEBUG instead of
7150 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
7151 and so that YYFPRINTF is guaranteed to be defined here.
7152
b1a81613
JD
71532007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7154
7155 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
7156 with...
7157 (muscle_percent_define_check_values): ... this more helpful function.
7158 Again, it's not used yet, but it will be.
7159 * src/muscle_tab.h: Likewise.
7160
71b61d4d
JD
7161 Improve some comments in parser table construction.
7162 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
7163 (generate_states): Don't mention ruleset, which is internal to closure.
7164 * src/closure.c (closure): Explain sorting of core and itemset, which
7165 is required for this function to behave correctly.
7166 * src/closure.h (closure): Mention sorting.
7167
2a6b783d
JD
71682007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
7169
7170 * src/lalr.c (state_lookahead_tokens_count): For code readability,
7171 move the check for disabled transitions to an aver since conflict
7172 resolution hasn't happened yet.
7173
7174 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
7175 labels a state as inconsistent just because it has error transitions.
7176 The original form of this check appeared in revision 1.1 of lalr.c,
7177 which was committed on 1991-12-21. Now (at least), changing the
7178 consistency label on such a state appears to have no useful effect in
7179 any of the places it is examined, which I enumerate below. The key
7180 point to understanding each item in this enumeration is that a state
7181 with an error transition is labelled consistent in the first place only
7182 if it has no rules, so the check cannot matter for states that have
7183 rules. (1) Labelling a state as inconsistent will cause set_conflicts
7184 to try to identify its conflicts, and a state must have *rules* to have
7185 conflicts. (2) Labelling a state as inconsistent will affect how
7186 action_row sets the default *rule* for the state. (3) Labelling a
7187 state as inconsistent will cause build_relations to add lookback edges
7188 to *rules* in that state.
7189 * src/state.h (struct state): Word the comment for member consistent
7190 more carefully.
7191
14462c2b
JD
71922007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
7193
7194 Don't depend on C99 features.
7195 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
7196 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
7197 * src/reader.c (check_and_convert_grammar): Fix for-loop.
7198 * src/state.c (state_mark_reachable_states): Fix for-loop.
7199 (state_remove_unreachable_states): Fix for-loop.
7200
7201 Don't widen struct state with member reachable just to temporarily
7202 record reachability. Instead, use a local bitset.
7203 * src/state.h (struct state): Remove member.
7204 * src/state.c (state_new): Don't initialize it.
7205 (state_mark_reachable_states): Rename to...
7206 (state_record_reachable_states): ... this, and use bitset.
7207 (state_remove_unreachable_states): Use bitset.
7208
5a43d418
JD
72092007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
7210
7211 * src/Makefile.am (yacc): Quote target action commands properly so
7212 that the yacc script isn't corrupt. Reported by Hans Aberg at
7213 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
7214
0c650a20
JD
7215 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
7216 the case of pure parsers. Reported by Frans Englich at
7217 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
7218 * THANKS: Add Frans Englich.
7219
61fee93e
JD
7220 * NEWS (2.3a+): In the %code entry, reference section `Bison
7221 Declaration Summary' from the manual now since the %code summary has
7222 moved there.
7223 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
7224 in the rules section must be terminated by semicolons.
7225
f124d423
JD
72262007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
7227
7228 Extend the front-end API for %define variables to more completely
7229 mirror the back-end. This will be useful in the future.
7230 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
7231 Update comments to mention the new front-end counterparts of these
7232 macros.
7233 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
7234 for muscle_string_decode and muscle_location_decode.
7235 (muscle_string_decode): New static function.
7236 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
7237 (muscle_percent_define_get, muscle_percent_define_ifdef): New
7238 functions.
7239 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
7240 muscle_percent_define_get to mimic the b4_percent_define_flag_if
7241 implementation more closely.
7242 (muscle_percent_define_invalid_value): New function.
7243 * src/muscle_tab.h (muscle_percent_define_get,
7244 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
7245 Prototype.
7246
75ad86ee
JD
72472007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
7248
7249 * NEWS (2.3a+): Mention yesterday's state-removal change.
7250 (2.3a): Remove the %language entry, which was added after 2.3a.
7251 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
7252 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
7253 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
7254 tests/existing.at: Update copyright date.
7255
5967f0cf
JD
72562007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7257
7258 If conflict resolution makes states unreachable, remove those states,
7259 report rules that are then unused, and don't report conflicts in those
7260 states.
7261 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
7262 New global function.
7263 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
7264 function.
7265 * src/main.c (main): After conflict resolution, remove the unreachable
7266 states and update all data structures that reference states by number.
7267 * src/state.c (state_new): Initialize each state's reachable member to
7268 false.
7269 (state_mark_reachable_states): New static function.
7270 (state_remove_unreachable_states): New global function.
7271 * src/state.h (struct state): Add member bool reachable.
7272 (state_remove_unreachable_states): Prototype.
7273 * tests/conflicts.at (Unreachable States After Conflict Resolution):
7274 New test case.
7275 * tests/existing.at (GNU pic Grammar): Update test case output now that
7276 an unused rule is discovered.
7277
b09f4f48
JD
72782007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7279
7280 Minor code cleanup in parser table construction.
7281 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
7282 (new_itemsets, save_reductions): Update for rename to nitemset.
7283 * src/closure.c (nritemset): Rename to...
7284 (nitemset): ... this since the "r" appears to meaningless and isn't
7285 used in the comments.
7286 (closure): Update for rename.
7287 * src/closure.h (nritemset): Update extern to...
7288 (nitemset): ... this.
7289 * src/lalr.c (LA): Fix a typo in comments.
7290 * src/print.c (print_core): Update for rename to nitemset.
7291 * src/print_graph.c (print_graph): Likewise.
7292 * src/state.h: Fix some typos in header comments.
7293
bbb44d83
PE
72942007-04-04 Paul Eggert <eggert@cs.ucla.edu>
7295
9b33de72
PE
7296 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
7297 still sticks to ASCII. Sorry!
7298
bbb44d83
PE
7299 * README-hacking: New file, taken mostly from coreutils, with changes
7300 for Bison. Contains much of the contents of:
7301 * README-cvs: Remove.
7302 * bootstrap: Sync from gnulib.
7303 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
7304 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
7305
29553547
JD
73062007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
7307
7308 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
7309 Setzer.
7310 (Java Differences): Fix some typos.
7311 * THANKS: Add Sebastian Setzer.
7312
01b477c6
PB
73132007-03-07 Paolo Bonzini <bonzini@gnu.org>
7314
730739e4
AD
7315 * data/java.m4 (b4_single_class_if): Remove.
7316 (b4_abstract_if): Look at "%define abstract".
7317 (b4_lexer_if): New.
7318 (b4_union_name): Rename...
7319 (b4_yystype): ... to this. Map to "%define stype".
7320 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
7321 b4_maybe_throws): Fix quoting.
7322 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
7323 * data/lalr1.java (Lexer interface): Always define.
7324 (Lexer interface within parser class): Remove.
7325 (YYLexer class): New, used when "%code lexer" is present.
7326 (constructor): When "%code lexer" is used, pass %lex-param
7327 to the lexer constructor.
7328 (yylex, yyparse): Remove %lex-param from method invocations
7329 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
7330
7331 * doc/bison.texinfo (Java Bison Interface): Mention "%define
7332 abstract". Rename "%define union_name" to "%define stype".
7333 Rename method names according to previous patch.
7334 (Java Scanner Interface): Describe "%code lexer" instead of
7335 "%pure-parser" and "%define single_class".
7336 (Java Differences): Mention "%code lexer".
7337
7338 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
7339 Include scanner here, using macros from tests/local.at.
7340 (AT_DATA_CALC_Y): Remove final argument.
7341 (_AT_CHECK_JAVA_CALC): Likewise.
7342 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
7343 of %locations and %error-verbose.
7344 (main): Test with and without %lex-param.
7345 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
7346 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 7347
122bea3a
JMG
73482007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7349
7350 DJGPP spefic issue. Inhibit the use of disallowed characters for
7351 file name genertion on Win98, WinXP, etc. These are |<>":?*\
7352 and concern testsuite case 46.
7353 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
7354 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
7355 * djgpp/config.bat: Inhibit the use of disallowed characters.
7356
9611cfa2
JD
73572007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7358
7359 Miscellaneous %define and %code cleanup.
7360 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
7361 values are interpreted.
7362 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
7363 documentation a little more.
7364 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
7365 muscle_percent_define_insert, muscle_percent_code_grow): New
7366 functions/macros.
7367 * src/muscle_tab.h (muscle_percent_define_insert,
7368 muscle_percent_code_grow): Prototype.
7369 * src/parse-gram.y (prologue_declaration): Use
7370 muscle_percent_define_insert and muscle_percent_code_grow when parsing
7371 %define and %code directives.
7372
7373 Make it easy to share %define boolean variables between the front-end
7374 and back-end. Though not used yet, this will be useful in the future.
7375 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
7376 Bison uses of names rather than just skeleton uses of names.
7377 (b4_percent_define_get, b4_percent_define_ifdef): Rename
7378 b4_percent_define_skeleton_variables(VARIABLE) to
7379 b4_percent_define_bison_variables(VARIABLE).
7380 (b4_percent_code_get, b4_percent_code_ifdef): Rename
7381 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
7382 b4_percent_code_bison_qualifiers(QUALIFIER).
7383 (b4_check_user_names_wrap): Update for renames.
7384 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
7385 muscle_percent_define_default): New functions mimicking
7386 b4_percent_define_flag_if and b4_percent_define_default.
7387
7388 For %define variables, report locations for invalid values and
bbb44d83 7389 redefinitions.
9611cfa2
JD
7390 * data/bison.m4 (b4_percent_define_flag_if): Read
7391 b4_percent_define_loc(VARIABLE) to report the location of an invalid
7392 value for VARIABLE.
7393 (b4_percent_define_default): Save a special location in
7394 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
7395 must later be reported as invalid.
7396 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
7397 functions.
7398 (muscle_percent_define_insert): Record the location of VARIABLE in
7399 muscle percent_define_loc(VARIABLE), and use it to report the previous
7400 location for a redefinition.
7401 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
7402 (muscle_percent_define_default): Update like b4_percent_define_default.
7403 (muscle_grow_user_name_list): Rename to...
7404 (muscle_user_name_list_grow): ... this for consistency and use
7405 muscle_location_grow.
7406 * src/muscle_tab.h (muscle_location_grow): Prototype.
7407 * tests/input.at (%define errors): Update expected output.
7408 * tests/skeletons.at (%define boolean variables: invalid skeleton
7409 defaults): New test case.
7410
0bf92491
JD
74112007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
7412
7413 * src/print.c (lookahead_set, state_default_rule): Remove.
7414 (print_reductions): Replace state_default_rule invocation with
7415 equivalent use of yydefact, which was computed in token_actions in
7416 tables.c.
7417 (print_results): Don't allocate lookahead_set.
7418
d3b12988
PB
74192007-02-27 Paolo Bonzini <bonzini@gnu.org>
7420
7421 * data/lalr1.java: Prefix all private members with yy.
7422
f57a7536
JD
74232007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7424
7425 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 7426 Sebastien Fricker at
f57a7536 7427 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 7428 * THANKS: Add Sebastien Fricker.
f57a7536
JD
7429 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7430 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7431 accept a variable number of arguments.
7432
6404a5bf
JD
74332007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7434
7435 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7436
e4e09639
JMG
74372007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7438
7439 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7440 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7441 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7442
d7e0a1a7
PE
74432007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7444
7445 Undo my 2007-02-07 change, switching back to the c-strcase module
7446 introduced in the 2007-02-03 change. Bruno Haible reported that
7447 the 2007-02-07 change would be dangerous in Turkish if we add a
7448 language whose name contains "i", since "i" is not lowercase "I"
7449 in Turkish.
7450 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7451 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7452 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7453 * m4/.cvsignore: Remove strcase.m4.
7454 * src/getargs.c: Revert 2007-02-07 change, as follows.
7455 Include c-strcase.h.
7456 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7457
deee93a1
JD
74582007-02-11 Bruno Haible <bruno@clisp.org>
7459
7460 Enable the Java related testsuite tests when the only Java compiler
7461 found is a gcj < 4.3. Discussed at
7462 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7463 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7464
574add85
JD
74652007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7466
7467 * data/Makefile.am: Update copyright date.
7468 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7469 yypstate_new returns NULL.
7470 (yypstate_new): Return NULL if malloc does.
7471 * src/reader.c (packgram): Move translation of rule actions from the
7472 beginning of packgram to...
7473 (check_and_convert_grammar): ... here right before packgram is invoked
7474 so it's easier to write more complete comments, and remove redundant
7475 code.
7476
e785ccf7
JD
74772007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7478
7479 As in semantic actions, make @$ in %initial-action, %destructor, and
7480 %printer imply %locations.
7481 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7482 scanning @$.
7483 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7484 (@$ in %initial-action implies %locations,
7485 @$ in %destructor implies %locations,
7486 @$ in %printer implies %locations): ... these new test cases.
7487
1cfe1ed7
PE
74882007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7489
7490 Undo most of the 2007-02-03 change, switching to the strcase module
7491 now that gnulib strcase has been fixed.
7492 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7493 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7494 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7495 * m4/.cvsignore: Add strcase.m4.
7496 * src/getargs.c: Revert 2007-02-03 change, as follows.
7497 Don't include c-strcase.h.
7498 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7499 strcasecmp has "unspecified behavior" outside the POSIX locale,
7500 but it works fine in practice if at least one argument is ASCII,
7501 as is the case in Bison.
7502
0049ec86
PB
75032007-02-07 Paolo Bonzini <bonzini@gnu.org>
7504
7505 * tests/java.at: Skip tests if only one of javac/java is present.
7506 Reported by Joel E. Denny.
7507 * tests/atlocal.in: Adjust copyright years.
7508
75092007-02-05 Paolo Bonzini <bonzini@gnu.org>
7510
7511 * data/lalr1.java (Stack): Work around old verifiers that disallow
7512 access to the private fields of an inner class, from the outer class.
7513 We can make Stack's fields public because user code doesn't have access
7514 to the instance of Stack used by parse(). Reported by Paul Eggert.
7515
2c2b7220
PE
75162007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7517
7518 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7519 the right spot for these files?
7520 * bootstrap.conf (gnulib_modules): Add c-strcase.
7521 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7522 c-strncasecmp.c.
7523 * src/getargs.c: Include c-strcase.h.
7524 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7525 to avoid unspecified behavior.
7526
b2b81dae
JD
75272007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7528
7529 * doc/bison.texinfo (Decl Summary): Correct typo.
7530
c1d19e10
PB
75312007-01-30 Paolo Bonzini <bonzini@gnu.org>
7532
7533 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7534 Complain if the value does not match empty, "true" or "false".
7535 * data/c++.m4: Adjust default definitions of %define variables.
7536 * data/java.m4: Adjust default definitions of %define variables.
7537 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7538 to above behavior.
7539 * tests/input.at (Boolean %define variables): Test new behavior.
7540
8405b70c
PB
75412007-01-29 Paolo Bonzini <bonzini@gnu.org>
7542
7543 * NEWS: Mention java.
7544 * TODO: Remove things that are done.
7545 * bootstrap.conf: Add javacomp-script and javaexec-script.
7546 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7547
7548 * data/Makefile.am: Add new files.
7549 * data/java-skel.m4: New.
7550 * data/java.m4: New.
7551 * data/lalr1.java: New.
7552
7553 * doc/bison.texinfo: Put "A Complete C++ Example" under
7554 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7555 under Other Languages.
7556
7557 * src/getargs.c (valid_languages): Add Java.
7558 * src/getargs.h (struct bison_language): Update size of string fields.
7559
7560 * tests/Makefile.am: Add java.at.
7561 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7562 * tests/java.at: New.
7563 * tests/testsuite.at: Include it.
7564
3eb82471
JD
75652007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7566
7567 Clean up.
7568 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7569 at_directive_argv arguments so these no longer have to be global
7570 variables. Also, update the implementation for the following changes.
7571 (fail_for_at_directive_too_many_args,
7572 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7573 (at_directive_name): Remove as at_directive_argv[0] will be used for
7574 this now.
7575 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7576 for the directive name.
7577 (at_directive_argc, at_directive_argv): Make these local within
7578 skel_lex instead of global.
7579 (INITIAL): Update directive start action for above changes.
7580 (SC_AT_DIRECTIVE_ARG): Rename to...
7581 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7582 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7583 (scan_skel): Move yylex_destroy to...
7584 (skel_scanner_free): ... here.
7585 * tests/skeletons.at (installed skeleton file name): Rename to...
7586 (installed skeleton file names): ... this.
7587
148d66d8
JD
75882007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7589
7590 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7591 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7592 Summary" not "Directives".
7593 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7594 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7595 since the former is now the more complete one.
7596 (Prologue Alternatives): Likewise and do the same for %defines.
7597 (Table of Symbols): Add summary of %code, add summary of %define, and
7598 move full %code documentation to...
7599 (Decl Summary): ... here for consistency with other entries in these
7600 sections.
7601 Move %define entry in order to keep this list alphabetized.
7602 Reword %define entry a little to put less emphasis on the skeleton
7603 concept, which most users shouldn't have to think about.
7604
665f0c24
PE
76052007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7606
7607 Adjust to recent gnulib changes.
7608 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7609 Add string.h, string_.h, unistd_.h, wchar_.h.
7610 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7611 * src/system.h: Don't include <stpcpy.h>; this is now done by
7612 <string.h>.
7613
592d0b1e
PB
76142007-01-23 Paolo Bonzini <bonzini@gnu.org>
7615
7616 Simplify implementation of unqualified %code, implement macros for
7617 uniform treatment of boolean %define flags. Document %define.
7618 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7619 b4_percent_code_ifdef): New.
7620 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7621 * data/c++.m4: Define default value for global_tokens_and_yystype.
7622 * data/glr.cc: Likewise.
7623 * data/location.cc: Use b4_percent_define_flag_if.
7624
148d66d8 7625 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
7626
7627 * src/parse-gram.y (Unqualified %code): Change muscle name to
7628 b4_percent_code().
7629 (content.opt): Default to empty.
7630
a7867f53
JD
76312007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7632
7633 Implement support for relative and absolute skeleton file names.
7634 Discussed starting at
7635 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7636 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7637 (Bison Options): Document in --skeleton entry.
7638 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7639 full_skeleton can't necessarily hold all of pkgdatadir.
7640 If the specified skeleton file name contains a `/', don't prepend
7641 pkgdatadir.
7642 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7643 file name contains a `/', prepend the grammar file directory.
7644 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7645 * skeletons.at: New file.
7646 (relative skeleton file names): New test case.
7647 (installed skeleton file names): New test case.
7648 * tests/testsuite.at: Include skeletons.at.
7649
7650 * bootstrap: Update copyright to 2007.
7651
830c9b18
PB
76522007-01-17 Paolo Bonzini <bonzini@gnu.org>
7653
7654 * bootstrap: Remove occurrences of .#bootmp from the files.
7655
a8c2e813
AD
76562007-01-17 Akim Demaille <akim@epita.fr>
7657
7658 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7659 nonterminals.
7660 Use per-type %printer.
7661
279cabb6
JD
76622007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7663
7664 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7665 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7666 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7667 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7668 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7669 tests/glr-regression.at, tests/input.at, tests/local.at,
7670 tests/output.at, tests/torture.at: Update copyright to 2007.
7671
bb32f4f2
AD
76722007-01-16 Akim Demaille <akim@epita.fr>
7673
7674 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7675 error code.
7676 (Calc++ Scanner): Exit with failure if we can't open the input
7677 file.
7678 Accept "-" standing for stdin.
7679 (Calc++ Top Level): Print the result only if the parsing was
7680 successful.
7681
7cff04b5
AD
76822007-01-16 Akim Demaille <akim@epita.fr>
7683
7684 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7685
a4e25e1d
JD
76862007-01-15 Paolo Bonzini <bonzini@gnu.org>
7687 and Joel E. Denny <jdenny@ces.clemson.edu>
7688
7689 Clean up %define and %code implementation in M4 some. Most
7690 importantly, rename all related macros to be in the b4_percent_define
7691 and b4_percent_code namespaces. Also, complete support for `.' in
7692 %define variable names and %code qualifiers.
7693 * data/bison.m4 (b4_check_user_names): Check for special
7694 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7695 m4_foreach loops.
7696 (b4_get_percent_define, b4_get_percent_code): Rename to...
7697 (b4_percent_define_get, b4_percent_code_get): ... these.
7698 Extend documentation with examples.
7699 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7700 b4_percent_define_skeleton_variables and
7701 b4_percent_code_skeleton_qualifiers.
7702 Expect any value for the %define variable `foo' to be stored in the
7703 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7704 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7705 expect any unqualified %code blocks to be stored in a macro named
7706 `b4_percent_code_unqualified'.
7707 Use m4_indir so that %define variable names and %code qualifiers can
7708 contain `.', which is allowed by the grammar parser.
7709 (b4_percent_define_default): New macro to set a default value for a
7710 %define variable.
7711 (m4_wrap): Update wrapped code, and fix some underquoting.
7712 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7713 Expect grammar uses of %define variables and %code qualifiers to be
7714 defined in b4_percent_define_user_variables and
7715 b4_percent_code_user_qualifiers.
7716 * data/c++.m4: Use b4_percent_define_default rather than
7717 m4_define_default. Fix some underquoting. Skeleton usage of %define
7718 variable define_location_comparison now implies skeleton usage of
7719 %define variable filename_type.
7720 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7721 data/push.c, data/yacc.c: Update macro names.
7722 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7723 muscle names.
7724
e37c665c
JMG
77252007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7726
7727 DJGPP specific issues.
7728
7729 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7730 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7731
7d2d521f
JD
77322007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7733
7734 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7735 run parsers in all tests so that Valgrind is invoked during
7736 maintainer-check-valgrind.
7737 (Duplicate representation of merged trees): Free all semantic values.
7738 (Duplicated user destructor for lookahead): Likewise.
7739
e0ac9b4b
JD
77402007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7741
7742 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7743 command-line prefix.
7744 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7745 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7746 miss Valgrind messages.
7747 (Exploding the Stack Size with Malloc): Likewise.
7748
78143faa
JD
77492007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7750
7751 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7752 locals. Reported by Juan Manuel Guerrero at
7753 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7754 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7755 Fix some indentation also.
7756 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7757 explaining this issue.
7758
7ecec4dd
JD
77592007-01-09 Paolo Bonzini <bonzini@gnu.org>
7760 and Joel E. Denny <jdenny@ces.clemson.edu>
7761
7762 Simplify union and prologue handling, and escape union and lex/parse
7763 params with digraphs.
7764 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7765 values to the empty string since these are no longer guaranteed
7766 initialized by the front-end.
7767 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7768 braces around b4_user_stype since this is no longer done by the
7769 front-end.
7770 * src/files.c, src/files.h (pre_prologue_obstack,
7771 post_prologue_obstack): Remove.
7772 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7773 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7774 with digraphs. This fixes lex params and parse params.
7775 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7776 * src/output.c (prepare): Remove muscle insertion of the prologues.
7777 (output): Remove freeing of pre_prologue_obstack and
7778 post_prologue_obstack.
7779 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7780 than prologue_augment for prologue parsing so you don't need prologue
7781 obstacks.
5c80250c
JD
7782 (grammar_declaration): For %union RHS, use `braceless' instead of
7783 "{...}" so that braces are already stripped and code is escaped with
7784 digraphs.
7ecec4dd
JD
7785 * src/reader.c (prologue_augment): Remove.
7786 (reader): Remove initialization of pre_prologue_obstack and
7787 post_prologue_obstack.
7788 * src/reader.h (prologue_augment): Remove.
7789
7790 * data/c.m4: Remove stray parenthesis.
7791
16dc6a9e
JD
77922007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7793
7794 Remove quotes from variables names in %define directives and from
7795 qualifiers in %code directives, and restrict the characters that are
7796 allowed in them to M4-friendly ones. For %define, continue to support
7797 the quoted form as a deprecated feature. Discussed starting at
7798 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7799 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7800 %code.
7801 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
7802 (Decl Summary): In %defines entry, update mention of `%code requires'
7803 and `%code provides'.
16dc6a9e
JD
7804 (C++ Location Values): Update %define uses.
7805 (Calc++ Parser Interface): Likewise.
7806 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 7807 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
7808 * src/parse-gram.y (prologue_declaration): For %define variables, use
7809 `variable' instead of `STRING'.
7810 (grammar_declaration): For %code qualifiers, use `ID' instead of
7811 `STRING'.
7812 (variable): New nonterminal that takes an `ID' or a `STRING'.
7813 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7814 and %define uses.
7815 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7816 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7817 (%define errors): Update %define uses.
7818
e9813cd4
JD
78192007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7820
7821 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7822 instead of muscle_insert for %define values so that M4-special
7823 characters are replaced with digraphs.
7824 * tests/input.at (%define errors): Extend to check weird values.
7825
6afc30cc
JD
78262007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7827
7828 Instead of having skeletons declare all valid %define variables and
7829 %code qualifiers, provide macros that retrieve the associated values
7830 and build these lists automatically. Thus Bison will now warn when a
7831 variable or qualifier is not used by the skeleton in the current
7832 invocation regardless of whether it might sometimes be used by that
7833 skeleton in other invocations. Also, move all %define value macros to
7834 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7835 form, which is replaced by %code.
7836 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7837 (b4_check_user_names): ... this, and change the series of valid name
7838 arguments to a single list argument for names used in the skeleton
7839 similar to the existing list argument for names used in the grammar.
7840 Warn instead of complaining.
7841 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7842 values and %code code, to format %code code properly, and to build
7843 lists of all %define variables and %code qualifiers used in the
7844 skeleton: b4_skeleton_percent_define_variables and
7845 b4_skeleton_percent_code_qualifiers.
7846 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7847 Remove, and...
7848 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7849 the skeleton names lists can finish building first. In place of
7850 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7851 expect the lists b4_user_percent_define_variables and
7852 b4_user_percent_code_qualifiers.
7853 * data/c++.m4: Where setting default values for b4_parser_class_name,
7854 b4_location_type, b4_filename_type, b4_namespace, and
7855 b4_define_location_comparison, update their names to the
7856 b4_percent_define_ namespace.
7857 * data/glr.c: Don't use b4_check_percent_define_variables and
7858 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7859 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7860 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 7861 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
7862 * data/location.cc: Use b4_get_percent_define.
7863 * data/push.c: Don't use b4_check_percent_define_variables and
7864 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7865 * data/yacc.c: Likewise, and don't call m4_exit in
7866 b4_use_push_for_pull_if or m4_wrap code will never execute.
7867 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7868 Rename to...
7869 (muscle_grow_user_name_list): ... this for consistency with the
7870 terminology used in bison.m4.
7871 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7872 %define variable names, and rename muscle used_percent_define_variables
7873 to user_percent_define_variables.
7874 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7875 user_percent_code_qualifiers.
7876 (content): Remove.
7877 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7878 {CODE} form is no longer accepted.
7879 * tests/input.at (Reject bad %code qualifiers): Rename to...
7880 (Reject unused %code qualifiers): ... this, and update test output.
7881 (%define error): Update test output.
7882
7eb8a0bc
JD
78832007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7884
7885 Check for unrecognized %define variables similar to checking for
7886 unrecognized %code qualifiers. Check for redefined %define variables.
7887 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7888 generalizes...
7889 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7890 (b4_check_percent_define_variables): New, also wraps it.
7891 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7892 variables using b4_check_percent_define_variables.
7893 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7894 all those exercised in the test suite and all those listed in the
7895 `Default values' section of c++.m4. Are there others?
7896 * data/push.c, data/yacc.c: Declare no valid %define variables.
7897 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7898 similar to muscle_find, but it works even when the muscle stores a
7899 const value.
7900 (muscle_grow_used_name_list): New function for constructing the used
7901 name list muscles that b4_check_for_unrecognized_names requires.
7902 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7903 %define'd more than once. Define the b4_used_percent_define_variables
7904 muscle with muscle_grow_used_name_list.
7905 (grammar_declaration): Abbreviate %code code with
7906 muscle_grow_used_name_list.
7907 * tests/input.at (%define errors): New.
7908
3fc65ead
JD
79092007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7910
7911 Provide warn_at, complain_at, and fatal_at function callbacks to the
7912 skeletons, and use this for %code qualifier complaints.
7913 * data/bison.m4 (b4_error_at): New, invoked by...
7914 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7915 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7916 @fatal_at(...@) directives.
7917 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7918 qualifiers in b4_used_percent_code_qualifiers and to use
7919 b4_complain_at.
7920 * src/location.c, src/location.h (boundary_set_from_string): New global
7921 function.
7922 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7923 function.
7924 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7925 to b4_used_percent_code_qualifiers.
7926 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7927 function.
7928 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7929 (lineno): Rename to...
7930 (out_lineno): ... this so I don't misunderstand it again.
7931 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7932 here; these newlines are in the input but not the output file.
7933 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7934 (at_directive_perform): ... this new static function, and add handling
7935 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7936 directives.
7937 * tests/input.at (Reject bad %code qualifiers): Update test output with
7938 locations and extend.
7939
7940 * tests/output.at (Output file name: [, Output file name: ]): Remove
7941 bogus comment about these tests failing.
7942
1c7b7e1d
JD
79432007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7944
7945 Clean up b4_check_percent_code_qualifiers a little.
7946 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7947 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7948 documentation and add examples.
7949 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7950 qualifiers here.
7951
08af01c2
JD
79522007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7953
7954 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7955 unreliable -- especially when they're hidden inside another macro.
7956 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7957 data/c.m4: Remove m4_divert(-1).
7958 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7959 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7960 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 7961 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
7962 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7963 pushed and popped by m4sugar, should be first on the stack.
7964
7965 Provide warn, complain, and fatal function callbacks to the skeletons.
7966 This provides more flexibility than m4_fatal, improves the error
7967 message format, and captures messages for translation. Discussed
7968 starting at
7969 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
7970 * data/bison.m4 (b4_error): New, invoked by...
7971 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
7972 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
7973 directives. Because these M4 macros might be called when the current
7974 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
7975 the previous removal of uses of m4_divert, which caused trouble.
7976 (b4_check_percent_code_qualifiers): Use b4_complain instead of
7977 m4_fatal to report unrecognized %code qualifiers.
7978 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
7979 push parser requests.
7980 * data/glr.c: Use b4_complain instead of m4_fatal to report
7981 non-deterministic push parser requests.
7982 Update @output usage to @output(...@) form.
7983 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
7984 report missing %defines. Update @output usage to @output(...@) form.
7985 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
7986 @output(...@) form.
7987 * src/main.c (main): Invoke skel_scanner_free.
7988 * src/scan-skel.h (skel_scanner_free): Prototype new function.
7989 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
7990 obstack_for_string from flex-scanner.h.
7991 (YY_DECL): Use to declare skel_lex static.
7992 (decode_at_digraphs): Remove; now handled in the new
7993 SC_AT_DIRECTIVE_ARG start condition.
7994 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
7995 functions.
7996 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
7997 at_directive_argv): New static globals.
7998 (INITIAL): Use fail_for_invalid_at.
7999 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
8000 recognize the start of a generalized `@directive(...@)' form and
8001 start...
8002 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
8003 directive args (using the new obstack_for_string), to decode the
8004 contained @ diagraphs, and to perform the directive. It recognizes
8005 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
8006 @output(...@).
8007 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
8008 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
8009 `@,'.
8010 (scan_skel): Initialize obstack_for_string on the first call.
8011 (skel_scanner_free): New function to free obstack_for_string.
8012 * tests/input.at (Reject bad %code qualifiers): Update test output.
8013
8e0a5e9e
JD
80142007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
8015
8016 Consolidate the 4 prologue alternative directives (%code, %requires,
8017 %provides, and %code-top) into a single %code directive with an
8018 optional qualifier field. Discussed at
8019 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
8020 * NEWS (2.3a+): Rewrite the existing entry for the prologue
8021 alternatives.
8022 * doc/bison.texinfo (Prologue Alternatives): Update.
8023 (Decl Summary): Update to %code "requires" and %code "provides".
8024 (Calc++ Parser): Update to %code "requires".
148d66d8 8025 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
8026 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
8027 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
8028 are replaced by b4_percent_code_provides and b4_percent_code_requires,
8029 which are skeleton-specific.
8030 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
8031 declare what %code qualifiers it supports and to complain if any other
8032 qualifiers were used in the grammar.
8033 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
8034 and b4_user_code([b4_percent_code_provides]) in place of
8035 b4_user_requires and b4_user_provides.
8036 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
8037 Add b4_user_code([b4_percent_code_top]) and
8038 b4_user_code([b4_percent_code]).
8039 Invoke b4_check_percent_code_qualifiers.
8040 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8041 PERCENT_REQUIRES): Remove.
8042 (grammar_declaration): Remove RHS's for %code-top, %provides, and
8043 %requires. Rewrite the %code RHS as the unqualified form defining the
8044 muscle b4_percent_code. Add another RHS for the qualified %code form,
8045 which defines muscles of the form b4_percent_code_QUALIFIER and the
8046 b4_used_percent_code_qualifiers muscle.
8047 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8048 PERCENT_REQUIRES): Remove.
8049 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
8050 %code "requires" and %code "provides".
8051 * tests/input.at (Reject bad %code qualifiers): New.
8052
95021767
JD
80532007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8054
8055 Use the new code_props interface for destructors and printers.
8056 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
8057 printer_location members, and change the type of the destructor and
8058 printer members to code_props.
8059 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
8060 symbol_printer_get, semantic_type_destructor_set,
8061 semantic_type_printer_set, default_tagged_destructor_set,
8062 default_tagless_destructor_set, default_tagged_printer_set,
8063 default_tagless_printer_set): Use code_props in arguments and return
8064 types in place of char const * and location.
8065 (symbol_destructor_location_get, symbol_printer_location_get): Remove
8066 since the locations are now contained in the return of
8067 symbol_destructor_get and symbol_printer_get.
8068 * src/output.c (symbol_destructors_output, symbol_printers_output):
8069 Replace with...
8070 (symbol_code_props_output): ... this to eliminate duplicate code.
8071 (output_skeleton): Update to use symbol_code_props_output.
8072 * src/reader.c (symbol_should_be_used): Update use of
8073 symbol_destructor_get.
8074 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8075 Update uses of the various _destructor_set and _printer_set functions.
8076 * src/symtab.c: (default_tagged_destructor_location,
8077 default_tagless_destructor_location, default_tagged_printer_location,
8078 default_tagless_printer_location): Remove since we...
8079 (default_tagged_destructor, default_tagless_destructor,
8080 default_tagged_printer, default_tagless_printer): ... change the type
8081 of these to code_props.
8082 (symbol_new, semantic_type_new, symbol_destructor_set,
8083 semantic_type_destructor_set, symbol_destructor_get,
8084 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
8085 symbol_check_alias_consistency, default_tagged_destructor_set,
8086 default_tagless_destructor_set, default_tagged_printer_set,
8087 default_tagless_printer_set): Update.
8088 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
8089 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
8090 code_props members.
8091 (symbol_print): Use SYMBOL_CODE_PRINT.
8092
f6857bbf
JD
80932007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8094
8095 Use the new code_props interface for rule actions.
8096 * src/symlist.h (symbol_list): Replace action, action_location, and
8097 used members with a code_props action_props member.
8098 * src/reader.c (symbol_should_be_used, grammar_rule_check,
8099 grammar_midrule_action, grammar_current_rule_merge_set,
8100 grammar_current_rule_symbol_append, packgram): Update.
8101 * src/scan-code.h (translate_rule_action): Remove, no longer used.
8102 * src/scan-code.l (handle_action_dollar): Update.
8103 (translate_rule_action): Remove, no longer used.
8104 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
8105
7c0c6181
JD
81062007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8107
8108 Use the new code_props interface in parse-gram.y.
8109 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
8110 Update all uses of translate_* functions to use the new code_props
8111 interface and to use gram_scanner_last_string_free and
8112 code_scanner_last_string_free where possible.
8113 (grammar_declaration): symbol_list_destructor_set and
8114 symbol_list_printer_set now perform the translation, so don't do it
8115 here. Use gram_scanner_last_string_free where possible.
8116 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
8117 translate_code): Remove, no longer used.
8118 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
8119 symbol_list_printer_set): Perform code translation here rather than
8120 depending on the caller to do so.
8121
8122 * src/symlist.h (struct symbol_list): Correct some documentation typos.
8123 * src/scan-gram.h (gram_last_string): Remove declaration.
8124 * src/scan-gram.l (last_string): Declare it static.
8125
28e52c0d
JD
81262007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8127
8128 Encapsulate code properties and related functionality for the various
8129 destructors, printers, and actions into a code_props structure and
8130 interface. This patch merely implements code_props in scan-code.h and
8131 scan-code.l. Future patches will rewrite other modules to use it.
8132 Discussed starting at
8133 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
8134 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
8135 consistently initialize const structs that have an empty location
8136 field.
8137 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
8138 to ensure consistency.
8139 * src/scan-code.h (code_props): New structure.
8140 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
8141 function, macro, and const global variable for initializing a
8142 code_props with no code.
8143 (code_props_plain_init, code_props_symbol_action_init,
8144 code_props_rule_action_init, code_props_translate_code): The rest of
8145 the new code_props functional interface. Among other things, the init
8146 functions set the code_props kind field so that
8147 code_props_translate_code will know whether to behave like
8148 translate_symbol_action, translate_rule_action, or translate_code.
8149 These old translate functions must remain until all other modules are
8150 updated to use the new code_props interface.
8151 (code_scanner_last_string_free): New function similar to
8152 gram_scanner_last_string_free.
8153 (code_scanner_free): Add documentation.
8154 * src/scan-code.l: Implement the new interface.
8155 (code_lex): Make it static, add a code_props* argument, and remove the
8156 rule argument.
8157 (last_string): New static global similar to the one in scan-gram.l.
8158 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
8159 instead of rule.
8160 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
8161 code_props since Bison may one day use this information for destructors
8162 and printers.
8163 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
8164 (handle_action_dollar): Use symbol_list_n_get and set used flag
8165 directly since symbol_list_n_used_set is removed.
8166 (translate_action): Add a code_props* argument and remove the rule,
8167 action, and location arguments. Pass the code_props* on to code_lex.
8168 (translate_rule_action, translate_symbol_action, translate_code):
8169 Rewrite as wrappers around the new code_props interface.
8170 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
8171 it would eventually need to break the encapsulation of code_props.
8172
96034983
JD
81732007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8174
8175 * etc/.cvsignore: New.
8176
945e396c
JD
81772007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8178
8179 Add maintainer-push-check to run maintainer-check using push parsing in
8180 place of pull parsing where available.
8181 * Makefile.am (maintainer-push-check): New.
8182 * data/bison.m4 (b4_use_push_for_pull_if): New.
8183 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
8184 appropriately based on their existing values.
8185 (yypush_parse): Don't print push-parser-specific diagnostics if push
8186 parsing is being used in place of pull parsing.
8187 * data/yacc.c: If push parsing should replace pull parsing, redirect to
8188 push.c.
8189 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
8190 variable, and insert b4_use_push_for_pull_flag into muscles.
8191 * tests/Makefile.am (maintainer-push-check): New.
8192
7d596384
JD
81932006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8194
8195 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
8196 (whether successful or failed) so that yypush_parse can be invoked
8197 again to start a new parse using the same yypstate.
8198 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
8199 check multiple yypull_parse invocations on the same yypstate. For pull
8200 mode, extend to check multiple yyparse invocations.
8201 (Exploding the Stack Size with Alloca): Extend to try with
8202 %push-pull-parser.
8203 (Exploding the Stack Size with Malloc): Likewise.
8204
8205 * tests/calc.at (Simple LALR Calculator): Don't specify
8206 %skeleton "push.c" since %push-pull-parser implies that now.
8207 * tests/headers.at (export YYLTYPE): Don't check for the push
8208 declarations. Otherwise, this test case can't be used to see if push
8209 mode can truly emulate pull mode.
8210 * tests/input.at (Torturing the Scanner): Likewise.
8211 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
8212 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
8213 AT_YACC_IF, which now includes the case of push mode since %skeleton
8214 need not be used for push mode. This will be more intuitive once
8215 push.c is renamed to yacc.c.
8216
7172e23e
JD
82172006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8218
8219 For push mode, convert yyparse from a macro to a function, invoke yylex
8220 instead of passing a yylexp argument to yypull_parse, and don't
8221 generate yypull_parse or yyparse unless %push-pull-parser is declared.
8222 Discussed starting at
8223 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
8224 * data/bison.m4 (b4_pull_if): New.
8225 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
8226 * data/push.c: Improve M4 quoting a little.
8227 (b4_generate_macro_args, b4_parenthesize): Remove.
8228 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
8229 any time a pull parser is requested.
8230 Don't #define this as a wrapper around yypull_parse. Instead, when
8231 both push and pull are requested, make it a function that does that
8232 same thing.
8233 (yypull_parse): If there's a b4_prefix, #define this to
8234 b4_prefix[pull_parse] when both push and pull are requested.
8235 Don't define this as a function unless both push and pull are
8236 requested.
8237 Remove the yylexp argument and hard-code yylex invocation instead.
8238 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
8239 %push-parser.
8240 * src/getargs.c (pull_parser): New global initialized to true.
8241 * getargs.h (pull_parser): extern it.
8242 * src/output.c (prepare): Insert pull_flag muscle.
8243 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
8244 (prologue_declaration): Set both push_parser and pull_parser = true for
8245 %push-pull-parser. Set push_parser = true and pull_parser = false for
8246 %push-parser.
8247 * src/scan-gram.l: Don't accept %push_parser as an alternative to
8248 %push-parser since there's no backward-compatibility concern here.
8249 Scan %push-pull-parser.
8250 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
8251 instead of %push-parser.
8252 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
8253 prototype it in the module that calls yyparse.
8254 * tests/input.at (Torturing the Scanner): Likewise.
8255 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
8256
2e7944cb
JD
82572006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
8258
8259 Update etc/bench.pl. Optimize push mode a little (the yyn change
8260 deserves most of the credit).
8261 * Makefile.am (SUBDIRS): Add etc subdirectory.
8262 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
8263 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
8264 yytoken, yyval, and yyloc declarations to...
8265 (yyparse or yypush_parse): ... here to improve performance. For
8266 yypush_parse invocations after the first, be sure to assign yyn its old
8267 value again.
8268 (yypstate_new): Don't bother initializing the yyresult field since the
8269 initial value isn't used.
8270 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
8271 remove the #define that, in push mode, set it to yyps->NAME.
8272 * etc/Makefile.am: New.
8273 * etc/bench.pl: Remove and build it instead from...
8274 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
8275 "tests/bison" from the build directory by default rather than just
8276 invoking "bison" from $PATH.
8277 (calc_grammar): Update push parser code: don't declare yylval globally,
8278 don't define yyparse_wrapper, and don't #define yyparse.
8279 (bench_grammar): Update to check all working combinations of yacc.c,
8280 push.c, impure, pure, pull, and push.
8281
c3d50342
JD
82822006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8283
8284 For push mode, add pull wrappers around yypush_parse.
8285 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
8286 (yypull_parse): New function wrapping yypush_parse.
8287 (yyparse): New #define wrapping yypull_parse.
8288 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
8289 is declared.
8290 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
8291 prototype yylex in the module that calls yyparse, and don't prototype
8292 yyparse there. Otherwise, the yyparse expansion won't compile.
8293 * tests/input.at (Torturing the Scanner): Likewise.
8294
94ebeba5
JD
82952006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8296
8297 Enable push parsers to operate in impure mode. Thus, %push-parser no
8298 longer implies %pure-parser. The point of this change is to move
8299 towards being able to test the push parser code by running the entire
8300 test suite as if %push-parser had been declared.
8301 * data/push.c (yypush_parse): For impure mode, remove the
8302 yypushed_char, yypushed_val, and yypushed_loc arguments.
8303 Instead, declare these as local variables initialized to the global
8304 yychar, yylval, and yylloc.
8305 For the first yypush_parse invocation only, restore the initial values
8306 of these global variables when it's time to read a token since they
8307 have been overwritten.
8308 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
8309 %push-parser.
8310 * tests/calc.at (Simple LALR(1) Calculator): Always declare
8311 %pure-parser along with %push-parser since this test case was designed
8312 for pure push parsers.
8313 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
8314 (AT_YACC_OR_PUSH_IF): New.
8315 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
8316 add a note that it's still wrong for some cases (as it has been for a
8317 while).
8318 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
8319 %push-parser no longer implies %pure-parser.
8320
a0633178
JD
83212006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8322
8323 Remove some unnecessary differences between the pull parser code and
8324 the push parser code. This patch enables yynerrs in push mode.
8325 * data/push.c: Reformat M4 a little.
8326 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
8327 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
8328 because push mode is on. Instead, if pure mode is on, move yynerrs
8329 to...
8330 (b4_declare_parser_state_variables): ... here.
8331 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
8332 to yyps->NAME so it can be used in yypush_parse.
8333 (yypush_parse): Don't omit uses of yynerrs in push mode.
8334
8646b6a3
JD
83352006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8336
8337 Fix bug such that the first pushed token's value and location are
8338 sometimes overwritten (sometimes by %initial-action) before being used.
8339 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
8340 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
8341 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
8342 more closely mimic the pull parser logic.
8343 Don't copy the pushed token to yychar, yylval, and yylloc until it's
8344 time to read a token, which is after any initialization of yylval and
8345 yylloc.
8346 (gottoken): Rename label to...
8347 (yyread_pushed_token): ... for clarity and to avoid infringing on the
8348 user namespace.
8349
9baf4d74
JD
83502006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8351
8352 Rearrange initialization of the parser state variables so that the
8353 skeleton doesn't have to have a copy for pull mode and another for push
8354 mode. This patch also fixes at least a bug such that yylloc was not
8355 initialized (with b4_location_initial_line and
8356 b4_location_initial_column) upon calling yypush_parse. However, that
8357 initialization now overwrites the first token's location;
8358 %initial-action assigning @$ already did the same thing, and both bugs
8359 will be fixed in a later patch.
8360 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
8361 (b4_declare_parser_state_variables): Remove initialization of yytoken,
8362 yyss, yyvs, yyls, and yystacksize.
8363 (yypstate_new): Remove initialization of some yypstate fields: yystate,
8364 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
8365 yylsp.
8366 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
8367 yyps->NAME so it can be used in yypush_parse.
8368 (yyparse or yypush_parse): For yypush_parse, don't print the
8369 "Starting parse" diagnostic for invocations after the first.
8370 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
8371 yypush_parse, only do it for the first invocation.
8372 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
8373 initialization to occur in yypush_parse but only on the first
8374 invocation.
8375
23522164
JD
83762006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8377
8378 * data/push.c: Add CPP guards around push parser declarations in both
8379 the header and the code file.
8380 In the code file, move the push parser declarations to the same place
8381 they appear in the header file.
8382 Clean up the M4 some, especially the inconsistent underquoting in
8383 some b4_c_function_def and b4_c_function_decl uses.
8384
bb010fe5
JD
83852006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8386
8387 Encapsulate the push parser state variables into an M4 macro so the
8388 push skeleton doesn't have to list them again for pull mode's yyparse.
8389 For push mode, remove yypush_parse's local equivalents of these
8390 variables to eliminate unnecessary copying between the two sets at
8391 run-time. This patch also fixes at least a bug related to multiple
8392 %initial-action invocations in push mode.
8393 * data/push.c (b4_declare_parser_variables): Rename to...
8394 (b4_declare_scanner_communication_variables): ... this for clarity and
8395 update both uses.
8396 (b4_declare_yyparse_variables): Remove and move its contents to the one
8397 spot where it was invoked.
8398 (b4_declare_parser_state_variables): New macro containing the parser
8399 state variables required by push mode.
8400 (struct yypstate): Replace all fields but yynew with
8401 b4_declare_parser_state_variables.
8402 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
8403 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
8404 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
8405 (yyparse or yypush_parse): For yyparse in pull mode, replace local
8406 parser state variable declarations with
8407 b4_declare_parser_state_variables.
8408 Don't initialize parser state variables when calling yypush_parse since
8409 yypstate_new already does that.
8410 Invoke the user's initial action only upon the first yypush_parse
8411 invocation.
8412 Remove all code that copies between the local parser state variables
8413 and the yypstate.
8414
2d212f8c
JD
84152006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8416
8417 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8418 prevent a name collision in a future patch where these names will
8419 sometimes be #define'd.
8420 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8421 since it no longer has the same name as the existing argument.
8422 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8423
e6e704dc
JD
84242006-12-19 Paolo Bonzini <bonzini@gnu.org>
8425 and Joel E. Denny <jdenny@ces.clemson.edu>
8426
8427 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8428 that the argument is case-insensitive, and there's no `=' here.
8429 For the %skeleton entry, mention that %language is better.
8430 (Bison Options): Likewise for --language and --skeleton. Move the
8431 --skeleton entry so that the `Tuning the parser' section is sorted
8432 alphabetically on long options.
8433 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8434 %language directive in detail here; cross-reference the %language
8435 documentation instead.
8436 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8437 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 8438 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
8439 * examples/extexi (normalize): Instead of replacing every %require
8440 argument with the current Bison version, just substitute for
8441 `@value{VERSION}'. This guarantees that we're testing what actually
8442 appears in the documentation.
8443 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8444 rather than `@VERSION@'.
8445
0e021770
PE
84462006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8447
fd575f05
PE
8448 * NEWS: Reword the %language news a bit, and put it earlier.
8449
0e021770
PE
8450 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8451 Rewrite to simplify the logic.
8452 (language_argmatch): Likewise.
fd575f05
PE
8453 (program_name): We now own this var.
8454 * src/getargs.h (struct bison_language): Use char[] rather than
8455 const char *.
0e021770
PE
8456
8457 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8458 Java is supported.
8459 * src/complain.c (program_name): Remove decl; no longer needed.
8460 * src/main.c (program_name): Remove; now belongs to getargs.
8461
84622006-12-18 Paolo Bonzini <bonzini@gnu.org>
8463
8464 * NEWS: Document %language.
8465
8466 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8467
8468 * data/c-skel.m4, data/c++-skel.m4: New files.
8469 * data/glr.c: Complain on push parsers.
8470
8471 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8472 over %skeleton.
148d66d8 8473 (Decl Summary): Document %language and %skeleton.
0e021770
PE
8474 (Command line): Document -L.
8475
8476 * examples/extexi: Rewrite %require directive.
8477 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8478
8479 * src/files.c (compute_exts_from_gc): Look in language structure
8480 for .y extension.
8481 (compute_file_name_parts): Check whether .tab should be added.
8482 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8483 (language, skeleton_arg, language_argmatch): New.
8484 (long_options): Add --language.
8485 (getargs): Use skeleton_arg, add -L/--language.
8486 * src/getargs.h: Include location.h.
8487 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8488 * src/output.c (prepare): Pick default skeleton from struct language.
8489 Don't dispatch C skeletons here.
8490 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8491 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8492 * src/scan-gram.l ("%language"): New rule.
8493
8494 * tests/calc.at: Test %skeleton and %language.
8495 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8496 (AT_GLR_IF): Look for %skeleton "glr.cc".
8497 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8498 (AT_YACC_IF): Reject %language.
8499
5691bf57
PE
85002006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8501
db06f0ce
PE
8502 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8503 since it wasn't used; only the typedef name 'semantic_type' is needed.
8504 Also, omit trailing white space.
8505
5691bf57
PE
8506 * bootstrap: Sync from coreutils.
8507 (gnulib_extra_files): Add build-aux/announce.gen.
8508 (slurp): Adjust .gitignore files like .cvsignore files.
8509 * build-aux/announce-gen: Remove from CVS, since bootstrap
8510 now creates this.
8511
791934e4
JD
85122006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8513
8514 Make %push-parser imply %pure-parser. This fixes several bugs; see
8515 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8516 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8517 pure_parser = true.
8518 * data/push.c: Don't bother testing b4_push_if when deciding whether
8519 to expand b4_declare_parser_variables globally.
8520 (yypush_parse): Likewise in here.
8521
8522 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8523 (yy_reduce_print): Reformat M4 for readability.
8524
ee5abb37
JD
85252006-12-15 Bob Rossi <bob@brasko.net>
8526 and Joel Denny <jdenny@ces.clemson.edu>
8527
8528 * data/push.c (yypstate): Add typedef, and update all uses of
8529 struct yypstate to just yypstate.
8530 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8531
16ca01f9
JD
85322006-12-14 Bob Rossi <bob@brasko.net>
8533
8534 * data/push.c (yypush_parse): Declare prototype regardless of
8535 %locations option.
8536
ab8e7e1a
JD
85372006-12-14 Bob Rossi <bob@brasko.net>
8538
8539 * data/push.c (yyparse): Remove the prototype and the #define when in
8540 push-parser mode.
8541
9bf32be3
JD
85422006-12-13 Bob Rossi <bob@brasko.net>
8543
8544 * data/push.c (yypstate_init): Rename to...
8545 (yypstate_new): ... this and use b4_c_function_def.
8546 (yypstate_delete): New.
8547 (yypush_parse): Change parameters yynval and yynlloc to be const.
8548 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8549 yypstate_delete functions.
8550
f02e2948
JD
85512006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8552
8553 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8554 strange test case titles. Reported by Bob Rossi.
8555
38eb7751
PE
85562006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8557
8558 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8559 of potential ambiguities in GLR grammers.
8560
bd9d212b
JD
85612006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8562
8563 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8564 `bison ', use m4_index instead of m4_substr since chopping up a string
8565 containing M4-special characters causes problems here.
8566
8567 Fix a couple of bugs related to special characters in user-specified
8568 file names, and make it easier for skeletons to compute output file
8569 names with the same file name prefix as Bison-computed output file
8570 names.
8571 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8572 b4_parser_file_name and b4_spec_defines_file instead of
8573 @output_parser_name@ and @output_header_name@, which are now redundant.
8574 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8575 b4_parser_file_name, b4_spec_defines_file, and the new
8576 @basename(FILENAME@) instead of @output_parser_name@ and
8577 @output_header_name@, which inappropriately escaped the file names as
8578 C string literals.
8579 * src/files.c (all_but_ext): Remove static qualifier.
8580 (compute_output_file_names): Move `free (all_but_ext)' to...
8581 (output_file_names_free): ... here since all_but_ext is needed later.
8582 * src/files.h (all_but_ext): Extern.
8583 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8584 exactly what MUSCLE_INSERT_STRING used to do.
8585 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8586 characters are escaped properly.
8587 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8588 all_but_ext.
8589 For pkgdatadir muscle, maintain previous functionality by using
8590 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8591 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8592 digraphs would never be expanded. Hopefully no one has M4-special
8593 characters in his Bison installation path.
8594 * src/scan-skel.l: Don't parse @output_header_name@ and
8595 @output_parser_name@ anymore since they're now redundant.
8596 In @output, use decode_at_digraphs.
8597 Parse a new @basename command that invokes last_component.
8598 (decode_at_digraphs): New.
8599 (BASE_QPUTS): Remove unused.
8600 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8601 (Output file name): New tests.
8602
3f7ca628
JD
86032006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8604
8605 Warn about output files that are generated by the skeletons and that
8606 conflict with other output files.
8607 * data/glr.c: Don't generate the header file here when glr.cc does.
8608 * src/files.c (file_names, file_names_count): New static globals.
8609 (compute_output_file_names): Invoke output_file_name_check for files
8610 not generated by the skeletons and remove existing checks.
8611 (output_file_name_check): New function that warns about conflicting
8612 output file names.
8613 (output_file_names_free): Free file_names.
8614 * src/files.h (output_file_name_check): Declare.
8615 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8616 the skeletons.
8617 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8618 (Conflicting output files): New tests.
8619
178e123e
PE
86202006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8621
8622 * doc/bison.texinfo: Fix a couple of typos.
8623
86242006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
8625
8626 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8627 Rename to...
8628 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8629 update all uses.
8630 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8631 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8632 local pv.
8633 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8634 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8635
ea17f233
JD
86362006-12-07 Bob Rossi <bob@brasko.net>
8637 and Joel Denny <jdenny@ces.clemson.edu>
8638
8639 * data/push.c (yypvarsinit): Change return type from void* to struct
8640 yypvars*. No longer cast to void* on return.
8641 (struct yypvars): Remove yylen since it need not be remembered between
8642 yypushparse invocations.
8643 (yypushparse): Don't copy between yylen and pv->yylen.
8644
55a30bda
JD
86452006-12-05 Bob Rossi <bob@brasko.net>
8646
8647 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8648 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8649 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8650 (struct yypvars): Remove b4_declare_parser_variables.
8651 (yypvarsinit): Remove init code for removed variables.
8652 (global scope): Do not declare b4_declare_parser_variables if
8653 push or pure mode.
8654 (yypushparse): Add b4_declare_parser_variables.
8655 Init new local variables, and remove init code for removed
8656 yypvars variables.
8657 (yyparse): Delete.
8658 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8659 and yyparse for other modes.
8660 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8661 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8662 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8663 (AT_PURE_LEX_IF): True if pure or push parser.
8664
85894313
JD
86652006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8666
8667 Document Yacc prologue alternatives and default %destructor's and
8668 %printer's as experimental. Don't mention Java yet. Discussed at
8669 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8670 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8671 (2.3a): Annotate this entry to say the old forms of these features were
8672 also experimental.
8673 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 8674 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
8675 of Java (we'll want this back eventually).
8676
02975b9a
JD
86772006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8678
8679 Support a file name argument to %defines. Deprecate `=' in
8680 %file-prefix, %name-prefix, and %output. Discussed at
8681 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8682 * NEWS (2.3a+): Mention.
148d66d8 8683 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
8684 form of %defines, and remove `=' from entries for %file-prefix,
8685 %name-prefix, and %output.
8686 * src/parse-gram.y (prologue_declaration): Implement.
8687 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8688 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8689 all but one occurrence of %name-prefix.
8690 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8691 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8692 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8693 occurrence of each of %file-prefix and %output. Add check for %defines
8694 with argument.
8695 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8696 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8697 Remove the `=' from %output.
8698
287b314e
JD
86992006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8700
8701 Don't escape $ in test case titles since Autoconf 2.61 now does that
8702 correctly.
8703 * tests/actions.at (Default %printer and %destructor are not for error
8704 or $undefined): Here.
8705 (Default %printer and %destructor are not for $accept): Here.
8706 * tests/input.at (Invalid $n and @n): Here.
8707
3ebecc24
JD
87082006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8709
8710 Rename <!> to <>. Discussed starting at
8711 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8712 * NEWS (2.3a+): Update.
148d66d8 8713 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
8714 Update.
8715 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8716 * src/scan-gram.l (INITIAL): Implement.
8717 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8718 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8719 comment.
8720 * tests/actions.at (Default tagless %printer and %destructor,
8721 Default tagged and per-type %printer and %destructor,
8722 Default %printer and %destructor are not for error or $undefined,
8723 Default %printer and %destructor are not for $accept,
8724 Default %printer and %destructor for mid-rule values): Update.
8725 * tests/input.at (Default %printer and %destructor redeclared,
8726 Unused values with default %destructor): Update.
8727
26b8a438
JD
87282006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8729
8730 Don't let %prec take a nonterminal.
8731 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8732 token.
8733 * tests/input.at (%prec takes a token): New test checking that %prec
8734 won't take a nonterminal.
8735
07c39ae9
JD
87362006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8737
405d53b7
JD
8738 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8739 it was double-quoted.
07c39ae9
JD
8740 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8741 grammar is maintained with Bison's highest standards.
8742 * src/getargs.c: Fix some typos in Doxygen comments.
8743
580b8926
JD
87442006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8745
8746 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8747 later. Reported by Paul Eggert in
8748 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8749 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8750 * src/scan-code.l (translate_action): Don't bother invoking
8751 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8752 (code_scanner_free): Instead of invoking
8753 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8754 which frees more.
8755 * src/scan-gram.l (gram_scanner_free): Likewise.
8756 * src/scan-skel.l (scan_skel): Likewise.
8757
4502eadc
JD
87582006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8759
8760 * src/files.c (tr): Change return type to void.
8761 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8762 has been called previously for the same key.
8763 (muscle_find): Return storage instead of value so that
8764 --enable-gcc-warnings doesn't produce warnings that the return discards
8765 const. aver that the value and storage are the same since storage
8766 could potentially be NULL when value is not.
8767 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8768 same as 0.
8769
7746c8f6
PE
87702006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8771
8772 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8773 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8774 us a slightly cleaner distribution, and also works.
8775 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8776 gnulib changes.
8777
eb095650
PE
87782006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8779 and Paul Eggert <eggert@cs.ucla.edu>
8780
8781 Don't let Bison leak memory except when it complains.
8782 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8783 (spec_defines_file, dir_prefix): Now char *, not const char *,
8784 since they are freed.
8785 * src/files.c: Likewise.
8786 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8787 Likewise.
8788 (tr): Now operates in-place. All uses changed.
8789 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8790 values.
8791 (compute_file_name_parts, compute_output_file_names): Don't store
8792 read-only data in variables that will be freed.
8793 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8794 src_extension, and header_extension.
8795 (output_file_names_free): New public function to free
8796 spec_verbose_file, spec_graph_file, spec_defines_file,
8797 parser_file_name, and dir_prefix.
8798 * src/getargs.c (getargs): Don't store read-only data in variables that
8799 will be freed.
8800 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8801 (which previously existed but was unused), and quotearg_free.
8802 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8803 * src/muscle_tab.c: Likewise.
8804 (muscle_entry): Make the value char const *,
8805 and add a new storage member that is char * and can be freed.
8806 (muscle_entry_free): New private function.
8807 (muscle_init): Use it instead of free.
8808 (muscle_insert, muscle_grow): Update and use new storage member.
8809 (muscle_code_grow): Free the string passed to muscle_grow
8810 since it's not needed anymore.
8811 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8812 add a new `char *code' member.
8813 ("{...}"): Declare semantic type as code.
8814 * src/scan-code.h (translate_rule_action):
8815 (translate_symbol_action, translate_code, translate_action): Return
8816 `char const *' rather than `char *' since external code should not free
8817 these strings.
8818 * src/scan-code.l: Likewise.
8819 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8820 which is "{...}" in the parser.
8821 * tests/Makefile.am (maintainer-check-valgrind): Set
8822 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8823 Valgrind.
8824 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8825 complain.
8826 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8827 expecting a non-zero exit status sets --leak-check=summary and
8828 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8829 this case, and we don't want to hear about it.
8830
ac564be4
PE
88312006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8832
8833 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8834 instead of from the template, to simplify configuration a bit.
8835 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8836 and m4/wint_t.m4, as they are needed with the latest gnulib.
8837
17bd8a73
JD
88382006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8839
8840 Disable unset/unused mid-rule value warnings by default, and recognize
8841 --warnings=midrule-values to enable them. Discussed starting at
8842 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8843 * NEWS (2.3a+): Mention.
8844 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8845 warnings): Add entry for midrule-values subargument.
8846 * src/reader.c (symbol_should_be_used): Don't return true just because
8847 the value is a set/used mid-rule value unless
8848 --warnings=midrule-values was specified.
8849 * tests/input.at (Unused values, Unused values before symbol
8850 declarations): Run tests with and without --warnings=midrule-values.
8851
8852 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8853 than LIST_FREE directly.
8854
89eb3c76
JD
88552006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8856
8857 Finish implementing --warnings=error, which should not be implied by
8858 --warnings=all (or by its synonyms -W and --warnings without
8859 subarguments).
8860 * src/complain.c (set_warning_issued): New function to report that
8861 warnings are being treated as errors and to record an error if so.
8862 Invoke...
8863 (warn_at, warn): ... here.
8864 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8865 "error - warnings are errors" does not appear above "all - all of the
8866 above".
8867 (getargs): For -W and --warnings without subarguments, don't let
8868 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8869 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8870
ba7560e2
JD
88712006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8872
8873 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8874 empty subargument list. For example: `bison --warnings= parser.y'.
8875
31283fc3
JD
88762006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8877
8878 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8879 the parser header file so that gcc doesn't warn.
8880
12e35840
JD
88812006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8882
8883 Split the default %destructor/%printer into two kinds: <*> and <!>.
8884 Discussed starting at
8885 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8886 * NEWS (2.3a+): Mention.
8887 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8888 previous change today related to mid-rules.
148d66d8 8889 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 8890 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
8891 (TYPE_TAG_ANY): Add as <*>.
8892 (TYPE_TAG_NONE): Add as <!>.
8893 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8894 for <*> and <!>.
8895 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8896 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8897 * src/symlist.c (symbol_list_default_new): Split into tagged and
8898 tagless versions.
8899 (symbol_list_destructor_set, symbol_list_printer_set): Split
8900 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8901 SYMLIST_DEFAULT_TAGLESS.
8902 * src/symlist.h: Update symbol_list_default*_new prototypes.
8903 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8904 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8905 * src/symtab.c (default_destructor, default_destructor_location,
8906 default_printer, default_printer_location): Split each into tagged and
8907 tagless versions.
8908 (symbol_destructor_get, symbol_destructor_location_get,
8909 symbol_printer_get, symbol_printer_location_get): Implement tagged
8910 default and tagless default cases.
8911 (default_destructor_set, default_printer_set): Split each into tagged
8912 and tagless versions.
8913 * src/symtab.h: Update prototypes.
8914 * tests/actions.at (Default %printer and %destructor): Rename to...
8915 (Default tagless %printer and %destructor): ... this, and extend.
8916 (Per-type %printer and %destructor): Rename to...
8917 (Default tagged and per-type %printer and %destructor): ... this, and
8918 extend.
8919 (Default %printer and %destructor for user-defined end token): Extend.
8920 (Default %printer and %destructor are not for error or $undefined):
8921 Update.
8922 (Default %printer and %destructor are not for $accept): Update.
8923 (Default %printer and %destructor for mid-rule values): Extend.
8924 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8925 (Unused values with default %destructor): Extend.
8926
f91b1629
JD
89272006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8928
8929 Don't apply the default %destructor/%printer to an unreferenced midrule
8930 value. Mentioned at
8931 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8932 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8933 like $@n instead of just @n so that the default %destructor/%printer
8934 logic doesn't see them as user-defined symbols.
8935 (symbol_is_dummy): Check for both forms of the name.
8936 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8937 name for which the midrule value is referenced in any action.
8938 * tests/actions.at (Default %printer and %destructor for mid-rule
8939 values): New test.
8940 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8941 for change to dummy symbol names.
8942
519d0004
JD
89432006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8944
8945 Warn about unset midrule $$ if the corresponding $n is used.
8946 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8947 $n usage.
8948 (packgram): Before invoking grammar_rule_check on any rule, make sure
8949 all actions have already been scanned in order to set `used' flags.
8950 Otherwise, checking that a midrule's $$ is set will not always work
8951 properly because the midrule check must forward-reference the midrule's
8952 parent rule.
8953 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8954 warning.
8955
a501eca9
JD
89562006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8957
8958 More improvements to the documentation of the prologue alternatives:
8959 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8960 Bison manual.
8961 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8962 some text to clarify the relative importance of the new directives and
8963 to show how these directives may be viewed as code labels.
8964
2cbe6b7f
JD
89652006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8966
8967 Similar to the recently removed %before-header, add %code-top as the
8968 alternative to the pre-prologue. Mentioned at
8969 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
8970 Also, let the prologue alternatives appear in the grammar section.
8971 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
8972 (prologue_declaration): Move the existing prologue alternatives to...
8973 (grammar_declaration): ... here and add %code-top.
8974 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
8975
8976 Clean up and extend documentation for the prologue alternatives.
8977 * NEWS (2.3a+): Describe prologue alternatives.
8978 * doc/bison.texinfo (Prologue): Move discussion of prologue
8979 alternatives to...
8980 (Prologue Alternatives): ... this new section, and extend it to discuss
8981 all 4 directives in detail.
148d66d8
JD
8982 (Table of Symbols): Clean up discussion of prologue alternatives and
8983 add %code-top.
2cbe6b7f 8984
e557d3ea
JMG
89852006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8986
8987 DJGPP specific issues.
8988
8989 * djgpp/config.bat: config.hin has been moved to lib. Adjust
8990 config.bat accordingly.
8991 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
8992 * djgpp/config.site: Likewise.
8993
136a0f76
PB
89942006-10-16 Paolo Bonzini <bonzini@gnu.org>
8995
27bd5d67
PB
8996 Replace %*-header with %provides, %requires, %code. See discussion at
8997 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
8998
136a0f76
PB
8999 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
9000 (b4_user_start_header): Remove.
9001 * data/glr.c: Use new macros instead of b4_*start_header
9002 and b4_*end_header.
9003 * data/glr.cc: Likewise.
9004 * data/lalr1.cc: Likewise.
9005 * data/push.c: Likewise.
9006 * data/yacc.c: Likewise.
9007
9008 * doc/bison.texinfo: Remove %before-header, rename
9009 %{start,end,after}-header to %requires, %provides, %code.
9010
9011 * src/parse-gram.y: Likewise (also rename token names accordingly).
9012 * src/scan-gram.l: Likewise.
9013 * tests/actions.at: Likewise.
9014
10f429ef
PE
90152006-10-14 Paul Eggert <eggert@cs.ucla.edu>
9016
9017 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
9018 Problem reported by Joel E. Denny.
9019
90202006-10-14 Jim Meyering <jim@meyering.net>
9021
9022 (Sync from coreutils.)
9023 Work also when the working directory (with e.g. coreutils sources)
9024 is version controlled with git, rather than CVS.
9025 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
9026 rather than CVS.
9027 In messages and comments, say e.g., "checked-out sources",
9028 rather than "CVS sources".
9029 (version_controlled_file): New function. Work for git as well as
9030 for CVS. Don't use grep's -q option.
9031 (slurp): Call it here, in place of CVS-specific code.
9032
c4bd5bf7
JD
90332006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
9034
9035 Fix testsuite for ./configure --enable-gcc-warnings:
9036 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
9037 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
9038 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
9039 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
9040 * test/regression.at (Diagnostic that expects two alternatives):
9041 Likewise.
9042
46356ea4
PE
90432006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9044
231ed89a
PE
9045 * bootstrap.conf (gnulib_modules): Add config-h.
9046 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
9047 worry about HAVE_CONFIG_H.
9048 * lib/abitset.c: Likewise.
9049 * lib/bitset.c: Likewise.
9050 * lib/bitset_stats.c: Likewise.
9051 * lib/bitsetv-print.c: Likewise.
9052 * lib/bitsetv.c: Likewise.
9053 * lib/ebitset.c: Likewise.
9054 * lib/get-errno.c: Likewise.
9055 * lib/lbitset.c: Likewise.
9056 * lib/subpipe.c: Likewise.
9057 * lib/timevar.c: Likewise.
9058 * lib/vbitset.c: Likewise.
9059 * lib/bitset.c: Include "bitset.h" first, to test interface.
9060 * lib/bitset_stats.c: Include "bitset_stats.h" first.
9061 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
9062 * lib/bitsetv.c: Include "bitsetv.h" first.
9063 * lib/get-errno.c: Include "get-errno.h" first.
9064 * m4/.cvsignore: Add config-h.m4.
9065 * tests/actions.at (Default %printer and %destructor for ...):
9066 Adjust expected line numbers in output to reflect removal of #if
9067 HAVE_CONFIG_H lines.
9068 * tests/glr-regression.at (Missed %merge type warnings when ...):
9069 Likewise.
9070 * tests/regression.at (Braced code in declaration in rules section):
9071 Likewise.
9072 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
9073 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
9074 Include <config.h> unconditionally.
9075
46356ea4
PE
9076 * bootstrap: Sync from coreutils, as follows:
9077
9078 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9079
9080 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
9081 variable was sometimes used without being initialized. This
9082 messed up the installation of the INSTALL file in some cases.
9083
9084 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9085
9086 * bootstrap (usage, main program, symlink_to_gnulib): Add option
9087 --copy. Inspired by a suggestion from Bruno Haible.
9088
9089 2006-10-03 Jim Meyering <jim@meyering.net>
9090
9091 * bootstrap: Undo last change to this file, since now gnulib-tool
9092 sticks with the automake default in generating dependencies.
9093
dd4bf078
PE
90942006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9095
cf2a5f7c
PE
9096 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
9097 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
9098
9099 * doc/bison.1: Add copyright notice.
9100
9101 * data/glr.c: Don't include <stdarg.h>; not used.
9102
35fe0834
PE
9103 * NEWS: The -g and --graph options now output graphs in Graphviz
9104 DOT format, not VCG format.
9105 * doc/bison.1: Likewise.
9106 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
9107 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
9108 of this change in
9109 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
9110 * TODO: Remove Graphviz entry.
9111 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
9112 remove vcg.c, vcg.h, vcg_defaults.h.
9113 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
9114 * src/graphviz.c, src/graphviz.h: New files.
9115 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
9116 * src/files.h: Make comment more generic.
9117 * src/main.c (main): Likewise.
9118 * src/print_graph.h: Likewise.
9119 * src/getargs.c (usage): Make usage description more generic.
9120 * src/print_graph.c: Include graphviz.h rather than vcg.h.
9121 (static_graph, fgraph): Remove. All uses changed to pass
9122 arguments instead of sharing a static var.
9123 (print_core, print_actions, print_state, print_graph):
9124 Output graphviz format rather than VCG format.
9125 * tests/.cvsignore: Remove *.vcg; add *.dot.
9126 * tests/output.at: Expect *.dot files, not *.vcg files.
9127
dd4bf078
PE
9128 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
9129 accommodates the 2006-10-08 change.
9130
efdd7421
PE
91312006-10-11 Bob Rossi <bob@brasko.net>
9132
9133 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
9134 (b4_yyssa, b4_yyerror_range): New macros.
9135 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
9136 (yypvarsinit): Remove init of removed fields.
9137 (yypushparse): Remove use of removed fields; use new macros instead.
9138
96a1981a
PE
91392006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9140
9141 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
9142 in a push parser. Reindent slightly to match yacc.c better.
9143
91442006-10-11 Bob Rossi <bob@brasko.net>
9145
46356ea4
PE
9146 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
9147 yymsg_alloc fields.
9148 (yypvarsinit, yypushparse): Remove init of removed fields.
9149 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 9150
c1630a8b
PE
91512006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9152
9153 * THANKS: Add Paolo Bonzini and Bob Rossi.
9154
90b9908d
PB
91552006-10-08 Paolo Bonzini <bonzini@gnu.org>
9156
9157 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
9158 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
9159 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
9160 b4_define_user_cde and uses): Remove.
9161 (b4_comment, b4_prefix, b4_sync_start): New.
9162 * data/bison.m4: New file, with most of the content removed from c.m4.
9163 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
9164 * src/output.c (output_skeleton): Pass bison.m4.
9165 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
9166 only if specified.
9167
cf806753
PE
91682006-10-05 Paul Eggert <eggert@cs.ucla.edu>
9169
9170 Fix test failure reported by Tom Lane in
9171 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
9172 and try to make such failures easier to catch in the future.
9173 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
9174 that's now the caller's responsibility.
9175 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
9176 Set yychar = YYEOF if it's negative.
9177 * tests/actions.at (yylex): Abort if asked to read past EOF.
9178 * tests/conflicts.at (yylex): Likewise.
9179 * tests/cxx-type.at (yylex): Likewise.
9180 * tests/glr-regression.at (yylex): Likewise.
9181 * tests/input.at (yylex): Likewise.
9182 * tests/regression.at (yylex): Likewise.
9183 * tests/torture.at (yylex): Likewise.
9184
0e2f006a
PE
91852006-10-01 Paul Eggert <eggert@cs.ucla.edu>
9186
9187 Fix problems with translating English-language diagnostics.
9188 * bootstrap: Fix bug introduced in recent bootstrap changes, with
9189 respect to bison-runtime pot generation. The YY_ stuff
9190 wasn't being captured.
9191 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
9192 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
9193 * runtime-po/POTFILES.in: Add data/push.c.
9194
e3ddc1e3
PE
91952006-09-29 Paul Eggert <eggert@cs.ucla.edu>
9196
9197 Merge bootstrap changes from coreutils.
9198
9199 2006-09-28 Jim Meyering <jim@meyering.net>
9200
9201 Automatically generated dependencies are important even
9202 when all of the sources in a directory come from gnulib.
9203 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
9204 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
9205
9206 2006-09-23 Jim Meyering <jim@meyering.net>
9207
9208 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
9209
9210 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9211
9212 * bootstrap: Add support for --force.
9213 (usage): New function. Describe usage less tersely.
9214 (CVS_only_file): New var.
9215
01e972b3
PE
92162006-09-21 Paul Eggert <eggert@cs.ucla.edu>
9217
9218 * data/push.c (YYPUSH_MORE): Make it an enum instead.
9219 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
9220 Adjust white space and comments to match GNU style better.
9221
c63d3e90
PE
92222006-09-20 Bob Rossi <bob@brasko.net>
9223
9224 * data/push.c (yyresult_get): Remove function.
9225 (YYPUSH_MORE): Add #define.
9226 (yypushparse): Modify return value.
9227
e70f46d1
PE
92282006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9229
9230 * stamp-h.in: Remove; no longer needed.
9231 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
9232 Remove config.h, config.hin, intl (no longer created).
9233 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
9234 stamp-h1.
9235
9236 Sync bootstrap from coreutils, as follows:
9237
9238 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
9239
9240 * bootstrap (symlink_to_gnulib): New function.
9241 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
9242 to copies-of-gnulib.
9243 (cp_mark_as_generated, slurp, gnulib_files):
9244 Avoid making a copy if it's the same as the old version.
9245 (gnulib_files): Add support for this variable (used by Bison).
9246
a92be413
PE
92472006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9248
9249 * src/getargs.c (usage): Rework to use conventions similar to
9250 coreutils, to make translation a bit easier and the code a bit
9251 smaller. Problem reported by Tim Van Holder.
9252
4f82b42a
PE
92532006-09-15 Paul Eggert <eggert@cs.ucla.edu>
9254
3b2942e6
PE
9255 Use some of gnulib's new modules, taken from coreutils.
9256
9257 * bootstrap: Sync from coreutils, except add support for gnulib_files.
9258 * bootstrap.conf: New file.
9259 (gnulib_modules): Add configmake, inttypes, unistd.
9260 (XGETTEXT_OPTIONS): Add complain, complain_at,
9261 fatal, fatal_at, warn, warn_at, unexpected_end.
9262 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
9263 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
9264 (gl_EARLY): Add.
9265 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
9266 (gl_INIT): Add
9267 (GNULIB_AUTOCONF_SNIPPET): Remove.
9268 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
9269 the pickiest.
9270 * lib/.cvsignore: Add inttypes_.h.
9271 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
9272 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
9273 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
9274 no-longer-necessary initializations.
9275 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
9276 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
9277 use the unistd module.
9278 * src/system.h: Likewise.
9279 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
9280 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
9281 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
9282 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
9283 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
9284 * src/system.h: Include inttypes.h unconditionally, now that we
9285 use the inttypes module. Don't bother to include stdint.h, since
9286 inttypes.h now does that for us.
9287 (LOCALEDIR): Remove, now that we use the configmake module.
9288 * src/getargs.c: Include configmake.h.
9289 * src/main.c: Likewise.
9290 * src/output.c: Likewise.
9291 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
9292 not from $abs_top_builddir, since config.h moved.
9293
9294
4f82b42a
PE
9295 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
9296 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
9297
9298 * src/parse-gram.y (symbol_declaration): Don't put statements
9299 before declarations; it's not portable to C89.
9300 * src/scan-code.l (handle_action_at): Likewise.
9301
9302 * src/scan-code.l: Always initialize braces_level; the old code
9303 left it uninitialized and therefore had undefined behavior.
9304
9305 Don't attempt to redefine 'assert', since it runs afoul of
9306 systems where standard headers (mistakenly) include <assert.h>.
9307 Instead, define and use our own alternative, called 'aver'.
9308 * src/reader.c: Don't include assert.h, since we no longer
9309 use assert.
9310 * src/scan-code.l: Likewise.
9311 * src/system.h (assert): Remove, replacing with....
9312 (aver): New function, taking a bool arg. All uses changed.
9313 * src/tables.c (pack_vector): Ensure that aver arg is bool,
9314 not merely an integer.
9315
31c10e38
PE
93162006-09-15 Bob Rossi <bob@brasko.net>
9317
d6bdb90a
JD
9318 Add support for push parsing. Based on the original work of
9319 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
9320 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
9321 * data/c.m4 (YYPUSH): New.
9322 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
d6bdb90a 9323 * data/push.c: New file.
31c10e38
PE
9324 * src/getargs.c (push_parser): New var.
9325 * src/getargs.h (push_parser): New declaration.
9326 * src/output.c (prepare): Add macro insertion of `push_flag'.
9327 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
9328 (prologue_declaration): Parse %push-parser.
9329 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
9330 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
9331 list of removed lines from the traces observed.
9332 (AT_CHECK_CALC_LALR): Added push parser tests.
9333
fa7b79c0
PE
93342006-09-13 Paul Eggert <eggert@cs.ucla.edu>
9335
21fe08ca
PE
9336 * NEWS: Version 2.3a.
9337 * configure.ac (AC_INIT): Likewise.
9338
e8ec4d9b
PE
9339 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
9340 "#define YYSTYPE int" that caused "make maintainer-check" to fail
9341 due to header ordering dependencies. I don't know why the #define
9342 was there.
9343
fa7b79c0
PE
9344 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
9345 runtime cost when YYDEBUG is not defined, and so that some tests
9346 that used to fail now work. Problem and initial suggestion by
9347 Paolo Bonzini.
9348 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
9349 * data/glr.cc (b4_parser_class_name):
9350 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
9351 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
9352 (yydebug_) [YYDEBUG]: New member.
9353 (yycdebug_): Now defined only if YYDEBUG.
9354 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
9355 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
9356 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
9357 if YYYDEBUG.
9358 (debug_stream, set_debug_stream, debug_level, set_debug_level):
9359 Define only if YYDEBUG.
9360 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
9361 set_debug_level.
9362 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
9363 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
9364 AT_CHECK_CALC_GLR_CC that are working now.
9365
4ec13d60
PE
93662006-09-12 Paul Eggert <eggert@cs.ucla.edu>
9367
9368 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
9369 We don't need them in glr.cc, and glr.c defines them.
9370 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
9371 assumes that defining it to anything is the same as defining
9372 it to 1. Problem reported by Paolo Bonzini.
9373
8e1687ae
PE
93742006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
9375
9376 * data/c.m4 (b4_null, b4_case): Define.
9377 * src/output.c (prepare_symbols): Use b4_null.
9378 (user_actions_output): Use b4_case.
9379
3dc5e96b
PE
93802006-09-11 Paul Eggert <eggert@cs.ucla.edu>
9381
aef3da86
PE
9382 * data/glr.c (b4_shared_declarations): Put start-header first,
9383 before any #includes that we generate, so that feature-test
9384 macros work. Problem reported by Michael Deutschmann in
9385 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
9386 * data/lalr1.cc: Likewise.
9387 * doc/bison.texinfo (Prologue): Document that feature-test macros
9388 should be defined before any Bison declarations.
9389 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
9390 that depend on location.hh after, not before, Bison decls, since
9391 we now include location.hh after the first user prologue.
9392
3dc5e96b
PE
9393 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
9394 Sander Brandenburg in
9395 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
9396 Also, fix minor white space and comment issues.
aef3da86
PE
9397 (Prologue): Mention that it's better to define feature-test macros
9398 before Bison declarations. Problem reported by Michael Deutschmann.
9399
9400 * README-cvs: Fix typo: "&" should be "&&". Problem reported
9401 by Jim Meyering.
9402 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
9403 This adjusts to recent gnulib changes.
3dc5e96b 9404
b2a0b7ca
JD
94052006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9406
9407 Finish implementation of per-type %destructor/%printer. Discussed
9408 starting at
9409 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
9410 and
9411 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
9412 * NEWS (2.3+): Add a description of this feature to the default
9413 %destructor/%printer description.
9414 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
9415 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9416 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9417 list node contains a semantic type.
9418 * src/symtab.c, src/symtab.h: Extend with a table that associates
9419 semantic types with their %destructor's and %printer's.
9420 (semantic_type_from_uniqstr, semantic_type_get,
9421 semantic_type_destructor_set, semantic_type_printer_set): New functions
9422 composing the public interface of that table.
9423 (symbol_destructor_get, symbol_destructor_location_get,
9424 symbol_printer_get, symbol_printer_location_get): If there's no
9425 per-symbol %destructor/%printer, look up the per-type before trying
9426 the default.
9427 * tests/actions.at (Per-type %printer and %destructor): New test case.
9428 * tests/input.at (Default %printer and %destructor redeclared):
9429 Extend to check that multiple occurrences of %symbol-default in a
9430 single %destructor/%printer declaration is an error.
9431 (Per-type %printer and %destructor redeclared, Unused values with
9432 per-type %destructor): New test cases.
9433
3be03b13
JD
94342006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9435
9436 Require default %destructor/%printer to be declared using
9437 %symbol-default instead of an empty symbol list, and start working on
9438 new per-type %destructor/%printer. Discussed at
9439 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9440 * NEWS (2.3+): Add %symbol-default to example.
9441 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 9442 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
9443 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9444 (generic_symlist, generic_symlist_item): New nonterminals for creating
9445 a list in which each item is a symbol, semantic type, or
9446 %symbol-default.
9447 (grammar_declaration): Use generic_symlist in %destructor and %printer
9448 declarations instead of symbols.1 or an empty list.
9449 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9450 for changes to symbol_list.
9451 * src/reader.c: Update for changes to symbol_list.
9452 * src/scan-code.l: Likewise.
9453 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9454 * src/symlist.c, src/symlist.h: Extend such that a list node may
9455 represent a semantic type or a %symbol-default in addition to just an
9456 ordinary symbol. Add switched functions for setting %destructor's and
9457 %printer's.
9458 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9459 %destructor/%printer declarations.
9460
3508ce36
JD
94612006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9462
9463 Whether the default %destructor/%printer applies to a particular symbol
9464 isn't a question of whether the user *declares* that symbol (in %token,
9465 for example). It's a question of whether the user by any means
9466 *defines* the symbol at all (by simply using a char token, for
9467 example). $end is defined by Bison whereas any other token with token
9468 number 0 is defined by the user. The error token is always defined by
9469 Bison regardless of whether the user declares it with %token, but we
9470 may one day let the user define error as a nonterminal instead.
9471 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9472 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9473 the meaning of "user-defined".
9474 * tests/actions.at (Default %printer and %destructor for user-declared
9475 end token): Rename to...
9476 (Default %printer and %destructor for user-defined end token): ...
9477 this.
9478
9479 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9480 computation of whether to apply the default, don't maintain a list of
9481 every Bison-defined symbol. Instead, just check for a first character
9482 of '$', which a user symbol cannot have, and check for the error token.
9483
9350499c
JD
94842006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9485
9486 Don't apply the default %destructor or %printer to the error token,
9487 $undefined, or $accept. This change fits the general rule that the
9488 default %destructor and %printer are only for user-declared symbols,
9489 and it solves several difficulties that are described in the new test
9490 cases listed below.
9491 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9492 * tests/actions.at (Default %printer and %destructor are not for error
9493 or $undefined, Default %printer and %destructor are not for $accept):
9494 New test cases.
9495
4d7370cb
JD
94962006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9497
9498 Allow %start after the first rule.
9499 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9500 when parsing the first rule.
9501 (check_and_convert_grammar): Search for it here after all grammar
9502 declarations have been parsed. Skip midrules, which have dummy LHS
9503 nonterminals.
9504 * src/symtab.c (symbol_is_dummy): New function.
9505 * src/symtab.h (symbol_is_dummy): Declare it.
9506 * tests/input.at (%start after first rule): New test.
9507
6d0ef4ec
JD
95082006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9509
9510 Redo some of the previous commit: add back the ability to use
9511 non-aliased/undeclared string literals since it might be useful to
9512 those declaring %token-table.
9513 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9514 commit: don't worry about complaints from symbols_pack.
9515 * src/symtab.c (symbol_new, symbol_class_set,
9516 symbol_check_alias_consistency): Undo changes in previous commit: count
9517 each string literal as a new symbol and token, assign it a symbol
9518 number, and don't complain about non-aliased string literals.
9519 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9520 and token counts but does still set aliased tokens to the same number,
9521 symbol_pack_processor now leaves empty slots in the symbols array.
9522 Remove those slots.
9523 * tests/regression.at (Undeclared string literal): Remove test case
9524 added in previous commit since non-aliased string literals are allowed
9525 again.
9526 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9527 remove unnecessary string literal declarations.
9528 * tests/sets.at (Firsts): Likewise.
9529
965537bc
JD
95302006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9531
9532 Don't allow an undeclared string literal, but allow a string literal to
9533 be used before its declaration.
9534 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9535 symbols_pack complained.
9536 * src/symtab.c (symbol_new): Don't count a string literal as a new
9537 symbol.
9538 (symbol_class_set): Don't count a string literal as a new token, and
9539 don't assign it a symbol number since symbol_make_alias does that.
9540 (symbol_make_alias): It's not necessary to decrement the symbol and
9541 token counts anymore. Don't assume that an alias declaration occurs
9542 before any uses of the identifier or string, and thus don't assert that
9543 one of them has the highest symbol number so far.
9544 (symbol_check_alias_consistency): Complain if there's a string literal
9545 that wasn't declared as an alias.
9546 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9547 symbol_pack asserts that every token has been assigned a symbol number
9548 although undeclared string literals have not.
9549 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 9550 string literal): New test cases.
965537bc
JD
9551 (Characters Escapes, Web2c Actions): Declare string literals as
9552 aliases.
9553 * tests/sets.at (Firsts): Likewise.
9554
47aee066
JD
95552006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9556
9557 In the grammar scanner, STRING_FINISH unclosed constructs and return
9558 them to the parser in order to improve error messages.
9559 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9560 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9561 * tests/input.at (Unclosed constructs): New test case.
9562 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9563 seen.
9564
9565 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9566 unused global.
9567
1f6b3679
JD
95682006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9569
9570 Handle string aliases for character tokens correctly.
9571 * src/symtab.c (symbol_user_token_number_set): If the token has an
9572 alias, check and set its alias's user token number instead of its own,
9573 which is set to indicate the alias. Previously, every occurrence of
9574 the character token in the grammar overwrote that alias indicator with
9575 the character code.
9576 * tests/input.at (String aliases for character tokens): New test.
9577
219741d8
JD
95782006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9579
9580 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9581
11daa4e7
PE
95822006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9583
9584 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9585 to prevent failures when building on older platforms.
9586 Check for autopoint failure.
9587 Set XGETTEXT_OPTIONS to values that check for C format strings,
9588 so that translators are warned about them (this also helps
9589 prevent core dumps).
9590
9591 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9592 function, since it simplifies our code a bit.
9593
9594 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9595 rather than -W, so we don't get bogus warnings about sign comparisons.
9596 Add -Wpointer-arith, since that warning is useful (it reports code
9597 that does not conform to C89 and that some compilers reject).
9598 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9599 since it's no longer needed.
9600
f9bfc42a
JD
96012006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9602
9603 Clean up scanners a bit.
9604 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9605 definitions so gcc won't warn when obstack_for_string is unused.
9606 * src/scan-code.l: config.h and system.h are already #include'd by
9607 scan-code-c.c, so get rid of them here.
9608 * src/scan-gram.l: Likewise.
9609 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9610 definitions rather than duplicating the rest of it.
9611 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9612
06e8700a
JD
96132006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9614
9615 Suppress signed/unsigned comparison warnings for yycheck.
9616 * data/c.m4 (b4_safest_int_type): New macro.
9617 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9618 a signed int type, cast it to b4_safest_int_type first.
9619 * data/yacc.c: Likewise.
9620 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9621 also overwritten.
9622
9c437126
PE
96232006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9624
9625 * doc/bison.texinfo: Fix some typos.
9626
284d8a13
PE
96272006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9628
9629 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9630 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9631
9632 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9633 the latest gnulib does this a different way.
9634 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9635 translation was patched, so stop omitting it.
9636
ec5479ce
JD
96372006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9638
9639 Enable declaration of default %printer/%destructor. Make the parser
9640 use these for all user-declared grammar symbols for which the user does
9641 not declare a specific %printer/%destructor. Thus, the parser uses it
9642 for token 0 if the user declares it but not if Bison generates it as
9643 $end. Discussed starting at
9644 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9645 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9646 and
9647 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9648 * NEWS (2.3+): Mention.
9649 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9650 declare a %destructor for a mid-rule's semantic value. It's just
9651 impossible to declare one specific to it.
9652 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9653 code. Describe default %destructor form.
9654 * src/parse-gram.y (grammar_declaration): Parse default
9655 %printer/%destructor declarations.
9656 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9657 and symbol_destructor_location_get rather than accessing the destructor
9658 and destructor_location members of struct symbol.
9659 (symbol_printers_output): Likewise but for %printer's.
9660 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9661 again.
9662 * src/symtab.c (default_destructor, default_destructor_location,
9663 default_printer, default_printer_location): New static global
9664 variables to record the default %destructor and %printer.
9665 (symbol_destructor_get, symbol_destructor_location_get,
9666 symbol_printer_get, symbol_printer_location_get): New functions to
9667 compute the appropriate %destructor and %printer for a symbol.
9668 (default_destructor_set, default_printer_set): New functions to set the
9669 default %destructor and %printer.
9670 * src/symtab.h: Prototype all those new functions.
9671 * tests/actions.at (Default %printer and %destructor): New test to
9672 check that the right %printer and %destructor are called, that they're
9673 not called for $end, and that $$ and @$ work correctly.
9674 (Default %printer and %destructor for user-declared end token): New
9675 test to check that the default %printer and %destructor are called for
9676 a user-declared end token.
9677 * tests/input.at (Default %printer and %destructor redeclared, Unused
9678 values with default %destructor): New tests to check related grammar
9679 warnings and errors.
9680
868d2d96
JD
96812006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9682
9683 Clean up handling of %destructor for the end token (token 0).
9684 Discussed starting at
9685 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9686 and
9687 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9688
9689 Make the skeletons consistent in how they pop the end token and invoke
9690 its %destructor.
9691 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9692 state, which has token number 0, since this would invoke the
9693 %destructor for the end token.
9694 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9695 until after shifting the end token, or else it won't be popped.
9696 * data/yacc.c (yyparse): Likewise.
9697
9698 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9699 it's the end token. Upon termination, destroy an unshifted lookahead
9700 even when it's the end token.
9701 * data/lalr1.cc (yy::parser::parse): Likewise.
9702 * data/yacc.c (yyparse): Likewise.
9703
9704 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9705 value warnings for the end token when the user gives the end token a
9706 %destructor.
9707
9708 * tests/actions.at (Printers and Destructors): Test all the above.
9709
62a9592d
PE
97102006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9711
9712 Update to latest gnulib and gettext versions.
9713 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9714 Add fopen-safer.
9715 (gnulib_files): Add m4/warning.m4. Don't worry about files
9716 overwritten by autopoint.
9717 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9718 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9719 rejects them.
9720 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9721 so that we can remove the intl files at a better time.
9722 (intl_files_to_remove): Remove aclocal.m4, since it gets
9723 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9724 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9725 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9726 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9727 Remove datarootdir hack; no longer needed.
9728 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9729 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9730 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9731 strdup.h.
9732 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9733 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9734
10d6970f
PE
97352006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9736
9737 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9738 it with --assume-autoconf='latest-stable'.
9739
50a33993
JD
97402006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9741
9742 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9743 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9744 YYSTYPE' and `{'.
9745 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9746 those from muscle_tab.c since the old ones are misleading.
9747
2ce4ed68
AD
97482006-07-13 Akim Demaille <akim@epita.fr>
9749
9750 Support %define "KEY" {VALUE}.
9751 * src/scan-code.h, src/scan-code.l (translate_action)
9752 (translate_rule_action, translate_symbol_action, translate_code):
9753 Return char *, not const char *.
9754 * src/parse-gram.y (declaration): Rename as...
9755 (prologue_declaration): this.
9756 (string_content): Remove this nonterminal, use STRING.
9757 (braceless, content, content.opt): New nonterminal.
9758 Use them.
9759 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9760 as value.
9761 * src/scan-gram.l (getargs.h): Don't include it.
9762
db7e5eb5
PE
97632006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9764
9765 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9766 rather than a for-loop that declares a local bool variable. This
9767 should work around a compatibility problem with a Cray x1e C++
9768 compiler reported by Hung Nguyen in
9769 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9770 The for-loop was introduced in the 2004-11-17 change but I don't
9771 know why it was needed.
9772
a5d80ba5
AD
97732006-07-12 Akim Demaille <akim@epita.fr>
9774
9775 * data/c.m4: Comment changes.
9776
23eb2a69
AD
97772006-07-10 Akim Demaille <akim@lrde.epita.fr>
9778
9779 * src/complain.c (error_message, ERROR_MESSAGE): New.
9780 To factor...
9781 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9782 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9783
ddc8ede1
PE
97842006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9785
9786 * NEWS: Instead of %union, you can define and use your own union type
9787 YYSTYPE if your grammar contains at least one <type> tag.
9788 Your YYSTYPE need not be a macro; it can be a typedef.
9789 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9790 (Union Decl, Decl Summary): Document this.
9791 * data/glr.c (YYSTYPE): Implement this.
9792 * data/glr.cc (YYSTYPE): Likewise.
9793 * data/lalr1.cc (YYSTYPE): Likewise.
9794 * data/yacc.c (YYSTYPE): Likewise.
9795 * src/output.c (prepare): Output tag_seen_flag.
9796 * src/parse-gram.y (declaration, grammar_declaration):
9797 Use 'union_seen' rather than 'typed' to determine whether
9798 %union has been seen, since grammars can now be typed without
9799 %union.
9800 (symbol_declaration, type.opt, symbol_def):
9801 Keep track of whether a tag has been seen.
9802 * src/reader.c (union_seen, tag_seen): New vars.
9803 (typed): remove.
9804 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9805 * src/scan-code.l (untyped_var_seen): New variable.
9806 (handle_action_dollar): Adjust to above changes.
9807 (handle_action_dollar, handle_action_at):
9808 Improve overflow checking for outlandish numbers.
9809 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9810 avoid new diagnostics generated by above changes.
9811 * tests/regression.at (YYSTYPE typedef): Add test to check
9812 for type tags without %union.
9813
9814 * src/symlist.c (symbol_list_length): Return int, not unsigned
9815 int, since callers expect int. This may need to get revisited
9816 once we have proper integer overflow checking.
9817
9818 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9819 object is now static.
9820
9821 * src/getargs.c (flags_argmatch): Return void, not int,
9822 to pacify ./configure --enable-gcc-warnings.
9823
9824 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9825 since last_string is already defined to FLEX_PREFIX (last_string).
9826
7b42569e
AD
98272006-07-09 Akim Demaille <akim@lrde.epita.fr>
9828
9829 Implement --warnings/-W.
9830 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9831 replaced by...
9832 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9833 Adjust callers.
9834 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9835 (warnings_args, warnings_types): New.
9836 (getargs, short_options, long_options): Accept -W/--warnings.
9837 Sort the options by alphabetical order, upper case letter right
9838 before its lower case.
9839
3b452f4e
JD
98402006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9841
9842 Change %merge result type clash warnings to errors. Discussed at
9843 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9844 * src/reader.c (record_merge_function_type): Use complain_at.
9845 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9846 declared later): Update test case results.
9847
b8a41559
AD
98482006-07-09 Akim Demaille <akim@lrde.epita.fr>
9849
9850 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9851 to be in alphabetical order.
9852 (trace_args): Spelling fixes.
9853
cd9e1ba2
PE
98542006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9855
9856 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9857 so they don't collide with user-defined macros.
9858 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9859 this was never guaranteed, and now that we're using gnulib stdint,
9860 which defines int_fast16_t to long int, the problem is exposed.
9861
cb48f191
PE
98622006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9863
b8445a15
PE
9864 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9865 need the full POSIX semantics (and weren't implementing them
9866 anyway).
9867
cb48f191
PE
9868 Adjust to Autoconf 2.60 and today's gnulib.
9869 * bootstrap (gnulib_modules): Add stdint.
9870 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9871 no longer copies it.
9872 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9873 since stdint needs the former and wcwidth (which is now required
9874 by mbswidth) needs the latter.
9875 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9876 work around a compatibility glitch between gettext 0.14.6 and
9877 Autoconf 2.60.
9878 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9879 Do not check for uintptr_t, since new stdint module does the right
9880 thing.
9881 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9882 Add stdint.h, stdint_.h, wcwidth.h.
9883 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9884 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9885 stdint.m4, wchar_t.m4, wcwidth.m4.
9886 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9887 usual order for ../lib/*.h files.
9888 (file_name_split): Use last_component, not base_name, to adjust
9889 to gnulib changes.
9890 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9891 for ../lib/*.h files.
9892 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9893 Define unconditionally, since we now assume the stdint module.
9894 * src/scan-skel.l: Include <dirname.h>.
9895 (BASE_QPUTS): Use last_component, not base_name.
9896 * src/system.h: Include <unlocked-io.h> in the usual order
9897 for ../lib/*.h files. Include <stdint.h> unconditionally,
9898 since we now use the stdint module.
9899 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9900 HAVE_UINTPTR_T, since we now use the stdint module.
9901 (base_name): Remove decl, since files now include <dirname.h>
9902 to get the decl.
9903
cd48d21d
AD
99042006-07-08 Akim Demaille <akim@lrde.epita.fr>
9905
9906 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9907 New, default to 1.
9908 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9909 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9910 default.
9911 * tests/calc.at: Adjust.
9912
8ec0a172
AD
99132006-07-08 Akim Demaille <akim@lrde.epita.fr>
9914
b8445a15 9915 * data/c.m4 (b4_basename): New.
8ec0a172
AD
9916 (b4_syncline): Also output the location of its invocation (from
9917 the skeleton).
9918 (b4_user_action, b4_define_user_action, b4_user_actions)
9919 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9920 (b4_user_stype): New.
9921 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9922
4a678af8
JD
99232006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9924
9925 In the grammar file, the first column is 1 not 0 on the first line as
9926 on every other line.
9927 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9928 * tests/input.at (Torturing the Scanner): Update output.
9929
9930 * src/scan-gram.l (scanner_cursor): Declare it static.
9931
dd60572a
JD
99322006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9933
9934 In warnings, say "previous declaration" rather than "first
9935 declaration".
9936 * src/symtab.c (redeclaration): Do that here.
9937 * src/reader.c (record_merge_function_type): In the case of a result
9938 type clash, report the previous declaration rather than the very first
9939 one in the grammar file.
9940 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9941 declared later): Add a third declaration to check this behavior.
9942 * tests/input.at (Incompatible Aliases): Update output.
9943
2073e1b6
AD
99442006-06-27 Akim Demaille <akim@epita.fr>
9945
9946 * doc/Doxyfile.in: New.
9947 * doc/Makefile.am: Use it.
9948 * src/lalr.h, src/symtab.h: Initial doxygenation.
9949
8ee5b538
JD
99502006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9951
9952 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
9953 declared after the %merge. This continues the effort of the previous
9954 patch.
8ee5b538
JD
9955 * src/reader.c (get_merge_function): Don't set the merger type yet.
9956 (record_merge_function_type): New function for setting the merger type
9957 and checking for clashes.
9958 (grammar_current_rule_merge_set): Set the location of the %merge for
9959 the current rule.
9960 (packgram): Invoke record_merge_function_type for each rule now that
9961 all symbol type declarations have been parsed.
9962 * src/reader.h (merger_list.type_declaration_location): New member
9963 storing the location of the first %merge from which the type for this
9964 merging function was derived.
9965 * src/symlist.h (symbol_list.merger_declaration_location): New member
9966 storing the location of a rule's %merge, if any.
9967 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9968 declared later): New test to catch the error fixed by the above patch.
9969
ffa4ba3a
JD
99702006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9971
9972 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
9973 declarations appear after the rules. Discussed at
9974 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
9975 and
9976 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
9977 Don't mistake the type of $$ in a midrule to be that of its parent
9978 rule's $$.
ffa4ba3a
JD
9979 * src/reader.c (grammar_current_rule_end): Don't invoke
9980 grammar_rule_check yet since not all symbol declarations may have been
9981 parsed yet.
9982 (grammar_midrule_action): Likewise.
9983 Don't record whether the midrule's $$ has been used yet since actions
9984 haven't been translated yet.
9985 Record the midrule's parent rule and its RHS index within the parent
9986 rule.
9987 (grammar_current_rule_action_append): Don't translate the action yet
9988 since not all symbol declarations may have been parsed yet and, thus,
9989 warnings about types for $$, $n, @$, and @n can't be reported yet.
9990 (packgram): Translate the action and invoke grammar_rule_check now that
9991 all symbol declarations have been parsed.
9992 * src/scan-code.l (handle_action_dollar): Now that this is invoked
9993 after parsing the entire grammar file, the symbol list here in the case
9994 of a midrule is actually the midrule's empty RHS, so reference its
9995 parent rule's RHS where necessary.
9996 On the other hand, now that you can already know it's a midrule, you
9997 aren't forced to think $$ has the same type as its parent rule's $$.
9998 (handle_action_at): In the case of a midrule, reference the parent rule
9999 where necessary.
10000 * src/symlist.c (symbol_list_new): Initialize new midrule-related
10001 members.
10002 (symbol_list_length): Now that this is invoked after all rules have
10003 been parsed, a NULL symbol (rather than a NULL symbol list node)
10004 terminates a rule. symbol_list_print already does this correctly.
10005 * src/symlist.h (symbol_list.midrule_parent_rule,
10006 symbol_list.midrule_parent_rhs_index): New members so that midrules can
10007 remember their relationships with their parents.
10008 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
10009 fixed by the above patch.
10010 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
10011 implementing...
10012 (Unused values): ... this old test case and...
10013 (Unused values before symbol declarations): ... this new test case.
10014 This one is the same as `Unused values' except that all symbol
10015 declarations appear after the rules in order to catch the rest of the
10016 errors fixed by the above patch.
10017
e256e17f
JD
100182006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10019
300a1930
JD
10020 More cleanup.
10021 * src/reader.c (current_rule): Declare it static since it's no longer
10022 used outside this file.
10023 (grammar_current_rule_action_append): Remove redundant arguments from
10024 translate_rule_action invocation.
10025 * src/reader.h (current_rule): Remove this unused extern.
10026 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
10027 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 10028
381ecb06
JD
100292006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
10030
10031 Clean up yesterday's patch.
10032 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
10033 to...
10034 * src/reader.c (grammar_current_rule_action_append): ... here for
10035 consistency with grammar_current_rule_symbol_append.
10036 * tests/regression.at (Braced code in declaration in rules section):
10037 Make yyerror and yylex static as usual.
10038
4210cd0b
JD
100392006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
10040
10041 Fix bug that mistakes braced code in a declaration in the rules section
10042 to be a rule action. Mentioned at
10043 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
10044 * src/scan-gram.l: Move midrule action detection from the start of the
10045 scanning of any braced code to...
10046 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
10047 action. For readability, use $2 and @2 rather than the equivalent
10048 global variables.
10049 * tests/regression.at (Braced code in declaration in rules section):
10050 New test to catch the error fixed by the above patch.
10051
10052 Work on code readability some.
10053 * src/scan-code.l (current_rule): Get rid of this misleading and
10054 redundant declaration: it's actually extern'ed in reader.h.
10055 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
10056 translate_action): Add a rule argument and use it instead of the global
10057 current_rule.
10058 (translate_rule_action): This already receives current_rule through an
10059 argument, so pass it on to translate_action instead of assigning
10060 current_rule to current_rule.
10061 (translate_symbol_action, translate_code): Pass rule = NULL to
10062 translate_action.
10063
34f98f46
JD
100642006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
10065
10066 Rename %before-definitions to %start-header and %after-definitions to
10067 %end-header. Don't use these declarations to separate pre-prologue
10068 blocks from post-prologue blocks. Add new order-independent
10069 declarations %before-header and %after-header as alternatives to the
10070 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
10071 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
10072 * NEWS (2.3+): Update for these changes.
10073 * data/glr.c (b4_before_definitions): Update to...
10074 (b4_start_header): ... this.
10075 (b4_after_definitions): Update to...
10076 (b4_end_header): ... this.
10077 * data/glr.cc: Likewise.
10078 * data/lalr1.cc: Likewise.
10079 * data/yacc.c: Likewise.
10080 * doc/bison.texinfo (The prologue): Update names, and replace remaining
10081 prologue blocks with %*-header declarations.
10082 (Calc++ Parser): Likewise.
91661ebb 10083 (Decl Summary): Update names.
148d66d8 10084 (Table of Symbols): Update description.
34f98f46
JD
10085 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
10086 (PERCENT_END_HEADER): ... this.
10087 (PERCENT_BEFORE_DEFINITIONS): Update to...
10088 (PERCENT_START_HEADER): ... this.
10089 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10090 (declaration): Update token names and m4 macro names.
10091 When parsing %end-header and %start-header, invoke translate_code
10092 before muscle_code_grow, and no longer set global booleans to remember
10093 whether these declarations have been seen.
10094 Parse new %after-header and %before-header.
10095 * src/reader.c (before_definitions, after_definitions): Remove.
10096 (prologue_augment): Accept a new bool argument to specify whether to
10097 augment the pre-prologue or post-prologue.
10098 * src/reader.h (before_definitions, after_definitions): Remove these
10099 extern's.
10100 (prologue_augment): Add new bool argument.
10101 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
10102 (PERCENT_END_HEADER): ... this.
10103 (PERCENT_BEFORE_DEFINITIONS): Update to...
10104 (PERCENT_START_HEADER): ... this.
10105 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10106 * tests/actions.at (Printers and Destructors): Update names.
10107
31b2b07e
JD
101082006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
10109
10110 Add comparison operators for C++ location classes. Discussed at
10111 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
10112 * data/c++.m4 (b4_define_location_comparison): New boolean %define
10113 declaration indicating whether filename_type has an operator==. If
10114 filename_type is `std::string', it defaults to `1', `0' otherwise.
10115 * data/location.cc: Iff b4_define_location_comparison is `1', add
10116 operator== and operator!= for class position and for class location.
10117
10118 Some minor fixes.
10119 * src/scan-action.l: Remove unused file.
10120 * src/symtab.c (symbol_printer_set): Use printer_location not
10121 destructor_location.
10122 * src/symtab.h (struct symbol): Replace incorrect source comment for
10123 printer members.
10124 * tests/input.at (Incompatible Aliases): Update output with correct
10125 printer location.
10126
9bc0dd67
JD
101272006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
10128
10129 Don't put the pre-prologue in the header file. For the yacc.c code
10130 file and the glr.c header and code files, move the pre-prologue before
10131 the token definitions. Add new %before-definitions and
10132 %after-definitions to declare code that will go in both the header file
10133 and code file. Discussed at
10134 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
10135 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
10136 and
10137 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
10138 * NEWS (2.3+): Describe these changes.
10139 * data/glr.c (b4_pre_prologue): Move from within to before...
10140 (b4_shared_declarations): ... this.
10141 Add new b4_before_definitions before b4_token_enums.
10142 Add new b4_after_definitions at the end.
10143 * data/glr.cc (b4_pre_prologue): Replace with...
10144 (b4_before_definitions): ... this in the header file.
10145 (b4_after_definitions): New near the end of the header file.
10146 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
10147 code file right before including the header file.
10148 (b4_before_definitions): New in the previous position of
10149 b4_pre_prologue in the header file.
10150 (b4_after_definitions): New near the end of the header file.
10151 * data/yacc.c: Clean up some m4 quoting especially in the header file.
10152 (b4_token_enums_defines): In the code file, move to right before
10153 YYSTYPE for consistency with the header file.
10154 (b4_before_definitions): New right before b4_token_enums_defines in
10155 both the header and code file.
10156 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
10157 header and code file.
10158 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
10159 of prologues for %union dependencies.
91661ebb
JD
10160 (Decl Summary): In %defines description, mention the effect of
10161 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
10162 (Calc++ Parser): Forward declare driver in a %before-definitions rather
10163 than in the pre-prologue so that make check succeeds.
148d66d8 10164 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
10165 %after-definitions.
10166 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
10167 %before-definitions.
10168 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
10169 (declaration): Parse those declarations and append to
10170 b4_before_definitions and b4_after_definitions, respectively.
10171 * src/reader.c (before_definitions, after_definitions): New bools to
10172 track whether those declarations have been seen.
10173 (prologue_augment): Add to the post-prologue if %union,
10174 %before-definitions, or %after-definitions has been seen.
10175 * src/reader.h (before_definitions, after_definitions): New extern's.
10176 * src/scan-gram.l: Scan the new declarations.
10177 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
10178 prologue block in a %before-definitions or a %after-definitions based
10179 on whether the %union is declared.
10180 * tests/regression.at (Early token definitions with --yacc, Early token
10181 definitions without --yacc): Move tests for token definitions into the
10182 post-prologue since token names are no longer defined in the
10183 pre-prologue.
10184
203b9274
AD
101852006-06-20 Akim Demaille <akim@epita.fr>
10186
10187 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
10188 (symbol_get): Use it.
10189 * src/parse-gram.y: Use it.
10190
a7ee59cf
JD
101912006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
10192
10193 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
10194 build succeeds when configured with --enable-gcc-warnings.
10195
5a2baae7
PE
101962006-06-19 Paul Eggert <eggert@cs.ucla.edu>
10197
33ad1a9c
PE
10198 * src/parse-gram.y (char_name): New function.
10199 (CHAR, STRING, string_content): For %printer, properly escape.
10200 (ID): Prefer fputs to fprintf.
10201 (id): Reindent to be consistent with other rules.
10202 Properly quote char.
10203
5a2baae7
PE
10204 The Translation Project changed its way of publishing translations
10205 to maintainers. I haven't received any responses to my request
10206 for supporting the old way, or for documenting the new way. I
10207 have modified 'bootstrap' to use screen scraping
10208 (in this case, HTML scraping). This is unreliable and inelegant,
10209 but I don't see any better way. Yuck.
10210 * bootstrap (TP_URL, WGET_COMMAND): New vars.
10211 (get_translations): New function, which uses HTML scraping to
10212 deduce locations of latest translations.
10213 Use this function to grab both bison and bison-runtime .po files.
10214 Don't bother priming the pump for the runtime-po domain any more,
10215 as it's now translated better than bison is.
10216
58d7a1a1
AD
102172006-06-19 Akim Demaille <akim@epita.fr>
10218
10219 * src/scan-gram.l: No longer "parse" things after `%union' until
10220 `{'. Rather, return a single "%union" token.
10221 No longer make symbols: return strings, and leave the conversion
10222 to symbols to the parser.
10223 (SC_PRE_CODE, token_type): Remove.
10224 * src/parse-gram.y (%union): New field `character'.
10225 Sort tokens.
10226 (CHAR): New token.
10227 (ID, ID_COLON): Now that the scanner no longer makes them
10228 identifiers, adjust all uses to invoke symbol_get.
10229 (id_colon): New, wraps the conversion from string to symbol.
10230 (%union): Accept a possible union_name.
10231 (symbol): Now can be a char.
10232 * data/c.m4 (b4_union_name): Leave a default value.
10233 * data/glr.c, data/yacc.c: Use it.
10234
b931235e
JD
102352006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
10236
10237 For associating token numbers with token names for "yacc.c", don't use
10238 #define statements unless `--yacc' is specified; always use enum
10239 yytokentype. Most important discussions start at:
10240 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
10241 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
10242 and
10243 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
10244 * NEWS (2.3+): Mention.
10245 * data/c.m4 (b4_yacc_if): New.
10246 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
10247 token #define's.
10248 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
10249 on token name definitions.
10250 * src/getargs.c (usage): Capitalize `Yacc' in English.
10251 * src/output.c (prepare): Define b4_yacc_flag.
10252 * tests/regression.at (Early token definitions): Test that tokens names
10253 are defined before the pre-prologue not just before the post-prologue.
10254 Remove this test case and copy to...
10255 (Early token definitions with --yacc): ... this to test #define's.
10256 (Early token definitions without --yacc): ... and this to test enums.
10257
9e6e7ed2
PE
102582006-06-11 Paul Eggert <eggert@cs.ucla.edu>
10259
10260 * NEWS: Reword the post-2.3 change to not be so optimistic about
10261 removing the old "look-ahead" spelling.
10262 Update previous look-ahead/lookahead change reports.
10263 * REFERENCES: look-ahead -> lookahead (since that's
10264 what he actually wrote).
10265 * doc/refcard.tex: look ahead -> lookahead,
10266 look-ahead -> lookahead
10267
742e4900
JD
102682006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
10269
10270 For consistency, use `lookahead' instead of `look-ahead' or
10271 `look_ahead'. Discussed starting at
10272 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
10273 and then at
10274 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
10275 * NEWS: For the next release, note the change to `--report'.
10276 * TODO, doc/bison.1: Update English.
10277 * doc/bison.texinfo: Update English.
10278 (Understanding Your Parser, Bison Options): Document as
10279 `--report=lookahead' rather than `--report=look-ahead'.
10280 * src/conflicts.c: Update English in comments.
10281 (lookahead_set): Rename from look_ahead_set.
10282 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
10283 (resolve_sr_conflict): Rename local look_ahead_tokens to
10284 lookahead_tokens, and update other uses.
10285 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
10286 count_rr_conflicts, conflicts_free): Update uses.
10287 * src/getargs.c (report_args): Move "lookahead" before alternate
10288 spellings.
10289 (report_types): Update uses.
10290 (usage): For `--report' usage description, state `lookahead' spelling
10291 rather than `look-ahead'.
10292 * src/getargs.h (report.report_lookahead_tokens): Rename from
10293 report_look_ahead_tokens.
10294 * src/lalr.c: Update English in comments.
10295 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
10296 (state_lookahead_tokens_count): Rename from
10297 state_look_ahead_tokens_count.
10298 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10299 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
10300 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10301 Update other uses.
10302 Update English in output.
10303 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
10304 * src/print.c: Update English in comments.
10305 (lookahead_set): Rename from look_ahead_set.
10306 (print_reduction): Rename argument lookahead_token from
10307 look_ahead_token.
10308 (print_core, state_default_rule, print_reductions, print_results):
10309 Update uses.
10310 * src/print_graph.c: Update English in comments.
10311 (print_core): Update uses.
10312 * src/state.c: Update English in comments.
10313 (reductions_new): Update uses.
10314 (state_rule_lookahead_tokens_print): Rename from
10315 state_rule_look_ahead_tokens_print, and update other uses.
10316 * src/state.h: Update English in comments.
10317 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
10318 (state_rule_lookahead_tokens_print): Rename from
10319 state_rule_look_ahead_tokens_print.
10320 * src/tables.c: Update English in comments.
10321 (conflict_row, action_row): Update uses.
10322 * tests/glr-regression.at
10323 (Incorrect lookahead during deterministic GLR,
10324 Incorrect lookahead during nondeterministic GLR): Rename
10325 print_look_ahead to print_lookahead.
10326 * tests/torture.at: Update English in comments.
10327 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
10328 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
10329 (Many lookahead tokens): Update uses.
10330 * data/glr.c: Update English in comments.
10331 * lalr1.cc: Likewise.
10332 * yacc.c: Likewise.
10333 * src/conflicts.h: Likewise.
10334 * src/lalr.h: Likewise.
10335 * src/main.c: Likewise.
10336 * src/output.c: Likewise.
10337 * src/parse-gram.c: Likewise.
10338 * src/tables.h: Likewise.
10339 * tests/calc.at: Likewise.
10340
3c40d0b5
JD
103412006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
10342
10343 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
10344
5d278082
PE
103452006-06-07 Paul Eggert <eggert@cs.ucla.edu>
10346
10347 * TODO: Add request from Nelson H. F. Beebe to be able to install
10348 Bison without installing the yacc script.
10349
9e668899
JD
103502006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10351
10352 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
10353 and yytext if they're already #define'd.
10354 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
10355 * src/scan-code-c.c: ... here.
10356 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
10357 <config.h>.
10358
0c8e079f
JD
103592006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10360
10361 Get Bison to build again when configured with --enable-gcc-warnings.
10362 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
10363 missing #include's.
10364 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
10365 loc argument as it shadows a global.
10366 * src/scan-gram.l: Remove stray comma that prevents boundary_set
10367 invocation.
10368
10369 * src/.cvsignore: Add scan-code.c.
10370
2346344a
AD
103712006-06-07 Akim Demaille <akim@epita.fr>
10372
10373 * src/scan-gram.l: Move the "add a trailing ; to actions" code
10374 to...
10375 * src/scan-code.l: here.
10376 * tests/input.at (Torturing the Scanner): Fix another location
10377 error.
10378
4862bdfd
AD
103792006-06-07 Akim Demaille <akim@epita.fr>
10380
10381 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
10382
e9071366
AD
103832006-06-06 Akim Demaille <akim@epita.fr>
10384
10385 Extract the parsing of user actions from the grammar scanner.
10386 As a consequence, the relation between the grammar scanner and
10387 parser is much simpler. We can also split "composite tokens" back
10388 into simple tokens.
10389 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
10390 * src/scan-gram.l (add_column_width, adjust_location): Move to and
10391 rename as...
10392 * src/location.h, src/location.c (add_column_width)
10393 (location_compute): these.
10394 Fix the column count: the initial column is 0.
10395 (location_print): Be robust to ending column being 0.
10396 * src/location.h (boundary_set): New.
10397 * src/main.c: Adjust to scanner_free being renamed as
10398 gram_scanner_free.
10399 * src/output.c: Include scan-code.h.
10400 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
10401 Use boundary_set.
10402 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
10403 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
10404 which is now, again, a separate token.
10405 Adjust all dependencies.
10406 Whereever actions with $ and @ are used, use translate_code.
10407 (action): Remove this nonterminal which is now useless.
10408 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
10409 (grammar_current_rule_action_append): Use translate_code.
10410 (packgram): Bound check ruleno, itemno, and rule_length.
10411 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
10412 (last_string, last_braced_code_loc, max_left_semantic_context)
10413 (scanner_initialize, scanner_free, scanner_last_string_free)
10414 (gram_out, gram_lineno, YY_DECL_): Move to...
10415 * src/scan-gram.h: this new file.
10416 (YY_DECL): Rename as...
10417 (GRAM_DECL): this.
10418 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10419 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10420 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10421 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10422 Move these declarations, and...
10423 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10424 these to...
10425 * src/flex-scanner.h: this new file.
10426 * src/scan-gram.l (rule_length, rule_length_overflow)
10427 (increment_rule_length): Remove.
10428 (last_braced_code_loc): Rename as...
10429 (gram_last_braced_code_loc): this.
10430 Adjust to the changes of the parser.
10431 Move all the handling of $ and @ into...
10432 * src/scan-code.l: here.
10433 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10434 (handle_action_dollar, handle_action_at): Move to...
10435 * src/scan-code.l: here.
10436 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10437 scan-code.h, scan-code-c.c, scan-gram.h.
10438 (EXTRA_bison_SOURCES): Add scan-code.l.
10439 (BUILT_SOURCES): Add scan-code.c.
10440 (yacc): Be robust to white spaces.
10441
10442 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10443 * tests/regression.at: Adjust the column numbers.
10444 * tests/regression.at: Adjust the error message.
7891a7c4 10445
184e42f0
JD
104462006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10447
10448 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10449 Use Akim's wording from
10450 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10451
7891a7c4
JD
104522006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10453
10454 Between Bison releases, manually append `+' to the previous Bison
10455 release number, and use that as a signal to automatically print the
10456 ChangeLog's CVS Id keyword from --version. Discussed starting at
10457 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10458 * ChangeLog: Add Id header.
10459 * configure.ac (AC_INIT): Append `+' to `2.3'.
10460 * src/.cvsignore: Add revision.c.
10461 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10462 (BUILT_SOURCES): Add revision.c.
10463 (revision.c): New target rule. This file defines a new global variable
10464 named revision. It initializes it with either the Id from ChangeLog
10465 or, if VERSION doesn't contain `+', with the empty string.
10466 * src/getargs.c (version): Print the value of revision.
10467 * src/revision.h: Extern revision.
10468
4ad3ed84
PE
104692006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10470
10471 * NEWS: Version 2.3.
10472 * configure.ac (AC_INIT): Likewise.
10473
02103984
PE
104742006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10475
10476 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10477 with no arguments, not as an object-like macro. This is for
10478 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10479 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10480 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10481 Document this.
10482
2c08afa5
JD
104832006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10484
10485 * src/getargs.c (usage): Back out yesterday's modification of the
10486 --help output so that we don't have to wait for translation before
10487 releasing 2.3.
10488
6077da58
PE
104892006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10490
10491 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10492 Problem reported by Akim Demaille.
10493
2a26b6c2
JD
104942006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10495
10496 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10497
aefef0d6
PE
104982006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10499
10500 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10501 generated source code. Problem reported by Frans Englich in
10502 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10503
fcd8e201
PE
105042006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10505
10506 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10507 shell, not within 'make', so that 'make' by an ordinary builder
10508 (using GNU make) does not worry about configuring gzip. This also
10509 works around a bug reported independently by Keith Thompson and by
10510 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10511 stderr rather than stdout, messing up the build logs.
10512
7b5cdcbd
JD
105132006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10514
10515 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10516 to make sure that YYID will never be unused. This fixes a 'make
10517 maintainer-check' failure caused by the recent changes to the 'Trivial
10518 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10519 not used.
10520 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10521
5ad0a449
JD
105222006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10523
10524 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10525 state before an empty RHS is always resolved here. Only the location
10526 of that state is guaranteed to be resolved, and that's enough. This
10527 fixes the remaining bug reported by Derek M. Jones in
10528 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10529 * tests/glr-regression.at (Uninitialized location when reporting
10530 ambiguity): Test the above case.
10531 Also, the embedded comments in this test case claim it checks the case
10532 of an empty RHS that has inherited the initial location. However, the
10533 corresponding LHS was already resolved, so yyresolveLocations didn't
10534 actually have reason to modify it. Fix this by forcing
10535 nondeterministic operation at the beginning of the parse.
10536
50cce58e
PE
105372006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10538
10539 * data/c.m4 (b4_yy_symbol_print_generate):
10540 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10541 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10542 of the bugs reported today by Derek M Jones in
10543 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10544 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10545 defined to be a type name without parens or brackets.
10546 (Location Type): Similarly for YYLTYPE.
10547 * tests/regression.at (Trivial grammars): Put in a test for this
10548 bug that will be caught by 'make maintainer-check' (though not,
10549 alas, by 'make check' unless your compiler is picky).
10550
ab8d9dc5
PE
105512006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10552
0d2c8934 10553 * NEWS: Version 2.2.
ab8d9dc5
PE
10554 * configure.ac (AC_INIT): Likewise.
10555
9138c575
JD
105562006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10557
10558 * data/glr.c (yyreportTree): Make room in yystates for the state
10559 preceding the RHS. This fixes the segmentation fault reported by Derek
10560 M. Jones in
10561 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10562 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10563 to the user. Reported for yyreportTree by Derek M. Jones later in the
10564 same thread.
10565 * THANKS: Add Derek M. Jones.
10566 Update my email address.
10567 Fix typo in Steve Murphy's name.
10568
276f48df
PE
105692006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10570
d6645148
PE
10571 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10572 checking against YYLAST that caused the parser to miss a potential
10573 alternative in its diagnostic.
10574 Problem reported by Maria Jose Moron Fernandez in
10575 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10576 * data/lalr1.cc (yysyntax_error_): Likewise.
10577 * data/yacc.c (yysyntax_error): Likewise.
10578 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10579 tokens, in case we run into an older C compiler.
10580 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10581 Use them to check for the off-by-one error fixed above.
10582
276f48df
PE
10583 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10584 YYSIZE_T, not size_t.
10585 * tests/regression.at (Trivial grammars): New test, to catch
10586 the error fixed by the above patch.
10587
cd8b5791
AD
105882006-05-14 Akim Demaille <akim@lrde.epita.fr>
10589
10590 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10591 scheme.
10592 Reported by Steve Murphy.
10593
34376418
AD
105942006-05-14 Akim Demaille <akim@lrde.epita.fr>
10595
10596 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10597 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10598
327afc7c
AD
105992006-05-14 Akim Demaille <akim@lrde.epita.fr>
10600
10601 Implement --trace=m4.
10602 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10603 * src/output.c (output_skeleton): When set, pass -dV to m4.
10604
10605 Factor the handling of flags in m4.
10606 * src/output.c (prepare): Rename the muscle names debug, defines,
10607 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10608 * data/c.m4: Adjust.
10609 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10610 Use b4_define_flag_if to define other b4_FLAG_if macros.
10611 (b4_location_if): As a consequence, rename as...
10612 (b4_locations_if): this, for consistency.
10613 Adjust all the skeletons.
10614
ba9ecd19
AD
106152006-05-14 Akim Demaille <akim@lrde.epita.fr>
10616
10617 * etc/bench.pm: Shorten bench names.
10618
4e83ea15
AD
106192006-05-14 Akim Demaille <akim@lrde.epita.fr>
10620
10621 * src/output.h, src/output.c (error_verbose): Move to...
10622 * src/getargs.h, src/getargs.c: here.
10623 Sort the flags.
10624 Adjust dependencies.
10625
6e93d810
PE
106262006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10627
10628 * data/c.m4 (b4_copyright): Put the special exception for Bison
10629 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
10630 uses changed. Suggested by Akim Demaille. Also, wrap the
10631 copyright notice, in case it is longer than 80 columns. Replace
10632 comma by newline after title.
6e93d810 10633
eaea13f5
PE
106342006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10635
10636 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10637 incompatibility, not a bug. Mention that it wasn't fixed as of
10638 flex 2.5.33.
10639
3cf084ec
AD
106402006-05-11 Akim Demaille <akim@lrde.epita.fr>
10641
10642 * examples/extexi: Enforce the precedence of concatenation over
10643 >>.
0a9f1c7d 10644 Reported by Tommy Nordgren.
3cf084ec 10645
32c96bd7
AD
106462006-05-11 Akim Demaille <akim@lrde.epita.fr>
10647
10648 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10649 with the member "token".
f94705b2 10650 Reported by Martin Nylin.
32c96bd7 10651
eaea13f5
PE
106522006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10653
10654 * data/glr.c: Switch to Bison 2.2 special-exception language in
10655 the copyright notice. Use more-regular format for titles and
10656 copyright notices.
10657 * data/glr.cc: Likewise.
10658 * data/location.cc: Likewise.
10659 * data/yacc.cc: Likewise.
10660 * doc/bison.texinfo (Conditions): Document this.
10661 * NEWS: likewise. Upgrade version to 2.2.
10662
6e2d1146
AD
106632006-04-27 Akim Demaille <akim@lrde.epita.fr>
10664
10665 * data/glr.cc: Remove dead code.
10666
47671055
PE
106672006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10668
10669 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10670 that variable and the line breaks the bootstrap. Problem reported
10671 by Juan M. Guerrero.
10672
ed2e6384
AD
106732006-04-24 Akim Demaille <akim@lrde.epita.fr>
10674
10675 * doc/bison.texinfo (Multiple start-symbols): New.
10676
3cedc2dc
AD
106772006-04-24 Akim Demaille <akim@lrde.epita.fr>
10678
10679 * etc/README, etc/bench.pl: New.
10680
b2ddc3f3
AD
106812006-04-03 Akim Demaille <akim@lrde.epita.fr>
10682
10683 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10684 rule.
10685 Reported by Mickael Labau.
10686 * tests/input.at (Torturing the Scanner): Test it.
10687
91e3ac9a
PE
106882006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10689
10690 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10691 Problem reported by Bob Rossi.
10692
106932006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10694
10695 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10696 and didn't really work.
10697 For the index, use @ifnotinfo, not @iftex.
10698 Minor cleanups of spacing and terminology.
10699
5cf61e93
AD
107002006-03-12 Akim Demaille <akim@lrde.epita.fr>
10701
10702 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10703 of AT_NAME_PREFIX when %name-prefix is not used.
10704
aa08666d
AD
107052006-03-12 Akim Demaille <akim@lrde.epita.fr>
10706
10707 Apply --prefix to C++ skeletons too: they change the namespace.
10708 The test suite already exercize these cases.
10709 * data/c++.m4 (b4_namespace): New.
10710 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10711 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10712 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10713 * doc/bison.texinfo: Document it.
10714 (Option Cross Key): Use @multitable in all formats. It looks
10715 nicer, even in TeX outputs.
10716 (Rules): Use the same code whatever the output type is.
10717 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10718 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10719 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 10720
45567173
AD
107212006-03-10 Akim Demaille <akim@lrde.epita.fr>
10722
10723 * TODO: Remove dead items.
10724
e9d8f881 107252006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
10726
10727 * doc/FAQ: Remove, merged into...
10728 * doc/bison.texinfo (FAQ): this.
10729 * doc/Makefile.am (EXTRA_DIST): Adjust.
10730
c095d689
AD
107312006-03-10 Akim Demaille <akim@lrde.epita.fr>
10732
10733 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10734 even if empty.
10735 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10736 * doc/bison.texinfo (Calc++ Scanner): Use it.
10737
6e0f8287
PE
107382006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10739
10740 Fix two nits reported by twlevo, plus one more that I discovered.
10741
10742 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10743 this is the usual Bison style.
10744 * src/location.h (location_print): Likewise.
10745
10746 * src/reader.h (token_name): Likewise.
10747
d6b771c3
PE
107482006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10749
10750 Fix some nits reported by twlevo.
10751 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10752 and "POSIX". Use more-modern syntax for URLs. Mention C++
10753 and ask for Java. Don't hardwire OS version numbers. Add
10754 copyright notice.
10755 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10756 * src/conflicts.c (solved_conflicts_obstack): Now static.
10757
1e137b71
JD
107582006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10759
10760 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10761 page. Say "you can use it" not "you may use it" as on the web page;
10762 we're describing capabilities not granting permission.
10763
73f2e47e
PE
107642006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10765
6d05403d
PE
10766 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10767 shadowing warnings. Use usual patter for iterating through RHS.
10768 * tests/glr-regression.at
10769 (Uninitialized location when reporting ambiguity):
10770 Modify yylex so that it uses its argument, rather than trying
10771 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10772 const char -> char const.
10773
73f2e47e
PE
10774 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10775 Don't use tabs inside commands; it messes up 'ps'.
10776 Problem reported by twlevo.
10777
8710fc41
JD
107782006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10779
10780 * tests/glr-regression.at (Uninitialized location when reporting
10781 ambiguity): New test case.
10782 * data/glr.c (yyresolveLocations): New function, which uses
10783 YYLLOC_DEFAULT.
10784 (yyresolveValue): Invoke yyresolveLocations before reporting an
10785 ambiguity.
10786 * doc/bison.texinfo (Default Action for Locations): Note
10787 YYLLOC_DEFAULT's usage for ambiguity locations.
10788 (GLR Semantic Actions): Cross-reference those notes.
10789
ae952af2
JD
107902006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10791
10792 * tests/glr-regression.at (Leaked semantic values when reporting
10793 ambiguity): Remove unnecessary union and type declarations.
10794 (Leaked lookahead after nondeterministic parse syntax error): New test
10795 case.
10796 * data/glr.c (yyparse): Check for zero stacks remaining before
10797 attempting to shift the lookahead so that you don't lose it.
10798
35ee866a
JD
107992006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10800
10801 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10802 * tests/glr-regression.at (Leaked semantic values when reporting
10803 ambiguity): New test case.
10804 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10805 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10806 now unnecessary yystackp parameter.
10807 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10808 destructors can be called.
10809
10810 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10811 in existing testcases.
10812
520181ab
JD
108132006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10814
10815 Don't leak semantic values for parent RHS when a user action cuts the
10816 parser, and clean up related code a bit.
10817 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
10818 cuts parse): Rename to...
10819 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
10820 for leaked parent RHS values.
10821 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10822 between an unresolved state (non-empty chain of semantic options) and
10823 an incomplete one (signaled by an empty chain).
ae952af2 10824 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
10825 successfully or unsuccessfully resolved yyGLRState to...
10826 (yyresolveValue): ... here so that yyresolveValue always leaves a
10827 yyGLRState with consistent data and thus is easier to understand.
10828 Remove the yyvalp and yylocp parameters since they are always just
10829 taken from the yys parameter. When reporting a discarded merged value
10830 in debugging output, note that it is incompletely merged. Document the
10831 interface.
10832 (yyresolveAction): If resolving any of the RHS states fails, destroy
10833 them all rather than leaking them. Thus, as long as user actions are
10834 written to clean up the RHS correctly, yyresolveAction always cleans up
10835 the RHS of a semantic option. Document the interface.
10836
18d9185c
PE
108372006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10838
10839 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10840 led to a segmentation fault in GNU Pascal. Problem reported
10841 by Waldek Hebisch.
10842
841a7737
JD
108432006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10844
10845 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10846 mid-rule action inside a nonterminal symbol in order to declare a
10847 destructor for its semantic value.
10848
fc3f467f
PE
108492006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10850
10851 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10852 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10853 __cplusplus && ! defined _STDLIB_H && !
10854 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10855 defined free))]: Include <stdlib.h> rather than rolling our own
10856 declarations of malloc and free, to avoid problems with
10857 incompatible declarations (using 'throw') C++'s stdlib.h. This
10858 should fix Debian bug 340012
10859 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10860 reported by Guillaume Melquiond.
10861
a3af26dd
PE
108622006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10863
4d7bc38c
PE
10864 * NEWS: Clarify symbols versus types in unused-value warnings.
10865
a3af26dd
PE
10866 * configure.ac (AC_INIT): Bump version number.
10867
4e26c69e
PE
108682006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10869
10870 * NEWS: Version 2.1a.
10871 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10872 since C99 requires this.
10873
498e897c
PE
108742006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10875
10876 * m4/c-working.m4: New file.
10877 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10878
57bb17ca
PE
108792006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10880
10881 * Makefile.maint: Merge from coreutils.
10882
0be105dc
PE
108832006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10884
10885 More portability fixes for problems summarized by Nelson H. F. Beebe.
10886
10887 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10888 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10889 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10890 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10891 messes up because C++ code is compiled in 32-bit mode but linked
10892 in 64-bit mode.
10893
6fc0c024
PE
108942006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10895
10896 More portability fixes for problems summarized by Nelson H. F. Beebe.
10897
7870f699
PE
10898 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10899 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10900
6fc0c024
PE
10901 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10902 nodist_PROGRAMS, since we don't need to actually compile the
10903 example if we're just doing a plain 'make'. This avoids bothering
10904 the installer unnecessarily about problems due to weird C++
10905 compilers.
10906
fe6c2fde
PE
109072006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10908
10909 More portability fixes for problems summarized by Nelson H. F. Beebe.
10910
10911 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10912 than #include "...", and compile with -I'.'. The old method was
10913 not portable, according to Posix and the C standard, and it does
10914 not work with Sun C 5.7, where previous #line directives affect
10915 the working directory used in later #include "..." directives.
10916
927b425b
JMG
109172006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10918
10919 Various DJGGP specific issues in /djgpp
10920
d9735e9e
PE
109212006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10922
10923 More portability fixes for problems summarized by Nelson H. F. Beebe.
10924
10925 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10926 '#include <map>' works and that you can apply ++ to iterators.
10927
5a6755af
PE
109282006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10929
67a0dc4f
PE
10930 Work around portability problems summarized by Nelson H. F. Beebe in
10931 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10932
8c86f0ef
PE
10933 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10934 that '#include <string>' works.
10935
de35dd59
PE
10936 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10937 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10938 "warning: sorry: semantics of inline function static data `const
10939 unsigned char translate_table[262]' are wrong (you'll wind up with
10940 multiple copies)".
10941
67a0dc4f
PE
10942 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10943 or, xor to not_, and_, or_, and xor_, respectively. This works
10944 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10945 random system header somewhere that includes the equivalent of
10946 <iso646.h>.
10947
5a6755af
PE
10948 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10949 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 10950 Suite Version 2.0.
5a6755af 10951
3f001415
JD
109522006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10953
10954 During deterministic GLR operation, user actions should be able to
10955 influence the parse by changing yychar. To make this easier to fix and
10956 to make glr.c easier to evolve in general, don't maintain yytoken in
10957 parallel with yychar; just compute yytoken when needed.
10958 * tests/glr-regression.at (Incorrect lookahead during deterministic
10959 GLR): Check that setting yychar in a user action has the intended
10960 effect.
10961 * data/glr.c (yyGLRStack): Remove yytokenp member.
10962 (yyclearin): Don't set *yytokenp.
10963 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10964 yychar rather than *yytokenp to determine the current lookahead.
10965 Compute yytoken locally when needed.
10966 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10967 point to.
10968
10969 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
10970 after `--report' documentation.
10971
e2a8c0f5
PE
109722006-01-30 Paul Eggert <eggert@cs.ucla.edu>
10973
10974 * src/parse-gram.y (grammar_declaration): Location of printer
10975 symbol is @1, not list->location. Bug reported by twlevo.
10976 * tests/input.at (Incompatible Aliases): Adjust to above change.
10977
6b702268
PE
109782006-01-29 Paul Eggert <eggert@cs.ucla.edu>
10979
27622431
PE
10980 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
10981 all the test at once. This makes the output easier to read in the
10982 normal case.
10983
6b702268
PE
10984 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
10985 got from <http://bro-ids.org/download.html>. The bug is that
10986 when two actions appeared in succession, the second one was
10987 scanned before the first one was added to the grammar rule
10988 as a midrule action. Bison then output the incorrect warning
10989 "parse.y:905.17-906.36: warning: unused value: $3".
10990 * src/parse-gram.y (BRACED_CODE, action): These are no longer
10991 associated with a value.
10992 (rhs): Don't invoke grammar_current_rule_action_append.
10993 (action): Invoke it here instead.
10994 * src/reader.c (grammar_midrule_action): Now extern.
10995 (grammar_current_rule_action_append): Don't invoke
10996 grammar_midrule_action; that is now the scanner's job.
10997 * src/reader.h (last_string, last_braced_code_loc):
10998 (grammar_midrule_action): New decls.
10999 * src/scan-gram.l (last_string): Now extern, sigh.
11000 (last_braced_code_loc): New extern variable.
11001 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
11002 rule already has an action.
11003 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
11004 * tests/input.at (AT_CHECK_UNUSED_VALUES):
11005 Add some tests to check that the above changes fixed the bug.
11006
d40ba6c2
PE
110072006-01-27 Paul Eggert <eggert@cs.ucla.edu>
11008
11009 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
11010 All used changed. Check whether the symbol has a destructor,
11011 not whether it is typed.
11012 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
11013 that the values are still reported as unused. All line numbers
11014 adjusted.
11015
401aace6
PE
110162006-01-23 Paul Eggert <eggert@cs.ucla.edu>
11017
11018 Work around a bug in bro 0.8, which underparenthesizes its
11019 definition of YYLLOC_DEFAULT.
11020 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
11021 their arguments.
11022 * data/lalr1.cc: Likewise.
11023 * data/yacc.cc: Likewise.
11024
06f01bc4
PE
110252006-01-22 Paul Eggert <eggert@cs.ucla.edu>
11026
401aace6
PE
11027 Work around a bug in Pike 7.0, and give the Pike folks a
11028 better way to override the usual int widths.
11029 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
11030 user can override the types.
11031 (short): #undef, to work around a bug in Pike 7.0.
11032 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
11033 (union yyalloc.yyss): Use yytype_int16 rather than short.
11034 All uses changed.
11035 (yysigned_char): Remove.
11036 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
11037 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
11038 * tests/regression.at (Web2c Actions): Adjust to above changes.
11039
11040 * src/reader.c (check_and_convert_grammar): New function.
11041 (reader): Close the input file even if something went wrong during
11042 parsing. Minor file descriptor leak reported by twlevo.
11043
06f01bc4
PE
11044 * src/assoc.c (assoc_to_string): Use a default: abort (); case
11045 to pacify gcc -Wswitch-default.
11046 * src/scan-gram.l (adjust_location): Use a default: break; case
11047 to pacify gcc -Wswitch-default.
11048 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
11049 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11050 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11051 Move these decls to scan-skel.l, since they don't need to be
11052 visible elsewhere.
11053 * src/scan-skel.l: Accept the above decls.
11054 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
11055 is used.
11056
02650b7f
PE
110572006-01-21 Paul Eggert <eggert@cs.ucla.edu>
11058
11059 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
11060 since we don't want to insist on a version number at the start
11061 of the changelog every time.
11062 * Makefile.maint: Sync from coreutils a bit better.
11063 (sc_trailing_blank): Renamed from sc_trailing_space.
11064 All uses changed.
11065 (sc_no_if_have_config_h, sc_require_config_h):
11066 (sc_prohibit_assert_without_use): New rules.
11067 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
11068 (sc_dd_max_sym_length): Fix leading spaces in rule.
11069 (sc_system_h_headers): Prefix with @.
11070 (sc_useless_cpp_parens, m4-check): Output line numbers.
11071 (changelog-check): Allow version only in head.
11072 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
11073 satisfy new Makefile.maint rule.
11074 * data/glr.c: Likewise.
11075 * data/glr.cc: Likewise.
11076 * data/lalr1.cc: Likewise.
11077 * data/yacc.c: Likewise.
11078 * lib/ebitsetv.c: Likewise.
11079 * lib/lbitset.c: Likewise.
11080 * lib/subpipe.c: Likewise.
11081 * lib/timevar.c: Likewise.
11082 * src/system.h: Likewise.
11083 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
11084 * djgpp/Makefile.maint: Add copyright notice.
11085 * djgpp/README.in: Likewise.
11086 * djgpp/config.bat: Likewise.
11087 * djgpp/config.site: Likewise.
11088 * djgpp/config_h.sed: Likewise.
11089 * djgpp/djunpack.bat: Likewise.
11090 * djgpp/config.sed: Fix copyright notice to match standard format.
11091 * djgpp/subpipe.h: Likewise.
11092 * lib/bitsetv-print.c: Likewise.
11093 * lib/bitsetv.c: Likewise.
11094 * lib/subpipe.h: Likewise.
11095 * lib/timevar.c: Likewise.
11096 * lib/timevar.h: Likewise.
11097 * djgpp/subpipe.c: Use standard recipe for config.h.
11098 * lib/abitset.c: Likewise.
11099 * lib/bitset.c: Likewise.
11100 * lib/bitset_stats.c: Likewise.
11101 * lib/bitsetv-print.c: Likewise.
11102 * lib/bitsetv.c: Likewise.
11103 * lib/ebitsetv.c: Likewise.
11104 * lib/get-errno.c: Likewise.
11105 * lib/lbitset.c: Likewise.
11106 * lib/subpipe.c: Likewise.
11107 * lib/timevar.c: Likewise.
11108 * lib/vbitset.c: Likewise.
11109 * tests/local.at: Likewise.
11110 * src/scan-gram.l: Don't include verify.h, since system.h does
11111 that for us.
11112 * .x-sc_require_config_h: New file.
11113 * .x-sc_unmarked_diagnostics: New file.
11114
287c78f6
PE
111152006-01-20 Paul Eggert <eggert@cs.ucla.edu>
11116
287c78f6
PE
11117 Be a bit more systematic about using 'abort'.
11118 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
11119 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
11120 Put 'default: abort ();' before some other case, to satisfy older
11121 pedantic compilers.
11122 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11123 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
11124 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
11125 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
11126 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
11127 (get_decision_str, get_orientation_str, get_node_alignment_str):
11128 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
11129 (get_linestyle_str, get_arrowstyle_str): Likewise.
11130 * src/conflicts.c (resolve_sr_conflict):
11131 Use a default case rather than one for the one remaining enum
11132 value, to catch invalid enum values as well.
11133 * src/lalr.c (set_goto_map, map_goto):
11134 Prefer "assert (FOO);" to "if (!FOO) abort ();".
11135 * src/nullable.c (nullable_compute, token_definitions_output):
11136 Likewise.
11137 * src/reader.c (packgram, reader): Likewise.
11138 * src/state.c (transitions_to, state_new, state_reduction_find):
11139 Likewise.
11140 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
11141 (symbol_pack): Likewise.
11142 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
11143 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
11144 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
11145 * src/system.h: Don't include <assert.h>.
11146 (assert): New macro.
11147
11148 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
11149 (Destructor Decl, Parser Function, Pure Calling):
11150 Describe rules for braces inside C code more carefully.
287c78f6 11151
c66dfadd
PE
111522006-01-19 Paul Eggert <eggert@cs.ucla.edu>
11153
c21493b8
PE
11154 Fix some porting glitches found by Nelson H. F. Beebe.
11155 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
11156 compilers that don't understand that abort () does not return.
11157 * src/state.c (transitions_to): Likewise.
11158 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
11159 that '#include <cstdlib>' works.
11160 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
11161 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
11162 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
11163 for the benefit of some pre-C99 compilers.
11164
b6e3facf
PE
11165 * bootstrap: Undo changes to gnulib files that autoreconf made.
11166
c66dfadd
PE
11167 Minor fixups to get 'make maintainer-check' to work.
11168 * configure.ac: Don't use -Wnested-externs, as it's incompatible
11169 with the new verify.h implementation.
11170 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
11171 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
11172 * data/yacc.c (YYUSE): Likewise.
11173 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
11174 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
11175 * src/parse-gram.y (declaration): Don't pass a string constant
11176 to a function that expects char *, since GCC might complain
11177 about the constant value.
11178 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
11179 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
11180 before #defining them.
11181 * tests/glr-regression.at
11182 (Incorrectly initialized location for empty right-hand side in GLR):
11183 In yyerror, use the msg arg.
11184 (Corrupted semantic options if user action cuts parse):
11185 (Incorrect lookahead during deterministic GLR):
11186 (Incorrect lookahead during nondeterministic GLR):
11187 Don't name a local var 'index'; it shadows string.h's 'index'.
11188
ed94ef2a
AD
111892006-01-19 Akim Demaille <akim@epita.fr>
11190
11191 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
11192 location, not just parts of it.
11193
e9ad4aec
PE
111942006-01-18 Paul Eggert <eggert@cs.ucla.edu>
11195
d6ca7905
PE
11196 * NEWS: Document the fact that multiple %unions are now allowed.
11197 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
11198 * TODO: This feature is now implemented, so remove it from
11199 the wishlist.
d6ca7905 11200
ef1b70e0
PE
11201 * Makefile.maint: Merge with coreutils Makefile.maint.
11202 (CVS_LIST): Use build-aux version if available.
11203 (VERSION_REGEXP): New macro.
11204 (syntax-check-rules): Add sc_no_if_have_config_h,
11205 sc_prohibit_assert_without_use, sc_require_config_h,
11206 sc_useless_cpp_parens.
11207 (sc_obsolete_symbols): Check for O_NDELAY.
11208 (sc_dd_max_sym_length): Track coreutils.
11209 (sc_unmarked_diagnostics): Look in all files, not just *.c.
11210 (sc_useless_cpp_parens): New rule.
11211 (news-date-check): Look for version or today's date.
11212 (changelog-check): Don't require version number near head.
11213 (copyright-check): Use current year instead of hardwiring 2005.
11214 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
11215 (announcement): Add --gpg-key-ID.
11216
11217 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
11218 with "file system".
11219
2073ce56 11220 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
11221 array. Problem reported by twlevo.
11222 * src/reader.c (packgram): Prepend a new sentinel before ritem.
11223 * src/lalr.c (build_relations): Rely on new sentinel.
11224 * src/gram.c (gram_free): Adjust to new sentinel.
11225
b7691f15
JD
112262006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
11227
11228 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
11229 yylookaheadNeeds. All uses updated.
11230 (yysplitStack): Rename local yynewLookaheadStatuses to
11231 yynewLookaheadNeeds.
11232 * data/glr-regression.at (Incorrect lookahead during nondeterministic
11233 GLR): In comments, change `lookahead status' to `lookahead need'.
11234
ddee1b06
PH
112352006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11236
11237 * data/glr.c (yysplitStack): A little stylistic rewrite.
11238
12f4614d
PH
112392006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11240
11241 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
11242
32c29292
JD
112432006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
11244
11245 * doc/bison.texinfo: Fix some typos.
11246 (GLR Semantic Actions): New subsection discussing special
11247 considerations because GLR semantic actions might be deferred.
11248 (Actions): Mention look-ahead usage of yylval.
11249 (Actions and Locations): Mention look-ahead usage of yylloc.
11250 (Special Features for Use in Actions): Add YYEOF entry and mention it
11251 in the yychar entry.
11252 In the yychar entry, remove mention of the local yychar case (pure
11253 parser) since this is irrelevant information when writing semantic
148d66d8 11254 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
11255 yychar is otherwise described as an external variable.
11256 In the yychar entry, don't call it the `current' look-ahead since it
11257 isn't when semantic actions are deferred.
11258 In the yychar and yyclearin entries, add note about deferred semantic
11259 actions.
11260 Add yylloc and yylval entries discussing look-ahead usage.
11261 (Look-Ahead Tokens): When discussing yychar, don't call it the
11262 `current' look-ahead, and do mention yylval and yylloc.
11263 (Error Recovery): Cross-reference `Action Features' when mentioning
11264 yyclearin.
148d66d8 11265 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
11266 look-ahead.
11267 In the yylloc and yylval entries, mention look-ahead usage.
11268
de366a2f 112692006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
11270
11271 * tests/glr-regression.at: Update copyright year to 2006.
11272
bf70fa87
JD
112732006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11274
11275 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
11276 use during nondeterministic operation to track which stacks have
11277 actually needed the current lookahead.
11278 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
11279 Allocate, deallocate, resize, and otherwise shuffle space for
11280 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
11281 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
11282 appropriately during nondeterministic operation.
11283 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
11284 members to store the current lookahead to be used by the deferred
11285 user action.
11286 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
11287 from which the RHS is taken. Set the lookahead members of the new
11288 yySemanticOption according to the lookahead status for stack yyk.
11289 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
11290 yyaddDeferredAction.
11291 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
11292 members of yySemanticOption before invoking yyuserAction, and then set
11293 them back to their current values afterward.
11294 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
11295 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
11296 * tests/glr-regression.at: Remove `.' from the ends of recent test case
11297 titles for consistency.
11298 (Leaked merged semantic value if user action cuts parse): In order to
11299 suppress lint warnings, use arguments in merge function, and assign
11300 char value < 128 in main.
11301 (Incorrect lookahead during deterministic GLR): New test case.
11302 (Incorrect lookahead during nondeterministic GLR): New test case.
11303
05449a2c
JD
113042006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11305
de366a2f 11306 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
11307 !yyvaluep as signal that no semantic value is available to print.
11308 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
11309 to print a semantic value.
11310
4158e0a1 113112006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 11312
4158e0a1
JD
11313 * tests/glr-regression.at: For consistency with my newer test cases,
11314 don't thank myself.
11315
d659304d
JD
113162006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
11317
11318 * data/glr.c (yyresolveValue): When merging semantic options, if at
11319 least one user action succeeds but a later one cuts the parse, then
11320 destroy the semantic value before returning rather than leaking it.
11321 (yyresolveStates): If a user action cuts the parse and thus
11322 yyresolveValue fails, ignore the (unset) semantic value rather than
11323 corrupting the yyGLRState, and empty the semantic options list since
11324 the user actions should have called all necessary destructors.
11325 Simplify code with YYCHK.
11326 * tests/glr-regression.at (Corrupted semantic options if user action
11327 cuts parse): New test case.
11328 (Undesirable destructors if user action cuts parse): New test case.
11329 Before applying any of this patch, this test case never actually failed
11330 for me... but only because the corrupted semantic options usually
11331 masked this bug.
11332 (Leaked merged semantic value if user action cuts parse): New test
11333 case.
11334
6ec2c0f2
AD
113352006-01-05 Akim Demaille <akim@epita.fr>
11336
11337 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
11338
1b9c21fb
PE
113392006-01-04 Paul Eggert <eggert@cs.ucla.edu>
11340
11341 * data/c.m4 (b4_c_modern): New macro, with a new provision for
11342 _MSC_VER. Problem reported by Cenzato Marco.
11343 (b4_c_function_def): Use it.
11344 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
11345 b4_c_modern.
11346 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
11347 than rolling our own.
11348
84866159
AD
113492006-01-04 Akim Demaille <akim@epita.fr>
11350
11351 Also warn about non-used mid-rule values.
11352 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
11353 member.
11354 (symbol_list_new): Adjust.
11355 * src/reader.c (symbol_typed_p): New.
11356 (grammar_rule_check): Use it.
11357 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
11358 Check its rule.
11359 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
11360 Use it.
11361 * tests/actions.at (Exotic Dollars): Adjust.
11362
378f4bd8
AD
113632006-01-04 Akim Demaille <akim@epita.fr>
11364
11365 * src/reader.c (grammar_midrule_action): If $$ is set in a
11366 mid-rule, move the `used' bit to its lhs.
11367 * tests/input.at (Unused values): New.
11368 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
11369
e2a21b6f
PE
113702006-01-03 Paul Eggert <eggert@cs.ucla.edu>
11371
54662697
PE
11372 * doc/bison.texinfo (Bison Options): Say more accurately what
11373 --yacc does.
11374 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
11375 about declarations in the grammar when in Yacc mode, as POSIX does
11376 not require a diagnostic when the grammar uses extensions.
11377
11378 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
11379
073f9288
PE
11380 Warn about dubious constructions like "%token T T".
11381 Reported by twlevo.
11382 * src/symtab.h (struct symbol.declared): New member.
11383 * src/symtab.c (symbol_new): Initialize it to false.
11384 (symbol_class_set): New arg DECLARING, specifying whether
11385 this is a declaration that we want to warn about, if there
11386 is more than one of them. All uses changed.
11387
1221b78a
PE
11388 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
11389 Allow multiple %union directives, whose contents concatenate.
11390 * src/parse-gram.y (grammar_declaration): Likewise.
11391 Use muscle_code_grow, so that we don't need stype_line any more.
11392 All uses changed.
11393
11394 * src/muscle_tab.c (muscle_grow): Fix comment.
11395
e2a21b6f
PE
11396 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
11397 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
11398 Update copyright year to 2006.
11399
8f7e3cf9
AD
114002006-01-03 Akim Demaille <akim@epita.fr>
11401
11402 Have glr.cc pass (some of) the calc.at tests.
11403 * data/glr.cc (b4_parse_param_orig): New.
11404 (b4_parse_param): Improve its definition, and bound it more
11405 clearly in the skeleton.
11406 (b4_epilogue): Append, instead of prepending, in order to keep
11407 #line consistency.
11408 Simplify the generation of auxiliary functions: locations and
11409 purity are mandated.
11410 (b4_global_tokens_and_yystype): Honor it.
11411 * data/location.cc (c++.m4): Don't include it.
11412 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
11413 and AT_SKEL_CC_IF.
11414 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
11415 AT_LALR1_CC_IF.
11416 Be sure to initialize the first position's filename.
11417 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11418 mandated anyway.
11419 (AT_CHECK_CALC_GLR_CC): New.
11420 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11421
3953ed88
AD
114222006-01-02 Akim Demaille <akim@epita.fr>
11423
11424 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11425 c.m4.
0a96ba81 11426 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
11427 * data/glr.cc: Do not include stack.hh.
11428
9ecafbbf
AD
114292006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11430
11431 * data/glr.c: Reformat whitespace with tabs.
11432 (b4_lpure_formals): Remove this unused m4 macro.
11433 * tests/cxx-type.at: Reformat whitespace with tabs.
11434 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11435 since it's a member. Rename type to isNterm for clarity.
11436
c4d497a0
AD
114372005-12-29 Akim <akim@sulaco.local>
11438
11439 Let glr.cc catch up with symbol_value_print.
11440 * data/glr.cc (b4_yysymprint_generate): Replace by...
11441 (b4_yy_symbol_print_generate): this.
11442 (yy_symbol_print, yy_symbol_value_print): Declare them.
11443
4517da37
PE
114442005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11445
11446 * src/location.h (boundary): Note that a line or column equal
11447 to INT_MAX indicates an overflow.
11448 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11449 (rule_length_overflow, increment_rule_length, add_column_width):
11450 New functions.
11451 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11452 (<SC_BRACED_CODE>"}"):
11453 Use increment_rule_length rather than incrementing it by hand.
11454 (adjust_location, handle_syncline): Diagnose overflow.
11455 (handle_action_dollar, handle_action_at):
11456 Fix bug with monstrosities like $-2147483648.
11457 Remove now-unnecessary checks.
11458 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11459 (convert_ucn_to_byte): Verify assumptions.
11460 (handle_syncline): New arg LOC. All callers changed.
11461 Don't store through a value derived from char const * pointer.
11462
11463 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11464 GCC warnings.
11465
e3233bf6
PE
114662005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11467
11468 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11469 Remove unnecessary forward static decls.
11470
8f3596a6
AD
114712005-12-27 Akim Demaille <akim@epita.fr>
11472
11473 * src/reader.c (grammar_current_rule_check): Also check that $$
11474 is used.
11475 Take the rule to check as argument, hence rename as...
11476 (grammar_rule_check): this.
11477 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11478 Rename as...
11479 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11480 (grammar_midrule_action, grammar_symbol_append): Now static.
11481 * tests/torture.at (input): Don't rely on the default action
11482 being always performed.
11483 * tests/calc.at: "Set" $$ even when the action is "cut" with
11484 YYERROR or other.
11485 * tests/actions.at (Exotic Dollars): Instead of using unused
11486 values, check that the warning is issued.
11487
721be13c
PE
114882005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11489
11490 * NEWS: Improve wording for unused-value warnings.
11491
a0af42fc
AD
114922005-12-22 Akim Demaille <akim@epita.fr>
11493
11494 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11495 (b4_yysymprint_generate): Rename as...
11496 (b4_yy_symbol_print_generate): this.
11497 Generate yy_symbol_print instead of yysymprint.
11498 Generate also yy_symbol_value_print, and use it.
11499
affac613
AD
115002005-12-22 Akim Demaille <akim@epita.fr>
11501
721be13c 11502 * NEWS: Warn about unused values.
affac613
AD
11503 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11504 a `used' member.
11505 (symbol_list_n_get, symbol_list_n_used_set): New.
11506 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11507 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11508 * src/reader.c (grammar_current_rule_check): Check that values are
11509 used.
11510 * src/symtab.c (symbol_print): Accept 0.
11511 * tests/existing.at: Remove the type information.
11512 Empty the actions.
11513 Remove useless actions (beware of mid-rule actions: perl -000
11514 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11515 * tests/actions.at (Exotic Dollars): Use unused values.
11516 * tests/calc.at: Likewise.
11517 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11518 Likewise.
11519
11520 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11521 rule_useful_p.
11522
9d9b8b70
PE
115232005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11524
8bb4c753
PE
11525 Undo 2005-12-01 tentative license wording change. The wording is
11526 still being reviewed by the lawyers, and we don't want to wait for
11527 them before publishing a test release. For now, revert to the
11528 previous wording.
11529 * NEWS: Undo 2005-12-01 change.
11530 * data/glr.c: Revert to previous license wording.
11531 * data/glr.cc: Likewise.
11532 * data/lalr1.cc: Likewise.
11533 * data/location.cc: Likewise.
11534 * data/yacc.c: Likewise.
11535
9d9b8b70
PE
11536 * NEWS: Reword %destructor vs YYABORT etc.
11537 * data/glr.c: Use American spacing, for consistency.
11538 * data/glr.cc: Likewise.
11539 * data/lalr1.cc: Likewise.
11540 * data/yacc.c: Likewise.
11541 * data/yacc.c: Reformat comments slightly.
11542 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11543 for consistency. Fix some spelling errors and reword recently-included
11544 text slightly.
11545 * tests/cxx-type.at: Cast results of malloc, for C++.
11546
2c3b392a
AD
115472005-12-21 Joel E. Denny <address@hidden>
11548
11549 * tests/cxx-type.at: Construct a tree, count the parents of shared
11550 nodes, and free each node once and only once. Previously, the memory
11551 for semantic values was leaked instead.
11552
d6cff4dc
AD
115532005-12-21 Joel E. Denny <address@hidden>
11554
11555 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11556 (yylval, yylloc): If pure, #define to yystackp->yyval and
11557 yystackp->yyloc similar to yychar and yynerrs.
11558 (yyparse): If pure, remove local yylval and yylloc. Add local
11559 yystackp to accommodate pure definitions of yylval and yylloc.
11560 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11561 yylvalp and yyllocp to &yylval and &yylloc.
11562 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11563 namespace. Previously, nerrs and char were missing, but lval and lloc
11564 weren't necessary.
11565 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11566 yylvalp and yyllocp parameters since, if pure, these are now always
11567 accessible through yystackp. If not pure, they are still accessible
11568 globally.
11569 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11570 `if (YYID (N))' to pacify lint.
11571
a85284cf
AD
115722005-12-21 Akim Demaille <akim@epita.fr>
11573
11574 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11575 destroy the RHS symbols of a rule.
11576 * data/yacc.c (yylen): Initialize to 0.
11577 Keep its value to the number of items to possibly shift.
11578 In particular, a regular successful parse that ends on YYFINAL by
11579 a (internal) YYACCEPT must not have yylen != 0.
11580 (yyerrorlab, yyreturn): Pop the RHS.
11581 Reorder a bit to emphasize the `shifting' bits of code.
11582 (YYPOPSTACK): Now accept a number of items to pop.
11583 * data/lalr1.cc: Likewise.
11584 * data/glr.c: Formatting changes.
11585 Use goto instead of fall through.
11586 * doc/bison.texinfo (Destructor Decl): Complete.
11587
d508c281
JMG
115882005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11589
11590 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11591 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11592 * djgpp/config.bat: Replace every occurence of the file name
11593 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11594 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11595 * djgpp/config.sed: Replace every occurence of the file name
11596 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11597 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11598 * djgpp/djunpack.bat: DJGPP specific file.
11599 * djgpp/fnchange.lst: DJGPP specific file.
11600 * djgpp/README.in: Add new information about how to unpack the bison
11601 source on MSDOS and other systems which have 8.3 file name restrictions
11602 using djunpack.bat and fnchange.lst.
11603
3e7a2cd9
PE
116042005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11605
11606 * bootstrap (build_cvs_prefix): Remove; unused.
11607 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11608 when getting gnulib.
11609
116102005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11611
11612 * data/glr.c: Reorder typedef declarations for structs to match order
11613 of struct declarations.
11614 Rename yystack everywhere to yystackp except in yyparse where it's not
11615 a pointer.
11616 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11617 consistency.
11618 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11619 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11620 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11621 lint.
11622
877519f8
PE
116232005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11624
0eca5a39
PE
11625 * tests/sets.at (Accept): Fix typos in regular expression used to
11626 sed out the final state number.
11627
2cec9080
PE
11628 Work around portability problem on Solaris 10: flex-generated
11629 files include <stdio.h> before <config.h>, which messes up
11630 because the latter defines __EXTENSIONS__. Address the problem
11631 by creating two new little files that include <config.h> first,
11632 then include the flex-generated files. Rewrite everyone else
11633 to include <config.h> first, as well.
11634 * lib/timevar.c: Always include "config.h".
11635 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11636 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11637 (EXTRA_bison_SOURCES): New macro.
11638 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11639 * src/system.h: Don't include config.h.
11640 * src/LR0.c: Include <config.h> first.
11641 * src/assoc.c: Likewise.
11642 * src/closure.c: Likewise.
11643 * src/complain.c: Likewise.
11644 * src/conflicts.c: Likewise.
11645 * src/derives.c: Likewise.
11646 * src/files.c: Likewise.
11647 * src/getargs.c: Likewise.
11648 * src/gram.c: Likewise.
11649 * src/lalr.c: Likewise.
11650 * src/location.c: Likewise.
11651 * src/main.c: Likewise.
11652 * src/muscle_tab.c: Likewise.
11653 * src/nullable.c: Likewise.
11654 * src/output.c: Likewise.
11655 * src/parse-gram.y: Likewise.
11656 * src/print.c: Likewise.
11657 * src/print_graph.c: Likewise.
11658 * src/reader.c: Likewise.
11659 * src/reduce.c: Likewise.
11660 * src/relation.c: Likewise.
11661 * src/state.c: Likewise.
11662 * src/symlist.c: Likewise.
11663 * src/symtab.c: Likewise.
11664 * src/tables.c: Likewise.
11665 * src/uniqstr.c: Likewise.
11666 * src/vcg.c: Likewise.
11667
877519f8
PE
11668 * src/parse-gram.y: Fix minor problems uncovered by lint.
11669 (current_lhs, current_lhs_location): Now static.
11670 (current_assoc): Remove unused variable.
11671
11672 Cleanups so that Bison-generated parsers have less lint.
11673 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11674 Prepend /*ARGSUSED*/, for lint's sake.
11675 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11676 definition if 'lint' is defined.
11677 (YYID): New macro (or function, if lint).
11678 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11679 * data/yacc.c: Likewise.
11680 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11681 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11682 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11683 is C++ only.
11684 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11685 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11686 Use YYID(0) rather than 0, for lint.
11687 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11688 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11689
f5228370
PE
116902005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11691
11692 * tests/glr-regression.at
11693 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11694 Close memory leak reported by twlevo.
11695
69ce078b
PE
116962005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11697
6ff99711
PE
11698 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11699 all stacks.
11700 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
11701 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11702 New test case.
11703 (Duplicated user destructor for lookahead): This test now is expected
11704 to succeed.
11705
af3412cd
PE
117062005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11707
32b5b719 11708 * NEWS: Document the following change.
af3412cd
PE
11709 * data/yacc.c: Say "parser skeleton" rather than "file", since
11710 it's no longer just a file.
11711 * data/glr.c: Grant a special exception for C GLR parsers, that
11712 reads like the already-existing exception for C LALR(1) parsers.
11713 * data/glr.cc: Likewise.
11714 * data/lalr1.cc: Likewise.
11715 * data/location.cc: Likewise.
11716 * data/yacc.c: Reword the "written by" statement to clarify that
11717 it was the parser skeleton, not the entire output file.
11718 * data/glr.c: Written by Paul Hilfinger.
11719 * data/glr.cc: Written by Akim Demaille.
11720 * data/lalr1.cc: Likewise.
11721
035aa4a0
PE
117222005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11723
d9963c85
PE
11724 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11725 Fix typos in previous change that broke 'make check'.
11726 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11727 supported in C.
11728 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11729 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11730 We can revert this once things settle down.
11731
035aa4a0
PE
11732 * src/conflicts.c (conflicts_print): Don't print file name twice
11733 when %expect fails because there were no conflicts.
11734 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11735 change.
11736 * tests/conflicts.at (%expect not enough, %expect too much):
11737 (%expect with reduce conflicts): Adjust to new behavior.
11738
117392005-11-18 Akim Demaille <akim@epita.fr>
11740
11741 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11742 errors.
11743 * NEWS: Document this.
11744 * doc/bison.texinfo (Expect Decl): Likewise.
11745
d1ff7a7c
AD
117462005-11-16 Akim Demaille <akim@epita.fr>
11747
11748 Generalize the display of semantic values and locations in traces.
11749 * data/glr.c (yy_reduce_print): Fix indices (again).
11750 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11751 literal integers.
11752 * data/lalr1.cc (yyreduce_print): Rename as...
11753 (yy_reduce_print): this.
11754 Display values and locations.
11755 * data/yacc.c (yy_reduce_print): Likewise.
11756 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11757 (yysymprint): Move higher to be visible from yy_reduce_print).
11758 (yyparse): Adjust.
11759 * tests/calc.at: Adjust the expected length of the traces.
11760
6de5398d
AD
117612005-11-14 Akim Demaille <akim@epita.fr>
11762
11763 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11764 from 1 to N, while values and location start at 0.
11765 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11766
a1373f55
AD
117672005-11-14 Akim Demaille <akim@epita.fr>
11768
11769 * data/glr.c (yy_reduce_print): Fix the $ number.
11770
613d8952
AD
117712005-11-14 Akim Demaille <akim@epita.fr>
11772
11773 "Use" parse parameters.
11774 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11775 * data/glr.c, data/glr.cc: Use them.
11776 * data/glr.c (YYUSE): Have a C++ definition that supports
11777 non-pointer types.
11778
b2741627
AD
117792005-11-14 Akim Demaille <akim@epita.fr>
11780
11781 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11782
5059b5c8
AD
117832005-11-14 Akim Demaille <akim@epita.fr>
11784
42249483
AD
11785 * data/glr.cc: New.
11786 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 11787
4626a15d
AD
117882005-11-12 Akim Demaille <akim@epita.fr>
11789
11790 Let position and location be PODs.
11791 * data/location.cc (position::initialize, location::initialize): New.
11792 (position::position, location::location): Define only if
11793 b4_location_constructors is defined.
11794 * data/lalr1.cc (b4_location_constructors): Define it for backward
11795 compatibility.
11796 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11797
117982005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
11799
11800 * data/lalr1.cc: Move the body of the ctor and dtor into the
11801 parser file (instead of the header).
11802 Wrap the implementations in a "namespace yy".
11803
118042005-11-12 Akim Demaille <akim@epita.fr>
11805
11806 Have glr.c include its header file when created.
11807 * data/glr.c (b4_shared_declarations): New.
11808 Output them verbatim in the parser if !%defines, otherwise
11809 output then in the header file, and include it instead.
11810
1989d947
AD
118112005-11-11 Akim Demaille <akim@epita.fr>
11812
11813 * data/glr.c: Comment changes.
11814
118152005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
11816
11817 When yydebug, report semantic and location values for reductions.
11818 * data/glr.c (yy_reduce_print): Report the semantic values and the
11819 locations.
11820 (YY_REDUCE_PRINT): Adjust.
11821 (yyglrReduce): Use them.
11822 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11823 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11824 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11825 traces.
11826
02998094
AD
118272005-11-10 Akim Demaille <akim@epita.fr>
11828
11829 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11830 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11831 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11832
5210672f
PE
118332005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11834
11835 * m4/cxx.m4, examples/Makefile.am: Don't build
11836 examples/calc++ if no C++ compiler is available. (trivial change)
11837
a8991a1d
AD
118382005-11-09 Akim Demaille <akim@epita.fr>
11839
11840 * src/scan-skel.l: Use a couple of asserts.
11841
36b5e963
AD
118422005-11-03 Akim Demaille <akim@epita.fr>
11843
11844 In some (weird) cases, the final state number is incorrect.
11845 Reported by Alexandre Duret-Lutz.
11846 * src/LR0.c (state_list_append): Remove the computation of
11847 final_state.
11848 (save_reductions): Do it here.
11849 (get_state): Alpha conversion.
11850 (generate_states): Use a for loop.
11851 * src/gram.h (item_number_is_rule_number)
11852 (item_number_is_symbol_number): New.
11853 * src/state.c: Use assert.
11854 * src/system.h: Include assert.h.
11855 * tests/sets.at (Accept): New.
11856
44e7ead1
PH
118572005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11858
11859 * data/glr.c (yyfill): Adjust comment.
36b5e963 11860 (yyresolveAction): Initialize default location properly
44e7ead1
PH
11861 for empty right-hand sides.
11862 (yydoAction): Ditto.
11863 Add comment explaining apparently dead code.
36b5e963
AD
11864 * tests/glr-regression.at
11865 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 11866 New test.
36b5e963 11867
e10a80ee
PE
118682005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11869
11870 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11871 gnulib when interrupted. This fixes some race conditions and
11872 works around some portability problems (one noted by Paul
11873 Hilfinger).
11874
067b32ee
AD
118752005-10-22 Akim <akim@epita.fr>
11876
11877 * Makefile.cfg: Adjust to config -> build-aux.
11878 Reported by twledo.
11879
4b367315
AD
118802005-10-21 Akim Demaille <akim@epita.fr>
11881
11882 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11883 the %parse-params.
11884 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11885 * data/yacc.c (b4_Pure_if): Rename as...
11886 (b4_yacc_pure_if): this.
11887 (YY_SYMBOL_PRINT, yyparse): Adjust.
11888 * doc/bison.texinfo: Formatting changes.
11889
24cc23d9
AD
118902005-10-21 Akim Demaille <akim@epita.fr>
11891
11892 Finish the transition config -> build-aux.
11893 * configure.ac, Makefile.am: Use build-aux.
11894 * config/prev-version, config/announce-gen, config/Makefile.am:
11895 Move to...
11896 * build-aux/prev-version, build-aux/announce-gen,
11897 * build-aux/Makefile.am: here.
11898
d4476375
AD
118992005-10-14 Akim Demaille <akim@epita.fr>
11900
11901 * examples/calc++/test: Use set -x only when VERBOSE.
11902
302c0aee
PE
119032005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11904
11905 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11906 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11907
7625ec2c
AD
119082005-10-13 Akim Demaille <akim@epita.fr>
11909
11910 * src/scan-skel.l: Output the base name parts of the parser and
11911 header file names.
302c0aee 11912 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
11913 additional checks.
11914 Use this to exercise C++ outputs in subdirs.
11915 Reported by Oleg Smolsky.
11916
ba0fe3c7
PE
119172005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11918
11919 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11920 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11921 Problem reported by John P. Hartmann.
11922 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11923 already defined it.
11924
9b8a5ce0
AD
119252005-10-12 Akim Demaille <akim@epita.fr>
11926
11927 * src/parse-gram.y (version_check): Exit 63 to please missing
11928 (stands for "version mismatch).
11929 * tests/input.at, doc/bison.texinfo: Adjust.
11930
4f6e011e
PE
119312005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11932
11933 Work around portability problems with Visual Age C compiler
11934 (xlc and xlC_r) reported by John P. Hartmann.
11935 * data/location.cc (initial_column, initial_line): Remove.
11936 All uses replaced by 0 and 1.
11937 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11938 that xlc complains about.
11939 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 11940 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 11941 as __STDC__.
4d7aa45e
PE
11942 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11943 __STDC_VERSION__. Use it everywhere instead of looking at
11944 __STDC__ and __cplusplus.
4f6e011e 11945
a1b3bf8c
AD
119462005-10-10 Akim Demaille <akim@epita.fr>
11947
11948 * examples/calc++/test: Be quiet unless VERBOSE.
11949
412e44aa
PE
119502005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11951
2a4647a3
PE
11952 * data/c.m4 (yydestruct, yysymprint):
11953 Use YYUSE instead of casting to void.
11954 * data/glr.c (YYUSE): New macro.
11955 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11956 Use it instead of rolling our own.
11957 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11958 (YYCHK1):
11959 Use /*CONSTCOND*/ to suppress lint warnings.
11960 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11961 (YY_STACK_PRINT): Use 'false' not '0'.
11962 (YYUSE): New macro.
11963 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11964 * data/yacc.c (YYUSE): New macro.
11965 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11966 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11967 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11968
11969
412e44aa
PE
11970 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
11971 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
11972
88c6637f
PE
119732005-10-04 Paul Eggert <eggert@cs.ucla.edu>
11974
2f4f028d
PE
11975 Undo the parts of the unlocked-I/O change that substituted
11976 putc or puts for printf. This might hurt performance a bit,
11977 but some people prefer the printf style.
11978 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
11979 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
11980 All uses replaced by YYFPRINTF and YYDPRINTF.
11981 * data/yacc.c: Likewise.
11982 * lib/bitset.c (bitset_print): Likewise.
11983 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
11984 putc and puts.
11985 * lib/lbitset.c (debug_lbitset): Likewise.
11986 * src/closure.c (print_firsts, print_fderives): Likewise.
11987 * src/gram.c (grammar_dump): Likewise.
11988 * src/lalr.c (look_ahead_tokens_print): Likewise.
11989 * src/output.c (escaped_output): Likewise.
11990 (user_actions_output): Break apart two printfs.
11991 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
11992 * src/reduce.c (reduce_print): Likewise.
11993 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
11994 * src/system.h: Include unlocked-io.h rathe than stdio.h.
11995
88c6637f
PE
11996 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11997 Use assignments rather than casts-to-void to suppress
11998 unused-variable warnings. This pacifies 'lint'.
11999 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
12000 unused-variable warnings.
12001
fb32e373
JMG
120022005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
12003
12004 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
12005
edb8f44f
PE
120062005-10-02 Paul Eggert <eggert@cs.ucla.edu>
12007
fb9c0b33
PE
12008 Use unlocked I/O for a minor performance improvement on hosts like
12009 GNU/Linux and Solaris that support unlocked I/O. The basic idea
12010 is to use the gnlib unlocked-io module, and to prefer putc and
12011 puts to printf when either will work (since the latter doesn't
12012 come in an unlocked flavor).
12013 * bootstrap (gnulib_modules): Add unlocked-io.
12014 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
12015 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
12016 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
12017 and similarly for puts and putc and printf.
12018 * data/yacc.c: Likewise.
12019 * lib/bitset.c (bitset_print): Likewise.
12020 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
12021 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
12022 to printf.
12023 * lib/lbitset.c (debug_lbitset): Likewise.
12024 * src/closure.c (print_firsts, print_fderives): Likewise.
12025 * src/gram.c (grammar_dump): Likewise.
12026 * src/lalr.c (look_ahead_tokens_print): Likewise.
12027 * src/output.c (escaped_output): Likewise.
12028 (user_actions_output): Coalesce two printfs.
2f4f028d 12029 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
12030 * src/reduce.c (reduce_print): Likewise.
12031 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 12032 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 12033
edb8f44f
PE
12034 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
12035 this confuses xgettext.
12036
b50d2359
AD
120372005-10-02 Akim Demaille <akim@epita.fr>
12038
12039 * bootstrap (gnulib_modules): Add strverscmp.
12040 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
12041 * m4/.cvsignore: Add strverscmp.m4.
12042 * src/parse-gram.y (%require): New token, new rule.
12043 (version_check): New.
12044 * src/scan-gram.l (%require): Adjust.
12045 * tests/input.at (AT_REQUIRE): New.
12046 Use it.
12047 * doc/bison.texinfo (Require Decl): New.
12048 (Calc++ Parser): Use %require.
12049
21667f64
AD
120502005-10-02 Akim Demaille <akim@epita.fr>
12051
12052 * data/location.cc: New.
12053
2b81e969
AD
120542005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
12055 Akim Demaille <akim@epita.fr>
12056
12057 Make sure -odir/foo.cc creates dir/location.hh etc.
12058 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
12059 (spec_file_prefix, spec_verbose_file, spec_graph_file)
12060 (spec_defines_file): Now const.
12061 (dir_prefix): New.
12062 (short_base_name): Remove.
12063 * src/files.c: Adjust.
12064 (dirname.h): Include.
12065 (base_name): Don't prototype it.
12066 (finput): Remove, duplicates gram_in.
12067 (full_base_name, short_base_name): Replace by...
12068 (all_but_ext, all_but_tab_ext): these.
12069 (compute_base_names): Rename as...
12070 (compute_file_name_parts): this.
12071 Update to compute the new variables, including dir_prefix.
12072 Adjust dependencies.
12073 * src/output.c (prepare): Output them.
12074 * src/reader.c: Adjust to use gram_in, not finput.
12075 * src/scan-skel.l (@dir_prefix@): New.
12076
ad6a9b97
JMG
120772005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
12078
12079 * lib/subpipe.c: New function end_of_output_subpipe() added
12080 to allow support for non-posix systems. This is a no-op function
12081 for posix systems.
12082
12083 * lib/subpipe.h: New function end_of_output_subpipe() added
12084 to allow support for non-posix systems. This is a no-op function
12085 for posix systems.
12086
12087 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
12088 handle the lack of pipe/fork functionality on non-posix systems.
12089
12090 * djgpp/Makefile.maint: DJGPP specific file.
12091
12092 * djgpp/README.in: DJGPP specific file.
12093
12094 * djgpp/config.bat: DJGPP specific configuration file.
12095
12096 * djgpp/config.sed: DJGPP specific configuration file.
12097
12098 * djgpp/config.site: DJGPP specific configuration file.
12099
12100 * djgpp/config_h.sed: DJGPP specific configuration file.
12101
12102 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
12103
12104 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
12105
fc695704
AD
121062005-10-02 Akim Demaille <akim@epita.fr>
12107
12108 * data/location.cc: New, extract from...
12109 * data/lalr1.cc: here.
12110 (location.hh): Include it after the user prologue, in case the
12111 filename type is defined by the user.
12112 Forward declation location and position before the pre-prologue.
12113 (yyresult_): Rename as...
12114 (yyresult): this, it's a local variable, not an attribute.
12115 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
12116
121172005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
12118
12119 * examples/extexi: Restore the #line generation.
12120
fb9712a9
AD
121212005-09-30 Akim Demaille <akim@epita.fr>,
12122 Alexandre Duret-Lutz <adl@gnu.org>
12123
12124 Move the token type and YYSTYPE in the parser class.
12125 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
12126 (parser::token): New, from the moved free definition of tokens.
12127 (parser::semantic_value): Now a full definition instead of an
12128 indirection to YYSTYPE.
12129 (b4_post_prologue): No longer included in the header file, but
12130 in the implementation file.
12131 * doc/bison.texi (C+ Language Interface): Update.
12132 * src/parse-gram.y: Support unary %define.
12133 * tests/actions.at: Define global_tokens_and_yystype for backward
12134 compatibility until we update the tests.
12135 * tests/calc.at: Idem.
12136 (first_line, first_column, last_line, last_column): Define for lalr1.cc
12137 to simplify the code.
12138
55f0c7b1
PE
121392005-09-29 Paul Eggert <eggert@cs.ucla.edu>
12140
12141 Port to SunOS 4.1.4, which lacks strtoul and strerror.
12142 Ah, the good old days! Problem reported by Peter Klein.
12143 * bootstrap (gnulib_modules): Add strerror, strtoul.
12144 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
12145 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
12146
fb9712a9 121472005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
12148
12149 * data/c.m4 (b4_error_verbose_if): New.
12150 * data/lalr1.cc: Use it.
12151 (YYERROR_VERBOSE_IF): Remove.
12152 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
12153 parser members, replaced by...
12154 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
12155 local variables.
12156 (yysyntax_error_): Takes the state number as argument.
12157 (yyreduce_print_): Use the argument yyrule, not the former
12158 attribute yyn_.
12159
8a6f72f3
PE
121602005-09-26 Paul Eggert <eggert@cs.ucla.edu>
12161
12162 * bootstrap (gnulib_modules): Add verify.
12163 * lib/.cvsignore: Add verify.h.
12164 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
12165 * src/system.h (verify): Remove.
12166 Include verify.h instead.
12167 * src/tables.c (tables_generate): Use new API for 'verify'.
12168
0d50976f
PE
121692005-09-21 Paul Eggert <eggert@cs.ucla.edu>
12170
ebc3737e
PE
12171 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
12172 local variables whose names begin with 'yy'.
12173 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12174 Trivial changes from Joel E. Denny.
12175
0d50976f
PE
12176 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
12177 it itself.
12178 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
12179 don't use alloca any more.
12180
12181 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
12182 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 12183 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
12184 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
12185 to match yacc.c, to test more hosts.
12186
a05b79df
PE
121872005-09-20 Paul Eggert <eggert@cs.ucla.edu>
12188
55289366
PE
12189 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
12190 doesn't affect behavior.
12191 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
12192 Solaris, AIX, MSC.
12193 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
12194 This works a bit better with glibc, if user code has already included
12195 stdlib.h.
12196 * doc/bison.texinfo (Bison Parser): Document that users can't
12197 arbitrarily use malloc and free for other purposes. Document
12198 that <alloca.h> and <malloc.h> might be included.
12199 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
12200 user must declare alloca.
12201
a05b79df
PE
12202 * HACKING (release): Forwarn the Translation Project about
12203 stable releses.
12204
3ab2ca22
AD
122052005-09-20 Akim Demaille <akim@epita.fr>
12206
12207 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
12208
a9739e7c
PE
122092005-09-19 Paul Eggert <eggert@cs.ucla.edu>
12210
a702593e
PE
12211 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
12212 (YYSTACK_ALLOC_MAXIMUM): Use it.
12213 (yysyntax_error): New function.
12214 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
12215 multiple syntax errors are reported, and alloca is being used.
12216 Instead, reallocate buffers twice as big each time, so that
12217 we waste at most half the allocated memory. Start with a small
12218 (128-byte) buffer that will suffice in most cases anyway.
12219 Use yysyntax_error to do most of the work.
12220
12221 * doc/bison.texinfo (Error Reporting, Table of Symbols):
12222 yynerrs is the number of errors reported, not the number of
12223 errors encountered.
12224
a9739e7c
PE
12225 * tests/glr-regression.at (Duplicated user destructor for lookahead):
12226 Mark it as expected to fail.
12227 Cast result of malloc; problem reported by twlevo@xs4all.nl.
12228 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
12229 Don't start user-code symbols with "yy", to avoid name space problems.
12230
f479c6c6
AD
122312005-09-19 Akim Demaille <akim@epita.fr>
12232
12233 Remove the traits, failed experiment.
12234 It never proved useful, and anyway because of the current
12235 definition, it was not possible to have several specialization of
12236 this traits, making it useless.
12237 * data/lalr1.cc (yy:traits): Remove.
12238 Inline its definitions in the parser class.
12239
e2586f82
AD
122402005-09-19 Akim Demaille <akim@epita.fr>
12241
12242 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
12243 least Mac OSX with a /usr/local install of gettext.
12244
2e8cf949
AD
122452005-09-19 Akim Demaille <akim@epita.fr>
12246
12247 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
12248 and yytoken for similarity with the other skeletons.
12249
c7fb0b90
AD
122502005-09-19 Akim Demaille <akim@epita.fr>
12251
4e26c69e 12252 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 12253
1bd0deda
PE
122542005-09-16 Paul Eggert <eggert@cs.ucla.edu>
12255
12256 * NEWS: Version 2.1.
12257
12258 * NEWS: Remove notice of yytname change, since it was never in an
12259 official release.
12260 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
12261 diagnostic.
12262 * src/output.c (prepare): Likewise.
12263 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
12264 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
12265 is not defined. This is an awful hack, but it's enough for now.
12266 All callers changed.
12267 * tests/glr-regression-at (make_value): Args are const pointers now,
12268 to avoid GCC warning.
12269 (Duplicated user destructor for lookahead): New test. Currently
12270 skipped. It fails on my host but I'm not sure it'll always fail.
12271
122722005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
12273
12274 * src/symtab.h (struct symbol): Declare the printer and destructor
12275 as const, to avoid accidental calls to free.
12276 (symbol_destructor_set, symbol_printer_set): Adjust.
12277 * src/symtab.c: Adjust.
12278
1bd0deda 122792005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
12280
12281 * data/c.m4 (b4_token_enums): New.
12282 (b4_token_defines): Rename as...
12283 (b4_token_enums_defines): this.
12284 (b4_token_defines): New, output only the #defines.
12285 * data/yacc.c, data/glr.c: Adjust.
12286 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
12287 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
12288 as default values.
12289
dbcdae2d
AD
122902005-09-16 Akim Demaille <akim@epita.fr>
12291
12292 * data/lalr1.cc (yylex_): Remove, inline its code.
12293 (yyreport_syntax_error_): Remove, replaced by...
12294 (yysyntax_error_): this which returns a string and leaves to the
12295 caller the call to the users' error function.
12296 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
12297 Move from members of the parser object...
12298 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
12299 to local variables of the parse function.
12300
70d8f291
AD
123012005-09-16 Akim Demaille <akim@epita.fr>
12302
12303 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
12304 since it's in Bison's name space.
12305
b47dbebe
PE
123062005-09-15 Paul Eggert <eggert@cs.ucla.edu>
12307
ae199bf1
PE
12308 * data/glr.c (yyresolveValue): Add default case to pacify
12309 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
12310
b47dbebe
PE
12311 * NEWS: Document when yyparse started to return 2.
12312 * doc/bison.texinfo (Parser Function): Document when yyparse
12313 returns 2.
12314
12315 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
12316 (b4_filename_type): Renamed back from b4_file_name_type. All uses
12317 changed.
12318 (class position): file_name -> filename (reverting). All uses changed.
12319
123202005-09-14 Paul Eggert <eggert@cs.ucla.edu>
12321
12322 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
12323 do anything if $@ exists. This reverts part of the 2005-07-07
12324 patch.
12325
00292f66
PE
123262005-09-11 Paul Eggert <eggert@cs.ucla.edu>
12327
12328 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
12329 contains obsolete information and isn't worth distributing as a
12330 separate file anyway.
12331 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
12332 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
12333 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
12334 (yyparse): Abort if user code uses longjmp to throw an unexpected
12335 value.
12336
a420f962
PE
123372005-09-09 Paul Eggert <eggert@cs.ucla.edu>
12338
00292f66
PE
12339 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
12340 Suggested by twlevo@xs4all.nl.
12341
127287e9
PE
12342 * data/glr.c (YYCHK1): Do not assume YYE is in range.
12343 This avoids a diagnostic from gcc -Wswitch-enum.
12344 Problem reported by twlevo@xs4all.nl.
12345
a420f962
PE
12346 * doc/bison.texinfo: Don't use "filename", as per GNU coding
12347 standards. Use "file name" or "file" or "name", depending on
12348 the context.
12349 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
12350 not to hack/foo.tab.c.
12351 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
12352 * data/glr.c: b4_filename -> b4_file_name.
12353 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
12354 All uses changed.
12355 (class position): filename -> file_name. All uses changed.
12356 * data/yacc.c: b4_filename -> b4_file_name.
12357 * lib/bitset.h: filename -> file_name in local vars.
12358 * lib/bitset_stats.c: Likewise.
12359 * src/files.c: Likewise.
12360 * src/scan-skel.l ("@output ".*\n): Likewise.
12361 * src/files.c (file_name_split): Renamed from filename_split.
12362 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
12363
123642005-09-08 Paul Eggert <eggert@cs.ucla.edu>
12365
12366 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
12367 to accommodate latest gnulib.
12368
12369 * tests/glr-regression.at (Duplicate representation of merged trees):
12370 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
12371
12372 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
12373 needed.
12374
42a6501d
PE
123752005-08-26 Paul Eggert <eggert@cs.ucla.edu>
12376
12377 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
12378 All uses changed. Invoke user destructor after an error during a
12379 split parse (trivial change from Joel E. Denny).
12380
12381 * tests/glr-regression.at
12382 (User destructor after an error during a split parse): New test case.
12383 Problem reported by Joel E. Denny in:
12384 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
12385
ef9a1faf
PE
123862005-08-25 Paul Eggert <eggert@cs.ucla.edu>
12387
5b4aaf78
PE
12388 * README-cvs: Give URLs for recommended tools.
12389 Mention Gzip version problem, and bootstrapping issues.
12390 Remove troubleshooting section, as it's somewhat obsolete.
12391
b5240ba5
PE
12392 * bootstrap (no_cache): New var, to accommodate different wget
12393 variants. Use it instead of '-C off'. Problem reported by
12394 twlevo@xs4all.nl.
12395
ef9a1faf
PE
12396 * data/glr.c (yydestroyStackItem): New function.
12397 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
12398 debugging information. Problem reported by Joel E. Denny.
12399
e6efa9da
AD
124002005-08-25 Akim Demaille <akim@epita.fr>
12401
12402 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
12403
adc90f13
PE
124042005-08-24 Paul Eggert <eggert@cs.ucla.edu>
12405
12406 * data/glr.c (yyrecoverSyntaxError, yyreturn):
12407 Don't invoke destructor on unresolved entries.
12408 * tests/glr-regression.at
12409 (User destructor for unresolved GLR semantic value): New test case.
12410 Problem reported by Joel E. Denny in:
12411 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
12412
f9315de5
PE
124132005-08-21 Paul Eggert <eggert@cs.ucla.edu>
12414
15d29c1f
PE
12415 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12416 Add strnlen.c.
12417 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12418 lib-prefix.m4, po.m4.
12419
dd5f2af2
PE
12420 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12421 in yydestruct diagnostic, since it might not be an error.
12422 Problem reported by Joel Denny near end of
12423 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 12424 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
12425 * data/yacc.c (yyreturn): Likewise.
12426 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12427
12428 * src/files.c: Remove obsolete FIXME comment.
12429
12430 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12431 with the other templates, and to fix bogus run-on messages such
12432 as the one reported at the end of
12433 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12434 All callers changed to avoid the newline.
12435 (yyprocessOneStack): Output two lines rather than one, to accommodate
12436 the above change. This changes the debug output format slightly.
12437
f9315de5
PE
12438 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12439 reported by Joel E. Denny in
12440 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12441 (trivial change).
12442 * tests/glr-regression.at (Duplicate representation of merged trees):
12443 New test, from Joel E. Denny in:
12444 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12445 * THANKS: Add Joel E. Denny.
12446
12447 * configure.ac (AC_INIT): Bump to 2.0c.
12448
04098407
PE
124492005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12450
12451 * NEWS: Version 2.0b.
12452
ca5d2013
PE
12453 * Makefile.am (SUBDIRS): Put examples before tests, so that
12454 "make check" doesn't finish with "All 1 tests passed".
12455
3d54b576
PE
12456 * tests/regression.at (Token definitions): Don't rely on
12457 AT_PARSER_CHECK for data that contains backslashes. It currently
12458 uses 'echo', and 'echo' isn't portable if its argument contains
12459 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12460 that the byte '\0xff' is not printable in the C locale; it is,
12461 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12462 not printable, so use '\0x81' to test.
12463
d53ae497
PE
12464 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12465 version of GCC, since the macro is used with non-GCC compilers.
12466
fc01665e
PE
12467 Fix core dump reported by Pablo De Napoli in
12468 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12469 * tests/regression.at (Invalid inputs with {}): New test.
12470 * src/parse-gram.y (token_name): Translate type before using
12471 it as an index.
12472
04098407
PE
12473 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12474 the user's name space. All uses changed to __attribute__
12475 ((__unused__)).
12476 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12477 Add __attribute__ ((__noreturn__)).
12478
12479 * etc/clcommit: Remove. We weren't using it, and it failed
12480 "make maintainer-distcheck".
12481 * Makefile.maint: Merge from coreutils.
12482 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12483 (syntax-check-rules): Change list of rules as described below.
12484 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12485 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12486 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12487 (sc_trailing_space): New rules.
12488 (sc_xalloc_h_in_src): Remove.
12489 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12490 (sc_space_tab, sc_error_exit_success, sc_changelog):
12491 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12492 (makefile-check, po-check, author_mark_check):
12493 (makefile_path_separator_check, copyright-check):
12494 Use grep -n, to make it easier to find violations.
12495 Use CVS_LIST and CVS_LIST_EXCEPT.
12496 (header_regexp, h_re): Remove.
12497 (dd_c): New macro.
12498 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12499 (my-distcheck): Use more-modern GCC flags.
12500 (signatures, %.asc): Remove.
12501 (rel-files, announcement): Remove signatures.
12502 Restore old updating code, even though we don't use it, so
12503 that we're the same as coreutils.
12504 (alpha, beta, major): Depend on news-date-check.
12505 Make the upload commands.
12506
12507 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12508 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12509 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12510 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12511 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12512 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12513 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12514 * tests/sets.at: Likewise.
12515
12516 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12517 we comment out the Autoconf version number.
12518 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12519 it's error-prone and "make maintainer-distcheck" rejects it.
12520
12521 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12522 Indent calls to "error" to pacify "make maintainer-distcheck",
12523 when the calls are not intended to be translated.
12524 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12525
12526 * src/Makefile.am (DEFS): Use +=, to pacify
12527 "make maintainer-distcheck".
12528 (bison_SOURCES): Add scan-skel.h.
12529 (sc_tight_scope): New rule, from coreutils.
12530
12531 * src/files.c (src_extension, header_extension):
12532 Now static, not extern.
12533 * src/getargs.c (short_options): Likewise.
12534 * src/muscle_tab.c (muscle_table): Likewise.
12535 * src/parse-gram.y (current_class, current_type, current_prec):
12536 Likewise.
12537 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12538 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12539 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12540 void, to avoid warning when NLS is disabled.
12541 * src/output.c: Include scan-skel.h.
12542 (scan_skel): Remove decl, since scan-skel.h does this.
12543 (output_skeleton):
12544 Indent calls to "error" to pacify "make maintainer-distcheck".
12545 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12546 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12547 "make maintainer-distcheck".
12548 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12549 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12550 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12551 (skel_lex_destroy, scan_skel): Move these decls to...
12552 * src/scan-skel.h: New file.
12553 * src/uniqstr.c (uniqstr_assert):
12554 Indent calls to "error" to pacify "make maintainer-distcheck".
12555
12556 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12557 not @VAR@.
12558
12559 * tests/torture.at: Revamp to avoid misuse of atoi that
12560 "make maintainer-distcheck" complained about.
12561
12562 * examples/extexi (message): Don't print a message more than once,
12563 and omit line-number decoration that makes Emacs compile think
12564 that informative messages are worth worrying about.
12565
125662005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12567
12568 * configure.ac: Update version number.
12569
12570 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12571 accidentally.
12572 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12573 autogenerated by the maintainer.
12574 * examples/calc++/.cvsignore: Add *.yy.
12575
12576 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12577 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12578 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12579
12580 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12581
12582 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12583 from maintainer-distcheck about casting the argument of 'free'.
12584
12585 * NEWS: Mention recent yytname changes.
12586 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12587
12588 * bootstrap: For translations that have not yet been upgraded to
12589 the new runtime-po domain, prime the pump by extracting the
12590 relevant strings from the obsolete translations. This code can be
12591 removed once the bison-runtime domain has been translated by each
12592 team.
12593
12594 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12595 now that token names are already quoted.
12596
12597 Fix problem reported by Anthony Heading.
12598 * data/glr.c (YYTOKEN_TABLE): New macro.
12599 (yytname): Define if YYTOKEN_TABLE.
12600 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12601 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12602 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12603 * src/output.c (prepare_symbols): Output token_table_flag.
12604
0ffda363
PE
126052005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12606
12607 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12608 again if the first call fails.
12609
12610 * data/glr.c (yytnamerr): New function.
12611 (yyreportSyntaxError): Use it to dequote most string literals.
12612 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12613 with other skeletons. All uses changed.
12614 (yytnameerr_): New function.
12615 (yyreport_syntax_error): Use it to dequote most string literals.
12616 * data/yacc.c (yytnamerr): New function.
12617 (yyerrlab): Use it to decode most string literals.
12618 * doc/bison.texinfo (Decl Summary, Calling Convention):
12619 Clarify quoting convention of yytname.
12620 * src/output.c (prepare_symbols): Quote all names. This undoes
12621 the 2005-04-17 change, which is now accomplished (mostly) via
12622 changes in the parsers as described above.
12623 * tests/regression.at (Token definitions, Web2c Actions):
12624 Undo most 2005-04-17 change here, too.
12625
126262005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12627
12628 Fix more problems reported by twlevo@xs4all.nl.
12629 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12630 remove trailing spaces. This loses the exit status of ./types,
12631 and isn't needed since ./types shouldn't be emitting trailing
12632 spaces.
12633 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12634 as the stack isn't valid in that case.
12635
12636 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12637 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12638 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12639 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12640 is used.
12641 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12642 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12643 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12644 Likewise.
12645
12646 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12647 overly-picky compilers that reject 'char *foo = "bar";'.
12648
12649 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12650 to FILE * parameter, not to stderr. This fixes a typo introduced
12651 in the 2005-07-12 change.
12652
12653 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12654 warnings from GCC 4.
12655
12656 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12657 (yyglrShiftDefer, yysplitStack):
12658 Remove unused parameters b4_pure_formals. All uses changed.
12659 (yyglrShift): Remove unused parameters b4_user_formals.
12660 All uses changed.
12661 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12662
6100a9aa
PE
126632005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12664
258b75ca
PE
12665 Destructor cleanups and regularization among the three skeletons.
12666 * NEWS: Document the behavior changes.
12667 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12668 stack before failing, as the cleanup code will do it for us now.
12669 * data/lalr1.cc (yyerrlab): Likewise.
12670 * data/glr.c (yyparse): Pop everything off the stack before
12671 freeing it, so that destructors get called properly.
12672 * data/lalr1.cc (yyreturn): Likewise.
12673 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12674 This is more consistent.
12675 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12676 why destructors might be called. 1.875 -> 2.1.
12677 (Destructor Decl, Decl Summary, Table of Symbols):
12678 Some English-language cleanups for %destructor.
12679 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12680 Add output line for destructor of start symbol.
12681 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12682 because of that same extra output line.
12683
1a059451
PE
12684 * NEWS: Document minor wording changes in diagnostics of
12685 Bison-generated parsers.
12686 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12687 Remove unused formals. All uses changed.
12688 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12689 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12690 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12691 Rename yyoverflowab to yyexhaustedlab.
12692 When memory exhaustion occurs during syntax-error reporting,
12693 report it separately rather than in a single diagnostic; this
12694 eases translation.
12695 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12696 (Memory Exhausted): Renamed from Parser Stack Overflow.
12697 Revamp wording slightly to prefer "memory exhaustion".
12698 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12699
97460c78
PE
12700 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12701
30757c8c
PE
12702 Add i18n support to the GLR skeleton. Partially fix the C++
12703 skeleton; a C++ expert needs to finish this. Remove debugging
12704 msgids; there's little point to having them translated, since they
12705 can be understood only by someone who can read the
12706 (English-language) source code.
12707
12708 Generate runtime-po/bison-runtime.pot automatically, so that we
12709 don't have to worry about garbage getting in that file. We'll
12710 make sure after the next official release that old msgids don't
12711 get lost. See
12712 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12713
12714 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12715 Now auto-generated.
12716 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12717 Fix typos in explanations of the runtime file.
12718 * bootstrap: Change gettext keyword from YYI18N to YY_.
12719 Use standard Makefile.in.in in runtime-po, since we'll arrange
12720 for backward-compatible bison-runtime.po files in a different way.
12721 * data/glr.c (YY_): New macro, from yacc.c.
12722 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12723 Translate messages intended for users.
12724 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12725 the wording in the other skeletons. We don't know that the memory
12726 is virtual.
12727 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12728 Use same method that yacc.c uses.
12729 Don't translate debugging messages.
12730 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12731 it doesn't work (yet), and requires C++ expertise to fix.
12732 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12733 Move defn to a more logical place, to be consistent with other
12734 skeletons.
12735 Don't translate debugging messages.
12736 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12737 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12738 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12739 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12740
ac8c5689
PE
12741 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12742 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12743 void, not int.
12744 * tests/glr-regression.at (Badly Collapsed GLR States):
12745 Likewise.
12746 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12747 yylex should return 0 at EOF rather than aborting.
12748
6100a9aa
PE
12749 Improve tests for stack overflow in GLR parser.
12750 Problem reported by twlevo@xs4all.nl.
12751 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12752 All uses removed.
12753 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12754 can handle the problem.
12755 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12756 (yyparse): New local variable yyresult to record the result.
12757 Use result of setjmp to set it, rather than storing itinto
12758 struct.
12759 (yyDone): Remove label.
12760 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12761 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12762 if YYABORT is used).
12763 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12764 yyparse status; put status > 1 into diagnostic.
12765 Check that status==2 works.
12766 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12767 Use exit status 3 for failure to open (which shouldn't happen).
12768
15f40952
PE
127692005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12770
67fd79c4
PE
12771 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12772 1 on syntax error; just let yyparse do its thing.
12773 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12774 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12775 (Exploding the Stack Size with Alloca):
12776 (Exploding the Stack Size with Malloc):
12777 Expect exit status 2, not 1, since the parser is supposed to blow
12778 its stack. Problem reported by twlevo@xs4all.nl.
12779
15f40952
PE
12780 * data/glr.c (yyparse): Don't assume that the initial calls
12781 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12782 Print a stack-overflow message and fail instead.
12783 Initialize the line-number information before creating the stack,
12784 so that the stack-overflow message can report line zero safely.
12785
f32c66b5
PE
127862005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12787
a22ff96f 12788 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
12789 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12790 (yyuserMerge): Provide a default case if b4_mergers is empty.
12791 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12792 * tests/glr-regression.at
12793 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 12794 Add casts to pacify C++ compilers.
1beb0b24
PE
12795 * tests/glr-regression.at (Improper merging of GLR delayed action
12796 sets): Declare yylex before using it.
f32c66b5 12797 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
12798 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12799 test for valgrind; valgrind is independent of g++.
12800 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12801 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12802 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12803 Use a destructor, so that we can expand the stack. Change
12804 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 12805
d741bd1b
PE
128062005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12807
12808 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12809 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12810
0410a6e0
PE
128112005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12812
12813 * PACKAGING: New file, suggested by Bruno Haible and taken from
12814 similar wording in gettext's PACKAGING file.
12815 * NEWS: Mention PACKAGING.
12816 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12817
f7ab6a50
PE
128182005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12819
baf785db 12820 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
12821 * bootstrap: Get runtime translations into runtime-po.
12822 Create runtime-po files automatically, if possible.
12823 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12824 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12825 does not infringe on the user's name space.
12826 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12827 * doc/bison.texinfo (Internationalization): Revamp the English
12828 and Texinfo syntax a bit, to try to make it clearer.
12829 (Bison Options, Option Cross Key): Mention --print-localedir.
12830 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12831 YYENABLE_NLS. Quote a bit more.
12832 * runtime-po/.cvsignore: New file.
12833 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12834 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12835 * runtime-po/quot.sed: Likewise.
12836 * runtime-po/boldquot.sed: Likewise.
12837 * runtime-po/en@quot.header: Likewise.
12838 * runtime-po/en@boldquot.header: Likewise.
12839 * runtime-po/insert-header.sin: Likewise.
12840 * runtime-po/remove-potcdate.sin: Likewise.
12841 * runtime-po/Makevars: Likewise.
12842 * runtime-po/LINGUAS: Likewise.
12843 * runtime-po/de.po: Likewise; we will rely on the translation project
12844 to maintain this, so "bootstrap" should get it.
0410a6e0 12845 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
12846 its value.
12847 * src/main.c (main): Bind the bison-runtime domain, too.
12848
128492005-07-12 Bruno Haible <bruno@clisp.org>
12850
12851 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12852 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12853 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12854 * runtime-po: New directory.
12855 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12856 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12857 * runtime-po/Rules-quot: New file, copied from po/.
12858 * runtime-po/quot.sed: Likewise.
12859 * runtime-po/boldquot.sed: Likewise.
12860 * runtime-po/en@quot.header: Likewise.
12861 * runtime-po/en@boldquot.header: Likewise.
12862 * runtime-po/insert-header.sin: Likewise.
12863 * runtime-po/remove-potcdate.sin: Likewise.
12864 * runtime-po/Makevars: New file.
12865 * runtime-po/POTFILES.in: New file.
12866 * runtime-po/LINGUAS: New file.
12867 * runtime-po/bison-runtime.pot: New file.
12868 * runtime-po/de.po: New file.
12869 * m4/bison.m4: New file.
12870 * Makefile.am (SUBDIRS): Add runtime-po.
12871 (aclocaldir, aclocal_DATA): New variables.
12872 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12873 Define aclocaldir.
12874 * src/getargs.c (usage): Document --print-localedir option.
12875 (PRINT_LOCALEDIR_OPTION): New enum item.
12876 (long_options): Add --print-localedir option.
12877 (getargs): Handle --print-localedir option.
12878 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12879 (Internationalization): New section.
12880
22dda0f0
AD
128812005-07-12 Akim Demaille <akim@epita.fr>
12882
12883 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12884 for consistency with the rest of the code.
12885 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12886 Add separators.
12887
82b248ad
AD
128882005-07-12 Akim Demaille <akim@epita.fr>
12889
12890 * src/parse-gram.y: Use %printer instead of YYPRINT.
12891
fa0e9314
AD
128922005-07-12 Akim Demaille <akim@epita.fr>
12893
867a3e00
AD
12894 * src/symtab.h, src/symtab.c (symbol_print): New.
12895 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12896 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12897
128982005-07-12 Akim Demaille <akim@epita.fr>
12899
12900 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
12901 b4_at_dollar and b4_dollar_dollar.
12902
e054b190
PE
129032005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12904
12905 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12906 and Pennello's paper.
12907
34160ec4
PE
129082005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12909
407d4a75
PE
12910 * data/yacc.c (yyparse): Undo previous patch. Instead,
12911 set yylsp[0] and yyvsp[0] only if the initial action
12912 sets yylloc and yylval, respectively.
12913
34160ec4
PE
12914 * data/yacc.c (yyparse): In the initial action, set
12915 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12916 This avoids the use of undefined variables if the initial
12917 action does not set yylloc and/or yylval.
12918
c3d5a4a7
PE
129192005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12920
b34d96c1
PE
12921 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12922 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12923 Remove from CVS. These files are automatically generated.
12924 * examples/extexi: Clarify that this file is now part of Bison,
12925 not GNU M4, and that it works with any POSIX-compatible Awk.
12926 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12927 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12928 so that we also get calc++-parser.yy. Geneate it.
12929 Use $(AWK), not gawk, since any conforming Awk will do.
12930 Put comment before action, since older 'make' can't handle comment
12931 in action.
12932 $(BUILT_SOURCES): List all built sources, not just some of them.
12933 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12934 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12935 $($(calc_sources_generated)): Remove unnecessary test for existence
12936 of target. (This had a shell syntax error anyway; a stray "x".)
12937 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12938 calc++-parser.yy.
12939 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12940
c3d5a4a7
PE
12941 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12942 implied by the other modules.
12943
828c373b
AD
129442005-07-06 Akim Demaille <akim@epita.fr>
12945
12946 Bind examples/calc++ to the package.
12947 * examples/calc++/Makefile: Remove, replaced by...
12948 * examples/calc++/Makefile.am: ... this new file.
12949 * examples/calc++/test: Remove input.
12950 * examples/calc++/compile: Remove.
12951 * examples/Makefile.am: New.
12952 * configure.ac, Makefile.am: Adjust.
12953 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12954
63cb01d6
PE
129552005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12956
fd2df2ed
PE
12957 * data/glr.c (yyFail): Drastically simplify; since the format argument
12958 never had any % directives, we can simply pass it to yyerror.
12959 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12960 be modified later, as that is the usual style in glr.c.
12961 Problems reported by Paul Hilfinger.
12962
63cb01d6
PE
12963 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12964 and size overflow errors.
12965 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12966 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12967 (YYSIZEMAX): New macro.
12968 (yystpcpy): New function, taken from yacc.c.
12969 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
12970 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
12971 so that we don't have to maintain their signatures.
12972 (yyFail): Check for buffer overflow, by using vsnprintf rather
12973 than vsprintf. Allocate a bigger buffer if possible.
12974 Report an error if buffer allocation fails.
12975 (yyStackOverflow): New function.
12976 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
12977 the initialization was successful. It might fail if storage was
12978 exhausted.
12979 (yyexpandGLRStack): Add more checks for storage allocation failure.
12980 Use yyStackOverflow to report failures.
12981 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
12982 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
12983 Don't assume stack number fits in int.
12984 (yysplitStack): Check for storage allocation failure.
12985 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
12986 can print diagnostics on storage allocation failure. All callers
12987 changed.
12988 (yyresolveValue): Use yybool for boolean.
12989 (yyreportSyntaxError): Check for size-calculation overflow.
12990 This code is taken from yacc.c.
12991 (yyparse): Check for storage allocation errors when allocating
12992 the initial stack.
12993
1c59e0a1
AD
129942005-07-05 Akim Demaille <akim@epita.fr>
12995
12996 Extract calc++ from the documentation.
12997 * doc/bison.texinfo (Calc++): Add the extraction marks.
12998 * examples/extexi: New, from the aborted GNU Programming 2E.
12999 Separate the different paragraph of a file with empty lines.
13000 * examples/Makefile: Use it to extract the whole calc++ example.
13001
8a0adb01
AD
130022005-06-24 Akim Demaille <akim@epita.fr>
13003
13004 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
13005 class typedefs.
13006
12545799
AD
130072005-06-22 Akim Demaille <akim@epita.fr>
13008
13009 * doc/bison.texinfo (C++ Language Interface): First stab.
13010 (C++ Parsers): Remove.
13011
99be0235
AD
130122005-06-22 Akim Demaille <akim@epita.fr>
13013
13014 * data/lalr1.cc (yylex_): Honor %lex-param.
13015
0ffd4fd1
AD
130162005-06-22 Akim Demaille <akim@epita.fr>
13017
13018 Start a set of simple examples.
13019 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
13020 * examples/calc++/calc++-driver.hh,
13021 * examples/calc++/calc++-parser.yy,
13022 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
13023 * examples/calc++/compile, examples/calc++/test: New.
13024
0925ebb4
PE
130252005-06-09 Paul Eggert <eggert@cs.ucla.edu>
13026
13027 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
13028 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
13029 which stems from the 2005-05-27 patch.
13030
43d3b664
PH
130312005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13032
13033 * data/glr.c: Modify treatment of unused parameters to permit use
13034 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
13035
3062864d
PE
130362005-05-30 Paul Eggert <eggert@cs.ucla.edu>
13037
13038 Fix infringement on user name space reported by Janos Zoltan Szabo.
13039 * data/yacc.c (yyparse): strlen -> yystrlen.
13040
989b5b8e
AD
130412005-05-30 Akim Demaille <akim@epita.fr>
13042
13043 * data/lalr1.cc (_): New.
13044 Translate the various messages.
13045
bedf57f5
PE
130462005-05-27 Paul Eggert <eggert@cs.ucla.edu>
13047
13048 Fix infringement on user name space reported by Bruno Haible.
13049 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
13050 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
13051 the user's name space.
13052 (alloca): Include <stdlib.h> to get it, if it's not built in.
13053 (YYMALLOC, YYFREE): Define only if needed.
13054 (malloc, free): Declare, but only if needed, as this infringes on
13055 the user name space.
13056
4d1801f1
PE
130572005-05-25 Paul Eggert <eggert@cs.ucla.edu>
13058
13059 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
13060 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
13061 with %d format.
13062 * lib/ebitset.c (min, max): Undef before defining.
13063 * lib/vbitset.c (min, max): Likewise.
13064 * lib/subpipe.c (create_subpipe): Save local variables in case
13065 vfork clobbers them.
13066
130672005-05-24 Bruno Haible <bruno@clisp.org>
13068
13069 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
13070 error message syntax used by gcc-4.0.
13071
b94a9e1e
PE
130722005-05-23 Paul Eggert <eggert@cs.ucla.edu>
13073
85ac3861
PE
13074 * README: Mention m4 1.4.3. Remove obsolete advice about
13075 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
13076
b94a9e1e
PE
13077 * bootstrap: Remove workaround for problem I encountered with
13078 gettext 0.14.1; it seems to be fixed now.
13079
51c30d21
PE
130802005-05-22 Paul Eggert <eggert@cs.ucla.edu>
13081
009ce67d
PE
13082 * NEWS: Version 2.0a.
13083
f2a97c62
PE
13084 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
13085 the previous change.
13086
c8775f93
PE
13087 Various maintainer cleanups.
13088 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
13089 conftest*, for benefit of CVS commands run at the same time as
13090 "configure". Add build-aux, since "bootstrap" now creates it and
13091 its subfiles.
13092 * Makefile.cfg (move_if_change): Remove.
13093 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
13094 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
13095 (po_repo, do-po-update, po-update, wget_files, get-targets):
13096 (config.guess-url_prefix, config.sub-url_prefix):
13097 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
13098 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
13099 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
13100 Remove.
13101 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
13102 this is now the recommended name.
13103 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
13104 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
13105 ylwrap. These files now go into build-aux.
13106 * config/move-if-change: Remove.
13107 * config/prev-version.txt: Bump from 1.75 to 2.0.
13108
3ea5f0ec
PE
13109 * bootstrap: Add stdio-safer, unistd-safer modules.
13110 Remove m4/glibc2.m4 (introduced by latest gnulib, but
13111 we don't need it).
13112 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
13113 fopen-safer.c, stdio-safer.h, unistd-safer.h.
13114 * lib/subpipe.c: Include "unistd-safer.h".
13115 (create_subpipe): Make sure all the newly-created
13116 file descriptors are > 2, so that diagnostics don't
13117 get sent down them (which might cause Bison to hang, in theory).
13118 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
13119 * src/files.c (xfopen): Use fopen_safer, not fopen.
13120
51c30d21
PE
13121 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
13122 yesterday's yacc.c fix.
13123
cea1469d
PE
131242005-05-21 Paul Eggert <eggert@cs.ucla.edu>
13125
3ea5f0ec
PE
13126 * data/glr.c, data/lalr1.cc: Update copyright date.
13127
cea1469d
PE
13128 Fix a destructor bug reported by Wolfgang Spraul in
13129 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
13130 * data/yacc.c (yyabortlab): Don't call destructor, and
13131 don't set yychar to EMPTY.
13132 (yyoverflowlab): Don't call destructor.
13133 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
13134 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
13135 since we no longer output the message "discarding lookahead token
13136 end of input ()".
13137
5e6f62f2
PH
131382005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13139
13140 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
13141 fix a small glitch in debugging output.
13142 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
13143 after YY_SYMBOL_PRINT where needed.
13144
13145 (struct yyGLRState): Add some comments.
13146 (struct yySemanticOption): Add some comments.
13147 (union yyGLRStackItem): Add comment.
13148
13149 (yymergeOptionSets): Correct this to properly perform the union,
13150 avoiding infinite reported by Michael Rosien.
13151 Update comment.
13152
13153 * tests/glr-regression.at: Add test for GLR merging error reported
13154 by M. Rosien.
cea1469d 13155
0fb669f9
PE
131562005-05-13 Paul Eggert <eggert@cs.ucla.edu>
13157
13158 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
13159 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
13160 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
13161 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
13162 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
13163 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
13164 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
13165 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
13166 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
13167 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
13168 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
13169 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
13170 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
13171 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
13172 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
13173 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
13174 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
13175 src/derives.h, src/files.c, src/files.h, src/getargs.c,
13176 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
13177 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
13178 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
13179 src/output.h, src/parse-gram.c, src/parse-gram.h,
13180 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
13181 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
13182 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
13183 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
13184 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
13185 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
13186 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
13187 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
13188 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
13189 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
13190 tests/reduce.at, tests/regression.at, tests/sets.at,
13191 tests/synclines.at, tests/testsuite.at, tests/torture.at:
13192 Update FSF postal mail address.
13193
51f4735e
PE
131942005-05-11 Paul Eggert <eggert@cs.ucla.edu>
13195
13196 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
13197 Problem reported by Ralf Menzel.
13198
80ce3401
PE
131992005-05-01 Paul Eggert <eggert@cs.ucla.edu>
13200
13201 * tests/actions.at: Test that stack overflow invokes destructors.
13202 From Marcus Holland-Moritz.
13203 * data/yacc.c (yyerrlab): Move the code that destroys the stack
13204 from here....
13205 (yyreturn): to here. That way, destructors are called properly
13206 even if the stack overflows, or the user calls YYACCEPT or
13207 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
13208 (yyoverflowlab): Destroy the lookahead.
13209
132102005-04-24 Paul Eggert <eggert@cs.ucla.edu>
13211
13212 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
13213
72f000b0
PE
132142005-04-17 Paul Eggert <eggert@cs.ucla.edu>
13215
13216 * NEWS: Bison-generated C parsers no longer quote literal strings
13217 associated with tokens.
13218 * src/output.c (prepare_symbols): Don't escape strings,
13219 since users don't want to see C escapes.
13220 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
13221 in diagnostics.
c19683bb 13222 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
13223 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
13224
1094323f
PE
132252005-04-16 Paul Eggert <eggert@cs.ucla.edu>
13226
13227 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
13228 the data size is known to be too small and we can't increase it.
13229 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
13230
ca407bdf
PE
132312005-04-15 Paul Eggert <eggert@cs.ucla.edu>
13232
13233 * src/parse-gram.y: Include quotearg.h.
13234 (string_as_id): Quote $1 before using it as a key, since the
13235 lexer no longer quotes it for us.
13236 (string_content): Don't strip quotes, since lexer no longer
13237 quotes it for us.
13238 * src/scan-gram.l: Include quotearg.h.
13239 ("\""): Omit quote.
13240 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
13241 a key, since the rest of the lexer doesn't quote it.
13242 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
13243 * tests/regression.at (Token definitions): Check for backslashes
13244 in token strings.
13245
13246 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
13247 (YYSIZE_T): Define to unsigned long int when using an older compiler.
13248 (yyparse): Revamp code to generate long syntax error message, to
13249 make it easier to translate, and to avoid problems with arithmetic
13250 overflow. Change "virtual memory" to "memory" in diagnostic, since
13251 we don't know whether the memory is virtual.
13252
1ce59070
PE
132532005-04-13 Paul Eggert <eggert@cs.ucla.edu>
13254
13255 * NEWS: Bison-generated C parsers now use the _ macro to
13256 translate strings.
13257 * data/yacc.c (_) [!defined _]: New macro.
13258 All English strings wrapped inside this macro.
13259 * doc/bison.texinfo (Bison Parser): Document _.
13260 * po/POTFILES.in: Include src/parse-gram.c, since it now
13261 includes translateable strings that parse-gram.y doesn't.
13262
a749a695
PE
132632005-04-12 Paul Eggert <eggert@cs.ucla.edu>
13264
13265 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
13266 reverting the 2004-10-11 change to this function.
13267 (symbol_check_alias_consistency): Don't call symbol_type_set
13268 if the type name is already correct.
13269 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
13270
8fb1053b
PE
132712005-03-25 Paul Eggert <eggert@cs.ucla.edu>
13272
13273 * tests/regression.at (Token definitions): Don't use a token named
13274 c, as that generates a "#define c ..." that runs afoul of buggy
13275 stdlib.h that uses the identifier c as a member of struct
13276 drand48_data. Problem reported by Horst Wente.
13277
ff498c4a
PE
132782005-03-21 Paul Eggert <eggert@cs.ucla.edu>
13279
13280 * bootstrap: Change translation URL from
13281 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
13282 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
13283 redirection glitches. Problem reported by twlevo@xs4all.nl.
13284
65211d70
PE
132852005-03-20 Paul Eggert <eggert@cs.ucla.edu>
13286
13287 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
13288 after operands; POSIX says this isn't portable for the c99 command.
13289
9577fb1f
PE
132902005-03-18 Paul Eggert <eggert@cs.ucla.edu>
13291
13292 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
13293 immediately if a data overrun has occurred; this may help us track
13294 down what may be a spurious failure on MacOS.
13295
78b178f7
PE
132962005-03-17 Paul Eggert <eggert@cs.ucla.edu>
13297
a2599d0f
PE
13298 Respond to problems reported by twlevo@xs4all.nl.
13299
13300 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
13301
78b178f7
PE
13302 * src/vcg.h: Comment fix.
13303 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
13304 (G_CMAX): Change to -1 instead of INT_MAX.
13305
13306 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 13307
7296e729
PE
133082005-03-15 Paul Eggert <eggert@cs.ucla.edu>
13309
13310 * src/tables.c (state_number_to_vector_number): Put it inside an
13311 "#if 0", since it's not currently used. Problem reported by
13312 Roland McGrath.
13313
05ac60f3
PE
133142005-03-06 Paul Eggert <eggert@cs.ucla.edu>
13315
13316 * src/output.c (escaped_output): Renamed from
13317 escaped_file_name_output, since we now use it for symbol tags as
13318 well. All uses changed.
13319 (symbol_destructors_output, symbol_printers_output):
13320 Escape symbol tags too.
13321 Problem reported by Matyas Forstner in
13322 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
13323
13324 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
13325 not needed.
13326 * src/output.c (user_actions_output, token_definitions_output,
13327 symbol_destructors_output, symbol_printers_output): Likewise.
13328 * src/reader.c (prologue_augment): Likewise.
13329 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
13330
13331 * src/vcg.c (output_edge): Don't quote linestyle arg.
13332 Problem reported by twlevo@xs4all.nl.
13333
7eb453ac
PE
133342005-02-28 Paul Eggert <eggert@cs.ucla.edu>
13335
13336 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
13337 example, reported by Derek M Jones. Also, make the example even
13338 more outrageous, to better illustrate how bad the problem is.
13339
4c04c52a
PE
133402005-02-24 Paul Eggert <eggert@cs.ucla.edu>
13341
13342 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
13343 putsym. Typo reported by Sebastian Piping.
13344
a61e1620
PE
133452005-02-23 Paul Eggert <eggert@cs.ucla.edu>
13346
13347 * doc/bison.texinfo (Language and Grammar): some -> same
13348 (Epilogue): int he -> in the
13349 Typos reported by Sebastian Piping via Justin Pence.
13350
9ec93868
PE
133512005-02-07 Paul Eggert <eggert@cs.ucla.edu>
13352
13353 * tests/glr-regression.at (Improper handling of embedded actions
13354 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
13355 embedded actions and $-N in GLR parsers", work around an Autoconf bug
13356 with dollar signs in test names.
13357 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
13358 for a similar reason.
13359
73ce7e7e
PE
133602005-01-28 Paul Eggert <eggert@cs.ucla.edu>
13361
13362 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
13363 wants to redefine G_VIEW.
13364
2e72b98e
PE
133652005-01-27 Paul Eggert <eggert@cs.ucla.edu>
13366
13367 * src/vcg.c (get_view_str): Remove case for normal_view.
13368 Problem reported by twlevo@xs4all.nl.
13369
e0d634e5
PE
133702005-01-24 Paul Eggert <eggert@cs.ucla.edu>
13371
ccf830a4
PE
13372 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
13373 Problem reported by twlevo@xs4all.nl.
13374
e0d634e5
PE
13375 * doc/bison.texinfo: Change @dircategory from "GNU programming
13376 tools" to "Software development". Requested by Richard Stallman
13377 via Karl Berry.
13378
7bbc8cb0
PE
133792005-01-23 Paul Eggert <eggert@cs.ucla.edu>
13380
13381 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
13382 Problem reported by twlevo@xs4all.nl.
13383
08b770bc
PE
133842005-01-21 Paul Eggert <eggert@cs.ucla.edu>
13385
13386 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
13387 keyword; it's not needed with modern compilers, and it doesn't
13388 affect correctness with older compilers. Suggested by
13389 twlevo@xs4all.nl.
13390
95f22ad2
PE
133912005-01-17 Paul Eggert <eggert@cs.ucla.edu>
13392
13393 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
13394 gcc -Wswitch-default.
13395 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13396 * data/yacc.c (yyparse): Likewise.
13397
d229d15c
PE
133982005-01-12 Paul Eggert <eggert@cs.ucla.edu>
13399
13400 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
13401 already. Let config.h define any nonstandard values.
13402
ecadd90f
PE
134032005-01-10 Paul Eggert <eggert@cs.ucla.edu>
13404
13405 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
13406 for the benefit of slower hosts. Problem reported by
13407 Nelson H. F. Beebe.
13408
213744b5
PE
134092005-01-07 Paul Eggert <eggert@cs.ucla.edu>
13410
13411 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
13412 being defined and not used.
13413 * data/lalr1.cc (yyparse): Likewise.
13414 Use "if (false)" rather than "if (0)".
13415
249d3236
PE
134162005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13417
13418 * TODO: Mention that we should allow NUL bytes in tokens.
13419
987cc1fb
PE
134202005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13421
13422 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13423 Problem reported by Hans Aberg.
13424
08fe02d9
PE
134252005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13426
13427 * src/getargs.c (version): Happy new year; update overall
13428 program copyright date from 2004 to 2005.
13429
13430 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13431 Problem reported by Hans Aberg.
13432 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13433 (Output file names.): Add a test for the case when standard output
13434 is closed.
13435
010c0266
PE
134362004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13437
13438 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13439 to fix an oversight in the Bison 2.0 manual.
13440
da12206a
PE
134412004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13442
13443 * NEWS: Version 2.0. Reformat the existing news items since
13444 1.875, so that related items are grouped together.
3a4734aa 13445 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
13446 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13447
c935d934
PE
13448 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13449 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13450 otherwise, we're not testing alloca. Unfortunately there's no
13451 simple way to consult HAVE_ALLOCA here.
13452
da12206a
PE
13453 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13454 for yymsg, too.
13455
13456 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13457 hand. This avoids a warning about comparing int to size_t when
13458 GCC warnings are enabled.
13459
0a2c5137
PE
134602004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13461
d7e14fc0
PE
13462 * NEWS: Bison-generated parsers no longer default to using the
13463 alloca function (when available) to extend the parser stack, due
13464 to widespread problems in unchecked stack-overflow detection.
13465 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13466 responsibility to set it to a positive value. This lets the user
13467 specify a value that is not a preprocessor constant.
13468 * data/yacc.c (YYMAXDEPTH): Likewise.
13469 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13470 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13471 to be a compile-time constant. However, explain the constraints on it.
13472 Also, explain the constraints on YYINITDEPTH.
13473 (Table of Symbols): Explain that alloca is no longer the default.
13474 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13475 to 1.
13476
0a2c5137
PE
13477 * doc/bison.texinfo (Location Default Action): Mention that n must
13478 be zero when k is zero. Suggested by Frank Heckenbach.
13479
e019c247
AD
134802004-12-22 Akim Demaille <akim@epita.fr>
13481
13482 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13483 (parser::state_type, parser::semantic_type, parser::location_type):
13484 Private, not public.
13485 (parser::parse): Return ints, not bool.
13486 Returning a bool introduces a problem: 0 corresponds to false, and
13487 it seems weird to return false on success. Returning true changes
13488 the conventions for yyparse.
13489 Alternatively we could return void and send an exception.
13490 There is no clear consensus (yet?).
13491 (state_stack, semantic_stack, location_stack): Rename as...
13492 (state_stack_type, semantic_stack_type, location_stack_type): these.
13493 Private, not public.
13494 * tests/c++.at: New.
13495 * tests/testsuite.at, tests/Makefile.am: Adjust.
13496
72731bb7
AD
134972004-12-21 Akim Demaille <akim@epita.fr>
13498
13499 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13500
9a0d8bec
AD
135012004-12-21 Akim Demaille <akim@epita.fr>
13502
13503 Don't impose std::string for filenames.
13504
13505 * data/lalr1.cc (b4_filename_type): New.
13506 (position::filename): Use it.
13507 (parser.hh): Move the inclusion of stack.hh and location.hh below
13508 the user code, so that needed headers for the filename type can be
13509 included first.
72731bb7
AD
13510 Forward declare them before the user code.
13511 * tests/Makefile.am (check-local, installcheck-local): Pass
13512 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 13513
99880de5
AD
135142004-12-20 Akim Demaille <akim@epita.fr>
13515
13516 Use more STL like names: my_class instead of MyClass.
13517
13518 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13519 (SemanticStack, SemanticType, StateStack, StateType)
13520 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13521 (Parser::value): Rename as...
13522 (location_stack, location_type, rhs_number_type, semantic_stack)
13523 (semantic_type, state_stack, state_type, token_number_type, stack)
13524 (slice, traits, parser::yylloc, parser::yylval): these.
13525
13526 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13527
9bec482e
PE
135282004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13529
13530 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13531 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13532
f6fbd3da
PE
135332004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13534
13535 Remove uses of 'short int' and 'unsigned short int'. This raises
13536 some arbitrary limits. It uses more memory but nowadays that's
13537 not much of an issue.
13538
13539 This change does not affect the generated parsers; that's a different
13540 task, as some users will want to conserve memory there.
13541
13542 Ideally we should use size_t to represent all object counts, and
13543 something like ptrdiff_t to represent signed differences of object
13544 counts; but that will require more code-cleanup than I have the
13545 time to do right now.
13546
13547 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13548 Use size_t, not int or short int, to count objects.
13549 * src/closure.c (nritemset, closure): Likewise.
13550 * src/closure.h (nritemset, closure): Likewise.
13551 * src/nullable.c (nullable_compute): Likewise.
13552 * src/print.c (print_core): Likewise.
13553 * src/print_graph.c (print_core): Likewise.
13554 * src/state.c (state_compare, state_hash): Likewise.
13555 * src/state.h (struct state): Likewise.
13556 * src/tables.c (default_goto, goto_actions): Likewise.
13557
13558 * src/gram.h (rule_number, rule): Use int, not short int.
13559 * src/output.c (prepare_rules): Likewise.
13560 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13561 errs, reductions): Likewise.
13562 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13563 Likewise.
13564 * src/tables.c (vector_number, tally, action_number,
13565 ACTION_NUMBER_MINIMUM): Likewise.
13566 * src/output.c (muscle_insert_short_int_table): Remove.
13567
efeed023
AD
135682004-12-17 Akim Demaille <akim@epita.fr>
13569
13570 * data/lalr1.cc: Extensive Doxygenation.
13571 (error_): Rename as...
13572 (error): this, since it is visible to the user.
13573 Adjust callers.
13574 (Parser::message): Now an automatic variable from...
13575 (Parser::yyreport_syntax_error_): here.
13576 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13577 Parser::error.
13578 * tests/input.at: Escape $.
13579
bc82c5a5
PE
135802004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13581
13582 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13583 Parenthesize rhs to avoid obscure problems with mistakes like
13584 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13585 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13586 b4_rhs_location): Likewise.
13587 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13588 b4_rhs_location): Likewise.
13589
fd19f271
AD
135902004-12-16 Akim Demaille <akim@epita.fr>
13591
13592 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13593 yacc.c: be sure to stay within yycheck_.
13594 * tests/actions.at: Re-enable C++ tests.
13595
10454ea4
AD
135962004-12-16 Akim Demaille <akim@epita.fr>
13597
13598 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13599 real.
13600
c5b95ccf
AD
136012004-12-16 Akim Demaille <akim@epita.fr>
13602
13603 Use #define to handle the %name-prefix.
13604
13605 * data/glr.c, data/yacc.c: Comment changes.
13606 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13607 so that one can refer to yylex in the parser file, and have it
13608 renamed, as is the case with other skeletons.
13609
617a8f12
AD
136102004-12-16 Akim Demaille <akim@epita.fr>
13611
13612 Move lalr1.cc internals into yy*.
13613
13614 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13615 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13616 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13617 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13618 (empty_, final_, terror_, errcode_, ntokens_)
13619 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13620 (looka_, ilooka_, error_range_, nerrs_):
13621 Rename as...
13622 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13623 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13624 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13625 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13626 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13627 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13628 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13629 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13630 these.
13631
1e547e6e
PE
136322004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13633
13634 Fix some problems reported by twlevo at xs4all.
13635 * src/symtab.c (symbol_new): Report an error if the input grammar
13636 contains too many symbols. This is better than calling abort() later.
13637 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13638 (struct node, struct graph):
13639 Rename member expand to stretch. All uses changed.
13640 (struct graph): Remove member layoutalgorithm. All uses removed.
13641 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13642 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13643 All uses changed.
13644 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13645
735d6bd4
AD
136462004-12-15 Akim Demaille <akim@epita.fr>
13647
13648 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13649 Add more Doxygen comments.
13650 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13651 (report_syntax_error_, translate_): Rename as...
13652 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13653 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13654
2e1f5829
AD
136552004-12-15 Akim Demaille <akim@epita.fr>
13656
13657 * data/lalr1.cc (lex_): Rename as...
13658 (yylex_): this.
13659 Move the trace here.
13660 Take the %name-prefix into account.
13661 Reported by Alexandre Duret-Lutz.
13662
a3cb6248
AD
136632004-12-15 Akim Demaille <akim@epita.fr>
13664
13665 Simplify the C++ parser constructor.
13666
13667 * data/lalr1.cc (debug_): Rename as...
13668 (yydebug_): so that the parser's internals are always in the yy*
13669 pseudo namespace.
13670 Adjust uses.
13671 (b4_parse_param_decl): Remove the leading comma as it is now only
13672 called as unique argument list.
13673 (Parser::Parser): Remove the constructor accepting a location and
13674 an initial debugging level.
13675 Remove from the other ctor the argument for the debugging level.
13676 (debug_level_type, debug_level, set_debug_level): New.
13677
13678 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13679 constructor calls.
13680
07fed891
AD
136812004-12-15 Akim Demaille <akim@epita.fr>
13682
13683 Remove b4_root related material: failure experiment
a3cb6248 13684 (which goal was to allow to derive from a class).
07fed891
AD
13685
13686 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13687 definitions and uses.
13688
e603eaa5
PE
136892004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13690
13691 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13692 not 2, since it's not portable to subtract 1 from the start of an
13693 array. The new item 0 is never set or used. All uses changed.
13694
13695 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13696 the default definition of YYLLOC_DEFAULT. Problem reported
13697 by Frank Heckenbach.
13698
fafb007d
PE
136992004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13700
13701 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13702 the normal case and one for the error case. Just use the
13703 first one uniformly. Problem reported by Frank Heckenbach.
13704 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13705 use exactly the same macro in both places.
13706 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13707 so that the normal-case YYRHSLOC works for the error case too.
13708 All uses changed.
13709 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13710 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13711 * doc/bison.texinfo (Location Default Action): Don't claim that
13712 we have an array of locations. Use the same macro for both glr
13713 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13714 the index is 0.
13715
48814dcd
PE
137162004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13717
a4e1a53b
PE
13718 * HACKING: Update email addresses to send announcements to.
13719
48814dcd
PE
13720 * configure.ac (AC_INIT): Bump version to 1.875f.
13721
337116ba
PE
137222004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13723
13724 * NEWS: Version 1.875e.
13725 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13726
13727 * src/scan-skel.l: Include "complain.h", for "fatal".
13728
13729 * src/relation.h (relation_print, relation_digraph):
13730 Relation sizes are of type relation_node, not size_t (this is
13731 merely a doc fix, since the two types are equivalent).
13732 (relation_transpose): Relation sizes are of type relation_node,
13733 not int.
13734 * src/relation.c: Likewise.
13735 (top, infinity): Now of type relation_node, not int.
13736 (traverse, relation_transpose): Use relation_node, not int.
13737
13738 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13739 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13740 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13741
13742 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 13743 specifying whether the test should be skipped. Use it tp
337116ba 13744 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 13745 fail on some hosts, and should be skipped.
337116ba 13746
da2a7671
PE
137472004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13748
13749 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13750 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13751 unless otherwise specified below.
13752
13753 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13754 to allocate kernel_base, kernel_items, kernel_size, since
13755 they needn't be initialized to 0.
13756 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13757 * src/closure.c (new_closure): Likewise, for itemset.
13758 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13759 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13760 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13761 (build_relations): Likewise for edge, states1, includes.
13762 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13763 * src/reader.c (packgram): Likewise, for ritem, rules.
13764 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13765 * src/relation.c (relation_digraph): Likewise for VERTICES.
13766 (relation_transpose): Likewise for new_R, end_R.
13767 * src/symtab.c (symbols_token_translations_init): Likewise for
13768 token_translations.
13769 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13770 (token_actions): Likewise for yydefact, actrow, conflrow,
13771 conflict_list.
13772 (save_column): Likewise for froms[symno], tos[symno].
13773 (goto_actions): Likewise for state_count.
13774 (pack_table): Likewise for base, pos, check.
13775 (tables_generate): Likewise for width.
13776
13777 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13778 for initial core. Just have a separate core, so we needn't worry
13779 about whether kernel_size and kernel_base are initialized.
13780
13781 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13782 kernel_size, kernel_items): Remove unnecessary initialization.
13783 * src/conflicts.c (conflicts): Likewise.
13784 * src/derives.c (derives): Likewise.
13785 * src/muscle_tablc (muscle_insert): Likewise.
13786 * src/relation.c (relation_digraph): Likewise.
13787 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13788 conflrow, conflict_table, conflict_list, table, check):
13789 Likewise.
13790
13791 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13792 This is because all callers pass unsigned int.
13793 * src/closure.h (new_closure): Likewise.
13794
13795 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13796 (build_relations): Initialize includes[i] in all cases.
13797 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13798 and rules[ruleno].precsym. Initialize members in order.
13799 * src/relation.c (relation_transpose): Always initialize new_R[i]
13800 and end_R[i].
13801 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13802
13803 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13804 conflict_list[0] was always 0, but now it isn't initialized.
13805
13806 * src/table.c (table_grow): When conflict_table grew, the grown
13807 area wasn't cleared. Fix this.
13808
13809 * lib/.cvsignore: Add strdup.c, strdup.h.
13810 * m4/.cvsignore: Add strdup.m4.
13811
00baeeac
PE
138122004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13813
13814 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13815 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13816 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13817 ngotos + 1 without checking for overflow.
13818 (build_relations): Use END_NODE, not -1, to denote end of edges.
13819 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13820 build_relations): Use goto_number, not int, for goto numbers.
13821 * src/tables.c (save_column, default_goto): Likewise.
13822
be3d9d42
AD
138232004-11-23 Akim Demaille <akim@epita.fr>
13824
13825 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13826 of #defining from yystype.
13827 Don't typedef yystype, C++ does not need it.
13828 This lets it possible to forward declare it as union.
13829
78e526d5
PE
138302004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13831
13832 * bootstrap (gnulib_modules): Add extensions.
13833 Problem reported by Jim Meyering.
13834
afbb696d
PE
138352004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13836
13837 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13838 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13839 src/system.h, src/tables.c: XFREE -> free, to accommodate
13840 recent change to gnulib xalloc.h.
78e526d5 13841 Problem reported by Jim Meyering.
afbb696d 13842
c1f8f16a
AD
138432004-11-17 Akim Demaille <akim@epita.fr>
13844
13845 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13846
db7e5eb5 138472004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
13848 Alexandre Duret-Lutz <adl@gnu.org>
13849
13850 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13851 changes.
13852 (YYCDEBUG): Adjust.
13853 Use it instead of cdebug_.
13854 (Parser::debug_stream, Parser::set_debug_stream): New.
13855 (Parser::symprint_): Define cdebug_ for temporary backward
13856 compatibility.
13857 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13858 debug_stream ().
13859
68e11668
AD
138602004-11-17 Akim Demaille <akim@epita.fr>
13861
13862 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13863 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13864 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13865 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13866
97cbc73e
PE
138672004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13868
13869 * data/glr.c (yyloc_default): Remove; not used.
13870 Problem reported by Frank Heckenbach.
13871
e342c3be
AD
138722004-10-25 Akim Demaille <akim@epita.fr>
13873
13874 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13875 Introduce another definition to address simple location arrays.
13876 (yyGLRStack): New member: yyerror_range.
13877 (yyrecoverSyntaxError, yyparse): Update it.
13878 (yyrecoverSyntaxError): Use it when shifting the error token to
13879 have an accurate range, equivalent to the one computed by both
13880 yacc.c and lalr1.cc.
13881 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13882 that column numbers start at column 0, as per GNU Coding
13883 Standards, the others tests, and the doc.
13884 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13885 Adjust to the above change (first column is 0).
13886 And adjust the location of the "<error>", now covering the whole
13887 line.
13888
93602feb 138892004-10-22 Akim Demaille <akim@epita.fr>
04098407 13890 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
13891
13892 Remove some arbitrary limits on goto numbers and relations.
13893 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13894 initial values, since they're never used.
13895 (set_goto_map): ngotos is now unsigned, so test for overflow
13896 by seeing whether it wraps around to zero.
13897 * src/lalr.h (goto_number): Now size_t, not short int.
13898 (GOTO_NUMBER_MAXIMUM): Remove.
13899 * src/relation.c (relation_print, traverse, relation_transpose):
13900 Check for END_NODE rather than looking at sign.
13901 * src/relation.h (END_NODE): New macro.
13902 (relation_node): Now size_t, not short int.
13903
dba08b04
PE
139042004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13905
13906 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13907 keyword, not an identifier. Problem reported by Baron Schwartz in
13908 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13909
df09ef2e
AD
139102004-10-11 Akim Demaille <akim@epita.fr>
13911
13912 * src/symtab.c (symbol_check_alias_consistency): Also check
13913 type names, destructors, and printers.
13914 Reported by Alexandre Duret-Lutz.
13915 Recode the handling of associativity and precedence in terms
13916 of symbol_precedence_set.
13917 Accept no redeclaration at all, not even equal to the previous
13918 value.
13919 (redeclaration): New.
13920 Use it to factor redeclaration complaints.
13921 (symbol_make_alias): Don't set the type of the alias, let
13922 symbol_check_alias_consistency do it as for other features.
13923 * src/symtab.h (symbol): Add new member prec_location, and
13924 type_location.
13925 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13926 * tests/input.at (Incompatible Aliases): New.
13927
146bc99d
PE
139282004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13929
13930 .cvsignore fixes to accommodate gnulib changes,
13931 and the practice of naming build directories "_build".
13932 * .cvsignore: Add "_*". Sort.
13933 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13934 * m4/.cvsignore: Add "*_gl.m4".
13935
e503aa60
AD
139362004-10-06 Akim Demaille <akim@epita.fr>
13937
13938 * src/parse-gram.y (add_param): Fix the truncation of trailing
13939 spaces.
13940
b4a20338
AD
139412004-10-05 Akim Demaille <akim@epita.fr>
13942
13943 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13944 whether the reducion was empty or not. This leaves room to
13945 improve the use of YYLLOC_DEFAULT in such a case.
13946 lalr1.cc is still experimental, so changing this is acceptable.
13947 And finally, there are probably not many users who changed the
13948 handling of locations in GLR, so changing is admissible too.
13949
13950 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13951 empty reduction, set @$ to an empty location ending the previously
13952 stacked symbol.
13953 Adjust uses to make sure the code is triggered on empty
13954 reductions.
13955 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13956 expected output: empty reductions have empty locations.
13957
f85a5e6f
AD
139582004-09-29 Akim Demaille <akim@epita.fr>
13959
13960 * data/lalr1.cc: Move towards a more standard C++ coding style
13961 for templates: Class < T > -> Class<T>.
13962
b203fc2c
AD
139632004-09-29 Akim Demaille <akim@epita.fr>
13964
13965 * data/lalr1.cc: Reinstall the former ctor, for sake of
13966 compatibility, but warn it will be removed.
13967 Move towards a more standard C++ coding style (i.e., type *var ->
13968 type* var).
13969
5b7e1e73
PE
139702004-09-27 Paul Eggert <eggert@cs.ucla.edu>
13971
3fee967f
PE
13972 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
13973 since it's less likely to work if NULs are involved in the future.
5b7e1e73 13974
0dcca5c2
AD
139752004-09-27 Akim Demaille <akim@epita.fr>
13976
13977 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
13978
6dde1c82
AD
139792004-09-27 Akim Demaille <akim@epita.fr>
13980
13981 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 13982 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
13983 and argument names.
13984 (b4_cc_constructor_call): Likewise.
13985
b233d555
AD
139862004-09-24 Akim Demaille <akim@epita.fr>
13987
13988 * src/parse-gram.y (add_param): Strip the leading and trailing
13989 blanks from a formal argument declaration.
13990 (YY_LOCATION_PRINT): New.
13991
619404e3
AD
139922004-09-24 Akim Demaille <akim@epita.fr>
13993
13994 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
13995 after the location.
13996
dd8d9022
AD
139972004-09-24 Akim Demaille <akim@epita.fr>
13998
13999 * doc/bison.texinfo (Table of Symbols): Sort.
14000
0092f063
AD
140012004-09-21 Akim Demaille <akim@epita.fr>
14002
14003 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
14004 the useless parentheses.
14005 Suggested by Paul Eggert.
14006
451364ed
AD
140072004-09-20 Akim Demaille <akim@epita.fr>
14008
14009 Let the initial-action act on the look-ahead, and use it for the
14010 "initial push" (corresponding to an hypothetical beginning-of-file).
14011 And let lalr1.cc honor %initial-action.
14012
14013 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
14014 example.
14015 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
14016 (Parser::Parser): Remove the ctor that used to initialize it.
14017 (Parser::parse): Like in the other skeletons, issue the "starting
14018 parse" message before any action.
14019 Honor %initial-action.
14020 Initialize the stacks with the lookahead.
14021 * data/yacc.c: Let $$ and @$ in %initial-action designate the
14022 look-ahead.
14023 Push them in the stacks.
14024 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
14025
18d192f0
AD
140262004-09-20 Akim Demaille <akim@epita.fr>
14027
14028 * doc/bison.texinfo (Initial Action Decl): New.
14029
b8458aa5
AD
140302004-09-20 Akim Demaille <akim@epita.fr>
14031
14032 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
14033 clearer criterion to define it.
14034 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
14035 When reducing on an empty RHS, use the latest stacked location as
14036 location.
14037 yylloc is not always available.
14038 * data/glr.c: Likewise.
14039 Also, honor initial-actions.
14040
3fc16193
AD
140412004-09-20 Akim Demaille <akim@epita.fr>
14042
14043 * data/yacc.c (YY_LOCATION_PRINT): New.
14044 Define when we know YYLTYPE's structure, i.e., when the default
14045 YYLLOC_DEFAULT is used.
14046 * data/c.m4 (b4_yysymprint_generate): Use it.
14047 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
14048 value of the result.
14049 (error_start_): Replace with...
14050 (error_range_): this location array.
14051 This allows to replace code relying on the implementation of
14052 locations by portable code.
14053 * data/yacc.c (yylerrsp): Replace with...
14054 (yyerror_range): this.
14055 Every time a token is popped, update yyerror_range[0], to have an
14056 accurate location for the error token.
14057 * data/glr.c (YY_LOCATION_PRINT): New.
14058 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
14059 deference a pointer.
14060 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
14061 report the location in %printers.
14062
14063 * src/scan-skel.l: Instead of abort, report error messages to ease
14064 understanding skeleton scanning failures.
14065
ecfe33e7
AD
140662004-09-16 Akim Demaille <akim@epita.fr>
14067
14068 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
14069 (iterator, const_iterator): these, to be more in the C++ spirit.
14070 Also, return reverse iterators so that when displaying the stack
14071 we display its bottom first.
14072 (Parser::stack_print_, Parser::reduce_print_): Match the messages
14073 from yacc.c.
14074 We should probably use vector here though.
14075
1576d44d
AD
140762004-09-16 Akim Demaille <akim@epita.fr>
14077
14078 Have more complete shift traces.
14079
14080 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
14081 to report Shifts instead of ad hoc YYDPRINTF invocations,
14082 including for the error token.
14083 * data/lalr1.cc (symprint_): Output the location.
14084 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
14085 output the location within the %printer.
14086 Activate GLR tests, at least to make sure they compile properly.
14087 They still don't pass though.
14088 * tests/calc.at: Adjust expect verbose output, since now "Entering
14089 state..." is on a different line than the "Shifting" message.
14090
9c66f418
AD
140912004-09-08 Akim Demaille <akim@epita.fr>
14092
14093 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
14094 Bison directive from the Bison file to the invocation of this
14095 macro, so that these directives are passed to
14096 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
14097 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
14098 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
14099 the extra Bison directives instead of the whole series.
14100 Change the grammar so that there are recoverable errors, and
14101 unrecoverable errors. Now we can have the parser give up before
14102 consuming the whole input. As a result we now can observe that
14103 the lookahead is freed when needed.
14104 Change the parser source to parse argv[1] instead of a hard coded
14105 string.
14106 Simplify yylex, and give a value and location to EOF.
14107 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
14108 passed directives already coded in the file.
14109 Add some tests to check the location of "error".
14110 For some tests, the C++ parser is correct, and not yacc.c.
14111 For other tests, they provide different, but unsatisfying, values,
14112 so keep the C++ value so that at least one parser is "correct"
14113 according to the test suite.
14114 (Actions after errors): Remove, this is subsumed by the
14115 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
14116
52d5733f
AD
141172004-09-06 Akim Demaille <akim@epita.fr>
14118
14119 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 14120 (Parser::pop): New.
52d5733f
AD
14121 Use it.
14122
a0e68930
AD
141232004-09-06 Akim Demaille <akim@epita.fr>
14124
14125 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
14126 argument, an informative message.
14127 Call YY_SYMBOL_PRINT.
14128 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
14129 * data/lalr1.cc (destruct_): Likewise.
14130 In addition, no longer depend on b4_yysymprint_generate and
14131 b4_yydestruct_generate to generate these functions, do it "by
14132 hand".
14133
e757bb10
AD
141342004-09-03 Akim Demaille <akim@epita.fr>
14135
14136 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
14137 invoked, yydestruct the lookahead.
14138 * tests/calc.at (Calculator $1): Update the expected lengths of
14139 traces: there is an added line for the discarded lookahead.
14140 * doc/bison.texinfo (Destructor Decl): Some rewording.
14141 Define "discarded" symbols.
14142
0fe1f06d
AD
141432004-09-02 Akim Demaille <akim@epita.fr>
14144
14145 * data/lalr1.cc (translate_, destruct_): No reason to be static.
14146
284acc8b
AD
141472004-09-02 Akim Demaille <akim@epita.fr>
14148
14149 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
14150 (YYDSYMPRINTF): Rename as...
14151 (YY_SYMBOL_PRINT): this.
14152 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
14153 two.
14154 Use it instead of direct symprint_ calls.
14155 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
14156 one.
14157
a5eb1ed2
AD
141582004-09-02 Akim Demaille <akim@epita.fr>
14159
b7c72fe1
AD
14160 * data/lalr1.cc (b4_yysymprint_generate): New.
14161 (symprint_): New member function, defined when YYDEBUG.
14162 Use it consistently instead of token/nterm debugging output by
14163 hand.
a5eb1ed2
AD
14164 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
14165 %printer calls to use cdebug_ when using lalr1.cc.
14166
417141dd
AD
141672004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
14168
14169 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
14170 with #ifdef YYDEBUG.
14171
2fa09258
AD
141722004-08-26 Akim Demaille <akim@epita.fr>
14173
14174 * doc/bison.texinfo (Implementing Loops): Rename as...
14175 (Implementing Gotos/Loops): this.
14176
9378b508
PE
141772004-08-13 Paul Eggert <eggert@cs.ucla.edu>
14178
14179 Adjust to latest gnulib.
14180 * bootstrap (gnulib_modules): Add xalloc-die.
14181 Set LC_ALL=C so that file names sort consistently.
14182 Prefer the gnulib copies of gettext.m4, glibc21.m4,
14183 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
14184 uintmax_t.m4, ulonglong.m4.
14185 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
14186 po.m4 since we are now using _gl.m4 instead.
14187
87a8ad5c
PE
141882004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
14189
14190 * src/scan-action.l: Remove. Scanning of semantic actions is
14191 handled in scan-gram.l.
14192
dca81a78
PE
141932004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
14194
14195 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
14196
14197 * src/location.h (struct): The file member is a uniqstr.
14198 (equal_boundaries): Use UNIQSTR_EQ for comparison.
14199
c9cbf7c5
PE
142002004-07-22 Paul Eggert <eggert@cs.ucla.edu>
14201
14202 Fix bug with non-%union parsers that have printers or destructors,
14203 which led to a Bison core dump. Reported by Peter Fales in
14204 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 14205
c9cbf7c5
PE
14206 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
14207 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
14208 not to our own type.
14209 * src/output.c (symbol_destructors_output, symbol_printers_output):
14210 Don't assume %union.
14211 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
14212 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
14213 UNION-FLAG. All callers changed.
14214 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
14215 Use type char, not unsigned int, when declaring an array of char;
14216 this lets us remove a cast.
14217 (Printers and Destructors): Add non-%union test cases.
14218
fa7e68c3
PE
142192004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14220
14221 * doc/bison.texinfo: Minor editorial changes, mostly to the new
14222 GLR writeups. E.g., avoid frenchspacing and the future tense,
14223 change "lookahead" to "look-ahead", and change "wrt" to "with
14224 respect to".
2fa09258 14225
fa7e68c3
PE
142262004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14227
14228 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
14229 New sections, split off from the GLR Parsers section. Put the new
14230 Simple GLR Parser near the start of the GLR section, for clarity.
14231 Rewrite connective text.
14232
99a9344e
PE
142332004-06-21 Frank Heckenbach <frank@g-n-u.de>
14234
14235 * doc/bison.texinfo (Simple GLR Parsers): New section.
14236
8dd162d3
PE
142372004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14238
14239 * NEWS, TODO, doc/bison.texinfo:
14240 Use "look-ahead" instead of "lookahead", to be consistent.
14241 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
14242 while we're fixing "look-ahead".
14243 * src/conflicts.c (shift_set): Renamed from shiftset.
14244 (look_ahead_set): Renamed from lookaheadset.
14245 * src/print.c: Likewise.
14246 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
14247 name for "lookahead".
14248 (report_types, usage): Likewise.
14249 * src/getargs.h (report_look_ahead_tokens): Renamed from
14250 report_lookaheads.
14251 * src/lalr.c (compute_look_ahead_tokens): Renamed from
14252 compute_lookaheads.
14253 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
14254 (look_ahead_tokens_print): Renamed from lookaheads_print.
14255 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
14256 state_rule_lookaheads_print.
14257 * src/state.h: Likewise.
14258 (reductions.look_ahead_tokens): Renamed from lookaheads.
14259 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
14260 AT_DATA_LOOKAHEADS_GRAMMAR.
14261
57a90331
PE
142622004-06-03 Paul Eggert <eggert@cs.ucla.edu>
14263
14264 * README: Update location of patched M4 distribution.
14265
8ed3234a
PE
142662004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
14267
14268 Don't assume the C++ compiler takes the same arguments as the C compiler
14269 (trivial change).
14270 * configure.ac (O0CXXFLAGS): New var.
14271 * tests/atlocal.in (CXXFLAGS): Use it.
14272
07971983
PE
142732004-05-29 Paul Eggert <eggert@cs.ucla.edu>
14274
14275 Fix some "make check" problems with C++ reported by
14276 Albert Chin-A-Young for Tru64 C++ in this thread:
14277 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
14278
14279 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
14280 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14281 Output to a .cc file for C++, not to a .c file.
14282 * tests/calc.at (AT_CHECK_CALC): Likewise.
14283 * tests/regression.at (AT_CHECK_DANCER): Likewise.
14284 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
14285
29058652
PE
142862004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
14287
14288 * tests/calc.at, tests/actions.at: Workaround for SGI
14289 C++ compiler. (trivial change)
14290
62cb8a99
PE
142912004-05-27 Paul Eggert <eggert@cs.ucla.edu>
14292
fd418816
PE
14293 Spent a few hours checking out which prerequisite versions the
14294 current sources actually require. I went all the way back to
14295 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
14296 a seemingly endless set of combinations of versions more recent
14297 than that. The bottom line is that the current sources require
14298 fairly recent versions of the build tools, and it'll be some work
14299 to change this.
14300 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
14301 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
14302 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
14303 Add comments explaining why those particular versions are
14304 currently needed.
2fa09258 14305
62cb8a99
PE
14306 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
14307 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 14308 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
14309
14310 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
14311 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
14312
caa52c10
PE
143132004-05-26 Paul Eggert <eggert@cs.ucla.edu>
14314
14315 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
14316 0.11.5. Suggested by Bruno Haible.
14317 * bootstrap: Remove gettext version checking.
14318
14319 * doc/bison.texinfo (Decl Summary): Also mention that %union
14320 can depend on prerequisite types. Problem reported by Tim
14321 Van Holder.
14322
4bfd5e4e
PE
143232004-05-25 Paul Eggert <eggert@cs.ucla.edu>
14324
2cef3017
PE
14325 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
14326 * README-alpha: Don't tell people not to package this.
14327
b9c85d5c
PE
14328 * bootstrap: Don't assume $(...) works; use `...` instead.
14329 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
14330 gettext better.
14331
4bfd5e4e
PE
14332 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
14333 put into the -d output file, and mention what to do if YYSTYPE is
14334 defined as a macro.
14335
6a36ff94
PE
143362004-05-24 Paul Eggert <eggert@cs.ucla.edu>
14337
6712933e
PE
14338 Undo change made earlier today: it caused autopoint to not bring
14339 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
14340 autopoint's.
14341
14342 * bootstrap: Check that gettext version matches what's in
14343 configure.ac. Warn users to ignore robots.txt ERROR 404.
14344 * bootstrap: Undo today's earlier change (logged below).
14345 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 14346
6a36ff94
PE
14347 The gettext version checking is causing more trouble than it's
14348 curing; remove it. Problem reported by Paul Hilfinger.
14349
14350 * bootstrap: Issue a warning that one can expect a message
14351 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
14352 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
14353
209ea708
PE
143542004-05-23 Paul Eggert <eggert@cs.ucla.edu>
14355
14356 Ensure that the C++ compiler used for testing actually works on a
14357 simple test program; if not, skip the C++-related tests. Problem
14358 reported by Vin Shelton in:
161a71f3 14359 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
14360
14361 * m4/cxx.m4: New file.
14362 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
14363 * tests/atlocal.in (BISON_CXX_WORKS): Add.
14364 * tests/local.at (AT_COMPILE_CXX): Use it.
14365
41ca2549
PE
143662004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14367
383e69dc
PE
14368 * data/glr.c (yylloc): Output this macro even if locations are not
14369 being generated, as the GLR parser needs it even in that case.
14370 Problem reported by Troy A. Johnson
14371 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
14372
41ca2549
PE
14373 * configure.ac (AC_INIT): Update to 1.875e.
14374
e476c87d
PE
143752004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14376
14377 * NEWS: Version 1.875d.
14378 * configure.ac (AC_INIT): Likewise.
14379 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
14380
14381 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
14382 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
14383 lalr1.cc runs afoul of the first, and the last two are no longer
14384 supported by GCC 3.4.0.
14385 * README: Mention GNU m4 1.4 or later; mention m4 patches.
14386 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
14387
233a88ad
PE
143882004-05-06 Paul Eggert <eggert@cs.ucla.edu>
14389
14390 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
14391 unsigned int, for compatibility with latest gnulib hash module.
14392 * src/state.c (state_hash, state_hasher): Likewise.
14393 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
14394 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 14395
12ffdd28
PE
143962004-05-03 Paul Eggert <eggert@cs.ucla.edu>
14397
14398 * NEWS: Unescaped newlines are no longer allowed in char & strings.
14399
14400 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
14401 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
14402 character and string literals.
14403 (unexpected_end): New function.
14404 (unexpected_eof): Use it.
14405 (unexpected_newline): New function.
14406 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
14407 actions.
e476c87d 14408
12ffdd28
PE
14409 * NEWS: Document %expect-rr.
14410
14411 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
14412 Fix typo by replacing $1 with $option.
14413 Remove more 'intl'-related files.
9668e2be 14414 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
14415
14416 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14417 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14418 strtoul.c.
14419 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14420 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14421 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14422 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14423 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14424 * src/.cvsignore: Add *.output.
14425
14426 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14427 gets copied to the output file.
e476c87d 14428
1f65350a
PE
144292004-04-28 Paul Eggert <eggert@twinsun.com>
14430
14431 Get files from the gnulib and po repositories, instead of relying
14432 on them being in our CVS. Upgrade to latest versions of gnulib
14433 and Automake.
14434
14435 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14436 * bootstrap: Bootstrap from gnulib and po repositories.
14437 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14438 * README-cvs: Document these changes. Remove version numbers from
14439 mentions of build tools, since they change so often. Mention Flex.
14440
14441 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14442 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
14443 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14444 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 14445 does this for us.
12ffdd28
PE
14446 (AC_ISC_POSIX): Remove; we no longer support this
14447 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
14448 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14449 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14450 Do not check for C89 headers, except for locale.h which is used
14451 by the Yacc library and must port to K&R hosts.
14452 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14453 Do not check for C89 functions, except for setlocale which is
14454 used by the Yacc library.
14455 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14456 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14457 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14458 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14459 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14460 AM_GNU_GETTEXT): Remove; now done by:
14461 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14462 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14463 for us.
14464
14465 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14466 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14467 Define to empty, as gnulib.mk will do the rest for us.
14468 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14469 for us.
14470 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14471 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14472
14473 * src/files.c: Include gnulib's xstrndup.h.
14474
14475 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14476 (REALLOC): Use xnrealloc, for likewise.
14477 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14478 (strnlen, memrchr): Remove decls; functions no longer used.
14479 Include <stpcpy.h>.
14480
14481 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14482 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14483 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14484 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14485 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14486 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14487 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14488 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14489 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14490 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14491 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14492 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14493 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14494 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14495 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14496 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14497 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14498 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14499 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14500 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14501 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14502 Remove, as these files are now generated automatically
14503 by bootstrap or automake.
14504
14505 * po/ChangeLog: Remove: all but one entry was a duplicate
14506 of this file, and I moved that 2000-11-02 entry here.
14507
14508 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14509 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14510 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14511 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14512 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14513 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14514 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14515 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14516 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14517 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14518 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14519 xstrndup.h.
14520 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14521 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14522 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14523 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14524 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14525 * src/.cvsignore: Remove *_.c.
14526
14527
14528 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14529 support it. (The latest stable gzip doesn't.)
14530
145312004-04-27 Paul Eggert <eggert@twinsun.com>
14532
14533 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14534 case, as stos_ is now used by destructors due to the 2004-02-09
14535 change.
14536
14537 Remove more K&R C support.
14538 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14539 * lib/subpipe.c (errno): Remove decl.
14540 Include <stdlib.h> unconditionally.
14541 (EXIT_FAILURE): Remove macro.
14542 * src/complain.c (vfprintf, strerror): Remove.
14543 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14544 unconditionally.
14545 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14546 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14547 (strchr, strspn, memchr): Remove decls.
14548 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14549 unconditionally. Do not declare perror.
14550 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14551 unconditionally.
14552
14553 * src/complain.c (_): Remove useless defn, as system.h defines this.
14554
14555 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14556 with latest obstack.h.
14557 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14558 to procedure types, as obstack.h now does that for us.
14559 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14560
14561 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14562 so that this include file can stand alone.
14563 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14564 does this now. Include subpipe.h first after config.h, to
14565 test whether it can stand alone.
14566
14567 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14568 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14569 unused declaration.
14570
14571 * tests/synclines.at (%union synch line): Put a dummy member in
14572 the union, because empty unions aren't allowed in C. Caught
14573 by GCC 3.4.0.
14574
4f16766c
PE
145752004-04-13 Jim Meyering <jim@meyering.net>
14576
14577 * src/conflicts.c (conflicts_print): Correct format string typo:
14578 use `%%' to produce literal `%'. (trivial change)
14579
779e7ceb
PE
145802004-03-30 Paul Eggert <eggert@twinsun.com>
14581
14582 * src/getargs.c (version): Update copyright year to 2004.
14583
14584 * data/c.m4 (b4_int_type): Use 'short int' rather than
14585 'short', and similarly for 'long', 'unsigned', etc.
14586 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14587 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14588 yy_yypstack, yydumpstack): Likewise.
14589 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14590 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14591 Likewise.
14592 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14593 yy_stack_print, yyparse): Likewise.
14594 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14595 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14596 * lib/bitset.c (bitset_print): Likewise.
14597 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14598 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14599 * lib/bitsetv.c (bitsetv_dump): Likewise.
14600 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14601 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14602 Likewise.
14603 * src/LR0.c (allocate_itemsets): Likewise.
14604 * src/gram.h (rule_number, rule): Likewise.
14605 * src/lalr.h (goto_number): Likewise.
14606 * src/nullable.c (nullable_compute): Likewise.
14607 * src/output.c (prepare_rules): Likewise.
14608 * src/relation.c (relation_print, relation_digraph): Likewise.
14609 * src/relation.h (relation_node): Likewise.
14610 * src/state.h (state_number, transitions, errs, reductions,
14611 struct state): Likewise.
14612 * src/symtab.h (symbol_number, struct symbol): Likewise.
14613 * src/tables.c (vector_number, tally, action_number,
14614 default_goto, goto_actions): Likewise.
14615 * tests/existing.at (GNU Cim Grammar): Likewise.
14616 * tests/regression.at (Web2c Actions): Likewise.
14617
14618 * src/output.c (muscle_insert_short_int_table): Renamed from
14619 muscle_insert_short_table. All uses changed.
14620
d6328241
PH
146212004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14622
14623 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14624 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14625 Add %expect-rr rule.
4f16766c 14626
d6328241
PH
14627 * src/scan-gram.l: Recognize %expect-rr.
14628
4f16766c 14629 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 14630 expected_conflicts.
4f16766c 14631 (expected_rr_conflicts): Declare.
d6328241
PH
14632
14633 * src/conflicts.c (expected_sr_conflicts): Rename from
14634 expected_conflicts.
14635 (expected_rr_conflicts): Define.
14636 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14637 for GLR parsers.
14638 Use expected_sr_conflicts in place of expected_conflicts.
14639 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 14640
d6328241 14641 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 14642
1452af69
PE
146432004-03-08 Paul Eggert <eggert@gnu.org>
14644
14645 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 14646 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
14647
14648 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14649 in lalr1.cc.
14650 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14651 * src/scan-gram.l (scan_integer): New function.
14652 ({int}): Use it.
14653 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14654 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14655 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14656 Say "long int", not "long", for uniformity with GNU style.
14657
006d217d
PE
146582004-02-25 Paul Eggert <eggert@twinsun.com>
14659
14660 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14661 compilers. This fixes a problem with Intel's C++ compiler being
14662 chatty, reported by Guido Trentalancia in
161a71f3 14663 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 14664
c2729758
ADL
146652004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14666
14667 Support %destructor and merge error locations in lalr1.cc.
14668
14669 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14670 (Parser::stos_): Define unconditionally.
14671 (Parser::destruct_): New method. Generate its body with
14672 b4_yydestruct_generate.
14673 (Parser::error_start_): New attribute.
14674 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14675 token which are discarded.
14676 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14677 error_start_ when erroneous token are discarded.
14678 (Parser::parse) <yyerrlab1>: Compute the location of the error
14679 token so that it covers all the discarded tokens.
14680 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14681 it can be called with `%skeleton "lalr1.cc"', and do that.
14682
dd0e0635
PE
146832004-02-02 Paul Eggert <eggert@twinsun.com>
14684
14685 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14686 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14687 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14688 There's no need to mention top_builddir since Automake does that
14689 for us.
14690 (INCLUDES): Remove, as Automake says it's obsolescent.
14691 Contents migrated into AM_CPPFLAGS as described above.
14692 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14693
146942004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14695
14696 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14697 (yyreportSyntaxError): Handle case where lookahead token is
14698 YYEMPTY.
14699
be16239b
PH
147002004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14701
14702 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14703 resulting parsers are compilable with C++.
14704
5fa90832
PE
147052003-12-23 Paul Eggert <eggert@twinsun.com>
14706
14707 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14708 * src/output.c (output_skeleton): Rename local var.
14709 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14710 Bison tokens, as this runs afoul of the 2003-10-07 change that
14711 disallowed NUL bytes in character constants or string literals.
14712
14713 * tests/local.at: Require Autoconf 2.59's Autotest.
14714 * tests/testsuite.at: Don't include local.at, since we now assume
14715 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14716 including it.
14717 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14718 multiple inclusion warnings.
dd0e0635 14719
b165c324
AD
147202003-12-02 Akim Demaille <akim@epita.fr>
14721
14722 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14723 conditions.
14724 From Bruno Haible.
14725
26e06a21
ADL
147262003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14727
14728 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14729
92ac3705
PE
147302003-10-07 Paul Eggert <eggert@twinsun.com>
14731
6a5ecb38
PE
14732 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14733 if testsuite doesn't exist.
14734
92ac3705
PE
14735 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14736 literals, unfortunately.
14737 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14738 Complain about NUL bytes in character constants or string literals.
14739
91d2c560
PE
147402003-10-05 Paul Eggert <eggert@twinsun.com>
14741
14742 * NEWS: Don't document %no-default-prec, as it's still
14743 too experimental.
14744 * doc/bison.texinfo: Document %no-default-prec only if
14745 the defaultprec flag is set. Normally it's not.
14746
0cc3da3a
PE
147472003-10-04 Paul Eggert <eggert@twinsun.com>
14748
14749 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14750 non-modifiable lvalue, instead of a modifiable one.
14751 * doc/bison.texinfo (Actions): Document that $$ can
14752 be assigned to. Do not claim that $$ and $N are
14753 array element references: user code should not rely on this.
14754
22fccf95
PE
147552003-10-01 Paul Eggert <eggert@twinsun.com>
14756
14757 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14758 (grammar_declaration): Use it.
14759 * src/scan-gram.l: New token %no-default-prec.
14760 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14761 * NEWS, doc/bison.texinfo: Document the above.
14762
fc8f2965
AD
147632003-10-01 Akim Demaille <akim@epita.fr>
14764
14765 VCG no longer supports long_straight_phase.
14766
14767 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14768 * src/print_graph.c (print_graph): Adjust.
14769
39a06c25
PE
147702003-09-30 Frank Heckenbach <frank@g-n-u.de>
14771 and Paul Eggert <eggert@twinsun.com>
14772
14773 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14774 Table of Symbols): Document %default-prec.
14775 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14776 (grammar_declaration): Set default_prec on %default-prec.
14777 * src/scan-gram.l (%default-prec): New token.
14778 * src/reader.h (default_prec): New flag.
14779 * src/reader.c: Likewise.
14780 (packgram): Handle it.
14781 * tests/conflicts.at (%default-prec without %prec,
14782 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 14783
39a06c25
PE
147842003-09-30 Paul Eggert <eggert@twinsun.com>
14785
14786 * tests/testsuite.at: Include local.at, not input.at, fixing
14787 a typo in the 2003-08-25 patch.
14788
62b6aef9
AD
147892003-08-27 Akim Demaille <akim@epita.fr>
14790
14791 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14792 GCC warnings.
14793
89e1cc61
AD
147942003-08-26 Akim Demaille <akim@epita.fr>
14795
14796 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14797 "<\#" to avoid magic from Gnus when posting parts of this script.
14798
a08460b0
AD
147992003-08-26 Akim Demaille <akim@epita.fr>
14800
14801 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14802 (Parser::parse): here.
14803 Adjust: nerrs and errstatus is now replaced by...
14804 (Parser::nerrs_, Parser::errstatus_): New.
14805
603f1cfd
AD
148062003-08-25 Akim Demaille <akim@epita.fr>
14807
14808 * config/announce-gen, Makefile.cfg: New.
14809 * Makefile.am: Adjust.
14810 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14811 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14812
cd3684cf
AD
148132003-08-25 Akim Demaille <akim@epita.fr>
14814
14815 When reducing initial empty rules, Bison parser read an initial
14816 location that is not defined. This results in garbage, and that
14817 affects Bison's own parser. Therefore we need (i) to extend Bison
14818 to support a means to initialize this location, and (ii) to use
14819 this CVS Bison to fix CVS Bison's parser.
14820
14821 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14822 with...
14823 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14824 * src/parse-gram.y: Adjust.
14825 (%initial-action): New.
14826 (%error-verbose): Since we require CVS Bison, there is no reason
14827 not to use it.
14828 * src/scan-gram.l: Adjust.
14829 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14830 * data/yacc.c (yyparse): Use b4_initial_action.
14831
4e03e201
AD
148322003-08-25 Akim Demaille <akim@epita.fr>
14833
14834 * doc/bison.texinfo: Don't promote stdout for error messages.
14835
8c182d05
AD
148362003-08-25 Akim Demaille <akim@epita.fr>
14837
14838 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14839 From Alexandre Duret-Lutz.
14840
6a60c4cf
PE
148412003-08-25 Akim Demaille <akim@epita.fr>
14842
14843 Version 1.875c.
14844
25f66e1a
AD
148452003-08-25 Akim Demaille <akim@epita.fr>
14846
14847 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14848 Use them.
14849
5348bfbe
AD
148502003-08-25 Akim Demaille <akim@epita.fr>
14851
14852 * data/lalr1.cc (Parser::reduce_print_): New.
14853 Use it.
14854
47301314
AD
148552003-08-25 Akim Demaille <akim@epita.fr>
14856
14857 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14858 error recovery loops. This patch is based on
161a71f3 14859 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
14860 Also, augment the similarity between lalr1.cc and yacc.c.
14861 Note: the locations of error recovery rules are not correct yet.
14862
14863 * data/lalr1.cc: Comment changes to augment the similarity between
14864 lalr1.cc and yacc.c.
14865 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14866 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14867 yyerrlab), when hitting EOF, pop the whole stack here instead of
14868 merely falling thru the default error handling mechanism.
14869 (yyerrorlab): New label, with the old contents of YYERROR,
14870 plus the following change: pop the stack of rhs corresponding
14871 to the production that invoked YYERROR. That is how Yacc
14872 behaves (required by POSIX).
14873 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14874 fail.
14875
1f7a61ff
AD
148762003-08-25 Akim Demaille <akim@epita.fr>
14877
14878 Tune local.at so that people can "autom4te -l autotest calc.at -o
14879 calc" for instance, to extract a sub test suite.
14880
14881 * tests/testsuite.at: Move the initialization, Autotest version
14882 requirement, and AT_TESTED invocation into...
14883 * tests/local.at: here.
14884 * tests/testsuite.at: Include it for compatibility with Autoconf
14885 2.57.
14886 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14887 be ignore.
14888
327b5b56
PE
148892003-08-04 Paul Eggert <eggert@twinsun.com>
14890
14891 Rework code slightly to avoid gcc -Wtraditional warnings.
14892 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14893 The returned value is now stored in *YY0. All callers changed.
14894 * src/output.c (merge_output): Adjust to the above change.
14895
0051e3ed
PE
148962003-07-26 Paul Eggert <eggert@twinsun.com>
14897
14898 * data/glr.c (YYASSERT): New macro.
14899 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14900 yyresolveStates, yyprocessOneStack):
14901 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14902 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 14903
137437c6
PE
149042003-07-25 Paul Eggert <eggert@twinsun.com>
14905
5b620e06
PE
14906 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14907 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 14908 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
14909 by Frank Heckenbach, though I have omitted the structure-initialization
14910 part of his glr-knr.diff patch since I recall that the Portable
14911 C Compiler didn't require that change.
14912
137437c6
PE
14913 Let the user specify how to allocate and free memory.
14914 Derived from a suggestion by Frank Heckenbach in
161a71f3 14915 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
14916 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14917 All uses of free, malloc, realloc changed to use these macros,
14918 and unnecessary casts removed.
14919 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14920
ddb85ca5
PE
149212003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14922
14923 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14924 use s.empty() rather than s == "" to test for empty string; see
161a71f3 14925 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
14926 (trivial change)
14927
39910e09
AD
149282003-06-25 Akim Demaille <akim@epita.fr>
14929
14930 * config/depcomp, config/install-sh: Update from masters.
14931
0ae99356
PE
149322003-06-20 Paul Eggert <eggert@twinsun.com>
14933
14934 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14935 and return properly parenthesized result.
14936 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14937 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14938 Remove unnecessary parentheses from uses.
14939 * doc/bison.texinfo (Location Default Action): Describe the
14940 conventions for parentheses.
14941
cd05d13c
PE
149422003-06-19 Paul Eggert <eggert@twinsun.com>
14943
81fd08ca
PE
14944 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14945 yyreportTree): Do not assume that size_t is the same width as int,
14946 when printing sizes. Print sizes using an unsigned format.
14947 Problem reported by Frank Heckenbach in
161a71f3 14948 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 14949
cd05d13c
PE
14950 Port to Forte Developer 7 C compiler.
14951 * data/glr.c (struct YYLTYPE): If locations are not being used,
14952 declare a single dummy member, as empty structs do not conform
14953 to the C standard.
14954 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14955 the Forte Developer 7 C compiler complains that end-of-loop
14956 code is not reached.
14957
4dcf140b
PE
149582003-06-17 Paul Eggert <eggert@twinsun.com>
14959
14960 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14961 avoid warnings from picky compilers about redefinition of PARAMS.
14962
8dd76bee
PE
149632003-06-17 Paul Eggert <eggert@twinsun.com>
14964
14965 Version 1.875b.
14966
14967 * NEWS: Document 1.875b.
14968
14969 * lib/bbitset.h: Do not include config.h; that's the includer's job.
14970 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
14971 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
14972 Don't use 'index' in comments, as it's a builtin fn on some hosts.
14973 * lib/bitset_stats.c: Include gettext.h unconditionally, as
14974 per recent gettext manual's suggestion.
14975 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
14976 Use prototypes, not old-style definitions.
14977 * lib/lbitset.c (lbitset_unused_clear): Likewise.
14978 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
14979 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
14980 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
14981 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
14982 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
14983 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
14984 vbitset_or_and_cmp, vbitset_copy): Likewise.
14985
14986 * lib/libiberty.h: Do not include config.h; that's the includer's job.
14987 Do not include <stdlib.h>.
14988 (PARAMS): Define unconditionally for C89.
14989 (ATTRIBUTE_NORETURN): Remove.
14990 (ATTRIBUTE_UNUSED): Define unconditionally.
14991
14992 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 14993 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
14994 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
14995 * lib/vbitset.c, lib/vbitset.h: New files.
14996 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14997 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
14998 from libbitset.
14999
15000 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
15001 `How Can I Reset @code{yyparse}', since texinfo does not allow
15002 arbitrary @ in node names.
15003
15004 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
15005 shouldn't be needed according to the gettext 0.12.1 documentation
15006 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 15007 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 15008 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 15009 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 15010
8dd76bee
PE
15011 * lib/.cvsignore: Add stdbool.h.
15012 * m4/.cvsignore: Add nls.m4, po.m4.
15013
15014 Upgrade to CVS gnulib.
15015 * stdbool_.h: File renamed from stdbool.h.in.
15016 * configure.ac (AM_STDBOOL_H): Invoke this instead of
15017 AC_HEADER_STDBOOL.
15018 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
15019 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
15020 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
15021 (MOSTLYCLEANFILES): New var.
15022 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
15023 (stdbool.h): New rule.
15024 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
15025 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
15026 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
15027 m4/quote.m4: Upgrade to today's gnulib.
15028
15029 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
15030 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
15031 the tests right now.
15032 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
15033 yyerror are declared before use; C99 requires this.
15034
25005f6a
PH
150352003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15036
15037 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
15038 first.
15039 (yyrecoverSyntaxError): Correct the logic for setting and testing
15040 yyerrState.
15041 Correct comment on handling EOF.
15042 Allow states with only a default reduction, rather than failing
8dd76bee 15043 (I can't quite reconstruct why these were not allowed before).
25005f6a 15044
137437c6 15045 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 15046 buffer overruns, corrupting state.
8dd76bee
PE
15047
15048 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
15049 definition.
15050 * src/reader.h (max_left_semantic_context): New variable declaration.
15051 * src/scan-gram.l (max_left_semantic_context): Define.
15052 (handle_action_dollar): Update max_left_semantic_context.
15053 * data/glr.c (YYMAXLEFT): New definition.
15054 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
15055 (yyresolveAction): Ditto.
15056
15057 Fixes to problems with location handling in GLR parsers reported by
15058 Frank Heckenbach (2003/06/05).
15059
15060 * data/glr.c (YYLTYPE): Make trivial if locations not used.
15061 (YYRHSLOC): Add parentheses, and define only if locations used.
15062 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
15063 locations not used.
15064 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
15065 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 15066
25005f6a
PH
15067 * tests/cxx-type.at: Exercise location information; update tests
15068 to differentiate output with and without locations.
8dd76bee 15069 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
15070 because default YYLTYPE not yet defined.
15071 Change semantic actions to compute strings, rather than printing
15072 them directly (to test proper passing of semantics values). Change
15073 output to prefix notation and update test data and expected results.
15074 (yylex): Track locations.
15075 (stmtMerge): Return value rather than printing, and include arguments
15076 in value.
8dd76bee 15077
711f40b7
PE
150782003-06-03 Paul Eggert <eggert@twinsun.com>
15079
15080 Avoid warnings generated by GCC 2.95.4 when Bison is
15081 configured with --enable-gcc-warnings.
15082 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
15083 yy::]b4_parser_class_name[::translate_,
15084 yy::Stack::operator[] (unsigned),
15085 yy::Stack::operator[] (unsigned) const,
15086 yy::Slice::operator[] (unsigned),
15087 yy::Slice::operator[] (unsigned) const):
15088 Rename local vars to avoid warnings.
15089 * tests/glr-regression.at (Improper handling of embedded actions
15090 and $-N in GLR parsers): Remove unused local variable from yylex.
15091 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
15092 (void) as arg when not pure, since we now assume C89 when building
15093 Bison. Pacify GCC by using parameter.
15094
ac695f7d
PE
150952003-06-02 Paul Eggert <eggert@twinsun.com>
15096
15097 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
15098 yy::Location::lines, yy::Location::columns): Rename arguments
15099 to avoid shadowing; this removes a warning generated by GCC 3.3.
15100
26ec81e0
PE
151012003-06-01 Paul Eggert <eggert@twinsun.com>
15102
15103 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
15104 to g++, as GCC 3.3 complains if you do it.
15105 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
15106 everything that WARNING_CFLAGS has, except omit warnings
15107 not suitable for C++.
15108 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
15109 * tests/atlocal.in (CXXFLAGS): New var.
15110 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
15111
15112 Fix a GLR parser bug I reported in February; see
161a71f3 15113 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
15114 The problem was that GLR parsers did not conform to the C standard,
15115 because actions like { $1 = $2 + $3; } expanded to expressions
15116 that invoked YYFILL in separate subexpressions, and YYFILL assigned
15117 to a local variable. The C standard says that expressions
15118 like (var = f ()) + (var = f ()) have undefined behavior.
15119 Another problem was that GCC sometimes issues warnings that
15120 yyfill and its parameters are unused.
15121
15122 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
15123 as possibly unused.
15124 (yyfill): New function.
15125 (YYFILL): Use it.
15126 (yyuserAction): Change type of yynormal to bool, so that it matches
15127 the new yyfill signature. Mark it as possibly unused.
15128
15129
15130 Follow up on a bug I reported in February, where a Bison-generated
15131 parser can loop. Provide a test case and a fix for yacc.c. I
15132 don't have a fix for lalr1.cc or for glr.c, unfortunately.
15133 The original bug report is in:
161a71f3 15134 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
15135
15136 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
15137 macro's size was becoming unwieldy.
15138 (yyerrlab): Do not discard an empty lookahead symbol, as this
15139 might destroy garbage.
15140 (yyerrorlab): New label, with the old contents of YYERROR,
15141 plus the following change: pop the stack of rhs corresponding
15142 to the production that invoked YYERROR. That is how Yacc
15143 behaves, and POSIX requires this behavior.
15144 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
15145 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
15146 Define 'alarm' to do nothing if unistd.h is not available.
15147 Add a new rule "exp: '-' error;" to test the above change to
15148 data/yacc.c. Use 'alarm' to abort any test taking longer than
15149 10 seconds, as it's probably looping.
15150 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
15151 Also, the new yacc.c generates two fewer diagnostics for an
15152 existing test.
15153
d0829076
PE
151542003-05-24 Paul Eggert <eggert@twinsun.com>
15155
c6ae27df
PE
15156 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
15157 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
15158 This fixes a problem reported by John Bowman when the Compaq/HP
15159 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
15160 -ansi -Wall -gall).
15161 * data/yacc.c (union yyalloc): Likewise.
15162 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 15163
d0829076
PE
15164 Switch from 'int' to 'bool' where that makes sense.
15165
15166 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
15167 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
15168 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
15169 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
15170 Return or accept bool, not int. All callers changed.
15171 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
15172 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
15173 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
15174 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
15175 bitset_or_and_cmp_): Likewise.
15176 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
15177 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
15178 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
15179 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
15180 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
15181 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
15182 bitset_stats_or_and_cmp): Likewise.
15183 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
15184 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
15185 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
15186 ebitset_xor_cmp): Likewise.
15187 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
15188 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
15189 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
15190 lbitset_xor_cmp): Likewise.
15191 * lib/bbitset.h: Include <stdbool.h>.
15192 (struct bitset_vtable): The following members now return bool, not
15193 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
15194 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
15195 or_and_cmp).
15196 * src/conflicts.c (count_rr_conflicts): Likewise.
15197 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
15198 All uses changed.
15199 * lib/ebitset.c (ebitset_obstack_init): Likewise.
15200 * lib/lbitset.c (lbitset_obstack_init): Likewise.
15201 * src/getargs.c (debug_flag, defines_flag, locations_flag,
15202 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15203 graph_flag): Likewise.
15204 * src/getargs.h (debug_flag, defines_flag, locations_flag,
15205 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15206 graph_flag): Likewise.
15207 * src/output.c (error_verbose): Likewise.
15208 * src/output.h (error_verbose): Likewise.
15209 * src/reader.c (start_flag, typed): Likewise.
15210 * src/reader.h (typed): Likewise.
15211 * src/getargs.c (LOCATIONS_OPTION): New constant.
15212 (long_options, getargs): Use it.
15213 * src/lalr.c (build_relations): Use bool, not int.
15214 * src/nullable.c (nullable_compute): Likewise.
15215 * src/print.c (print_reductions): Likewise.
15216 * src/tables.c (action_row, pack_vector): Likewise.
15217 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
15218 * src/output.c (prepare): Use it.
15219 * src/output.c (token_definitions_output,
15220 symbol_destructors_output, symbol_destructors_output): Use string,
15221 not boolean integer, to keep track of whether to output separator.
15222 * src/print_graph.c (print_core): Likewise.
15223 * src/state.c (state_rule_lookaheads_print): Likewise.
15224
15225 * config/install-sh: Sync from automake 1.7.5.
15226
6b2584b7
PE
152272003-05-14 Paul Eggert <eggert@twinsun.com>
15228
15229 * src/parse-gram.y (rules_or_grammar_declaration): Require a
15230 semicolon after a grammar declaration, in the interest of possible
15231 future changes to the Bison input language.
15232 Do not allow a stray semicolon at the start of the grammar.
15233 (rhses.1): Allow one or more semicolons after any rule, including
15234 just before "|" as required by POSIX.
15235 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
15236 grammar.
15237
caf37a36
ADL
152382003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
15239
15240 %parse-param support for lalr1.cc.
15241
15242 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
15243 b4_cc_constructor_calls, b4_cc_constructor_call,
15244 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
15245 definitions.
15246 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
15247 parse-param arguments.
15248 (yy::b4_parser_class_name): Declare instance variables to
15249 hold parse-param arguments.
15250 * tests/calc.at: s/value/semantic_value/ because value clashes
15251 with a member of yy::b4_parser_class_name. Adjust C++ code
15252 to handle %parse-param. Enable %parse-param test in C++.
15253
3ab37077
PE
152542003-05-12 Paul Eggert <eggert@twinsun.com>
15255
15256 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
15257 English a bit. Fix fclose typo. Change "const char" to "char
15258 const", and use ANSI C rather than K&R for "main". Suggest
15259 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
15260 and suggest yy_switch_to_buffer.
15261
152622003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
15263
15264 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
15265 C89. This avoids a diagnostic on compilers that define __STDC__
15266 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 15267 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 15268
e743727f
PE
152692003-05-03 Paul Eggert <eggert@twinsun.com>
15270
15271 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
15272 Do not overrun array bounds.
15273 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 15274 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 15275
916708d5
AD
152762003-04-29 Akim Demaille <akim@epita.fr>
15277
15278 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
15279 * src/getargs.c, src/getargs.h: here, as bool, not int.
15280 (nondeterministic_parser): New.
15281 * src/parse-gram.y, src/scan-gram.l: Support
15282 %nondeterministic-parser.
15283 * src/output.c (prepare): Use nondeterministic_parser instead
15284 of glr_parser where appropriate.
15285 * src/tables.c (conflict_row, action_row, save_row)
15286 (token_actions, token_actions, pack_vector): Ditto.
15287
a06ea4aa
AD
152882003-04-29 Akim Demaille <akim@epita.fr>
15289
15290 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
15291
211074ca
AD
152922003-04-29 Akim Demaille <akim@epita.fr>
15293
15294 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
15295 with %pure-parser and %locations to exercise the patch from Yakov
15296 Markovitch below.
15297
6175ffe3
PE
152982003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
15299
15300 * data/yacc.c: (b4_lex_param): Corrected for the case where
15301 %lex-param is provided and %pure-parser isn't.
15302
b1e95857
PE
153032003-04-27 Paul Eggert <eggert@twinsun.com>
15304
15305 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 15306 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
15307 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
15308 if it is not defined.
15309 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
15310
acda9df6
PE
153112003-04-26 Paul Eggert <eggert@twinsun.com>
15312
3470c57b
PE
15313 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
15314 Declare to be of type suitable for the ninf value itself, not of
15315 type suitable for the corresponding table, since the latter might
15316 be unsigned but the ninf value might be negative. This fixes a
15317 bug reported by Alexandre Duret-Lutz in
161a71f3 15318 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 15319
acda9df6
PE
15320 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
15321 invokes it. We shouldn't invoke it twice because it will attempt
15322 to put error.o in the archive twice. This fixes a glitch reported
15323 by Martin Mokrejs in
161a71f3 15324 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 15325
b5250f26
PE
153262003-04-21 Paul Eggert <eggert@twinsun.com>
15327
15328 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
15329 to gnulib.
15330
089ac0f1
PE
153312003-04-21 Yakov Markovitch <Markovitch@iso.ru>
15332
15333 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
15334 Fix obvious typo that results in uncompilable GLR parsers
15335 when both %pure-parser and %locations are used. (trivial change)
15336
5ededac6
PE
153372003-04-17 Paul Eggert <eggert@twinsun.com>
15338
1b8f2fff
PE
15339 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
15340 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
15341 Do not insert the expected token via unput, as this runs afoul
15342 of a POSIX-compatibility bug in flex 2.5.31.
15343 All uses changed to BEGIN the parent state,
15344 since we no longer insert the expected token via unput.
15345 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
15346 that is no longer emitted after the above change.
15347
5ededac6
PE
15348 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
15349 the first one. This change is from Paul Hilfinger, and it fixes
15350 regression reported by Werner Lemberg in
161a71f3 15351 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
15352
15353 (resolve_sr_conflict): Don't invoke state_errs_set
15354 unless one or more tokens have been explicitly made errors.
15355 Otherwise, the above change causes Bison to abort.
15356
15357 * tests/existing.at (GNU pic Grammar): New test case, taken from
15358 Lemberg's email.
15359
b8be9132
AD
153602003-03-31 Akim Demaille <akim@epita.fr>
15361
15362 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
15363
d423d460
AD
153642003-03-31 Akim Demaille <akim@epita.fr>
15365
15366 * src/output.c (prepare_symbols): Avoid trailing spaces in the
15367 output.
15368
c7e441b4
AD
153692003-03-31 Akim Demaille <akim@epita.fr>
15370
15371 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
15372 From Paul Hilfinger.
15373
231897ad
AD
153742003-03-29 Akim Demaille <akim@epita.fr>
15375
15376 * m4/error.m4: Do not put under dynamic conditions some code which
15377 expansion is under static control.
15378
5b066063
AD
153792003-03-29 Akim Demaille <akim@epita.fr>
15380
15381 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
15382
22a74fec
AD
153832003-03-29 Akim Demaille <akim@epita.fr>
15384
15385 * doc/bison.texinfo (Strings are Destroyed): New.
15386
0eee27e7
PE
153872003-03-13 Paul Eggert <eggert@twinsun.com>
15388
15389 * .cvsignore: Add configure.lineno.
15390 * src/.cvsignore: Add yacc.
15391 * tests/.cvsignore: Add testsuite.log.
15392 * doc/fdl.texi: Sync with latest FSF version.
15393
f61aad93
PE
153942003-03-12 Paul Eggert <eggert@twinsun.com>
15395
537636c7
PE
15396 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
15397 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
15398 cursor, instead of leaving it undefined. This fixes a bug
15399 reported by Tim Van Holder in
161a71f3 15400 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
15401 * tests/input.at (Torturing the Scanner): Test the scanner on
15402 an empty input file, which was Tim Van Holder's test case.
15403
15404 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
15405 <sys/resource.h> can be included, include sys/time.h and
15406 sys/times.h first, if available. This works around the SunOS
15407 4.1.4 porting bug reported by Bruce Becker in
161a71f3 15408 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
15409
15410 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
15411 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
15412 AC_HEADER_SYS_WAIT.
15413
f61aad93
PE
15414 Merge changes from gnulib. This was prompted because the CVS
15415 snapshot didn't build on Solaris 7 due to strnlen problems.
15416
15417 These changes need to be merged back into gnulib:
15418 * lib/hash.c: Include <stdbool.h> unconditionally.
15419 * m4/onceonly.m4 (m4_quote): New macro.
15420 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15421 Quote AC_FOREACH variable-expansions properly.
15422 The 2003-01-03 obstack.h change also needs merging.
15423 {end of changes requiring merging}
5b066063 15424
f61aad93
PE
15425 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15426 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15427 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15428 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15429 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15430 New files, imported from gnulib.
15431 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15432 above.
15433
15434 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15435 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15436 gnulib sources.
15437
15438 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15439 Add.
15440 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15441 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15442 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15443 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15444 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15445 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15446 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15447 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15448 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15449 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15450 (jm_PREREQ_ARGMATCH): Remove.
15451 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15452 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15453
15454 * src/system.h: Include <stdbool.h> unconditionally.
15455
15456 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15457 assuming at least C89 in the bitset code for some time now.
15458
d2ffe116
AD
154592003-03-03 Akim Demaille <akim@epita.fr>
15460
15461 * ro.po: New.
15462
052826fd
AD
154632003-03-02 Akim Demaille <akim@epita.fr>
15464
15465 * doc/bison.texinfo (Table of Symbols): Reactivate the
15466 documentation for %lex-param, and %parse-param.
15467
c4749565
AD
154682003-03-02 Akim Demaille <akim@epita.fr>
15469
15470 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15471 generate verbose error messages.
15472 Use the number of tokens as an upper bound in yytname, as it
15473 cannot be a non terminal.
15474
d5286af1
AD
154752003-03-02 Akim Demaille <akim@epita.fr>
15476
15477 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15478 message.
15479
22e304a6
AD
154802003-03-02 Akim Demaille <akim@epita.fr>
15481
22e304a6
AD
15482 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15483 Use them to exercise yycheck overrun.
15484 Based on Andrew Suffield's grammar.
15485
67a25fed
AD
154862003-03-02 Akim Demaille <akim@epita.fr>
15487
15488 Create tests/local.at for Bison generic testing macros.
15489
15490 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15491 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15492 This new file.
15493 * tests/calc.at (AT_CHECK_CALC): Adjust.
15494 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15495 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15496 * tests/local.at: here.
15497 (AT_COMPILE_CXX): Tags the tests using it as c++.
15498 Ignore the test if CXX is not functional.
15499
9c2b381f
PE
155002003-03-01 Paul Eggert <eggert@twinsun.com>
15501
15502 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15503 not loc->end, since loc->end might contain garbage and this leads
15504 to undefined behavior on some platforms.
15505 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15506 depend on *loc, so that the reader doesn't give the the false
15507 impression that *loc is initialized.
15508 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15509 does not survive the return.
15510
0433ba88
AD
155112003-03-01 Akim Demaille <akim@epita.fr>
15512
15513 * src/scan-gram.l (code_start): Always initialize it when entering
15514 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15515 yylex invocation. An alternative would be making it static, but
15516 then it starts with the second %%'s beginning, instead of its end.
15517
b305ea69
PE
155182003-02-28 Paul Eggert <eggert@twinsun.com>
15519
15520 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15521 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 15522 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 15523
c3d25e01
PE
155242003-02-26 Paul Eggert <eggert@twinsun.com>
15525
15526 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15527 Remove Sequent/Pyramid discussion (nobody uses them any more).
15528 Merge VMS and MS-DOS discussion; these ports may well be dead
15529 but let's keep mentioning them for now. Put <> around email
15530 addresses. Add copyright notice.
15531
c267ffbc
PE
155322003-02-24 Paul Eggert <eggert@twinsun.com>
15533
15534 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15535 to avoid collision with flex use of yylineno.
15536 Problem reported by Bruce Lilly in
161a71f3 15537 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
15538 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15539 * data/yacc.c (yy_reduce_print): Likewise.
15540
15541 * config/depcomp: Sync with Automake 1.7.3.
15542
f939fc12
AD
155432003-02-21 Akim Demaille <akim@epita.fr>
15544
15545 * data/lalr1.cc: Use temporary variables instead of casts to
15546 change integer types.
15547 Suggested by Paul Eggert.
15548
95923bd6
AD
155492003-02-21 Akim Demaille <akim@epita.fr>
15550
15551 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15552 to avoid confusions with lalr1.cc's notion of Position.
15553 Suggested by Paul Eggert.
15554
2cdc240e
AD
155552003-02-20 Akim Demaille <akim@epita.fr>
15556
15557 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15558 before initial_columns.
15559 (location.hh): Use consistent variable names when defining the
15560 operator<<.
15561 Use "last" so that we subtract from Positions, not from unsigned.
15562
5d003116
AD
155632003-02-20 Akim Demaille <akim@epita.fr>
15564
15565 * data/lalr1.cc (position.hh): New subfile, including the extended
15566 and Doxygen'ed documentation of class Position.
15567 (location.hh): Use it.
15568 Document a` la Doxygen.
ba1ecc07 15569 With the help of Benoit Perrot.
5d003116 15570
d02b25f9
AD
155712003-02-20 Akim Demaille <akim@epita.fr>
15572
15573 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15574 AT_YACC_IF.
15575 Redefine AT_YYERROR_SEES_LOC_IF using it.
15576 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15577 not defined.
15578 Don't use the location in yy::Parser::error_ and
15579 yy::Parser::print_ when not %locations.
15580 Activate more lalr1.cc tests.
15581
0d1c3a04
AD
155822003-02-19 Akim Demaille <akim@epita.fr>
15583
15584 * data/lalr1.cc: When displaying a line number, be sure to make it
15585 an int.
15586
60a777aa
AD
155872003-02-19 Akim Demaille <akim@epita.fr>
15588
15589 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15590 Remove, useless.
15591 (YYABORT, YYACCEPT, YYERROR): New.
15592 * tests/calc.at: Renable the lalr1.cc test.
15593
0b86fc41
AD
155942003-02-19 Akim Demaille <akim@epita.fr>
15595
15596 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15597 error recovery, mixing with/without pops and discarding of the
15598 lookahead.
15599 Exercise YYERROR.
15600 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15601
da99a5dc
PE
156022003-02-17 Paul Eggert <eggert@twinsun.com>
15603
15604 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15605 * tests/testsuite.at (AT_COMPILE): Use them.
15606 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 15607 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 15608
93b8c255
PE
156092003-02-12 Paul Eggert <eggert@twinsun.com>
15610
15611 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15612 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 15613 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
15614 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15615 Check for malloc failure, for consistency with yacc.c.
15616 (yytname_size): Remove, for consistency with yacc.c.
15617
15618 The bug still remains in data/lalr1.cc, as I didn't have time
15619 to fix it there.
15620
7548fed2
AD
156212003-02-06 Akim Demaille <akim@epita.fr>
15622
15623 * configure.ac (GXX): Rename as...
15624 (CXX): this, to keep the original Autoconf semantics.
15625 Require 2.57.
15626 * data/lalr1.cc: Fix b4_copyright invocations.
15627 If YYDEBUG is not defined, don't depend upon name_ being defined.
15628 (location.hh): Include string and iostream.
15629 (Position::filename): New member.
15630 (Position::Position ()): New.
15631 (operator<< (Position)): New.
15632 (operator- (Position, int)): New.
15633 (Location::first, Location::last): Rename as...
15634 (Location::begin, Location::end): these, to mock the conventional
15635 iterator names.
15636 (operator<< (Location)): New.
15637 * tests/atlocal.in (CXX): New.
15638 * tests/testsuite.at (AT_COMPILE_CXX): New.
15639 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15640 locations in a more synthetic way.
15641 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15642 lalr1.cc is used.
15643 Adjust the C locations to match those from Emacs: first column is
15644 column 0.
15645 Change all the expected results.
15646 Conform to the GCS: simplify the locations when applicable.
15647 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15648 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15649 these CPP macros with the m4 macros new defined by...
15650 (AT_CHECK_PUSHDEFS): this, i.e.:
15651 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 15652 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
15653 New macros.
15654 (AT_CHECK_POPDEFS): Undefine them.
15655 (AT_CHECK_CALC_LALR1_CC): New.
15656 Use it for the first lalr1.cc test.
15657
43a176ef
AD
156582003-02-04 Akim Demaille <akim@epita.fr>
15659
15660 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15661 Location as is defined.
15662
fc049e9c
AD
156632003-02-04 Akim Demaille <akim@epita.fr>
15664
15665 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15666 name_ being defined.
15667
a737b216
PE
156682003-02-03 Paul Eggert <eggert@twinsun.com>
15669
15670 * src/gram.h (start_symbol): Remove unused decl.
15671
15672 Use more-consistent naming conventions for local vars.
15673
15674 * src/derives.c (derives_compute): Change type of local var from
15675 int to rule_number.
15676 * src/gram.c (grammar_rules_partial_print): Likewise.
15677 * src/print.c (print_core): Likewise.
15678 * src/reduce.c (reduce_grammar_tables): Likewise.
15679
15680 * src/gram.c (grammar_dump): Change name of item_number *
15681 local var from r to rp.
15682 * src/nullable.c (nullable_compute): Likewise.
15683
15684 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15685
15686 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15687 for symbol or symbol_number var.
15688 * src/reader.c (grammar_start_symbol_set): Likewise.
15689 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15690 Likewise.
15691 * src/state.c (transitions_to): Likewise.
15692 * src/state.h: Likewise.
15693 * src/tables.c (symbol_number_to_vector_number): Likewise.
15694
15695 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15696 char * var.
15697
15698 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15699 var.
15700
15701 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15702 var.
15703
15704 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15705 Use str, not s, for char * var. Use ch, not c, for character var.
15706 Use size for size var.
15707
15708 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15709 char * var.
15710 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15711 uniqstr var.
15712 * src/uniqstr.h: Likewise.
15713
15714 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15715 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15716 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15717 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15718 param to have same name as that of enum, so that we don't use
15719 "s" to stand for a non-state.
15720
68e93ad5
AD
157212003-02-02 Akim Demaille <akim@epita.fr>
15722
15723 * src/scan-skel.l: Scan more than one inert character per yylex
15724 invocation.
15725
92898986
PE
157262003-02-01 Paul Eggert <eggert@twinsun.com>
15727
15728 Version 1.875a.
15729
1d9d5d71
PE
15730 * po/LINGUAS: Add ms.
15731
0435d061
AD
157322003-01-30 Akim Demaille <akim@epita.fr>
15733
15734 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15735
6029a57f
PH
157362003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15737
15738 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15739 of $1.
0435d061
AD
15740
15741 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 15742 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 15743 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 15744
6029a57f
PH
15745 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15746 (b4_rhs_location): Ditto.
0435d061 15747 (yyfill): New function to copy from stack tree into array
6029a57f 15748 incrementally.
0435d061
AD
15749 (yyuserAction): Modify to allow incremental move of semantic values
15750 to rhs array when in GLR mode.
15751 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
15752 as needed.
15753 Remove dummy use of yystack, as there is now a guaranteed use.
15754 (yydoAction): Modify to allow incremental move of semantic values
15755 to rhs array when in GLR mode.
15756 (yyresolveAction): Ditto.
15757 (yyglrShiftDefer): Update comment.
0435d061 15758 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
15759 (yyglrReduce): Ditto.
15760 (yydoAction): Ditto
0435d061 15761
6029a57f
PH
15762 * tests/glr-regr1.at: Rename to ...
15763 * tests/glr-regression.at: Add new regression test for the problems
15764 described above (adapted from S. Eken).
15765 Update copyright notice.
15766 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15767 * tests/Makefile.am: Ditto.
15768
6cee6297
PE
157692003-01-28 Paul Eggert <eggert@twinsun.com>
15770
15771 * data/lalr1.cc: Do not use @output_header_name@ unless
15772 b4_defines_flag is set. This fixes two bugs reported by
15773 Tim Van Holder in
161a71f3
PE
15774 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15775 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 15776
b2a836b5
PE
157772003-01-21 Paul Eggert <eggert@twinsun.com>
15778
15779 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15780 we don't need to worry about yyerrlab1 being reported as an
15781 "unused label" by non-GCC C compilers. The downside is that if
15782 locations are used then a couple of statements are duplicated each
15783 time YYERROR is invoked, but the upside is that the warnings
15784 should vanish.
15785 (yyerrlab1): Move code to YERROR.
15786 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15787 This reverts some of the 2002-12-27 change.
15788
4196b931
PE
157892003-01-17 Paul Eggert <eggert@twinsun.com>
15790
15791 * src/output.c (symbol_printers_output): Fix typo that led
15792 to core dump. Problem reported by Antonio Rus in
161a71f3 15793 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 15794
3ae831b4
AD
157952003-01-13 Akim Demaille <akim@epita.fr>,
15796 Quoc Peyrot <chojin@lrde.epita.fr>,
15797 Robert Anisko <anisko_r@lrde.epita.fr>
15798
15799 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15800 when the stacks contain one element, as the loop would otherwise
15801 free the last state, and then use the top state (the one we just
15802 popped). This means that the initial elements will not be freed
15803 explicitly, as is the case in yacc.c; it is not a problem, as
15804 these elements have fake values.
15805
e3aa65c5
PE
158062003-01-11 Paul Eggert <eggert@twinsun.com>
15807
15808 * NEWS: %expect-violations are now just warnings, reverting
15809 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15810 bootstrapping problem reported by Matthias Klose; see
161a71f3 15811 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
15812 * src/conflicts.c (conflicts_print): Likewise.
15813 * tests/conflicts.at (%expect not enough, %expect too much,
15814 %expect with reduce conflicts): Likewise.
15815 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15816 that the warning is enabled if the number of conflicts changes
15817 (not necessarily increases).
15818
15819 * src/getargs.c (version): Update copyright year.
15820
f0057011
AD
158212003-01-09 Akim Demaille <akim@epita.fr>
15822
15823 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15824
1ee6d2a0
PE
158252003-01-08 Paul Eggert <eggert@twinsun.com>
15826
15827 * Makefile.maint (WGETFLAGS):
15828 New macro, containing "-C off" to disable proxy caches.
15829 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15830 (rel-check): Use $(WGET) instead of wget.
15831
d4fd77c4
PE
158322003-01-06 Paul Eggert <eggert@twinsun.com>
15833
15834 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15835 the GLR paper of Scott, Johnstone and Hussain.
15836
464c6927
PE
158372003-01-04 Paul Eggert <eggert@twinsun.com>
15838
d600ee67
PE
15839 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15840 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15841 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15842 (EXTRA_LIBRARIES): New var, for liby.a.
15843 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15844 (EXTRA_SCRIPTS): New var, for yacc.
15845
464c6927
PE
15846 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15847 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15848 Problem reported by Nelson H. F. Beebe.
15849
158502003-01-03 Paul Eggert <eggert@twinsun.com>
15851
15852 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15853 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15854 when compiling Bison 1.875's `bitset bset = obstack_alloc
15855 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15856
15857 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15858 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15859 grow to a huge size with typical invocation.
d600ee67 15860
464c6927
PE
15861 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15862 Use the pattern recommended by Autoconf 2.57, except also protect
15863 against double-definition.
15864 * src/system.h: Likewise.
15865 Portability issues reported by Nelson H. F. Beebe.
d600ee67 15866
464c6927
PE
15867 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15868 All uses changed. Provide a definition in both C and C++.
15869 (yytrue, yyfalse): Define even if defined (__cplusplus).
15870
15871 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15872 Reported by Nelson H. F. Beebe.
d600ee67 15873
464c6927
PE
15874 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15875
0f42c7d5
PE
158762003-01-02 Paul Eggert <eggert@twinsun.com>
15877
15878 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15879 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15880 Bug reported by Nelson H. F. Beebe.
15881
dc546b0f
PE
158822003-01-01 Paul Eggert <eggert@twinsun.com>
15883
15884 * Version 1.875.
15885
2c09b6a7
PE
158862002-12-30 Paul Eggert <eggert@twinsun.com>
15887
15888 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15889 Moved here from...
15890 (<INITIAL>","): Here. This causes stray "," to be treated
15891 more uniformly.
15892
dc546b0f 15893 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
15894 last brace in braced code when not in Yacc mode, for compatibility
15895 with Bison 1.35. This resurrects the 2001-12-15 patch to
15896 src/reader.c.
15897
15898 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15899 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15900
535c0f63
PE
159012002-12-28 Paul Eggert <eggert@twinsun.com>
15902
15903 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15904 that of SYM's type. This fixes Debian bug 168069, reported by
15905 Thomas Olsson.
d600ee67 15906
963fcc17
PE
159072002-12-28 Paul Eggert <eggert@twinsun.com>
15908
15909 Version 1.75f.
15910
15911 Switch back to the Yacc style of conflict reports, undoing some
15912 of the 2002-07-30 change.
15913 * doc/bison.texinfo (Understanding): Use Yacc style for
15914 conflict reports. Also, use new way of locating rules.
15915 * src/conflicts.c (conflict_report):
15916 Renamed from conflict_report_yacc, removing the old
15917 'conflict_report'. Translate the entire conflict report at once,
15918 so that we don't assume that "," has the same interpretation in
15919 all languages.
15920 (conflicts_output): Use Yacc-style conflict report for each state,
15921 instead of our more-complicated style.
15922 (conflicts_print): Use Yacc-style conflict report, except print
15923 the input file name when not emulating Yacc.
15924 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15925 Conflicted Reduction, %expect not enough, %expect too much,
15926 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15927 * tests/existing.at (GNU Cim Grammar): Likewise.
15928 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15929
15930 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15931 fatal): Don't invoke fflush; it's not needed and it might even be
15932 harmful for stdout, as stdout might not be open.
15933 * src/reduce.c (reduce_print): Likewise.
15934
b1efe548
PE
159352002-12-27 Paul Eggert <eggert@twinsun.com>
15936
15937 Fix a bug where error locations were not being recorded correctly.
15938 This problem was originally reported by Paul Hilfinger in
161a71f3 15939 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
15940
15941 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15942 top of the location stack's error locations.
15943 (yyerrlab): Set it. When discarding a token, push its location
15944 onto yylerrsp so that we don't lose track of the error's end.
15945 (yyerrlab1): Now is only the target of YYERROR, so that we can
15946 properly record the location of the action that failed. For GCC
15947 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15948 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15949 (yyerrlab2): New label, which yyerrlab now falls through to.
15950 Compute the error's location by applying YYLLOC_DEFAULT to
15951 the locations of all the symbols that went into the error.
15952 * doc/bison.texinfo (Location Default Action): Mention that
15953 YYLLOC_DEFAULT is also invoked for syntax errors.
15954 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15955 Error locations include the locations of all the tokens that were
15956 discarded, not just the last token.
d600ee67 15957
983c5c2c
PE
159582002-12-26 Paul Eggert <eggert@twinsun.com>
15959
b1efe548
PE
15960 * src/files.c: Include quote.h.
15961 (compute_output_file_names): Warn if we detect conflicting
15962 outputs to the same file. This should catch the misunderstanding
15963 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15964
15965 * src/conflicts.c (conflicts_print): If the user specifies
15966 "%expect N", report an error if there are any reduce/reduce
15967 conflicts. This is what the manual says should happen.
15968 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15969 * tests/conflicts.at (%expect with reduce conflicts): New test.
15970
983c5c2c
PE
15971 Don't use m4_include on relative file names, as it doesn't work as
15972 desired if there happens to be a file with that name under ".".
d600ee67 15973
983c5c2c
PE
15974 * m4sugar/version.m4: Remove; it was included but it wasn't used.
15975 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
15976 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
15977 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
15978 * src/output.c (output_skeleton): Use full path names when
15979 specifying a file to include; don't rely on include path, as
15980 it's unreliable when the working file contains a file with
15981 that name.
d600ee67 15982
983c5c2c
PE
159832002-12-25 Paul Eggert <eggert@twinsun.com>
15984
15985 Remove obsolete references to bison.simple and bison.hairy.
15986 Problem mentioned by Aubin Mahe in
161a71f3 15987 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
15988 * data/glr.c: Comment fix.
15989 * doc/bison.1: Remove references. Also, mention "yacc".
15990
15991 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
15992 with -g option.
15993
15994 * src/parse-gram.y (declaration): Use enum "report_states" rather
15995 than its numeric value 1.
15996
15997 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
15998 opening a new one. This fixes Debian bug 165349, reported by
15999 Bruce Stephens.
16000
23f2d9dc
PE
160012002-12-24 Paul Eggert <eggert@twinsun.com>
16002
16003 Version 1.75e.
16004
16005 * Makefile.maint (cvs-update): Don't assume that the shell
16006 supports $(...), as Solaris sh doesn't.
16007
16008 * src/parse-gram.y (lloc_default): Remove test for empty
16009 nonterminals at the end, since it didn't change the result.
16010
160112002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
16012
16013 If the user does not define YYSTYPE as a macro, Bison now declares it
16014 using typedef instead of defining it as a macro. POSIX requires this.
16015 For consistency, YYLTYPE is also declared instead of defined.
16016
16017 %union directives can now have a tag before the `{', e.g., the
16018 directive `%union foo {...}' now generates the C code
16019 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
16020 The default union tag is `YYSTYPE', for compatibility with Solaris 9
16021 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
16022 instead of `yyltype'.
16023
16024 `yystype' and `yyltype' are now obsolescent macros instead of being
16025 typedefs or tags; they are no longer documented and will be
16026 withdrawn in a future release.
16027
16028 * data/glr.c (b4_location_type): Remove.
16029 (YYSTYPE): Renamed from yystype.
16030 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
16031 (struct YYLTYPE): Renamed from struct yyltype.
16032 (YYLTYPE): Renamed from yyltype.
16033 (yyltype, yystype): New (and obsolescent) macros,
16034 for backward compatibility.
16035 * data/yacc.c: Likewise.
16036
16037 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
16038 does not specify a union tag. This is for compatibility with
16039 Solaris 9 yacc.
16040
16041 * src/parse-gram.y (add_param): 2nd arg is now char * not char
16042 const *, since it is now modified by stripping surrounding { }.
16043 (current_braced_code): Remove.
16044 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
16045 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
16046 trailing " {...}". Now of type <chars>.
16047 (grammar_declaration): Adjust to bundled tokens.
16048 (code_content): Remove; stripping is now done by add_param.
16049 (print_token_value): Print contents of bundled tokens.
16050 (token_name): New function.
16051
16052 * src/reader.h (braced_code, current_braced_code): Remove.
16053 (token_name): New decl.
16054
16055 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
16056 token_type, not braced_code code_kind. All uses changed.
16057 (SC_PRE_CODE): New state, for scanning after a keyword that
16058 has (or usually has) an immediately-following braced code.
16059 (token_type): New local var, to keep track of which token type
16060 to return when scanning braced code.
16061 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 16062 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
16063 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
16064 instead of returning a token type immediately.
16065 (<INITIAL>"{"): Set token type.
16066 (<SC_BRACED_CODE>"}"): Use it.
16067 (handle_action_dollar, handle_action_at): Now returns bool
16068 indicating success. Fail if ! current_rule; this prevents a core dump.
16069 (handle_symbol_code_dollar, handle_symbol_code_at):
16070 Remove; merge body into caller.
16071 (handle_dollar, handle_at): Complain in invalid contexts.
16072
16073 * NEWS, doc/bison.texinfo: Document the above.
16074 * NEWS: Fix years and program names in copyright notice.
16075
879ca4f8
PE
160762002-12-17 Paul Eggert <eggert@twinsun.com>
16077
16078 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
16079 Reporting, Table of Symbols): Omit mentions of %lex-param and
16080 %parse-param from the documentation for now.
16081
1c5fe69d
PE
160822002-12-15 Paul Eggert <eggert@twinsun.com>
16083
16084 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
16085 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
16086 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
16087 disagreed with the Bison documentation. Bug
16088 reported by Andrew Walrond.
d600ee67 16089
1c5fe69d
PE
16090 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
16091 as the caller now does that.
16092 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
16093 (YYEMPTY): Parenthesize right hand side, since others use it.
16094 (yyparse): Don't assume that our generated code is the only code
16095 that sets yychar.
16096
d1de5372
PE
160972002-12-13 Paul Eggert <eggert@twinsun.com>
16098
16099 Version 1.75d.
16100
16101 POSIX requires a "yacc" command.
16102 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
16103 (MOSTLYCLEANFILES): Add yacc.
16104 (yacc): New rule.
1c5fe69d 16105 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
16106 as an alias for bison y.
16107
16108 * po/LINGUAS: Add da.
d600ee67 16109
d1de5372
PE
16110 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
16111 problem with latest <getopt.h>.
16112 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
16113
16114 * doc/fdl.texi: Upgrade to 1.2.
16115 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
16116 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
16117 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
16118 gnulib.
16119 * config/install-sh: Sync with autotools.
16120
16121 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 16122 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
16123 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
16124 locations are requested.
16125 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
16126 locations are requested.
16127
d0f3fe23
PE
161282002-12-12 Paul Eggert <eggert@twinsun.com>
16129
16130 Remove unportable casts and storage allocation tricks.
16131 While we're at it, remove almost all casts, since they
16132 usually aren't needed and are a sign of trouble.
16133
16134 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
16135
16136 * src/derives.c (derives_compute): Do not subtract NTOKENS from
16137 the pointer DSET returned by malloc; this isn't portable.
16138 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
16139 Similarly for DERIVES.
16140 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
16141 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
16142 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
16143
16144 * src/derives.c (derives_compute): Do not bother invoking
16145 int_of_rule_number, since rule numbers are integers.
16146
16147 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
16148 rather than XMALLOC (char, N).
16149
16150 * src/files.c (filename_split): Rewrite to avoid cast.
16151
16152 * src/gram.h (symbol_number_as_item_number,
16153 item_number_as_symbol_number, rule_number_as_item_number,
16154 item_number_as_rule_number):
16155 Now inline functions rather than macros, to avoid casts.
16156 * src/state.h (state_number_as_int): Likewise.
16157 * src/tables.c (state_number_to_vector_number,
16158 symbol_number_to_vector_number): Likewise.
16159
16160 * src/gram.h (int_of_rule_number): Remove; no longer used.
16161
16162 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
16163 since the resulting storage is always stored into.
16164
16165 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
16166 where it's needed.
16167
16168 * src/muscle_tab.c (muscle_m4_output):
16169 Now inline. Return bool, not int.
16170 * src/state.c (state_compare): Likewise.
16171 * src/symtab.c (symbol_check_defined,
16172 symbol_check_alias_consistency, symbol_pack, symbol_translation,
16173 hash_compare_symbol, hash_symbol):
16174 Likewise.
16175 * src/uniqstr.c (uniqstr_print): Likewise.
16176 * src/muscle_tab.c (muscle_m4_output_processor):
16177 New function, to avoid casts.
16178 * src/state.c (state_comparator, stage_hasher): Likewise.
16179 * src/symtab.c (symbol_check_defined_processor,
16180 symbol_check_alias_consistency_processor, symbol_pack_processor,
16181 symbol_translation_processor, hash_symbol_comparator,
16182 hash_symbol_hasher): Likewise.
16183 * src/uniqstr.c (uniqstr_print_processor): Likewise.
16184 * src/muscle_tab.c (muscles_m4_output):
16185 Use new functions instead of casting old functions unportably.
16186 * src/state.c (state_hash_new): Likewise.
16187 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
16188 symbols_token_translations_init):
16189 Likewise.
16190 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
16191
16192 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
16193 var instead of casting to long, to avoid casts.
16194 (prepare_states): Use MALLOC rather than alloca, so that we don't
16195 have to worry about alloca.
16196 * src/state.c (state_hash_lookup): Likewise.
16197
16198 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
16199 local var instead of casting to unsigned char, to avoid casts.
16200
16201 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
16202 STATE_ALLOC): Remove.
16203 (transitions_new, errs_new, reductions_new, state_new): Use malloc
16204 rather than calloc, and use offsetof to avoid allocating slightly
16205 too much storage.
16206 (state_new): Initialize all members.
16207
16208 * src/state.c (state_hash): Use unsigned accumulator, not signed.
16209
16210 * src/symtab.c (symbol_free): Remove; unused.
16211 (symbol_get): Remove cast in lhs of assignment.
16212 (symbols_do): Now static. Accept generic arguments, not
16213 hashing-related ones.
16214
16215 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
16216 (symbol_processor): Remove.
16217 (symbols_do): Remove decl; now static.
16218
16219 * src/system.h (alloca): Remove; decl no longer needed.
16220 (<stddef.h>): Include, for offsetof.
16221 (<inttypes.>, <stdint.h>): Include if available.
16222 (uintptr_t): New type, if system lacks it.
16223 (CALLOC, MALLOC, REALLOC): New macros.
16224 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
16225 new macros.
16226
16227 * src/tables.c (table_size): Now int, to pacify GCC.
16228 (table_grow, table_ninf_remap): Use signed table size.
16229 (save_row): Don't bother initializing locals when not needed.
16230 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
16231 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
16232
16233 * src/vcg.h: Correct misspellings.
16234
16235 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
16236
16237
16238 * src/getargs.c (getargs): Don't assume EOF == -1.
16239
26b4a969
PE
162402002-12-09 Paul Eggert <eggert@twinsun.com>
16241
16242 Change identifier spellings to avoid collisions with names
16243 that are reserved by POSIX.
16244
16245 Don't use names ending in _t, since POSIX reserves them.
16246 For consistency, remove _e and _s endings -- they're weren't
16247 needed to remove ambiguity. All uses changed.
16248 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
16249 turn was just renamed from struniq_t.
16250 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
16251 which in turn was just renamed from struniq_processor_t.
16252 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
16253 in turn was renamed from hash_compare_struniq_t.
16254 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
16255 (state_list): Renamed from state_list_t.
16256 * src/assoc.h (assoc): Renamed from assoc_t.
16257 * src/conflicts.c (enum conflict_resolution): Renamed from
16258 enum conflict_resolution_e.
16259 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
16260 (rule_list): Renamed from rule_list_t.
16261 * src/getargs.h (enum trace): Renamed from enum trace_e.
16262 (enum report): Renamed from enum report_e.
16263 * src/gram.h (item_number): Renamed from item_number_t.
16264 (rule_number): Renamed from rule_number_t.
16265 (struct rule_s): Remove the "rule_s" part; not used.
16266 (rule): Renamed from rule_t.
16267 (rule_filter): Renamed from rule_filter_t.
16268 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
16269 (goto_list): Renamed from goto_list_t.
16270 * src/lalr.h (goto_number): Renamed from goto_number_t.
16271 * src/location.h (location): Renamed from location_t.
16272 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
16273 and moved here from:
16274 * src/muscle_tab.h (muscle_entry_t): here.
16275 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
16276 (rule_list): Renamed from rule_list_t.
16277 * src/print_graph.c (static_graph): Renamed from graph.
16278 * src/reader.h (braced_code): Renamed from braced_code_t.
16279 Remove brace_code_e tag.
16280 * src/relation.h (relation_node): Renamed from relation_node_t.
16281 (relation_nodes): Renamed from relation_nodes_t.
16282 (relation): Renamed from relation_t.
16283 * src/state.h (state_number): Renamed from state_number_t.
16284 (struct state): Renamed from struct state_s.
16285 (state): Renamed from state_t.
16286 (transitions): Renamed from transitions_t. Unused (and
16287 misspelled) transtion_s tag removed.
16288 (errs): Renamed from errs_t. Unused errs_s tag removed.
16289 (reductions): Renamed from reductions_t. Unused tag
16290 reductions_s removed.
16291 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
16292 (struct symbol_list): Renamed from struct symbol_list_s.
16293 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
16294 (struct symbol): Renamed from struct symbol_s.
16295 (symbol): Renamed from symbol_t.
16296 * src/tables.c (vector_number): Renamed from vector_number_t.
16297 (action_number): Renamed from action_t.
16298 * src/tables.h (base_number): Renamed from base_t.
16299 * src/vcg.h (enum color): Renamed from enum color_e.
16300 (enum textmode): Renamed from enum textmode_e.
16301 (enum shape): Renamed from enum shape_e.
16302 (struct colorentry): Renamed from struct colorentry_s.
16303 (struct classname): Renamed from struct classname_s.
16304 (struct infoname): Renamed from struct infoname_s.
16305 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
16306 (enum decision): Renamed from enum decision_e.
16307 (enum orientation): Renamed from enum orientation_e.
16308 (enum alignment): Renamed from enum alignment_e.
16309 (enum arrow_mode): Renamed from enum arrow_mode_e.
16310 (enum crossing_type): Renamed from enum crossing_type_e.
16311 (enum view): Renamed from enum view_e.
16312 (struct node): Renamed from struct node_s.
16313 (node): Renamed from node_t.
16314 (enum linestyle): Renamed from enum linestyle_e.
16315 (enum arrowstyle): Renamed from enum arrowstyle_e.
16316 (struct edge): Renamed from struct edge.
16317 (edge): Renamed from edge_t.
16318 (struct graph): Renamed from struct graph_s.
16319 (graph): Renamed from graph_t.
16320 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
16321 Rename value_t -> value.
16322 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
16323 value_t_as_yystype -> value_as_yystype.
16324
16325 Don't include <errno.h> in the mainstream code, since it
16326 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
16327 * lib/get-errno.c, lib/get-errno.h: New files.
16328 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
16329 get-errno.c.
16330 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
16331 * src/output.c (output_skeleton): Likewise.
16332 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
16333 instead of errno.
16334 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
16335 Likewise.
16336 (handle_action_dollar, handle_action_at): Likewise.
16337 * src/system.h: Do not include <errno.h>.
16338 (TAB_EXT): Renamed from EXT_TAB.
16339 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
16340
16341 Avoid str[a-z]*, since <string.h> reserves that name space.
16342 Change all instances of "struniq" in names to "uniqstr", and
16343 likewise for "STRUNIQ" and "UNIQSTR".
16344 * src/uniqstr.c: Renamed from src/struniq.c.
16345 * src/uniqstr.h: Renamed from src/struniq.h.
16346 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
16347 * src/files.c (strsuffix): Remove; unused.
16348 (concat2): Renamed from stringappend. Now static.
16349 * src/files.h (strsuffix, stringappend): Remove; unused.
16350 * src/parse-gram.y (<chars>): Renamed from <string>.
16351 (<uniqstr>): Renamed from <struniq>.
16352 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
16353 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
16354 (struct graph_s.expand): Renamed from struct graph_s.stretch.
16355 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
16356 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
16357 (N_EXPAND): Renamed from N_STRETCH.
16358
16359 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
16360 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
16361 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
16362 Remove; unused.
16363 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
16364 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
16365 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
16366 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
16367 (BASE_MAXIMUM): Renamed from BASE_MAX.
16368 (BASE_MINIMUM): Renamed from BASE_MIN.
16369 (ACTION_MAX): Remove; unused.
16370 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
16371 Unnecessary casts removed from above defines.
16372
16373
16374 Fix misspelling in names.
16375 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
16376 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
16377 G_NODE_ALIGNEMENT.
16378
16379
16380 * lib/timevar.c (timevar_report): Renamed from time_report,
16381 for consistency with other names.
16382 * lib/timevar.h (timevar_report): New decl.
16383 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
16384
16385
16386 Sort include-file uses.
16387
16388 Reorder all include files under src to be in the order "system.h".
16389 then the ../lib include files in angle brackets (alphabetized),
16390 then the . include files in double-quotes (alphabetized). Fix
16391 dependency breakages encountered in this process, as follows:
16392 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
16393 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
16394 * src/state.h: Include "symtab.h".
16395
996b1c7e
PE
163962002-12-08 Paul Eggert <eggert@twinsun.com>
16397
16398 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
16399 since this causes problems when __file__ contains character
16400 sequences like "@" that are treated specially by src/scan-skel.l.
16401 Instead, just use the file's basename. This fixes the bug
16402 reported by Martin Mokrejs in
161a71f3 16403 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 16404
e19c4e5d
PE
164052002-12-06 Paul Eggert <eggert@twinsun.com>
16406
16407 Add support for rules that do not have trailing semicolons, as
16408 POSIX requires. Improve the quality of locations in Bison
16409 diagnostics.
26b4a969 16410
e19c4e5d
PE
16411 * src/location.c: Include <quotearg.h>.
16412 (empty_location): Now const.
16413 (location_print): New function. Follow the recommendation of the
16414 GNU Coding Standards for locations that span file boundaries.
16415 * src/location.h: Do not include <quotearg.h>; no longer needed.
16416 (boundary): New type.
16417 (location_t): Use it. This allows locations to span file boundaries.
16418 All member uses changed: file -> start.file or end.file (as needed),
16419 first_line -> start.line, first_column -> start.column,
16420 last_line -> end.line, last_column -> end.column.
16421 (equal_boundaries): New function.
16422 (LOCATION_RESET, LOCATION_STEP): Remove.
16423 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16424 (empty_location): Now const.
16425 (location_print): New decl.
16426 * src/parse-gram.y (lloc_default): New function, which handles
16427 empty locations more accurately.
16428 (YYLLOC_DEFAULT): Use it.
16429 (%token COLON): Remove.
16430 (%token ID_COLON): New token.
26b4a969 16431 (rules): Use it.
e19c4e5d
PE
16432 (declarations, rules): Remove trailing semicolon.
16433 (declaration, rules_or_grammar_declaration):
16434 Allow empty (";") declaration.
16435 (symbol_def): Remove empty actions; no longer needed.
16436 (rules_or_grammar_declaration): Remove trailing semicolon.
16437 (semi_colon.opt): Remove.
16438 * src/reader.h: Include location.h.
16439 (scanner_cursor): New decl.
16440 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16441 rolling our own.
16442 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16443 of *loc.
16444 (STEP): Remove. No longer needed, now that adjust_location does
16445 the work. All uses removed.
16446 (scanner_cursor): New var.
16447 (adjust_location): Renamed from extend_location. It now sets
16448 *loc and adjusts the scanner cursor. All uses changed.
16449 Don't bother testing for CR.
16450 (handle_syncline): Remove location arg; now updates scanner cursor.
16451 All callers changed.
16452 (unexpected_end_of_file): Now accepts start boundary of token or
16453 comment, not location. All callers changed. Update scanner cursor,
16454 not the location.
16455 (SC_AFTER_IDENTIFIER): New state.
16456 (context_state): Renamed from c_context. All uses changed.
16457 (id_loc, code_start, token_start): New local vars.
16458 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16459 processing of Yacc white space and equivalents here.
16460 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16461 instead of returning ID immediately, since we need to search for
16462 a subsequent colon.
16463 (<INITIAL>"'", "\""): Save token_start.
16464 (<INITIAL>"%{", "{", "%%"): Save code_start.
16465 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16466 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16467 BEGIN context_state at end, not INITIAL.
16468 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16469 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16470 Return correct token start.
16471 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16472 the start of a character, string or multiline comment is found.
16473 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16474 Reduction): Adjust reported locations to match the more-precise
16475 results now expected.
16476 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16477 * tests/reduce.at (Useless Rules, Reduced Automaton,
16478 Underivable Rules): Likewise.
16479 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16480 or "|"' now that so many other tokens are allowed by the new grammar.
16481
16482 * src/complain.h (current_file): Remove duplicate decl;
16483 current_file is now owned by files.h.
16484 * src/complain.c, src/scan-gram.l: Include files.h.
16485
164862002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 16487
e19c4e5d
PE
16488 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16489 promotes to int; it might be unsigned int.
16490 * data/yacc.c (yy_reduce_print): Likewise.
16491
16492 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16493 be #defined in the prologue, not in the Bison declarations.
16494 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 16495
b64755e3
PE
164962002-12-02 Paul Eggert <eggert@twinsun.com>
16497
16498 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16499 * lib/strtoul.c: New file, from gnulib.
16500 This fixes a porting bug reported by Peter Klein in
161a71f3 16501 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 16502
6e746484
PE
165032002-11-30 Paul Eggert <eggert@twinsun.com>
16504
b64755e3
PE
16505 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16506 and put only a forward declaration in the prologue. This is for
16507 consistency with the other scanner helper functions.
16508
6ba55592
PE
16509 Type clashes now generate warnings, not errors, since it
16510 appears that POSIX may allow some grammars with type clashes.
16511 * src/reader.c (grammar_current_rule_check): Warn about
16512 type clashes instead of complaining.
16513 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16514
6e746484
PE
16515 Add Yacc library, since POSIX requires it.
16516 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16517 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16518 * lib/main.c, lib/yyerror.c: New files.
16519
16520 gram_error can be static; it need not be extern.
16521 * src/reader.h (gram_error): Remove decl.
16522 * src/parse-gram.y (gram_error): Now static. Add static decl.
16523 (print_token_value): Omit parameter names from forward decl,
16524 for consistency.
16525
88510f9c
PE
165262002-11-29 Paul Eggert <eggert@twinsun.com>
16527
6e746484
PE
16528 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16529 be declared before being used. E.g., one should typically
16530 declare them in the prologue. Use GNU coding style in examples.
16531 Put "const" consistently after the type it modifies. Mention
16532 that C99 supports "inline". Mention that yyerror traditionally
16533 returns "int".
16534
88510f9c
PE
16535 %parse-param and %lex-param now take just one argument, the
16536 declaration; the argument name is deduced from the declaration.
16537
16538 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16539 Reporting, Table of Symbols): Document this.
16540 * src/parse-gram.y (add_param): New function.
16541 (COMMA): Remove.
16542 (declaration): Implement new rule for %parse-param and %lex-param.
16543 * src/scan-gram.l: "," now elicits a warning, rather than being
16544 a token; this is more compatible with byacc.
16545 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16546
bb92250c
PE
165472002-11-27 Paul Eggert <eggert@twinsun.com>
16548
16549 Rename identifiers to avoid real and potential collisions.
16550
16551 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16552 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 16553 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
16554 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16555 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16556 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16557 All uses changed.
16558 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16559 The name "yycontrol" violates the name space rules, and this stuff
16560 wasn't being used anyway.
16561 (input): Remove action; this stuff wasn't being used.
16562 (gram_error): Rename local variable yylloc -> loc.
16563 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16564 (YY_DECL): Don't use "yy" at start of local variables.
16565 All uses changed, e.g., yylloc -> loc.
16566 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16567 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16568 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16569 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16570
16571 * src/parse-gram.y (gram_error): loc is now const *.
16572 * src/reader.h (gram_error): Likewise.
16573
3af4feb2
PE
165742002-11-24 Paul Eggert <eggert@twinsun.com>
16575
16576 Version 1.75c.
16577
16578 * tests/actions.at (Actions after errors): Use an output format
16579 more similar to that of the Printers and Destructors test.
16580 Test the position of the ';' token too.
16581 (Printers and Destructors): Likewise.
16582 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16583 unnecessarily alarming people when the test fails.
16584
16585 * data/yacc.c (yyerrlab1): Move this label down, so that the
16586 parser does not discard the lookahead token if the user code
16587 invokes YYERROR. This change is required for POSIX conformance.
16588
16589 * lib/error.c: Sync with gnulib.
16590
165912002-11-22 Paul Eggert <eggert@twinsun.com>
16592
16593 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16594 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16595 * lib/xmalloc.c: Likewise.
26b4a969 16596
58004308
PE
165972002-11-20 Paul Eggert <eggert@twinsun.com>
16598
16599 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16600
166012002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 16602
58004308
PE
16603 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16604 should use `if (! x) abort ();' rather than `assert (x);', and
16605 anyway it's one less thing to worry about configuring.
16606
16607 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16608 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16609 and replace all instances of assert with abort.
16610 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16611 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16612
16613 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16614 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16615 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16616 hash_find_entry, hash_rehash, hash_insert): Likewise.
16617 * src/conflicts.c (resolve_sr_conflict): Likewise.
16618 * src/lalr.c (set_goto_map, map_goto): Likewise.
16619 * src/nullable.c (nullable_compute): Likewise.
16620 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16621 * src/reader.c (packgram, reader): Likewise.
16622 * src/state.c (state_new, state_free, state_transitions_set,
16623 state_reduction_find): Likewise.
16624 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16625 symbol_pack): Likewise.
16626 * src/tables.c (conflict_row, pack_vector): Likewise.
16627 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16628 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16629 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16630 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16631
16632 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16633 (ARGMATCH_CONSTRAINT): New macro.
16634 (ARGMATCH_ASSERT): Use it.
16635
16636 * src/system.h (verify): New macro.
16637 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16638 rather than assert.
16639 * src/tables.c (tables_generate): Likewise.
16640
16641 * src/struniq.c (struniq_assert): Now returns void, and aborts
16642 if the assertion is false.
16643 (struniq_assert_p): Remove.
16644 * src/struniq.h: Likewise.
16645
76ae8198
PE
166462002-11-18 Paul Eggert <eggert@twinsun.com>
16647
16648 * data/glr.c (yygetLRActions): Replace `yyindex' with
16649 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16650 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 16651 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 16652
d3c4e709
AD
166532002-11-18 Akim Demaille <akim@epita.fr>
16654
16655 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16656 space.
16657 From Tim Van Holder.
16658
8d8a7238
PE
166592002-11-17 Paul Eggert <eggert@twinsun.com>
16660
16661 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16662 to "SyntaxError" for consistency with my 2002-11-15 change.
16663
16664 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16665 not define to {}, since this breaks the common use of `YYDPRINTF
16666 ((...));' if a single statement is desired (e.g. before `else').
16667 Work around GCC warnings by surrounding corresponding calls with
16668 {} if needed.
16669 (yyhasResolvedValue): Remove unused function.
16670 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16671 loop body.
16672 (yyreportSyntaxError): Renamed from yyreportParseError.
16673 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16674 All uses changed.
16675 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16676 extern when possible. Remove unused initializations.
16677
b0937b22
AD
166782002-11-16 Akim Demaille <akim@epita.fr>
16679
16680 Augment the similarity between GLR and LALR traces.
16681
16682 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16683 (YY_REDUCE_PRINT): New.
16684 (yyparse): Use them.
16685 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16686 YYDPRINT here.
16687 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16688 state reached after the reduction/recovery, since...
16689 (yyparse, yyprocessOneStack): Report the state we are entering in.
16690
c5e3e510
AD
166912002-11-16 Akim Demaille <akim@epita.fr>
16692
16693 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16694 Add support for --trace=skeleton.
16695 * src/scan-skel.l: %option debug.
16696 Scan strings of non-@ or \n instead of character by character.
16697 (scan_skel): Handle trace_skeleton.
16698 (QPUTS): New.
16699 (@output_parser_name@, @output_header_name@): ``Restore'' their
16700 support (used to be M4 macros).
16701 * data/yacc.c: Quote larger chunks, a la glr.c.
16702 * data/lalr1.cc: Likewise.
16703 The header guards are no longer available, so use some other
16704 string than `YYLSP_NEEDED'.
16705
4c6cc1db
AD
167062002-11-16 Akim Demaille <akim@epita.fr>
16707
16708 Make the ``Printers and Destructors'' test more verbose, taking
16709 `yacc.c''s behavior as (possibly wrong) reference.
16710
16711 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16712 instead of fprint on stdout.
16713 Set and report the last_line of the symbols.
16714 Consistently display values and locations.
16715
6d9e8019
PE
167162002-11-16 Paul Eggert <eggert@twinsun.com>
16717
16718 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16719
6e649e65
PE
167202002-11-15 Paul Eggert <eggert@twinsun.com>
16721
b25d88f6
PE
16722 * tests/actions.at (Actions after errors): New test case.
16723
6e649e65
PE
16724 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16725 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16726 tests/action.at, tests/calc.at, tests/conflicts.at,
16727 tests/cxx-type.at, tests/regression.at:
16728 "parse error" -> "syntax error" for POSIX compatibility.
16729 "parsing stack overflow..." -> "parser stack overflow" so
16730 that code matches Bison documentation.
16731
0f39aab9
AD
167322002-11-15 Akim Demaille <akim@epita.fr>
16733
16734 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16735 take two BRACED_CODE, not two string_content.
16736 Free the scanner's obstack when we are done.
16737 (code_content): New.
16738 * tests/calc.at: Adjust.
16739 * doc/bison.texinfo: Adjust.
16740 Also, make sure to include the `,' for these declarations.
16741
761c1926
AD
167422002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16743
16744 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16745 definition; avoids potential autoreconf problems.
16746
b0f98b10
AD
167472002-11-15 Akim Demaille <akim@epita.fr>
16748
16749 Always check the value returned by yyparse.
16750
16751 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16752 returned by yyparse.
16753 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16754 Adjust calls.
16755 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16756 returned by yyparse.
16757
970785f1
PH
167582002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16759
16760 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16761 on input.at test.
16762
8fcc7db1
PE
167632002-11-14 Paul Eggert <eggert@twinsun.com>
16764
7ec1b48e
PE
16765 * src/output.c (output_skeleton): Call xfopen instead of
16766 duplicating xfopen's body.
16767
cfff7583 16768 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 16769 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 16770
8fcc7db1
PE
16771 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16772 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16773 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16774 file twice in the grammar, as an extra check.
16775
16776 * tests/input.at (Torturing the Scanner): Surround the
16777 backslash-newline tests with "#if 0", to make it less likely that
16778 we'll run into compiler bugs. Bring back solitary \ inside
16779 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 16780 test backslash-newline in C character constant.
8fcc7db1 16781
4e8d992c
AD
167822002-11-14 Akim Demaille <akim@epita.fr>
16783
16784 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16785 status of the compiler.
f32b346d 16786 Calling `exit 1' is no longer needed.
4e8d992c
AD
16787 Reported by Nelson H. F. Beebe.
16788
9501dc6e
AD
167892002-11-14 Akim Demaille <akim@epita.fr>
16790
16791 * tests/atlocal.in (CPPFLAGS): We have config.h.
16792 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16793 New.
16794 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16795 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16796 * tests/regression.at, tests/torture.at: Use them for all the
16797 grammars that are to be compiled.
16798 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16799 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16800 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16801
18b519c0
AD
168022002-11-14 Akim Demaille <akim@epita.fr>
16803
16804 * doc/bison.texinfo: Various formatting changes (alignments in
16805 samples, additional @group/@end group, GCS in samples.
16806 Use @deffn instead of simple @table to define the directives,
16807 macros, variables etc.
16808
9a86cdb9
PE
168092002-11-13 Paul Eggert <eggert@twinsun.com>
16810
daa33def 16811 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 16812 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 16813
daa33def 16814 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 16815 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
16816 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16817 * tests/headers.at (export YYLTYPE): Likewise.
16818
16819 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 16820 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 16821
9a86cdb9
PE
16822 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16823 comments, since they're not portable. Use GNU coding style.
16824
9c1e26bd
AD
168252002-11-13 Akim Demaille <akim@epita.fr>
16826
16827 * data/yacc.c: Leave bigger chunks of quoted text.
16828 (YYDSYMPRINTF): New.
16829 Use it to report symbol activities.
16830 * data/glr.c (YYDSYMPRINTF): New.
16831 Use it.
16832
87f721cc
PE
168332002-11-12 Paul Eggert <eggert@twinsun.com>
16834
16835 Version 1.75b.
16836
16837 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16838 (yyglrReduce): Return yyok, not 0.
16839 This should avoid the enumerated-type warnings reported
464c6927 16840 by Nelson H. F. Beebe in
161a71f3 16841 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
16842
16843 * lib/bbitset.h (BITSET_INLINE): Remove.
16844 * lib/bitset.h [! BITSET_INLINE]: Remove.
16845 (bitset_set, bitset_reset, bitset_test): Rename local vars
16846 to avoid shadowing warnings by GCC.
16847
16848 * data/glr.c (inline): Remove #define. It's the user's
16849 responsibility to #define it away, just like 'const'.
464c6927 16850 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 16851 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 16852
87f721cc
PE
16853 * Makefile.maint (po-check): Scan .l and .y files instead of the
16854 .c and the .h files that they generate. This fixes the bug
16855 reported by Tim Van Holder in:
161a71f3 16856 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
16857 Look for N_ as well as for _. Try to avoid matching #define for
16858 N_ and _.
16859 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16860 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16861 * src/scan-gram.l: Revamp regular expressions so that " and '
16862 do not confuse xgettext.
16863
16864 * src/struniq.h (struniq_new): Do not declare the return type
16865 to be 'const'; this violates the C standard.
16866 * src/struniq.c (struniq_new): Likewise.
16867
be14ade5
AD
168682002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16869
16870 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16871 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16872 linker.
16873
05291fbc
AD
168742002-11-12 Akim Demaille <akim@epita.fr>
16875
16876 * Makefile.maint: Sync with Autoconf:
16877 (local_updates): New.
16878
1f5fd52e
AD
168792002-11-12 Akim Demaille <akim@epita.fr>
16880
16881 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16882
283f1e64
AD
168832002-11-12 Akim Demaille <akim@epita.fr>
16884
16885 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16886 locations.
16887
886b69d1
AD
168882002-11-12 Akim Demaille <akim@epita.fr>
16889
16890 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16891 not yyvalue.
16892
3df37415
AD
168932002-11-12 Akim Demaille <akim@epita.fr>
16894
16895 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16896 Use it to test the GLR parser.
16897
7bd6c77e
AD
168982002-11-12 Akim Demaille <akim@epita.fr>
16899
16900 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16901 defines it.
16902 * data/glr.c (yystos): New.
16903 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16904 (YYDSYMPRINT): New.
16905 (yyval): Don't define it, it is handled via M4.
16906 (yyrecoverParseError): Free verbosely the discarded symbols.
16907 * data/yacc.c (yysymprint): Remove, rather...
16908 (b4_yysymprint_generate): invoke.
16909 * data/c.m4 (b4_yysymprint_generate): New.
16910 Accept pointers as arguments, as opposed to the version from
16911 yacc.c.
16912 (b4_yydestruct_generate): Likewise.
16913 * tests/cations.at (Printers and Destructors): Use Bison directives
16914 instead of CPP macros.
16915 Don't rely on internal details.
16916
b0400cc6
AD
169172002-11-12 Akim Demaille <akim@epita.fr>
16918
16919 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16920 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16921 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16922 it against YYEMPTY and so forth), work on yytoken (i.e., set
16923 it to YYEMPTY etc.).
16924 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16925 (b4_symbol_actions): Remove.
16926 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16927 for 0, end-of-input.
16928
72f889cc
AD
169292002-11-12 Akim Demaille <akim@epita.fr>
16930
16931 * doc/bison.texinfo (Destructor Decl): New.
16932
b1ae9233
AD
169332002-11-12 Akim Demaille <akim@epita.fr>
16934
16935 * src/tables.c (tables_generate): Use free for pointers that
16936 cannot be NULL, not XFREE.
16937 (pack_vector): Use assert, not fatal, for bound violations.
16938 * src/state.c (state_new): Likewise.
16939 * src/reader.c (reader): Likewise.
16940 * src/lalr.c (set_goto_map): Likewise.
72f889cc 16941 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
16942 the file name.
16943
7ec2d4cd
AD
169442002-11-12 Akim Demaille <akim@epita.fr>
16945
16946 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16947 Restore.
16948 * src/scan-gram.l (last_string): Is global to the file, not to
16949 yylex.
16950 * src/parse-gram.y (input): Don't append the epilogue here,
16951 (epilogue.opt): do it here, and free the scanner's obstack.
16952 * src/reader.c (epilogue_set): Rename as...
16953 (epilogue_augment): this.
16954 * data/c.m4 (b4_epilogue): Defaults to empty.
16955
573a6cd3
AD
169562002-11-12 Akim Demaille <akim@epita.fr>
16957
16958 * src/getargs.c (long_options): Remove duplicates.
16959 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16960 Remove.
16961 * doc/bison.rnh: Remove.
16962 * doc/bison.texinfo (VMS Invocation): Remove.
16963
95612cfa
AD
169642002-11-12 Akim Demaille <akim@epita.fr>
16965
16966 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16967 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16968
16969 Use struniq for symbols.
16970
16971 * src/symtab.h (symbol_t): The tag member is a struniq.
16972 (symbol_type_set): Adjust.
16973 * src/symtab.c (symbol_new): Takes a struniq.
16974 (symbol_free): Don't free the tag member.
16975 (hash_compare_symbol_t, hash_symbol_t): Rename as...
16976 (hash_compare_symbol, hash_symbol): these.
16977 Use the fact that tags as struniqs.
16978 (symbol_get): Use struniq_new.
16979 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
16980 Returns a strniq.
16981 * src/reader.h (merger_list, grammar_currentmerge_set): The name
16982 and type members are struniqs.
16983 * src/reader.c (get_merge_function)
16984 (grammar_current_rule_merge_set): Adjust.
16985 (TYPE, current_type): Are struniq.
16986
16987 Use struniq for file names.
16988
16989 * src/files.h, src/files.c (infile): Split into...
16990 (grammar_file, current_file): these.
16991 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
16992 * src/reduce.c (reduce_print): Likewise.
16993 * src/getargs.c (getargs): Likewise.
16994 * src/complain.h, src/complain.c: Likewise.
16995 * src/main.c (main): Call struniqs_new early enough to use it for
16996 file names.
16997 Don't free the input file name.
16998
3e6656f9
AD
169992002-11-12 Akim Demaille <akim@epita.fr>
17000
17001 * src/symtab.c (symbol_free): Remove dead deactivated code:
17002 type_name are properly removed.
17003 Don't use XFREE to free items that cannot be NULL.
17004 * src/struniq.h, src/struniq.c: New.
17005 * src/main.c (main): Initialize/free struniqs.
17006 * src/parse-gram.y (%union): Add astruniq member.
17007 (yyprint): Adjust.
17008 * src/scan-gram.l (<{tag}>): Return a struniq.
17009 Free the obstack bit that used to store it.
17010 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
17011
7672019c
PE
170122002-11-11 Paul Eggert <eggert@twinsun.com>
17013
17014 Revamp to fix many (but not all) of the C- and M4-related quoting
17015 problems. Among other things, this fixes the Bison bug reported
17016 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 17017 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
17018
17019 Use new @ escapes consistently. Represent brackets with @{ and @}
17020 rather than @<:@ and @:>@, since this works a bit better with dumb
17021 editors like vi. Represent @ with @@, since @ is now consistently
17022 an escape. Use @oline@ and @ofile@ rather than __oline__ and
17023 __ofile__, to avoid unexpected expansions. Similarly, use @output
17024 rather than #output.
17025
17026 * data/c.m4 (b4_copyright): Omit file name from comment, since
17027 the file name could contain "*/".
17028 (b4_synclines_flag): Don't quote the 2nd argument; it should already
17029 be quoted. All uses changed.
17030
17031 * data/glr.c: Use new @ escapes consistently.
17032 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
17033 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
17034 Remove, since they couldn't handle arbitrary characters in file
17035 names.
17036 * data/lalr1.cc: Likewise.
17037 * data/yacc.c: Likewise.
17038
17039 * src/files.c (output_infix): Remove; all uses removed.
17040 * src/files.h: Likewise.
17041
17042 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
17043 mishandled funny characters in file names, and anyway it isn't
17044 needed any more.
17045 * data/yacc.c: Likewise.
17046 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
17047
17048 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
17049 * data/yacc.c: Likewise.
17050
17051 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
17052 strings now.
17053 (muscle_init): Quote filename as a C string.
17054 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
17055 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
17056 * src/output.c (escaped_file_name_output): New function.
17057 (prepare_symbols): Quote tokens for M4.
17058 (prepare): Don't insert output_infix, output_prefix,
17059 output_parser_name, output_header_name; this is now down by scan-skel.
17060 Insert skeleton as a C string.
17061
17062 * src/output.c (user_actions_output, symbol_destructors_output,
17063 symbol_printers_output): Quote filenames for C and M4.
17064 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17065
17066 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
17067 escapes other than \\ and \'; this simplifies the code.
17068 (<SC_STRING>): Likewise, for \\ and \".
17069 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
17070 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
17071 Use new escapes @{ and @} for [ and ].
17072
17073 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
17074 them with auto vars.
17075 Switch to new escape scheme, where @ is the escape character uniformly.
17076 Abort if a stray escape character is found. Avoid unbounded input
17077 buffer when parsing non-escaped text.
17078
17079 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
17080 __oline__, #output, $@, and @{ do not have unintended meanings.
17081
acea4f3b
PE
170822002-11-09 Paul Eggert <eggert@twinsun.com>
17083
17084 Fix the test failure due to GCC warnings described in
161a71f3 17085 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
17086 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
17087 evaluate to 0 if it's impossible for NINF to be in the respective
17088 table.
17089 (yygetLRActions, yyrecoverParseError): Use them.
17090
17091 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
17092 counted in the token inserted at end of file. Now takes
17093 location_t *, not location_t, so that the location can be
17094 adjusted. All uses changed.
17095
17096 * tests/regression.at (Invalid inputs): Adjust wording in
17097 diagnostic to match the new behavior.
17098
17099 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
17100 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
17101 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
17102 abort ();'. This reduces the runtime of the "Many lookaheads"
17103 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
17104 GCC 3.2.
17105
20ef1ad5
PE
171062002-11-07 Paul Eggert <eggert@twinsun.com>
17107
17108 * src/parse-gram.y (CHARACTER): Remove unused token.
17109 All uses removed.
17110
17111 * src/scan-gram.l: Remove stack option. We no longer use the
17112 stack, since the stack was never deeper than 1; instead, use the
17113 new auto var c_context to record the stacked value.
17114
17115 Remove nounput option. At an unexpected end of file, we now unput
17116 the minimal input necessary to end cleanly; this simplifies the
17117 code.
17118
17119 Avoid unbounded token sizes where this is easy.
17120
17121 (unexpected_end_of_file): New function.
17122 Use it to systematize the error message on unexpected EOF.
17123 (last-string): Now auto, not static.
17124 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
17125 (scanner_last_string_free): Remove; not used.
17126 (percent_percent_count): Move decl to just before use.
17127 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
17128 not the (never otherwised-used) CHARACTER.
17129
93724f13
AD
171302002-11-07 Akim Demaille <akim@epita.fr>
17131
17132 Let yyerror always receive the msg as last argument, so that
17133 yyerror can be variadic.
17134
17135 * data/yacc.c (b4_yyerror_args): New.
17136 Use it when calling yyerror.
17137 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
17138 Use it when calling yyerror.
17139 * doc/bison.texinfo (Error Reporting): Adjust.
17140 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
17141 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
17142
6e40b4eb
AD
171432002-11-06 Akim Demaille <akim@epita.fr>
17144
17145 #line should have quoted strings.
17146 Ideally, this should be done by m4_quotearg.
17147
17148 * src/scan-skel.l: Include quotearg.h.
17149 Quote __ofile__.
17150 * src/output.c (symbol_printers_output)
17151 (symbol_destructors_output): Quote the file name.
17152
2dfbfc12
AD
171532002-11-06 Akim Demaille <akim@epita.fr>
17154
17155 * tests/regression.at (Invalid inputs): Adjust to the recent
17156 messages.
17157
437c2d80
AD
171582002-11-06 Akim Demaille <akim@epita.fr>
17159
17160 Restore --no-lines.
17161 Reported by Jim Kent.
17162
17163 * data/c.m4 (b4_syncline): New.
17164 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
17165 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
17166 * src/output.c (user_actions_output): Likewise.
17167 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 17168 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 17169
900c5db5
AD
171702002-11-06 Akim Demaille <akim@epita.fr>
17171
17172 * src/main.c (main): Free `infile'.
17173 * src/scan-gram.l (handle_syncline): New.
17174 Recognize `#line'.
17175 * src/output.c (user_actions_output, symbol_destructors_output)
17176 (symbol_printers_output): Use the location's file name, not
17177 infile.
17178 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17179
e183b123 171802002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 17181
e183b123 17182 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 17183 either has GLR conflict entries.
e183b123 17184
193eb6b7
PE
171852002-11-05 Paul Eggert <eggert@twinsun.com>
17186
e183b123
PE
17187 * src/scan-gram.l: Use more accurate diagnostics, e.g.
17188 "integer out of range" rather than "invalid value".
17189 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
17190 accordingly.
17191
193eb6b7
PE
17192 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
17193 Also, remove one static variable in the scanner.
17194
17195 * src/scan-gram.l (braces_level): Now auto, not static.
17196 Initialize to zero if the compiler is being picky.
17197 (INITIAL): Clear braces_level instead of incrementing it.
17198 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
17199 as POSIX 1003.1-2001 requires.
17200 * src/system.h (IF_LINT): New macro, taken from coreutils.
17201 * configure.ac: Define "lint" if --enable-gcc-warnings.
17202
29c01725
AD
172032002-11-05 Akim Demaille <akim@epita.fr>
17204
17205 * src/scan-gram.l: When it starts with `%', complain about the
17206 whole directive, not just that `invalid character: %'.
17207
8aeac3ca
AD
172082002-11-04 Akim Demaille <akim@epita.fr>
17209
17210 * Makefile.maint: Update from Autoconf.
17211 (update, cvs-update, po-update, do-po-update): New.
17212
793a58bb
AD
172132002-11-04 Akim Demaille <akim@epita.fr>
17214
17215 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
17216 and yyerror.
17217 Have yyerror `use' its arguments.
17218 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
17219 returns true when location & yacc & pure & parse-param.
17220 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
17221
c4d720cd
AD
172222002-11-04 Akim Demaille <akim@epita.fr>
17223
17224 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
17225 clashes.
17226 * src/scan-gram.l: Use [\'] instead of ['] to pacify
17227 font-lock-mode.
17228 Use complain_at.
17229 Use quote, not quote_n since LOCATION_PRINT no longer uses the
17230 slot 0.
17231
613a0dc5
PE
172322002-11-03 Paul Eggert <eggert@twinsun.com>
17233
17234 * src/reader.c (get_merge_function, grammar_current_rule_check):
17235 Use consistent diagnostics for reporting type name clashes.
17236 Quote the types with <>, for consistency with Yacc.
17237 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
17238
2a8d363a
AD
172392002-11-03 Akim Demaille <akim@epita.fr>
17240
17241 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
17242 New.
17243 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
17244 (b4_parse_param): Remove.
17245 Use b4_identification.
17246 Propagate b4_pure_args where needed to pass them to yyerror.
17247 * data/glr.m4 (b4_parse_param): Remove.
17248 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
17249 (b4_lpure_formals): New.
17250 Use b4_identification.
17251 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
17252 b4_user_formals and b4_user_args.
17253 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
17254 (yyreportAmbiguity): When using a pure parser, also need
17255 the location, and the parse-params.
17256 Adjust callers.
17257 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
17258 When using a pure parser, also need the parse-params.
17259 Adjust callers.
17260 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
17261 (%pure-parser + %parse-param) LALR and GLR parsers.
17262 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
17263 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
17264 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
17265 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
17266 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
17267 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
17268 * doc/bison.texinfo: Untabify the whole file.
17269 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
17270 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
17271 (Error Reporting): Adjust to these new directives.
17272 Document %error-verbose, deprecate YYERROR_VERBOSE.
17273
9e32add8
AD
172742002-11-03 Akim Demaille <akim@epita.fr>
17275
17276 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
17277 AT_CHECK_CALC_GLR invocations to use % directives, instead of
17278 command line options.
17279 * tests/cxx-type.at: Formatting changes.
17280
b02d90a5
PE
172812002-11-03 Paul Eggert <eggert@twinsun.com>
17282
17283 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
17284 to count columns correctly, and to check for invalid inputs.
9e32add8 17285
b02d90a5
PE
17286 Use mbsnwidth to count columns correctly. Account for tabs, too.
17287 Include mbswidth.h.
17288 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
17289 (extend_location): New function.
17290 (YY_LINES): Remove.
17291
17292 Handle CRLF in C code rather than in Lex code.
17293 (YY_INPUT): New macro.
17294 (no_cr_read): New function.
17295
17296 Scan UCNs, even though we don't fully handle them yet.
17297 (convert_ucn_to_byte): New function.
17298
17299 Handle backslash-newline correctly in C code.
17300 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
17301 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
17302 all uses changed.
17303 (tag, splice): New EREs. Do not allow NUL or newline in tags.
17304 Use {splice} wherever C allows backslash-newline.
17305 YY_STEP after space, newline, vertical-tab.
17306 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 17307
b02d90a5
PE
17308 (letter, id): Don't assume ASCII; e.g., spell out a-z.
17309
17310 ({int}, handle_action_dollar, handle_action_at): Check for integer
17311 overflow.
9e32add8 17312
b02d90a5
PE
17313 (YY_STEP): Omit trailing semicolon, so that it's more like C.
17314
17315 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
17316 as well as \000. Check for UCHAR_MAX, not 255.
17317 Allow \x with an arbitrary positive number of digits, as in C.
17318 Check for overflow here.
17319 Allow \? and UCNs, for compatibility with C.
17320
17321 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
17322 with quote slot used by complain_at.
17323
17324 * tests/input.at: Add tests for backslash-newline, m4 quotes
17325 in symbols, long literals, and funny escapes in strings.
17326
17327 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
17328 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
17329 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
17330 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
17331 * m4/mbswidth.m4: New file, from GNU coreutils.
17332
17333 * doc/bison.texinfo (Grammar Outline): Document // comments.
17334 (Symbols): Document that trigraphs have no special meaning in Bison,
17335 nor is backslash-newline allowed.
17336 (Actions): Document that trigraphs have no special meaning.
17337
17338 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
17339 no longer used.
17340
173412002-11-02 Paul Eggert <eggert@twinsun.com>
17342
17343 * src/reader.c: Don't include quote.h; not needed.
17344 (get_merge_function): Reword warning to be consistent with
17345 type clash diagnostic in grammar_current_rule_check.
17346
17347 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
17348 bug in trigraph handling.
17349
17350 * src/output.c (prepare_symbols): When printing token names,
17351 escape "[" as "@<:@" and likewise for "]".
17352
17353 * src/system.h (errno): Remove declaration, as we are now
17354 assuming C89 or better, and C89 guarantees errno.
17355
762b212b
PE
173562002-10-30 Paul Eggert <eggert@twinsun.com>
17357
17358 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
17359 Check for close failures.
17360 * src/files.h (xfclose): Return void, not int, since it always
17361 returned zero.
17362 * src/files.c (xfclose): Likewise. Report I/O error if ferror
17363 indicates one.
17364 * src/output.c (output_skeleton): Use xfclose rather than fclose
17365 and ferror. xfclose now checks ferror.
17366
17367 * data/glr.c (YYLEFTMOST_STATE): Remove.
17368 (yyreportTree): Use a stack-based leftmost state. This avoids
17369 our continuing battles with bogus warnings about initializers.
17370
56100c60
AD
173712002-10-30 Akim Demaille <akim@epita.fr>
17372
17373 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
17374 #if.
17375
51b4a04c
PH
173762002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17377
17378 * tests/glr-regr1.at: New test for reported regressions.
17379 * tests/testsuite.at: Add glr-regr1.at test.
17380 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 17381
bf1ebda2
PE
173822002-10-24 Paul Eggert <eggert@twinsun.com>
17383
5c16c6b1
PE
17384 Version 1.75a.
17385
bf1ebda2
PE
17386 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
17387 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
17388 we use malloc. Don't assume 'A' through 'Z' are contiguous.
17389 Don't assume strdup exists; POSIX says its an XSI extension.
17390 Check for buffer overflow on input.
17391
b526ee61
AD
173922002-10-24 Akim Demaille <akim@epita.fr>
17393
17394 * src/output.c (output_skeleton): Don't disable M4sugar comments
17395 too soon: it results in comments being expanded.
17396 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
17397 first output.
17398
f1886bb2
AD
173992002-10-24 Akim Demaille <akim@epita.fr>
17400
17401 * data/yacc.c (m4_int_type): New.
17402 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
17403 char' as only yacc.c wants K&R portability.
17404 * data/glr.c (yysigned_char): Remove.
17405 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
17406 Reported by Quoc Peyrot.
17407
c5576256
PE
174082002-10-23 Paul Eggert <eggert@twinsun.com>
17409
17410 * src/main.c (main): With --trace=time, report times even if a
17411 non-fatal error occurs. Formerly, the times were reported in some
17412 such cases but not in others.
17413 * src/reader.c (reader): Just return if a complaint has been issued,
17414 instead of exiting, so that 'main' can report times.
17415
27b0ffea
AD
174162002-10-22 Akim Demaille <akim@epita.fr>
17417
17418 * src/system.h: Include sys/types.
17419 Reported by Bert Deknuydt.
17420
223a7883
PE
174212002-10-23 Paul Eggert <eggert@twinsun.com>
17422
17423 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17424 Suggested by Art Haas.
17425
174262002-10-22 Paul Eggert <eggert@twinsun.com>
17427
17428 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17429 decl; not needed any more.
17430 * src/main.c (main): Use return to exit, undoing yesterday's change.
17431 The last OS that we could find where this wouldn't work is
17432 SunOS 3.5, and that's too old to worry about now.
17433
17434 * data/glr.c (struct yyltype): Define members even when not
17435 doing locations. This is more consistent with yacc.c, and it
17436 works around the following bug reports:
161a71f3
PE
17437 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17438 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 17439
223a7883
PE
17440 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17441 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17442 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17443
8b76775a
AD
174442002-10-22 Akim Demaille <akim@epita.fr>
17445
17446 * data/README: New.
17447
6db10d14
PE
174482002-10-21 Paul Eggert <eggert@twinsun.com>
17449
17450 Be consistent about 'bool'; the old code used an enum in one
17451 module and an int in another, and this violates the C standard.
17452 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17453 * configure.ac (AC_HEADER_STDBOOL): Add.
17454 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17455 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17456 * src/symtab.c (hash_compare_symbol_t): Likewise.
17457 * src/system.h (bool, false, true): Use a definition consistent
17458 with ../lib/hash.c. All uses changed.
17459
17460 * src/complain.c (warning_issued): Renamed from warn_message_count,
17461 so that we needn't worry about integer overflow (!).
17462 Now of type bool. All uses changed.
17463 (complaint_issued): Renamed from complain_message_count; likewise.
17464
17465 * src/main.c (main): Use exit to exit with failure.
27b0ffea 17466
6db10d14
PE
17467 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17468 rather than 1 and 0.
17469 * src/main.c (main): Likewise.
17470 * src/getargs.c (getargs): Likewise.
17471 * src/reader.c (reader): Likewise.
17472
17473 * src/getarg.c (getargs): Remove duplicate code for
17474 "Try `bison --help'".
17475
17476 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17477 What was that "2" for?
17478
17479 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17480 * src/getargs.c (usage): Likewise.
17481
17482 * src/getargs.c (getargs): When there are too few operands, report
17483 the last one. When there are too many, report the first extra
17484 one. This is how diffutils does it.
17485
92a060fd
PE
174862002-10-20 Paul Eggert <eggert@twinsun.com>
17487
17488 Remove K&R vestiges.
17489 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17490 * src/complain.c (VA_START): Remove. Assume prototypes.
17491 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17492 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17493 fatal): Assume prototypes.
17494 * src/complain.h: Assume prototypes.
17495 * src/system.h (PARAMS): Remove.
17496 Include <limits.h> unconditionally, since it's guaranteeed even
17497 for a freestanding C89 compiler.
17498 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17499 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 17500
e7cb57c0
AD
175012002-10-20 Akim Demaille <akim@epita.fr>
17502
17503 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17504 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17505 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17506 (yyresolveStates, yyresolveAction, yyresolveStack)
17507 (yyprocessOneStack): Use them.
17508 (yy_reduce_print): New.
17509 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17510
0245f82d
AD
175112002-10-20 Akim Demaille <akim@epita.fr>
17512
17513 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17514 arguments and output `void'.
17515 (b4_c_function): Rename as...
17516 (b4_c_function_def): this.
17517 (b4_c_function_decl, b4_c_ansi_function_def)
17518 (b4_c_ansi_function_decl): New.
17519 Change the interpretation of the arguments: before `int, foo', now
17520 `int foo, foo'.
17521 * data/yacc.c (yyparse): Prototype and define thanks to these.
17522 Adjust b4_c_function_def uses.
17523 * data/glr.c (yyparse): Likewise, but ANSI only.
17524
39912f52
AD
175252002-10-20 Akim Demaille <akim@epita.fr>
17526
17527 * src/output.c (prepare): Move the definition of `tokens_number',
17528 `nterms_number', `undef_token_number', `user_token_number_max'
17529 to...
17530 (prepare_tokens): Here.
17531 (prepare_tokens): Rename as...
17532 (prepare_symbols): this.
17533 (prepare): Move the definition of `rules_number' to...
17534 (prepare_rules): here.
17535 (prepare): Move the definition of `last', `final_state_number',
17536 `states_number' to...
17537 (prepare_states): here.
17538 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17539
20c1e2ad
AD
175402002-10-20 Akim Demaille <akim@epita.fr>
17541
17542 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17543
21964f43
AD
175442002-10-20 Akim Demaille <akim@epita.fr>
17545
17546 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17547 * data/c.m4: here.
17548
66d30cd4
AD
175492002-10-20 Akim Demaille <akim@epita.fr>
17550
17551 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17552 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17553 `pair'.
17554 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17555 `name' to...
17556 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17557 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17558 These.
17559
95f2c9fe
PE
175602002-10-19 Paul Eggert <eggert@twinsun.com>
17561
17562 Do not create a temporary file, as that involves security and
17563 cleanup headaches. Instead, use a pair of pipes.
17564 Derived from a suggestion by Florian Krohm.
17565 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17566 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17567 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17568 (BISON_PREREQ_SUBPIPE): Add.
17569 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17570 Add subpipe.h, subpipe.c.
17571 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17572 * po/POTFILES.in: Add lib/subpipe.c.
17573 * src/output.c: Include "subpipe.h".
17574 (m4_invoke): Remove decl.
17575 (scan_skel): New decl.
17576 (output_skeleton): Use pipe rather than temporary file for m4 input.
17577 Check that m4sugar.m4 is readable, to avoid deadlock.
17578 Check for pipe I/O error.
17579 * src/scan-skel.l (readpipe): Remove decl.
17580 (scan_skel): New function, to be used in place of m4_invoke.
17581 Read from stream rather than file.
66d30cd4 17582
95f2c9fe
PE
17583 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17584 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17585 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17586 this generates a more-accurate value anyway.
17587
17588 * lib/timevar.c (timervar_accumulate): Rename locals to
17589 avoid confusion with similarly-named more-global.
17590 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17591
17592 * src/output.c (prepare): Use xstrdup to convert char const *
17593 to char *, to avoid GCC warning.
17594
c19988b7
AD
175952002-10-19 Akim Demaille <akim@epita.fr>
17596
17597 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17598 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17599 Use them to have `calc.y' ready for %pure-parser.
17600 * data/yacc.c (YYLEX): Pass a yylex return type to
17601 b4_c_function_call.
17602
ae7453f2
AD
176032002-10-19 Akim Demaille <akim@epita.fr>
17604
17605 Prototype support of %lex-param and %parse-param.
17606
17607 * src/parse-gram.y: Add the definition of the %lex-param and
17608 %parse-param tokens, plus their rules.
17609 Drop the `_' version of %glr-parser.
17610 Add the "," token.
17611 * src/scan-gram.l (INITIAL): Scan them.
17612 * src/muscle_tab.c: Comment changes.
17613 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17614 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17615 (muscle_entry_s): The `value' member is no longer const.
17616 Adjust all dependencies.
17617 * src/muscle_tab.c (muscle_init): Adjust: use
17618 MUSCLE_INSERT_STRING.
17619 Initialize the obstack earlier.
17620 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17621 (muscle_pair_list_grow): New.
17622 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17623 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17624 * tests/calc.at: Use %locations, not --locations.
17625 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17626
0e575721
AD
176272002-10-19 Akim Demaille <akim@epita.fr>
17628
17629 * src/getargs.c (usage): Take status as argument and exit
17630 accordingly.
17631 Report the traditional `Try ... --help' message when status != 0.
17632 (usage, version): Don't take a FILE * as arg, it is pointless.
17633 (getargs): When there is an incorrect number of arguments, make it
17634 an error, and report it GNUlically thanks to `usage ()'.
17635
724ce7f5
PE
176362002-10-18 Paul Eggert <eggert@twinsun.com>
17637
3a781eb2
PE
17638 * data/glr.c (yyreportParseError): Don't assume that sprintf
17639 yields the length of the printed string, as this is not true
17640 on SunOS 4.1.4. Reported by Peter Klein.
17641
724ce7f5
PE
17642 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17643 * tests/conflicts.at (%nonassoc and eof): Likewise.
17644 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17645
473d0a75
AD
176462002-10-17 Akim Demaille <akim@epita.fr>
17647
17648 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17649 * src/getargs.c (trace_types, trace_args): Adjust.
17650 * src/reader.c (grammar_current_rule_prec_set)
17651 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17652 Standardize error messages.
17653 And s/@prec/%prec/!
17654 (reader): Use trace_flag to enable scanner/parser debugging,
17655 instead of an adhoc scheme.
17656 * src/scan-gram.l: Remove trailing debugging code.
17657
e76d2469
PE
176582002-10-16 Paul Eggert <eggert@twinsun.com>
17659
93e2236a
PE
17660 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17661 MUSCLE_TAB_H.
17662
e76d2469
PE
17663 * NEWS: Officially drop support for building Bison with K&R C,
17664 since it didn't work anyway and it's not worth worrying about.
17665 * Makefile.maint (wget_files): Remove ansi2knr.c.
17666 (ansi2knr.c-url_prefix): Remove.
17667 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17668 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17669 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17670
5bd1c419
PE
176712002-10-15 Paul Eggert <eggert@twinsun.com>
17672
17673 Stop using the "enum_" trick for K&R-style function definitions;
17674 it confused me, and I was the author! Instead, assume that people
17675 who want to use K&R C compilers (when using these modules in GCC,
17676 perhaps?) will run ansi2knr.
17677
17678 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17679 All uses of "enum_" changed to "enum ".
17680 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17681 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 17682
5bd1c419
PE
17683 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17684 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17685 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17686 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17687 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17688 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17689 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17690 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17691 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17692 Use function prototypes; this removes the need for declaring
17693 static functions simply to provide their prototypes.
17694 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17695 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17696 bitset_count_, bitset_create, bitset_dump, bitset_first,
17697 bitset_free, bitset_init, bitset_last, bitset_next,
17698 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17699 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17700 bitset_print, bitset_release_memory, bitset_toggle_,
17701 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17702 debug_bitset): Likewise.
17703 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17704 * lib/bitset_stats.c (bitset_log_histogram_print,
17705 bitset_percent_histogram_print, bitset_stats_and,
17706 bitset_stats_and_cmp, bitset_stats_and_or,
17707 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17708 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17709 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17710 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17711 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17712 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17713 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17714 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17715 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17716 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17717 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17718 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17719 bitset_stats_zero): Likewise.
17720 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17721 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17722 bitsetv_dump, debug_bitsetv): Likewise.
17723 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17724 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17725 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17726 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17727 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17728 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17729 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17730 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17731 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17732 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17733 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17734 Likewise.
17735 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17736 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17737 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17738 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17739 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17740 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17741 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17742 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17743 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17744 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17745 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 17746
ae26e1f0
AD
177472002-10-14 Akim Demaille <akim@epita.fr>
17748
17749 Version 1.75.
17750
d43baf71
AD
177512002-10-14 Akim Demaille <akim@epita.fr>
17752
17753 * tests/Makefile.am (maintainer-check-posix): New.
17754
7ebc83e3
AD
177552002-10-14 Akim Demaille <akim@epita.fr>
17756
17757 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17758 member.
17759
05846dae
AD
177602002-10-14 Akim Demaille <akim@epita.fr>
17761
17762 * src/tables.c (table_ninf_remap): base -> tab.
17763 Reported by Matt Rosing.
17764
1318e37d
PE
177652002-10-14 Paul Eggert <eggert@twinsun.com>
17766
447fbb17
PE
17767 * tests/action.at, tests/calc.at, tests/conflicts.at,
17768 tests/cxx-type.at, tests/headers.at, tests/input.at,
17769 tests/regression.at, tests/synclines.at, tests/torture.at:
17770 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17771 so that the tests still work even if POSIXLY_CORRECT is set.
17772 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 17773
1318e37d
PE
17774 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17775 for portability to K&R hosts. Fix typo: signed char is guaranteed
17776 only to 127, not to 128.
17777 * data/glr.c (yysigned_char): New type.
17778 * data/yacc.c (yysigned_char): Likewise.
17779 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17780
cc0f0794
PE
177812002-10-13 Paul Eggert <eggert@twinsun.com>
17782
5038f418
PE
17783 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17784 true due to limited range of data type" warning from GCC.
17785
cc0f0794
PE
17786 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17787 by wrapping enum yytokentype's definition inside #ifndef
17788 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17789
6fed0802
AD
177902002-10-13 Akim Demaille <akim@epita.fr>
17791
17792 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17793 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17794
32f0598d
AD
177952002-10-13 Akim Demaille <akim@epita.fr>
17796
17797 * Makefile.maint: Update from Autoconf 2.54.
17798 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17799
7ea9a33f
AD
178002002-10-13 Akim Demaille <akim@epita.fr>
17801
17802 * src/print.c (print_state): Separate the list of solved conflicts
17803 from the other items.
17804 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17805
ea99527d
AD
178062002-10-13 Akim Demaille <akim@epita.fr>
17807
17808 Let nondeterministic skeletons be usable with deterministic
17809 tables.
17810
17811 With the patch, GAWK compiled by GCC without -O2 passes its test
17812 suite using a GLR parser driven by LALR tables. It fails with -O2
17813 because `struct stat' gives two different answers on my machine:
17814 88 (definition of an auto var) and later 96 (memset on this var).
17815 Hence the stack is badly corrumpted. The headers inclusion is to
17816 blame: if I move the awk.h inclusion before GLR's system header
17817 inclusion, the two struct stat have the same size.
17818
17819 * src/tables.c (pack_table): Always create conflict_table.
17820 (token_actions): Always create conflict_list.
17821 * data/glr.c (YYFLAG): Remove, unused.
17822
f377f69f
AD
178232002-10-13 Akim Demaille <akim@epita.fr>
17824
17825 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17826 (O0FLAGS): New.
17827 (VALGRIND, GXX): New.
17828 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17829 * tests/bison.in: Run $PREBISON a pre-command.
17830 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17831 (maintainer-check-g++): New.
17832 * Makefile.am (maintainer-check): New.
17833
2a1fe6ed
AD
178342002-10-13 Akim Demaille <akim@epita.fr>
17835
17836 * data/glr.c: Formatting changes.
17837 Tweak some trace messages to match yacc.c's.
17838
f50adbbd
AD
178392002-10-13 Akim Demaille <akim@epita.fr>
17840
17841 GLR parsers sometimes raise parse errors instead of performing the
17842 default reduction.
17843 Reported by Charles-Henry de Boysson.
17844
17845 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 17846 check the length of the traces when %glr.
f50adbbd
AD
17847 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17848 GLR's traces.
17849 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17850 Test GLR parsers.
17851 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17852 (yyltype): Remove the yy prefix from the member names.
17853 (yytable): Complete its comment.
17854 (yygetLRActions): Map error action number from YYTABLE from
17855 YYTABLE_NINF to 0.
17856 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17857 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17858 not satisfying as we could compare an YYACTION computed from
17859 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17860 only value for error actions.
17861 (yyreportParseError): In verbose parse error messages, don't issue
17862 `error' in the list of expected tokens.
17863 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17864 next action to perform to match glr.c's decoding.
17865 (yytable): Complete its comment.
17866
bcbad5b9
PE
178672002-10-13 Paul Eggert <eggert@twinsun.com>
17868
17869 Fix problem reported by Henrik Grubbstroem in
161a71f3 17870 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
17871 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17872 because the Bison parser reads the second action before reducing
17873 the first one.
17874 * src/scan-gram.l (rule_length): New static var.
17875 Use it to keep track of the rule length in the scanner, since
17876 we can't expect the parser to be in lock-step sync with the scanner.
17877 (handle_action_dollar, handle_action_at): Use this var.
17878 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 17879
14904b89
PE
178802002-10-12 Paul Eggert <eggert@twinsun.com>
17881
1fe611e5
PE
17882 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17883 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17884 Include <sys/time.h> when checking for clock_t and struct tms.
17885 Use same include order as source.
17886 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 17887 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 17888
1fe611e5
PE
17889 * lib/timevar.c: Update copyright date and clarify comments.
17890 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 17891
1fe611e5
PE
17892 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17893 GCC version as of today, then merge Bison's changes.
17894 Change "GCC" to "Bison" in copyright notice. timevar.def's
17895 author is Akim, so change that too.
17896
98194095
PE
17897 * src/reader.c (grammar_current_rule_check):
17898 Don't worry about the default action if $$ is untyped.
17899 Prevents bogus warnings reported by Jim Gifford in
161a71f3 17900 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 17901
14904b89
PE
17902 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17903 * data/glr.c, data/lalr1.cc, data/yacc.c:
17904 Output token definitions before the first part of user declarations.
17905 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 17906 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 17907
ff6dca18
PE
179082002-10-11 Paul Eggert <eggert@twinsun.com>
17909
17910 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17911 (yyparse): here. This undoes some of the 2002-07-25 change.
17912 Compatibility problem reported by Ralf S. Engelschall with
17913 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17914
eb714592
AD
179152002-10-11 Akim Demaille <akim@epita.fr>
17916
17917 * tests/regression.at Characters Escapes): New.
17918 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17919 characters.
17920 Reported by Jan Nieuwenhuizen.
17921
b7195100
AD
179222002-10-11 Akim Demaille <akim@epita.fr>
17923
17924 * po/id.po: New.
17925
f28a0f2d
PE
179262002-10-10 Paul Eggert <eggert@twinsun.com>
17927
17928 Portability fixes for bitsets; this also avoids several GCC
17929 warnings.
17930
17931 * lib/abitset.c: Include <stddef.h>, for offsetof.
17932 * lib/lbitset.c: Likewise.
17933
17934 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17935 properly for vectors of objects. Do not assume that adding a
17936 header size to a multiple of a word size yields a value that is
17937 properly aligned for the whole union.
17938 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17939
17940 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17941 unique names for structures.
17942 * lib/ebitset.c (ebitset_bytes): Likewise.
17943 * lib/lbitset.c (lbitset_bytes): Likewise.
17944
17945 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17946 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17947 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17948 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17949 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17950 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17951 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17952 to improve the type-checking that GCC can do.
17953 * lib/bitset.c (bitset_op4_cmp): Likewise.
17954 * lib/bitset_stats.c (bitset_stats_count,
17955 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17956 bitset_stats_copy, bitset_stats_disjoint_p,
17957 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17958 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17959 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17960 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17961 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17962 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17963 bitset_stats_or_and_cmp): Likewise.
17964 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17965 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17966 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17967 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17968
17969 * lib/abitset.h: Include bitset.h, not bbitset.h.
17970 * lib/ebitset.h: Likewise.
17971 * lib/lbitset.h: Likewise.
17972
17973 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
17974 All instances of parameters of type enum bitset_opts are now of
17975 type enum_bitset_opts, to conform to the C Standard, and similarly
17976 for enum_bitset_type.
17977 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17978 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17979
17980 Do not use "struct bitset_struct" to mean different things in
17981 different modules. Not only is this confusing, it violates
17982 the C Standard, which requires that structure types in different
17983 modules must be compatible if one is to be passed to the other.
17984 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
17985 All instances of "struct bitset_struct *" replaced with "bitset".
17986 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
17987 (union bitset_union, struct abitset_struct, struct ebitset_struct,
17988 struct lbitset_struct, struct bitset_stats_struct): New types.
17989 All uses of struct bitset_struct changed to union bitset_union,
17990 etc.
ba0fe3c7 17991 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
17992 struct bitset_struct): Remove.
17993 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
17994 struct bitset_struct): Remove.
17995 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
17996 bitset_struct): Remove.
17997 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
17998 Likewise.
17999
18000 Do not call a function of type T using a call that assumes the
18001 function is of a different type U. Standard C requires that a
18002 function must be called with a type that is compatible with its
18003 definition.
18004 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
18005 New decls.
18006 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
18007 New functions.
18008 * lib/ebitset.c (PFV): Remove.
18009 * lib/lbitset.c (PFV): Likewise.
18010 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
18011 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
18012 decls.
18013 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
18014 (ebitset_vtable): Use them.
18015 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
18016 lbitset_xor): New functions.
18017 (lbitset_vtable): Use them.
18018
18019 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
18020 Declare.
18021
18022 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
18023 GCC warning.
18024 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
18025 Use offsetof, for simplicity.
18026
6fbe4984
PE
180272002-10-06 Paul Eggert <eggert@twinsun.com>
18028
18029 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
18030 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 18031 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
18032 which was inadvertently undone by the 2002-09-30 patch.
18033 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
18034 the same width as int.
18035
420f93c8
PE
180362002-10-04 Paul Eggert <eggert@twinsun.com>
18037
18038 Version 1.50.
18039
18040 * configure.ac (AC_INIT), NEWS: Increment version number.
18041
18042 * doc/bison.texinfo: Minor spelling, grammar, and white space
18043 fixes.
18044 (Symbols): Mention that any negative value returned from yylex
18045 signifies end-of-input. Warn about negative chars. Mention
18046 the portable Standard C character set.
18047
18048 The GNU coding standard says CFLAGS and YFLAGS are reserved
18049 for the installer to set.
18050 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
18051 * src/Makefile.am (AM_CFLAGS): Likewise.
18052 (AM_YFLAGS): Renamed from YFLAGS.
18053
18054 Fix some MAX and MIN problems.
18055 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
18056 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
18057 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
18058 * src/reader.c (reader): Use it.
18059
18060 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
18061 POSIX 1003.1-2001 has removed fgrep.
18062
180632002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
18064
18065 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
18066 interpreted as signed.
18067 * lib/ebitset.c (ebitset_list): Fix bug.
18068
ff68026d
PE
180692002-10-01 Paul Eggert <eggert@twinsun.com>
18070
18071 More fixes for 64-bit hosts and large bitsets.
18072
18073 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
18074 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
18075 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
18076 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
18077 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
18078 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
18079 bitset_count_): Likewise.
18080 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
18081 bitset_first, bitset_last): Likewise.
18082 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
18083 bitset_stats_list_reverse, bitset_stats_size,
18084 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
18085 Likewise.
18086 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18087 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
18088 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
18089 bitsetv_reflexive_transitive_closure): Likewise.
18090 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
18091 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
18092 Likewise.
18093 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
18094 Likewise.
420f93c8 18095
ff68026d
PE
18096 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
18097 Use size_t, not unsigned int, to count bytes.
18098 * lib/abitset.h (abitset_bytes): Likewise.
18099 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
18100 Likewise.
18101 * lib/bitset.h (bitset_bytes): Likewise.
18102 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
18103 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
18104 * lib/bitsetv.c (bitsetv_alloc): Likewise.
18105 * lib/ebitset.c (ebitset_bytes): Likewise.
18106 * lib/ebitset.h (ebitset_bytes): Likewise.
18107 * lib/lbitset.c (lbitset_bytes): Likewise.
18108 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 18109
ff68026d
PE
18110 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
18111 abitset_subset_p, abitset_disjoint_p, abitset_and,
18112 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
18113 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
18114 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
18115 abitset_or_and, abitset_or_and_cmp):
18116 Use bitset_windex instead of unsigned int.
18117 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18118 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
18119 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
18120 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
18121 Likewise.
18122 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 18123
ff68026d
PE
18124 * lib/bitset.c (bitset_print):
18125 Use proper printf formats for widths of integer types.
18126 * lib/bitset_stats.c (bitset_percent_histogram_print,
18127 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
18128 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18129 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18130 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 18131
ff68026d
PE
18132 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
18133 BITSET_SIZE_MAX): New macros.
18134 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
18135 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
18136 to BITSET_WINDEX_MAX.
18137
18138 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
18139 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
18140 since we now return the bitset_bindex type (not int).
18141
18142 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
18143 when computing sizes.
18144 * lib/ebitset.c (ebitset_elts_grow): Likewise.
18145
18146 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
18147 and avoid cast to unsigned.
18148
6aa452a6
AD
181492002-09-30 Akim Demaille <akim@epita.fr>
18150
18151 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
18152 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
18153 Updates from Michael Hayes.
18154
927f7817
AD
181552002-09-30 Art Haas <ahaas@neosoft.com>
18156
18157 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
18158 invocations.
18159 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
18160 defined.
18161
9738f41e
AD
181622002-09-27 Akim Demaille <akim@epita.fr>
18163
18164 Version 1.49c.
18165
a5c75d7f
AD
181662002-09-27 Akim Demaille <akim@epita.fr>
18167
18168 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
18169 (Because of AC_LIBSOURCE).
18170
8280e179
AD
181712002-09-27 Akim Demaille <akim@epita.fr>
18172
18173 Playing with Autoscan.
18174
18175 * configure.ac: Remove the old LIBOBJ tweaks.
18176 (AC_REPLACE_FUNCS): Add strrchr and strtol.
18177 * lib/strrchr.c: New.
18178 * lib/strtol.c: New, from the Coreutils 4.5.1.
18179
ae64af35
AD
181802002-09-27 Akim Demaille <akim@epita.fr>
18181
18182 Playing with Autoscan.
18183
18184 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
18185 * lib/Makefile.am (libbison_a_SOURCES): No longer include
18186 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
18187 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
18188 Coreutils 4.5.1.
18189
d1a1114f
AD
181902002-09-24 Akim Demaille <akim@epita.fr>
18191
18192 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
18193 (Frequently Asked Questions, Parser Stack Overflow): New.
18194
b906441c
AD
181952002-09-13 Akim Demaille <akim@epita.fr>
18196
18197 Playing with autoscan.
18198
18199 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
18200 * src/files.c (skeleton_find): Remove, unused.
18201 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
18202 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
18203
bd701811
AD
182042002-09-13 Akim Demaille <akim@epita.fr>
18205
18206 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
18207 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
18208
e0a13e7b
AD
182092002-09-13 Akim Demaille <akim@epita.fr>
18210
18211 * configure.ac: Require 2.54.
18212 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
18213 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
18214 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
18215 Remove, provided by Autoconf macros.
18216
c97011bf
AD
182172002-09-12 Akim Demaille <akim@epita.fr>
18218
18219 * m4/prereq.m4: Update, from Coreutils 4.5.1.
18220
d862b1be
AD
182212002-09-12 Akim Demaille <akim@epita.fr>
18222
18223 * m4/prereq.m4: Update, from Fileutils 4.1.5.
18224 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
18225 Reported by Martin Mokrejs.
18226
3d38c03a
AD
182272002-09-10 Akim Demaille <akim@epita.fr>
18228
18229 * src/parse-gram.y: Associate a human readable string to each
18230 token type.
18231 * tests/regression.at (Invalid inputs): Adjust.
18232
b6347355
AD
182332002-09-10 Gary V. Vaughan <gary@gnu.org>
18234
18235 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
18236 with an Autoconf-2.5x style configure.ac.
18237
09ba4ab2
PE
182382002-09-06 Paul Eggert <eggert@twinsun.com>
18239
18240 * doc/bison.texinfo (Conditions): Make explicit that the GPL
18241 exception applies only to yacc.c. This is a modification of a
18242 patch originally suggested by Akim Demaille.
18243
21846f69
AD
182442002-09-06 Akim Demaille <akim@epita.fr>
18245
09ba4ab2
PE
18246 * data/c.m4 (b4_copyright): Move the GPL exception comment from
18247 here to...
18248 * data/yacc.c: here.
18249
21846f69
AD
18250 * data/lalr1.cc (struct yyltype): Don't define it, since we use
18251 LocationType.
18252 (b4_ltype): Default to yy::Location from location.hh.
18253
c0ad8bf3
AD
182542002-09-04 Jim Meyering <jim@meyering.net>
18255
18256 * data/yacc.c: Guard the declaration of yytoknum also with
18257 `#ifdef YYPRINT', so it is declared only when used.
18258
3a93251e
AD
182592002-09-04 Akim Demaille <akim@epita.fr>
18260
18261 * configure.in: Rename as...
18262 * configure.ac: this.
18263 Bump to 1.49c.
18264
427c0dda
AD
182652002-09-04 Akim Demaille <akim@epita.fr>
18266
18267 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
18268 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
18269 translate maintainer only messages.
18270
6a254321
PE
182712002-08-12 Paul Eggert <eggert@twinsun.com>
18272
645e30d1
PE
18273 Version 1.49b.
18274
6a254321
PE
18275 * Makefile.am (SUBDIRS): Remove intl.
18276 (DISTCLEANFILES): Remove.
18277 * NEWS: Mention that GNU M4 is now required. Clarify what is
18278 meant by "larger grammars". Mention the pt_BR translation.
18279 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
18280 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
18281 Bump version from 0.11.2 to 0.11.5.
18282 (BISON_PREREQ_STAGE): Remove.
18283 (AM_GNU_GETTEXT): Use external gettext.
18284 (AC_OUTPUT): Remove intl/Makefile.
18285
18286 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
18287
18288 * data/glr.c: Include string.h, for strlen.
18289 (yyreportParseError): Use size_t for yysize.
18290 (yy_yypstack): No longer nested inside yypstates, as nested
18291 functions are not portable. Do not assume size_t is the
18292 same width as int.
18293 (yypstates): Do not assume that ptrdiff_t is the same width
18294 as int, and similarly for yyposn and YYINDEX.
18295
18296 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
18297
18298 * lib/Makefile.am (INCLUDES): Do not include from the intl
18299 directory, which has been removed.
18300 * src/Makefile.am (INCLUDES): Likewise.
18301
18302 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
18303 (bitsets_sources, additional_bitsets_sources, timevars_sources):
18304 New vars.
18305
18306 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
18307 * tests/Makefile.am (EXTRA_DIST): Likewise.
18308
18309 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
18310 Do not assume that bitset_windex is the same width as unsigned.
18311
18312 * lib/abitset.c (abitset_unused_clear): Do not assume that
18313 bitset_word is the same width as int.
18314 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
18315 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
18316 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
18317 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
18318 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
18319
18320 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
18321 portability to one's complement hosts!).
18322 * lib/ebitset.c (ebitset_op1): Likewise.
18323 * lib/lbitset.c (lbitset_op1): Likewise.
18324
18325 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
18326 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
18327 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
18328 Sync with fileutils.
18329 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
18330 lib/gettext.h: Sync with diffutils.
18331
18332 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
18333 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
18334
18335 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
18336 PROTOTYPES to check for prototypes, and "defined __STDC__" to
18337 check for void *.
18338
18339 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
18340 size_t; the old version tried to do this but casted improperly.
18341 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
18342 (bitset_test): Now returns int, not unsigned long.
18343
18344 * lib/bitset_stats.c: Include "gettext.h".
18345 (_): New macro.
18346 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
18347 name locals "index", as it generates unnecessary warnings on some
18348 hosts that have an "index" function.
18349
18350 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
18351 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
18352 they need translation.
18353 * src/LR0.c (state_list_append, new_itemsets, get_state,
18354 append_states, generate_states): Likewise.
18355 * src/assoc.c (assoc_to_string): Likewise.
18356 * src/closure.c (print_closure, set_firsts, closure): Likewise.
18357 * src/gram.c (grammar_dump): Likewise.
18358 * src/injections.c (injections_compute): Likewise.
18359 * src/lalr.c (lookaheads_print): Likewise.
18360 * src/relation.c (relation_transpose): Likewise.
18361 * src/scan-gram.l: Likewise.
18362 * src/tables.c (table_grow, pack_vector): Likewise.
18363
18364 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
18365 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
18366 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
18367 * m4/mbstate_t.m4: Sync with fileutils.
18368 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
18369
18370 * po/LINGUAS: Add pt_BR.
18371 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
18372 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
18373 lib/timevar.c.
18374 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
18375 manual recommends.
18376 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
18377
18378 * src/complain.c (strerror_r): Remove decl; not needed.
18379 (strerror): Use same pattern as ../lib/error.c.
18380
18381 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
18382
18383 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
18384
18385 * src/main.c (main): Cast result of bindtextdomain and textdomain
18386 to void, to avoid a GCC warning when --disable-nls is in effect.
18387
18388 * src/scan-gram.l: Use strings rather than escapes when possible,
18389 to minimize the number of warnings from xgettext.
18390 (handle_action_dollar, handle_action_at): Don't use isdigit,
18391 as it mishandles negative chars and it may not work as expected
18392 outside the C locale.
18393
18394 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
18395 this is a GCC extension and is not portable to other compilers.
18396
18397 * src/system.h (alloca): Use same pattern as ../lib/error.c.
18398 Do not include <ctype.h>; no longer needed.
18399 Do not include <malloc.h>; no longer needed (and generates
18400 warnings on OpenBSD 3.0).
18401
18402 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
18403 it's not portable.
18404
18405 * tests/regression.at: Do not use 'cc -c input.c -o input';
18406 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
18407
18408 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
18409 exit status as failure, not just exit status 1. Sun C exits
18410 with status 2 sometimes.
18411
18412 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
18413 Use it for the two large tests.
18414
c8f002c7
AD
184152002-08-02 Akim Demaille <akim@epita.fr>
18416
18417 * src/conflicts.c (conflicts_output): Don't output rules never
18418 reduced here, since anyway that computation doesn't work.
18419 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18420 (rule_useless_p, rule_never_reduced_p): New.
18421 (grammar_rules_partial_print): Use a filter instead of a range.
18422 Display the title only if needed.
18423 (grammar_rules_print): Adjust.
18424 (grammar_rules_never_reduced_report): New.
18425 * src/tables.c (action_row): Move the computation of rules never
18426 reduced to...
18427 (token_actions): here.
18428 * src/main.c (main): Make the parser before making the report, so
18429 that rules never reduced are computed.
18430 Call grammar_rules_never_reduced_report.
18431 * src/print.c (print_results): Report rules never reduced.
18432 * tests/conflicts.at, tests/reduce.at: Adjust.
18433
cd08e51e
AD
184342002-08-01 Akim Demaille <akim@epita.fr>
18435
18436 Instead of attaching lookaheads and duplicating the rules being
18437 reduced by a state, attach the lookaheads to the reductions.
18438
18439 * src/state.h (state_t): Remove the `lookaheads',
18440 `lookaheads_rule' member.
18441 (reductions_t): Add a `lookaheads' member.
18442 Use a regular array for the `rules'.
18443 * src/state.c (reductions_new): Initialize the lookaheads member
18444 to 0.
18445 (state_rule_lookaheads_print): Adjust.
18446 * src/state.h, src/state.c (state_reductions_find): New.
18447 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18448 (count_rr_conflicts): Adjust.
18449 * src/lalr.c (LArule): Remove.
18450 (add_lookback_edge): Adjust.
18451 (state_lookaheads_count): New.
18452 (states_lookaheads_initialize): Merge into...
18453 (initialize_LA): this.
18454 (lalr_free): Adjust.
18455 * src/main.c (main): Don't free nullable and derives too early: it
18456 is used by --verbose.
18457 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18458
bb0027a9
AD
184592002-08-01 Akim Demaille <akim@epita.fr>
18460
18461 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18462 `rule_number_t**'.
18463 (set_derives, free_derives): Rename as...
18464 (derives_compute, derives_free): this.
18465 Adjust all dependencies.
18466 * src/nullable.c (set_nullable, free_nullable): Rename as...
18467 (nullable_compute, nullable_free): these.
18468 (rule_list_t): Store rule_t *, not rule_number_t.
18469 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18470 pointers, instead of their numbers.
18471 * src/main.c (main): Call nullable_free, and derives_free earlier,
18472 as they were lo longer used.
18473
3325ddc4
AD
184742002-08-01 Akim Demaille <akim@epita.fr>
18475
18476 * lib/timevar.c (get_time): Include children time.
18477 * src/lalr.h (LA, LArule): Don't export them: used with the
18478 state_t.
18479 * src/lalr.c (LA, LArule): Static.
18480 * src/lalr.h, src/lalr.c (lalr_free): New.
18481 * src/main.c (main): Call it.
18482 * src/tables.c (pack_vector): Check whether loc is >= to the
18483 table_size, not >.
18484 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18485 (tables_generate): do it, since that's also it which allocates
18486 them.
18487 Don't free LA and LArule, main does.
18488
c6f1a33c
AD
184892002-07-31 Akim Demaille <akim@epita.fr>
18490
18491 Separate parser tables computation and output.
18492
18493 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18494 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18495 (yydefgoto, yydefact, high): Move to...
18496 * src/tables.h, src/tables.c: here.
18497 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18498 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18499 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18500 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18501 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18502 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18503 (action_row, save_row, token_actions, save_column, default_goto)
18504 (goto_actions, sort_actions, matching_state, pack_vector)
18505 (table_ninf_remap, pack_table, prepare_actions): Move to...
18506 * src/tables.c: here.
18507 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18508 * src/output.c (token_actions, output_base, output_conflicts)
18509 (output_check): Merge into...
18510 (prepare_actions): this.
18511 (actions_output): Rename as...
18512 (user_actions_output): this.
18513 * src/main.c (main): Call tables_generate and tables_free.
18514
1509d42f
AD
185152002-07-31 Akim Demaille <akim@epita.fr>
18516
18517 Steal GCC's --time-report support.
18518
18519 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18520 stolen/adjusted from GCC.
18521 * m4/stage.m4: Remove time related checks.
18522 * m4/timevar.m4: New.
18523 * configure.in: Adjust.
18524 * src/system.h: Adjust to using timevar.h.
18525 * src/getargs.h, src/getargs.c: Support trace_time for
18526 --trace=time.
18527 * src/main.c (stage): Remove.
18528 (main): Replace `stage' invocations with timevar calls.
18529 * src/output.c: Insert pertinent timevar calls.
18530
273a74fa
AD
185312002-07-31 Akim Demaille <akim@epita.fr>
18532
18533 Let --trace have arguments.
18534
18535 * src/getargs.h (enum trace_e): New.
18536 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18537 (long_options, short_options): --trace/-T takes an optional
18538 argument.
18539 Change all the uses of trace_flag to reflect the new flags.
18540 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18541
18542 Strengthen `stage' portability.
18543
18544 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18545 * configure.in: Use it.
18546 Don't check for malloc.h and sys/times.h.
18547 * src/system.h: Include them when appropriate.
18548 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18549 times and struct tms are available.
18550
217598da
AD
185512002-07-30 Akim Demaille <akim@epita.fr>
18552
18553 In verbose parse error message, don't report `error' as an
18554 expected token.
18555 * tests/actions.at (Printers and Destructors): Adjust.
18556 * tests/calc.at (Calculator $1): Adjust.
18557 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18558 error message, do not report the parser accepts the error token in
18559 that state.
18560
52489d44
AD
185612002-07-30 Akim Demaille <akim@epita.fr>
18562
18563 Normalize conflict related messages.
18564
18565 * src/complain.h, src/complain.c (warn, complain): New.
18566 * src/conflicts.c (conflicts_print): Use them.
18567 (conflict_report_yacc): New, extracted from...
18568 (conflicts_print): here.
18569 * tests/conflicts.at, tests/existing.at: Adjust.
18570
e8832397
AD
185712002-07-30 Akim Demaille <akim@epita.fr>
18572
18573 Report rules which are never reduced by the parser: those hidden
18574 by conflicts.
18575
18576 * src/LR0.c (save_reductions): Don't make the final state too
18577 different: save its reduction (accept) instead of having a state
18578 without any action (no shift or goto, no reduce).
18579 Note: the final state is now a ``regular'' state, i.e., the
18580 parsers now contain `reduce 0' as default reduction.
18581 Nevertheless, since they decide to `accept' when yystate =
18582 final_state, they still will not reduce rule 0.
18583 * src/print.c (print_actions, print_reduction): Adjust.
18584 * src/output.c (action_row): Track reduced rules.
18585 (token_actions): Report rules never reduced.
18586 * tests/conflicts.at, tests/regression.at: Adjust.
18587
caf23d24
AD
185882002-07-30 Akim Demaille <akim@epita.fr>
18589
18590 `stage' was accidently included in a previous patch.
18591 Initiate its autoconfiscation.
18592
18593 * configure.in: Look for malloc.h and sys/times.h.
18594 * src/main.c (stage): Adjust.
18595 Report only when trace_flag.
18596
640748ee
AD
185972002-07-29 Akim Demaille <akim@epita.fr>
18598
18599 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18600 state_number_t.
18601 (errs_t): symbol_t*, not symbol_number_t.
18602 (reductions_t): rule_t*, not rule_number_t.
18603 (FOR_EACH_SHIFT): New.
18604 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18605 * src/print.c, src/print_graph.c: Adjust.
18606
88bce5a2
AD
186072002-07-29 Akim Demaille <akim@epita.fr>
18608
18609 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18610
18611 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18612 (endtoken, accept): these.
18613 * src/reader.c (reader): Set endtoken's default tag to "$end".
18614 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18615 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18616 Adjust.
18617
1bfb97db
AD
186182002-07-29 Akim Demaille <akim@epita.fr>
18619
18620 * src/reduce.c (reduce_grammar): When the language is empty,
18621 complain about the start symbol, not the axiom.
18622 Use its location.
18623 * tests/reduce.at (Empty Language): New.
18624
fc5734fe
AD
186252002-07-26 Akim Demaille <akim@epita.fr>
18626
18627 * src/reader.h, src/reader.c (gram_error): ... can't get
18628 yycontrol without making too strong assumptions on the parser
18629 itself.
18630 * src/output.c (prepare_tokens): Use the real 0th value of
18631 token_translations instead of `0'.
18632 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18633 visible here.
18634 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18635 for the time being: %locations ought to provide it to yyerror.
18636
3650b4b8
AD
186372002-07-25 Akim Demaille <akim@epita.fr>
18638
18639 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18640 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18641 * tests/regression.at (Web2c Actions): Adjust.
18642
4b3d3a8e
AD
186432002-07-25 Akim Demaille <akim@epita.fr>
18644
18645 Stop storing rules from 1 to nrules + 1.
18646
18647 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18648 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18649 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18650 Iterate from 0 to nrules.
18651 Use rule_number_as_item_number and item_number_as_rule_number.
18652 Adjust to `derive' now containing possibly 0.
18653 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18654 Handle the `- 1' part in rule numbers from/to item numbers.
18655 * src/conflicts.c (log_resolution): Fix the message which reversed
18656 shift and reduce.
18657 * src/output.c (action_row): Initialize default_rule to -1.
18658 (token_actions): Adjust.
18659 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18660 expected output.
18661 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18662
4a2a22f4
AD
186632002-07-25 Akim Demaille <akim@epita.fr>
18664
18665 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18666 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18667 (b4_c_knr_arg_decl): New.
18668 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18669 yyreport_parse_error.
18670
b8df3223
AD
186712002-07-25 Akim Demaille <akim@epita.fr>
18672
18673 * data/yacc.c (yyreport_parse_error): New, extracted from...
18674 (yyparse): here.
18675 (yydestruct, yysymprint): Move above yyparse.
18676 Be K&R compliant.
18677
a762e609
AD
186782002-07-25 Akim Demaille <akim@epita.fr>
18679
18680 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18681 replace...
18682 (b4_sint_type, b4_uint_type): these.
18683 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18684 * tests/regression.at (Web2c Actions): Adjust.
18685
12b0043a
AD
186862002-07-25 Akim Demaille <akim@epita.fr>
18687
18688 * src/gram.h (TIEM_NUMBER_MAX): New.
18689 (item_number_of_rule_number, rule_number_of_item_number): Rename
18690 as...
18691 (rule_number_as_item_number, item_number_as_rule_number): these.
18692 Adjust dependencies.
18693 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18694 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18695 (symbol_number_to_vector_number): New.
18696 (order): Of vector_number_t* type.
18697 (base_t, BASE_MAX, BASE_MIN): New.
18698 (froms, tos, width, pos, check): Of base_t type.
18699 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18700 (actrow): Of action_number_t type.
18701 (conflrow): Of unsigned int type.
18702 (table_ninf, base_ninf): New.
18703 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18704 (muscle_insert_int_table, muscle_insert_base_table)
18705 (muscle_insert_rule_number_table): New.
18706 (prepare_tokens): Output `toknum' as int_table.
18707 (action_row): Returns a rule_number_t.
18708 Use ACTION_MIN, not SHRT_MIN.
18709 (token_actions): yydefact is rule_number_t*.
18710 (table_ninf_remap): New.
18711 (pack_table): Use it for `base' and `table'.
18712 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18713 replaced with...
18714 (YYPACT_NINF, YYTABLE_NINF): these.
18715 (yypact, yytable): Compute their types instead of hard-coded
18716 `short'.
18717 * tests/regression.at (Web2c Actions): Adjust.
18718
5dde258a
AD
187192002-07-19 Akim Demaille <akim@epita.fr>
18720
18721 * src/scan-gram.l (id): Can start with an underscore.
18722
a945ec39
AD
187232002-07-16 Akim Demaille <akim@epita.fr>
18724
18725 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18726 Adjust all former `associativity' dependencies.
18727 * src/symtab.c (symbol_new): Default associativity is `undef', not
18728 `right'.
18729 (symbol_check_alias_consistence): Adjust.
18730
fae437e8
AD
187312002-07-09 Akim Demaille <akim@epita.fr>
18732
18733 * doc/bison.texinfo: Properly set the ``header'' part.
18734 Use @dircategory ``GNU programming tools'' as per Texinfo's
18735 documentation.
18736 Use @copying.
18737
1a715ef2
AD
187382002-07-09 Akim Demaille <akim@epita.fr>
18739
18740 * lib/quotearg.h: Protect against multiple inclusions.
18741 * src/location.h (location_t): Add a `file' member.
18742 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18743 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18744 `error_one_per_line' support.
18745
a5d50994
AD
187462002-07-09 Akim Demaille <akim@epita.fr>
18747
18748 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18749 * src/reader.c (lineno): Remove.
18750 Adjust all dependencies.
18751 (get_merge_function): Take a location and use complain_at.
18752 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18753 * tests/regression.at (Invalid inputs, Mixing %token styles):
18754 Adjust.
18755
b275314e
AD
187562002-07-09 Akim Demaille <akim@epita.fr>
18757
18758 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18759 recovery rule, and forbid extensions when --yacc.
18760 (gram_error): Use complain_at.
18761 * src/reader.c (reader): Exit if there were parse errors.
18762
865b9df1
AD
187632002-07-09 Akim Demaille <akim@epita.fr>
18764
18765 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18766 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18767 Reported by R Blake <blakers@mac.com>.
18768
c76e14da
AD
187692002-07-09 Akim Demaille <akim@epita.fr>
18770
18771 * data/yacc.c: Output the copyright notive in the header.
18772
7db2ed2d
AD
187732002-07-03 Akim Demaille <akim@epita.fr>
18774
18775 * src/output.c (froms, tos): Are state_number_t.
18776 (save_column): sp, sp1, and sp2 are state_number_t.
18777 (prepare): Rename `final' as `final_state_number', `nnts' as
18778 `nterms_number', `nrules' as `rules_number', `nstates' as
18779 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18780 unused.
18781 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18782 * data/lalr1.cc (nsym_): Remove, unused.
18783
e68e0410
AD
187842002-07-03 Akim Demaille <akim@epita.fr>
18785
18786 * src/lalr.h, src/lalr.c (goto_number_t): New.
18787 * src/lalr.c (goto_list_t): New.
18788 Propagate them.
18789 * src/nullable.c (rule_list_t): New.
18790 Propagate.
18791 * src/types.h: Remove.
18792
e1a4f3a4
AD
187932002-07-03 Akim Demaille <akim@epita.fr>
18794
18795 * src/closure.c (print_fderives): Use rule_rhs_print.
18796 * src/derives.c (print_derives): Use rule_rhs_print.
18797 (rule_list_t): New, replaces `shorts'.
18798 (set_derives): Add comments.
18799 * tests/sets.at (Nullable, Firsts): Adjust.
18800
536545f3
AD
188012002-07-03 Akim Demaille <akim@epita.fr>
18802
18803 * src/output.c (prepare_actions): Free `tally' and `width'.
18804 (prepare_actions): Allocate and free `order'.
18805 * src/symtab.c (symbols_free): Free `symbols'.
18806 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18807 * src/output.c (m4_invoke): Move to...
18808 * src/scan-skel.l: here.
18809 (<<EOF>>): Close yyout, and free its name.
18810
8b752b00
AD
188112002-07-03 Akim Demaille <akim@epita.fr>
18812
18813 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18814
18815 * src/LR0.c (new_state): Merge into...
18816 (state_list_append): this.
18817 (new_states): Merge into...
18818 (generate_states): here.
18819 (set_states): Don't ensure a proper `errs' state member here, do it...
18820 * src/conflicts.c (conflicts_solve): here.
18821 * src/state.h, src/state.c: Comment changes.
18822 (state_t): Rename member `shifts' as `transitions'.
18823 Adjust all dependencies.
18824 (errs_new): For consistency, also take the values as argument.
18825 (errs_dup): Remove.
18826 (state_errs_set): New.
18827 (state_reductions_set, state_transitions_set): Assert that no
18828 previous value was assigned.
18829 (state_free): New.
18830 (states_free): Use it.
18831 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18832 temporary storage: use `errs' and `nerrs' as elsewhere.
18833 (set_conflicts): Allocate and free this `errs'.
18834
613f5e1a
AD
188352002-07-02 Akim Demaille <akim@epita.fr>
18836
18837 * lib/libiberty.h: New.
18838 * lib: Update the bitset implementation from upstream.
18839 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18840 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18841 * src/main.c: Adjust bitset stats calls.
18842
26e0cadc
PE
188432002-07-01 Paul Eggert <eggert@twinsun.com>
18844
18845 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18846 char, so that negative chars don't collide with $.
18847
1154cced
AD
188482002-06-30 Akim Demaille <akim@epita.fr>
18849
18850 Have the GLR tests be `warning' checked, and fix the warnings.
18851
18852 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18853 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18854 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18855 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18856 (yyaddDeferredAction): static.
18857 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18858 (yyreportParseError): yyprefix is const.
18859 yytokenp is used only when verbose.
18860 (yy__GNUC__): Replace with __GNUC__.
18861 (yypdumpstack): yyi is size_t.
18862 (yypreference): Un-yy local variables and arguments, to avoid
18863 clashes with `yyr1'. Anyway, we are not in the user name space.
18864 (yytname_size): be an int, as is compared with ints.
18865 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18866 Use them.
18867 * tests/cxx-gram.at: Use quotation to protect $1.
18868 Use AT_COMPILE to enable warnings hunts.
18869 Prototype yylex and yyerror.
18870 `Use' argc.
18871 Include `string.h', not `strings.h'.
18872 Produce and prototype stmtMerge only when used.
18873 yylex takes a location.
18874
97650f4e
AD
188752002-06-30 Akim Demaille <akim@epita.fr>
18876
18877 We spend a lot of time in quotearg, in particular when --verbose.
18878
18879 * src/symtab.c (symbol_get): Store a quoted version of the key.
18880 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18881 Adjust all callers.
18882
d2576365
AD
188832002-06-30 Akim Demaille <akim@epita.fr>
18884
18885 * src/state.h (reductions_t): Rename member `nreds' as num.
18886 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18887 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18888
ccaf65bc
AD
188892002-06-30 Akim Demaille <akim@epita.fr>
18890
18891 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18892 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18893 (shifts_to): Rename as...
18894 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18895 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18896 (TRANSITION_IS_DISABLED, transitions_to): these.
18897
87675353
AD
188982002-06-30 Akim Demaille <akim@epita.fr>
18899
18900 * src/print.c (print_shifts, print_gotos): Merge into...
18901 (print_transitions): this.
18902 (print_transitions, print_errs, print_reductions): Align the
18903 lookaheads columns.
18904 (print_core, print_transitions, print_errs, print_state,
18905 print_grammar): Output empty lines separator before, not after.
18906 (state_default_rule_compute): Rename as...
18907 (state_default_rule): this.
18908 * tests/conflicts.at (Defaulted Conflicted Reduction),
18909 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18910 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18911
ce4ccb4b
AD
189122002-06-30 Akim Demaille <akim@epita.fr>
18913
18914 Display items as we display rules.
18915
18916 * src/gram.h, src/gram.c (rule_lhs_print): New.
18917 * src/gram.c (grammar_rules_partial_print): Use it.
18918 * src/print.c (print_core): Likewise.
18919 * tests/conflicts.at (Defaulted Conflicted Reduction),
18920 (Unresolved SR Conflicts): Adjust.
18921 (Unresolved SR Conflicts): Adjust and rename as...
18922 (Resolved SR Conflicts): this, as was meant.
18923 * tests/regression.at (Web2c Report): Adjust.
18924
bc933ef1
AD
189252002-06-30 Akim Demaille <akim@epita.fr>
18926
18927 * src/print.c (state_default_rule_compute): New, extracted from...
18928 (print_reductions): here.
18929 Pessimize, but clarify the code.
18930 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18931
53d4308d
AD
189322002-06-30 Akim Demaille <akim@epita.fr>
18933
18934 * src/output.c (action_row): Let default_rule be always a rule
18935 number.
18936
574fb2d5
AD
189372002-06-30 Akim Demaille <akim@epita.fr>
18938
18939 * src/closure.c (print_firsts, print_fderives, closure):
18940 Use BITSET_EXECUTE.
18941 * src/lalr.c (lookaheads_print): Likewise.
18942 * src/state.c (state_rule_lookaheads_print): Likewise.
18943 * src/print_graph.c (print_core): Likewise.
18944 * src/print.c (print_reductions): Likewise.
18945 * src/output.c (action_row): Likewise.
18946 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18947
05811fd7
AD
189482002-06-30 Akim Demaille <akim@epita.fr>
18949
18950 * src/print_graph.c: Use report_flag.
18951
0e4d5753
AD
189522002-06-30 Akim Demaille <akim@epita.fr>
18953
18954 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18955 to...
18956 * src/relation.h, src/relation.c (traverse, relation_digraph)
18957 (relation_print, relation_transpose): New.
18958
24c7d800
AD
189592002-06-30 Akim Demaille <akim@epita.fr>
18960
18961 * src/state.h, src/state.c (shifts_to): New.
18962 * src/lalr.c (build_relations): Use it.
18963
9222837b
AD
189642002-06-30 Akim Demaille <akim@epita.fr>
18965
18966 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18967 (item_number_of_rule_number, rule_number_of_item_number): New.
18968 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18969 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
18970 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
18971 Propagate their use.
18972 Much remains to be done, in particular wrt `shorts' from types.h.
18973
260008e5
AD
189742002-06-30 Akim Demaille <akim@epita.fr>
18975
18976 * src/symtab.c (symbol_new): Initialize the `printer' member.
18977
8a731ca8
AD
189782002-06-30 Akim Demaille <akim@epita.fr>
18979
18980 * src/LR0.c (save_reductions): Remove, replaced by...
18981 * src/state.h, src/state.c (state_reductions_set): New.
18982 (reductions, errs): Rename as...
18983 (reductions_t, errs_t): these.
18984 Adjust all dependencies.
18985
32e1e0a4
AD
189862002-06-30 Akim Demaille <akim@epita.fr>
18987
18988 * src/LR0.c (state_list_t, state_list_append): New.
18989 (first_state, last_state): Now symbol_list_t.
18990 (this_state): Remove.
18991 (new_itemsets, append_states, save_reductions): Take a state_t as
18992 argument.
18993 (set_states, generate_states): Adjust.
18994 (save_shifts): Remove, replaced by...
18995 * src/state.h, src/state.c (state_shifts_set): New.
18996 (shifts): Rename as...
18997 (shifts_t): this.
18998 Adjust all dependencies.
18999 * src/state.h (state_t): Remove the `next' member.
19000
e5fb6710
AD
190012002-06-30 Akim Demaille <akim@epita.fr>
19002
19003 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
19004 escaped in slot 0.
19005
c7ca99d4
AD
190062002-06-30 Akim Demaille <akim@epita.fr>
19007
19008 Use hash.h for the state hash table.
19009
19010 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
19011 (allocate_storage): Use state_hash_new.
19012 (free_storage): Use state_hash_free.
19013 (new_state, get_state): Adjust.
19014 * src/lalr.h, src/lalr.c (states): Move to...
19015 * src/states.h (state_t): Remove the `link' member, no longer
19016 used.
19017 * src/states.h, src/states.c: here.
19018 (state_hash_new, state_hash_free, state_hash_lookup)
19019 (state_hash_insert, states_free): New.
19020 * src/states.c (state_table, state_compare, state_hash): New.
19021 * src/output.c (output_actions): Do not free states now, since we
19022 still need to know the final_state number in `prepare', called
19023 afterwards. Do it...
19024 * src/main.c (main): here: call states_free after `output'.
19025
df0e7316
AD
190262002-06-30 Akim Demaille <akim@epita.fr>
19027
19028 * src/state.h, src/state.c (state_new): New, extracted from...
19029 * src/LR0.c (new_state): here.
19030 * src/state.h (STATE_ALLOC): Move to...
19031 * src/state.c: here.
19032 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
19033 * src/state.h, src/state.c: here.
19034
39f41916
AD
190352002-06-30 Akim Demaille <akim@epita.fr>
19036
19037 * src/reader.c (gensym): Rename as...
19038 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
19039 (getsym): Rename as...
19040 (symbol_get): this.
19041
d57650a5
AD
190422002-06-30 Akim Demaille <akim@epita.fr>
19043
19044 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
19045 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
19046 * src/output.c, src/print.c, src/print_graph.c: Propagate.
19047 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
19048
5a08f1ce
AD
190492002-06-30 Akim Demaille <akim@epita.fr>
19050
19051 Make the test suite pass with warnings checked.
19052
19053 * tests/actions.at (Printers and Destructors): Improve.
19054 Avoid unsigned vs. signed issues.
19055 * tests/calc.at: Don't exercise the scanner here, do it...
19056 * tests/input.at (Torturing the Scanner): here.
19057
720623af
PH
190582002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19059
88e7e941 19060 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
19061 reorganize first lines parallel to yacc.c.
19062
fb8135fa
AD
190632002-06-28 Akim Demaille <akim@epita.fr>
19064
19065 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
19066 (b4_token_enum, b4_token_defines): New, factored from...
19067 * data/lalr1.cc, data/yacc.c, glr.c: here.
19068
41442480
AD
190692002-06-28 Akim Demaille <akim@epita.fr>
19070
19071 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
19072 unused variables.
19073 * src/output.c (merger_output): static.
19074
e0e5bf84
AD
190752002-06-28 Akim Demaille <akim@epita.fr>
19076
ba0fe3c7 19077 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
19078 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
19079 pacify GCC.
19080 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 19081
676385e2
PH
190822002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19083
19084 Accumulated changelog for new GLR parsing features.
19085
6a254321 19086 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
19087 conflicts_total_count.
19088 * src/conflicts.h: Ditto.
19089 * src/output.c (token_actions): Use the new name.
19090 (output_conflicts): Change conflp => conflict_list_heads, and
19091 confl => conflict_list for better readability.
19092 * data/glr.c: Use the new names.
19093 * NEWS: Add self to GLR announcement.
e0e5bf84 19094
676385e2
PH
19095 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
19096
19097 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
19098 Akim Demaille.
19099
19100 * data/bison.glr: Change name to glr.c
19101 * data/glr.c: Renamed from bison.glr.
19102 * data/Makefile.am: Add glr.c
e0e5bf84
AD
19103
19104 * src/getargs.c:
19105
676385e2 19106 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 19107 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 19108
676385e2
PH
19109 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19110
19111 * data/bison.glr: Be sure to restore the
19112 current #line when returning to the skeleton contents after having
19113 exposed the input file's #line.
19114
19115 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19116
19117 * data/bison.glr: Bring up to date with changes to bison.simple.
19118
19119 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19120
19121 * data/bison.glr: Correct definitions that use b4_prefix.
19122 Various reformatting.
19123 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
19124 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
19125 yytokenp argument; now part of stack.
19126 (yychar): Define to behave as documented.
19127 (yyclearin): Ditto.
e0e5bf84 19128
676385e2
PH
19129 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19130
19131 * src/reader.h: Add declaration for free_merger_functions.
19132
19133 * src/reader.c (merge_functions): New variable.
19134 (get_merge_function): New function.
19135 (free_merger_functions): New function.
19136 (readgram): Check for %prec that is not followed by a symbol.
19137 Handle %dprec and %merge declarations.
19138 (packgram): Initialize dprec and merger fields in rules array.
19139
19140 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
19141 conflict_list_cnt, conflict_list_free): New variables.
19142 (table_grow): Also grow conflict_table.
e0e5bf84 19143 (prepare_rules): Output dprec and merger tables.
676385e2 19144 (conflict_row): New function.
e0e5bf84 19145 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
19146 default reduction in conflicted states for GLR parser so that there
19147 are spaces for the conflict lists.
19148 (save_row): Also save conflict information.
19149 (token_actions): Allocate conflict list.
19150 (merger_output): New function.
19151 (pack_vector): Pack conflict table, too.
19152 (output_conflicts): New function to output yyconflp and yyconfl.
19153 (output_check): Allocate conflict_tos.
19154 (output_actions): Output conflict tables, also.
19155 (output_skeleton): Output b4_mergers definition.
19156 (prepare): Output b4_max_rhs_length definition.
19157 Use 'bison.glr' as default skeleton for GLR parsers.
19158
19159 * src/gram.c (glr_parser): New flag.
19160 (grammar_free): Call free_merger_functions.
19161
19162 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
19163 all pairs of conflicting reductions, rather than just all tokens
19164 causing conflicts. Needed to size conflict tables.
e0e5bf84 19165 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
19166 interface.
19167 (conflicts_print): Ditto.
19168 (count_total_conflicts): New function.
19169
19170 * src/reader.h (merger_list): New type.
19171 (merge_functions): New variable.
19172
19173 * src/lex.h (tok_dprec, tok_merge): New token types.
19174
19175 * src/gram.h (rule_s): Add dprec and merger fields.
19176 (glr_parser): New flag.
19177
19178 * src/conflicts.h (count_total_conflicts): New function.
19179
19180 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
19181
19182 * doc/bison.texinfo (Generalized LR Parsing): New section.
19183 (GLR Parsers): New section.
19184 (Language and Grammar): Mention GLR parsing.
19185 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
19186 Correct typo ("tge" -> "the").
19187
19188 * data/bison.glr: New skeleton for GLR parsing.
19189
19190 * tests/cxx-gram.at: New tests for GLR parsing.
19191
19192 * tests/testsuite.at: Include cxx-gram.at.
19193
19194 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 19195
676385e2
PH
19196 * src/parse-gram.y:
19197
19198 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
19199
19200 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 19201
b5480d74 192022002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
19203
19204 * src/options.h, src/options.c: Remove.
19205 * src/getargs.c (short_options, long_options): New.
19206
60491a94
AD
192072002-06-27 Akim Demaille <akim@epita.fr>
19208
19209 * data/bison.simple, data/bison.c++: Rename as...
19210 * data/yacc.c, data/lalr1.cc: these.
19211 * doc/bison.texinfo (Environment Variables): Remove.
19212
9be0c25b
AD
192132002-06-25 Raja R Harinath <harinath@cs.umn.edu>
19214
19215 * src/getargs.c (report_argmatch): Initialize strtok().
19216
1ae72863
AD
192172002-06-20 Akim Demaille <akim@epita.fr>
19218
19219 * data/bison.simple (b4_symbol_actions): New, replaces...
19220 (b4_symbol_destructor, b4_symbol_printer): these.
19221 (yysymprint): Be sure to call YYPRINT only for tokens, and using
19222 user token numbers.
19223
87542d29
AD
192242002-06-20 Akim Demaille <akim@epita.fr>
19225
19226 * data/bison.simple (yydestructor): Rename as...
19227 (yydestruct): this.
19228
1a31ed21
AD
192292002-06-20 Akim Demaille <akim@epita.fr>
19230
19231 * src/symtab.h, src/symtab.c (symbol_type_set)
19232 (symbol_destructor_set, symbol_precedence_set): The location is
19233 the last argument.
19234 Adjust all callers.
19235
e776192e
AD
192362002-06-20 Akim Demaille <akim@epita.fr>
19237
19238 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
19239 internals.
19240 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
19241 Takes a location.
19242 * src/symtab.h, src/symtab.c (symbol_class_set)
19243 (symbol_user_token_number_set): Likewise.
19244 Adjust all callers.
19245 Promote complain_at.
19246 * tests/input.at (Type Clashes): Adjust.
19247
5c1180b3
AD
192482002-06-20 Akim Demaille <akim@epita.fr>
19249
19250 * data/bison.simple (YYLEX): Fix the declaration when
19251 %pure-parser.
19252
e3170060
AD
192532002-06-20 Akim Demaille <akim@epita.fr>
19254
19255 * data/bison.simple (yysymprint): Don't print the token number,
19256 just its name.
19257 * tests/actions.at (Destructors): Rename as...
19258 (Printers and Destructors): this.
19259 Also exercise %printer.
19260
253862fd
AD
192612002-06-20 Akim Demaille <akim@epita.fr>
19262
19263 * data/bison.simple (YYDSYMPRINT): New.
19264 Use it to remove many of the #if YYDEBUG/if (yydebug).
19265
366eea36
AD
192662002-06-20 Akim Demaille <akim@epita.fr>
19267
19268 * src/symtab.h, src/symtab.c (symbol_t): printer and
19269 printer_location are new members.
19270 (symbol_printer_set): New.
19271 * src/parse-gram.y (PERCENT_PRINTER): New token.
19272 Handle its associated rule.
19273 * src/scan-gram.l: Adjust.
19274 (handle_destructor_at, handle_destructor_dollar): Rename as...
19275 (handle_symbol_code_at, handle_symbol_code_dollar): these.
19276 * src/output.c (symbol_printers_output): New.
19277 (output_skeleton): Call it.
19278 * data/bison.simple (yysymprint): New. Cannot be named yyprint
19279 since there are already many grammar files with a user `yyprint'.
19280 Replace the calls to YYPRINT to calls to yysymprint.
19281 * tests/calc.at: Adjust.
19282 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
19283 taking advantage of parser very internal details (stack size!).
19284
4f25ebb0
AD
192852002-06-20 Akim Demaille <akim@epita.fr>
19286
19287 * src/scan-gram.l: Complete the scanner with the missing patterns
19288 to pacify Flex.
19289 Use `quote' and `symbol_tag_get' where appropriate.
19290
93b68a0e
AD
192912002-06-19 Akim Demaille <akim@epita.fr>
19292
19293 * tests/actions.at (Destructors): Augment to test locations.
19294 * data/bison.simple (yydestructor): Pass it the current location
19295 if locations are enabled.
19296 Prototype only when __STDC__ or C++.
19297 Change the argument names to move into the yy name space: there is
19298 user code here.
19299
58612f1d
AD
193002002-06-19 Akim Demaille <akim@epita.fr>
19301
74310291
AD
19302 * data/bison.simple (b4_pure_if): New.
19303 Use it instead of #ifdef YYPURE.
19304
193052002-06-19 Akim Demaille <akim@epita.fr>
19306
19307 * data/bison.simple (b4_location_if): New.
58612f1d
AD
19308 Use it instead of #ifdef YYLSP_NEEDED.
19309
f25bfb75
AD
193102002-06-19 Akim Demaille <akim@epita.fr>
19311
19312 Prepare @$ in %destructor, but currently don't bind it in the
19313 skeleton, as %location use is not cleaned up yet.
19314
19315 * src/scan-gram.l (handle_dollar, handle_destructor_at)
19316 (handle_action_at): New.
19317 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
19318 a braced_code_t and a location as additional arguments.
19319 (handle_destructor_dollar): Instead of requiring `b4_eval', just
19320 unquote one when outputting `b4_dollar_dollar'.
19321 Adjust callers.
19322 * data/bison.simple (b4_eval): Remove.
19323 (b4_symbol_destructor): Adjust.
19324 * tests/input.at (Invalid @n): Adjust.
19325
c732d2c6
AD
193262002-06-19 Zack Weinberg <zack@codesourcery.com>
19327
19328 * doc/bison.texinfo: Document ability to have multiple
19329 prologue sections.
19330
8c165d89
AD
193312002-06-18 Akim Demaille <akim@epita.fr>
19332
19333 * src/files.c (compute_base_names): When computing the output file
19334 names from the input file name, strip the directory part.
19335
ca98bf57
AD
193362002-06-18 Akim Demaille <akim@epita.fr>
19337
19338 * data/bison.simple.new: Comment changes.
19339 Reported by Andreas Schwab.
19340
0bfb02ff
AD
193412002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
19342
19343 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
19344 there are no `label `yyoverflowlab' defined but not used' warnings
19345 when yyoverflow is defined.
19346
24c0aad7
AD
193472002-06-18 Akim Demaille <akim@epita.fr>
19348
19349 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
19350 new member.
19351 (symbol_destructor_set): Adjust.
19352 * src/output.c (symbol_destructors_output): Output the destructor
19353 locations.
19354 Output the symbol name.
19355 * data/bison.simple (b4_symbol_destructor): Adjust.
19356
5719c109
AD
193572002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
19358 and Akim Demaille <akim@epita.fr>
19359
19360 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
19361 what's left on the stack when the error recovery hits EOF.
19362 * tests/actions.at (Destructors): Complete to exercise this case.
19363
9280d3ef
AD
193642002-06-17 Akim Demaille <akim@epita.fr>
19365
19366 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
19367 arguments is really empty, not only equal to `[]'.
19368 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
19369 member.
19370 (symbol_destructor_set): New.
19371 * src/output.c (symbol_destructors_output): New.
19372 * src/reader.h (brace_code_t, current_braced_code): New.
19373 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
19374 (handle_dollar): Rename as...
19375 (handle_action_dollar): this.
19376 (handle_destructor_dollar): New.
19377 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
19378 (grammar_declaration): Use it.
19379 * data/bison.simple (yystos): Is always defined.
19380 (yydestructor): New.
19381 * tests/actions.at (Destructors): New.
19382 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
19383
dafdc66f
AD
193842002-06-17 Akim Demaille <akim@epita.fr>
19385
19386 * src/symlist.h, src/symlist.c (symbol_list_length): New.
19387 * src/scan-gram.l (handle_dollar, handle_at): Compute the
19388 rule_length only when needed.
19389 * src/output.c (actions_output, token_definitions_output): Output
19390 the full M4 block.
19391 * src/symtab.c: Don't access directly to the symbol tag, use
19392 symbol_tag_get.
19393 * src/parse-gram.y: Use symbol_list_free.
19394
56c47203
AD
193952002-06-17 Akim Demaille <akim@epita.fr>
19396
19397 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
19398 (symbol_list_prepend, get_type_name): Move to...
19399 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
19400 (symbol_list_prepend, symbol_list_n_type_name_get): here.
19401 Adjust all callers.
19402 (symbol_list_free): New.
19403 * src/scan-gram.l (handle_dollar): Takes a location.
19404 * tests/input.at (Invalid $n): Adjust.
19405
1e0bab92
AD
194062002-06-17 Akim Demaille <akim@epita.fr>
19407
19408 * src/reader.h, src/reader.c (symbol_list_new): Export it.
19409 (symbol_list_prepend): New.
19410 * src/parse-gram.y (%union): `list' is a new member.
19411 (symbols.1): New, replaces...
19412 (terms_to_prec.1, nterms_to_type.1): these.
19413 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
19414 Take a location as additional argument.
19415 Adjust all callers.
19416
04e60654
AD
194172002-06-15 Akim Demaille <akim@epita.fr>
19418
19419 * src/parse-gram.y: Move %token in the declaration section so that
19420 we don't depend upon CVS Bison.
19421
10e5b8bd
AD
194222002-06-15 Akim Demaille <akim@epita.fr>
19423
19424 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19425 * src/print.c (print_core): Use it.
19426
9801d40c
AD
194272002-06-15 Akim Demaille <akim@epita.fr>
19428
19429 * src/conflicts.c (log_resolution): Accept the rule involved in
19430 the sr conflicts instead of the lookahead number that points to
19431 that rule.
19432 (flush_reduce): Accept the current lookahead vector as argument,
19433 instead of the index in LA.
19434 (resolve_sr_conflict): Accept the current number of lookahead
19435 bitset to consider for the STATE, instead of the index in LA.
19436 (set_conflicts): Adjust.
19437 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19438
c0263492
AD
194392002-06-15 Akim Demaille <akim@epita.fr>
19440
19441 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19442 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19443 Adjust all dependencies.
19444 * src/lalr.c (initialize_lookaheads): Split into...
19445 (states_lookaheads_count, states_lookaheads_initialize): these.
19446 (lalr): Adjust.
19447
9757c359
AD
194482002-06-15 Akim Demaille <akim@epita.fr>
19449
19450 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19451 out of...
19452 (grammar_rules_print): here.
19453 * src/reduce.c (reduce_output): Use it.
19454 * tests/reduce.at (Useless Rules, Reduced Automaton)
19455 (Underivable Rules): Adjust.
19456
6b98e4b5
AD
194572002-06-15 Akim Demaille <akim@epita.fr>
19458
19459 Copy BYacc's nice way to report the grammar.
19460
19461 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19462 New.
19463 Don't print the rules' location, it is confusing and useless.
19464 (rule_print): Use grammar_rhs_print.
19465 * src/print.c (print_grammar): Use grammar_rules_print.
19466
6b98e4b5
AD
194672002-06-15 Akim Demaille <akim@epita.fr>
19468
19469 Complete and rationalize `useless thing' warnings.
19470
19471 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19472 (symbol_tag_print): New.
19473 Use them everywhere in place of accessing directly the tag member.
19474 * src/gram.h, src/gram.c (rule_print): New.
19475 Use it where a rule used to be printed `by hand'.
19476 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19477 (reduce_grammar_tables): Report the useless rules.
19478 (reduce_print): Useless things are a warning, not an error.
19479 Report it as such.
19480 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19481 (Reduced Automaton, Underivable Rules): Adjust.
19482 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19483 * tests/conflicts.at (Unresolved SR Conflicts)
19484 (Solved SR Conflicts): Adjust.
19485
ee000ba4
AD
194862002-06-15 Akim Demaille <akim@epita.fr>
19487
19488 Let symbols have a location.
19489
19490 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19491 (getsym): Adjust.
19492 Adjust all callers.
19493 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19494 Use location_t, not int.
19495 * src/symtab.c (symbol_check_defined): Take advantage of the
19496 location.
19497 * tests/regression.at (Invalid inputs): Adjust.
19498
8efe435c
AD
194992002-06-15 Akim Demaille <akim@epita.fr>
19500
19501 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19502 (input): Don't try to initialize yylloc here, do it in the
19503 scanner.
19504 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19505 * src/gram.h (rule_t): Change line and action_line into location
19506 and action_location, of location_t type.
19507 Adjust all dependencies.
19508 * src/location.h, src/location.c (empty_location): New.
19509 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19510 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19511 (grammar_current_rule_symbol_append)
19512 (grammar_current_rule_action_append): Expect a location as argument.
19513 * src/reader.c (grammar_midrule_action): Adjust to attach an
19514 action's location as dummy symbol location.
19515 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19516 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19517 the line numbers.
19518
1921f1d7
AD
195192002-06-14 Akim Demaille <akim@epita.fr>
19520
19521 Grammar declarations may be found in the grammar section.
19522
19523 * src/parse-gram.y (rules_or_grammar_declaration): New.
19524 (declarations): Each declaration may end with a semicolon, not
19525 just...
19526 (grammar_declaration): `"%union"'.
19527 (grammar): Branch to rules_or_grammar_declaration.
19528
4515534c
AD
195292002-06-14 Akim Demaille <akim@epita.fr>
19530
19531 * src/main.c (main): Invoke scanner_free.
19532
f958596b
AD
195332002-06-14 Akim Demaille <akim@epita.fr>
19534
19535 * src/output.c (m4_invoke): Extracted from...
19536 (output_skeleton): here.
19537 Free tempfile.
19538
2c569025
AD
195392002-06-14 Akim Demaille <akim@epita.fr>
19540
19541 * src/parse-gram.y (directives, directive, gram)
19542 (grammar_directives, precedence_directives, precedence_directive):
19543 Rename as...
19544 (declarations, declaration, grammar, grammar_declaration)
19545 (precedence_declaration, precedence_declarator): these.
19546 (symbol_declaration): New.
19547
592e8d4d
AD
195482002-06-14 Akim Demaille <akim@epita.fr>
19549
19550 * src/files.c (action_obstack): Remove, unused.
19551 (output_obstack): Remove it, and all its dependencies, as it is no
19552 longer needed.
19553 * src/reader.c (epilogue_set): Build the epilogue in the
19554 muscle_obstack.
19555 * src/output.h, src/output.c (muscle_obstack): Move to...
19556 * src/muscle_tab.h, src/muscle_tab.h: here.
19557 (muscle_init): Initialize muscle_obstack.
19558 (muscle_free): New.
19559 * src/main.c (main): Call it.
19560
0c15323d
AD
195612002-06-14 Akim Demaille <akim@epita.fr>
19562
19563 * src/location.h: New, extracted from...
19564 * src/reader.h: here.
19565 * src/Makefile.am (noinst_HEADERS): Merge into
19566 (bison_SOURCES): this.
19567 Add location.h.
19568 * src/parse-gram.y: Use location_t instead of Bison's.
19569 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19570 Use location_t instead of ints.
19571
e96c9728
AD
195722002-06-14 Akim Demaille <akim@epita.fr>
19573
19574 * data/bison.simple, data/bison.c++: Be sure to restore the
19575 current #line when returning to the skeleton contents after having
19576 exposed the input file's #line.
19577
75d1fe16
AD
195782002-06-12 Akim Demaille <akim@epita.fr>
19579
19580 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19581 eager.
19582 * tests/actions.at (Exotic Dollars): New.
19583
6c35d22c
AD
195842002-06-12 Akim Demaille <akim@epita.fr>
19585
19586 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19587 ['"/] too eagerly.
19588 * tests/input.at (Torturing the Scanner): New.
19589
1d6412ad
AD
195902002-06-11 Akim Demaille <akim@epita.fr>
19591
19592 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19593 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19594 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19595 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19596 * src/reader.c (reader): Use it.
19597
4cdb01db
AD
195982002-06-11 Akim Demaille <akim@epita.fr>
19599
19600 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19601 Adjust all callers.
19602 (scanner_last_string_free): New.
19603
44995b2e
AD
196042002-06-11 Akim Demaille <akim@epita.fr>
19605
19606 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19607 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19608 (last_string, YY_OBS_FREE): New.
19609 Use them when returning an ID.
19610
e9955c83
AD
196112002-06-11 Akim Demaille <akim@epita.fr>
19612
19613 Have Bison grammars parsed by a Bison grammar.
19614
19615 * src/reader.c, src/reader.h (prologue_augment): New.
19616 * src/reader.c (copy_definition): Remove.
19617
19618 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19619 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19620 (grammar_current_rule_prec_set, grammar_current_rule_check)
19621 (grammar_current_rule_symbol_append)
19622 (grammar_current_rule_action_append): Export.
19623 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19624 (symbol_list_action_append): Remove.
19625 Hook the routines from reader.
19626 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19627 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19628
19629 * src/reader.c (read_declarations): Remove, unused.
19630
19631 * src/parse-gram.y: Handle the epilogue.
19632 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19633 (grammar_start_symbol_set): this.
19634 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19635 * src/reader.c (readgram): Remove, unused.
19636 (reader): Adjust to insert eoftoken and axiom where appropriate.
19637
19638 * src/reader.c (copy_dollar): Replace with...
19639 * src/scan-gram.h (handle_dollar): this.
19640 * src/parse-gram.y: Remove `%thong'.
19641
19642 * src/reader.c (copy_at): Replace with...
19643 * src/scan-gram.h (handle_at): this.
19644
19645 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19646 New.
19647
19648 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19649 time being.
19650
19651 * src/reader.h, src/reader.c (grammar_rule_end): New.
19652
19653 * src/parse.y (current_type, current_class): New.
19654 Implement `%nterm', `%token' support.
19655 Merge `%term' into `%token'.
19656 (string_as_id): New.
19657 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19658 type name.
19659
19660 * src/parse-gram.y: Be sure to handle properly the beginning of
19661 rules.
19662
19663 * src/parse-gram.y: Handle %type.
19664 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19665
19666 * src/parse-gram.y: More directives support.
19667 * src/options.c: No longer handle source directives.
19668
19669 * src/parse-gram.y: Fix %output.
19670
19671 * src/parse-gram.y: Handle %union.
19672 Use the prologue locations.
19673 * src/reader.c (parse_union_decl): Remove.
19674
19675 * src/reader.h, src/reader.c (epilogue_set): New.
19676 * src/parse-gram.y: Use it.
19677
19678 * data/bison.simple, data/bison.c++: b4_stype is now either not
19679 defined, then default to int, or to the contents of %union,
19680 without `union' itself.
19681 Adjust.
19682 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19683
19684 * src/output.c (actions_output): Don't output braces, as they are
19685 already handled by the scanner.
19686
19687 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19688 characters to themselves.
19689
19690 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19691 that the epilogue has a proper #line.
19692
19693 * src/parse-gram.y: Handle precedence/associativity.
19694
19695 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19696 a terminal.
19697 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19698 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19699 at all to define terminals that cannot be emitted.
19700
19701 * src/scan-gram.l: Escape M4 characters.
19702
19703 * src/scan-gram.l: Working properly with escapes in user
19704 strings/characters.
19705
19706 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19707 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19708 grammar.
19709 Use more modest sizes, as for the time being the parser does not
19710 release memory, and therefore the process swallows a huge amount
19711 of memory.
19712
19713 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19714 stricter %token grammar.
19715
19716 * src/symtab.h (associativity): Add `undef_assoc'.
19717 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19718 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19719
19720 * tests/regression.at (Invalid %directive): Remove, as it is now
19721 meaningless.
19722 (Invalid inputs): Adjust to the new error messages.
19723 (Token definitions): The new grammar doesn't allow too many
19724 eccentricities.
19725
19726 * src/lex.h, src/lex.c: Remove.
19727 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19728 (copy_character, copy_string2, copy_string, copy_identifier)
19729 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19730 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19731 (parse_action): Remove.
19732 * po/POTFILES.in: Adjust.
19733
2e047461
AD
197342002-06-11 Akim Demaille <akim@epita.fr>
19735
cd05d13c 19736 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
19737 rule's action member: return the action as a string.
19738 Don't require `rule_length' as an argument: compute it.
19739 (grammar_current_rule_symbol_append)
19740 (grammar_current_rule_action_append): New, eved out from
19741 (readgram): here.
19742 Remove `action_flag', `rulelength', unused now.
19743
9af3fbce
AD
197442002-06-11 Akim Demaille <akim@epita.fr>
19745
19746 * src/reader.c (grammar_current_rule_prec_set).
19747 (grammar_current_rule_check): New, eved out from...
19748 (readgram): here.
19749 Remove `xaction', `first_rhs': useless.
19750 * tests/input.at (Type clashes): New.
19751 * tests/existing.at (GNU Cim Grammar): Adjust.
19752
1485e106
AD
197532002-06-11 Akim Demaille <akim@epita.fr>
19754
19755 * src/reader.c (grammar_midrule_action): New, Eved out from
19756 (readgram): here.
19757
da4160c3
AD
197582002-06-11 Akim Demaille <akim@epita.fr>
19759
19760 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19761 New.
19762 (readgram): Use them as replacement of inlined code, crule and
19763 crule1.
19764
f6d0f937
AD
197652002-06-11 Akim Demaille <akim@epita.fr>
19766
19767 * src/reader.c (grammar_end, grammar_symbol_append): New.
19768 (readgram): Use them.
19769 Make the use of `p' as local as possible.
19770
69078d4b
AD
197712002-06-10 Akim Demaille <akim@epita.fr>
19772
19773 GCJ's parser requires the tokens to be defined before the prologue.
19774
19775 * data/bison.simple: Output the token definition before the user's
19776 prologue.
19777 * tests/regression.at (Braces parsing, Duplicate string)
19778 (Mixing %token styles): Check the output from bison.
19779 (Early token definitions): New.
19780
5e424082
AD
197812002-06-10 Akim Demaille <akim@epita.fr>
19782
19783 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19784 assigning twice the same user number to a token, so that we can
19785 use it in...
19786 * src/lex.c (lex): here.
19787 Also use `symbol_class_set' instead of hand written code.
19788 * src/reader.c (parse_assoc_decl): Likewise.
19789
44536b35
AD
197902002-06-10 Akim Demaille <akim@epita.fr>
19791
19792 * src/symtab.c, src/symtab.c (symbol_class_set)
19793 (symbol_user_token_number_set): New.
19794 * src/reader.c (parse_token_decl): Use them.
19795 Use a switch instead of ifs.
19796 Use a single argument.
19797
8b9f2372
AD
197982002-06-10 Akim Demaille <akim@epita.fr>
19799
19800 Remove `%thong' support as it is undocumented, unused, duplicates
19801 `%token's job, and creates useless e-mail traffic with people who
19802 want to know what it is, why it is undocumented, unused, and
19803 duplicates `%token's job.
19804
19805 * src/reader.c (parse_thong_decl): Remove.
19806 * src/options.c (option_table): Remove "thong".
19807 * src/lex.h (tok_thong): Remove.
19808
3ae2b51f
AD
198092002-06-10 Akim Demaille <akim@epita.fr>
19810
19811 * src/symtab.c, src/symtab.c (symbol_type_set)
19812 (symbol_precedence_set): New.
19813 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19814 (value_components_used): Remove, unused.
19815
2f1afb73
AD
198162002-06-09 Akim Demaille <akim@epita.fr>
19817
19818 Move symbols handling code out of the reader.
19819
19820 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19821 (axiom): Move to...
19822 * src/symtab.h, src/symtab.c: here.
19823
19824 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19825 * src/reader.c (startval): Rename as...
19826 * src/symtab.h, src/symtab.c (startsymbol): this.
19827 * src/reader.c: Adjust.
19828
19829 * src/reader.c (symbol_check_defined, symbol_make_alias)
19830 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19831 (token_translations_init)
19832 Move to...
19833 * src/symtab.c: here.
19834 * src/reader.c (packsymbols): Move to...
19835 * src/symtab.h, src/symtab.c (symbols_pack): here.
19836 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19837 argument.
19838
e9bca3ad
AD
198392002-06-03 Akim Demaille <akim@epita.fr>
19840
19841 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19842 then statements.
19843
86eff183
AD
198442002-06-03 Akim Demaille <akim@epita.fr>
19845
19846 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19847 structs with non literals.
19848 * src/scan-skel.l: never-interactive.
19849 * src/conflicts.c (enum conflict_resolution_e): No trailing
19850 comma.
19851 * src/getargs.c (usage): Split long literal strings.
19852 Reported by Hans Aberg.
19853
717be197
AD
198542002-05-28 Akim Demaille <akim@epita.fr>
19855
19856 * data/bison.c++: Use C++ ostreams.
19857 (cdebug_): New member.
19858
670ddffd
AD
198592002-05-28 Akim Demaille <akim@epita.fr>
19860
19861 * src/output.c (output_skeleton): Be sure to allocate enough room
19862 for `/' _and_ for `\0' in full_skeleton.
19863
769b430f
AD
198642002-05-28 Akim Demaille <akim@epita.fr>
19865
19866 * data/bison.c++: Catch up with bison.simple:
19867 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19868 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19869 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19870 and popping traces.
19871
7067cb36
PH
198722002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19873
19874 * src/output.c (output_skeleton): Put an explicit path in front of
19875 the skeleton file name, rather than relying on the -I directory,
19876 to partially alleviate effects of having a skeleton file lying around
19877 in the current directory.
769b430f 19878
4a713ec2
PH
198792002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19880
769b430f 19881 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
19882 obstack_printf should be obstack_fgrow1.
19883
b408954b
AD
198842002-05-26 Akim Demaille <akim@epita.fr>
19885
19886 * src/state.h (state_t): `solved_conflicts' is a new member.
19887 * src/LR0.c (new_state): Set it to 0.
19888 * src/conflicts.h, src/conflicts.c (print_conflicts)
19889 (free_conflicts, solve_conflicts): Rename as...
19890 (conflicts_print, conflicts_free, conflicts_solve): these.
19891 Adjust callers.
19892 * src/conflicts.c (enum conflict_resolution_e)
19893 (solved_conflicts_obstack): New, used by...
19894 (log_resolution): this.
19895 Adjust to attach the conflict resolution to each state.
19896 Complete the description with the precedence/associativity
19897 information.
19898 (resolve_sr_conflict): Adjust.
19899 * src/print.c (print_state): Output its solved_conflicts.
19900 * tests/conflicts.at (Unresolved SR Conflicts)
19901 (Solved SR Conflicts): Exercise --report=all.
19902
a49aecd5
AD
199032002-05-26 Akim Demaille <akim@epita.fr>
19904
19905 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19906 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19907 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19908 (token_number_t, item_number_as_token_number)
19909 (token_number_as_item_number, muscle_insert_token_number_table):
19910 Rename as...
19911 (symbol_number_t, item_number_as_symbol_number)
19912 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19913 these, since it is more appropriate.
19914
5504898e
AD
199152002-05-26 Akim Demaille <akim@epita.fr>
19916
19917 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19918 `Error:' lines.
19919 * data/bison.simple (yystos) [YYDEBUG]: New.
19920 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19921 error recovery.
19922 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19923
ec3bc396
AD
199242002-05-25 Akim Demaille <akim@epita.fr>
19925
19926 * doc/bison.texinfo (Debugging): Split into...
19927 (Tracing): this new section, its former contents, and...
19928 (Understanding): this new section.
19929 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19930 by...
19931 (report_flag): this.
19932 Adjust all dependencies.
19933 (report_args, report_types, report_argmatch): New.
19934 (usage, getargs): Report/support -r, --report.
19935 * src/options.h
19936 (struct option_table_struct): Rename as..,
19937 (struct option_table_s): this.
19938 Rename the `set_flag' member to `flag' to match with getopt_long's
19939 struct.
19940 * src/options.c (option_table): Split verbose into an entry for
19941 %verbose, and another for --verbose.
19942 Support --report/-r, so remove -r from the obsolete --raw.
19943 * src/print.c: Attach full item sets and lookaheads reports to
19944 report_flag instead of trace_flag.
19945 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19946
78df8250
PE
199472002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19948 and Paul Eggert <eggert@twinsun.com>
769b430f 19949
78df8250
PE
19950 * data/bison.simple (yyparse): Correct error handling to conform to
19951 POSIX and yacc. Specifically, after syntax error is discovered,
19952 do not reduce further before shifting the error token.
19953 Clean up the code a bit by removing the labels yyerrdefault,
19954 yyerrhandle, yyerrpop.
19955 * NEWS: Document the above.
19956
c0c9ea05
PH
199572002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19958
19959 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19960 type; it isn't always big enough, since it doesn't necessarily
19961 include non-terminals.
769b430f 19962 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
19963 the latter can be removed.
19964 (yy_token_number_type): Remove, only one use.
19965 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19966 don't use TokenNumberType as element type.
769b430f 19967
c0c9ea05
PH
19968 * tests/regression.at: Modify expected output to agree with change
19969 to yyr1 and yytranslate.
769b430f 19970
6390a83f
FK
199712002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
19972
19973 * src/reader.c (parse_action): Use copy_character instead of
19974 obstack_1grow.
19975
db7c8e9a
AD
199762002-05-13 Akim Demaille <akim@epita.fr>
19977
19978 * tests/regression.at (Token definitions): Prototype yylex and
19979 yyerror.
19980
fcc61800
PH
199812002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19982
158c687b 19983 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
19984 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
19985 32-bit arithmetic.
19986 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
19987
5683e9b2
AD
199882002-05-07 Akim Demaille <akim@epita.fr>
19989
19990 * tests/synclines.at: Be sure to prototype yylex and yyerror to
19991 avoid GCC warnings.
19992
0c2d3f4c
AD
199932002-05-07 Akim Demaille <akim@epita.fr>
19994
19995 Kill GCC warnings.
19996
19997 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
19998 over the RHS of each rule.
19999 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
20000 * src/state.h (state_t): Member `nitems' is unsigned short.
20001 * src/LR0.c (get_state): Adjust.
20002 * src/reader.c (packgram): Likewise.
20003 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
20004 `Type'.
20005 (muscle_insert_int_table): Remove, unused.
20006 (prepare_rules): Remove `max'.
20007
1565b720
AD
200082002-05-06 Akim Demaille <akim@epita.fr>
20009
20010 * src/closure.c (print_firsts): Display of the symbol tags.
20011 (bitmatrix_print): Move to...
20012 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
20013 here.
20014 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
20015
cfaee611
AD
200162002-05-06 Akim Demaille <akim@epita.fr>
20017
20018 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
20019 hash_do_for_each.
20020
458be8e0
AD
200212002-05-06 Akim Demaille <akim@epita.fr>
20022
20023 * src/LR0.c (new_state, get_state): Instead of using the global
20024 `kernel_size' and `kernel_base', have two new arguments:
20025 `core_size' and `core'.
20026 Adjust callers.
20027
a900a624
AD
200282002-05-06 Akim Demaille <akim@epita.fr>
20029
20030 * src/reader.c (packgram): No longer end `ritem' with a 0
20031 sentinel: it is not used.
20032
d4e7d3a1
AD
200332002-05-05 Akim Demaille <akim@epita.fr>
20034
20035 New experimental feature: display the lookaheads in the report and
20036 graph.
20037
20038 * src/print (print_core): When --trace-flag, display the rules
20039 lookaheads.
20040 * src/print_graph.c (print_core): Likewise.
20041 Swap the arguments.
20042 Adjust caller.
20043
39ceb25b
AD
200442002-05-05 Akim Demaille <akim@epita.fr>
20045
20046 * tests/torture.at (Many lookaheads): New test.
20047
5372019f
AD
200482002-05-05 Akim Demaille <akim@epita.fr>
20049
20050 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
20051 (GENERATE_MUSCLE_INSERT_TABLE): this.
20052 (output_int_table, output_unsigned_int_table, output_short_table)
20053 (output_token_number_table, output_item_number_table): Replace with...
20054 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
20055 (muscle_insert_short_table, muscle_insert_token_number_table)
20056 (muscle_insert_item_number_table): these.
20057 Adjust all callers.
20058 (prepare_tokens): Don't free `translations', since...
20059 * src/reader.h, src/reader.c (grammar_free): do it.
20060 Move to...
20061 * src/gram.h, src/gram.c (grammar_free): here.
20062 * data/bison.simple, data/bison.c++: b4_token_number_max is now
20063 b4_translate_max.
20064
5df5f6d5
AD
200652002-05-05 Akim Demaille <akim@epita.fr>
20066
20067 * src/output.c (output_unsigned_int_table): New.
20068 (prepare_rules): `i' is unsigned.
20069 `prhs', `rline', `r2' are unsigned int.
20070 Rename muscle `rhs_number_max' as `rhs_max'.
20071 Output muscles `prhs_max', `rline_max', and `r2_max'.
20072 Free rline and r1.
20073 * data/bison.simple, data/bison.c++: Adjust to use these muscles
20074 to compute types instead of constant types.
20075 * tests/regression.at (Web2c Actions): Adjust.
20076
b87f8b21
AD
200772002-05-04 Akim Demaille <akim@epita.fr>
20078
20079 * src/symtab.h (SALIAS, SUNDEF): Rename as...
20080 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
20081 Adjust dependencies.
20082 * src/output.c (token_definitions_output): Be sure not to output a
20083 `#define 'a'' when fed with `%token 'a' "a"'.
20084 * tests/regression.at (Token definitions): New.
20085
8bb936e4
PE
200862002-05-03 Paul Eggert <eggert@twinsun.com>
20087
20088 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
20089 for K&R C.
20090
200912002-05-03 gettextize <bug-gnu-gettext@gnu.org>
20092
20093 * Makefile.am (SUBDIRS): Remove intl.
20094 (EXTRA_DIST): Add config/config.rpath.
20095
53c71a12
AD
200962002-05-03 Akim Demaille <akim@epita.fr>
20097
20098 * data/bison.simple (m4_if): Don't output empty enums.
20099 And actually, output valid enum definitions :(.
20100
289dd0cf
AD
201012002-05-03 Akim Demaille <akim@epita.fr>
20102
20103 * configure.bat: Remove, completely obsolete.
20104 * Makefile.am (EXTRA_DIST): Adjust.
20105 Don't distribute config.rpath...
20106 * config/Makefile.am (EXTRA_DIST): Do it.
20107
db85e524
AD
201082002-05-03 Akim Demaille <akim@epita.fr>
20109
20110 * configure.in (GETTEXT_VERSION): New.
20111 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
20112
83ccf991
AD
201132002-05-03 Akim Demaille <akim@epita.fr>
20114
20115 * data/bison.simple (b4_token_enum): New.
20116 (b4_token_defines): Use it to output tokens both as #define and
20117 enums.
20118 Suggested by Paul Eggert.
20119 * src/output.c (token_definitions_output): Don't output spurious
20120 white spaces.
20121
1f418995
AD
201222002-05-03 Akim Demaille <akim@epita.fr>
20123
20124 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20125
45119f04
RA
201262002-05-02 Robert Anisko <robert@lrde.epita.fr>
20127
20128 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
20129 Update the stack class, give a try to deque as the default container.
20130
b2d52318
AD
201312002-05-02 Akim Demaille <akim@epita.fr>
20132
20133 * data/bison.simple (yyparse): Do not implement @$ = @1.
20134 (YYLLOC_DEFAULT): Adjust to do it.
20135 * doc/bison.texinfo (Location Default Action): Fix.
20136
3a8b4109
AD
201372002-05-02 Akim Demaille <akim@epita.fr>
20138
20139 * src/reader.c (parse_braces): Merge into...
20140 (parse_action): this.
20141
84614e13
AD
201422002-05-02 Akim Demaille <akim@epita.fr>
20143
20144 * configure.in (ALL_LINGUAS): Remove.
20145 * po/LINGUAS, hr.po: New.
20146
fdbcd8e2
AD
201472002-05-02 Akim Demaille <akim@epita.fr>
20148
20149 Remove the so called hairy (semantic) parsers.
20150
20151 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
20152 * src/gram.h, src/gram.c (semantic_parser): Remove.
20153 (rule_t): Remove the guard and guard_line members.
20154 * src/lex.h (token_t): remove tok_guard.
20155 * src/options.c (option_table): Remove %guard and %semantic_parser
20156 support.
20157 * src/output.c, src/output.h (guards_output): Remove.
20158 (prepare): Adjust.
20159 (token_definitions_output): Don't output the `T'
20160 tokens (???).
20161 (output_skeleton): Don't output the guards.
20162 * src/files.c, src/files.c (attrsfile): Remove.
20163 * src/reader.c (symbol_list): Remove the guard and guard_line
20164 members.
20165 Adjust dependencies.
20166 (parse_guard): Remove.
20167 * data/bison.hairy: Remove.
20168 * doc/bison.texinfo (Environment Variables): Remove occurrences of
20169 BISON_HAIRY.
20170
82b6cb3f
AD
201712002-05-02 Akim Demaille <akim@epita.fr>
20172
20173 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
20174 (parse_guard): Rename the formal argument `stack_offset' as
20175 `rule_length', which is more readable.
20176 Adjust callers.
20177 (copy_at, copy_dollar): Instead of outputting the hard coded
20178 values of $$, $n and so forth, output invocation to b4_lhs_value,
20179 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
20180 Note: this patch partially drops `semantic-parser' support: it
20181 always does `rule_length - n', where semantic parsers ought to
20182 always use `-n'.
82b6cb3f
AD
20183 * data/bison.simple, data/bison.c++ (b4_lhs_value)
20184 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
20185
6cbfbcc5
AD
201862002-05-02 Akim Demaille <akim@epita.fr>
20187
20188 * configure.in (AC_INIT): Bump to 1.49b.
20189 (AM_INIT_AUTOMAKE): Short invocation.
20190
b8548114
AD
201912002-05-02 Akim Demaille <akim@epita.fr>
20192
20193 Version 1.49a.
20194
c20cd1fa
AD
201952002-05-01 Akim Demaille <akim@epita.fr>
20196
20197 * src/skeleton.h: Remove.
20198
8a9566d4
AD
201992002-05-01 Akim Demaille <akim@epita.fr>
20200
20201 * src/skeleton.h: Fix the #endif.
20202 Reported by Magnus Fromreide.
20203
8c6d399a
PE
202042002-04-26 Paul Eggert <eggert@twinsun.com>
20205
20206 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
20207 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 20208 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 20209
2b7ed18a
RA
202102002-04-25 Robert Anisko <robert@lrde.epita.fr>
20211
20212 * src/scan-skel.l: Postprocess quadrigraphs.
20213
20214 * src/reader.c (copy_character): New function, used to output
20215 single characters while replacing `[' and `]' with quadrigraphs, to
20216 avoid troubles with M4 quotes.
20217 (copy_comment): Output characters with copy_character.
20218 (read_additionnal_code): Likewise.
20219 (copy_string2): Likewise.
20220 (copy_definition): Likewise.
20221
20222 * tests/calc.at: Exercise M4 quoting.
20223
34a89c50
AD
202242002-04-25 Akim Demaille <akim@epita.fr>
20225
20226 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
20227 between `!' and the command.
20228 Reported by Paul Eggert.
20229
0dd1580a
RA
202302002-04-24 Robert Anisko <robert@lrde.epita.fr>
20231
20232 * tests/calc.at: Exercise prologue splitting.
20233
20234 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
20235 `b4_post_prologue' instead of `b4_prologue'.
20236
20237 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
20238 muscles.
20239 (output): Free pre_prologue_obstack and post_prologue_obstack.
20240 * src/files.h, src/files.c (attrs_obstack): Remove.
20241 (pre_prologue_obstack, post_prologue_obstack): New.
20242 * src/reader.c (copy_definition): Add a parameter to specify the
20243 obstack to fill, instead of using attrs_obstack unconditionally.
20244 (read_declarations): Pass pre_prologue_obstack to copy_definition if
20245 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
20246
83c1796f
PE
202472002-04-23 Paul Eggert <eggert@twinsun.com>
20248
20249 * data/bison.simple: Remove unnecessary commentary and white
20250 space differences from 1_29-branch.
20251 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
20252
20253 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
20254 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
20255 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
20256 constructors or destructors.
20257
20258 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
20259
1207eeac
AD
202602002-04-23 Akim Demaille <akim@epita.fr>
20261
20262 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
20263 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
20264 location with columns.
20265 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
20266 All reported by Paul Eggert.
20267
78ab8f67
AD
202682002-04-22 Akim Demaille <akim@epita.fr>
20269
20270 * src/reduce.c (dump_grammar): Move to...
20271 * src/gram.h, src/gram.c (grammar_dump): here.
20272 Be sure to separate long item numbers.
20273 Don't read the members of a rule's prec if its nil.
20274
133c20e2
AD
202752002-04-22 Akim Demaille <akim@epita.fr>
20276
20277 * src/output.c (table_size, table_grow): New.
20278 (MAXTABLE): Remove, replace uses with table_size.
20279 (pack_vector): Instead of dying when the table is too big, grow it.
20280
9515e8a7
AD
202812002-04-22 Akim Demaille <akim@epita.fr>
20282
20283 * data/bison.simple (yyr1): Its type is that of a token number.
20284 * data/bison.c++ (r1_): Likewise.
20285 * tests/regression.at (Web2c Actions): Adjust.
20286
23c5a174
AD
202872002-04-22 Akim Demaille <akim@epita.fr>
20288
20289 * src/reader.c (token_translations_init): 256 is now the default
20290 value for the error token, i.e., it will be assigned another
20291 number if the user assigned 256 to one of her tokens.
20292 (reader): Don't force 256 to error.
20293 * doc/bison.texinfo (Symbols): Adjust.
20294 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
20295 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
20296 etc. instead of 10, 20, 30 (which was used to `jump' over error
20297 (256) and undefined (2)).
20298
5fbb0954
AD
202992002-04-22 Akim Demaille <akim@epita.fr>
20300
20301 Propagate more token_number_t.
20302
20303 * src/gram.h (token_number_as_item_number)
20304 (item_number_as_token_number): New.
20305 * src/output.c (GENERATE_OUTPUT_TABLE): New.
20306 Use it to create output_item_number_table and
20307 output_token_number_table.
20308 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
20309 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
20310 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
20311 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
20312
4f940944
AD
203132002-04-22 Akim Demaille <akim@epita.fr>
20314
20315 * src/output.h, src/output.c (get_lines_number): Remove.
20316
3ded9a63
AD
203172002-04-19 Akim Demaille <akim@epita.fr>
20318
20319 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
20320 as Lex/Flex'.
20321 (Debugging): More details about enabling the debugging features.
20322 (Table of Symbols): Describe $$, $n, @$, and @n.
20323 Suggested by Tim Josling.
20324
e0c471a9
AD
203252002-04-19 Akim Demaille <akim@epita.fr>
20326
20327 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
20328
fecc10cd
AD
203292002-04-10 Akim Demaille <akim@epita.fr>
20330
20331 * src/system.h: Rely on HAVE_LIMITS_H.
20332 Suggested by Paul Eggert.
20333
51dec47b
AD
203342002-04-09 Akim Demaille <akim@epita.fr>
20335
20336 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
20337 full stderr, and strip it according to the bison options, instead
20338 of composing the error message from different bits.
20339 This makes it easier to check for several error messages.
20340 Adjust all the invocations.
20341 Add an invocation exercising the error token.
20342 Add an invocation demonstrating a stupid error message.
20343 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
20344 Adjust the tests.
20345 Error message are for stderr, not stdout.
20346
007a50a4
AD
203472002-04-09 Akim Demaille <akim@epita.fr>
20348
20349 * src/gram.h, src/gram.c (error_token_number): Remove, use
20350 errtoken->number.
20351 * src/reader.c (reader): Don't specify the user token number (2)
20352 for $undefined, as it uselessly prevents using it.
20353 * src/gram.h (token_number_t): Move to...
20354 * src/symtab.h: here.
20355 (state_t.number): Is a token_number_t.
20356 * src/print.c, src/reader.c: Use undeftoken->number instead of
20357 hard coded 2.
20358 (Even though this 2 is not the same as above: the number of the
20359 undeftoken remains being 2, it is its user token number which
20360 might not be 2).
20361 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
20362 `user_token_number_max'.
20363 Output `undef_token_number'.
20364 * data/bison.simple, data/bison.c++: Use them.
20365 Be sure to map invalid yylex return values to
20366 `undef_token_number'. This saves us from gratuitous SEGV.
20367
20368 * tests/conflicts.at (Solved SR Conflicts)
20369 (Unresolved SR Conflicts): Adjust.
20370 * tests/regression.at (Web2c Actions): Adjust.
20371
06446ccf
AD
203722002-04-08 Akim Demaille <akim@epita.fr>
20373
20374 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
20375 Adding #line.
20376 Remove the duplicate `typedefs'.
20377 (RhsNumberType): Fix the declaration and various other typos.
20378 Use __ofile__.
20379 * data/bison.simple: Use __ofile__.
20380 * src/scan-skel.l: Handle __ofile__.
20381
62a3e4f0
AD
203822002-04-08 Akim Demaille <akim@epita.fr>
20383
20384 * src/gram.h (item_number_t): New, the type of item numbers in
20385 RITEM. Note that it must be able to code symbol numbers as
20386 positive number, and the negation of rule numbers as negative
20387 numbers.
20388 Adjust all dependencies (pretty many).
20389 * src/reduce.c (rule): Remove this `short *' pointer: use
20390 item_number_t.
20391 * src/system.h (MINSHORT, MAXSHORT): Remove.
20392 Include `limits.h'.
20393 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
20394 (shortcpy): Remove.
20395 (MAXTABLE): Move to...
20396 * src/output.c (MAXTABLE): here.
20397 (prepare_rules): Use output_int_table to output rhs.
20398 * data/bison.simple, data/bison.c++: Adjust.
20399 * tests/torture.at (Big triangle): Move the limit from 254 to
20400 500.
20401 * tests/regression.at (Web2c Actions): Ajust.
20402
20403 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
20404 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
20405 passes, but produces negative #line number, once fixed, GCC is
20406 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
20407 C), it passes.
20408 * src/state.h (state_h): Code input lines on ints, not shorts.
20409
bb88b0fc
AD
204102002-04-08 Akim Demaille <akim@epita.fr>
20411
20412 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
20413 and then the grammar.
20414
9a636f47
AD
204152002-04-08 Akim Demaille <akim@epita.fr>
20416
20417 * src/system.h: No longer using strndup.
20418
680e8701
AD
204192002-04-07 Akim Demaille <akim@epita.fr>
20420
20421 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20422 * src/output.c (output_table_data): Return the longest number.
20423 (prepare_tokens): Output `token_number_max').
20424 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20425 New.
20426 Use them to define yy_token_number_type/TokenNumberType.
20427 Use this type for yytranslate.
20428 * tests/torture.at (Big triangle): Push the limit from 124 to
20429 253.
20430 * tests/regression.at (Web2c Actions): Adjust.
20431
817e9f41
AD
204322002-04-07 Akim Demaille <akim@epita.fr>
20433
20434 * tests/torture.at (Big triangle): New.
20435 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20436 * tests/existing.at: here.
20437
5123689b
AD
204382002-04-07 Akim Demaille <akim@epita.fr>
20439
20440 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20441 nritems.
20442 Adjust dependencies.
20443
f3849179
AD
204442002-04-07 Akim Demaille <akim@epita.fr>
20445
20446 * src/reader.c: Normalize increments to prefix form.
20447
bd02036a
AD
204482002-04-07 Akim Demaille <akim@epita.fr>
20449
20450 * src/reader.c, symtab.c: Remove debugging code.
20451
db8837cb
AD
204522002-04-07 Akim Demaille <akim@epita.fr>
20453
20454 Rename all the `bucket's as `symbol_t'.
20455
20456 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20457 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20458 * src/symtab.c, src/symtab.h (bucket): Rename as...
20459 (symbol_t): this.
20460 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20461 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20462 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20463 (buckets_new, buckets_free, buckets_do): Rename as...
20464 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20465 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20466 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20467 (symbols_new, symbols_free, symbols_do): these.
20468
72a23c97
AD
204692002-04-07 Akim Demaille <akim@epita.fr>
20470
20471 Use lib/hash for the symbol table.
20472
20473 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20474 EOF.
20475 * src/lex.c (lex): Set the `number' member of new terminals.
20476 * src/reader.c (bucket_check_defined, bucket_make_alias)
20477 (bucket_check_alias_consistence, bucket_translation): New.
20478 (reader, grammar_free, readgram, token_translations_init)
20479 (packsymbols): Adjust.
20480 (reader): Number the predefined tokens.
20481 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20482 for predefined tokens.
20483 * src/symtab.h (bucket): Remove all the hash table related
20484 members.
20485 * src/symtab.c (symtab): Replace by...
20486 (bucket_table): this.
20487 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20488 (buckets_new, buckets_do): New.
20489
280a38c3
AD
204902002-04-07 Akim Demaille <akim@epita.fr>
20491
20492 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20493 (start_symbol, max_user_token_number, semantic_parser)
20494 (error_token_number): Initialize.
20495 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20496 Initialize.
20497 (reader): Don't.
20498 (errtoken, eoftoken, undeftoken, axiom): Extern.
20499
03b31c0c
AD
205002002-04-07 Akim Demaille <akim@epita.fr>
20501
20502 * src/gram.h (rule_s): prec and precsym are now pointers
20503 to the bucket giving the priority/associativity.
20504 Member `associativity' removed: useless.
20505 * src/reduce.c, src/conflicts.c: Adjust.
20506
8b3df748
AD
205072002-04-07 Akim Demaille <akim@epita.fr>
20508
20509 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20510 Properly escape the symbols' TAG when outputting them.
20511
e601aa1d
AD
205122002-04-07 Akim Demaille <akim@epita.fr>
20513
20514 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20515
b0299a2e
AD
205162002-04-07 Akim Demaille <akim@epita.fr>
20517
20518 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20519 (LArule): this, which is an array to rule_t*.
20520 * src/print.c, src/conflicts.c: Adjust.
20521
d7e1f00c
AD
205222002-04-07 Akim Demaille <akim@epita.fr>
20523
20524 * src/gram.h (rule_t): Rename `number' as `user_number'.
20525 `number' is a new member.
20526 Adjust dependencies.
20527 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20528
cc9305dd
AD
205292002-04-07 Akim Demaille <akim@epita.fr>
20530
20531 As a result of the previous patch, it is no longer needed
20532 to reorder ritem itself.
20533
20534 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20535
b0940840
AD
205362002-04-07 Akim Demaille <akim@epita.fr>
20537
20538 Be sure never to walk through RITEMS, but use only data related to
20539 the rules themselves. RITEMS should be banished.
20540
20541 * src/output.c (output_token_translations): Rename as...
20542 (prepare_tokens): this.
20543 In addition to `translate', prepare the muscles `tname' and
20544 `toknum', which were handled by...
20545 (output_rule_data): this.
20546 Remove, and move the remainder of its outputs into...
20547 (prepare_rules): this new routines, which also merges content from
20548 (output_gram): this.
20549 (prepare_rules): Be sure never to walk through RITEMS.
20550 (output_stos): Rename as...
20551 (prepare_stos): this.
20552 (output): Always invoke prepare_states, after all, just don't use it
20553 in the output if you don't need it.
20554
643a5994
AD
205552002-04-07 Akim Demaille <akim@epita.fr>
20556
20557 * src/LR0.c (new_state): Display `nstates' as the name of the
20558 newly created state.
20559 Adjust to initialize first_state and last_state if needed.
20560 Be sure to distinguish the initial from the final state.
20561 (new_states): Create the itemset of the initial state, and use
20562 new_state.
20563 * src/closure.c (closure): Now that the initial state has its
20564 items properly set, there is no need for a special case when
20565 creating `ruleset'.
20566
20567 As a result, now the rule 0, reducing to $axiom, is visible in the
20568 outputs. Adjust the test suite.
20569
20570 * tests/conflicts.at (Solved SR Conflicts)
20571 (Unresolved SR Conflicts): Adjust.
20572 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20573 * tests/conflicts.at (S/R in initial): New.
20574
b4c4ccc2
AD
205752002-04-07 Akim Demaille <akim@epita.fr>
20576
20577 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20578 the RHS of the rules.
20579 * src/output.c (output_gram): Likewise.
20580
bba97eb2
AD
205812002-04-07 Akim Demaille <akim@epita.fr>
20582
20583 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20584 bucket.
20585 Adjust all dependencies.
20586 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20587 `number' of the buckets too.
20588 * src/gram.h: Include `symtab.h'.
20589 (associativity): Move to...
20590 * src/symtab.h: here.
20591 No longer include `gram.h'.
20592
c3b407f4
AD
205932002-04-07 Akim Demaille <akim@epita.fr>
20594
20595 * src/gram.h, src/gram.c (rules_rhs_length): New.
20596 (ritem_longest_rhs): Use it.
20597 * src/gram.h (rule_t): `number' is a new member.
20598 * src/reader.c (packgram): Set it.
20599 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20600 the end of `rules', and count them out of `nrules'.
20601 (reduce_output, dump_grammar): Adjust.
20602 * src/print.c (print_grammar): It is no longer needed to check for
20603 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20604 * tests/reduce.at (Reduced Automaton): New test.
20605
11652ab3
AD
206062002-04-07 Akim Demaille <akim@epita.fr>
20607
20608 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20609 lacking `+ 1' to nrules, Bison reported as useless a token if it
20610 was used solely to set the precedence of the last rule...
20611
26b23c1a
AD
206122002-04-07 Akim Demaille <akim@epita.fr>
20613
20614 * data/bison.c++, data/bison.simple: Don't output the current file
20615 name in #line, to avoid useless diffs between two identical
20616 outputs under different names.
20617
18bcecb0
AD
206182002-04-07 Akim Demaille <akim@epita.fr>
20619
20620 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20621 Normalize loops to using `< nrules + 1', not `<= nrules'.
20622
fa770c86
AD
206232002-04-07 Akim Demaille <akim@epita.fr>
20624
20625 * TODO: Update.
20626
d9b739c3
AD
206272002-04-07 Akim Demaille <akim@epita.fr>
20628
20629 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20630 bucket.value as bucket.number.
20631
99013900
AD
206322002-04-07 Akim Demaille <akim@epita.fr>
20633
20634 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20635 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20636 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20637 RHS, instead of being an index in RITEMS.
20638
e966383b
PE
206392002-04-04 Paul Eggert <eggert@twinsun.com>
20640
20641 * doc/bison.texinfo: Update copyright date.
20642 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20643 (Symbols): Warn about running Bison in one character set,
20644 but compiling and/or running in an incompatible one.
20645 Warn about character code 256, too.
20646
206472002-04-03 Paul Eggert <eggert@twinsun.com>
20648
20649 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20650 YYERROR_VERBOSE is nonzero, not whether it is defined.
20651
20652 Merge changes from bison-1_29-branch.
c307773e 20653
8d6c48b9
PE
206542002-03-20 Paul Eggert <eggert@twinsun.com>
20655
20656 Merge fixes from Debian bison_1.34-1.diff.
20657
20658 * configure.in (AC_PREREQ): 2.53.
20659
e53c6322
AD
206602002-03-20 Akim Demaille <akim@epita.fr>
20661
20662 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20663
9ffbeca7
PE
206642002-03-19 Paul Eggert <eggert@twinsun.com>
20665
21db0b2a
PE
20666 * src/bison.simple (YYCOPY): New macro.
20667 (YYSTACK_RELOCATE): Use it.
20668 Remove Type arg; no longer needed. All callers changed.
20669 (yymemcpy): Remove; no longer needed.
20670
9ffbeca7
PE
20671 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20672 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20673
642cb8f8
AD
206742002-03-19 Akim Demaille <akim@epita.fr>
20675
20676 Test and fix the #line outputs.
20677
20678 * tests/atlocal.at (GCC): New.
20679 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 20680 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
20681 (Action synch line, Epilogue synch line): New tests.
20682 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20683 * data/bison.simple, data/bison.c++: Use it.
20684
3c31a486
AD
206852002-03-19 Akim Demaille <akim@epita.fr>
20686
20687 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20688 (Solved SR Conflicts, %expect not enough, %expect right)
20689 (%expect too much): Move to...
20690 * tests/conflicts.at: this new file.
20691
0d8bed56
AD
206922002-03-19 Akim Demaille <akim@epita.fr>
20693
20694 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20695 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20696 that we can move to enums for instance.
20697 * src/output.c (token_definitions_output): Output a list of
20698 `token-name, token-number' instead of the #define.
20699 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20700
9208d17f
AD
207012002-03-14 Akim Demaille <akim@epita.fr>
20702
20703 Use Gettext 0.11.1.
20704
af27eacb
RA
207052002-03-09 Robert Anisko <robert@lrde.epita.fr>
20706
20707 * data/bison.c++: Make the user able to add members to the generated
20708 parser by subclassing.
20709
9101a310
RA
207102002-03-05 Robert Anisko <robert@lrde.epita.fr>
20711
20712 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20713 a character.
20714 Reported by Nicolas Tisserand and Nicolas Burrus.
20715
fff9bf0b
RA
207162002-03-04 Robert Anisko <robert@lrde.epita.fr>
20717
20718 * src/reader.c: Warn about lacking semi-colons, do not complain.
20719
64dba31e
RA
207202002-03-04 Robert Anisko <robert@lrde.epita.fr>
20721
20722 * data/bison.c++: Remove a debug line.
20723
374f5a14
RA
207242002-03-04 Robert Anisko <robert@lrde.epita.fr>
20725
20726 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20727 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20728 provide a default implementation.
20729
bfcf1f3a
AD
207302002-03-04 Akim Demaille <akim@epita.fr>
20731
20732 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20733 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20734 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20735 * tests/semantic.at (Parsing Guards): Similarly.
20736 * src/reader.at (readgram): Complain if the last rule is not ended
20737 with a semi-colon.
20738
65ccf9fc
AD
207392002-03-04 Akim Demaille <akim@epita.fr>
20740
20741 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20742 * src/closure.c: here.
20743 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20744 RTC.
20745 * src/warshall.h, src/warshall.c: Remove.
20746 * tests/sets.at (Broken Closure): Adjust.
20747
d0039cbc
AD
207482002-03-04 Akim Demaille <akim@epita.fr>
20749
20750 * src/output.c (output_skeleton): tempdir is const.
20751 bytes_read is unused.
20752
345cea78
AD
207532002-03-04 Akim Demaille <akim@epita.fr>
20754
20755 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20756 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20757 Update.
20758 From Michael Hayes.
20759
564801f7
AD
207602002-03-04 Akim Demaille <akim@epita.fr>
20761
20762 * src/closure.c (closure): `r' is unused.
20763
e5352bc7
AD
207642002-03-04 Akim Demaille <akim@epita.fr>
20765
20766 * tests/sets.at (Broken Closure): Add the ending `;'.
20767 * src/reader.at (readgram): Complain if a rule is not ended with a
20768 semi-colon.
20769
914feea9
AD
207702002-03-04 Akim Demaille <akim@epita.fr>
20771
20772 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20773 (count_sr_conflicts): Use bitset_count.
20774 * src/reduce.c (inaccessable_symbols): Ditto.
20775 (bits_size): Remove.
20776 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20777
f0250de6
AD
207782002-03-04 Akim Demaille <akim@epita.fr>
20779
20780 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20781 * src/reduce.c: Remove the `bitset_zero's following the
20782 `bitset_create's, as now it is performed by the latter.
20783
ef017502
AD
207842002-03-04 Akim Demaille <akim@epita.fr>
20785
20786 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20787 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20788 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20789 latest sources from Michael.
20790
76514394
AD
207912002-03-04 Akim Demaille <akim@epita.fr>
20792
20793 * src/output.c (output): Don't free the grammar.
20794 * src/reader.c (grammar_free): New.
20795 * src/main.c (main): Call it and don't free symtab here.
20796
55024580
AD
207972002-03-04 Akim Demaille <akim@epita.fr>
20798
20799 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20800 before returning.
20801 Reported by Benoit Perrot.
20802
f9abaa2c
AD
208032002-03-04 Akim Demaille <akim@epita.fr>
20804
20805 Use bitset operations when possible, not loops over bits.
20806
20807 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20808 bitset_or.
20809 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20810 * src/reduce.c (useless_nonterminals): Formatting changes.
20811 * src/warshall.c (TC): Use bitset_or.
20812
0e721e75
AD
208132002-03-04 Akim Demaille <akim@epita.fr>
20814
20815 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20816 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20817 Ditto.
20818
0fb1ffb1
AD
208192002-03-04 Akim Demaille <akim@epita.fr>
20820
20821 * src/lalr.c (F): Now a bitset*.
20822 Adjust all dependencies.
20823
b86796bf
AD
208242002-03-04 Akim Demaille <akim@epita.fr>
20825
20826 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20827 Adjust all dependencies.
20828
602bbf31
AD
208292002-03-04 Akim Demaille <akim@epita.fr>
20830
20831 * src/L0.c, src/LR0.h (nstates): Be size_t.
20832 Adjust comparisons (signed vs unsigned).
20833 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20834 bitset*.
20835 Adjust all dependencies.
20836
d8a0245c
AD
208372002-03-04 Akim Demaille <akim@epita.fr>
20838
20839 * src/closure.c (firsts): Now, also a bitset.
20840 Adjust all dependencies.
20841 (varsetsize): Remove, now unused.
20842 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20843
34ba9743
AD
208442002-03-04 Akim Demaille <akim@epita.fr>
20845
20846 * src/print.c: Convert to use bitset.h, not hand coded iterations
20847 over ints.
20848
ed86e78c
AD
208492002-03-04 Akim Demaille <akim@epita.fr>
20850
20851 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20852
dfdb1797
AD
208532002-03-04 Akim Demaille <akim@epita.fr>
20854
20855 * src/closure.c (ruleset): Be a bitset.
20856 (rulesetsize): Remove.
20857
7086e707
AD
208582002-03-04 Akim Demaille <akim@epita.fr>
20859
20860 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20861 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20862 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20863 * src/closure.c (fderives): Be an array of bitsets.
20864
98254360
RA
208652002-02-28 Robert Anisko <robert@lrde.epita.fr>
20866
20867 * data/bison.c++: Merge the two generated headers. Insert a copyright
20868 notice in each output file.
20869
a75c057f
AD
208702002-02-28 Akim Demaille <akim@epita.fr>
20871
20872 * data/bison.c++: Copy the prologue of bison.simple to fetch
20873 useful M4 definitions, such as b4_header_guard.
20874
06b00abc
AD
208752002-02-25 Akim Demaille <akim@epita.fr>
20876
20877 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
20878 translator friendly scheme for the bgr
20879 copyright notice.
06b00abc 20880
70e7d534
AD
208812002-02-25 Akim Demaille <akim@epita.fr>
20882
20883 * src/output.c (header_output): Remove, now handled completely via
20884 M4.
20885
abe017f6
AD
208862002-02-25 Akim Demaille <akim@epita.fr>
20887
20888 * m4/m4.m4: New, from CVS Autoconf.
20889 * configure.in: Invoke it.
20890 * src/output.c (output_skeleton): Use its result instead of the
20891 hard coded name.
20892
381fb12e
AD
208932002-02-25 Akim Demaille <akim@epita.fr>
20894
20895 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20896 Fileutils 4.1.5.
20897 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20898 * src/output.c (output_skeleton): Use mkstemp to create a real
20899 temporary file.
20900 Move the filling of `skeleton' and its muscle to...
20901 (prepare): here.
20902 (output): Move the definition of the prologue muscle to...
20903 (prepare): here.
20904 * src/system.h (DEFAULT_TMPDIR): New.
20905
6f38107f
PE
209062002-02-14 Paul Eggert <eggert@twinsun.com>
20907
20908 Remove the support for C++ namespace cleanliness; it was
20909 causing more problems than it was curing, since it didn't work
20910 properly on some nonstandard C++ compilers. This can wait
20911 for a proper C++ parser.
20912
20913 * NEWS: Document this.
20914 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20915 of C++, as it's treated like C now.
20916 * src/bison.simple (YYSTD): Remove.
20917 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20918 Treat C++ just like Standard C instead of trying to support
20919 namespace cleanliness.
20920
80cce3da
AD
209212002-02-14 Akim Demaille <akim@epita.fr>
20922
20923 * tests/regression.at (else): Adjust to Andreas' change.
20924
842e8679
AD
209252002-02-14 Akim Demaille <akim@epita.fr>
20926
20927 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20928
4bda3f10
AD
209292002-02-13 Andreas Schwab <schwab@suse.de>
20930
20931 * src/output.c (output_rule_data): Don't output NULL, it might
20932 not be defined yet.
20933
4162fa07 209342002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 20935
4162fa07
RA
20936 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20937 (Copyright notice): Update.
b418ecd8 20938
bd16a5dc
AD
209392002-02-11 Akim Demaille <akim@epita.fr>
20940
20941 * tests/regression.at (%nonassoc and eof): Don't include
20942 nonportable headers.
20943
8d69a1a3
RA
209442002-02-08 Robert Anisko <robert@lrde.epita.fr>
20945
20946 * data/bison.c++: Correct error recovery. Make the user able to
20947 initialize the starting location.
20948
9b2d0677
AD
209492002-02-07 Akim Demaille <akim@epita.fr>
20950
20951 * tests/input.at: New.
20952
69e2658b
RA
209532002-02-07 Robert Anisko <robert@lrde.epita.fr>
20954
20955 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 20956 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
20957 directives around tables only needed for debugging.
20958
4aacc3a7
RA
209592002-02-07 Robert Anisko <robert@lrde.epita.fr>
20960
20961 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20962 C++ parsers.
20963 (yy::b4_name::parse): Use print_.
20964
762a801e
RA
209652002-02-07 Robert Anisko <robert@lrde.epita.fr>
20966
20967 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20968
4bb2bc3f
RA
209692002-02-07 Robert Anisko <robert@lrde.epita.fr>
20970
20971 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
20972 C++ parsers.
20973 (yy::b4_name::parse): Build verbose error messages, and use error_.
20974
6b45a3ca
RA
209752002-02-06 Robert Anisko <robert@lrde.epita.fr>
20976
20977 * data/bison.c++: Fix m4 quoting in comments.
20978
50997c6e
RA
209792002-02-06 Robert Anisko <robert@lrde.epita.fr>
20980
20981 * data/bison.c++: Adjust the parser code. Fix some muscles that were
20982 not expanded by m4.
20983
3f3eed27
AD
209842002-02-05 Akim Demaille <akim@epita.fr>
20985
20986 * data/bison.c++: Adjust to the M4 back end.
20987 More is certainly needed.
20988
be2a1a68
AD
209892002-02-05 Akim Demaille <akim@epita.fr>
20990
20991 Give a try to M4 as a back end.
20992
20993 * lib/readpipe.c: New, from wdiff.
20994 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
20995 BISON_HAIRY.
20996 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
20997 specific values. Now it is m4 that performs the lookup.
20998 * src/parse-skel.y: Remove.
20999 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
21000 * src/output.c (actions_output, guards_output)
21001 (token_definitions_output): No longer keeps track of the output
21002 line number, hence remove the second argument.
21003 (guards_output): Check against the guard member of a rule, not the
21004 action member.
21005 Adjust callers.
21006 (output_skeleton): Don't look for the skeleton location, let m4 do
21007 that.
21008 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
21009 file will be used.
21010 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
21011 (prepare): Given that for the time being changesyntax is not
21012 usable in M4, rename the muscles using `-' to `_'.
21013 Define `defines_flag', `output_parser_name' and `output_header_name'.
21014 * src/output.h (actions_output, guards_output)
21015 (token_definitions_output): Adjust prototypes.
21016 * src/scan-skel.l: Instead of scanning the skeletons, it now
21017 processes the output of m4: `__oline__' and `#output'.
21018 * data/bison.simple: Adjust to be used by M4(sugar).
21019 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
21020 to date.
21021 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
21022 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
21023 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
21024 shamelessly stolen from CVS Autoconf.
21025
beda758b
AD
210262002-02-05 Akim Demaille <akim@epita.fr>
21027
21028 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
21029 * configure.in: Check for the declarations of free and malloc.
21030 * src/muscle_tab.c: Adjust.
21031
5ece6d43
AD
210322002-02-05 Akim Demaille <akim@epita.fr>
21033
21034 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
21035 which have no values.
21036
5bb18f9a
AD
210372002-02-05 Akim Demaille <akim@epita.fr>
21038
21039 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
21040 * data/: here.
21041
894dd62e
PE
210422002-01-29 Paul Eggert <eggert@twinsun.com>
21043
21044 * src/bison.simple (YYSIZE_T): Do not define merely because
21045 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
21046 On some platforms, <alloca.h> does not declare YYSTD (size_t).
21047
82841af7
AD
210482002-01-27 Akim Demaille <akim@epita.fr>
21049
21050 Fix `%nonassoc and eof'.
21051
21052 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
21053 which were not properly copied! Replace
21054 memcpy (res->errs, src->errs, src->nerrs);
21055 with
21056 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
21057 !!!
21058 * tests/regression.at (%nonassoc and eof): Adjust to newest
21059 Autotest: `.' is not in the PATH.
21060
318b76e9
AD
210612002-01-27 Akim Demaille <akim@epita.fr>
21062
21063 * tests/sets.at (AT_EXTRACT_SETS): New.
21064 (Nullable): Use it.
21065 (Firsts): New.
21066
30d2f3d5
AD
210672002-01-26 Akim Demaille <akim@epita.fr>
21068
21069 * tests/actions.at, tests/calc.at, tests/headers.at,
21070 * tests/torture.at: Adjust to the newest Autotest which no longer
21071 forces `.' in the PATH.
21072
30f8c395
AD
210732002-01-25 Akim Demaille <akim@epita.fr>
21074
21075 * tests/regression.at (%nonassoc and eof): New.
21076 Suggested by Robert Anisko.
21077
29ae55f1
AD
210782002-01-24 Akim Demaille <akim@epita.fr>
21079
21080 Bison dumps core when trying to complain about broken input files.
21081 Reported by Cris van Pelt.
21082
21083 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
21084 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
21085 into...
21086 (Invalid inputs): Strengthen: exercise parse_percent_token.
21087
2b548aa6
RA
210882002-01-24 Robert Anisko <robert.anisko@epita.fr>
21089
21090 * src/Makefile.am: Add bison.c++.
21091 * src/bison.c++: New skeleton.
21092
bb0146c2
AD
210932002-01-21 Paolo Bonzini <bonzini@gnu.org>
21094
21095 * po/it.po: New.
21096
bec30531
AD
210972002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
21098
21099 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
21100
fc6edc45
MA
211012002-01-20 Marc Autret <marc@gnu.org>
21102
21103 * src/files.c (compute_output_file_names): Fix
21104
5e5d5415
MA
211052002-01-20 Marc Autret <marc@gnu.org>
21106
21107 * tests/output.at: New test.
21108 * src/files.c (compute_base_names): Don't map extensions when
21109 the YACC flag is set, use defaults.
21110 Reported by Evgeny Stambulchik.
21111
44ea3fbd
MA
211122002-01-20 Marc Autret <marc@gnu.org>
21113
ba0fe3c7
PE
21114 * src/system.h: Need to define __attribute__ away for non-GCC
21115 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
21116 Suggested by Albert Chin-A-Young.
21117
338963d1
TVH
211182002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
21119
21120 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
21121 canonical definition.
21122 * src/system.h: Use the canonical definition for PARAMS (avoids
21123 a conflict with the macro from lib/hash.h).
21124
c57b2479
AD
211252002-01-11 Akim Demaille <akim@epita.fr>
21126
21127 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 21128 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 21129
b85810ae
AD
211302002-01-09 Akim Demaille <akim@epita.fr>
21131
21132 * src/files.c, src/files.h (output_infix): New.
21133 (tab_extension): Remove.
21134 (compute_base_names): Compute the former, drop the latter.
21135 * src/output.c (prepare): Insert the muscles `output-infix', and
21136 `output-suffix'.
21137 * src/parse-skel.y (string, string.1): New.
21138 (section.header): Use it.
21139 (section.yacc): Remove.
21140 (prefix): Remove too.
21141 * src/scan-skel.l: Adjust.
21142 * src/bison.simple, src/bison.hairy: Adjust.
21143
cae60122
AD
211442002-01-09 Akim Demaille <akim@epita.fr>
21145
21146 * configure.in (WERROR_CFLAGS): Compute it.
21147 * src/Makefile.am (CFLAGS): Pass it.
21148 * tests/atlocal.in (CFLAGS): Idem.
21149 * src/files.c: Fix a few warnings.
21150 (get_extension_index): Remove, unused.
21151
ae404801
AD
211522002-01-08 Akim Demaille <akim@epita.fr>
21153
21154 * src/getargs.c (AS_FILE_NAME): New.
21155 (getargs): Use it to convert DOSish file names.
21156 * src/files.c (base_name): Rename as full_base_name to avoid
21157 clashes with `base_name ()'.
21158 (filename_split): New.
21159 (compute_base_names): N-th rewrite, using filename_split.
21160
22312b71
AD
211612002-01-08 Akim Demaille <akim@epita.fr>
21162
21163 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
21164 New, stolen from the Fileutils 4.1.
21165 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21166 * configure.in: Check for the presence of memrchr, and of its
21167 prototype.
21168
a67cef01
TVH
211692002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
21170
21171 * lib/hash.h (__P): Added definition for this macro.
21172 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
21173 BUILT_SOURCES, to ensure they are generated first.
21174 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
21175 %error-verbose to allow bootstrapping with bison 1.30x.
21176
2b25d624
AD
211772002-01-06 Akim Demaille <akim@epita.fr>
21178
21179 * src/reader.c (parse_braces): Don't fetch the next char, the
21180 convention is to fetch on entry.
21181 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
21182 'switch' without a following semicolon.
21183 * tests/regression.at (braces parsing): New.
21184
3460813b
AD
211852002-01-06 Akim Demaille <akim@epita.fr>
21186
21187 Bison is dead wrong in its RR conflict reports.
21188
21189 * tests/torture.at (GNU Cim Grammar): New.
21190 * src/conflicts.c (count_rr_conflicts): Fix.
21191
73784c64
AD
211922002-01-06 Akim Demaille <akim@epita.fr>
21193
21194 Creating package.m4 from configure.ac causes too many problems.
21195
21196 * tests/Makefile.am (package.m4): Create it by hand,
21197 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
21198
25d81090
AD
211992002-01-06 Akim Demaille <akim@epita.fr>
21200
21201 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
21202 skeleton.h.
21203
a9b8959e
PE
212042002-01-04 Paul Eggert <eggert@twinsun.com>
21205
21206 * doc/bison.texinfo (Debugging):
21207 Remove YYSTDERR; it's no longer defined or used.
21208 Also, s/cstdio.h/cstdio/.
21209
25d81090
AD
212102002-01-03 Akim Demaille <akim@epita.fr>
21211
21212 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
21213
1109455c
AD
212142002-01-03 Akim Demaille <akim@epita.fr>
21215
21216 * src/parse-skel.y (process_skeleton): Don't bind the parser's
21217 tracing code to --trace, wait for a better --trace option, with
21218 args.
21219
7ea5e977
AD
212202002-01-03 Akim Demaille <akim@epita.fr>
21221
21222 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
21223 The ISO C++ standard is extremely clear about it: stderr is
21224 considered a macro, not a regular symbol (see table 94 `Header
21225 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
21226 Therefore std:: does not apply to it. It still does with fprintf.
21227 Also, s/cstdio.h/cstdio/.
21228
fab5b110
AD
212292002-01-03 Akim Demaille <akim@epita.fr>
21230
21231 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
21232 for non system headers.
21233
aed7fd9b
AD
212342002-01-02 Akim Demaille <akim@epita.fr>
21235
21236 Equip the skeleton chain with location tracking, runtime trace,
21237 pure parser and scanner.
21238
21239 * src/parse-skel.y: Request a pure parser, locations, and prefix
21240 renaming.
21241 (%union): Having several members with the same type does not help
21242 type mismatches, simplify.
21243 (YYPRINT, yyprint): New.
21244 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
21245 (skel_error): this.
21246 Handle locations.
21247 * src/scan-skel.l: Adjust to these changes.
21248 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
21249 (LOCATION_PRINT, skel_control_t): New.
21250
24fad99e
AD
212512001-12-30 Akim Demaille <akim@epita.fr>
21252
21253 * src/parse-skel.y: Get rid of the shift/reduce conflict:
21254 replace `gb' with BLANKS.
21255 * src/scan-skel.l: Adjust.
21256
a4b36db4
AD
212572001-12-30 Akim Demaille <akim@epita.fr>
21258
21259 * src/system.h: We don't need nor want bcopy.
21260 Throw away MS-DOS crap: we don't need getpid.
21261 * configure.in: We don't need strndup. It was even causing
21262 problems: because Flex includes the headers *before* us,
21263 _GNU_SOURCE is not defined by config.h, and therefore strndup was
21264 not visible.
21265 * lib/xstrndup.c: New.
21266 * src/scan-skel.l: Use it.
21267 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
21268 * src/parse-skel.y: Use %directives instead of #defines.
21269
1239777d
AD
212702001-12-30 Akim Demaille <akim@epita.fr>
21271
21272 * src/skeleton.h: New.
21273 * src/output.c (output_parser, output_master_parser): Remove, dead
21274 code.
21275 * src/output.h (get_lines_number, actions_output, guards_output)
21276 (token_definitions_output): Prototype them.
21277 * src/parse-skel.y: Add the license notice.
21278 Include output.h and skeleton.h.
21279 (process_skeleton): Returns void, and takes a single parameter.
21280 * src/scan-skel.l: Add the license notice.
21281 Include skeleton.h.
21282 Don't use %option yylineno: it seems that then Flex imagines
21283 REJECT has been used, and therefore it won't reallocate its
21284 buffers (which makes no other sense to me than a bug). It results
21285 in warnings for `unused: yy_flex_realloc'.
21286
9b3add5b
RA
212872001-12-30 Robert Anisko <robert.anisko@epita.fr>
21288
21289 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21290 (MUSCLE_INSERT_PREFIX): ...to there.
21291 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21292 (MUSCLE_INSERT_PREFIX): Move from here...
21293
21294 * src/bison.hairy: Add a section directive. Put braces around muscle
21295 names. This parser skeleton is still broken, but Bison should not
21296 choke on a bad muscle 'syntax'.
21297 * src/bison.simple: Add a section directive. Put braces around muscle
21298 names.
21299
21300 * src/files.h (strsuffix, stringappend): Add declarations.
21301 (tab_extension): Add declaration.
21302 (short_base_name): Add declaration.
21303
21304 * src/files.c (strsuffix, stringappend): No longer static. These
21305 functions are used in the skeleton parser.
21306 (tab_extension): New.
21307 (compute_base_names): Use the computations done in this function
fab5b110 21308 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
21309 names.
21310 (short_base_name): No longer static.
21311
21312 * src/output.c (output_skeleton): New.
21313 (output): Disable call to output_master_parser, and give a try to
21314 a new skeleton handling system.
21315 (guards_output, actions_output): No longer static.
21316 (token_definitions_output, get_lines_number): No longer static.
21317
21318 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
21319
fab5b110 21320 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
21321 parse-skel.y.
21322
21323 * src/parse-skel.y: New file.
21324 * src/scan-skel.l: New file.
21325
b5b61c61
AD
213262001-12-29 Akim Demaille <akim@epita.fr>
21327
21328 %name-prefix is broken.
21329
21330 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
21331 Adjust all dependencies.
21332 * tests/headers.at (export YYLTYPE): Strengthen this test: use
21333 %name-prefix.
21334
21335 Renaming yylval but not yylloc is not consistent. Now we do.
21336
21337 * src/bison.simple: Prefix yylloc if used.
21338 * doc/bison.texinfo (Decl Summary): Document that.
21339
8c9a50be
AD
213402001-12-29 Akim Demaille <akim@epita.fr>
21341
21342 * doc/bison.texinfo: Promote `%long-directive' over
21343 `%long_directive'.
21344 Remove all references to fixed-output-files, yacc is enough.
21345
d99361e6
AD
213462001-12-29 Akim Demaille <akim@epita.fr>
21347
21348 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
21349 user prologue. These are defaults.
21350 * tests/actions.at (Mid-rule actions): Make sure the user can
21351 define YYDEBUG and YYERROR_VERBOSE.
21352
b9cecb91
AD
213532001-12-29 Akim Demaille <akim@epita.fr>
21354
21355 * src/output.c (header_output): Don't forget to export YYLTYPE and
21356 yylloc.
21357 * tests/headers.at (export YYLTYPE): New, make sure it does.
21358 * tests/regression.at (%union and --defines, Invalid CPP headers):
21359 Move to...
21360 * tests/headers.at: here.
21361
aea13e97
AD
213622001-12-29 Akim Demaille <akim@epita.fr>
21363
21364 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
21365
931394cb
AD
213662001-12-29 Akim Demaille <akim@epita.fr>
21367
21368 * tests/actions.at (Mid-rule actions): Output on a single line
21369 instead of several.
21370
704a47c4
AD
213712001-12-29 Akim Demaille <akim@epita.fr>
21372
21373 * doc/bison.texinfo: Formatting changes.
21374
091e20bb
AD
213752001-12-29 Akim Demaille <akim@epita.fr>
21376
21377 Don't store the token defs in a muscle, just be ready to output it
21378 on command. Now possible via `symbols'. Fixes a memory leak.
21379
21380 * src/output.c (token_definitions_output): New.
21381 (output_parser, header_output): Use it.
21382 * src/reader.c (symbols_save): Remove.
21383
cce71710
AD
213842001-12-29 Akim Demaille <akim@epita.fr>
21385
21386 * src/bison.simple: Do not provide a default for YYSTYPE and
21387 YYLTYPE before the user's prologue. Otherwise it's hardly... a
21388 default.
21389
82c035a8
AD
213902001-12-29 Akim Demaille <akim@epita.fr>
21391
21392 Mid-rule actions are simply... ignored!
21393
21394 * src/reader.c (readgram): Be sure to attach mid-rule actions to
21395 the empty-rule associated to the dummy symbol, not to the host
21396 rule.
21397 * tests/actions.at (Mid-rule actions): New.
21398
8419d367
AD
213992001-12-29 Akim Demaille <akim@epita.fr>
21400
21401 Memory leak.
21402
21403 * src/reader.c (reader): Free grammar.
21404
375d5806
AD
214052001-12-29 Akim Demaille <akim@epita.fr>
21406
21407 Memory leak.
21408
21409 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
21410 since it allocates it for each state, although only one is needed.
21411 (allocate_storage): Do it here.
21412
f51cb8ff
AD
214132001-12-29 Akim Demaille <akim@epita.fr>
21414
21415 * src/options.h, src/options.c (create_long_option_table): Rename
21416 as...
21417 (long_option_table_new): this, with a clearer prototype.
21418 (percent_table): Remove, unused,
21419 * src/getargs.c (getargs): Adjust.
21420
29e88316
AD
214212001-12-29 Akim Demaille <akim@epita.fr>
21422
21423 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21424 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21425 as states.
21426
b9f71f19
AD
214272001-12-29 Akim Demaille <akim@epita.fr>
21428
21429 * src/lalr.c (build_relations): Rename `states' as `states1'.
21430 Sorry, I don't understand exactly what it is, no better name...
21431
1a2b5d37
AD
214322001-12-29 Akim Demaille <akim@epita.fr>
21433
21434 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21435 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21436 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21437 as rules.
21438
1cca533e
AD
214392001-12-29 Akim Demaille <akim@epita.fr>
21440
21441 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21442 ago.
21443
c03ae966
AD
214442001-12-29 Akim Demaille <akim@epita.fr>
21445
21446 * src/reader.c, src/reader.h (user_toknums): Remove.
21447 Adjust all users to use symbols[i]->user_token_number.
21448
5a670b1e
AD
214492001-12-29 Akim Demaille <akim@epita.fr>
21450
21451 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21452 Adjust all users to use symbols[i]->prec or ->assoc.
21453
ad949da9
AD
214542001-12-29 Akim Demaille <akim@epita.fr>
21455
21456 * src/reader.c, src/reader.h (tags): Remove.
21457 Adjust all users to use symbols[i]->tag.
21458
0e78e603
AD
214592001-12-29 Akim Demaille <akim@epita.fr>
21460
21461 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21462 and rule_table.
21463 * src/reader.c (packsymbols): Fill this table.
21464 Drop sprec.
21465 * src/conflicts.c (resolve_sr_conflict): Adjust.
21466 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21467 single table.
21468 Use symbols[i]->tag instead of tags[i].
21469
213e640e
AD
214702001-12-29 Akim Demaille <akim@epita.fr>
21471
21472 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21473 In addition, put a comment in there, to replace...
21474 * tests/regression.at (%union and C comments): Remove.
21475
e7b8bef1
AD
214762001-12-29 Akim Demaille <akim@epita.fr>
21477
21478 * tests/regression.at (Web2c Actions): Blindly move the actual
21479 output as expected output. The contents *seem* right to me, but I
21480 can't pretend reading perfectly parser tables... Nonetheless, all
21481 the other tests pass correctly, the table look OK, even though the
21482 presence of `$axiom' is to be noted: AFAICS it is useless (but
21483 harmless).
21484
b68e7744
AD
214852001-12-29 Akim Demaille <akim@epita.fr>
21486
21487 * src/reader.c (readgram): Don't add the rule 0 if there were no
21488 rules read. In other words, add it _after_ having performed
21489 grammar sanity checks.
21490 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21491
78d5bae9
AD
214922001-12-29 Akim Demaille <akim@epita.fr>
21493
21494 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21495 visible, and some states have now a different number.
21496
ff442794
AD
214972001-12-29 Akim Demaille <akim@epita.fr>
21498
21499 * src/reader.c (readgram): Bind the initial rule's lineno to that
21500 of the first rule.
21501 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21502 (Solved SR Conflicts): Adjust rule 0's line number.
21503
610ab194
AD
215042001-12-29 Akim Demaille <akim@epita.fr>
21505
21506 Fix the `GAWK Grammar' failure.
21507
21508 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21509 the reductions of the first state which was mistakenly confused
21510 with the final state because precisely final_state was initialized
21511 to 0.
21512 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21513 now noticed by Bison.
21514 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21515 have a reduction on $default.
21516
29d29c8f
AD
215172001-12-29 Akim Demaille <akim@epita.fr>
21518
21519 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21520 rule line numbers.
21521 * src/closure.c (print_closure): Likewise.
21522 * src/derives.c (print_derives): Likewise.
21523 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21524 now.
21525
7c6b64d0
AD
215262001-12-29 Akim Demaille <akim@epita.fr>
21527
21528 * src/lalr.c (lookaheads_print): New.
21529 (lalr): Call it when --trace-flag.
21530 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21531 are dumped.
21532
3d4daee3
AD
215332001-12-29 Akim Demaille <akim@epita.fr>
21534
21535 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21536 when walking through ritem, even via rule->rhs.
21537 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21538 (useful_production, useless_nonterminals): Likewise.
21539 (reduce_grammar_tables): Likewise, plus update nritems.
21540 * src/nullable.c (set_nullable): Likewise.
21541 * src/lalr.c (build_relations): Likewise.
21542 * tests/sets.at (Nullable): Adjust.
21543 Fortunately, now, the $axiom is no longer nullable.
21544
9e7f6bbd
AD
215452001-12-29 Akim Demaille <akim@epita.fr>
21546
21547 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21548 the 0-sentinel.
21549 * src/gram.c (ritem_longest_rhs): Likewise.
21550 * src/reduce.c (nonterminals_reduce): Likewise.
21551 * src/print_graph.c (print_graph): Likewise.
21552 * src/output.c (output_rule_data): Likewise.
21553 * src/nullable.c (set_nullable): Likewise.
21554
255ef638
AD
215552001-12-29 Akim Demaille <akim@epita.fr>
21556
21557 * src/output.c: Comment changes.
21558
0d8a7363
AD
215592001-12-27 Paul Eggert <eggert@twinsun.com>
21560
21561 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21562 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21563 Sparc, as they were causing more porting problems than the
21564 (minor) performance improvement was worth.
21565
21566 Also, catch up with 1.31's YYSTD.
21567
3db472b9
AD
215682001-12-27 Akim Demaille <akim@epita.fr>
21569
21570 * src/output.c (output_gram): Rely on nritems, not the
21571 0-sentinel. See below.
21572 Use -1 as separator, not 0.
21573 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21574 Rely on -1 as separator in yyrhs, instead of 0.
21575 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21576 twice `Now at end of input', therefore there are two lines less to
21577 expect.
21578
b365aa05
AD
215792001-12-27 Akim Demaille <akim@epita.fr>
21580
21581 * tests/regression.at (Unresolved SR Conflicts):
21582 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21583 below.
21584
30171f79
AD
215852001-12-27 Akim Demaille <akim@epita.fr>
21586
21587 * src/LR0.c (new_state): Recognize the final state by the fact it
21588 is reached by eoftoken.
21589 (insert_start_shifting_state, insert_eof_shifting_state)
21590 (insert_accepting_state, augment_automaton): Remove, since now
21591 these states are automatically computed from the initial state.
21592 (generate_states): Adjust.
21593 * src/print.c: When reporting a rule number to the user, substract
21594 1, so that the axiom rule is rule 0, and the first user rule is 1.
21595 * src/reduce.c: Likewise.
21596 * src/print_graph.c (print_core): For the time being, just as for
21597 the report, depend upon --trace-flags to dump the full set of
21598 items.
21599 * src/reader.c (readgram): Once the grammar read, insert the rule
21600 0: `$axiom: START-SYMBOL $'.
21601 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21602 number of the states has changed (the final state is no longer
21603 necessarily the last), catch up.
21604
75142d45
AD
216052001-12-27 Akim Demaille <akim@epita.fr>
21606
21607 Try to make the use of the eoftoken valid. Given that its value
21608 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21609 is used instead of > 0 where appropriate, (ii), depend upon nritems
21610 instead of the 0-sentinel.
21611
21612 * src/gram.h, src/gram.c (nritems): New.
21613 Expected to be duplication of nitems, but for the time being...
21614 * src/reader.c (packgram): Assert nritems and nitems are equal.
21615 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21616 * src/closure.c (print_closure, print_fderives): Likewise.
21617 * src/gram.c (ritem_print): Likewise.
21618 * src/print.c (print_core, print_grammar): Likewise.
21619 * src/print_graph.c: Likewise.
21620
b7c49edf
AD
216212001-12-27 Akim Demaille <akim@epita.fr>
21622
21623 * src/main.c (main): If there are complains after grammar
21624 reductions, then output the report anyway if requested, then die.
21625 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21626 * src/reader.c (eoftoken): New.
21627 (parse_token_decl): If the token being defined has value `0', it
21628 is the eoftoken.
21629 (packsymbols): No longer hack `tags' to insert `$' by hand.
21630 Be sure to preserve the value of the eoftoken.
21631 (reader): Make sure eoftoken is defined.
21632 Initialize nsyms to 0: now eoftoken is created just like the others.
21633 * src/print.c (print_grammar): Don't special case the eof token.
21634 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21635 lie anyway, albeit pleasant.
21636 * tests/calc.at: Exercise error messages with eoftoken.
21637 Change the grammar so that empty input is invalid.
21638 Adjust expectations.
21639 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21640
ec2da99f
AD
216412001-12-27 Akim Demaille <akim@epita.fr>
21642
21643 * configure.in: Check the protos of strchr ans strspn.
21644 Replace strchr if needed.
21645 * src/system.h: Provide the protos of strchr, strspn and memchr if
21646 missing.
21647 * lib/strchr.c: New.
21648 * src/reader.c (symbols_save): Use strchr.
21649
8adfa272
AD
216502001-12-27 Akim Demaille <akim@epita.fr>
21651
21652 * src/print.c, src/print_graph.c (escape): New.
21653 Use it to quote the TAGS outputs.
21654 * src/print_graph.c (print_state): Now errors are in red, and
21655 reductions in green.
21656 Prefer high to wide: output the state number on a line of its own.
21657
80dac38c
AD
216582001-12-27 Akim Demaille <akim@epita.fr>
21659
21660 * src/state.h, src/state.c (reductions_new): New.
21661 * src/LR0.c (set_state_table): Let all the states have a
21662 `reductions', even if reduced to 0.
21663 (save_reductions): Adjust.
21664 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21665 * src/print.c (print_reductions, print_actions): Adjust.
21666 * src/output.c (action_row): Adjust.
21667
2cec70b9
AD
216682001-12-27 Akim Demaille <akim@epita.fr>
21669
21670 * src/state.h, src/state.c (errs_new, errs_dup): New.
21671 * src/LR0.c (set_state_table): Let all the states have an errs,
21672 even if reduced to 0.
21673 * src/print.c (print_errs, print_reductions): Adjust.
21674 * src/output.c (output_actions, action_row): Adjust.
21675 * src/conflicts.c (resolve_sr_conflict): Adjust.
21676
13ca549a
AD
216772001-12-27 Akim Demaille <akim@epita.fr>
21678
21679 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21680
5092aba5
AD
216812001-12-27 Akim Demaille <akim@epita.fr>
21682
21683 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21684 * src/print.c: here.
21685 (lookaheadset, shiftset): New, used as additional storage by
21686 print_reductions.
21687 (print_results): Adjust.
21688 (print_shifts, print_gotos, print_errs): New, extracted from...
21689 (print_actions): here.
21690 * src/print_graph.c (print_actions): Remove dead code.
21691
11e2beca
AD
216922001-12-27 Akim Demaille <akim@epita.fr>
21693
21694 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21695 `$n' and `@n'.
21696
dac3c910
AD
216972001-12-27 Akim Demaille <akim@epita.fr>
21698
21699 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21700 (build_relations): Adjust.
21701
d0b0fefa
AD
217022001-12-27 Akim Demaille <akim@epita.fr>
21703
21704 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21705 duplication.
21706
adc8c848
AD
217072001-12-27 Akim Demaille <akim@epita.fr>
21708
21709 * src/reader.c (packgram): Catch nitems overflows.
21710
14d293ac
AD
217112001-12-27 Akim Demaille <akim@epita.fr>
21712
21713 * src/files.c, src/files.h (guard_obstack): Remove.
21714 * src/output.c (output): Adjust.
21715 * src/reader.c (parse_braces): New, factoring...
21716 (copy_action, copy_guard): these two which are renamed as...
21717 (parse_action, parse_guard): these.
21718 As a voluntary consequence, using braces around guards is now
21719 mandatory.
21720
f499b062
AD
217212001-12-27 Akim Demaille <akim@epita.fr>
21722
21723 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21724 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21725 members.
21726 (symbol_list_new): Adjust.
21727 (copy_action): action_line is the first line, not the last.
21728 (copy_guard): Just as for actions, store the `action' only, not
21729 the switch/case/break flesh.
21730 Don't parse the user action that might follow the guard, let...
21731 (readgram): do it, i.e., now, there can be an action after a
21732 guard.
21733 In other words the guard is just explicitly optional.
21734 (packgram): Adjust.
21735 * src/output.c (guards_output): New.
21736 (output_parser): Call it when needed.
21737 (output): Also free the guard and attrs obstacks.
21738 * src/files.c, src/files.h (obstack_save): Remove.
21739 (output_files): Remove.
21740 As a result, if one needs the former `.act' file, using an
21741 appropriate skeleton which requires actions and guards is now
21742 required.
21743 * src/main.c (main): Adjust.
21744 * tests/semantic.at: New.
21745 * tests/regression.at: Use `input.y' as input file name.
21746 Avoid 8+3 problems by requiring input.c when the test needs the
21747 parser.
21748
d945f5cd
AD
217492001-12-27 Akim Demaille <akim@epita.fr>
21750
21751 * src/reader.c (symbol_list_new): Be sure to initialize all the
21752 fields.
21753
d200e455
AD
217542001-12-27 Akim Demaille <akim@epita.fr>
21755
21756 All the hacks using a final pseudo state are now useless.
21757
21758 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21759 * src/lalr.c (nLA): New.
21760 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21761 instead of lookaheadsp from the pseudo state (nstate + 1).
21762
f9507c28
AD
217632001-12-27 Akim Demaille <akim@epita.fr>
21764
21765 * src/output.c (action_row, token_actions): Use a state_t instead
21766 of a integer, and nlookaheads instead of the following state's
21767 lookaheadsp.
21768
065fbd27
AD
217692001-12-27 Akim Demaille <akim@epita.fr>
21770
21771 * src/conflicts.c (log_resolution, flush_shift)
21772 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21773 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21774 (conflicts_print, print_reductions): Use a state_t instead of an
21775 integer when referring to a state.
21776 As much as possible, depend upon nlookaheads, instead of the
21777 `lookaheadsp' member of the following state (since lookaheads of
21778 successive states are successive, the difference between state n + 1
21779 and n served as the number of lookaheads for state n).
21780 * src/lalr.c (add_lookback_edge): Likewise.
21781 * src/print.c (print_core, print_actions, print_state)
21782 (print_results): Likewise.
21783 * src/print_graph.c (print_core, print_actions, print_state)
21784 (print_graph): Likewise.
21785 * src/conflicts.h: Adjust.
21786
1b177bd7
AD
217872001-12-27 Akim Demaille <akim@epita.fr>
21788
21789 * src/bison.hairy: Formatting/comment changes.
21790 ANSIfy.
21791 Remove `register' indications.
21792 Add plenty of `static'.
21793
7742ddeb
AD
217942001-12-27 Akim Demaille <akim@epita.fr>
21795
21796 * src/output.c (prepare): Drop the muscle `ntbase' which
21797 duplicates ntokens.
21798 * src/bison.simple: Formatting/comment changes.
21799 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21800 is an undocumented synonym.
21801
1fa14068
AD
218022001-12-22 Akim Demaille <akim@epita.fr>
21803
21804 * src/output.c (output_table_data): Change the prototype to use
21805 `int' for array ranges: some invocations do pass an int, not a
21806 short.
21807 Reported by Wayne Green.
21808
b9752825
AD
218092001-12-22 Akim Demaille <akim@epita.fr>
21810
21811 Some actions of web2c.y are improperly triggered.
21812 Reported by Mike Castle.
21813
21814 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21815 * tests/regression.at (Web2c): Rename as...
21816 (Web2c Report): this.
21817 (Web2c Actions): New.
21818
776209d6
AD
218192001-12-22 Akim Demaille <akim@epita.fr>
21820
21821 Reductions in web2c.y are improperly reported.
21822 Reported by Mike Castle.
21823
21824 * src/conflicts.c (print_reductions): Fix.
21825 * tests/regression.at (Web2c): New.
21826
275fc3ad
AD
218272001-12-18 Akim Demaille <akim@epita.fr>
21828
21829 Some host fail on `assert (!"foo")', which expands to
21830 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21831 Reported by Nelson Beebee.
21832
21833 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21834 `#define it_succeeded 0' and `assert (it_succeeded)'.
21835
897668ee
MA
218362001-12-17 Marc Autret <autret_m@epita.fr>
21837
21838 * src/bison.simple: Don't hard code the skeleton line and filename.
21839 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21840 New line counter 'skeleton_line' (skeleton-line muscle).
21841
ab3399e0
PE
218422001-12-17 Paul Eggert <eggert@twinsun.com>
21843
21844 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21845 YYDEBUG must be defined to a nonzero value.
21846
21847 * src/bison.simple (yytname): Do not assume that the user defines
21848 YYDEBUG to a properly parenthesized expression.
21849
3877f72b
AD
218502001-12-17 Akim Demaille <akim@epita.fr>
21851
21852 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21853 nlookaheads is a new member.
21854 Adjust all users.
21855 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21856 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21857 state.
776209d6 21858
331dbc1b
AD
218592001-12-17 Akim Demaille <akim@epita.fr>
21860
21861 * src/files.h, src/files.c (open_files, close_files): Remove.
21862 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21863 let...
21864 * src/reader.c (reader): Do it.
776209d6 21865
be750e4c
AD
218662001-12-17 Akim Demaille <akim@epita.fr>
21867
21868 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 21869
709ae8c6
AD
218702001-12-17 Akim Demaille <akim@epita.fr>
21871
21872 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21873 (flush_reduce): New.
21874 (resolve_sr_conflict): Adjust.
776209d6 21875
f87685c3
AD
218762001-12-17 Akim Demaille <akim@epita.fr>
21877
21878 * src/output.c (output_obstack): Be static and rename as...
21879 (format_obstack): this, to avoid any confusion with files.c's
21880 output_obstack.
21881 * src/reader.h (muscle_obstack): Move to...
21882 * src/output.h: here, since it's defined in output.c.
21883
837491d8
AD
218842001-12-17 Akim Demaille <akim@epita.fr>
21885
21886 * src/output.c (action_row, save_column, default_goto)
21887 (sort_actions, matching_state, pack_vector): Better variable
21888 locality.
21889
796d61fb
AD
218902001-12-17 Akim Demaille <akim@epita.fr>
21891
21892 * src/output.c: Various formatting changes.
776209d6 21893
64d15509
AD
218942001-12-17 Akim Demaille <akim@epita.fr>
21895
21896 * src/files.c (output_files): Free the output_obstack.
21897 * src/main.c (main): Call print and print_graph conditionally.
21898 * src/print.c (print): Work unconditionally.
21899 * src/print_graph.c (print_graph): Work unconditionally.
21900 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21901
fbc8ecb7
MA
219022001-12-16 Marc Autret <autret_m@epita.fr>
21903
21904 * src/output.c (actions_output): Fix. When we use %no-lines,
21905 there is one less line per action.
21906
f0440388
MA
219072001-12-16 Marc Autret <autret_m@epita.fr>
21908
21909 * src/bison.simple: Remove a useless #line directive.
21910 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21911 * src/output.c (get_lines_number): New.
776209d6 21912 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
21913 output muscles.
21914 Fix line numbering.
21915 (actions_output): Computes the number of lines taken by actions.
21916 (output_master_parser): Insert new skeleton which is the name of
21917 the output parser file name.
21918
a79986b8
MA
219192001-12-15 Marc Autret <autret_m@epita.fr>
21920
21921 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21922
4ec8e00f
MA
219232001-12-15 Marc Autret <autret_m@epita.fr>
21924
21925 * src/output.c (output_gram): Keep track of the hairy one.
21926
1a4648ff
AD
219272001-12-15 Akim Demaille <akim@epita.fr>
21928
21929 Make `make distcheck' work.
21930
21931 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21932 system.h which uses libgettext.h.
21933
9c2c67e6
AD
219342001-12-15 Akim Demaille <akim@epita.fr>
21935
21936 * src/nullable.c (set_nullable): Useless rules must be skipped,
21937 otherwise, since we range over their symbols, we might look at a
21938 nonterminal which no longer ``exists'', i.e., it is not counted in
21939 `nvars', hence we overflow our arrays.
21940
93ede233
AD
219412001-12-15 Akim Demaille <akim@epita.fr>
21942
21943 The header can also be produced directly, without any obstack!
21944 Yahoo!
21945
21946 * src/files.c, src/files.h (defines_obstack): Remove.
21947 (compute_header_macro): Global.
21948 (defines_obstack_save): Remove.
21949 * src/reader.c (parse_union_decl): No longer output to
21950 defines_obstack: its content can be found in the `stype' muscle
21951 anyway.
21952 (output_token_translations): Merge into...
21953 (symbols_output): this.
21954 Rename as...
21955 (symbols_save): this.
21956 (reader): Adjust.
21957 * src/output.c (header_output): New.
21958 (output): Call it.
21959
2666f928
AD
219602001-12-15 Akim Demaille <akim@epita.fr>
21961
21962 * src/reader.c (parse_union_decl): Instead of handling two obstack
21963 simultaneously, use one to define the `stype' muscle, and use the
21964 value of the latter to fill defines_obstack.
21965 (copy_comment): Remove.
21966 (copy_comment2): Work for a single obstack.
21967 Rename as...
21968 (copy_comment): this.
21969
428046f8
AD
219702001-12-15 Akim Demaille <akim@epita.fr>
21971
21972 * src/lex.c, src/lex.h (xgetc): No longer static.
21973 * src/reader.c (parse_union_decl): Revamp.
21974
ea52d706
AD
219752001-12-15 Akim Demaille <akim@epita.fr>
21976
21977 Still making progress in separating Bison into (i) input, (ii)
21978 process, (iii) output: now we can directly output the parser file
21979 without using table_obstack at all.
21980
21981 * src/files.c, src/files.h (table_obstack): Bye bye.
21982 (parser_file_name): New.
21983 * src/files.c (compute_output_file_names): Compute it.
21984 * src/output.c (actions_output, output_parser)
21985 (output_master_parser): To a file instead of an obstack.
21986
3f96f4dc
AD
219872001-12-15 Akim Demaille <akim@epita.fr>
21988
21989 Attach actions to rules, instead of pre-outputting them to
21990 actions_obstack.
21991
21992 * src/gram.h (rule_t): action and action_line are new members.
21993 * src/reader.c (symbol_list): Likewise.
21994 (copy_action): Save the actions within the rule.
21995 (packgram): Save them in rule_table.
21996 * src/output.c (actions_output): New.
21997 (output_parser): Use it on `%%actions'.
21998 (output_rule_data): Don't free rule_table.
21999 (output): Do it.
22000 (prepare): Don't save the `action' muscle.
22001 * src/bison.simple: s/%%action/%%actions/.
22002
51576fb3
AD
220032001-12-15 Akim Demaille <akim@epita.fr>
22004
22005 * src/reader.c (copy_action): When --yacc, don't append a `;'
22006 to the user action: let it fail if lacking.
dee049eb 22007 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 22008
2648a72d
AD
220092001-12-14 Akim Demaille <akim@epita.fr>
22010
22011 * src/lex.c (literalchar): Simply return the char you decoded, non
22012 longer mess around with obstacks and int pointers.
22013 Adjust all callers.
22014
92790e5b
AD
220152001-12-14 Akim Demaille <akim@epita.fr>
22016
22017 * src/lex.c (literalchar): Don't escape the special characters,
22018 just decode them, and keep them as char (before, eol was output as
22019 the 2 char string `\n' etc.).
22020 * src/output.c (output_rule_data): Use quotearg to output the
22021 token strings.
22022
927c1557
PE
220232001-12-13 Paul Eggert <eggert@twinsun.com>
22024
22025 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
22026 Do not infringe on the global user namespace when using C++.
22027 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
22028 All uses of `fprintf' and `stderr' changed.
22029
22030 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
22031
ed8e1f68
AD
220322001-12-13 Akim Demaille <akim@epita.fr>
22033
22034 The computation of nullable is broken: it doesn't handle empty
22035 RHS's properly.
22036
22037 * tests/torture.at (GNU AWK Grammar): New.
22038 * tests/sets.at (Nullable): New.
22039 * src/nullable.c (set_nullable): Instead of blindly looping over
22040 `ritems', loop over the rules, and then over their rhs's.
22041
22042 Work around Autotest bugs.
22043
22044 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
22045 frame, because Autotest understand lines starting with a `+' as
22046 traces from the shell. Then, they are not processed properly.
22047 Admittedly an Autotest bug, but we don't have time to wait for
22048 Autotest to catch up.
22049 * tests/regression.at (Broken Closure): Adjust to the new table
22050 frames.
22051 Move to...
22052 * tests/sets.at: here.
22053
cb581495
AD
220542001-12-13 Akim Demaille <akim@epita.fr>
22055
22056 * src/closure.c (closure): Use nrules instead of playing tricks
22057 with BITS_PER_WORD.
22058
2e729273
AD
220592001-12-13 Akim Demaille <akim@epita.fr>
22060
22061 * src/print.c (print_actions): Output the handling of `$' as the
22062 traces do: shifting the token EOF. Before EOF was treated as a
22063 nonterminal.
22064 * tests/regression.at: Adjust some tests.
22065 * src/print_graph.c (print_core): Complete the set of items via
22066 closure. The next-to-final and final states are still unsatisfying,
22067 but that's to be addressed elsewhere.
22068 No longer output the rule numbers, but do output the state number.
22069 A single loop for the shifts + gotos is enough, but picked a
22070 distinct color for each.
22071 (print_graph): Initialize and finalize closure.
22072
107f7dfb
AD
220732001-12-13 Akim Demaille <akim@epita.fr>
22074
22075 * src/reader.c (readgram): Remove dead code, an strip useless
22076 braces.
22077 (get_type): Remove, unused.
22078
9b53a24f
AD
220792001-12-12 Akim Demaille <akim@epita.fr>
22080
22081 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
22082 on that of lib/error.c.
22083
dbfb6dcd
AD
220842001-12-12 Akim Demaille <akim@epita.fr>
22085
22086 Some hosts don't like `/' in includes.
22087
22088 * src/system.h: Include libgettext.h without qualifying the path.
22089 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
22090 $(top_srcdir).
22091
c25fb648
MA
220922001-12-11 Marc Autret <autret_m@epita.fr>
22093
22094 * src/output.c (output_parser): Remove useless muscle.
22095
710ddc4f
MA
220962001-12-11 Marc Autret <autret_m@epita.fr>
22097
22098 * src/bison.simple: Remove #line just before %%epilogue. It
22099 is now handled in ...
22100 * src/reader.c (read_additionnal_code): Add the output of a
22101 #line for the epilogue.
22102
e83d80b8
MA
221032001-12-10 Marc Autret <autret_m@epita.fr>
22104
927c1557 22105 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
22106 replace precedent remove.
22107 * src/bison.simple: Remove #line before %%prologue because
22108 %%input-line is wrong at this time.
22109
971d5158
MA
221102001-12-10 Marc Autret <autret_m@epita.fr>
22111
22112 * src/reader.c (symbols_output): Clean up.
927c1557 22113 * src/output.c (output_gram, output): Clean up.
971d5158 22114
5edafffd
AD
221152001-12-10 Akim Demaille <akim@epita.fr>
22116
22117 * src/lalr.c (initialize_lookaheads): New. Extracted from...
22118 * src/LR0.c (set_state_table): here.
22119 * src/lalr.c (lalr): Call it.
22120
0279f8e9
AD
221212001-12-10 Akim Demaille <akim@epita.fr>
22122
22123 * src/state.h (shifts): Remove the `number' member: shifts are
22124 attached to state, hence no longer need to be labelled with a
22125 state number.
22126
190c4f5f
AD
221272001-12-10 Akim Demaille <akim@epita.fr>
22128
22129 Now that states have a complete set of members, the linked list of
22130 shifts is useless: just fill directly the state's shifts member.
22131
22132 * src/state.h (shifts): Remove the `next' member.
22133 * src/LR0.c (first_state, last_state): Remove.
22134 Adjust the callers.
22135 (augment_automaton): Don't look for the shifts that must be added
22136 a shift on EOF: it is those of the state we looked for! But now,
22137 since shifts are attached, it is no longer needed to looking
22138 merely by its id: its number.
22139
2a73b93d
AD
221402001-12-10 Akim Demaille <akim@epita.fr>
22141
22142 * src/LR0.c (augment_automaton): Better variable locality.
22143 Remove an impossible branch: if there is a state corresponding to
22144 the start symbol being shifted, then there is shift for the start
22145 symbol from the initial state.
22146
74392f6a
AD
221472001-12-10 Akim Demaille <akim@epita.fr>
22148
22149 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
22150 only when appropriate: when insert_start_shifting_state' is not
22151 invoked.
22152 * tests/regression.at (Rule Line Numbers): Adjust.
22153
37c82725
AD
221542001-12-10 Akim Demaille <akim@epita.fr>
22155
22156 * src/LR0.c (augment_automaton): Now that all states have shifts,
22157 merge the two cases addition shifts to the initial state.
22158
6a164e0c
AD
221592001-12-10 Akim Demaille <akim@epita.fr>
22160
22161 * src/lalr.c (set_state_table): Move to...
22162 * src/LR0.c: here.
22163 * src/lalr.c (lalr): Don't call it...
22164 * src/LR0.c (generate_states): do it.
22165 * src/LR0.h (first_state): Remove, only the table is used.
22166
7215de24
AD
221672001-12-10 Akim Demaille <akim@epita.fr>
22168
22169 * src/LR0.h (first_shift, first_reduction): Remove.
22170 * src/lalr.c: Don't use first_shift: find shifts through the
22171 states.
22172
80e25d4d
AD
221732001-12-10 Akim Demaille <akim@epita.fr>
22174
22175 * src/LR0.c: Attach shifts to states as soon as they are
22176 computed.
22177 * src/lalr.c (set_state_table): Instead of assigning shifts to
22178 state, just assert that the mapping was properly done.
22179
0ab3728b
AD
221802001-12-10 Akim Demaille <akim@epita.fr>
22181
22182 * src/LR0.c (insert_start_shift): Rename as...
22183 (insert_start_shifting_state): this.
22184 (insert_eof_shifting_state, insert_accepting_state): New.
22185 (augment_automaton): Adjust.
22186 Better locality of the variables.
22187 When looking if the start_symbol is shifted from the initial
22188 state, using `while (... symbol != start_symbol ...)' sounds
22189 better than `while (... symbol < start_symbol ...)': If fail
22190 to see how the order between symbols could be relevant!
22191
78af9bbc
AD
221922001-12-10 Akim Demaille <akim@epita.fr>
22193
22194 * src/getargs.h: Don't declare `spec_name_prefix' and
22195 `spec_file_prefix', declared by src/files.h.
22196 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
22197 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
22198 * src/output.c (prepare): Adjust.
22199 * src/reader.c (symbols_output): Likewise.
22200 * src/vmsgetargs.c: Vaguely adjust, but who cares?
22201
bdef2a41
AD
222022001-12-10 Akim Demaille <akim@epita.fr>
22203
22204 * src/muscle_tab.c (muscle_init): NULL is a better default than
22205 `"0"'.
22206
3735969c
AD
222072001-12-10 Akim Demaille <akim@epita.fr>
22208
22209 * src/reader.c (reader): Calling symbols_output once is enough.
22210
49701457
AD
222112001-12-10 Akim Demaille <akim@epita.fr>
22212
22213 Now that states have a complete set of members, the linked list of
22214 reductions is useless: just fill directly the state's reductions
22215 member.
22216
22217 * src/state.h (struct reductions): Remove member `number' and
22218 `next'.
22219 * src/LR0.c (first_reduction, last_reduction): Remove.
22220 (save_reductions): Don't link the new reductions, store them in
22221 this_state.
22222 * src/lalr.c (set_state_table): No need to attach reductions to
22223 states, it's already done.
22224 * src/output.c (output_actions): No longer free the shifts, then
22225 the reductions, then the states: free all the states and their
22226 members.
22227
0edad749
AD
222282001-12-10 Akim Demaille <akim@epita.fr>
22229
22230 * src/options.c (OPTN, DRTV, BOTH): New.
22231 (option_table): Use them.
22232
0edad749
AD
22233 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
22234 the job of system.h.
22235 * src/options.c: Don't include stdio.h and xalloc.h for the same
22236 reasons.
22237
5449dd0f
AD
222382001-12-10 Akim Demaille <akim@epita.fr>
22239
22240 * src/output.c (output, prepare): Make sure the values of the
22241 muscles `action' and `prologue' are 0-terminated.
22242
a870c567
AD
222432001-12-10 Akim Demaille <akim@epita.fr>
22244
22245 Clean up GCC warnings.
22246
22247 * src/reader.c (copy_action): `buf' is not used.
22248 (parse_skel_decl): Be static.
22249 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
22250 * src/options.h (create_long_option_table): Have a real prototype.
22251 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
22252 (hash_delete_at): Return const void *.
22253 Adjust casts to preserve the const.
22254
80df8768
AD
222552001-12-10 Akim Demaille <akim@epita.fr>
22256
22257 * configure.in: Require 2.52g.
22258 M4 is not needed, but AUTOM4TE is.
22259 * m4/m4.m4: Remove.
22260 * tests/Makefile.am: Adjust.
22261
f693ad14
AD
222622001-12-10 Akim Demaille <akim@epita.fr>
22263
22264 One structure for states is enough, even though theoretically
22265 there are LR(0) states and LALR(1) states.
22266
22267 * src/lalr.h (state_t): Remove.
22268 (state_table): Be state_t **, not state_t *.
22269 * src/state.h (core, CORE_ALLOC): Rename as...
22270 (state_t, STATE_ALLOC): this.
22271 Add the LALR(1) members: shifts, reductions, errs.
22272 * src/LR0.c (state_table): Rename as...
22273 (state_hash): this, to avoid name clashes with the global
22274 `state_table'.
22275 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
22276 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
22277
74ffbcb6
AD
222782001-12-10 Akim Demaille <akim@epita.fr>
22279
22280 Bison dumps core on bash.y.
22281 Reported by Pascal Bart.
22282
22283 * src/warshall.c (bitmatrix_print): New.
22284 (TC): Use it.
ba0fe3c7 22285 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
22286 j must be the outer loop.
22287 * tests/regression.at (Broken Closure): New.
22288
07708e19
AD
222892001-12-05 Akim Demaille <akim@epita.fr>
22290
22291 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
22292 its argument.
ba1ecc07 22293 Reported by Peter Hamorsky.
07708e19 22294
92b16366
AD
222952001-12-05 Akim Demaille <akim@epita.fr>
22296
22297 * src/conflicts.c (err_table): Remove.
22298 (resolve_sr_conflict): Adjust.
22299 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
22300 Rename as...
22301 (state_t.reductions, state_t.shifts): this.
22302
076ab033
AD
223032001-12-05 Akim Demaille <akim@epita.fr>
22304
22305 * src/reduce.c (reduce_grammar_tables): No longer disable the
22306 removal of useless rules via CPP but via `if (0)', so that the
22307 compiler still check the code is valid.
22308 For instance, it should have noticed `rline' no longer exists: use
22309 the `line' member of rule_t.
22310 * src/gram.c (dummy, rline): Remove, unused.
22311
3843c413
AD
223122001-12-05 Akim Demaille <akim@epita.fr>
22313
22314 * src/output.c (pack_vector): Use assert, not berror.
22315 * src/main.c (berror): Remove, unused.
22316
43168960
AD
223172001-12-05 Akim Demaille <akim@epita.fr>
22318
22319 New experimental feature: if --verbose --trace output all the
22320 items of a state, not only its kernel.
22321
22322 * src/print.c (print_core): If `trace_flag', then invoke closure
22323 before outputting the items of the state (print_core is no longer
22324 a correct name them).
22325 (print_results): Invoke new_closure/free_closure if needed.
22326
b2872512
AD
223272001-12-05 Akim Demaille <akim@epita.fr>
22328
22329 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
22330 * src/closure.c, src/closure.h (itemsetsize): Rename as...
22331 (nitemset): for consistency with the rest of the project.
22332
23cbcc6c
AD
223332001-12-05 Akim Demaille <akim@epita.fr>
22334
22335 * src/closure.c (print_closure): Improve.
22336 (closure): Use it for printing input and output.
22337
03ec521c
AD
223382001-12-05 Akim Demaille <akim@epita.fr>
22339
22340 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
22341 indexed by nonterminals.
22342
3a7456dd
AD
223432001-12-05 Akim Demaille <akim@epita.fr>
22344
22345 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
22346 what it was!).
22347 * src/warshall.h: Remove accidental duplication of the content.
22348
1cbcf2e7
AD
223492001-12-05 Akim Demaille <akim@epita.fr>
22350
22351 * src/closure.c (set_fderives): De-obfuscate.
22352
84182270
AD
223532001-12-05 Akim Demaille <akim@epita.fr>
22354
22355 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
22356
3f6f053c
AD
223572001-12-05 Akim Demaille <akim@epita.fr>
22358
22359 * src/closure.c (set_firsts): De-obfuscate.
22360
7a5350ba
AD
223612001-12-05 Akim Demaille <akim@epita.fr>
22362
22363 * src/output.c (action_row): De-obfuscate
22364 using the good o' techniques: arrays not pointers, variable
22365 locality, BITISSET, RESETBIT etc.
22366
d954473d
AD
223672001-12-05 Akim Demaille <akim@epita.fr>
22368
22369 Pessimize the code to simplify it: from now on, all the states
22370 have a valid SHIFTS, which NSHIFTS is possibly 0.
22371
22372 * src/LR0.c (shifts_new): Be global and move to..
22373 * src/state.c, src/state.h: here.
22374 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
22375 * src/print_graph: Adjust.
22376
9839bbe5
AD
223772001-12-05 Akim Demaille <akim@epita.fr>
22378
22379 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
22380 * src/conflicts.c: Use it.
22381 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
22382 incorrectly ``simplified''.
22383
9f136c07
AD
223842001-12-05 Akim Demaille <akim@epita.fr>
22385
22386 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
22387 using the good o' techniques: arrays not pointers, variable
22388 locality, BITISSET, RESETBIT etc.
22389
b608206e
AD
223902001-12-05 Akim Demaille <akim@epita.fr>
22391
22392 * src/state.h (SHIFT_SYMBOL): New.
22393 * src/conflicts.c: Use it to deobfuscate.
22394
52afa962
AD
223952001-12-05 Akim Demaille <akim@epita.fr>
22396
22397 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
22398 (print_reductions): De-obfuscate using the good o' techniques:
22399 arrays not pointers, variable locality, BITISSET.
22400
e74dc321
AD
224012001-12-05 Akim Demaille <akim@epita.fr>
22402
22403 * src/conflicts.c (print_reductions): Arrays, not pointers.
22404 Use BITISSET.
22405
768fca83
AD
224062001-12-05 Akim Demaille <akim@epita.fr>
22407
22408 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22409
a17e599f
AD
224102001-12-05 Akim Demaille <akim@epita.fr>
22411
22412 * src/conflicts.c (print_reductions): Improve variable locality.
22413
a04bc341
AD
224142001-12-05 Akim Demaille <akim@epita.fr>
22415
22416 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22417
c8ea038e
AD
224182001-12-05 Akim Demaille <akim@epita.fr>
22419
22420 * src/conflicts.c (print_reductions): Improve variable locality.
22421
aa2aab3c
AD
224222001-12-05 Akim Demaille <akim@epita.fr>
22423
22424 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22425 * src/lalr.c: Use them.
22426
b178c8cc
AD
224272001-12-05 Akim Demaille <akim@epita.fr>
22428
22429 * src/LR0.c (augment_automaton): Formatting changes.
22430 Better variable locality.
22431
f67d13aa
AD
224322001-12-05 Akim Demaille <akim@epita.fr>
22433
22434 * src/lalr.c (matrix_print): New.
22435 (transpose): Use it.
22436 Use arrays instead of pointers.
22437
c2713865
AD
224382001-12-05 Akim Demaille <akim@epita.fr>
22439
22440 * src/lalr.c (maxrhs): Move to...
22441 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22442 * src/lalr.c (build_relations): Adjust.
22443
9887c18a
AD
224442001-12-05 Akim Demaille <akim@epita.fr>
22445
22446 * src/lalr.c (transpose): Free the memory allocated to the
22447 argument, as it is replaced by the results by the unique caller.
22448 (build_relations): Merely invoke transpose: it handles the memory
22449 deallocation.
22450 Improve variable locality.
22451 Avoid variables used as mere abbreviations.
22452 (compute_lookaheads): Use arrays instead of pointers.
22453
4d4f699c
AD
224542001-12-05 Akim Demaille <akim@epita.fr>
22455
22456 * src/lalr.c (initialize_F): Improve variable locality.
22457 Avoid variables used as mere abbreviations.
22458
80a69750
AD
224592001-12-05 Akim Demaille <akim@epita.fr>
22460
22461 * src/derives.c (print_derives): Display the ruleno.
22462 * src/lalr.c (initialize_F, transpose): Better variable locality
22463 to improve readability.
22464 Avoid variables used as mere abbreviations.
22465
fe961097
AD
224662001-12-05 Akim Demaille <akim@epita.fr>
22467
22468 * src/lalr.c (traverse): Use arrays instead of pointers.
22469
e3e4e814
AD
224702001-12-05 Akim Demaille <akim@epita.fr>
22471
22472 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22473 the handling of squeue.
22474 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22475
630e182b
AD
224762001-12-05 Akim Demaille <akim@epita.fr>
22477
22478 Because useless nonterminals are now kept alive (instead of being
22479 `destroyed'), we now sometimes examine them, and store information
22480 related to them. Hence we need to know their number, and adjust
22481 memory allocations.
22482
22483 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22484 static.
22485 * src/LR0.c (allocate_itemsets): The memory allocated to
22486 `symbol_count' was used for two different purpose: once to count
22487 the number of occurrences of each symbol, and later reassigned to
22488 `shift_symbol', containing the symbol that can be shifted from a
22489 given state.
22490 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22491 only, and...
22492 (new_itemsets): Allocate `shift_symbol' here.
22493 (allocate_itemsets): symbol_count includes useless nonterminals.
22494 Make room for them.
22495 (free_storage): Use `free', not `XFREE', for pointers that cannot
22496 be null.
22497
81b51460
AD
224982001-12-05 Akim Demaille <akim@epita.fr>
22499
22500 * src/nullable.c (set_nullable): Deobfuscate the handling of
22501 ritem.
22502 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22503
3067fbef
AD
225042001-12-05 Akim Demaille <akim@epita.fr>
22505
22506 * src/gram.c, src/gram.h (ritem_print): New.
22507 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22508 (This useless function was defined only to work around VMS linkers
22509 that can't handle compilation units with variables only).
22510 * src/reduce.c (dump_grammar): Use it to trace the construction of
22511 ritem.
22512
c2bea5f9
PE
225132001-12-04 Paul Eggert <eggert@twinsun.com>
22514
7d27c823
PE
22515 * src/bison.simple (union yyalloc): Change member names
22516 to be the same as the stack names.
22517 (yyparse): yyptr is now union yyalloc *, not char *.
22518 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22519 and may generate better code on some machines.
c2bea5f9
PE
22520 (yystpcpy): Use prototype if __STDC__ is defined, not just
22521 if __cplusplus is defined.
35687a9d 22522
2c8a9dfa
AD
225232001-11-30 Akim Demaille <akim@epita.fr>
22524
22525 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22526 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22527 Gettext doesn't compile cleanly, and dies with -Werror.
22528 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22529 Include WARNING_CFLAGS here.
22530 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22531 before being defined.
22532
f4e421e6
AD
225332001-11-27 Paul Eggert <eggert@twinsun.com>
22534
22535 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22536 First arg is int, not unsigned.
22537 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22538 (SIZE_MAX, UINT_MAX): New macros.
22539 (quotearg_n_options): Abort if N is negative.
22540 Avoid overflow check on hosts where size_t is 64 bits and int
22541 is 32 bits, as overflow is impossible there.
22542 Fix off-by-one typo that caused unnecessary reallocation.
22543
7093d0f5
AD
225442001-11-29 Paul Eggert <eggert@twinsun.com>
22545
22546 Name space cleanup in generated parser.
22547
22548 * doc/bison.texinfo (Bison Parser): Discuss system headers
22549 and their effect on the user name space.
22550
22551 * src/bison.simple:
22552 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22553 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22554 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22555
22556 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22557 on user names when possible.
22558
22559 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22560 Simplify test for whather <alloca.h> exists.
22561
22562 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22563
22564 (<stdio.h>): Include if YYDEBUG.
22565
22566 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22567 ! defined (yyoverflow) && ! defined (yymemcpy).
22568
22569 (yymemcpy, yyparse): Rename local variables as needed so that
22570 they all begin with 'yy'.
22571
22572 (yystrlen, yystpcpy): New functions.
22573
22574 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22575 All uses changed.
22576
22577 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22578 instead of relying on string.h functions. Use YYSTACK_ALLOC
22579 and YYSTACK_FREE instead of malloc and free.
22580
fd51e5ff
AD
225812001-11-30 Akim Demaille <akim@epita.fr>
22582
22583 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22584 before their first uses.
22585 (YYBISON, YYPURE): Move to the top of the output.
22586
7d13ff5f
AD
225872001-11-30 Akim Demaille <akim@epita.fr>
22588
22589 * tests/reduce.at (Useless Nonterminals): Fix.
22590
892a3995
AD
225912001-11-30 Akim Demaille <akim@epita.fr>
22592
22593 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22594 if body instead of `;' to pacify GCC's warnings.
22595
68f1e3ed
AD
225962001-11-30 Akim Demaille <akim@epita.fr>
22597
22598 Instead of mapping the LHS of unused rules to -1, keep the LHS
22599 valid, but flag the rules as invalid.
22600
22601 * src/gram.h (rule_t): `useful' is a new member.
22602 * src/print.c (print_grammar): Adjust.
22603 * src/derives.c (set_derives): Likewise.
22604 * src/reader.c (packgram, reduce_output): Likewise.
22605 * src/reduce.c (reduce_grammar_tables): Likewise.
22606 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22607
d2d1b42b
AD
226082001-11-30 Akim Demaille <akim@epita.fr>
22609
22610 * src/reduce.c (reduce_output): Formatting changes.
22611 * src/print.c (print_results, print_grammar): Likewise.
22612 * tests/regression.at (Rule Line Numbers)
22613 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22614
760b53a8
AD
226152001-11-30 Akim Demaille <akim@epita.fr>
22616
22617 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22618 useless nonterminals, move them at the end of the symbol arrays.
22619 (reduce_output): Adjust.
22620 * tests/reduce.at (Useless Nonterminals): Adjust.
22621
00238958
AD
226222001-11-30 Akim Demaille <akim@epita.fr>
22623
22624 * src/reduce.c: Various comment/formatting changes.
22625 (nonterminals_reduce): New, extracted from...
22626 (reduce_grammar_tables): here.
22627 (reduce_grammar): Call nonterminals_reduce.
22628
396452de
PE
226292001-11-29 Paul Eggert <eggert@twinsun.com>
22630
22631 * src/bison.simple (YYSTACK_REALLOC): Remove.
22632 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22633 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22634 New macros.
22635 (union yyalloc): New type.
22636 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22637 an arbitrary restriction on hosts where size_t is wider than int.
22638
22639 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22640 a parser stack overflow. Allocate just one block of memory for all
22641 three stacks, instead of allocating three blocks; this typically is
22642 faster and reduces fragmentation.
22643
22644 Do not limit the number of items in the stack to a value that fits
22645 in 'int', as this is an arbitrary limit on hosts with 64-bit
22646 size_t and 32-bit int.
22647
147e184c
MA
226482001-11-29 Marc Autret <autret_m@epita.fr>
22649
22650 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22651 of defining YYERROR_VERBOSE.
22652 [AT_DATA]: $4 is now out of C declarations in the prologue.
22653
426cf563
MA
226542001-11-28 Marc Autret <autret_m@epita.fr>
22655
22656 * src/reader.c (parse_dquoted_param): New.
22657 (parse_skel_decl): Use it.
22658 * src/lex.h: Add its prototype.
22659 * src/lex.c (literalchar): Become not static.
22660
c7925b99
MA
226612001-11-28 Marc Autret <autret_m@epita.fr>
22662
22663 * src/output.h: And put its extern declaration here.
22664 * src/output.c (error_verbose): Define here.
22665 (prepare): Echo name modification.
22666 * src/getargs.h: Clean its extern declaration.
22667 * src/getargs.c (error_verbose_flag): Remove.
22668 (getargs): Remove case 'e'.
22669 * src/options.c (option_table): 'error-verbose' is now seen as simple
22670 percent option.
22671 Include output.h.
22672
22673 * src/reader.c (read_declarations): Remove case tok_include.
22674 (parse_include_decl): Remove.
22675 * src/lex.h (token_t): Remove tok_include.
22676 * src/options.c (option_table): 'include' is now a simple command line
22677 option.
22678
5b5d1929
MA
226792001-11-28 Marc Autret <autret_m@epita.fr>
22680
22681 * src/bison.simple: Adjust muscle names.
22682 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22683 * src/output.c (prepare): s/_/-/ for the muscles names.
22684 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22685
8850be4b
MA
226862001-11-28 Marc Autret <autret_m@epita.fr>
22687
22688 * src/bison.simple: Fix debug.
22689 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22690
4a38e613
AD
226912001-11-28 Akim Demaille <akim@epita.fr>
22692
22693 * src/LR0.c (shifts_new): New.
22694 (save_shifts, insert_start_shift, augment_automaton): Use it.
22695
4b35e1c1
AD
226962001-11-28 Akim Demaille <akim@epita.fr>
22697
22698 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22699 keep ruleno only.
22700
d2b04478
AD
227012001-11-28 Akim Demaille <akim@epita.fr>
22702
22703 * src/closure.c (closure): Instead of looping over word in array
22704 then bits in words, loop over bits in array.
22705
2c4c30aa
AD
227062001-11-28 Akim Demaille <akim@epita.fr>
22707
22708 * src/closure.c (closure): No longer optimize the special case
22709 where all the bits of `ruleset[r]' are set to 0, to make the code
22710 clearer.
22711
576890b7
AD
227122001-11-28 Akim Demaille <akim@epita.fr>
22713
22714 * src/closure.c (closure): `r' and `c' are new variables, used to
22715 de-obfuscate accesses to RULESET and CORE.
22716
cb487d7d
AD
227172001-11-28 Akim Demaille <akim@epita.fr>
22718
22719 * src/reduce.c (reduce_print): Use ngettext.
22720 (dump_grammar): Improve the trace accuracy.
22721
6013d43f
AD
227222001-11-28 Akim Demaille <akim@epita.fr>
22723
22724 * src/reduce.c (dump_grammar): Don't translate trace messages.
22725
cb4956ee
AD
227262001-11-28 Akim Demaille <akim@epita.fr>
22727
22728 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22729 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22730 as all tags are free'ed afterwards.
22731 From Enrico Scholz.
22732
648185ab
PE
227332001-11-27 Paul Eggert <eggert@twinsun.com>
22734
22735 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22736 use alloca when we didn't want to, and vice versa.
22737
68254a03
MA
227382001-11-27 Marc Autret <autret_m@epita.fr>
22739
9113b58f
AD
22740 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22741 initialization.
68254a03
MA
22742 * src/output.c (prepare): Remove its update.
22743
04d843a2
MA
227442001-11-27 Marc Autret <autret_m@epita.fr>
22745
22746 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22747 Use %error-verbose.
22748
d2079671 227492001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
22750
22751 * src/bison.simple: Remove YYERROR_VERBOSE using.
22752 Use %%error_verbose.
22753 (yyparse): Likewise.
22754 * src/output.c (prepare): Give its final value.
22755 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22756 * src/getargs.h: Add its extern declaration.
22757 * src/getargs.c (error_verbose_flag): New int.
22758 (getargs): Update to catch new case.
22759 * src/options.c (option_table): 'error-verbose' is a new option.
22760 (shortopts): Update.
22761
e0327bc8
AD
227622001-11-27 Akim Demaille <akim@epita.fr>
22763
22764 * src/system.h: Use intl/libgettext.h.
22765 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22766
000f1a3c
AD
227672001-11-27 Akim Demaille <akim@epita.fr>
22768
22769 * tests/torture.at (Exploding the Stack Size with Malloc):
22770 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22771
26cfe0be
AD
227722001-11-27 Akim Demaille <akim@epita.fr>
22773
22774 * src/files.c: Include error.h.
22775 Reported by Hans Aberg.
22776
f6bd5427
MA
227772001-11-26 Marc Autret <autret_m@epita.fr>
22778
d2079671 22779 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
22780 (read_declarations): Add case tok_include.
22781 * src/getargs.h (include): Add its extern definition.
22782 * src/getargs.c (include): New const char *.
22783 (getargs): Add case '-I'.
22784 * src/options.c (option_table): Add include as command line and
22785 percent option.
22786 * src/lex.h (token_t): Add tok_include.
22787
2ca209c1
AD
227882001-11-26 Akim Demaille <akim@epita.fr>
22789
22790 * src/reader.c (readgram): Make sure rules for mid-rule actions
22791 have a lineno equal to that of their host rule.
22792 Reported by Hans Aberg.
22793 * tests/regression.at (Rule Line Numbers): New.
22794
0e41b407
AD
227952001-11-26 Akim Demaille <akim@epita.fr>
22796
22797 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22798 size_ts.
22799
228002001-11-26 Akim Demaille <akim@epita.fr>
22801
22802 * src/complain.c, src/complain.h (error): Remove, provided by
22803 lib/error.[ch].
22804
e0c40012
AD
228052001-11-26 Akim Demaille <akim@epita.fr>
22806
22807 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22808 issue an error message.
22809 * tests/regression.at (Invalid %directive): New.
22810 Reported by Hans Aberg.
22811
5e147124
AD
228122001-11-26 Akim Demaille <akim@epita.fr>
22813
22814 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22815 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22816
a034c8b8
AD
228172001-11-26 Akim Demaille <akim@epita.fr>
22818
22819 * src/conflicts.c (conflicts_print): Don't complain at all when
22820 there are no reduce/reduce conflicts, and as many shift/reduce
22821 conflicts as expected.
22822 * tests/regression.at (%expect right): Adjust.
22823
c64a20f3
AD
228242001-11-23 Akim Demaille <akim@epita.fr>
22825
22826 * lib/alloca.c: Update, from fileutils.
22827
5b0d29bb
AD
228282001-11-23 Akim Demaille <akim@epita.fr>
22829
22830 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22831
722c4bfe
AD
228322001-11-23 Akim Demaille <akim@epita.fr>
22833
22834 * src/system.h: Include alloca.h.
22835 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22836
6255b435
AD
228372001-11-23 Akim Demaille <akim@epita.fr>
22838
22839 * src/print_graph.c (print_actions): Remove `rule', unused.
22840 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22841 pacify GCC's signed < unsigned warnings.
22842 * src/closure.c (itemsetsize): Likewise.
22843 * src/reader.c (symbol_list_new): Static.
22844
b29b2ed5
AD
228452001-11-23 Akim Demaille <akim@epita.fr>
22846
22847 Attaching lineno to buckets is stupid, since only one copy of each
22848 symbol is kept, only the line of the first occurrence is kept too.
22849
22850 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22851 * src/reader.c (rline_allocated): Remove, unused.
22852 (symbol_list): Have a `line' member.
22853 (symbol_list_new): New.
22854 (readgram): Use it.
22855 * src/print.c (print_grammar): Output the rule line numbers.
22856 * tests/regression.at (Solved SR Conflicts)
22857 (Unresolved SR Conflicts): Adjust.
22858 Reported by Hans Aberg.
22859
a81b1d4a
MA
228602001-11-22 Marc Autret <autret_m@epita.fr>
22861
22862 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22863
c1ecb3c1
MA
228642001-11-22 Marc Autret <autret_m@epita.fr>
22865
22866 * src/muscle_tab.c (muscle_init): Remove initialization of
22867 skeleton muscle.
22868 * src/output.c (output_master_parser): Do it here.
22869
fbe01355
AD
228702001-11-20 Akim Demaille <akim@epita.fr>
22871
22872 * po/sv.po: New.
22873 * configure.in (ALL_LINGUAS): Adjust.
22874 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22875 longer contains strings to translate.
22876
81e895c0
AD
228772001-11-19 Akim Demaille <akim@epita.fr>
22878
22879 * src/conflicts.c (conflicts_print): Add a missing \n.
22880
6bb1878b
AD
228812001-11-19 Akim Demaille <akim@epita.fr>
22882
22883 * src/nullable.c (nullable_print): New.
22884 (set_nullable): Call it when tracing.
22885 Better locality of variables.
22886
d9ec2d07
AD
228872001-11-19 Akim Demaille <akim@epita.fr>
22888
22889 * src/print.c (print_actions): Better locality of variables.
22890
720e5c1b
AD
228912001-11-19 Akim Demaille <akim@epita.fr>
22892
22893 * src/derives.c (print_derives): Fix and enrich.
22894 * src/closure.c (print_fderives): Likewise.
22895
fb908786
AD
228962001-11-19 Akim Demaille <akim@epita.fr>
22897
22898 * src/closure.c (itemsetend): Remove, replaced with...
22899 (itemsetsize): new.
22900
125ecb56
AD
229012001-11-19 Akim Demaille <akim@epita.fr>
22902
22903 * src/LR0.c (kernel_end): Remove, replaced with...
22904 (kernel_size): new.
22905
d8cf039f
AD
229062001-11-19 Akim Demaille <akim@epita.fr>
22907
22908 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22909 to clarify.
22910
7bec0760
AD
229112001-11-19 Akim Demaille <akim@epita.fr>
22912
22913 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22914
c87d4863
AD
229152001-11-19 Akim Demaille <akim@epita.fr>
22916
22917 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22918 trace messages.
22919 * src/LR0.c: Likewise.
22920 (allocate_itemsets): Use arrays instead of pointers to clarify.
22921
9bfe901c
AD
229222001-11-19 Akim Demaille <akim@epita.fr>
22923
22924 * src/getargs.c (statistics_flag): Replace with...
22925 (trace_flag): New.
22926 (longopts): Accept --trace instead of --statistics.
22927 * src/getargs.h, src/options.c: Adjust.
22928 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22929 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22930
97db7bd4
AD
229312001-11-19 Akim Demaille <akim@epita.fr>
22932
cc72668c 22933 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
22934 pointers to clarify the code.
22935 (save_reductions, save_shifts): Factor common parts of alternatives.
22936
2c5f66ed
AD
229372001-11-19 Akim Demaille <akim@epita.fr>
22938
22939 * src/LR0.c (new_state, get_state): Complete TRACE code.
22940 * src/closure.c: Include `reader.h' to get `tags', needed by the
22941 trace code.
22942 Rename the conditional DEBUG as TRACE.
22943 Output consistently TRACEs to stderr, not stdout.
22944 * src/derives.c: Likewise.
22945 * src/reduce.c: (inaccessable_symbols): Using if is better style
22946 than goto.
22947 Use `#if TRACE' instead of `#if 0' for tracing code.
22948
300f275f
AD
229492001-11-19 Akim Demaille <akim@epita.fr>
22950
22951 * src/system.h (LIST_FREE, shortcpy): New.
22952 * src/LR0.c: Use them.
22953 * src/output.c (free_itemsets, free_reductions, free_shifts):
22954 Remove, replaced by LIST_FREE.
22955
f59c437a
AD
229562001-11-19 Akim Demaille <akim@epita.fr>
22957
22958 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22959 (REDUCTIONS_ALLOC): New.
22960 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22961 allocation.
22962
6986fd9e
AD
229632001-11-19 Akim Demaille <akim@epita.fr>
22964
22965 * src/LR0.c (new_state): Complete trace code.
22966 * src/nullable.c (set_nullable): Don't translate traces.
22967
4bc30f78
AD
229682001-11-19 Akim Demaille <akim@epita.fr>
22969
22970 * src/print_graph.c (print_core): Better locality of variables.
22971 * src/print.c (print_core): Likewise.
22972
08a946e0
AD
229732001-11-19 Akim Demaille <akim@epita.fr>
22974
22975 * src/vcg.c: You do the output, so you are responsible of the
22976 handling of VCG syntax, in particular: use quotearg.
22977 * src/print_graph.c: Don't.
22978 (print_actions): Don't output the actions as part of the nodes,
22979 since that's the job of the edges.
22980 (print_state): Don't output by hand: fill the node description,
9bfe901c 22981 and ask for its output.
08a946e0 22982
f0473484
AD
229832001-11-19 Akim Demaille <akim@epita.fr>
22984
cc72668c
AD
22985 * src/bison.simple (yyparse): When verbosely reporting an error,
22986 no longer put additional quotes around token names.
f0473484
AD
22987 * tests/calc.at: Adjust.
22988
e41dc700
AD
229892001-11-19 Akim Demaille <akim@epita.fr>
22990
22991 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
22992 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
22993 * src/output.c: Adjust.
22994
652a871c
AD
229952001-11-19 Akim Demaille <akim@epita.fr>
22996
22997 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
22998 (rule_t): this.
22999 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
23000
b2ed6e58
AD
230012001-11-19 Akim Demaille <akim@epita.fr>
23002
23003 * src/gram.h (rule_t): New.
23004 (rule_table): New.
23005 (rrhs, rlhs): Remove, part of state_t.
23006 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
23007 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
23008 * src/reader.c, src/reduce.c: Adjust.
23009
edad7067
AD
230102001-11-19 Akim Demaille <akim@epita.fr>
23011
23012 * src/reader.c (symbols_output): New, extracted from...
23013 (packsymbols): Here.
23014 (reader): Call it.
23015
3feec034
AD
230162001-11-19 Akim Demaille <akim@epita.fr>
23017
23018 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
23019 (maxrhs): this new function.
23020
ddcd5fdf
AD
230212001-11-19 Akim Demaille <akim@epita.fr>
23022
cc72668c 23023 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
23024 Adjust.
23025
bb527fc2
AD
230262001-11-19 Akim Demaille <akim@epita.fr>
23027
cc72668c 23028 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
23029 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23030 * src/lalr.c: Adjust.
23031
a845a697
AD
230322001-11-19 Akim Demaille <akim@epita.fr>
23033
23034 * src/lalr.c (initialize_LA): Only initialize LA. Let...
23035 (set_state_table): handle the `lookaheads' members.
23036
f004bf6a
AD
230372001-11-19 Akim Demaille <akim@epita.fr>
23038
cc72668c
AD
23039 * src/lalr.h (lookaheads): Removed array, whose contents is now
23040 a member of...
f004bf6a
AD
23041 (state_t): this structure.
23042 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23043 Adjust.
23044
de326cc0
AD
230452001-11-19 Akim Demaille <akim@epita.fr>
23046
cc72668c
AD
23047 * src/lalr.h (consistent): Removed array, whose contents is now
23048 a member of...
de326cc0
AD
23049 (state_t): this structure.
23050 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23051 Adjust.
23052
90b4416b
AD
230532001-11-19 Akim Demaille <akim@epita.fr>
23054
cc72668c
AD
23055 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
23056 contents are now members of...
90b4416b
AD
23057 (state_t): this structure.
23058 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23059 Adjust.
23060
9703cc49
AD
230612001-11-19 Akim Demaille <akim@epita.fr>
23062
23063 * src/lalr.h (state_t): New.
23064 (state_table): Be a state_t * instead of a core **.
23065 (accessing_symbol): Remove, part of state_t.
23066 * src/lalr.c: Adjust.
23067 (set_accessing_symbol): Merge into...
23068 (set_state_table): this.
23069 * src/print_graph.c, src/conflicts.c: Adjust.
23070
d803322e
AD
230712001-11-14 Akim Demaille <akim@epita.fr>
23072
23073 * tests/calc.at, tests/output.at, tests/regression.at,
23074 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
23075 now the tests are run in private dirs, therefore AC_CLEANUP and
23076 family can be simplified to 0-ary.
23077 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
23078 use abs. path to find config.h.
23079 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
23080 stderr, there can be way too much random noise.
23081 Instead pass -Werror to GCC and rely on the exit status.
23082 Reported by Wolfram Wagner.
23083
3d76b07d
AD
230842001-11-14 Akim Demaille <akim@epita.fr>
23085
23086 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
23087 defined only if yyoverflow is defined, to avoid `warning: unused
23088 variable `yyvs1''.
23089 Reported by The Test Suite.
23090
09b503c8
AD
230912001-11-14 Akim Demaille <akim@epita.fr>
23092
23093 * src/print.c: Include reduce.h.
23094 Reported by Hans Aberg.
23095
230962001-11-14 Akim Demaille <akim@epita.fr>
23097
23098 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
23099 Revert a previous patch: these are really const.
23100 * src/conflicts.c (conflict_report): Additional useless pair of
23101 braces to pacify GCC's warnings for `if () if () {} else {}'.
23102 * src/lex.c (parse_percent_token): Replace equal_offset with
23103 arg_offset.
23104 arg is const.
23105 Be sure to strdup `arg' when used, since there is no reason for
23106 token_buffer not to change.
23107
0f37a994
AD
231082001-11-14 Akim Demaille <akim@epita.fr>
23109
23110 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
23111 definition.
23112 * src/main.c (main): Use them.
23113 Suggested by Hans Aberg.
23114
d39d93b8
AD
231152001-11-12 Akim Demaille <akim@epita.fr>
23116
23117 * src/system.h (ngettext): Now that we use ngettext, be sure to
23118 provide a default definition when NLS are not used.
23119
9edcd895
AD
231202001-11-12 Akim Demaille <akim@epita.fr>
23121
23122 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
23123 Use @kbd to denote user input.
23124 (Language and Grammar): ANSIfy the example.
23125 Adjust its layout for info/notinfo.
23126 (Location Tracking Calc): Output error messages to stderr.
23127 Output locations in a more GNUtically correct way.
23128 Fix a couple of Englishos.
23129 Adjust @group/@end group pairs.
23130
7da99ede
AD
231312001-11-12 Akim Demaille <akim@epita.fr>
23132
e3aa65c5 23133 %expect was not functioning at all.
7da99ede
AD
23134
23135 * src/conflicts.c (expected_conflicts): Set to -1.
23136 (conflict_report): Use ngettext.
23137 (conflicts_print): Check %expect and make its violation an error.
23138 * doc/bison.texinfo (Expect Decl): Adjust.
23139 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
23140 * tests/regression.at (%expect not enough, %expect right)
23141 (%expect too much): New.
23142
ba9dda1a
AD
231432001-11-12 Akim Demaille <akim@epita.fr>
23144
23145 * tests/regression.at (Conflicts): Rename as...
23146 (Unresolved SR Conflicts): this.
23147 (Solved SR Conflicts): New.
23148
337c5bd1
AD
231492001-11-12 Akim Demaille <akim@epita.fr>
23150
23151 * src/reduce.c (print_results): Rename as...
23152 (reduce_output): This.
23153 Output to OUT, passed as argument, instead of output_obstack.
23154 (dump_grammar): Likewise.
23155 (reduce_free): New.
23156 Also free V1.
23157 (reduce_grammar): No longer call reduce_output, since...
23158 * src/print.c (print_results): do it.
23159 * src/main.c (main): Call reduce_free;
23160
c73a41af
AD
231612001-11-12 Akim Demaille <akim@epita.fr>
23162
23163 * src/conflicts.c (print_reductions): Accept OUT as argument.
23164 Output to it, not to output_obstack.
23165 * src/print.c (print_actions): Adjust.
23166
0df87bb6
AD
231672001-11-12 Akim Demaille <akim@epita.fr>
23168
23169 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
23170 the result instead of using...
23171 (src_total, rrc_total, src_count, rrc_count): Remove.
23172 (any_conflicts): Remove.
23173 (print_conflicts): Split into...
23174 (conflicts_print, conflicts_output): New.
23175 * src/conflicts.h: Adjust.
23176 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 23177 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
23178 * tests/regression.at (Conflicts): New.
23179 Reported by Tom Lane.
23180
e4d3d4de
AD
231812001-11-12 Akim Demaille <akim@epita.fr>
23182
23183 * tests/regression.at (Invalid input): Remove, duplicate with
23184 ``Invalid input: 1''.
23185
6d7d248e
AD
231862001-11-12 Akim Demaille <akim@epita.fr>
23187
23188 * tests/torture.at (AT_DATA_STACK_TORTURE)
23189 (Exploding the Stack Size with Alloca)
23190 (Exploding the Stack Size with Malloc): New.
23191
e9e4c321
AD
231922001-11-12 Akim Demaille <akim@epita.fr>
23193
23194 * src/bison.simple (YYSTACK_REALLOC): New.
23195 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 23196 Reported by Per Allansson.
e9e4c321 23197
5f7e0832
AD
231982001-11-12 Pascal Bart <pascal.bart@epita.fr>
23199
23200 * src/bison.simple: Define type yystype instead of YYSTYPE, and
23201 define CPP macro, which substitute YYSTYPE by yystype.
23202 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
23203 with yyltype/YYLTYPE. This allows inclusion of the generated
23204 header within the parser if the compiler, such as GGC, accepts
23205 multiple equivalent #defines.
23206 From Akim.
23207
e3f1699f
AD
232082001-11-05 Akim Demaille <akim@epita.fr>
23209
23210 * src/reader.c (symbols_output): New, extracted from...
23211 (packsymbols): here.
23212 (reader): Adjust.
23213
65be0866
AD
232142001-11-05 Akim Demaille <akim@epita.fr>
23215
23216 * src/lex.c (parse_percent_token): s/quotearg/quote/.
23217
e4d910bf
AD
232182001-11-05 Akim Demaille <akim@epita.fr>
23219
23220 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
23221 pattern.
23222
951366c1
AD
232232001-11-05 Akim Demaille <akim@epita.fr>
23224
23225 * src/options.h (struct option_table_struct): set_flags is void*.
23226 * src/options.c (longopts): Support `--output' and `%output'.
23227 (usage): Adjust.
23228 * src/lex.h (tok_setopt): Remove, replaced with...
23229 (tok_intopt, tok_stropt): these new guys.
23230 * src/lex.c (getopt.h): Not needed.
23231 (token_buffer, unlexed_token_buffer): Not const.
23232 (percent_table): Promote `-' over `_' in directive names.
23233 Active `%name-prefix', `file-prefix', and `output'.
23234 (parse_percent_token): Accept possible arguments to directives.
23235 Promote `-' over `_' in directive names.
23236
d8988b2f
AD
232372001-11-04 Akim Demaille <akim@epita.fr>
23238
23239 * doc/bison.texinfo (Decl Summary): Split the list into
23240 `directives for grammars' and `directives for bison'.
23241 Sort'em.
23242 Add description of `%name-prefix', `file-prefix', and `output'.
23243 Promote `-' over `_' in directive names.
23244 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
23245 Simplify the description of `--name-prefix'.
23246 Promote `-' over `_' in directive names.
23247 Promote `--output' over `--output-file'.
23248 Fix the description of `--defines'.
23249 * tests/output.at: Exercise %file-prefix and %output.
23250
6468d18e
AD
232512001-11-02 Akim Demaille <akim@epita.fr>
23252
23253 * doc/refcard.tex: Update.
23254
6b7e85b9
AD
232552001-11-02 Akim Demaille <akim@epita.fr>
23256
23257 * src/symtab.h (SUNDEF): New.
23258 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
23259 stand for `uninitialized', instead of 0.
23260 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
23261 * src/lex.c (lex): Adjust.
23262
23263 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
23264 Number it 0.
23265 Let yylex return it instead of a plain 0.
23266 Reported by Dick Streefland.
23267
cd5aafcf
AD
232682001-11-02 Akim Demaille <akim@epita.fr>
23269
23270 * tests/regression.at (Mixing %token styles): New test.
23271
037ca2f1
AD
232722001-11-02 Akim Demaille <akim@epita.fr>
23273
23274 * src/reader.c (parse_thong_decl): Formatting changes.
23275 (token_translations_init): New, extracted from...
23276 (packsymbols): Here.
23277 Adjust.
23278
270a173c
AD
232792001-11-01 Akim Demaille <akim@epita.fr>
23280
23281 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
23282 Check that `9foo.y' produces correct cpp guards.
23283 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
23284 guards.
23285 Reported by Wwp.
23286
561f9a30
AD
232872001-11-01 Akim Demaille <akim@epita.fr>
23288
23289 * tests/regression.at (Invalid input: 2): New.
23290 * src/lex.c (unlexed_token_buffer): New.
23291 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
23292 too.
23293 Reported by Wwp.
23294
f987e9d2
AD
232952001-11-01 Akim Demaille <akim@epita.fr>
23296
23297 * tests/calc.at: Catch up with 1.30.
23298 * configure.in: Bump to 1.49a.
23299 Adjust to newer Autotest.
23300
0846f581
PB
233012001-10-19 Pascal Bart <pascal.bart@epita.fr>
23302
23303 * src/conflicts.c: Move global variables rrc_total and src_total ...
23304 (print_conflicts): here.
23305 * src/output.c (output): Free global variable user_toknums.
23306 * src/lex.c (token_obstack): Become static.
23307
3c1a79b3
AD
233082001-10-18 Akim Demaille <akim@epita.fr>
23309
23310 * tests/atlocal.in (GCC): Add.
23311 * tests/calc.at: s/m4_match/m4_bmatch/.
23312 s/m4_patsubst/m4_bpatsubst/.
23313 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
23314 * configure.in: AC_SUBST(GCC).
23315
5d52e7d0
MA
233162001-10-14 Marc Autret <autret_m@epita.fr>
23317
23318 * src/options.c (create_long_option_table): Fix.
23319
631aa1d3
AD
233202001-10-10 Akim Demaille <akim@epita.fr>
23321
23322 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
23323
f6ec6d13
AD
233242001-10-04 Akim Demaille <akim@epita.fr>
23325
23326 * src/reader.c (parse_union_decl): Push the caracters in
23327 union_obstack, not attrs_obstack.
23328
342b8b6e
AD
233292001-10-04 Akim Demaille <akim@epita.fr>
23330
23331 Merge in the branch 1.29.
23332
23333 * src/reader.c (packsymbols): Use a temporary obstack for
23334 `%%tokendef', since output_stack is already used elsewhere.
23335
23336 2001-10-02 Akim Demaille <akim@epita.fr>
23337
23338 Bump 1.29d.
23339
23340 2001-10-02 Akim Demaille <akim@epita.fr>
23341
23342 Version 1.29c.
23343
23344 2001-10-02 Akim Demaille <akim@epita.fr>
23345
23346 * tests/regression.at (Invalid CPP headers): New.
23347 From Alexander Belopolsky.
23348 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
23349
23350 2001-10-02 Akim Demaille <akim@epita.fr>
23351
23352 * tests/regression.at (Invalid input): New.
23353 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
23354 Reported by Shura.
23355
23356 2001-10-02 Akim Demaille <akim@epita.fr>
23357
23358 * tests/calc.at: Now that --debug works, the tests must be adjusted.
23359
23360 2001-10-02 Akim Demaille <akim@epita.fr>
23361
23362 * src/output.c (output_parser): Assert `skeleton'.
23363 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
23364 systems.
23365 From Shura.
23366
23367 2001-10-01 Marc Autret <autret_m@epita.fr>
23368
23369 * src/lex.h: Echo modifications.
23370 * src/lex.c (unlex): Parameter is now token_t.
23371 From Hans Aberg.
23372
23373 2001-10-01 Marc Autret <autret_m@epita.fr>
23374
23375 * src/main.c: Include lex.h.
23376 From Hans Aberg.
23377
23378 2001-09-29 Akim Demaille <akim@epita.fr>
23379
23380 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
23381
23382 2001-09-28 Akim Demaille <akim@epita.fr>
23383
23384 * tests/testsuite.at: Update to newer Autotest.
23385 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
23386
23387 2001-09-27 Akim Demaille <akim@epita.fr>
23388
23389 Position independent wrapper.
23390
23391 * tests/bison: Remove.
23392 * tests/bison.in: New.
23393 * configure.in: Adjust.
23394
23395 2001-09-27 Paul Eggert <eggert@twinsun.com>
23396
23397 Port quotearg fixes from tar 1.13.24.
23398
23399 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23400 tm to be declared.
23401 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23402 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23403
23404 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
23405 * m4/mbrtowc.m4: New file.
23406 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
23407 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
23408
23409 2001-09-27 Akim Demaille <akim@epita.fr>
23410
23411 Bump to 1.29c.
23412
23413 2001-09-27 Akim Demaille <akim@epita.fr>
23414
23415 Version 1.29b.
23416
23417 2001-09-25 Akim Demaille <akim@epita.fr>
23418
23419 * src/system.h: Include `xalloc.h'.
23420 Remove it from the C files.
23421 * src/files.c (output_files): Free the obstacks.
23422 * src/lex.c (init_lex): Rename as...
23423 (lex_init): this.
23424 (lex_free): New.
23425 * src/main.c (main): Use it.
23426
23427 2001-09-24 Marc Autret <autret_m@epita.fr>
23428
23429 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23430 to output informations in fout (FILE*).
23431 (open_graph, close_graph): Likewise.
23432 (output_graph, output_edge, output_node): Likewise.
23433 * src/vcg.h: Update function prototypes.
23434 * src/print_graph.c (print_graph): Open output graph file.
23435 (print_actions): Adjust.
23436 * src/files.h: Remove extern declaration.
23437 * src/files.c: Remove graph_obstack declaration.
23438 (open_files): Remove graph_obstack initialization.
23439 (output_files): Remove graph_obstack saving.
23440
23441 2001-09-24 Marc Autret <autret_m@epita.fr>
23442
23443 * src/files.c (compute_output_file_names): Fix.
23444
23445 2001-09-24 Marc Autret <autret_m@epita.fr>,
23446 Akim Demaille <akim@epita.fr>
23447
23448 * src/reader.c (reader): Remove call to free_symtab ().
23449 * src/main.c (main): Call it here.
23450 Include symtab.h.
23451 * src/conflicts.c (initialize_conflicts): Rename as...
23452 (solve_conflicts): this.
23453 * src/print.c (print_core, print_actions, print_state)
23454 (print_grammar): Dump to a file instead a `output_obstack'.
23455 (print_results): Dump `output_obstack', and then proceed with the
23456 FILE *.
23457 * src/files.c (compute_output_file_names, close_files): New.
23458 (output_files): Adjust.
23459 * src/main.c (main): Adjust.
23460
23461 2001-09-23 Marc Autret <autret_m@epita.fr>
23462
23463 * src/files.c (compute_header_macro): Computes header macro name
23464 from spec_defines_file when given.
23465
23466 2001-09-23 Marc Autret <autret_m@epita.fr>
23467
23468 * src/files.c (output_files): Add default extensions.
23469
23470 2001-09-22 Akim Demaille <akim@epita.fr>
23471
23472 * src/conflicts.c (finalize_conflicts): Rename as...
23473 (free_conflicts): this.
23474
23475 2001-09-22 Akim Demaille <akim@epita.fr>
23476
23477 * src/gram.c (gram_free): Rename back as...
23478 (dummy): this.
23479 (output_token_translations): Free `token_translations'.
23480 * src/symtab.c (free_symtab): Free the tag field.
23481
23482 2001-09-22 Akim Demaille <akim@epita.fr>
23483
23484 Remove `translations' as it is always set to true.
23485
23486 * src/gram.h: Adjust.
23487 * src/reader.c (packsymbols, parse_token_decl): Adjust
23488 * src/print.c (print_grammar): Adjust.
23489 * src/output.c (output_token_translations): Adjust.
23490 * src/lex.c (lex): Adjust.
23491 * src/gram.c: Be sure the set pointers to NULL.
23492 (dummy): Rename as...
23493 (gram_free): this.
23494
23495 2001-09-22 Akim Demaille <akim@epita.fr>
23496
23497 * configure.in: Invoke AM_LIB_DMALLOC.
23498 * src/system.h: Use dmalloc.
23499 * src/LR0.c: Be sure to have pointers initialized to NULL.
23500 (allocate_itemsets): Allocate kernel_items only if needed.
23501
23502 2001-09-22 Akim Demaille <akim@epita.fr>
23503
23504 * configure.in: Bump to 1.29b.
23505 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23506 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23507 need xmalloc.c in calc.y.
23508 From Pascal Bart.
23509
23510 2001-09-21 Akim Demaille <akim@epita.fr>
23511
23512 Version 1.29a.
23513 * Makefile.maint, config/config.guess, config/config.sub,
23514 * config/missing: Update from masters.
23515 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23516 upon package.m4.
23517 * configure.in (ALL_LINGUAS): Add `tr'.
23518
23519 2001-09-21 Akim Demaille <akim@epita.fr>
23520
23521 * tests/Makefile.am (package.m4): Move to...
23522 ($(srcdir)/$(TESTSUITE)): here.
23523
23524 2001-09-20 Akim Demaille <akim@epita.fr>
23525
23526 * src/complain.c: No longer try to be standalone: use system.h.
23527 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23528 * src/complain.h: Likewise.
23529 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23530 Remove the unused variable `n'.
23531 From Albert Chin-A-Young.
23532
23533 2001-09-18 Marc Autret <autret_m@epita.fr>
23534
23535 * doc/bison.1: Update.
23536 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23537 descriptions.
23538 (Option Cross Key): Update.
23539 Add --graph.
23540
23541 2001-09-18 Marc Autret <autret_m@epita.fr>
23542
23543 * tests/regression.at: New test (comment in %union).
23544
23545 2001-09-18 Marc Autret <autret_m@epita.fr>
23546
23547 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23548 do that.
23549 Reported by Keith Browne.
23550
23551 2001-09-18 Marc Autret <autret_m@epita.fr>
23552
23553 * tests/output.at: Add tests for --defines and --graph.
23554
23555 2001-09-18 Marc Autret <autret_m@epita.fr>
23556
23557 * tests/output.at: Removes tests of %{header,src}_extension features.
23558
23559 2001-09-18 Akim Demaille <akim@epita.fr>
23560
23561 * tests/Makefile.am (package.m4): New.
23562 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23563 (_AT_CHECK_CALC_ERROR): Likewise.
23564 Factor the `, ' part of verbose error messages.
23565
23566 2001-09-18 Marc Autret <autret_m@epita.fr>
23567
23568 * src/getargs.c (longopts): Declare --defines and --graph as options
23569 with optional arguments.
23570 * src/files.h: Add extern declarations.
23571 * src/files.c (spec_graph_file, spec_defines_file): New.
23572 (output_files): Update.
23573 Remove CPP-outed code.
23574
23575 2001-09-18 Marc Autret <autret_m@epita.fr>
23576
23577 Turn off %{source,header}_extension feature.
23578
23579 * src/files.c (compute_exts_from_gf): Update.
23580 (compute_exts_from_src): Update.
23581 (output_files): CPP-out useless code.
23582 * src/files.h: Remove {header,source}_extension extern declarations.
23583 * src/reader.c (parse_dquoted_param): CPP-out.
23584 (parse_header_extension_decl): Remove.
23585 (parse_source_extension_decl): Remove.
23586 (read_declarations): Remove cases tok_{hdrext,srcext}.
23587 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23588 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23589
23590 2001-09-10 Akim Demaille <akim@epita.fr>
23591
23592 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23593 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23594 (AT_CHECK_OUTPUT): this.
23595 Merely check ls' exit status, its output is useless.
23596
23597 2001-09-10 Akim Demaille <akim@epita.fr>
23598
23599 * tests/calc.at: Use m4_match.
23600 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23601
23602 2001-09-10 Marc Autret <autret_m@epita.fr>,
23603 Akim Demaille <akim@epita.fr>
23604
23605 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23606 enum color_e.
23607 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23608 to `normal'.
23609 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23610 * src/lex.h: Adjust prototype.
23611 (token_t): Add `tok_undef'.
23612 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23613 (parse_percent_token): Now returns token_t.
23614 Add default statement in switch.
23615 (lex): Separate `c' as an input variable, from the token_t result
23616 part.
23617 (unlexed): Is a token_t.
23618
23619 2001-09-10 Akim Demaille <akim@epita.fr>
23620
23621 * configure.in: Bump to 1.29a.
23622
23623 2001-09-07 Akim Demaille <akim@epita.fr>
23624
23625 Version 1.29.
23626
23627 2001-08-30 Akim Demaille <akim@epita.fr>
23628
23629 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23630 * m4/atconfig.m4: Remove.
23631 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23632 * tests/bison: New.
23633 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23634 m4_if, m4_patsubst, and m4_regexp.
23635 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23636 `input' file instead of echo.
23637
23638 2001-08-29 Akim Demaille <akim@epita.fr>
23639
23640 Bump to 1.28e.
23641
23642 2001-08-29 Akim Demaille <akim@epita.fr>
23643
23644 Version 1.28d.
23645
23646 2001-08-29 Paul Eggert <eggert@twinsun.com>
23647
23648 * src/bison.simple (yyparse): Don't take the address of an
23649 item before the start of an array, as that doesn't conform to
23650 the C Standard.
23651
23652 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23653
23654 * doc/bison.texinfo (Location Tracking Calc): New node.
23655
23656 2001-08-29 Paul Eggert <eggert@twinsun.com>
23657
23658 * src/output.c (output): Do not define const, as this now
23659 causes more problems than it cures.
23660
23661 2001-08-29 Akim Demaille <akim@epita.fr>
23662
23663 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23664 the nodes.
23665 Be sure to tag the `detailmenu'.
23666
23667 2001-08-29 Akim Demaille <akim@epita.fr>
23668
23669 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23670 download in a tmp dir.
23671
23672 2001-08-28 Marc Autret <autret_m@epita.fr>
23673
23674 * config/depcomp: New file.
23675
23676 2001-08-28 Marc Autret <autret_m@epita.fr>
23677
23678 * doc/bison.1 (mandoc): Adjust.
23679 From Juan Manuel Guerrero.
23680
23681 2001-08-28 Marc Autret <autret_m@epita.fr>
23682
23683 * src/print_graph.c (print_state): Fix.
23684
23685 2001-08-27 Marc Autret <autret_m@epita.fr>
23686
23687 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23688 char * members.
23689 Echo modifications to the functions prototypes.
23690 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23691
23692 2001-08-27 Marc Autret <autret_m@epita.fr>
23693
23694 * src/vcg.c: Include `xalloc.h'.
23695 (add_colorentry): New.
23696 (add_classname): New.
23697 (add_infoname): New.
23698 * src/vcg.h: Add new prototypes.
23699
23700 2001-08-27 Akim Demaille <akim@epita.fr>
23701
23702 * Makefile.maint: Sync. again with CVS Autoconf.
23703
23704 2001-08-27 Akim Demaille <akim@epita.fr>
23705
23706 * Makefile.maint: Formatting changes.
23707 (po-update, cvs-update, update): New targets.
23708 (AMTAR): Remove.
23709
23710 2001-08-27 Akim Demaille <akim@epita.fr>
23711
23712 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23713 * Makefile.maint: Sync. with CVS Autoconf.
23714
23715 2001-08-27 Marc Autret <autret_m@epita.fr>
23716
23717 * src/vcg.h (struct infoname_s): New.
23718 (struct colorentry_s): New.
23719 (graph_s): New fields {vertical,horizontal}_order in structure.
23720 Add `infoname' field.
23721 Add `colorentry' field;
23722 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23723 (G_HORIZONTAL_ORDER): New.
23724 (G_INFONAME): New.
23725 (G_COLORENTRY): New.
23726 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23727 Add output of `infoname'.
23728 Add output of `colorentry'.
23729
23730 2001-08-27 Marc Autret <autret_m@epita.fr>
23731
23732 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23733 This one shadowed a global parameter.
23734
23735 2001-08-24 Marc Autret <autret_m@epita.fr>
23736
23737 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23738 instead of `unsigned'.
23739 (print_state): Do not call obstack_object_size () in obstack_grow ()
23740 to avoid macro variables shadowing.
23741
23742 2001-08-23 Marc Autret <autret_m@epita.fr>
23743
23744 * src/lex.c (percent_table): Typo: s/naem/name/.
23745 Add graph option.
23746 Normalize new options declarations.
23747
23748 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23749
23750 * tests/suite.at: Exercise %header_extension and %source_extension.
23751
23752 2001-08-16 Marc Autret <autret_m@epita.fr>
23753
23754 * src/reader.c (parse_dquoted_param): New.
23755 (parse_header_extension_decl): Use it.
23756 (parse_source_extension_decl): Likewise.
23757
23758 2001-08-16 Marc Autret <autret_m@epita.fr>
23759
23760 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23761 (get_xxxx_str): Use assert () instead of complain ().
23762 Remove return invokations in default cases.
23763 (get_decision_str): Modify default behaviour. Remove second argument.
23764 Echo modifications on calls.
23765 (output_graph): Fix.
23766
23767 2001-08-16 Marc Autret <autret_m@epita.fr>
23768
23769 * src/getargs.c (usage): Update with ``-g, --graph''.
23770
23771 2001-08-16 Marc Autret <autret_m@epita.fr>
23772
23773 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23774 (Option Cross Key): Likewise.
23775 * doc/bison.1: Update.
23776
1c8c2190
PB
237772001-09-25 Pascal Bart <pascal.bart@epita.fr>
23778
23779 * src/output.c (output_master_parser): Don't finish action_obstack.
23780 (output_parser): Don't care about the muscle action, here.
23781 (prepare): Copy the action_obstack in the action muscle.
23782 (output): Free action_obstack.
23783
180d45ba
PB
237842001-09-23 Pascal Bart <pascal.bart@epita.fr>
23785
23786 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23787 will contain `%union' declaration.
23788 (parse_union_decl): Delete #line directive output.
23789 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23790 informations about %union.
23791 (parse_union_decl): Copy the union_obstack in the muscle stype.
23792 * src/bison.simple: Add new #line directive.
23793 Add typdef %%stype YYSTYPE.
23794
c51d1a19
PB
237952001-09-23 Pascal Bart <pascal.bart@epita.fr>
23796
23797 * src/bison.simple: Add new `#line' directive.
23798
6f9344da
PB
237992001-09-22 Pascal Bart <pascal.bart@epita.fr>
23800
23801 * src/bison.simple: New `#line' directive.
23802 * src/output.c (output_parser): Support new dynamic muscle input_line.
23803
652def80
MA
238042001-09-22 Marc Autret <autret_m@epita.fr>
23805
23806 * src/output.c (output_master_parser): New.
23807 (output_parser): Be more re-entrant.
23808
25b222fa
MA
238092001-09-21 Marc Autret <autret_m@epita.fr>
23810
23811 * src/reader.c (copy_definition, parse_union_decl): Update and use
23812 `linef' muscle.
23813 (copy_action): Likewise.
23814 Use obstack_1grow ().
23815 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23816
6bc35ae5
MA
238172001-09-21 Marc Autret <autret_m@epita.fr>
23818
23819 * src/options.c (option_table): Adjust.
23820 * src/lex.c (parse_percent_token): Fix.
23821
c0629aa1
PB
238222001-09-20 Pascal Bart <pascal.bart@epita.fr>
23823
23824 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 23825
82b6d266
PB
238262001-09-20 Pascal Bart <pascal.bart@epita.fr>
23827
23828 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23829 is now an option_table_struct*.
23830 (option_strcmp): New function option_strcmp.
23831 (parse_percent_token): Call option_strcmp.
23832 * src/getargs.c (xalloc.h, options.h): Include it.
23833 (getargs): Call create_long_option_table.
23834 (getargs): Free longopts at the end of the function.
23835 (shortopts): Move in options.c.
23836 * src/options.c (create_long_option_table): New function. Convert
23837 information from option_table to option structure.
23838 * src/reader.c (options.h): Include it.
23839
23840 * src/Makefile.am: Adjust.
23841 * src/options.c (option_table): Create from longopts and percent_table.
23842 * src/getargs.c (longopts): Delete.
23843 * src/lex.c (struct percent_table_struct): Delete.
23844 (percent_table): Delete.
23845 (options.h): Include it.
23846 * src/options.c: Create.
23847 * src/options.h: Create.
23848 Declare enum opt_access_e.
23849 Define struct option_table_struct.
23850
75f5aaea
MA
238512001-09-20 Marc Autret <autret_m@epita.fr>
23852
23853 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23854 sections of Bison.
23855
f508cb0a
PB
238562001-09-19 Pascal Bart <pascal.bart@epita.fr>
23857
23858 * src/bison.simple: s/%%filename/%%skeleton.
23859 * src/muscle_tab.c (getargs.h): Include it.
23860 (muscle_init): Insert new muscle skeleton.
23861
13105fc1
PB
238622001-09-18 Pascal Bart <pascal.bart@epita.fr>
23863
23864 * src/output.c (output_parser): Delete unused variable actions_dumped.
23865
b0c4483e
PB
238662001-09-07 Pascal Bart <pascal.bart@epita.fr>
23867
23868 * src/output.c (output): Delete call to reader_output_yylsp.
23869 * src/reader.c (reader): Likewise.
ba0fe3c7 23870 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 23871
11d82f03
MA
238722001-09-02 Marc Autret <autret_m@epita.fr>
23873
23874 * src/reader.c: Include muscle_tab.h.
23875 (parse_union_decl): Update.
23876 (parse_macro_decl): Rename parse_muscle_decl.
23877 Update to use renamed functions and variable.
23878 (read_declarations, copy_action, read_additionnal_code, : Updated
23879 with correct variables and functions names.
23880 (packsymbols, reader): Likewise.
342b8b6e 23881
11d82f03 23882 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 23883
11d82f03
MA
23884 * src/output.c: Include muscle_tab.h
23885 In all functions using macro_insert, change by using muscle_insert ().
23886 (macro_obstack): Rename muscle_obstack.
23887 Echo modifications in the whole file.
23888 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23889 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23890 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23891
23892 * src/muscle_tab.h: Update double inclusion macros.
23893 (macro_entry_s): Rename muscle_entry_s.
23894 Update prototypes.
342b8b6e 23895
11d82f03
MA
23896 * src/muscle_tab.c: Include muscle_tab.h.
23897 Rename macro_tabble to muscle_table.
23898 (mhash1, mhash2, mcmp): Use muscle_entry.
23899 (macro_init): Rename muscle_init. Update.
23900 (macro_insert): Rename muscle_insert. Update.
23901 (macro_find): Rename muscle_find. Update.
23902
23903 * src/main.c: Include muscle_tab.h.
23904 (main): Call muscle_init ().
23905 * src/Makefile.am (bison_SOURCES): Echo modifications.
23906
93a37297
MA
239072001-09-02 Marc Autret <autret_m@epita.fr>
23908
f753cd62 23909 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 23910
f753cd62
MA
23911 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23912
239132001-09-02 Marc Autret <autret_m@epita.fr>
23914
23915 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 23916
682d48cd
PB
239172001-09-01 Pascal Bart <pascal.bart@epita.fr>
23918
342b8b6e 23919 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
23920 filename.
23921
087c8fda
MA
239222001-09-01 Marc Autret <autret_m@epita.fr>
23923
23924 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23925 to an explicit value to activate the feature. We do it here.
23926
dda680cb
PB
239272001-08-31 Pascal Bart <pascal.bart@epita.fr>
23928
23929 * src/output.c (prepare): Delete the `filename' muscule insertion.
23930 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23931 (parse_union_decl): Likewise.
23932 * src/macrotab.c (macro_init): Initialize filename by infile.
23933
9e644e64
MA
239342001-08-31 Marc Autret <autret_m@epita.fr>
23935
23936 * src/bison.simple (YYLSP_NEEDED): New definition.
23937 * src/output.c (prepare): Add macro insertion of `locations_flag'
23938
17da6427
PB
239392001-08-31 Pascal Bart <pascal.bart@epita.fr>
23940
23941 * src/output.c (prepare): Delete insertion of previous muscles,
23942 and insert the `prefix' muscles.
23943 * src/macrotab.c (macro_init): Likewise.
23944 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 23945 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
23946 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23947 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 23948 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
23949 name_prefix.
23950
e8cb70b9
PB
239512001-08-31 Pascal Bart <pascal.bart@epita.fr>
23952
23953 * src/main.c (main): Standardize.
23954 * src/output.c (output_table_data, output_parser): Likewise.
23955 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23956
63c2d5de
MA
239572001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23958
342b8b6e 23959 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
23960 %%epilogue.
23961 * src/output.c (output): Rename %%declarations to %%prologue.
23962 * src/bison.simple: Echo modifications.
342b8b6e 23963
d8cb5183
MA
239642001-08-31 Marc Autret <autret_m@epita.fr>
23965
23966 * src/reader.c (readgram): CleanUp.
23967 (output_token_defines): Likewise.
23968 (packsymbols): Likewise.
23969 (reader): Likewise.
23970 * src/output.c (output): CPP-out useless code.
23971
6c686258
PB
239722001-08-31 Pascal Bart <pascal.bart@epita.fr>
23973
342b8b6e 23974 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
23975 output_trailers and output_headers.
23976 * src/output.h: Remove obsolete functions prototypes of output_headers
23977 and output_trailers.
23978
8f451ef7
PB
239792001-08-30 Pascal Bart <pascal.bart@epita.fr>
23980
23981 * src/main.c: Include macrotab.h.
342b8b6e 23982 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
23983 Adjust functions prototypes.
23984 * src/macrotab.c (macro_insert): Constify key and value.
23985 (macro_find): Constify key.
23986 (macro_insert): Include 'xalloc.h'
23987 (macro_insert): Use XMALLOC.
23988 (macro_find): Constify return value.
23989 * src/output.c (output_table_data): Rename table to table_data.
23990 (output_parser): Constify macro_key, macro_value.
23991
997b6fd0 239922001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
23993
23994 * src/reader.c (parse_skel_decl): New.
342b8b6e 23995 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
23996 * src/lex.h (token_t): New token `tok_skel'.
23997 * src/lex.c (percent_table): Add skeleton option entry.
23998 Standardize.
23999
ff48177d
MA
240002001-08-29 Marc Autret <autret_m@epita.fr>
24001
24002 * src/bison.simple: Add %%user_code directive at the end.
24003 * src/reader.c (read_additionnal_code): New.
24004 (reader): Use it.
24005 * src/output.c (output_program): Remove.
24006 (output): Update.
24007
b33160bf
MA
240082001-08-28 Marc Autret <autret_m@epita.fr>
24009
24010 * src/output.c (output_actions): Clean up.
4e5caae2 24011 (output_gram): CPP-out useless code.
b33160bf
MA
24012 * src/reader.c (reader): Clean up, CPP-out useless code.
24013
d1a2daf7
PB
240142001-08-28 Pascal Bart <pascal.bart@epita.fr>
24015
342b8b6e 24016 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 24017 directive.
d1a2daf7
PB
24018 * src/bison.simple: Add `%%definitions'.
24019
2b763dfe
MA
240202001-08-28 Marc Autret <autret_m@epita.fr>
24021
24022 * config/depcomp: New file.
24023
f1a87ef6
PE
240242001-08-27 Paul Eggert <eggert@twinsun.com>
24025
24026 * src/bison.simple (yyparse): Don't take the address of an
24027 item before the start of an array, as that doesn't conform to
24028 the C Standard.
24029
82e236e2
RA
240302001-08-27 Robert Anisko <robert.anisko@epita.fr>
24031
f1a87ef6 24032 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
24033 obstack. It was done too late here.
24034
24035 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
24036 completely wrong.
24037 (reader): Initialize the macro obstack here, since we need it to grow
24038 '%define' directives.
24039
24040 * src/reader.h: Declare the macro obstack as extern.
24041
b0cfa28a
RA
240422001-08-27 Robert Anisko <robert.anisko@epita.fr>
24043
24044 * src/output.c (output_parser): Fix. Store single '%' characters in
24045 the output obstack instead of throwing them away.
24046
6fc74234
AD
240472001-08-27 Akim Demaille <akim@epita.fr>
24048
24049 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
24050
9c76d118
RA
240512001-08-25 Robert Anisko <robert.anisko@epita.fr>
24052
24053 * lib/Makefile.am: Adjust.
24054
a8289c62
RA
240552001-08-25 Robert Anisko <robert.anisko@epita.fr>
24056
24057 * src/bison.simple: Update and add '%%' directives.
24058
b6610515
RA
240592001-08-25 Robert Anisko <robert.anisko@epita.fr>
24060
24061 * src/reader.c (reader): Remove calls to 'output_headers' and
24062 'output_trailers'. Remove some C output.
24063 (readgram): Disable a piece of code that was writing a default
24064 definition for 'YYSTYPE'.
24065 (reader_output_yylsp): Remove.
24066 (packsymbols): Output token defintions to a macro.
24067 (copy_definition): Disable C output.
6fc74234 24068
b6610515
RA
24069 * src/reader.c (parse_macro_decl): New function used to parse macro
24070 declarations.
24071 (copy_string2): Put the body of copy_string into this new function.
24072 Add a parameter to let the caller choose whether he wants to copy the
24073 string delimiters or not.
24074 (copy_string): Be a simple call to copy_string2 with the last argument
24075 bound to true.
24076 (read_declarations): Add case for macro definition.
24077 (copy_identifier): New.
6fc74234 24078 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
24079 rather than lex.
24080
26f609ff
RA
240812001-08-25 Robert Anisko <robert.anisko@epita.fr>
24082
24083 * src/output.c (prepare): Add prefixed names.
24084 (output_parser): Output semantic actions.
24085 (output_parser): Fix bug on '%%line' directives.
6fc74234 24086
26f609ff
RA
24087 * src/output.c (output_headers): Remove. The C code printed by this
24088 function should now be in the skeletons.
24089 (output_trailers): Remove.
24090 (output): Disable call to 'reader_output_yylsp'.
24091 (output_rule_data): Do not output tables to the table obstack.
24092
24093 * src/output.c: Remove some C dedicated output.
24094 Improve the use of macro and output obstacks.
24095 (output_defines): Remove.
6fc74234 24096
26f609ff
RA
24097 * src/output.c (output_token_translations): Associate 'translate'
24098 table with a macro. No output to the table obstack.
24099 (output_gram): Same for 'rhs' and 'prhs'.
24100 (output_stos): Same for 'stos'.
24101 (output_rule_data): Same for 'r1' and 'r2'.
24102 (token_actions): Same for 'defact'.
24103 (goto_actions): Same for 'defgoto'.
24104 (output_base): Same for 'pact' and 'pgoto'.
24105 (output_table): Same for 'table'.
24106 (output_check): Same for 'check'.
6fc74234 24107
26f609ff
RA
24108 * src/output.c (output_table_data): New function.
24109 (output_short_table): Remove.
24110 (output_short_or_char_table): Remove.
6fc74234 24111
26f609ff
RA
24112 * src/output.c (output_parser): Replace most of the skeleton copy code
24113 with something new. Skeletons are now processed character by character
24114 rather than line by line, and Bison looks for '%%' macros. This is the
24115 first step in making Bison's output process (a lot) more flexible.
24116 (output_parser): Use the macro table.
24117
6f43b113
RA
241182001-08-25 Robert Anisko <robert.anisko@epita.fr>
24119
24120 * src/main.c (main): Initialize the macro table.
24121
dd3127cf
RA
241222001-08-25 Robert Anisko <robert.anisko@epita.fr>
24123
24124 * src/lex.c (percent_table): Add tok_define.
24125 * src/lex.h: Add tok_define.
24126
aa321494
RA
241272001-08-25 Robert Anisko <robert.anisko@epita.fr>
24128
24129 * src/macrotab.c: New file.
24130 * src/macrotab.h: New file.
24131 * src/Makefile.am: Update.
24132
68bd3b6b
RA
241332001-08-25 Robert Anisko <robert.anisko@epita.fr>
24134
24135 * lib/hash.c: New file.
24136 * lib/hash.h: New file.
24137 * lib/Makefile.am: Update.
24138
45f8dd1e
AD
241392001-08-15 Akim Demaille <akim@epita.fr>
24140
24141 Version 1.28c.
24142
40a64a7a 241432001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
24144
24145 * src/reader.c (readgram): Indent output macro YYSTYPE.
24146 (packsymbols): Likewise.
24147 (output_token_defines): Likewise.
24148 * src/files.c: Standardize.
24149 (compute_header_macro): New.
24150 (defines_obstack_save): New. Use compute_header_macro.
24151 (output_files): Update. Use defines_obstack_save.
24152
f9a8293a
AD
241532001-08-15 Akim Demaille <akim@epita.fr>
24154
24155 * doc/bison.texinfo (Table of Symbols): Document
24156 YYSTACK_USE_ALLOCA.
24157
150ca7a7
AD
241582001-08-15 Akim Demaille <akim@epita.fr>
24159
24160 * missing: Update from CVS Automake.
24161 * config/config.guess, config/config.sub, config/texinfo.tex:
24162 Update from gnu.org.
24163
69b5cec4
AD
241642001-08-15 Akim Demaille <akim@epita.fr>
24165
24166 * Makefile.maint: Sync with CVS Autoconf.
24167
f2b5126e
PB
241682001-08-14 Pascal Bart <pascal.bart@epita.fr>
24169
69b5cec4 24170 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
24171 `fdl.texi'.
24172 * doc/fdl.texi: Add to package.
24173
4ecbf796
MA
241742001-08-14 Marc Autret <autret_m@epita.fr>
24175
24176 Turn on %{source,header}_extension features.
24177
69b5cec4 24178 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
24179 source_extension.
24180 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 24181 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
24182 between options.
24183
95fb5662
MA
241842001-08-14 Marc Autret <autret_m@epita.fr>
24185
24186 * src/files.c (compute_base_names): Add extensions computing when
24187 `--file-prefix' used.
24188 Standardize function calls.
24189
78d09da9
MA
241902001-08-13 Marc Autret <autret_m@epita.fr>
24191
69b5cec4 24192 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
24193 defining it (defined but null disables alloca).
24194
5a009f2c
MA
241952001-08-13 Marc Autret <autret_m@epita.fr>
24196
24197 * src/bison.simple (_yy_memcpy): CPP reformat.
24198
1e41465a
PB
241992001-08-13 Pascal Bart <pascal.bart@epita.fr>
24200
24201 * tests/atconfig.in (CPPFLAGS): Fix.
24202
c67a198d
PB
242032001-08-10 Pascal Bart <pascal.bart@epita.fr>
24204
79282c6c 24205 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
24206 `gpl.texi'.
24207 * doc/gpl.texi: Add to package.
24208
09a6de7e
MA
242092001-08-10 Marc Autret <autret_m@epita.fr>
24210
24211 * src/print_graph.h: Fix.
24212 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
24213
b77b9ee0
AD
242142001-08-10 Akim Demaille <akim@epita.fr>
24215
24216 * src/system.h: Provide default declarations for stpcpy, strndup,
24217 and strnlen.
24218
3e259915
MA
242192001-08-10 Robert Anisko <anisko_r@epita.fr>
24220
24221 * doc/bison.texinfo (Locations): Update @$ stuff.
24222
ca96bc2d
MA
242232001-08-09 Robert Anisko <anisko_r@epita.fr>
24224
24225 * src/bison.simple (YYLLOC_DEFAULT): Update.
24226 (yyparse): Adjust.
24227
fdc6758b
MA
242282001-08-08 Marc Autret <autret_m@epita.fr>
24229
b77b9ee0 24230 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
24231 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
24232 Reported by Fabrice Bauzac.
957d4dbf 24233
600cad3b
MA
242342001-08-08 Marc Autret <autret_m@epita.fr>
24235
24236 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
24237 * src/vcg.c (output_node): Fix.
24238 * src/vcg.h: Cleanup.
24239 * src/print_graph.c: Add comments.
b77b9ee0 24240 (node_output_size): New global variable. Simplify the formatting of
600cad3b 24241 the VCG graph output.
b77b9ee0 24242 (print_actions): Unused code is now used. It notifies the final state
600cad3b 24243 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 24244 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
24245 blue.
24246 Get the current node name and node_obstack by argument.
24247 (node_obstack): New variable.
24248 (print_state): Manage node_obstack.
24249 (print_core): Use node_obstack given by argument.
24250 A node is not only computed here but in print_actions also.
24251 (print_graph): CPP out useless code instead of commenting it.
24252
976e528f
AD
242532001-08-07 Pascal Bart <pascal.bart@epita.fr>
24254
24255 * tests/atconfig.in (CPPFLAGS): Fix.
24256
20e8e5ca
AD
242572001-08-07 Akim Demaille <akim@epita.fr>
24258
24259 * src/print_graph.c (quote): New.
24260 (print_core): Use it.
24261
957d4dbf 242622001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 24263
3e3da797
AD
24264 * src/vcg.c (complain.h): Include it.
24265 Unepitaize `return' invocations.
c4b66126 24266 [NDEBUG] (main): Remove.
79282c6c 24267 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
24268 * src/files.c (open_files): Initialize graph_obstack.
24269 * src/print_graph.c (print_actions): CPP out useless code.
24270 (print_core): Don't output the last `\n' in labels.
24271 Use `quote'.
24272 * src/files.c (output_files): Output the VCG file.
24273 * src/main.c (main): Invoke print_graph ();
3e3da797 24274
957d4dbf 242752001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
24276
24277 Automaton VCG graph output.
24278 Using option ``-g'' or long option ``--graph'', you can generate
24279 a gram_filename.vcg file containing a VCG description of the LALR (1)
24280 automaton of your grammar.
24281
24282 * src/main.c: Call to print_graph() function.
24283 * src/getargs.h: Update.
24284 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
24285 (graph_flag): New flag.
24286 (longopts): Update.
24287 (getargs): Add case `g'.
24288 * src/files.c (graph_obstack): New obstack struct.
24289 (open_files): Initialize new obstack.
24290 (output_files): Saves graph_obstack if required.
24291 * src/files.h (graph_obstack): New extern declaration.
24292 * src/Makefile.am: Add new source files.
24293
927c1557 242942001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
24295
24296 * src/print_graph.c, src/print_graph.h (graph): New.
24297 * src/vcg.h: New file.
24298 * src/vcg.c: New file, VCG graph handling.
24299
7333d403
AD
243002001-08-06 Marc Autret <autret_m@epita.fr>
24301
24302 Add of %source_extension and %header_extension which specify
24303 the source or/and the header output file extension.
24304
24305 * src/files.c (compute_base_names): Remove initialisation of
24306 src_extension and header_extension.
24307 (compute_exts_from_gf): Update.
24308 (compute_exts_from_src): Update.
24309 (output_files): Update.
24310 * src/reader.c (parse_header_extension_decl): New.
24311 (parse_source_extension_decl): New.
24312 (read_declarations): New case statements for the new tokens.
24313 * src/lex.c (percent_table): Add entries for %source_extension
24314 and %header_extension.
24315 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
24316
84163231
AD
243172001-08-06 Marc Autret <autret_m@epita.fr>
24318
24319 * configure.in: Bump to 1.28c.
24320 * doc/bison.texinfo: Texinfo thingies.
24321
8303fc42
AD
243222001-08-04 Pascal Bart <pascal.bart@epita.fr>
24323
24324 * tests/atconfig.in (CPPFLAGS): Add.
24325 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
24326
70a84437
AD
243272001-08-03 Akim Demaille <akim@epita.fr>
24328
24329 Version 1.28b.
24330
2ce10144
AD
243312001-08-03 Akim Demaille <akim@epita.fr>
24332
24333 * tests/Makefile.am (check-local): Ship testsuite.
24334 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
24335 Include `string.h'.
24336
1e3e4bc1
AD
243372001-08-03 Akim Demaille <akim@epita.fr>
24338
24339 * configure.in: Try using -Wformat when compiling.
24340
42b45b7f
AD
243412001-08-03 Akim Demaille <akim@epita.fr>
24342
24343 * configure.in: Bump to 1.28b.
24344
8f13fe33
AD
243452001-08-03 Akim Demaille <akim@epita.fr>
24346
24347 * src/complain.c: Adjust strerror_r portability issues.
24348
b37ba92c
AD
243492001-08-03 Akim Demaille <akim@epita.fr>
24350
24351 Version 1.28a.
24352
b0ce6046
AD
243532001-08-03 Akim Demaille <akim@epita.fr>
24354
24355 * src/getargs.c, src/getarg.h (skeleton)): Constify.
24356 * src/lex.c (literalchar): Avoid name clashes on `buf'.
24357 * src/getargs.c: Include complain.h.
24358 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
24359 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
24360
d01c415b
AD
243612001-08-03 Akim Demaille <akim@epita.fr>
24362
24363 * src/reader.c (readgram): Display hidden chars in error messages.
24364
459dd1a6
AD
243652001-08-03 Akim Demaille <akim@epita.fr>
24366
24367 Update to gettext 0.10.39.
24368
53b74c0c
AD
243692001-08-03 Akim Demaille <akim@epita.fr>
24370
24371 * lib/strspn.c: New.
24372
234a3be3
AD
243732001-08-01 Marc Autret <autret_m@epita.fr>
24374
24375 * doc/bison.texinfo: Update.
24376 * doc/bison.1 (mandoc): Update.
24377 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
24378 * src/files.c: Support output files extensions computing.
24379 (src_extension): New static variable.
24380 (header_extension): New static variable.
24381 (tr): New function.
24382 (get_extension_index): New function, gets the index of an extension
24383 filename in a string.
24384 (compute_exts_from_gf): New function, computes extensions from the
24385 grammar file extension.
24386 (compute_exts_from_src): New functions, computes extensions from the
24387 C source file extension, file given by ``-o'' option.
24388 (compute_base_names): Update.
24389 (output_files): Update.
24390
847bf1f5
AD
243912001-08-01 Robert Anisko <anisko_r@epita.fr>
24392
d995fee7 24393 * doc/bison.texi: Document @$.
847bf1f5
AD
24394 (Locations): New section.
24395
d074a105
AD
243962001-07-18 Akim Demaille <akim@epita.fr>
24397
24398 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
24399 * config/prev-version.txt, config/move-if-change: New.
24400 * Makefile.am: Adjust.
24401
3419715d
AD
244022001-07-08 Pascal Bart <pascal.bart@epita.fr>
24403
24404 * src/bison.simple (yyparse): Suppress warning `comparaison
24405 between signed and unsigned'.
24406
62ab6972
AD
244072001-07-05 Pascal Bart <pascal.bart@epita.fr>
24408
24409 * src/getargs.h (raw_flag): Remove.
24410 * src/getargs.c: Die on `-r'/`--raw'.
24411 * src/lex.c (parse_percent_token): Die on `%raw'.
24412 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
24413 * tests/calc.at: Suppress test with option `--raw'.
24414
1e24cc5b
AD
244152001-07-14 Akim Demaille <akim@epita.fr>
24416
24417 * config/: New.
24418 * configure.in: Require Autoconf 2.50.
24419 Update to gettext 0.10.38.
24420
32dfccf8
AD
244212001-03-16 Akim Demaille <akim@epita.fr>
24422
24423 * doc/bison.texinfo: ANSIfy the examples.
24424
cd5bd6ac
AD
244252001-03-16 Akim Demaille <akim@epita.fr>
24426
24427 * getargs.c (skeleton): New variable.
24428 (longopts): --skeleton is a new option.
24429 (shortopts, getargs): -S is a new option.
24430 * getargs.h: Declare skeleton.
24431 * output.c (output_parser): Use it.
24432
5141b016
AD
244332001-03-16 Akim Demaille <akim@epita.fr>
24434
24435 * m4/strerror_r.m4: New.
24436 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24437 * lib/error.h, lib/error.c: Update.
24438
447992b9
AD
244392001-03-16 Akim Demaille <akim@epita.fr>
24440
24441 * src/getargs.c (longopts): Clean up.
24442
274d42ce
AD
244432001-02-21 Akim Demaille <akim@epita.fr>
24444
24445 * src/reader.c (gensym): `gensym_count' is your own.
24446 Use a static buf to create the symbol name, as token_buffer is no
24447 longer a buffer.
24448
22c821f3
AD
244492001-02-08 Akim Demaille <akim@epita.fr>
24450
24451 * src/conflicts.c (conflict_report): Be sure not to append to res
24452 between two calls, which could happen if both first sprintf were
24453 skipped, but not the first cp += strlen.
24454
18569462
AD
244552001-02-08 Akim Demaille <akim@epita.fr>
24456
24457 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24458 New, from fileutils 4.0.37.
24459 * configure.in: Require Autoconf 2.49c. I took some time before
24460 making this decision. This is the only way out for portability
24461 issues in Bison, it would mean way too much duplicate effort to
24462 import in Bison features implemented in 2.49c since 2.13.
24463 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24464
0d8f3c8a
AD
244652001-02-02 Akim Demaille <akim@epita.fr>
24466
24467 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 24468 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 24469
f17bcd1f
AD
244702001-01-19 Akim Demaille <akim@epita.fr>
24471
24472 Get rid of the ad hoc handling of token_buffer in the scanner: use
24473 the obstacks.
24474
24475 * src/lex.c (token_obstack): New.
24476 (init_lex): Initialize it. No longer call...
24477 (grow_token_buffer): this. Remove it.
24478 Adjust all the places which used it to use the obstack.
24479
511e79b3
AD
244802001-01-19 Akim Demaille <akim@epita.fr>
24481
24482 * src/lex.h: Rename all the tokens:
24483 s/\bENDFILE\b/tok_eof/g;
24484 s/\bIDENTIFIER\b/tok_identifier/g;
24485 etc.
24486 Let them be enums, not #define, to ease debugging.
24487 Adjust all the code.
24488
0d6508ef
AD
244892001-01-18 Akim Demaille <akim@epita.fr>
24490
24491 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24492 * src/lex.c (maxtoken, grow_token_buffer): Static.
24493
6deb4447
AD
244942001-01-18 Akim Demaille <akim@epita.fr>
24495
24496 Since we now use obstacks, more % directives can be enabled.
24497
24498 * src/lex.c (percent_table): Also accept `%yacc',
24499 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24500 `%debug'.
24501 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24502 instead of returning a token.
24503 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24504 * src/reader.c (read_declarations): Adjust.
24505 * src/files.c (open_files): Don't call `compute_base_names', don't
24506 compute `attrsfile' since they depend upon data which might be
24507 *in* the input file now.
24508 (output_files): Do it here.
24509 * src/output.c (output_headers): Document the fact that this patch
24510 introduces a guaranteed SEGV for semantic parsers.
24511 * doc/bison.texinfo: Document them.
24512 * tests/suite.at: Exercise these %options.
24513
ff4423cc
AD
245142000-12-20 Akim Demaille <akim@epita.fr>
24515
24516 Also handle the output file (--verbose) with obstacks.
24517
24518 * files.c (foutput): Remove.
24519 (output_obstack): New.
24520 Adjust all dependencies.
24521 * src/conflicts.c: Return a string.
24522 * src/system.h (obstack_grow_string): Rename as...
24523 (obstack_sgrow): this. Be ready to work with non literals.
24524 (obstack_fgrow4): New.
24525
956dba3a
AD
245262000-12-20 Akim Demaille <akim@epita.fr>
24527
24528 * src/files.c (open_files): Fix the computation of short_base_name
24529 in the case of `-o foo.tab.c'.
24530
337bab46
AD
245312000-12-20 Akim Demaille <akim@epita.fr>
24532
24533 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24534 (copy_dollar): Now that everything uses obstacks, get rid of the
24535 FILE * parameters.
24536
5d3214b8
AD
245372000-12-20 Akim Demaille <akim@epita.fr>
24538
24539 * src/files.c (open_files): Actually the `.output' file is based
24540 on the short_base_name, not base_name.
24541 * tests/suite.at (Checking output file names): Adjust.
24542
29092a57
AD
245432000-12-20 Akim Demaille <akim@epita.fr>
24544
24545 * src/bison.s1: Remove, we now use directly...
24546 * src/bison.simple: this.
24547 * src/Makefile.am: Use pkgdata instead of data.
24548
ea5607fd
AD
245492000-12-20 Akim Demaille <akim@epita.fr>
24550
24551 * src/files.c (guard_obstack): New.
24552 (open_files): Initialize it.
24553 (output_files): Dump it...
24554 * src/files.h: Export it.
24555 * src/reader.c (copy_guard): Use it.
24556
27110317
AD
245572000-12-19 Akim Demaille <akim@epita.fr>
24558
24559 * src/files.c (outfile, defsfile, actfile): Removed as global
24560 vars.
24561 (open_files): Don't compute them.
24562 (output_files): Adjust.
24563 (base_name, short_base_name): Be global.
24564 Adjust dependencies.
24565
19c50364
AD
245662000-12-19 Akim Demaille <akim@epita.fr>
24567
24568 * src/files.c (strsuffix): New.
24569 (stringappend): Be just like strcat but allocate.
24570 (base_names): Eve out from open_files.
24571 Try to simplify the rather hairy computation of base_name and
24572 short_base_name.
24573 (open_files): Use it.
24574 * tests/suite.at (Checking output file names): New test.
24575
573c1d9f
AD
245762000-12-19 Akim Demaille <akim@epita.fr>
24577
24578 * src/system.h (obstack_grow_literal_string): Rename as...
24579 (obstack_grow_string): this.
24580 * src/output.c (output_parser): Recognize `%% actions' instead of
24581 `$'.
24582 * src/bison.s1: s/$/%% actions/.
24583 * src/bison.hairy: Likewise.
24584
ef7ddedd
AD
245852000-12-19 Akim Demaille <akim@epita.fr>
24586
24587 * src/output.c (output_parser): Compute the `#line' lines when
24588 there are.
24589 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24590 Suggested by Hans Aberg.
24591
ff61dabd
AD
245922000-12-19 Akim Demaille <akim@epita.fr>
24593
24594 Let the handling of the skeleton files be local to the procedures
24595 that use it.
24596
24597 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24598 longer static.
24599 (fparser, open_extra_files): Remove.
24600 (open_files, output_files): Don't take care of fparser.
24601 * src/files.h: Adjust.
24602 * src/output.c (output_parser): Open and close the file to the
24603 skeleton.
24604 * src/reader.c (read_declarations): When %semantic_parser, open
24605 fguard.
24606
55b96341
AD
246072000-12-19 Akim Demaille <akim@epita.fr>
24608
24609 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24610 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24611
358c15b7
AD
246122000-12-19 Akim Demaille <akim@epita.fr>
24613
24614 * src/files.c (open_files): Yipee! We no longer need all the code
24615 looking for `/tmp' since we have no tmp file.
24616
7de3329e
AD
246172000-12-19 Akim Demaille <akim@epita.fr>
24618
24619 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24620 New macros.
24621 * src/files.c (open_files): Less dependency on MSDOS etc.
24622
3abcd459
AD
246232000-12-14 Akim Demaille <akim@epita.fr>
24624
24625 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24626 Provide a default definition.
24627 Use it when executing the default @ action.
24628 * src/reader.c (reader_output_yylsp): No longer include
24629 `timestamp' and `text' in the default YYLTYPE.
24630
2a91a95e
AD
246312000-12-12 Akim Demaille <akim@epita.fr>
24632
24633 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24634 (copy_guard): Quote the file names.
24635 Reported by Laurent Mascherpa.
24636
14d3eb9b
AD
246372000-12-12 Akim Demaille <akim@epita.fr>
24638
24639 * src/output.c (output_headers, output_program, output): Be sure
24640 to escape special characters when outputting filenames.
24641 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24642 (output_headers): Don't depend on them, Use ACTSTR.
24643
d7045ec6
AD
246442000-11-17 Akim Demaille <akim@epita.fr>
24645
24646 * lib/obstack.h: Formatting changes.
24647 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24648 prevents type checking.
24649 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24650 cast the value to (void *): assigning a `foo *' to a `void *'
24651 variable is valid.
24652 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24653 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24654 append characters.
24655
6fd54b73
AD
246562000-11-17 Akim Demaille <akim@epita.fr>
24657
24658 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24659 as...
24660 (suite.m4, regression.m4, calc.m4): these.
24661 * tests/atgeneral.m4: Update from CVS Autoconf.
24662
4c50eae6
AD
246632000-11-17 Akim Demaille <akim@epita.fr>
24664
24665 * tests/regression.m4 (%union and --defines): New test,
24666 demonstrating a current bug in the obstack implementation.
24667
a35f64ea
AD
246682000-11-17 Akim Demaille <akim@epita.fr>
24669
24670 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24671 macros.
24672 Use them to declare the variables which are global or local to
24673 `yyparse'.
24674
7de23534
AD
246752000-11-17 Akim Demaille <akim@epita.fr>
24676
24677 * acconfig.h: Remove, no longer used.
24678
aa7815f5
AD
246792000-11-07 Akim Demaille <akim@epita.fr>
24680
24681 * src: s/Copyright (C)/Copyright/g.
24682
5af1f549
AD
246832000-11-07 Akim Demaille <akim@epita.fr>
24684
24685 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24686 defining.
24687 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24688
553e2b22
AD
246892000-11-07 Akim Demaille <akim@epita.fr>
24690
24691 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24692 Merge in a single CPP if/else.
24693
8a4f41d6
AD
246942000-11-07 Akim Demaille <akim@epita.fr>
24695
24696 * src/output.c (output): Remove useless variables.
24697 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24698 argument `data' for consistency with the prototypes.
24699 Qualify it `const'.
24700 (obstack_copy, obstack_copy0): Rename the second argument as
24701 `address' for consistency. Qualify it `const'.
24702 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24703 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24704 `const' their input argument (`data' or `address').
24705 Adjust the corresponding macros to include `const' in casts.
24706
095a3fb5
AD
247072000-11-03 Akim Demaille <akim@epita.fr>
24708
24709 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24710 s/PFILE1/BISON_HAIRY/.
24711 Adjust dependencies.
24712
d1cdce7c
AD
247132000-11-03 Akim Demaille <akim@epita.fr>
24714
090c5ebf 24715 For some reason, this was not applied.
d1cdce7c
AD
24716
24717 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24718 `unlink': it's no longer used.
24719
9311529b
AD
247202000-11-03 Akim Demaille <akim@epita.fr>
24721
24722 * src/files.c (skeleton_find): New function, eved out of...
24723 (open_files, open_extra_files): here.
24724
d8880f69
AD
247252000-11-03 Akim Demaille <akim@epita.fr>
24726
24727 Don't use `atexit'.
24728
24729 * src/files.c (obstack_save): New function.
24730 (done): Rename as...
24731 (output_files): this.
24732 Use `obstack_save'.
24733 * src/main.c (main): Don't use `atexit' to register `done', since
24734 it no longer has to remove tmp files, just call `output_files'
24735 when there are no errors.
24736
0dbb648e
AD
247372000-11-02 Akim Demaille <akim@epita.fr>
24738
24739 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24740 `unlink': it's no longer used.
24741 * src/files.h: Formatting changes.
24742
896fe5c1
AD
247432000-11-02 Akim Demaille <akim@epita.fr>
24744
24745 Remove the last uses of mktemp and unlink/delete.
24746
24747 * src/files.c (fdefines, ftable): Removed.
24748 (defines_ostack, table_obstack): New.
24749 Adjust dependencies of the former into uses of the latter.
24750 * src/output.c (output_short_or_char_table, output_short_table):
24751 Convert to using obstacks.
24752 * src/reader.c (copy_comment2): Accept one FILE * and two
24753 obstacks.
24754 (output_token_defines, reader_output_yylsp): Use obstacks.
24755 * src/system.h (obstack_fgrow3): New.
1f65350a 24756 * po/POTFILES.in: Adjust.
896fe5c1 24757
dd60faec
AD
247582000-11-01 Akim Demaille <akim@epita.fr>
24759
24760 Change each use of `fattrs' into a use of `attrs_obstack'.
24761
24762 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24763 * src/files.c (fattrs): Remove.
24764 (attrs_obstack): New.
24765 Adjust all dependencies.
24766 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24767
8c7ebe49
AD
247682000-11-01 Akim Demaille <akim@epita.fr>
24769
24770 Introduce obstacks.
24771 Change each use of `faction' into a use of `action_obstack'.
24772
24773 * lib/obstack.h, lib/obstack.c: New files.
24774 * src/files.c (faction): Remove.
24775 (action_obstack): New.
24776 Adjust all dependencies.
24777
77aee789
AD
247782000-10-20 Akim Demaille <akim@epita.fr>
24779
24780 * lib/quote.h (PARAMS): New macro. Use it.
24781
43591cec
AD
247822000-10-16 Akim Demaille <akim@epita.fr>
24783
24784 * src/output.c (output_short_or_char_table): New function.
24785 (output_short_table, output_token_translations): Use it.
24786 (goto_actions): Use output_short_table.
24787
1e9798d5
AD
247882000-10-16 Akim Demaille <akim@epita.fr>
24789
24790 * src/symtab.c (bucket_new): New function.
24791 (getsym): Use it.
24792
24793 * src/output.c (output_short_table): New argument to display the
24794 comment associated with the table.
24795 Adjust dependencies.
24796 (output_gram): Use it.
24797 (output_rule_data): Nicer output layout for YYTNAME.
24798
f282676b
AD
247992000-10-16 Akim Demaille <akim@epita.fr>
24800
24801 * src/lex.c (read_typename): New function.
24802 (lex): Use it.
24803 * src/reader.c (copy_dollar): Likewise.
24804
550a72a3
AD
248052000-10-16 Akim Demaille <akim@epita.fr>
24806
24807 * src/reader.c (copy_comment2): Expect the input stream to be on
24808 the `/' which is suspected to open a comment, instead of being
24809 called after `//' or `/*' was read.
24810 (copy_comment, copy_definition, parse_union_decl, copy_action)
24811 (copy_guard): Adjust.
24812
131e2fef
AD
248132000-10-16 Akim Demaille <akim@epita.fr>
24814
24815 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24816 `read_signed_integer'.
24817
79282c5a
AD
248182000-10-16 Akim Demaille <akim@epita.fr>
24819
24820 * src/reader.c (copy_dollar): New function.
24821 (copy_guard, copy_action): Use it.
24822
ff4a34be
AD
248232000-10-16 Akim Demaille <akim@epita.fr>
24824
24825 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24826 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24827 New files, from Fileutils 4.0.27.
24828 * src/main.c (printable_version): Remove.
24829 * src/lex.c, src/reader.c: Use `quote'.
24830
248312000-10-04 Akim Demaille <akim@epita.fr>
24832
24833 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24834
14ded682
AD
248352000-10-04 Akim Demaille <akim@epita.fr>
24836
24837 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24838
8e03724b
AD
248392000-10-04 Akim Demaille <akim@epita.fr>
24840
24841 When a literal string is used to define two different tokens,
24842 `bison -v' segfaults.
24843 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24844
24845 * tests/regression.m4: New file.
24846 Include the core of the sample provided by Piotr Gackiewicz.
24847 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24848 properly.
24849
a9e64249
AD
248502000-10-04 Akim Demaille <akim@epita.fr>
24851
24852 * src/reader.c (parse_expect_decl): Keep `count' within the size
24853 of `buffer'.
24854 From Neil Booth.
24855
da9abf43
AD
248562000-10-02 Paul Eggert <eggert@twinsun.com>
24857
24858 * bison.s1 (yyparse): Assign the default value
24859 unconditionally, to avoid a GCC warning and make the parser a
24860 tad smaller.
24861
c33638bb
AD
248622000-10-02 Akim Demaille <akim@epita.fr>
24863
24864 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24865 options.
24866
444c570a
AD
248672000-10-02 Akim Demaille <akim@epita.fr>
24868
24869 * src/derives.c, src/print.c, src/reduce.c: To ease the
24870 translation, move some `\n' out of the translated strings.
24871
89cab50d
AD
248722000-10-02 Akim Demaille <akim@epita.fr>
24873
24874 The location tracking mechanism is precious for parse error
24875 messages. Nevertheless, it is enabled only when `@n' is used in
24876 the grammar, which is a different issue (you can use it in error
24877 message, but not in the grammar per se). Therefore, there should
24878 be another means to enable it.
24879
24880 * src/getargs.c (getargs): Support `--locations'.
24881 (usage): Report it.
24882 * src/getargs.h (locationsflag): Export it.
24883 * src/lex.c (percent_table): Support `%locations'.
24884 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24885 with `locationsflag'.
24886 * doc/bison.texinfo: Document `--locations' and `%locations'.
24887 Sort the options.
24888 * tests/calc.m4: Test it.
24889
24890 For regularity of the names, replace each
24891 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24892 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24893 In addition replace each `flag' with `_flag'.
24894
d6c2cba0
AD
248952000-10-02 Akim Demaille <akim@epita.fr>
24896
24897 Also test parse error messages, including with YYERROR_VERBOSE.
24898
24899 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24900 associative).
24901 Use it to check the computations.
24902 Use it to check `nonassoc' is honored.
24903 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24904 `--yyerror-verbose'.
24905 (_AT_CHECK_CALC): Adjust to this option.
24906 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24907
5a35a6cb
AD
249082000-10-02 Akim Demaille <akim@epita.fr>
24909
24910 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24911 the latter demonstrates a flaw in the handling of non debugging
24912 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24913 was used in order to simplify:
24914
24915 #if YYDEBUG
24916 if (yydebug)
24917 {
24918 ...
24919 }
24920 #endif
24921
24922 into
24923
24924 if (yydebug)
24925 {
24926 ...
24927 }
24928
24929 unfortunately this leads to a CPP conflict when
24930 `--name-prefix=foo' is used since it produces `#define yydebug
24931 foodebug'.
24932
24933 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24934 (YYDPRINTF): New macro.
24935 Spread its use.
24936 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24937 the bison options.
24938 Also test `--verbose', `--defines' and `--name-prefix'.
24939
71da9eea
AD
249402000-10-02 Akim Demaille <akim@epita.fr>
24941
24942 Improve the readability of the produced parsers.
24943
24944 * src/bison.s1: Formatting changes.
24945 Improve the comment related to the `$' mark.
24946 (yydefault): Don't fall through to `yyresume': `goto' there.
24947 * src/output.c (output_parser): When the `$' is met, skip the end
24948 of its line.
24949 New variable, `number_of_dollar_signs', to check there's exactly
24950 one `$' in the parser skeleton.
24951
95e36146
AD
249522000-10-02 Akim Demaille <akim@epita.fr>
24953
24954 * lib/xstrdup.c: New file, from the fileutils.
24955 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24956 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24957 instead of strlen + xmalloc + strcpy.
24958 * src/symtab.c (copys): Remove, use xstrdup instead.
24959
d7020c20
AD
249602000-10-02 Akim Demaille <akim@epita.fr>
24961
24962 * src/gram.h (associativity): New enum type which replaces the
24963 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24964 `right_assoc', `left_assoc' and `non_assoc'.
24965 Adjust all dependencies.
24966 * src/reader.c: Formatting changes.
24967 (LTYPESTR): Don't define it, use it as a literal in
24968 `reader_output_yylsp'.
24969 * src/symtab.h (symbol_class): New enum type which replaces the
24970 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
24971 `sunknown', `stoken and `snterm'.
24972
1916f98e
AD
249732000-10-02 Akim Demaille <akim@epita.fr>
24974
24975 * src/getargs.c (fixed_outfiles): Rename as...
24976 (yaccflag): for consistency and accuracy.
24977 Adjust dependencies.
24978
d7913476
AD
249792000-10-02 Akim Demaille <akim@epita.fr>
24980
24981 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
24982 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
24983 difficult and introduced a lot of core dump. It turns out that
24984 Bison used an implementation of `xmalloc' based on `calloc', and
24985 at various places it does depend upon the initialization to 0. I
24986 have not tried to isolate the pertinent places, and all the former
24987 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
24988 someone should address this issue.
24989
24990 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
24991 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
24992 files.
24993 Adjust dependencies.
24994 * src/warshall.h: New file.
24995 Propagate.
24996
340ef489
AD
249972000-10-02 Akim Demaille <akim@epita.fr>
24998
24999 Various anti-`extern in *.c' changes.
25000
25001 * src/system.h: Include `assert.h'.
25002
b2ca4022
AD
250032000-10-02 Akim Demaille <akim@epita.fr>
25004
25005 * src/state.h (nstates, final_state, first_state, first_shift)
25006 (first_reduction): Move their exportation from here...
25007 * src/LR0.h: to here.
25008 Adjust dependencies.
25009 * src/getargs.c (statisticsflag): New variable.
25010 Add support for `--statistics'.
25011 Adjust dependencies.
25012
25013 Remove a lot of now useless `extern' statements in most files.
25014
403b315b
AD
250152000-10-02 Akim Demaille <akim@epita.fr>
25016
25017 * src/LR0.h: New file.
25018 Propagate its use.
25019
07a58c13
AD
250202000-10-02 Akim Demaille <akim@epita.fr>
25021
25022 * src/print.h: New file.
25023 Propagate its use.
25024 * src/print.c: Formatting and ordering changes.
25025 (verbose, terse): Replace with...
25026 (print_results): this new function.
25027 Adjust dependencies.
25028
0619caf0
AD
250292000-10-02 Akim Demaille <akim@epita.fr>
25030
25031 * src/conflicts.c (conflict_report): New function.
25032 (conflict_log, verbose_conflict_log): Replace with...
25033 (print_conflicts): this function.
25034 Adjust dependencies.
25035 * src/conflicts.h: New file.
25036 Propagate its inclusion.
25037
3519ec76
AD
250382000-10-02 Akim Demaille <akim@epita.fr>
25039
25040 * src/nullable.h: New file.
25041 Propagate its inclusion.
25042 * src/nullable.c: Formatting changes.
25043
015acc48
AD
250442000-10-02 Akim Demaille <akim@epita.fr>
25045
25046 * src/reduce.h: New file.
25047 Propagate its inclusion.
25048 * src/reduce.c: Topological sort and other formatting changes.
25049 (bool, TRUE, FALSE): Move their definition to...
25050 * src/system.h: here.
25051
8963a27b
AD
250522000-10-02 Akim Demaille <akim@epita.fr>
25053
25054 * src/files.c: Formatting changes.
25055 (tryopen, tryclose, openfiles): Rename as...
25056 (xfopen, xfclose, open_files): this.
25057 (stringappend): static.
25058 * src/files.h: Complete the list of exported symbols.
25059 Propagate its use.
25060
a70083a3
AD
250612000-10-02 Akim Demaille <akim@epita.fr>
25062
25063 * src/reader.h: New file.
25064 Propagate its use instead of tedious list of `extern' and
25065 prototypes.
25066 * src/reader.c: Formatting changes, topological sort,
25067 s/register//.
25068
abadc117
AD
250692000-10-02 Akim Demaille <akim@epita.fr>
25070
25071 * src/lex.h: Prototype `lex.c' exported functions.
25072 * src/reader.c: Adjust.
25073 * src/lex.c: Formatting changes.
25074 (safegetc): Rename as...
25075 (xgetc): this.
25076
720d742f
AD
250772000-10-02 Akim Demaille <akim@epita.fr>
25078
25079 * src/lalr.h: New file.
25080 Propagate its inclusion instead of prototypes and `extern'.
25081 * src/lalr.c: Formatting changes, topological sorting etc.
25082
f2acea59
AD
250832000-10-02 Akim Demaille <akim@epita.fr>
25084
25085 * src/output.c (token_actions): Introduce a temporary array,
25086 YYDEFACT, that makes it possible for this function to use
25087 output_short_table.
25088
d019d655
AD
250892000-10-02 Akim Demaille <akim@epita.fr>
25090
25091 `user_toknums' is output as a `short[]' in `output.c', while it is
25092 defined as a `int[]' in `reader.c'. For consistency with the
25093 other output tables, `user_toknums' is now defined as a table of
25094 shorts.
25095
25096 * src/reader.c (user_toknums): Be a short table instead of an int
25097 table.
25098 Adjust dependencies.
25099
25100 Factor the short table outputs.
25101
25102 * src/output.c (output_short_table): New function.
25103 * src/output.c (output_gram, output_stos, output_rule_data)
25104 (output_base, output_table, output_check): Use it.
25105
6c89f1c1
AD
251062000-10-02 Akim Demaille <akim@epita.fr>
25107
25108 * src/output.c (output): Topological sort of the functions, in
25109 order to get rid of the `static' prototypes.
25110 No longer use `register'.
25111 * src/output.h: New file.
25112 Propagate its inclusion in files explicitly prototyping functions
25113 from output.c.
25114
d9efd181
AD
251152000-09-21 Akim Demaille <akim@epita.fr>
25116
25117 * src/atgeneral.m4: Update from Autoconf.
25118
c29240e7 251192000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
25120
25121 * src/closure.h: New file.
25122 * src/closure.c: Formatting changes, topological sort over the
25123 functions, use of closure.h.
25124 (initialize_closure, finalize_closure): Rename as...
25125 (new_closure, free_closure): these. Adjust dependencies.
25126 * src/LR0.c: Formatting changes, topological sort, use of
25127 cloture.h.
25128 (initialize_states): Rename as...
25129 (new_states): this.
25130 * src/Makefile.am (noinst_HEADERS): Adjust.
25131
499daa50
AD
251322000-09-20 Akim Demaille <akim@epita.fr>
25133
25134 * src/acconfig.h: Don't protect config.h against multiple
25135 inclusion.
25136 Don't define PARAMS.
25137 * src/system.h: Define PARAMS.
25138 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
25139 purpose of config.h. system.h must not try to fix wrong
25140 definitions in config.h.
25141
cc84fd5d
AD
251422000-09-20 Akim Demaille <akim@epita.fr>
25143
25144 * src/derives.h: New file.
25145 * src/main.c, src/derives.h: Use it.
25146 Formatting changes.
25147 * src/Makefile.am (noinst_HEADERS): Adjust.
25148
db5b3a89
AD
251492000-09-20 Akim Demaille <akim@epita.fr>
25150
25151 * tests/atgeneral.m4: Update from Autoconf.
25152 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
25153 (AT_CHECK_CALC): New macros.
25154 Use these macros to test bison with options `', `--raw',
25155 `--debug', `--yacc', `--yacc --debug'.
25156
ceed8467
AD
251572000-09-19 Akim Demaille <akim@epita.fr>
25158
25159 * src/output.c: Formatting changes.
25160 * src/machine.h: Remove, leaving its contents in...
25161 * src/system.h: here.
25162 Include stdio.h.
25163 Adjust all dependencies on stdio.h and machine.h.
25164 * src/getargs.h: New file.
25165 Let all `extern' declarations about getargs.c be replaced with
25166 inclusion of `getargs.h'.
25167 * src/Makefile.am (noinst_HEADERS): Adjust.
25168
25169 * tests/calc.m4 (yyin): Be initialized in main, not on the global
25170 scope.
25171 (yyerror): Returns void, not int.
25172 * doc/bison.texinfo: Formatting changes.
25173
05a1d24b
AD
251742000-09-19 Akim Demaille <akim@epita.fr>
25175
25176 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
25177 portable.
25178
cbd25751
AD
251792000-09-18 Akim Demaille <akim@epita.fr>
25180
25181 * configure.in: Append WARNING_CFLAGS to CFLAGS.
25182 * src/Makefile.am (INCLUDES): Don't.
25183 Be ready to fetch headers in lib/.
25184
13863333
AD
251852000-09-18 Akim Demaille <akim@epita.fr>
25186
25187 * doc/bison.texinfo: Update the copyright.
25188 ANSIfy and GNUify the examples.
25189 Remove the old menu.
25190
0d533154
AD
251912000-09-18 Akim Demaille <akim@epita.fr>
25192
25193 First set of tests: use the `calc' example from the documentation.
25194
25195 * src/bison.s1 (yyparse): Condition the code using `yytname' which
25196 is defined only when YYDEBUG is.
25197 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
25198 * src/files.c (tryopen, tryclose): Formatting changes.
25199 Move to the top and be static.
25200 * src/reader.c (read_signed_integer): Likewise.
25201 * tests/calc.m4: New file.
25202 * Makefile.am, suite.m4: Adjust.
25203 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
25204
e79137ac
AD
252052000-09-18 Akim Demaille <akim@epita.fr>
25206
25207 Add support for an Autotest test suite for Bison.
25208
25209 * m4/m4.m4, m4/atconfig.m4: New files.
25210 * m4/Makefile.am (EXTRA_DIST): Adjust.
25211 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
25212 files.
25213 * src/getargs.c: Display a more standard --version message.
25214 * src/reader.c (reader): Formatting changes.
25215 No longer depend upon VERSION_STRING.
25216 * configure.in: No longer use `dnl'.
25217 Set up the test suite and the new directory `tests/.
25218 (VERSION_STRING): Remove.
25219
27821bff
AD
252202000-04-14 Akim Demaille <akim@epita.fr>
25221
25222 * src/reader.c (copy_comment2): New function, same as former
25223 `copy_comment', but outputs into two FILE *.
25224 (copy_comment): Use it.
25225 (parse_union_decl): Use it.
25226 (get_type, parse_start_decl): Use the same `invalid' message.
25227 (parse_start_decl, parse_union_decl): Use the same `multiple'
25228 message.
25229 (parse_union_decl, copy_guard, copy_action): Use the same
25230 `unmatched' message.
25231 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
25232
cfe5fbc0
AD
252332000-03-31 Akim Demaille <akim@epita.fr>
25234
25235 * src/files.c (tryopen, tryclose): Move to the top.
25236 Be static.
25237
cb7db13e
AD
252382000-03-31 Akim Demaille <akim@epita.fr>
25239
25240 * src/main.c (main): Don't call `done', exit does it.
25241
a0f6b076
AD
252422000-03-31 Akim Demaille <akim@epita.fr>
25243
36281465
AD
25244 * allocate.c: s/return (foo)/return foo/.
25245 * lalr.c: Likewise.
25246 * LR0.c: Likewise.
25247 * output.c: Likewise.
25248 * reader.c: Likewise.
25249 * symtab.c: Likewise.
25250 * vmsgetargs.c: Likewise.
25251
252522000-03-31 Akim Demaille <akim@epita.fr>
25253
25254 Clean up the error reporting functions.
a0f6b076
AD
25255
25256 * src/report.c: New file.
25257 * src/report.h: Likewise.
25258 * src/Makefile.am: Adjust.
25259 * m4/error.m4: New file.
25260 * m4/Makefile.am: Adjust.
25261 * configure.in (jm_PREREQ_ERROR): Call it.
25262 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
25263 Remove.
25264 (fatal, fatals): Remove. All callers use complain.c::fatal.
25265 (warn, warni, warns, warnss, warnss): Remove. All callers use
25266 complain.c::complain.
25267 (toomany): Remove, use fatal instead.
25268 * src/files.c (done): No argument, use complain_message_count.
25269 * src/main.c (main): Register `done' to `atexit'.
25270
25271 * src/getargs.c (usage): More `fputs', less `fprintf'.
25272
18539825
AD
252732000-03-28 Akim Demaille <akim@epita.fr>
25274
25275 * lib/: New directory.
25276 * Makefile.am (SUBDIRS): Adjust.
25277 * configure.in: Adjust.
25278 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
25279 useless.
25280 * src/alloca.c: Moved to lib/.
25281 * src/getopt.c: Likewise.
25282 * src/getopt1.c: Likewise.
25283 * src/getopt.h: Likewise.
25284 * src/ansi2knr.c: Likewise.
25285 * src/ansi2knr.1: Likewise.
25286 * src/Makefile.am: Adjust.
25287 * lib/Makefile.am: New file.
25288
9f306f2a
AD
252892000-03-28 Akim Demaille <akim@epita.fr>
25290
25291 * src/getargs.c (usage): Refresh the help message.
25292
0ba347b6
AD
252932000-03-17 Akim Demaille <akim@epita.fr>
25294
25295 * src/getopt1.c: Updated from textutils 2.0e
25296 * src/getopt.c: Likewise.
25297 * src/getopt.h: Likewise.
25298
dbe7f271
AD
252992000-03-17 Akim Demaille <akim@epita.fr>
25300
25301 * src/Makefile.am (bison.simple): Fix the awk program: quote only
25302 the file name, not the whole `#line LINE FILE'.
25303
75bbe78d
AD
253042000-03-17 Akim Demaille <akim@epita.fr>
25305
25306 On syntax errors, report the token on which we choked.
25307
aa5fd0ee
AD
25308 * src/bison.s1 (yyparse): In the label yyerrlab, when
25309 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 25310
7b306f52
AD
253112000-03-17 Akim Demaille <akim@epita.fr>
25312
aa5fd0ee 25313 * src/reader.c (copy_at): New function.
7b306f52
AD
25314 (copy_guard): Use it.
25315 (copy_action): Use it.
25316
e87b5700
AD
253172000-03-17 Akim Demaille <akim@epita.fr>
25318
25319 Be kind to translators, save some useless translations.
25320
aa5fd0ee 25321 * src/main.c (banner): New function.
e87b5700
AD
25322 (fatal_banner): Use it.
25323 (warn_banner): Use it.
25324
ae3c3164
AD
253252000-03-17 Akim Demaille <akim@epita.fr>
25326
aa5fd0ee
AD
25327 * src/reader.c (copy_definition): Use copy_string and
25328 copy_comment. Removed now unused `match', `ended',
25329 `cplus_comment'.
ae3c3164
AD
25330 (copy_comment, copy_string): Moved, to be visible from
25331 copy_definition.
25332
4dc58e7c
AD
253332000-03-17 Akim Demaille <akim@epita.fr>
25334
aa5fd0ee
AD
25335 * src/reader.c (copy_string): Declare `static inline'. No
25336 problems with inline, since it is checked by configure.
4dc58e7c
AD
25337 (copy_comment): Likewise.
25338
0a6384c4
AD
253392000-03-17 Akim Demaille <akim@epita.fr>
25340
aa5fd0ee 25341 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 25342
3cef001a
AD
253432000-03-17 Akim Demaille <akim@epita.fr>
25344
aa5fd0ee 25345 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
25346 (copy_action): Use it. Removed now unused `match', `ended',
25347 `cplus_comment'.
25348 (copy_guard): Likewise.
25349
ca36d2ef
AD
253502000-03-17 Akim Demaille <akim@epita.fr>
25351
aa5fd0ee 25352 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
25353 (copy_action): Use it.
25354 (copy_guard): Likewise.
25355
6666f98f
AD
253562000-03-17 Akim Demaille <akim@epita.fr>
25357
25358 Change the handling of @s so that they behave exactly like $s.
25359 There is now a pseudo variable @$ (readble and writable), location
25360 of the lhs of the rule (by default ranging from the location of
25361 the first symbol of the rhs, to the location of the last symbol,
25362 or, if the rhs is empty, YYLLOC).
25363
25364 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
25365 yyval.
25366 (yyparse): When providing a default semantic action, provide a
25367 default location action.
25368 (after the $): No longer change `*YYLSP', just stack YYLOC the
25369 same way you stack YYVAL.
25370 * src/reader.c (read_declarations): Use warns.
25371 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
25372 (copy_action, case '@'): Likewise.
25373 Use a standard error message, to save useless work from
25374 translators.
25375
41aca2e0
AD
253762000-03-17 Akim Demaille <akim@epita.fr>
25377
aa5fd0ee
AD
25378 * src/bison.s1: Formatting and cosmetics changes.
25379 * src/reader.c: Likewise.
41aca2e0
AD
25380 Update the Copyright notice.
25381
dc08c1d5
AD
253822000-03-17 Akim Demaille <akim@epita.fr>
25383
aa5fd0ee
AD
25384 * src/bison.s1 (#line): All set to `#line' only, since the
25385 Makefile now handles them.
dc08c1d5 25386
9ee3c97b
AD
253872000-03-16 Akim Demaille <akim@epita.fr>
25388
25389 * src/output.c (output_rule_data): Output the documentation of
25390 some of the tables.
25391 (Copyright notice): Update.
25392 Formatting changes.
25393
0de741ca
AD
253942000-03-16 Akim Demaille <akim@epita.fr>
25395
25396 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
25397 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
25398 One `#if YYDEBUG' remains, since it uses variables which are
25399 defined only if `YYDEBUG != 0'.
25400
bb10be54
AD
254012000-03-16 Akim Demaille <akim@epita.fr>
25402
25403 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
25404 and related variables so that the similarities are highlighted.
25405
b07b484a
AD
254062000-03-16 Akim Demaille <akim@epita.fr>
25407
25408 * src/bison.s1: Properly indent CPP directives.
25409
361f60b3
AD
254102000-03-16 Akim Demaille <akim@epita.fr>
25411
25412 * src/bison.s1: Properly indent the `alloca' CPP section.
25413
8c44d3ec
AD
254142000-03-16 Akim Demaille <akim@epita.fr>
25415
25416 Do not hard code values of directories in `configure.in'.
25417 Update the `configure' tool chain.
25418
25419 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25420 src/makefile.am.
25421 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25422 (AC_OUTPUT): Add m4/Makefile.
25423 Bump to bison 1.28a, 1.29 has never been released.
25424 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25425 handled via src/Makefile.am.
25426 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25427 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25428 autoheader.
25429 * Makefile.am (SUBDIRS): Add m4.
25430 (ACLOCAL_AM_FLAGS): New variable.
25431 (AUTOMAKE_OPTIONS): Add check-news.
25432 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25433 the proper line number and file name.
25434 (DEFS): Propagate the location of bison library files and of the
25435 locale files.
25436 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25437 builddir.
25438 * acinclude.m4: Remove, replaced by the directory m4.
25439 * m4/Makefile.am (EXTRA_DIST): New variable.
25440 * m4/gettext.m4: New file, from the fileutils.
25441 * m4/lcmessage.m4: Likewise
25442 * m4/progtest.m4: Likewise.
25443 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25444
f95997e7
AD
254452000-03-10 Akim Demaille <akim@epita.fr>
25446
25447 * src/closure.c:
25448 Formatting changes of various comments.
25449 Respect the GNU coding standards at various places.
25450 Don't use `_()' when no translation is needed.
25451
254521999-12-13 Jesse Thilo <jthilo@gnu.org>
25453
25454 * src/files.c:
25455 OS/2 honors TMPDIR environment variable.
25456
254571999-12-13 Jesse Thilo <jthilo@gnu.org>
25458
25459 * doc/bison.texinfo: Tweaked spelling and grammar.
25460 Updated ISBN.
25461 Removed reference to price of printed copy.
25462 Mention BISON_SIMPLE and BISON_HAIRY.
25463
254641999-12-13 Jesse Thilo <jthilo@gnu.org>
25465
25466 * configure.in, NEWS:
25467 Bison 1.29 released.
25468
254691999-10-27 Jesse Thilo <jthilo@gnu.org>
25470
25471 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25472 Added reference card.
25473
254741999-07-26 Jesse Thilo <jthilo@gnu.org>
25475
25476 * po/ru.po: Added Russian translation.
25477
254781999-07-26 Jesse Thilo <jthilo@gnu.org>
25479
25480 * configure.in: Added Russian translation.
25481
254821999-07-06 Jesse Thilo <jthilo@gnu.org>
25483
25484 * configure.in, NEWS, README:
25485 Released version 1.28.
25486
254871999-06-14 Jesse Thilo <jthilo@gnu.org>
25488
25489 * src/system.h:
25490 Squashed redefinition warning on some systems.
25491
25492 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25493 Have configure build version string instead of relying on ANSI string
25494 concatentation.
25495
254961999-06-14 Jesse Thilo <jthilo@gnu.org>
25497
25498 * po/POTFILES.in: Got rid of version.c.
25499
255001999-06-14 Jesse Thilo <jthilo@gnu.org>
25501
25502 * acconfig.h, configure.in:
25503 Have configure build version string instead of relying on ANSI string
25504 concatentation.
25505
255061999-06-08 Jesse Thilo <jthilo@gnu.org>
25507
25508 * doc/bison.1:
25509 Dropped mention of `+' for long-named options.
25510
255111999-05-30 Jesse Thilo <jthilo@gnu.org>
25512
25513 * src/files.c: Added <unistd.h> for unlink().
25514
25515 * src/Makefile.am, src/system.h:
25516 I18n fixes.
25517
255181999-05-30 Jesse Thilo <jthilo@gnu.org>
25519
25520 * README: Added a FAQ list.
25521
25522 * configure.in, acconfig.h:
25523 I18n fixes.
25524
255251999-05-30 Jesse Thilo <jthilo@gnu.org>
25526
25527 * doc/FAQ, doc/Makefile.am:
25528 Added a FAQ list.
25529
255301999-05-19 Jesse Thilo <jthilo@gnu.org>
25531
25532 * src/alloc.h, src/symtab.h, src/version.c:
25533 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25534
255351999-04-18 Jesse Thilo <jthilo@gnu.org>
25536
25537 * src/.cvsignore, src/Makefile.am:
25538 Reorganized: sources in `src', documentation in `doc'.
25539
25540 * src/lex.c (literalchar):
25541 fixed the code for escaping double quotes (thanks
25542 Jonathan Czisny.)
25543
255441999-04-18 Jesse Thilo <jthilo@gnu.org>
25545
25546 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25547 Adjusted paths to reflect directory reorganization.
25548
255491999-04-18 Jesse Thilo <jthilo@gnu.org>
25550
25551 * doc/.cvsignore, doc/Makefile.am:
25552 Reorganized: sources in `src', documentation in `doc'.
25553
255541999-04-18 Jesse Thilo <jthilo@gnu.org>
25555
25556 * configure.in:
25557 Updated AC_INIT file to reflect directory reorganization.
25558
25559 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25560 Reorganized: sources in `src', documentation in `doc'.
25561
255621999-04-13 Jesse Thilo <jthilo@gnu.org>
25563
25564 * src/allocate.c:
25565 Don't declare calloc() and realloc() if not necessary.
25566
255671999-04-13 Jesse Thilo <jthilo@gnu.org>
25568
25569 * configure.in, acconfig.h, acinclude.m4:
25570 Don't declare calloc() and realloc() if not necessary.
25571
255721999-03-23 Jesse Thilo <jthilo@gnu.org>
25573
25574 * po/.cvsignore: Added i18n support.
25575
255761999-03-23 Jesse Thilo <jthilo@gnu.org>
25577
25578 * acconfig.h, configure.in, Makefile.am:
25579 Added i18n support.
25580
255811999-03-22 Jesse Thilo <jthilo@gnu.org>
25582
25583 * src/bison.s1: Fixed #line numbers.
25584
255851999-03-15 Jesse Thilo <jthilo@gnu.org>
25586
25587 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25588 Added PO files from Translation Project.
25589
255901999-03-03 Jesse Thilo <jthilo@gnu.org>
25591
25592 * Makefile.am:
25593 Added support for non-ANSI compilers (ansi2knr).
25594
255951999-02-16 Jesse Thilo <jthilo@gnu.org>
25596
25597 * configure.in: Bumped version number to 1.27.
25598
25599 * Makefile.am:
25600 Added `bison.simple' to list of files removed by `make distclean'.
25601
256021999-02-12 Jesse Thilo <jthilo@gnu.org>
25603
25604 * src/files.c, src/files.h:
25605 Defined locations of parser files in config.h instead of Makefile.
25606
256071999-02-12 Jesse Thilo <jthilo@gnu.org>
25608
25609 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25610 Defined locations of parser files in config.h instead of Makefile.
25611
256121999-02-09 Jesse Thilo <jthilo@gnu.org>
25613
25614 * Makefile.am:
25615 Removed inappropriate use of $< macro.
25616
256171999-02-05 Jesse Thilo <jthilo@gnu.org>
25618
25619 * po/Makefile.in.in, po/POTFILES.in:
25620 Add `po' directory skeleton.
25621
256221999-01-27 Jesse Thilo <jthilo@gnu.org>
25623
25624 * README: Document help-bison list.
25625
25626 * configure.in: Add check for mkstemp().
25627
256281999-01-20 Jesse Thilo <jthilo@gnu.org>
25629
25630 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25631 Hush a few compiler warnings.
25632
25633 * src/files.c:
25634 Add tryclose(), which verifies that fclose was successful.
25635 Hush a couple of compiler warnings.
25636
256371999-01-20 Jesse Thilo <jthilo@gnu.org>
25638
25639 * Makefile.am, OChangeLog:
25640 ChangeLog is now automatically generated. Include the old version as
25641 OChangeLog.
25642
256431999-01-14 Jesse Thilo <jthilo@gnu.org>
25644
25645 * 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:
25646 Update FSF address.
25647
256481999-01-14 Jesse Thilo <jthilo@gnu.org>
25649
25650 * doc/bison.texinfo: Fix formatting glitch.
25651
25652 * doc/bison.texinfo: Update FSF address.
25653
256541999-01-14 Jesse Thilo <jthilo@gnu.org>
25655
25656 * acconfig.h: Update FSF address.
25657
256581999-01-08 Jesse Thilo <jthilo@gnu.org>
25659
25660 * src/system.h:
25661 Don't define PACKAGE here, since config.h defines it.
25662
256631998-12-30 Jesse Thilo <jthilo@gnu.org>
25664
25665 * src/reader.c: Update copyright date.
25666
25667 * src/main.c:
25668 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25669 favor of output directly to stderr (avoids buffer overruns).
25670
25671 * src/reader.c: Some checks for premature EOF.
25672
25673 * 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:
25674 Use prototypes if the compiler understands them.
25675
25676 * src/files.c: Honor TMPDIR on Unix hosts.
25677 Use prototypes if the compiler understands them.
25678
25679 * src/reader.c:
25680 Fix a couple of buffer overrun bugs.
25681 Use prototypes if the compiler understands them.
25682
25683 * src/system.h: Include unistd.h and ctype.h.
25684 Use #ifdef instead of #if for NLS symbols.
25685
256861998-12-30 Jesse Thilo <jthilo@gnu.org>
25687
25688 * doc/bison.texinfo:
25689 Delete comment "consider using @set for edition number, etc..." since
25690 we now are doing so.
25691
256921998-12-30 Jesse Thilo <jthilo@gnu.org>
25693
25694 * configure.in:
25695 Use prototypes if the compiler understands them.
25696
25697 * NEWS: Document 1.26 highlights.
25698
25699 * Makefile.am: Require Automake 1.3 or later.
25700
25701 * acconfig.h:
25702 Use prototypes if the compiler understands them.
25703
257041998-12-29 Jesse Thilo <jthilo@gnu.org>
25705
25706 * src/version.c:
25707 Use VERSION symbol from automake for version number.
25708
257091998-12-29 Jesse Thilo <jthilo@gnu.org>
25710
25711 * acconfig.h, configure.in, version.cin:
25712 Use VERSION symbol from automake for version number.
25713
257141998-11-28 Jesse Thilo <jthilo@gnu.org>
25715
25716 * Makefile.am:
25717 Distribute original version of simple parser (bison.s1), not built
25718 version (bison.simple).
25719
257201998-11-28 Jesse Thilo <jthilo@gnu.org>
25721
25722 * doc/bison.texinfo: Add info dir entry.
25723
25724 * doc/bison.texinfo:
25725 Let automake put version number into documentation.
25726
257271998-11-26 Jesse Thilo <jthilo@gnu.org>
25728
25729 * src/bison.cld, src/build.com, src/vmshlp.mar:
25730 Add non-RCS files from /gd/gnu/bison.
25731
257321998-11-26 Jesse Thilo <jthilo@gnu.org>
25733
25734 * doc/bison.1:
25735 Document the BISON_HAIRY and BISON_SIMPLE variables.
25736
257371998-11-25 Jesse Thilo <jthilo@gnu.org>
25738
25739 * src/version.c: Build version.c automatically.
25740
25741 * src/reader.c:
25742 Fix token numbering (used to start at 258, not 257).
25743
25744 * src/system.h: Include config.h.
25745
25746 * src/getargs.c: Update bug report address.
25747
25748 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25749 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25750
257511998-11-25 Jesse Thilo <jthilo@gnu.org>
25752
25753 * Makefile.am:
25754 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25755
25756 * configure.in, version.cin:
25757 Build version.c automatically.
25758
25759 * AUTHORS: Add AUTHORS file.
25760
25761 * README: Update bug report address.
25762
25763 * bison.simple:
25764 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25765
25766 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25767 Add automake stuff.
25768
257691998-11-25 Jesse Thilo <jthilo@gnu.org>
25770
25771 * doc/bison.texinfo: Clean up some formatting.
25772
257731998-05-05 Richard Stallman <rms@gnu.org>
25774
25775 * doc/bison.texinfo:
25776 Explain better why to make a pure parser.
25777
257781998-01-05 Richard Stallman <rms@gnu.org>
25779
25780 * src/files.c (openfiles):
25781 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25782 find a temporary directory, if possible. Do not unlink files while
25783 they are open.
25784
257851997-08-25 Richard Stallman <rms@gnu.org>
25786
25787 * src/reader.c (stack_offset;):
25788 Change some warni to warns.
25789
25790 * src/lex.c (literalchar): Use warns, not warni.
25791
257921997-06-28 Richard Stallman <rms@gnu.org>
25793
25794 * src/bison.s1: Add a Bison version comment.
25795
25796 * src/main.c (fatal, warn, berror):
25797 Use program_name.
25798
257991997-06-28 Richard Stallman <rms@gnu.org>
25800
25801 * Makefile.in (bison_version): New variable.
25802 (dist): Use that variable.
25803 (bison.s1): Substitute the Bison version into bison.simple.
25804
25805 * bison.simple: Add a Bison version comment.
25806
258071997-06-18 Richard Stallman <rms@gnu.org>
25808
25809 * src/main.c (fatal, warn, berror):
25810 Make error messages standard.
25811 (toomany): Improve error message text.
25812
25813 * 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:
25814 new.h renamed to alloc.h.
25815
258161997-06-18 Richard Stallman <rms@gnu.org>
25817
25818 * Makefile.in: new.h renamed to alloc.h.
25819
258201997-05-24 Richard Stallman <rms@gnu.org>
25821
25822 * src/lex.c (literalchar):
25823 Fix the code for escaping \, " and '.
25824
25825 (lex): Avoid trouble when there are many chars
25826 to discard in a char literal with just several chars in it.
25827
258281997-05-17 Richard Stallman <rms@gnu.org>
25829
25830 * src/bison.s1:
25831 Use malloc, if using alloca is troublesome.
25832 (YYSTACK_USE_ALLOCA): New flag macro.
25833 Define it for some systems and compilers.
25834 (YYSTACK_ALLOC): New macro.
25835 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25836 If it was malloc'd, free it.
25837
258381997-05-17 Richard Stallman <rms@gnu.org>
25839
25840 * bison.simple:
25841 Use malloc, if using alloca is troublesome.
25842 (YYSTACK_USE_ALLOCA): New flag macro.
25843 Define it for some systems and compilers.
25844 (YYSTACK_ALLOC): New macro.
25845 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25846 If it was malloc'd, free it.
25847
258481997-04-23 Richard Stallman <rms@gnu.org>
25849
25850 * src/bison.s1:
25851 (alloca) [__hpux]: Always define as __builtin_alloca.
25852
258531997-04-23 Richard Stallman <rms@gnu.org>
25854
25855 * bison.simple:
25856 (alloca) [__hpux]: Always define as __builtin_alloca.
25857
258581997-04-22 Richard Stallman <rms@gnu.org>
25859
25860 * src/bison.s1:
25861 [__hpux]: Include alloca.h (right for HPUX 10)
25862 instead of declaring alloca (right for HPUX 9).
25863
25864 * src/bison.s1 (__yy_memcpy):
25865 Declare arg `count' as unsigned int.
25866 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25867
258681997-04-22 Richard Stallman <rms@gnu.org>
25869
25870 * bison.simple:
25871 [__hpux]: Include alloca.h (right for HPUX 10)
25872 instead of declaring alloca (right for HPUX 9).
25873
25874 * bison.simple (__yy_memcpy):
25875 Declare arg `count' as unsigned int.
25876 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25877
258781997-01-03 Richard Stallman <rms@gnu.org>
25879
25880 * src/allocate.c: [__STDC__ or _MSC_VER]:
25881 Declare calloc and realloc to return void *.
25882
258831997-01-02 Richard Stallman <rms@gnu.org>
25884
25885 * src/system.h:
25886 [_MSC_VER]: Include stdlib.h and process.h.
25887 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25888
25889 * src/main.c (main): Return FAILURE as a value.
25890 (printable_version): Declare arg as int, not char.
25891
258921997-01-02 Richard Stallman <rms@gnu.org>
25893
25894 * Makefile.in (dist):
25895 Explicitly check for symlinks, and copy them.
25896
258971996-12-19 Richard Stallman <rms@gnu.org>
25898
25899 * src/files.c:
25900 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25901
259021996-12-18 Paul Eggert <eggert@gnu.org>
25903
25904 * src/bison.s1 (yyparse):
25905 If __GNUC__ and YYPARSE_PARAM are both defined,
25906 declare yyparse to have a void * argument.
25907
259081996-12-18 Paul Eggert <eggert@gnu.org>
25909
25910 * bison.simple (yyparse):
25911 If __GNUC__ and YYPARSE_PARAM are both defined,
25912 declare yyparse to have a void * argument.
25913
259141996-12-17 Richard Stallman <rms@gnu.org>
25915
25916 * src/reduce.c (nbits): Add some casts.
25917
259181996-08-12 Richard Stallman <rms@gnu.org>
25919
25920 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25921
259221996-08-12 Richard Stallman <rms@gnu.org>
25923
25924 * bison.simple: Test _MSDOS as well as _MSDOS_.
25925
259261996-07-31 Richard Stallman <rms@gnu.org>
25927
25928 * src/bison.s1:
25929 [__sun && __i386]: Include alloca.h.
25930
259311996-07-31 Richard Stallman <rms@gnu.org>
25932
25933 * bison.simple:
25934 [__sun && __i386]: Include alloca.h.
25935
259361996-07-30 Richard Stallman <rms@gnu.org>
25937
25938 * src/bison.s1: Comment change.
25939
25940 * src/bison.s1: Test _MSDOS_, not MSDOS.
25941
259421996-07-30 Richard Stallman <rms@gnu.org>
25943
25944 * bison.simple: Comment change.
25945
25946 * bison.simple: Test _MSDOS_, not MSDOS.
25947
259481996-06-01 Richard Stallman <rms@gnu.org>
25949
25950 * 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:
25951 Insert `_' macro around many string constants.
25952
25953 * src/main.c:
25954 Insert `_' macro around many string constants.
25955
25956 (main): Call setlocale, bindtextdomain and textdomain.
25957
25958 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25959 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25960 [ENABLE_NLS]: Include libintl.h.
25961 [ENABLE_NLS] (gettext): Define.
25962 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25963 (N_, PACKAGE, LOCALEDIR): New macros.
25964
259651996-06-01 Richard Stallman <rms@gnu.org>
25966
25967 * POTFILES.in: New file.
25968
25969 * Makefile.in (allocate.o):
25970 Define target explicitly.
25971
25972 * Makefile.in (CFLAGS): Set to @CFLAGS@.
25973 (LDFLAGS): Set to @LDFLAGS@.
25974 (configure): Run autoconf only if preceding `cd' succeeds.
25975 (bison.s1): Redirect output to temporary file then move the
25976 temporary to the target, rather than redirecting directly to bison.s1.
25977 (clean): Remove config.status and config.log.
25978 (distclean): Don't remove config.status here.
25979
259801996-05-12 Richard Stallman <rms@gnu.org>
25981
25982 * src/bison.s1:
25983 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25984
259851996-05-12 Richard Stallman <rms@gnu.org>
25986
25987 * bison.simple:
25988 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
25989
259901996-05-11 Richard Stallman <rms@gnu.org>
25991
25992 * src/bison.s1 (__yy_memcpy):
25993 Really reorder the args, as was supposedly done on Feb 14 1995.
25994 (yyparse): Calls changed accordingly.
25995
259961996-05-11 Richard Stallman <rms@gnu.org>
25997
25998 * Makefile.in (dist): Don't use $(srcdir).
25999
26000 * bison.simple (__yy_memcpy):
26001 Really reorder the args, as was supposedly done on Feb 14 1995.
26002 (yyparse): Calls changed accordingly.
26003
260041996-01-27 Richard Stallman <rms@gnu.org>
26005
26006 * src/output.c (output_rule_data):
26007 Test YYERROR_VERBOSE in the conditional
26008 around the definition of ttyname.
26009
260101995-12-29 Richard Stallman <rms@gnu.org>
26011
26012 * src/bison.s1:
26013 Fix line numbers in #line commands.
26014
260151995-12-29 Richard Stallman <rms@gnu.org>
26016
26017 * bison.simple:
26018 Fix line numbers in #line commands.
26019
260201995-12-27 Richard Stallman <rms@gnu.org>
26021
26022 * src/bison.s1 (YYPARSE_PARAM_DECL):
26023 In C++, make it always null.
26024 (YYPARSE_PARAM_ARG): New macro.
26025 (yyparse): Use YYPARSE_PARAM_ARG.
26026
260271995-12-27 Richard Stallman <rms@gnu.org>
26028
26029 * bison.simple (YYPARSE_PARAM_DECL):
26030 In C++, make it always null.
26031 (YYPARSE_PARAM_ARG): New macro.
26032 (yyparse): Use YYPARSE_PARAM_ARG.
26033
260341995-11-29 Richard Stallman <rms@gnu.org>
26035
26036 * doc/bison.texinfo:
26037 Describe literal string tokens, %raw, %no_lines, %token_table.
26038
260391995-11-29 Daniel Hagerty <hag@gnu.org>
26040
26041 * doc/bison.texinfo: Fixed update date
26042
260431995-10-16 Richard Stallman <rms@gnu.org>
26044
26045 * src/version.c: Version 1.25.
26046
260471995-10-16 Richard Stallman <rms@gnu.org>
26048
26049 * NEWS: *** empty log message ***
26050
260511995-10-16 Richard Stallman <rms@gnu.org>
26052
26053 * doc/bison.1, doc/bison.rnh:
26054 Add new options.
26055
260561995-10-15 Richard Stallman <rms@gnu.org>
26057
26058 * src/vmsgetargs.c, src/getargs.c:
26059 Added -n, -k, and -raw switches.
26060 (noparserflag, toknumflag, rawtoknumflag): New variables.
26061
26062 * src/symtab.h (SALIAS):
26063 New #define for adding aliases to %token.
26064 (struct bucket): Added `alias' field.
26065
26066 * src/reduce.c (reduce_grammar):
26067 Revise error message.
26068 (print_notices): Remove final `.' from error message.
26069
26070 * src/reader.c (reader_output_yylsp):
26071 New function.
26072 (readgram): Use `#if 0' around code that accepted %command
26073 inside grammar rules: The documentation doesn't allow it,
26074 and it will fail since the %command processors scan for the next %.
26075 (parse_token_decl): Extended the %token
26076 declaration to allow a multi-character symbol as an alias.
26077 (parse_thong_decl): New function.
26078 (read_declarations): Added %thong declarations.
26079 (read_declarations): Handle NOOP to deal with allowing
26080 % declarations as another means to specify the flags.
26081 (readgram): Allow %prec prior to semantics embedded in a rule.
26082 (skip_to_char, read_declarations, copy_definition)
26083 (parse_token_decl, parse_start_decl, parse_type_decl)
26084 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
26085 (get_type_name, copy_guard, copy_action, readgram)
26086 (get_type, packsymbols): Revised most error messages.
26087 Changed `fatal' to `warnxxx' to avoid aborting for error.
26088 Revised and use multiple warnxxx functions to avoid using VARARGS1.
26089 (read_declarations): Improve the error message for
26090 an invalid character. Do not abort.
26091 (read_declarations, copy_guard, copy_action): Use
26092 printable_version to avoid unprintable characters in printed output.
26093 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
26094 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
26095 Allow the type of a non-terminal can be given
26096 more than once, as long as all specifications give the same type.
26097
26098 * src/output.c:
26099 (output_headers, output_trailers, output, output_gram)
26100 (output_rule_data): Implement noparserflag variable.
26101 Implement toknumflag variable.
26102 (output): Call reader_output_yylsp to output LTYPESTR.
26103
26104 * src/main.c (main):
26105 If reader sees an error, don't process the grammar.
26106 (fatals): Updated to not use VARARGS1.
26107 (printable_version, int_to_string, warn, warni, warns, warnss)
26108 (warnsss): New error reporting functions. Avoid abort for error.
26109
26110 * src/lex.h:
26111 Added THONG and NOOP for alias processing.
26112 Added SETOPT for the new code that allows setting options with %flags.
26113
26114 * src/lex.c:
26115 Include getopt.h. Add some extern decls.
26116 (safegetc): New function to deal with EOF gracefully.
26117 (literalchar); new function to deal with reading \ escapes.
26118 (lex): Use literalchar.
26119 (lex): Implemented "..." tokens.
26120 (literalchar, lex, parse_percent_token): Made tokenbuffer
26121 always contain the token. This includes growing the token
26122 buffer while reading an integer.
26123 (parse_percent_token): Replaced if-else statement with percent_table.
26124 (parse_percent_token): Added % declarations as another
26125 way to specify the flags -n, -l, and -r. Also added hooks for
26126 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
26127 major changes to files.c.
26128 (lex) Retain in the incoming stream a character following
26129 an incorrect '/'.
26130 (skip_white_space, lex): Revised most error messages
26131 and changed fatal to warn to avoid aborting.
26132 (percent_table): Added %thong declarations.
26133
26134 * src/gram.h: Comment changes.
26135
26136 * src/files.c (openfiles, open_extra_files, done):
26137 Add faction flag
26138 and actfile file. Handle noparserflag. Both for -n switch.
26139
26140 * src/conflicts.c (resolve_sr_conflict):
26141 Remove use of alloca.
26142
261431995-06-01 Jim Meyering <meyering@gnu.org>
26144
26145 * doc/bison.texinfo: *** empty log message ***
26146
261471995-05-06 Richard Stallman <rms@gnu.org>
26148
26149 * src/bison.s1: Comment change.
26150
261511995-05-06 Richard Stallman <rms@gnu.org>
26152
26153 * bison.simple: Comment change.
26154
261551995-05-03 Richard Stallman <rms@gnu.org>
26156
26157 * src/version.c: Version now 1.24.
26158
26159 * src/bison.s1: Change distribution terms.
26160
26161 * src/version.c: Version now 1.23.
26162
261631995-05-03 Richard Stallman <rms@gnu.org>
26164
26165 * doc/bison.texinfo:
26166 Rewrite "Conditions for Using Bison".
26167 Update version to 1.24.
26168
261691995-05-03 Richard Stallman <rms@gnu.org>
26170
26171 * bison.simple: Change distribution terms.
26172
261731995-02-23 Richard Stallman <rms@gnu.org>
26174
26175 * src/files.c: Test __VMS_POSIX as well as VMS.
26176
261771995-02-14 Jim Meyering <meyering@gnu.org>
26178
26179 * src/bison.s1 (__yy_memcpy):
26180 Renamed from __yy_bcopy to avoid
26181 confusion. Reverse FROM and TO arguments to be consistent with
26182 those of memcpy.
26183
261841995-02-14 Jim Meyering <meyering@gnu.org>
26185
26186 * bison.simple (__yy_memcpy):
26187 Renamed from __yy_bcopy to avoid
26188 confusion. Reverse FROM and TO arguments to be consistent with
26189 those of memcpy.
26190
261911994-11-10 David J. MacKenzie <djm@gnu.org>
26192
26193 * NEWS: reformat
26194
26195 * NEWS: New file.
26196
26197 * Makefile.in (DISTFILES): Include NEWS.
26198
26199 * Makefile.in (DISTFILES):
26200 Include install-sh, not install.sh.
26201
26202 * configure.in: Update to Autoconf v2 macro names.
26203
262041994-10-05 David J. MacKenzie <djm@gnu.org>
26205
26206 * Makefile.in: fix typo
26207
26208 * Makefile.in (prefix, exec_prefix):
26209 Let configure set them.
26210
262111994-09-28 David J. MacKenzie <djm@gnu.org>
26212
26213 * Makefile.in: Set datadir to $(prefix)/share.
26214
262151994-09-15 Richard Stallman <rms@gnu.org>
26216
26217 * src/bison.s1:
26218 Update copyright notice and GPL version.
26219
262201994-09-15 Richard Stallman <rms@gnu.org>
26221
26222 * bison.simple:
26223 Update copyright notice and GPL version.
26224
262251994-07-12 Richard Stallman <rms@gnu.org>
26226
26227 * src/reduce.c, src/reader.c:
26228 entered into RCS
26229
262301994-05-05 David J. MacKenzie <djm@gnu.org>
26231
26232 * Makefile.in: entered into RCS
26233
262341994-03-26 Richard Stallman <rms@gnu.org>
26235
26236 * src/bison.s1: entered into RCS
26237
262381994-03-26 Richard Stallman <rms@gnu.org>
26239
26240 * bison.simple: entered into RCS
26241
262421994-03-25 Richard Stallman <rms@gnu.org>
26243
26244 * src/main.c: entered into RCS
26245
262461994-03-24 Richard Stallman <rms@gnu.org>
26247
26248 * src/conflicts.c: entered into RCS
26249
262501994-01-02 Richard Stallman <rms@gnu.org>
26251
26252 * Makefile.in: *** empty log message ***
26253
262541993-11-21 Richard Stallman <rms@gnu.org>
26255
26256 * src/bison.s1: *** empty log message ***
26257
262581993-11-21 Richard Stallman <rms@gnu.org>
26259
26260 * doc/bison.texinfo: entered into RCS
26261
26262 * doc/bison.texinfo: *** empty log message ***
26263
262641993-11-21 Richard Stallman <rms@gnu.org>
26265
26266 * bison.simple: *** empty log message ***
26267
262681993-10-25 David J. MacKenzie <djm@gnu.org>
26269
26270 * doc/bison.texinfo: *** empty log message ***
26271
262721993-10-19 Richard Stallman <rms@gnu.org>
26273
26274 * src/bison.s1: *** empty log message ***
26275
262761993-10-19 Richard Stallman <rms@gnu.org>
26277
26278 * bison.simple: *** empty log message ***
26279
262801993-10-14 Richard Stallman <rms@gnu.org>
26281
26282 * src/bison.s1: *** empty log message ***
26283
262841993-10-14 Richard Stallman <rms@gnu.org>
26285
26286 * bison.simple: *** empty log message ***
26287
262881993-09-14 David J. MacKenzie <djm@gnu.org>
26289
26290 * doc/bison.texinfo: *** empty log message ***
26291
262921993-09-13 Noah Friedman <friedman@gnu.org>
26293
26294 * Makefile.in: *** empty log message ***
26295
262961993-09-10 Richard Stallman <rms@gnu.org>
26297
26298 * src/conflicts.c: *** empty log message ***
26299
26300 * src/system.h: entered into RCS
26301
263021993-09-10 Richard Stallman <rms@gnu.org>
26303
26304 * doc/bison.1: entered into RCS
26305
263061993-09-06 Noah Friedman <friedman@gnu.org>
26307
26308 * src/version.c: entered into RCS
26309
263101993-09-06 Noah Friedman <friedman@gnu.org>
26311
26312 * Makefile.in: *** empty log message ***
26313
263141993-07-30 David J. MacKenzie <djm@gnu.org>
26315
26316 * Makefile.in: *** empty log message ***
26317
263181993-07-24 Richard Stallman <rms@gnu.org>
26319
26320 * src/bison.s1: *** empty log message ***
26321
263221993-07-24 Richard Stallman <rms@gnu.org>
26323
26324 * bison.simple: *** empty log message ***
26325
263261993-07-08 David J. MacKenzie <djm@gnu.org>
26327
26328 * Makefile.in: *** empty log message ***
26329
263301993-07-04 Richard Stallman <rms@gnu.org>
26331
26332 * src/bison.s1: *** empty log message ***
26333
263341993-07-04 Richard Stallman <rms@gnu.org>
26335
26336 * bison.simple: *** empty log message ***
26337
263381993-06-26 David J. MacKenzie <djm@gnu.org>
26339
26340 * src/getargs.c: entered into RCS
26341
263421993-06-26 David J. MacKenzie <djm@gnu.org>
26343
26344 * doc/bison.texinfo: *** empty log message ***
26345
26346 * doc/bison.1: New file.
26347
263481993-06-25 Richard Stallman <rms@gnu.org>
26349
26350 * src/getargs.c: New file.
26351
263521993-06-16 Richard Stallman <rms@gnu.org>
26353
26354 * src/bison.s1: *** empty log message ***
26355
263561993-06-16 Richard Stallman <rms@gnu.org>
26357
26358 * bison.simple: *** empty log message ***
26359
263601993-06-03 Richard Stallman <rms@gnu.org>
26361
26362 * src/bison.s1: New file.
26363
263641993-06-03 Richard Stallman <rms@gnu.org>
26365
26366 * doc/bison.texinfo: *** empty log message ***
26367
263681993-06-03 Richard Stallman <rms@gnu.org>
26369
26370 * bison.simple: New file.
26371
263721993-05-19 Richard Stallman <rms@gnu.org>
26373
26374 * doc/bison.texinfo: New file.
26375
263761993-05-07 Noah Friedman <friedman@gnu.org>
26377
26378 * Makefile.in: *** empty log message ***
26379
263801993-04-28 Noah Friedman <friedman@gnu.org>
26381
26382 * src/reader.c: *** empty log message ***
26383
263841993-04-23 Noah Friedman <friedman@gnu.org>
26385
26386 * src/alloc.h: entered into RCS
26387
263881993-04-20 David J. MacKenzie <djm@gnu.org>
26389
26390 * src/version.c: *** empty log message ***
26391
26392 * src/files.c, src/allocate.c:
26393 entered into RCS
26394
26395 * src/reader.c: *** empty log message ***
26396
26397 * src/lex.c: entered into RCS
26398
26399 * src/conflicts.c: New file.
26400
26401 * src/symtab.c: entered into RCS
26402
26403 * src/alloc.h: New file.
26404
26405 * src/LR0.c: entered into RCS
26406
264071993-04-18 Noah Friedman <friedman@gnu.org>
26408
26409 * src/reader.c: New file.
26410
26411 * src/version.c: *** empty log message ***
26412
264131993-04-18 Noah Friedman <friedman@gnu.org>
26414
26415 * Makefile.in: *** empty log message ***
26416
264171993-04-17 Noah Friedman <friedman@gnu.org>
26418
26419 * Makefile.in: *** empty log message ***
26420
264211993-04-15 Richard Stallman <rms@gnu.org>
26422
26423 * src/main.c, src/files.c:
26424 New file.
26425
264261993-04-15 Noah Friedman <friedman@gnu.org>
26427
26428 * configure.in: entered into RCS
26429
26430 * configure.in: *** empty log message ***
26431
26432 * configure.in: New file.
26433
264341993-04-14 Richard Stallman <rms@gnu.org>
26435
26436 * Makefile.in: New file.
26437
264381993-04-13 Richard Stallman <rms@gnu.org>
26439
26440 * src/version.c: New file.
26441
264421993-03-25 Richard Stallman <rms@gnu.org>
26443
26444 * src/output.c: entered into RCS
26445
264461992-09-25 Richard Stallman <rms@gnu.org>
26447
26448 * configure.bat: entered into RCS
26449
264501992-06-22 Richard Stallman <rms@gnu.org>
26451
26452 * src/vmsgetargs.c: entered into RCS
26453
264541992-06-22 Richard Stallman <rms@gnu.org>
26455
26456 * doc/bison.rnh: entered into RCS
26457
264581992-04-20 David J. MacKenzie <djm@gnu.org>
26459
26460 * README: entered into RCS
26461
264621992-01-22 Richard Stallman <rms@gnu.org>
26463
26464 * src/machine.h: entered into RCS
26465
264661991-12-21 Richard Stallman <rms@gnu.org>
26467
26468 * src/lalr.c, src/closure.c:
26469 entered into RCS
26470
264711991-12-20 Richard Stallman <rms@gnu.org>
26472
26473 * src/state.h: entered into RCS
26474
264751991-12-18 Richard Stallman <rms@gnu.org>
26476
26477 * src/print.c, src/nullable.c, src/derives.c:
26478 entered into RCS
26479
264801991-11-03 David J. MacKenzie <djm@gnu.org>
26481
26482 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26483 entered into RCS
26484
264851988-09-09 Richard Stallman <rms@gnu.org>
26486
26487 * src/bison.hairy: entered into RCS
26488
264891987-12-16 Richard Stallman <rms@gnu.org>
26490
26491 * REFERENCES: entered into RCS
dc546b0f 26492
f294a2c2 26493
04098407 26494 -----
f294a2c2 26495
575619af
JD
26496 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26497 Inc.
f294a2c2 26498
04098407
PE
26499 Copying and distribution of this file, with or without
26500 modification, are permitted provided the copyright notice and this
26501 notice are preserved.