]> git.saurik.com Git - bison.git/blame - ChangeLog
* NEWS (2.5): Fix minor typos.
[bison.git] / ChangeLog
CommitLineData
723206df
JD
12011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
2
3 * NEWS (2.5): Fix minor typos.
4
ac3297d5
JD
52011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
6
7 doc: clean up quotation style in NEWS.
8 * NEWS (2.5): For multi-character tokens in example grammar rules,
9 use "token" not 'token'. In English, use a consistent quotation
10 style; we might as well follow the precedent seen in info pages:
11 `quote' not "quote".
12
c9e2da4f
JD
132011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
14
15 tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
16 Reported by Jim Meyering at
17 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
18 * tests/actions.at
19 (Default %printer and %destructor for mid-rule values): Define
20 YYLLOC_DEFAULT so that it uses its Rhs argument.
21
55dd3563
JD
222011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
23
24 glr.c: omit yyresolveLocations when locations are disabled.
25 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
26 about yyresolveLocations's local yyrhsloc. When locations are
27 enabled, there's no such warning because YYLLOC_DEFAULT then uses
28 yyrhsloc. Reported by Jim Meyering at
29 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
30 * data/glr.c (yyresolveLocations): Omit definition when locations
31 are disabled.
32 (yyresolveValue): Omit yyresolveLocations invocation when
33 locations are disabled.
34
a898435b
JD
352011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
36
37 gnulib, autoconf: update.
38 * README-hacking (Updating a submodule): Give advice on how to
39 determine the versions of gnulib and autoconf to which we should
40 update.
41 (Release Procedure): Note that submodules should be updated.
42 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
43 suggested in updated gnulib NEWS.
44 * gnulib: Choose a stable snapshot according to advice in Bison's
45 README-hacking.
46 * po/POTFILES.in (lib/pipe.c): Rename to...
47 (lib/spawn-pipe.c): ... this.
48 * src/output.c: Update to include spawn-pipe.h.
49 * submodules/autoconf: Update to latest for improvement in m4.m4
50 that excludes M4 with buggy strstr. The only other changes to
51 files that we use are copyright updates.
52
fea2d6b0
JD
532011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
54
55 Fix missing updates to GPLv3.
56 Reported by Tys Lefering at
57 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
58 * src/print-xml.c, src/print-xml.h: In these files.
59
6f8bdce2
JD
602011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
61
62 Add -Wconflicts-sr and -Wconflicts-rr.
63 Thus, conflict reports are now affected by -Werror and -Wnone
64 (unless %expect or %expect-rr is specified). Reported by George
65 Neuner at
66 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
67 * NEWS (2.5): Document.
68 * doc/bison.texinfo (Bison Options): Document.
69 * src/complain.c, src/complain.h (set_warning_issued): Export
70 function.
71 * src/conflicts.c (conflicts_print): Suppress conflict report
72 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
73 conflicts as errors if -Werror.
74 * src/getargs.c (warnings_flag): Initialize with
75 warnings_conflicts_sr and warnings_conflicts_rr as well.
76 (warnings_args, warnings_types): Add entries for
77 warnings_conflicts_sr and warnings_conflicts_rr.
78 (usage): Update.
79 * src/getargs.h (enum warnings): Add entries for
80 warnings_conflicts_sr and warnings_conflicts_rr.
81 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
82 group.
83 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
84 conflict report can produce a "warnings being treated as errors"
85 message. Also, check that stderr is now fully scrubbed by -Wnone
86 when the exit status is 0.
87
fc7ce997
JD
882011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
89
90 Pacify maintainer-check-posix.
91 Adding command-line options after the grammar file name is not
92 permitted, so disable checks that do that when
93 maintainer-check-posix is running.
94 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
95 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
96 remove an unnecessary m4_if.
97
8ffd7912
JD
982011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
99
100 Add -Wother so -Wnone suppresses all warnings.
101 Reported by George Neuner at
102 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
103 * NEWS (2.5): Document.
104 * THANKS (George Neuner): Add.
105 * doc/bison.texinfo (Bison Options): Document.
106 * src/complain.c, src/complain.h
107 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
108 (midrule_value_at): New warning function, similar to yacc_at in
109 that it's controlled by its own warning category.
110 * src/getargs.c (warnings_flag): Initialize to warnings_other.
111 (warnings_args, warnings_types): Add entry for warnings_other.
112 (usage): Update.
113 * src/getargs.h (enum warnings): Add entry for warnings_other.
114 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
115 don't print useless rules.
116 * src/reader.c (symbol_should_be_used): Rather than adjusting the
117 return value based on whether midrule value warnings are enabled,
118 accept a new parameter for telling the caller whether true is
119 being returned for a potential midrule warning.
120 (grammar_rule_check): Use midrule_value_at for midrule value
121 warnings, and continue to use warn_at for all other warnings. Let
122 them check whether the warnings are enabled.
123 * tests/local.at (AT_BISON_CHECK): Update documentation.
124 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
125 disable all warnings exercised in the test suite.
126
dab96632
JD
1272011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
128
129 Don't let -Wnone disable -Werror.
130 Discussed at
131 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
132 * NEWS (2.5): Document.
133 * src/getargs.c (flags_argmatch): Accept a new argument that
134 specifies what flags "all" and thus "none" affect.
135 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
136 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
137 New test group.
138
248dba53
JD
1392011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
140
141 * NEWS (2.5): Document fix for -Wno-CATEGORY.
142
20cc7149
DJ
1432008-11-21 Di-an Jan <dianj@freeshell.org>
144
145 Implement no-XXX arguments for --warnings, --report, --trace.
146 * src/getargs.c (flags_argmatch): Handles no-XXX.
147 Fix typo in doxygen comment.
148
56706c61
JD
1492011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
150
151 doc: fix confusing citation of LAC publication.
152 Suggested by Akim Demaille.
153 * doc/bison.texinfo (LAC): Here.
154
a6e5a280
JD
1552011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
156
157 lr.default-reductions: rename "full" value to "most".
158 Unlike "consistent" and "accepting", "full" doesn't answer the
159 question of "which states".
160 * doc/bison.texinfo (%define Summary): Update.
161 (Default Reductions): Update.
162 * src/print.c (print_reductions): Update.
163 * src/reader.c (prepare_percent_define_front_end_variables):
164 Update.
165 * src/tables.c (action_row): Update.
166 * tests/input.at (%define enum variables): Update.
167 * tests/reduce.at (%define lr.default-reductions): Update.
168
49e8e901
JD
1692011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
170
171 * src/parse-gram.c, src/parse-gram.h: Regenerate.
172
8f462efe
AD
1732011-03-09 Akim Demaille <akim@lrde.epita.fr>
174
175 named references: fix double free.
176 In `rhs[name]: "a" | "b"', do not free "name" twice.
177 Reported by Tys Lefering.
178 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
179 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
180 * src/parse-gram.y (current_lhs): Rename as...
181 (current_lhs_symbol): this.
182 (current_lhs): New function. Use it to free the current lhs
183 named reference.
184 * src/reader.c: Bind lhs to a copy of the current named reference.
185 * src/symlist.c: Rely on free (0) being valid.
186 * tests/named-refs.at: Test this.
187
686e83e3
AD
1882011-03-09 Akim Demaille <akim@lrde.epita.fr>
189
190 tests: style changes.
191 * tests/named-refs.at (Redundant words in LHS brackets)
192 (Unresolved references): here.
193
f0e2c228
JD
1942011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
195
196 java: fix parser tracing bug.
197 * NEWS (2.5): Document.
198 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
199 element.
200
4c2a6e42
JD
2012011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
202
203 java: finish fixing parser stack popping bug.
204 * NEWS (2.5): Document.
205 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
206 in clearing the location stack. Also fix pop function that
207 accepts no arguments.
208
6f75992b
AB
2092011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
210
211 java: fix parser stack popping bug.
212 Reported at
213 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
214 * THANKS (Angelo Borsotti): Add.
215 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
216 in clearing the value stack. Previously, the top element of the
217 stack wasn't cleared and so the value was not garbage collected.
218
121c4982
JD
2192011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
220
221 doc: cite publication for LAC.
222 * doc/bison.texinfo (LAC): Here.
223
5da0355a
JD
2242011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
225
226 doc: clean up terminology for mysterious conflicts.
227 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
228 (Mysterious Conflicts): ... this, which is already the section
229 title and the name used in the index. Update all cross-references
230 to this node. Also, don't imply that R/R conflicts are the only
231 kind of mysterious conflict.
232
d815ec4a
JD
2332011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
234
235 lr.default-reductions: rename "all" value to "full".
236 States that shift the error token do not have default reductions,
237 and GLR disables some default reductions, so "all" was a misnomer.
238 * doc/bison.texinfo (%define Summary): Update.
239 (Default Reductions): Update.
240 * src/print.c (print_reductions): Update.
241 * src/reader.c (prepare_percent_define_front_end_variables):
242 Update.
243 * src/tables.c (action_row): Update.
244 * tests/input.at (%define enum variables): Update.
245 * tests/reduce.at (%define lr.default-reductions): Update.
246
6f04ee6c
JD
2472011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
248
249 doc: create a new Tuning LR section in the manual.
250 And clean up all other documentation of the features described
251 there.
252 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
253 bit, update the cross-references to the manual, and point out that
254 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
255 That is, as the referenced section in the manual documents, LAC
256 does not fix infinite parsing loops on syntax errors.
257 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
258 IELR, and LR in @cindex.
259 (%define Summary): Condense the entries for lr.default-reductions,
260 lr.keep-unreachable-states, lr.type, and parse.lac into brief
261 summaries, and cross-reference the appropriate subsections of
262 Tuning LR. For parse.lac, mention that it's only implemented for
263 deterministic parsers in C.
264 (Error Reporting): When mentioning %error-verbose, mention LAC,
265 and add cross-reference to the LAC section.
266 (Tuning LR): New section with an extended version of the
267 documentation removed from %define Summary. Change all
268 cross-references in the manual to point here instead of there.
269 (Calc++ Parser): When mentioning %error-verbose, mention LAC, and
270 add cross-reference to the LAC section.
271 (Table of Symbols): In %error-verbose and YYERROR_VERBOSE entries,
272 add cross-references to Error Reporting.
273 (Glossary): Capitalize entry titles consistently. Add definitions
274 for "defaulted state" and "unreachable state". Expand IELR
275 acronym in IELR's entry.
276
71caec06
JD
2772011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
278
279 doc: add bibliography to manual.
280 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
281 bibliography instead of citing publications directly.
282 (Generalized LR Parsing): Likewise.
283 (Bibliography): New section. Not all entries are cross-referenced
284 yet, but that will come in future patches.
285
77768165
JD
2862011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
287
288 java: test and document previous bug fix.
289 * NEWS (2.5): Document it.
290 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
291 invocations, pass a location that spans multiple tokens. Change
292 yyerror to report all of a location rather than just the begin
293 position. Extend yylex and Position to count tokens on a line.
294 Remove getHashCode as it's unused. Update all expected output.
295
8db68289
BK
2962011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
297
298 java: fix location handling bug.
299 Reported at
300 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
301 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
302 reversed access to location stack.
303 * THANKS (Bernd Kiefer): Add.
304
f3103c5b
AD
3052010-05-11 Akim Demaille <demaille@gostai.com>
306
307 doc: please Emacs.
308 * doc/bison.texinfo (Local Variables): Move this after the
309 LocalWords, since the latter are looked for in the whole document,
310 while the former are looked for only at its end.
311 Require american spell checking.
312
406dec82
JD
3132011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
314
315 doc: clean up new subsections in manual.
316 * doc/bison.texinfo (%define Summary): Reword so it reads well as
317 a separate section. For example, add an intro, and move most of
318 the text outside of the @deffn so it is not indented so far.
319 (%code Summary): Likewise.
320 (Table of Symbols): Reword %code entry to match the %code entry in
321 Decl Summary.
322
2f4518a1
JD
3232011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
324
325 doc: finish splitting apart the manual's Decl Summary section.
326 Suggested by Akim Demaille at
327 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
328 * doc/bison.texinfo (Decl Summary): Extract most of the %define
329 entry into...
330 (%define Summary): ... this new subsection, and update all
331 cross-references. For readability of the patches, rewriting of
332 the text so it makes sense as a separate subsection will come in a
333 later patch. Moreover, the majority of the text describing the
334 various new LR features should likely move to another new section
335 somewhere.
336
8e6f2266
JD
3372011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
338
339 doc: begin to split apart the manual's Decl Summary section.
340 Discussed in thread starting at
341 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
342 * doc/bison.texinfo (Decl Summary): Extract most of the %code
343 entry into...
344 (%code Summary): ... this new subsection, and update all
345 cross-references. For readability of the patches, rewriting of
346 the text so it makes sense as a separate subsection will come in a
347 later patch.
348
9913d6e4
JD
3492011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
350
351 doc: clean up naming of various Bison files.
352 The Bison manual's names for various files associated with a Bison
353 parser has devolved into inconsistency. This patch makes the
354 naming consistent for the most important files. First, it chooses
355 "grammar file" over "input file". The former appears to be more
356 traditional in the Bison manual, and Bison has other input
357 files (skeletons). Second, it chooses "parser implementation
358 file" over names like "parser file", "parser source file", "parser
359 source code file", and "parser output file". The new name makes
360 it clearer where Bison generates the main parser implementation,
361 and it is easily distinguishable from "parser header file".
362 * doc/bison.texinfo: Implement throughout.
363
840341d6
JD
3642011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
365
366 doc: give credit to more of Bison's developers.
367 * doc/bison.texinfo (Introduction): Don't imply that only Robert
368 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
369 Bison. However, I don't have time to write a full history, so
370 just point readers to THANKS and ChangeLog.
371
d89e48b3
JD
3722011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
373
374 doc: document experimental features better.
375 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
376 LR(1) are experimental. Mention Java. Normally experimental
377 features probably shouldn't be mentioned in the introduction.
378 However, if Bison's limitations to LALR(1), C, and C++ are so
379 important that they should be mentioned here, then it's important
380 to point out that Bison is beginning to escape those limitations.
381 Moreover, these particular experimental features have very little
382 chance of being removed.
383 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
384 experimental.
385
eb8c66bb
JD
3862011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
387
388 Do not allow identifiers that start with a dash.
389 This cleans up our previous fixes for a bug whereby Bison
390 discarded `.field' in `$-1.field'. The previous fixes were less
391 restrictive about where a dash could appear in an identifier, but
392 the restrictions were hard to explain. That bug was reported and
393 this final fix was originally suggested by Paul Hilfinger. This
394 also fixes a remaining bug reported by Paul Eggert whereby Bison
395 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
396 identifier. Now, `-' cannot be an identifier. Discussed in
397 threads beginning at
398 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
399 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
400 * NEWS (2.5): Update entry describing the dash extension to
401 grammar symbol names. Also, move that entry before the named
402 references entry because the latter mentions the former.
403 * doc/bison.texinfo (Symbol): Update documentation for symbol
404 names. As suggested by Paul Eggert, mention the effect of periods
405 and dashes on named references.
406 (Decl Summary): Update documentation for unquoted %define values,
407 which, as a side effect, can no longer start with dashes either.
408 * src/scan-code.l (id): Implement.
409 * src/scan-gram.l (id): Implement.
410 * tests/actions.at (Exotic Dollars): Extend test group to exercise
411 bug reported by Paul Hilfinger.
412 * tests/input.at (Symbols): Update test group, and extend to
413 exercise bug reported by Paul Eggert.
414 * tests/named-refs.at (Stray symbols in brackets): Update test
415 group.
416 ($ or @ followed by . or -): Likewise.
417 * tests/regression.at (Invalid inputs): Likewise.
418
448dc38b
JD
4192011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
420
421 * data/yacc.c: Fix last apostrophe warning from xgettext.
422
7e5ef706
PE
4232011-01-09 Paul Eggert <eggert@cs.ucla.edu>
424
425 Fix minor problems encountered by a fresh bootstrap.
426 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
427 as they confuse xgettext, which tries to parse them as C character
428 constants in a preprocessor directive.
429 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
430 that expression might not promote to int on some platforms.
431 * src/parse-gram.c, src/parse-gram.h: Regenerate.
432
8cbbf178
JD
4332011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
434
435 Improve error messages for `$' or `@' followed by `.' or `-'.
436 Previously, for this special case of an invalid reference, the
437 usual "symbol not found in production:" was printed. However,
438 because the symbol name was parsed as the empty string, that
439 message was followed immediately by a newline instead of a symbol
440 name. In reality, this is a syntax error, so the reference is
441 invalid regardless of the symbols actually appearing in the
442 production. Discussed at
443 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
444 * src/scan-code.l (parse_ref): Report the above case as a syntax
445 error. Other than that, continue to handle this case like any
446 other invalid reference that Bison manages to parse because
447 "possibly meant" messages can still be helpful to the user.
448 * tests/named-refs.at ($ or @ followed by . or -): New test group.
449
35430378
JD
4502011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
451
452 doc: don't use @acronym.
453 Lately, many GNU packages are dropping it. See
454 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
455 * doc/bison.texinfo: Remove all uses.
456
d236ad94
AR
4572011-01-05 Alex Rozenman <rozenman@gmail.com>
458
459 Do not allow identifiers that start with a negative number.
460 Reported by Paul Hilfinger as a side effect of named references
461 support at
462 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
463 Suggested by Paul Eggert.
464 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
465 * src/scan-gram.l ({letter}, {id}): Likewise.
466
9a4292e5
JD
4672011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
468
469 * ChangeLog (2011-01-02): improve description.
470
17300e83
JD
4712011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
472
473 maint: don't update copyright years in bootstrap.
474 * .x-update-copyright: Add entry for bootstrap.
475 * bootstrap: Remove 2011 from copyright years. The bootstrap
476 version we're currently using comes from an older version of
477 gnulib.
478 * bootstrap.conf (bootstrap_sync): Add comments explaining this
479 issue.
480
ea0a7676
JD
4812011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
482
483 maint: run "make update-copyright".
484
f52e1e5e
JD
4852011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
486
9a4292e5 487 maint: prepare to use year ranges in copyright notices.
f52e1e5e 488 * README (Copyright statements): New section explaining the range
9a4292e5
JD
489 notation. The GNU maintainers document requires this explanation:
490 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
491 I copied our explanation from coreutils.
f52e1e5e
JD
492 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
493 disabled Bison's automated use of ranges.
494 * cfg.mk (update-copyright-env): Likewise.
495
210c1eef
JD
4962011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
497
498 Correct my email address.
499 * ChangeLog: In all recent entries.
500 * THANKS (Joel E. Denny): Here.
501
5022010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
6ee881f6
JD
503
504 doc: cleanup.
505 * NEWS (2.5): Try to sort entries according to how interesting
506 users might find them.
507
210c1eef 5082010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
3b1977ea
JD
509
510 doc: cleanup.
511 * NEWS (2.5): Make some minor improvements to wording, and format
512 entries more consistently.
513 * doc/bison.texinfo (Language and Grammar): Point out that IELR
514 and canonical LR are experimental features.
515 (Decl Summary): In list of %define variables, make wording more
516 consistent. Improve discussion of using LALR for GLR.
517
210c1eef 5182010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
4c38b19e
JD
519
520 parse.lac: document.
521 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
522 other corrections to verbose syntax error messages.
523 * doc/bison.texinfo (Decl Summary): Rewrite entries for
524 lr.default-reductions and lr.type to be clearer, to mention
525 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
526 for parse.lac.
527 (Glossary): Add entry for LAC.
528
210c1eef 5292010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
723fe7d1
JD
530
531 parse.lac: implement exploratory stack reallocations.
532 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
533 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
534 with values of "failures" (default) or "full".
535 (b4_declare_parser_state_variables): Add yyesa, yyes, and
536 yyes_capacity variables.
537 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
538 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
539 LAC requested.
540 (YYCOPY_NEEDED): New cpp macro.
541 (YYCOPY): Define if LAC requested.
542 (yy_lac_stack_realloc): New function implementing stack
543 reallocations. Use YYMAXDEPTH for maximum stack size given that
544 the stack should never need to grow larger than the main state
545 stack needs to grow without LAC.
546 (YY_LAC_ESTABLISH): Update yy_lac invocation.
547 (yy_lac): Add arguments for exploratory stack memory data
548 recorded in the main parser. Invoke yy_lac_stack_realloc when
549 reallocation is necessary.
550 (yysyntax_error): Add the same new arguments and pass them to
551 yy_lac.
552 (yypstate_delete): Free yyes if necessary.
553 (yyesa, yyes, yyes_capacity): #define these to yypstate members
554 in the case of push parsing.
555 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
556 Update yysyntax_error invocations. At yyreturn, free yyes if
557 necessary.
558 * src/parse-gram.y: %define parse.lac full.
559 * tests/input.at (LAC: errors for %define): Extend for
560 parse.lac-memory-trace.
561 * tests/regression.at (LAC: Exploratory stack): Extend to check
562 that stack reallocs happen when expected.
563 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
564 parse.lac.es-capacity-initial.
565
210c1eef 5662010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
ea13bea8
JD
567
568 parse.lac: implement as %define variable.
569 LAC = lookahead correction. See discussion at
570 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
571 However, one point there must be corrected: because of %nonassoc,
572 LAC is *not* always redundant for lr.type=canonical-lr.
573 * data/yacc.c: Accept values of "none" (default) or "full" for
574 parse.lac. Accept %define parse.lac.es-capacity to specify
575 capacity of LAC's temporary exploratory stack. It defaults to 20
576 and, for now, will not grow dynamically.
577 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
578 parse.lac!=none.
579 (YYBACKUP): Invoke YY_LAC_DISCARD.
580 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
581 yy_lac and track when it needs to be invoked
582 (yy_lac): New function that, given the current stack, determines
583 whether a token can eventually be shifted. Return status mimics
584 yyparse return status.
585 (yysyntax_error): Change yystate argument to yyssp so stack top
586 can be passed to yy_lac. If LAC is requested, build expected
587 token list by invoking yy_lac for every token instead of just
588 checking the current state for lookaheads. Return 2 if yy_lac
589 exhausts memory.
590 (yyparse, yypush_parse): Use local variable yy_lac_established and
591 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
592 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
593 is requested.
594 * tests/conflicts.at (%nonassoc and eof): Extend to check the
595 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
596 (%error-verbose and consistent errors): Likewise.
597 (LAC: %nonassoc requires splitting canonical LR states): New test
598 group demonstrating how LAC can fix canonical LR.
599 * tests/input.at (LAC: Errors for %define): New test group.
600 * tests/regression.at (LAC: Exploratory stack): New test group.
601 (LAC: Memory exhaustion): New test group.
602
210c1eef 6032010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
dcd39f1d
JD
604
605 build: use gnulib's new bootstrap_sync option.
606 Now, whenever we update bison's copy of gnulib, bootstrap will
607 update itself the next time it's run.
608 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
609 * bootstrap.conf (bootstrap_sync): Set to true.
610 * gnulib: Update to latest so bootstrap is in sync now.
611
210c1eef 6122010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
3b837882
JD
613
614 yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.
615 On master, there is no yychar in lalr1.cc, but there is on
616 branch-2.5, and the prior cherry-pick of "Fix handling of yychar
617 manipulation in user semantic actions" wasn't adjusted for that
618 difference.
619 * data/lalr1.cc (yy::parser::parse): Translate yychar before
620 every use of yytoken, and add comments explaining this approach.
621 * tests/conflicts.at (%error-verbose and consistent errors):
622 Extend to test yychar manipulation with lalr1.cc.
623
210c1eef 6242010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
095a1d11
JD
625
626 yysyntax_error: fix for consistent error with lookahead.
627 * NEWS (2.5): Document.
628 * data/yacc.c (yysyntax_error): In a verbose syntax error
629 message while in a consistent state with a default action (which
630 must be an error action given that yysyntax_error is being
631 invoked), continue to drop the expected token list, but don't
632 drop the unexpected token unless there actually is no lookahead.
633 Moreover, handle that internally instead of returning 1 to tell
634 the caller to do it. With that meaning of 1 gone, renumber
635 return codes more usefully.
636 (yyparse, yypush_parse): Update yysyntax_error usage. Most
637 importantly, set yytoken to YYEMPTY when there's no lookahead.
638 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
639 unexpected token unless there actually is no lookahead.
640 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
641 set yytoken to yyempty_ before invoking yysyntax_error_.
642 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
643 token unless there actually is no lookahead.
644 * data/lalr1.java (YYParser::parse): If there's no lookahead,
645 set yytoken to yyempty_ before invoking yysyntax_error.
646 (YYParser::yysyntax_error): Again, don't drop the unexpected
647 token unless there actually is no lookahead.
648 * tests/conflicts.at (%error-verbose and consistent
649 errors): Extend test group to further reveal how the previous
650 use of the simple "syntax error" message was too general. Test
651 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
652 failure.
653 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
654 to...
655 * tests/local.at: ... here.
656 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
657 (AT_BISON_OPTION_POPDEFS): Pop it.
658 (AT_FULL_COMPILE): Extend to handle Java.
659
210c1eef 6602010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
678094a2
JD
661
662 yysyntax_error: more preparation for readability of next patch.
663 There are no behavioral changes here.
664 * data/glr.c (yyreportSyntaxError): Reorganize.
665 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
666 * tests/conflicts.at (%error-verbose and consistent errors):
667 Reorganize.
668
210c1eef 6692010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
f953cb20
JD
670
671 yysyntax_error: prepare for readability of next patches.
672 These are purely whitespace changes that result in ugly code
673 but that make the next couple of patches much easier to read.
674 * data/glr.c (yyreportSyntaxError): Reindent.
675 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
676 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
677 * data/yacc.c (yysyntax_error): Reindent.
678
0e0f066b
JD
6792010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
680
681 yysyntax_error: improve invocation readability.
682 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
683 invocation, get rid of the while loop, which is misleading
684 because there are really at most two iterations.
685
5f1485d8
JD
6862010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
687
688 * ChangeLog: Correct some errors in previous entries.
689
2f3fd8f9
JD
6902010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
691
692 maint: re-anchor all .gitignore entries.
693 * bootstrap: Copy from gnulib's latest for the fix to
694 automatically anchor entries it constructs.
695 * gnulib: Update to latest just so it has the same bootstrap.
696 * .gitignore, build-aux/.gitignore, doc/.gitignore:
697 * lib/.gitignore, m4/.gitignore, po/.gitignore:
698 * runtime-po/.gitignore: Re-anchor all entries.
699
86996fca
PE
7002010-10-08 Paul Eggert <eggert@cs.ucla.edu>
701
ea6046b9
PE
702 Fix portability problem on OpenBSD 4.7.
703
704 Jim Meyering reported this in
705 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
706 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
707 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
708 for quite some time.
709 * src/parse-gram.c, src/parse-gram.h: Regenerate.
710 * tests/regression.at: Tamper with the renamed witness.
711
86996fca
PE
712 Adjust to recent changes to gnulib bootstrap.
713
714 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
715 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
716 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
717 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
718 anymore and don't know of anybody else who does. If someone needs
719 these files, they can resurrect them.
720 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
721 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
722 Omit leading '/', since bootstrap omits it.
723 Adjust file names to match current contents better.
724 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
725 installed just for us.
726 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
727 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
728 needed somehow. Don't have time to look into why.
729 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
730 the GNU malloc behavior, where malloc (0) != NULL unless we're
731 out of storage? If not, we can omit malloc-gnu; but for now I left
732 it in to be safe.
733 (vc_ignore): Remove.
734 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
735 uses that convention.
736
7527c744
JD
7372010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
738
739 Version 2.4.3.
740 * NEWS (2.4.3): Set date.
741
d034d520
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
cf22447c
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
4631c34f
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
3e948170
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
82df2d6d
JD
7802010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
781
782 i18n: update.
783 * po/POTFILES.in: Add src/graphviz.c.
784
6e0ecb9a
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
83e34842
JD
7912010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
792
793 maint: use announce-gen's new --mail-headers.
794 * HACKING (Announce): Update instructions.
795 * cfg.mk (announcement_Cc_): Define.
796 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
797 required by latest gnulib.
798 * gnulib: Update to latest.
799
0162a44c
JD
8002010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
801
802 tests: handle Valgrind that complains about >&-.
803 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
804 (Output files: -dv >&-): Skip test group if running
805 maintainer-check-valgrind.
806
241ac701
AD
8072010-06-17 Paul Eggert <eggert@cs.ucla.edu>
808
809 Update from GFDL GFDL 1.2 to 1.3.
810 * doc/bison.texinfo: Update GFDL version number.
811 * doc/fdl.texi: Update to version 1.3, taken from:
812 http://www.gnu.org/licenses/fdl.texi
813
6e30ede8
PE
8142010-06-17 Paul Eggert <eggert@cs.ucla.edu>
815
816 Do not use date ranges in copyright notices.
817 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
818
819 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
820 * TODO, bootstrap, bootstrap.conf:
821 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
822 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
823 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
824 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
825 * data/lalr1.java, data/location.cc:
826 * data/xslt/bison.xsl:
827 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
828 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
829 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
830 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
831 * djgpp/subpipe.c, djgpp/subpipe.h:
832 * djgpp/testsuite.sed, doc/bison.texinfo:
833 * doc/refcard.tex, etc/README, etc/bench.pl.in:
834 * examples/calc++/Makefile.am, examples/extexi:
835 * lib/abitset.c, lib/abitset.h:
836 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
837 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
838 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
839 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
840 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
841 * lib/libiberty.h, lib/main.c, lib/timevar.c:
842 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
843 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
844 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
845 * src/AnnotationList.c, src/AnnotationList.h:
846 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
847 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
848 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
849 * src/complain.h, src/conflicts.c, src/conflicts.h:
850 * src/derives.c, src/derives.h, src/files.c, src/files.h:
851 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
852 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
853 * src/ielr.h, src/lalr.c, src/lalr.h:
854 * src/location.c, src/location.h, src/main.c:
855 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
856 * src/named-ref.h, src/nullable.c, src/nullable.h:
857 * src/output.c, src/output.h, src/parse-gram.y:
858 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
859 * src/print_graph.c, src/print_graph.h, src/reader.c:
860 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
861 * src/relation.h, src/scan-code.h, src/scan-code.l:
862 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
863 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
864 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
865 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
866 * tests/actions.at, tests/atlocal.in, tests/c++.at:
867 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
868 * tests/existing.at, tests/glr-regression.at:
869 * tests/headers.at, tests/input.at, tests/java.at:
870 * tests/local.at, tests/named-refs.at:
871 * tests/output.at, tests/push.at, tests/reduce.at:
872 * tests/regression.at, tests/sets.at, tests/skeletons.at:
873 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
874 * data/Makefile.am, data/location.cc, doc/Makefile.am, src/Makefile.am:
875 * tests/Makefile.am, lib/Makefile.am, examples/Makefile.am:
876 * etc/Makefile.am:
877 Don't use date ranges in copyright notices.
878
3d4a0cad
AD
8792010-05-11 Akim Demaille <demaille@gostai.com>
880
881 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
882 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
883 header file to the implementation file, after the user %code
884 sections.
885 * NEWS (2.5): Document this.
886
e7bab2df
AD
8872010-05-07 Akim Demaille <demaille@gostai.com>
888
889 c++: use YYRHSLOC.
890 * data/lalr1.cc (YYRHSLOC): New.
891 (YYLLOC_DEFAULT): Use it.
892 * data/glr.cc: If location_type was user defined, do not include
893 location.hh, and do not produce location.hh and position.hh.
894 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
895 Check that glr.cc supports user defined location_type.
896 * NEWS: Document this.
897
baacae49
AD
8982010-05-10 Akim Demaille <demaille@gostai.com>
899
900 doc: fix lalr1.cc documentation.
901 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
902 (C++ Bison Interface): Fix lalr1.cc skeleton name.
903 (C++ Parser Interface): Fix semantic_type and location_type names.
904 Document yy::parser::token.
905 Reported by Jerry Quinn.
906
95a2de56
AD
9072010-05-04 Akim Demaille <demaille@gostai.com>
908
909 lalr1.cc: don't generate location.hh when location_type is defined
910 * data/bison.m4 (b4_percent_define_use): New.
911 (b4_percent_define_get): Use it.
912 Accept a default value.
913 * data/c++.m4: Do not provide a default value for the %define
914 variable location_type, rather, use b4_percent_define_get with a
915 default argument where its value is needed.
916 * data/lalr1.cc: Do not load location.cc (which outputs both
917 location.hh and position.hh) if the user defined location_type.
918 Do not include location.hh either.
919 * data/glr.cc: Likewise.
920
0f404a0a
AD
9212010-05-04 Akim Demaille <demaille@gostai.com>
922
923 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
924 * tests/calc.at (Span): Instead of begin/end, as in the built-in
925 location class, use first and last.
926 Define YYLLOC_DEFAULT to adjust to these changes.
927 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
928 location_type changes.
929
bdc360ae
AD
9302010-05-04 Akim Demaille <demaille@gostai.com>
931
932 tests: enhance AT_SYNCLINES_COMPILE.
933 * tests/synclines.at (AT_TEST_SYNCLINE): Move GCC 4.5 protection
934 into...
935 (AT_SYNCLINES_COMPILE): here.
936 Add more distcc patterns.
937
ca7a59e8
JD
9382010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
939
940 tests: fix maintainer-xml-check.
941 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
942 Update output to include comments now produced by --graph.
943 (xsl:template match="automaton"): As for --graph, name the
944 digraph after the grammar file.
945 * src/print-xml.c (escape_bufs): Enlarge array.
946 (print_xml): Add bug-report and url attributes to
947 bison-xml-report element.
948
ad6f84e5
JD
9492010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
950
951 In DOT output, convert from "/*" comments to "//" comments.
952 This handles the possibility that a "*/" might appear in
953 variable portions of those comments at some point in the future.
954 * src/graphviz.c (start_graph): Implement.
955
43fdc9fd
JD
9562010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
957
958 Document that undefined %prec identifier warnings will remain.
959 * NEWS (2.4.3): Here.
960 (2.4.2): Here.
961
e02df72c
JD
9622010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
963
964 Revert 2009-12-30 change for undefined %prec token complaints.
965 That is, keep them as warnings because that should be sufficient
966 to satisfy POSIX without creating backward compatibility issues.
967 Suggested by Richard Stallman at
968 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
969 * NEWS (2.5): Remove mention of complaint.
21279295
JD
970 * src/reader.c (grammar_rule_check): Convert complaint back to
971 warning.
e02df72c
JD
972 * tests/input.at (%prec's token must be defined): Update.
973
ba3063f6
JD
9742010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
975
976 build: don't require src/bison during bootstrap.
977 Suggested by Eric Blake at
978 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
979 * bootstrap.conf (bootstrap_epilogue): New function to make sure
980 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
981
e0fda26c
JD
9822010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
983
984 i18n: fix untranslatable string.
985 Reported by Goran Uddeborg at
986 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
987 * src/muscle-tab.c (muscle_percent_define_insert): Here.
988
ecbca7db
AD
9892010-04-13 Akim Demaille <demaille@gostai.com>
990
991 tests: calc: minor refactoring.
992 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
993
ed228e60
AD
9942010-04-13 Akim Demaille <demaille@gostai.com>
995
996 tests: calc: simplify location management.
997 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
998 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
999 define the appropriate AT_LOC accessors.
1000 * tests/calc.at: Use AT_LOC accessors.
1001
cacfdef7
AD
10022010-04-13 Akim Demaille <demaille@gostai.com>
1003
1004 test location_type.
1005 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1006 Define AT_LOCATION_TYPE_IF.
1007 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1008 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1009 used, provide a user location type and use it.
1010 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1011
2f61c4a2
AD
10122010-04-13 Akim Demaille <demaille@gostai.com>
1013
1014 tests: check fclose's return value.
1015 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1016
16d9244d
AD
10172010-04-13 Akim Demaille <demaille@gostai.com>
1018
1019 tests: don't depend on the actual location type.
1020 * tests/calc.at: Use yy::parser::location_type rather than
1021 yy::location, since the former is always right, and might point to
1022 another type than the latter.
1023
3e4a253b
AD
10242010-04-13 Akim Demaille <demaille@gostai.com>
1025
1026 formatting changes.
1027 * tests/calc.at: Formatting changes.
1028
df5df58d
AD
10292010-04-13 Akim Demaille <demaille@gostai.com>
1030
1031 lalr1.cc: remove useless forward declaration.
1032 * data/lalr1.cc: Include location.hh before stack.hh.
1033 Remove the useless forward declarations of position and location.
1034 Reported by Chris Morley.
1035 * data/glr.cc: Likewise.
1036
88bb35d6
JD
10372010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1038
1039 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1040
585ef2eb
JD
10412010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1042
1043 tests: fix for newer Sun Studio C++.
1044 Reported by Dagobert Michelsen at
1045 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1046 * THANKS (Dagobert Michelsen): Add.
1047 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1048 Autoconf macro for handling the restrict keyword.
1049 * gnulib: Update to latest, which no longer overrides that macro
1050 from Autoconf.
1051
a005dbcb
JD
10522010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1053
1054 portability: fix pointer arithmetic to conform to C standard.
1055 Reported by Tys Lefering at
1056 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1057 This fix is already implemented in glr.c and does not apply to
1058 lalr1.java.
1059 * data/lalr1.cc (yy::parser::parse): Increase size of
1060 yyerror_range and adjust subscripting so you don't have to
1061 subtract one from the beginning of the array.
1062 * data/yacc.c (b4_declare_parser_state_variables,
1063 yyparse, yypush_parse): Likewise.
1064
8a8b33e8
AD
10652010-04-05 Akim Demaille <demaille@gostai.com>
1066
1067 remove useless include.
1068 * src/graphviz.h: Don't include stdbool.h.
1069
a0279765
AD
10702010-04-05 Akim Demaille <demaille@gostai.com>
1071
1072 graph: sign the output file.
1073 * src/graphviz.c (start_graph): Issue comments about Bison.
1074 Suggested by Tys Lefering.
1075
132247cd
JD
10762010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1077
1078 portability: fix test suite for GCC 4.5's new #error message.
1079 Reported by Tys Lefering at
1080 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1081 * NEWS (2.4.3): Mention.
1082 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1083
c0259969
AD
10842010-03-30 Akim Demaille <demaille@gostai.com>
1085
1086 fix comments.
1087 * src/graphviz.h: Add missing license notice.
1088 Document.
1089
23761f42
AD
10902010-03-25 Akim Demaille <demaille@gostai.com>
1091
1092 tests: fix 250: parse.error=verbose overflow.
1093 * tests/regression.at (parse.error=verbose overflow): Avoid the
1094 double inclusion of stdlib.h as it triggers hard errors.
1095
9097fda0
JD
10962010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1097
1098 portability: fix for BSD make.
1099 Reported by Johan van Selst at
1100 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1101 * tests/Makefile.am ($(TESTSUITE)): Qualify package.m4 in
1102 this dependency list as in package.m4's target rule.
1103
7a9c3cb3
JD
11042010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1105
1106 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1107 Reported by Johan van Selst at
1108 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1109 * NEWS (2.4.3): New.
1110 * THANKS (Johan van Selst): Add.
1111 * gnulib: Update to latest.
1112
5a3c69f1
JD
11132010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1114
1115 maint: update for changes to gnulib's announce-gen.
1116 * HACKING (Announce): RELEASE_TYPE=major must now be written
1117 RELEASE_TYPE=stable.
1118
ea66d039
JD
11192010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1120
1121 Version 2.4.2.
1122 * NEWS (2.4.2): Set version and date. For the recent test suite
1123 portability fixes, don't be so optimistic about their success
1124 given the lack of feedback on the affected platforms.
1125
c50befe6
JD
11262010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1127
1128 tests: fix maintainer-xml-check for recent changes.
1129 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1130 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1131 output file whose name conflicts with a previous output file
1132 is now never generated.
1133
47fa5747
JD
11342010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1135
1136 portability: fix several issues with M4 subprocess.
1137
1138 M4's output pipe was not being drained upon fatal errors during
1139 scan_skel. As a result, broken-pipe messages from M4 were seen
1140 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1141 failure in the test suite. The problem was that, on platforms
1142 where the default disposition for SIGPIPE is ignore instead of
1143 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1144 then reported it. However, there's some sort of race condition,
1145 because the new test group occasionally succeeded.
1146 Reported by Albert Chin at
1147 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1148
1149 There were also problems with the test suite livelocking on
1150 Tru64 5.1b. Reported by Didier Godefroy at
1151 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1152 Switching to create_pipe_bidi suggested by Akim Demaille.
1153
1154 To attempt to solve both of these problems, switch to gnulib's
1155 create_pipe_bidi and register M4 process as a slave. Along the
1156 way, clean up file name conflict handling, which was affected by
1157 the broken-pipe problem before the switch.
1158 * NEWS (2.4.2): Document.
1159 * THANKS (Didier Godefroy): Add.
1160 * bootstrap.conf (gnulib_modules): Add pipe.
1161 * gnulib: Update to latest to make sure we have all the latest
1162 fixes.
1163 * lib/Makefile.am (libbison_a_SOURCES): Remove subpipe.h and
1164 subpipe.c.
1165 * po/POTFILES.in (lib/subpipe.c): Remove.
1166 * src/files.c (compute_output_file_names): Update invocations
1167 of output_file_name_check.
1168 (output_file_name_check): In the case that the grammar file
1169 would be overwritten, use complain instead of fatal, but replace
1170 the output file name with /dev/null. Use the /dev/null solution
1171 for the case of two conflicting output files as well because it
1172 seems safer in case Bison one day tries to open both files at
1173 the same time.
1174 * src/files.h (output_file_name_check): Update prototype.
1175 * src/output.c (output_skeleton): Use create_pipe_bidi and
1176 wait_subprocess. Assert that scan_skel completely drains the
1177 pipe.
1178 * src/scan-skel.l (at_directive_perform): Update
1179 output_file_name_check invocation.
1180 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1181 grammar file actually isn't overwritten.
1182 (Conflicting output files: -o foo.y): Update expected output.
1183 * tests/skeletons.at (Fatal errors but M4 continues producing
1184 output): New test group.
1185
d67e37a7
JD
11862010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1187
1188 Update POTFILES.
1189 * HACKING (Release Procedure): Add reminder about keeping
1190 POTFILES files up-to-date.
1191 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1192
0ee1af2e
JD
11932010-02-01 Joel E. Denny <jdenny@clemson.edu>
1194
1195 Code cleanup.
1196 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1197 which is already defined in atconfig.
1198
2655c7cd
JD
11992010-01-21 Joel E. Denny <jdenny@clemson.edu>
1200
1201 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1202
8ebc7dca
JD
12032010-01-21 Joel E. Denny <jdenny@clemson.edu>
1204
1205 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1206 * HACKING (Release Procedure): Update notes on copyright years.
1207 * Makefile.am (update-package-copyright-year): New target rule.
1208 * build-aux/update-package-copyright-year: New file.
1209 * cfg.mk (update-copyright): Add update-package-copyright-year
1210 as a dependency.
1211
f0a43dd1
JD
12122010-01-19 Joel E. Denny <jdenny@clemson.edu>
1213
1214 * bootstrap: Import improvements from latest gnulib.
1215
e4ca7a85
JD
12162010-01-19 Joel E. Denny <jdenny@clemson.edu>
1217
1218 build: require Automake 1.11.1 to avoid a security flaw.
1219 * HACKING (Release Procedure): Don't document Automake security
1220 flaw here.
1221 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1222 why here.
1223
8d830047
JD
12242010-01-19 Joel E. Denny <jdenny@clemson.edu>
1225
1226 gnulib: update to latest.
1227
e5926647
JD
12282010-01-19 Joel E. Denny <jdenny@clemson.edu>
1229
1230 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1231
5a2f6eb4
JD
12322010-01-15 Joel E. Denny <jdenny@clemson.edu>
1233
1234 Thank the developer of the initial push parser implementation.
1235 This unfortunate oversight is several years old.
1236 * THANKS (Odd Arild Olsen): Add.
1237
1c4ad777
JD
12382010-01-04 Joel E. Denny <jdenny@clemson.edu>
1239
1240 Fix some comments concerning LR(0) versus LALR(1).
1241
1242 Stop equating LR(0) with nondeterminism and LALR(1) with
1243 determinism. That is, if all states are consistent, then LR(0)
1244 tables are deterministic. On the other hand, LALR(1) tables
1245 might be nondeterministic before conflict resolution, and GLR
1246 permits LALR(1) tables to remain nondeterministic.
1247 * src/LR0.c, src/LR0.h: Here.
1248 * src/lalr.c, src/lalr.h: Here.
1249 * src/main.c (main): Here.
1250 * src/state.c, src/state.h: Here.
1251
1252 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1253 parser tables.
1254
1462fcee
JD
12552010-01-04 Joel E. Denny <jdenny@clemson.edu>
1256
1257 maint: run "make update-copyright"
1258
510df951
JD
12592009-12-30 Joel E. Denny <jdenny@clemson.edu>
1260
1261 POSIX: complain if %prec's token was not defined.
1262 * NEWS (2.5): Document.
1263 * src/reader.c (grammar_rule_check): Convert warning to
1264 complaint.
1265 * tests/input.at (%prec's token must be defined): Update.
1266
2c203528
JD
12672009-12-30 Joel E. Denny <jdenny@clemson.edu>
1268
1269 POSIX: warn if %prec's token was not defined.
1270 Reported by Florian Krohm at
1271 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1272 * NEWS (2.4.2): Document.
1273 * src/reader.c (grammar_rule_check): Implement.
1274 (grammar_current_rule_prec_set): Add comments explaining that we
1275 here assume a %prec identifier is a token, but we still manage
1276 to support POSIX.
1277 * tests/input.at (%prec's token must be defined): New test
1278 group.
1279
a93cdd3d
JD
12802009-12-31 Joel E. Denny <jdenny@clemson.edu>
1281
1282 * HACKING (Release Procedure): Recommend a secure automake.
1283
bb57985c
AD
12842008-12-11 Akim Demaille <demaille@gostai.com>
1285
1286 Propagate i18n changes into glr.c.
1287 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1288 building the error message format dynamically.
1289 * data/lalr1.java: Formatting changes.
1290
70afaf26
JD
12912009-12-22 Joel E. Denny <jdenny@clemson.edu>
1292
1293 Port small part of master's 11707b2b so future ports are easier.
1294 * data/lalr1.java (YYParser::yysyntax_error): Untabify.
1295
8200219a
AD
12962008-12-11 Akim Demaille <demaille@gostai.com>
1297
1298 Simplify the i18n of the error messages.
1299 * data/lalr1.cc: Comment changes.
1300
39f6a8d1
AD
13012008-11-11 Akim Demaille <demaille@gostai.com>
1302
1303 Prefer M4 to CPP.
1304 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1305 YYERROR_VERBOSE.
1306
e657f369
AD
13072008-11-11 Akim Demaille <demaille@gostai.com>
1308
1309 Support i18n of the parse error messages.
1310 * TODO (lalr1.cc/I18n): Remove.
1311 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1312 error messages, as done in yacc.c.
1313 Stay within the yy* pseudo namespace.
1314
1e05521d
JD
13152009-12-22 Joel E. Denny <jdenny@clemson.edu>
1316
1317 Port small part of master's 8901f32e so future ports are easier.
1318 * data/lalr1.cc (yy::parser::yysyntax_error_): Always add second
1319 argument, but name it in the function definition only when
1320 verbose error messages are enabled and it'll thus be used.
1321 (yy::parser::parse): Update use of yysyntax_error_.
1322
2728ac7e
JD
13232009-12-29 Joel E. Denny <jdenny@clemson.edu>
1324
1325 portability: `<' and `>' are not always defined on addresses.
1326 Specifically, don't sort objects by their memory addresses when
1327 they're not allocated in the same array or other object. Though
1328 I haven't found a test case where that fails on my platform, C
1329 says the behavior is undefined.
1330 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1331 FIXME. Use new id field of InadequacyList nodes rather than
1332 their memory addresses when sorting.
1333 (AnnotationList__compute_from_inadequacies): Add
1334 inadequacy_list_node_count argument to pass to
1335 InadequacyList__new_conflict.
1336 * src/AnnotationList.h
1337 (AnnotationList__compute_from_inadequacies): Update prototype
1338 and documentation for new argument.
1339 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1340 node_count argument and use it to assign a unique ID.
1341 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1342 (InadequacyList): Add id field.
1343 (InadequacyList__new_conflict): Update prototype and
1344 documentation for new argument.
1345 * src/ielr.c (ielr_compute_annotation_lists): Update
1346 AnnotationList__compute_from_inadequacies invocation.
1347
abcc7c03
JD
13482009-12-20 Joel E. Denny <jdenny@clemson.edu>
1349
1350 Fix handling of yychar manipulation in user semantic actions.
1351 The problem was that yacc.c didn't always update the yychar
1352 translation afterwards. However, other skeletons appear to be
1353 fine. glr.c appears to already translate yychar before every
1354 use. lalr1.cc does not define yychar and does not document its
1355 replacement, yyla, for users. It does provide yyclearin, but
1356 that does not manipulate yyla and thus requires no translation
1357 update. In lalr1.java, yychar is out of scope during semantic
1358 actions.
1359 * NEWS (2.5): Document.
1360 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1361 yytoken here.
1362 (yyparse, yypush_parse): Instead, translate before every use of
1363 yytoken, and add comments explaining this approach.
1364 * tests/actions.at (Destroying lookahead assigned by semantic
1365 action): New test group checking that translation happens before
1366 lookahead destructor calls at parser return. Previously,
1367 incorrect destructors were called.
1368 * tests/conflicts.at (%error-verbose and consistent
1369 errors): New test group checking that translation happens at
1370 syntax error detection before the associated verbose error
1371 message and the associated lookahead destructor calls. While
1372 the destructor call is fixed by this patch, the verbose error
1373 message is currently incorrect due to another bug (see
1374 comments in test group), so this is an expected failure for now.
1375
62efdd2a
JD
13762009-12-21 Joel E. Denny <jdenny@clemson.edu>
1377
1378 YYFAIL: warn about uses and remove from lalr1.java.
1379 * NEWS (2.5): Document.
5f1485d8 1380 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
62efdd2a
JD
1381 and make it private. Update all uses.
1382 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1383
41d35e54
JD
13842009-12-21 Joel E. Denny <jdenny@clemson.edu>
1385
1386 YYFAIL: deprecate.
1387 * NEWS (2.4.2): Document deprecation and the phase-out plan.
5f1485d8 1388 * data/lalr1.java (YYParser::YYFAIL): Add comment about
41d35e54
JD
1389 deprecation.
1390 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1391 YYFAIL from GCC cpp's -Wunused-macros.
1392 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1393 documentation.
1394 (LocalWords): Remove YYFAIL.
1395
692d04cb
JD
13962009-12-17 Joel E. Denny <jdenny@clemson.edu>
1397
1398 Code cleanup.
1399 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1400 function, which is no longer used.
1401
34731471
JD
14022009-12-16 Joel E. Denny <jdenny@clemson.edu>
1403
1404 Add gcc's -Wundef to test suite and fix another warning from it.
1405 * NEWS (2.4.2): Update description of -Wundef fix.
1406 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1407 (WARN_CFLAGS_TEST): New substitution.
1408 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1409 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1410 WARN_CFLAGS.
1411 (NO_WERROR_CFLAGS): Likewise.
1412 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1413
3bba2dad
JD
14142009-12-16 Joel E. Denny <jdenny@clemson.edu>
1415
1416 * data/yacc.c: Reformat m4 a little.
1417
af2ffe5c
JD
14182009-12-16 Joel E. Denny <jdenny@clemson.edu>
1419
1420 Document gcc -Wundef fix.
1421 * NEWS (2.4.2): Here.
1422 * THANKS (Jonathan Nieder): Add.
1423
874ac415
JN
14242009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1425
1426 Simplify y.tab.c when location tracking is disabled.
1427 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1428 tracking is not enabled. Instead, unconditionally define
1429 YY_LOCATION_PRINT as a no-op for backward compatibility.
1430
06caf0e1
JN
14312009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1432
1433 Avoid warnings from gcc -Wundef y.tab.c.
1434 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1435 defined before using them.
1436 * data/lalr1.cc: Likewise.
1437 * data/yacc.c: Likewise.
1438
687f011a
JD
14392009-12-15 Joel E. Denny <jdenny@clemson.edu>
1440
1441 autoconf: update to latest for fix of M4 detection.
1442 Reported by Eric Blake.
1443 * submodules/autoconf: Update.
1444
fb9a3976
JD
14452009-12-15 Joel E. Denny <jdenny@clemson.edu>
1446
1447 portability: use -DGNULIB_POSIXCHECK.
1448 Reported by Eric Blake. See discussions at
1449 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1450 and
1451 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1452 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1453 * bootstrap.conf (gnulib_modules): Add all the printf modules
1454 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1455 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1456 (excluded_files): Remove m4/printf-posix.m4.
1457 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1458 lib/libbison.a so gnulib libraries can be linked.
1459
f1fb412c
JD
14602009-12-14 Joel E. Denny <jdenny@clemson.edu>
1461
1462 Enable assertion output and --disable-assert for configure.
1463 * bootstrap.conf (gnulib_modules): Add assert module.
1464 * src/system.h (aver): Define as assert, and summarize the
1465 discussion on this issue.
1466
51c7ca01
JD
14672009-12-14 Joel E. Denny <jdenny@clemson.edu>
1468
1469 Expand GLR acronym in summary of Bison.
1470 Based on discussion with Akim Demaille starting at
1471 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1472 * doc/bison.texinfo (Introduction): Here.
1473 * src/getargs.c (usage): Here.
1474
1f68dca5
AR
14752009-10-03 Alex Rozenman <rozenman@gmail.com>
1476
1477 Document named references.
1478 * doc/bison.texinfo (Actions): Add new example and xref to
1479 Using Named References node.
1480 (Using Named References): New node.
1481
aa01d193
JD
14822009-10-16 Joel E. Denny <jdenny@clemson.edu>
1483
1484 cleanup.
1485 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1486 of char*.
1487 (Sbitset__isEmpty): Use Sbitset instead of char*.
1488 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1489 instead of char. This helps to avoid casting errors.
1490 (Sbitset__or): Use Sbitset instead of char*.
1491
61747047
JD
14922009-10-16 Joel E. Denny <jdenny@clemson.edu>
1493
1494 portability: don't assume 8-bit bytes.
1495 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1496 * src/Sbitset.h (Sbitset__nbytes): Here.
1497 (Sbitset__byteAddress): Here.
1498 (Sbitset__bit_mask): Here.
1499 (Sbitset__last_byte_mask): Here.
1500 (Sbitset__ones): Here.
1501 (SBITSET__FOR_EACH): Here.
1502
a70596de
JD
15032009-10-11 Joel E. Denny <jdenny@clemson.edu>
1504
1505 portability: use va_start and va_end in the same function.
1506 * src/complain.c (error_message): Move va_end from here...
1507 (ERROR_MESSAGE): ... to here.
1508
51f255a5
JD
15092009-10-08 Joel E. Denny <jdenny@clemson.edu>
1510
1511 * data/bison.m4: Update comments for rename to muscle-tab.h.
1512
23ec25b7
JD
15132009-10-08 Joel E. Denny <jdenny@clemson.edu>
1514
1515 Rename muscle_tab.* to muscle-tab.* for consistency with master.
1516 * src/Makefile.am (bison_SOURCES): Update.
1517 * src/getargs.c, src/ielr.c, src/lalr.c, src/main.c,
1518 src/output.c, src/parse-gram.y, src/print.c, src/reader.c,
1519 src/tables.c: Update include.
1520 * src/muscle_tab.c, src/muscle_tab.h: Rename to...
1521 * src/muscle-tab.c, src/muscle-tab.h: ... these and update
1522 include.
1523
0ab402b4
JD
15242009-10-07 Joel E. Denny <jdenny@clemson.edu>
1525
1526 Minor code cleanup.
1527 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1528 replace all uses with UNIQSTR_CONCAT.
1529 * src/uniqstr.c (uniqstr_vsprintf): New function.
1530 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1531 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1532 macros.
1533
42ec0ae1
JD
15342009-10-04 Joel E. Denny <jdenny@clemson.edu>
1535
1536 Minor code cleanup.
1537 * src/parse-gram.y: Clean up sorting of declarations.
1538 Use types to simplify %printer declarations where possible.
1539 Provide %printer for BRACKETED_ID and symbol.prec.
1540 * src/symtab.c: Whitespace change.
1541
9637e0ed
JD
15422009-10-04 Joel E. Denny <jdenny@clemson.edu>
1543
1544 tests: skip tests of file names that platform does not support.
1545 Reported by Michael Raskin at
1546 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1547 * THANKS (Michael Raskin): Add.
1548 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1549 to fail at least for file names containing ":" or "\".
1550
69a2ab11
JD
15512009-09-23 Joel E. Denny <jdenny@clemson.edu>
1552
1553 yysyntax_error: avoid duplicate lookahead collection.
1554 Except when memory reallocation is required, this change
1555 eliminates the need to invoke yysyntax_error twice and thus to
1556 repeat the collection of lookaheads. It also prepares for
1557 future extensions that will make those repetitions more
1558 expensive and that will require additional memory management in
1559 yysyntax_error. Finally, it fixes an obscure bug already
1560 exercised in the test suite.
1561 * data/yacc.c (yysyntax_error): Add arguments for message
1562 buffer variables stored in the parser. Instead of size, return
1563 status similar to yyparse status but indicating success of
1564 message creation. Other than the actual reallocation of the
1565 message buffer, import and clean up memory management code
1566 from...
1567 (yyparse, yypush_parse): ... here.
1568 * tests/regression.at (%error-verbose overflow): No longer an
1569 expected failure.
1570
d88cf117
JD
15712009-09-23 Joel E. Denny <jdenny@clemson.edu>
1572
1573 yysyntax_error: test memory management more.
1574 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1575 * tests/regression.at (%error-verbose and YYSTACK_USE_ALLOCA):
1576 New test group.
1577 (%error-verbose overflow): New test group that reveals an
1578 obscure bug. Expected fail for now.
1579
9da640ea
AD
15802008-12-11 Akim Demaille <demaille@gostai.com>
1581
1582 Pass the token type to yysyntax_error.
1583 * data/yacc.c (yysyntax_error): Take the transated token instead
1584 of the raw number.
1585 Adjust callers.
1586
d3d3628b
AD
15872008-12-11 Akim Demaille <demaille@gostai.com>
1588
1589 Simplify the i18n of the error messages.
1590 * data/yacc.c (yysyntax_error): Rewrite, using a switch instead
1591 of building dynamically the format string.
1592
4c6b13f3
JD
15932009-10-03 Joel E. Denny <jdenny@clemson.edu>
1594
1595 Remove dead code.
1596 * src/symtab.c (symbol_pack): Here because every symbol's number
1597 is always defined by this time.
1598
f840c05a
AR
15992009-10-03 Alex Rozenman <rozenman@gmail.com>
1600
1601 Add additional space after periods in NEWS.
1602 * NEWS (2.5): here.
1603
17a407dc
JD
16042009-09-29 Joel E. Denny <jdenny@clemson.edu>
1605
1606 Use the correct conversion specifier for size_t.
1607 Reported by Jim Meyering.
1608 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1609 because Sbitset__Index is size_t.
1610 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1611
4b7a4c1b
JD
16122009-09-27 Joel E. Denny <jdenny@clemson.edu>
1613
1614 tests: don't abuse AT_BISON_CHECK.
1615 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1616 additional shell commands outside of AT_BISON_CHECK.
1617
873ac263
JD
16182009-09-26 Joel E. Denny <jdenny@clemson.edu>
1619
1620 tests: check that parse-gram.y's IELR and LALR are identical.
1621 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1622 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1623 group.
1624
232be91a
AD
16252009-09-16 Akim Demaille <demaille@gostai.com>
1626
1627 doc: comment changes.
1628 * doc/bison.texinfo: Comment changes.
1629
c781580d
AD
16302009-09-16 Akim Demaille <demaille@gostai.com>
1631
1632 doc: spell checking.
1633 * doc/bison.texinfo: here.
1634
348f5608
AR
16352009-09-19 Alex Rozenman <rozenman@gmail.com>
1636
1637 Keep sub-messages aligned. Fix strings for translation.
f840c05a
AR
1638 * src/location.h (location_print): Add return value.
1639 * src/location.c (location_print): Return number of printed
348f5608 1640 characters.
f840c05a
AR
1641 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1642 new functions.
1643 * src/complain.cpp (indent_ptr): New static variable.
1644 (error_message, complain_at_indent, warn_at_indent): Implement
1645 the alignment mechanism.
1646 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1647 for translations. Use new alignment mechanism.
1648 * tests/named-ref.at: Adjust test-cases.
348f5608
AR
1649 * NEWS (2.5): Add an announcement about named references.
1650
d93b5f50
JD
16512009-09-13 Joel E. Denny <jdenny@clemson.edu>
1652
1653 tests: clean up push.at test group titles.
1654 * tests/push.at: Remove "Push Parsing: " from test group titles
1655 because these are already under the banner "Push Parsing Tests".
1656
4c56b131
AR
16572009-09-12 Alex Rozenman <rozenman@gmail.com>
1658
1659 Provide an additional sub-message for clarity.
1660 Add "symbol not found in production" error message when
1661 an "invalid reference" is detected in named references
1662 resolution.
1663 * src/scan-code.l: Update "invalid reference" case.
1664 * tests/named-ref.at: Adjust test-cases.
1665
93d0103d
JD
16662009-09-10 Joel E. Denny <jdenny@clemson.edu>
1667
1668 Clean up yacc.c a little.
1669 * data/yacc.c: Clean up M4 for readability, and make output
1670 whitespace more consistent. For the main parse function
1671 comment, instead of saying "yyparse or yypush_parse", say either
1672 "yyparse" or "yypush_parse" depending on which it actually is.
1673
628be6c9
JD
16742009-09-03 Joel E. Denny <jdenny@clemson.edu>
1675
1676 Complain about unused %define variables and %code qualifiers.
1677 * NEWS (2.5): Document.
1678 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1679 * doc/bison.texinfo (Decl Summary): Document complaint, and
1680 improve %define documentation a little otherwise.
1681 * tests/input.at (Reject unused %code qualifiers): Update.
1682 (%define errors): Update.
1683 (%define, --define, --force-define): Update.
1684 (%define backward compatibility): Update.
1685 (Unused %define api.pure): Update.
1686 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1687
c842365a
JD
16882009-09-03 Joel E. Denny <jdenny@clemson.edu>
1689
1690 Use aver not assert.
1691 * src/output.c: Don't include assert.h.
1692 (output_skeleton): Use aver not assert.
1693 * src/system.h (aver): In documentation of why, add links to
1694 Paul Eggert's explanations in the mailing lists.
1695
14e568d7
AR
16962009-09-05 Alex Rozenman <rozenman@gmail.com>
1697
1698 Use "Unresolved reference" error message when no symbols were found
1699 in a symbolic reference resolution. Remove .expr and -expr from
1700 the shown reference when the reference is unresolved.
1701 * src/scan-code.l: Change the error message, adjust location columns,
1702 rename variable "exact_mode" to "explicit_bracketing".
1703 * tests/named-ref.at: Adjust existing tests and add a new one.
1704
dac8cc0d
AD
17052009-09-03 Akim Demaille <demaille@gostai.com>
1706
1707 * NEWS (2.4.2): Add "Internationalization" item.
1708
3710dd02
AD
17092009-09-03 Akim Demaille <demaille@gostai.com>
1710
1711 bootstrap: fix/improve find_tool.
1712 * bootstrap (find_tool): Improve error messages.
1713 Fix typo about find_tool_names.
1714
9852b61c
JD
17152009-08-29 Joel E. Denny <jdenny@clemson.edu>
1716
1717 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1718 See
1719 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1720 * src/scan-code.h (code_props_rule_action_init): Rename
1721 named_ref arg to name so it doesn't shadow named_ref type. This
1722 makes it consistent with the function definition in scan-code.l
1723 anyway.
1724
f37495f6
JD
17252009-08-28 Joel E. Denny <jdenny@clemson.edu>
1726
1727 %define: accept unquoted values.
1728 * NEWS (2.5): Group all %define changes together, and document
1729 this one. Remove quotes in IELR and canonical LR entry.
1730 * doc/bison.texinfo: Remove quotes in most examples throughout.
1731 (Decl Summary): Update %define documentation.
1732 (Table of Symbols): Likewise.
1733 * src/ielr.c (LrType): Update documentation.
1734 * src/parse-gram.y (content.opt): Add production for ID.
5bf2bf7a 1735 * tests/calc.at: Remove quotes in most tests.
f37495f6
JD
1736 * tests/existing.at: Likewise.
1737 * tests/input.at: Likewise.
1738 * tests/local.at: Likewise.
1739 * tests/push.at: Likewise.
1740 * tests/reduce.at: Likewise.
1741 * tests/torture.at: Likewise.
1742
3a414bbf
JD
17432009-08-28 Joel E. Denny <jdenny@clemson.edu>
1744
1745 %define lr.type: make values lowercase IDs.
1746 That is, "LALR" => "lalr", "IELR" => "ielr", and
1747 "canonical LR" => "canonical-lr".
1748 * NEWS (2.5): Update documentation.
1749 * doc/bison.texinfo (Decl Summary): Likewise.
1750 * src/ielr.c (ielr): Use new values.
1751 * src/ielr.h (ielr): Update documentation.
1752 * src/reader.c (prepare_percent_define_front_end_variables): Use
1753 and validate new values.
1754 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1755 grammars.
1756 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1757
4bb975e1
EB
17582009-08-27 Eric Blake <ebb9@byu.net>
1759
1760 scan-gram: avoid portability trap with ctype usage.
1761 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1762 Avoid compiler warning.
1763
74baf5c9
JD
17642009-08-27 Joel E. Denny <jdenny@clemson.edu>
1765
1766 tests: use perl for printing special sequences to files.
1767 And skip tests if perl is not available. This is better than
1768 playing tricks with shell portability. Suggested by Akim
1769 Demaille.
1770 * tests/input.at (Bad character literals): Use it here for
1771 omitting final newlines.
1772 (Bad escapes in literals): Use it here for special characters.
1773
d63e1279
JD
17742009-08-26 Joel E. Denny <jdenny@clemson.edu>
1775
1776 tests: show a use of %define lr.default-reductions "consistent"
1777 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
1778 prevents the omission of expected tokens for %error-verbose.
1779
833d1720
AD
17802009-08-26 Akim Demaille <demaille@gostai.com>
1781
1782 tests: portability fix.
1783 * tests/input.at (Bad escapes in literals): Don't expect "echo
1784 '\0'" to output \ then 0.
1785
e4bcae3c
JD
17862009-08-26 Joel E. Denny <jdenny@clemson.edu>
1787
1788 Actually handle the yytable zero value correctly this time.
1789 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
1790 mention zero values in the YYTABLE comments.
1791 * data/glr.c (yytable_value_is_error): Don't check for zero
1792 value.
1793 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
1794 * data/yacc.c (yytable_value_is_error): Likewise.
1795 * data/lalr1.java (yy_table_value_is_error_): Likewise.
1796 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
1797 * src/tables.h: In header comments, explain why it's useless to
1798 check for a zero value in yytable.
1799
d5eb0826
JD
18002009-08-25 Joel E. Denny <jdenny@clemson.edu>
1801
1802 More fixes related to last two patches.
1803 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
1804 defined.
1805 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
1806 yytable comments: zero indicates syntax error not default
1807 action.
1808 * data/glr.c (yyis_pact_ninf): Rename to...
1809 (yypact_value_is_default): ... this.
1810 (yyisDefaultedState): Update for rename.
1811 (yyis_table_ninf): Rename to...
1812 (yytable_value_is_error): ... this, and check for value zero
1813 besides just YYTABLE_NINF.
1814 (yygetLRActions): Check for default value from yypact. It
1815 appears that this check is always performed before this function
1816 is invoked, and so adding the check here is probably redundant.
1817 However, the code may evolve after this subtlety is forgotten.
1818 Also, update for rename to yytable_value_is_error. Because that
1819 macro now checks for zero, a different but equivalent branch of
1820 the if-then-else here is evaluated.
1821 (yyreportSyntaxError): Update for rename to
1822 yytable_value_is_error. The zero condition was mishandled
1823 before.
1824 (yyrecoverSyntaxError): Update for renames. No behavioral
1825 changes.
1826 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
1827 New function.
1828 (yy_table_value_is_error_): New function.
1829 (parse): Use new functions where possible. No behavioral
1830 changes.
1831 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
1832 The zero condition was mishandled before.
1833 * data/yacc.c (yyis_pact_ninf): Rename to...
1834 (yypact_value_is_default): ... this.
1835 (yyis_table_ninf): Rename to...
1836 (yytable_value_is_error): ... this, and check for value zero
1837 besides just YYTABLE_NINF.
1838 (yysyntax_error): Update for rename to yytable_value_is_error.
1839 The zero condition was mishandled before.
1840 (yyparse): Update for renames. No behavioral changes.
1841 * src/tables.h: Improve comments about yypact, yytable, etc.
1842 more. Most importantly, say yytable value of zero means syntax
1843 error not default action.
1844
1fa30307
JD
18452009-08-25 Joel E. Denny <jdenny@clemson.edu>
1846
1847 Fix %error-verbose for conflicts resolved by %nonassoc.
1848 * NEWS (2.5): Document.
1849 * data/glr.c (yyreportSyntaxError): Fix this by checking
1850 yyis_table_ninf.
1851 * data/yacc.c (yysyntax_error): Likewise.
1852 * data/lalr1.cc (yysyntax_error_): Fix this by checking
1853 yytable_ninf_.
1854 * data/lalr1.java (yysyntax_error): Likewise.
1855 * tests/conflicts.at (%nonassoc and eof): Update expected output
1856 and remove FIXME.
1857
77373efa
JD
18582009-08-25 Joel E. Denny <jdenny@clemson.edu>
1859
1860 Some code and documentation improvements.
1861 * data/c.m4 (b4_table_value_equals): New macro to capture
1862 some repeated code.
1863 * data/glr.c (yyis_pact_ninf): Use it here.
1864 (yyis_table_ninf): Likewise.
1865 (yyreportSyntaxError): Improve internal comments.
1866 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
1867 Use it everywhere possible.
1868 (yyis_table_ninf): Likewise.
1869 (yysyntax_error): Improve internal comments.
1870 * data/lalr1.cc (yysyntax_error_): Likewise.
1871 * data/lalr1.java (yysyntax_error): Likewise.
1872 * src/tables.h: Improve comments about yypact, yytable, etc.
1873
890ab17c
JD
18742009-08-21 Joel E. Denny <jdenny@clemson.edu>
1875
1876 Use locale when quoting.
1877 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
1878 quote rather than implementing quoting here.
1879
c5196098
EB
18802009-08-20 Eric Blake <ebb9@byu.net>
1881
aa50ba7b
EB
1882 Make previous patch more robust.
1883 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
1884 argmatch.h.
1885 (output_skeleton): Use it.
1886 Suggested by Akim Demaille.
1887
c5196098
EB
1888 Import latest m4/m4.m4.
1889 * submodules/autoconf: Update to autoconf 2.64.
1890 * configure.ac (M4_GNU_OPTION): New define.
1891 * src/output.c (output_skeleton): Use it to resolve FIXME.
1892 * NEWS: Mention this.
1893
39fb7e62
JD
18942009-08-19 Joel E. Denny <jdenny@clemson.edu>
1895
1896 Fix complaints about escape sequences.
1897 Discussed starting at
1898 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
1899 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
1900 For a \0 and similar escape sequences meaning the null
1901 character, report an invalid escape sequence instead of an
1902 invalid null character because the latter does not actually
1903 appear in the user's input.
1904 In all escape sequence complaints, don't escape the initial
1905 backslash, and don't quote when the sequence appears at the end
1906 of the complaint line unless there's whitespace that quotearg
1907 won't escape.
1908 Consistently say "invalid" not "unrecognized".
1909 Consistently prefer "empty character literal" over "extra
1910 characters in character literal" warning for invalid escape
1911 sequences; that is, consistently discard those sequences.
1912 * tests/input.at (Bad escapes in literals): New.
1913
c33bc800
AD
19142009-08-19 Akim Demaille <demaille@gostai.com>
1915
1916 doc: fixes.
1917 * doc/bison.texinfo: Fix minor Texinfo errors.
1918
8fbbeba2
AD
19192009-08-19 Akim Demaille <demaille@gostai.com>
1920
1921 doc: %initial-action to initialize yylloc.
1922 Reported by Bill Allombert.
1923 * doc/bison.texinfo: Set fill-column to 76.
1924 (Location Type): Document the use of %initial-action to initialize
1925 yylloc.
1926
1874a474
JD
19272009-08-18 Joel E. Denny <jdenny@clemson.edu>
1928
1929 maint: update for gnulib's recent update-copyright changes
1930 * gnulib: Update.
1931 * .x-update-copyright (COPYING): Add as it's no longer implied
1932 when .x-update-copyright is present.
1933 * cfg.mk (update-copyright-local): Remove, now ignored.
1934 (update-copyright): Declare update-b4-copyright as a dependency.
1935
f4bfd5a9
AD
19362009-08-17 Akim Demaille <demaille@gostai.com>
1937
1938 build: require gettext 0.17.
1939
1940 Suggested by Bruno Haible.
1941 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
1942 * configure.ac: require gettext 0.17 to ensure compatibility with
1943 gnulib.
1944
2509eba6
AD
19452009-08-17 Akim Demaille <demaille@gostai.com>
1946
1947 build: lower gettext requirements.
1948
1949 Bison was uselessly requiring the formatstring macros from
1950 gettext, which resulted in mo files not being installed on systems
1951 that perfectly supported Bison mo files. Lower the requirement.
1952 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
1953
aa50ba7b
EB
1954 * configure.ac: Require need-ngettext instead of
1955 need-formatstring-macros.
1956 Reported by Martin Jabocs.
1957 Suggested by Bruno Haible.
1958 * INSTALL: Restructure.
1959 (Internationalization): New.
2509eba6 1960
314542f9
JD
19612009-08-14 Joel E. Denny <jdenny@clemson.edu>
1962
1963 maint: fix use of copyright year intervals.
1964 * gnulib: Update.
1965 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
1966 as now recommended in gnulib/NEWS.
1967 * build-aux/update-b4-copyright: Fix.
1968 * cfg.mk (update-copyright-env): Configure update-copyright.
1969
24985964
JD
19702009-08-13 Joel E. Denny <jdenny@clemson.edu>
1971
1972 Make it easier to write deterministic tests.
1973 Continues Akim's work from his 2009-06-10 commits.
1974 * src/reader.c (check_and_convert_grammar): Don't add any
1975 symbols after the first symbols_do invocation.
1976 * src/symtab.c (symbols_sorted): New static global.
1977 (user_token_number_redeclaration): Update comments.
1978 (symbol_from_uniqstr): If a new symbol is being created, assert
1979 that symbols_sorted hasn't been allocated yet.
1980 (symbols_free): Free symbols_sorted.
1981 (symbols_cmp, symbols_cmp_qsort): New functions.
1982 (symbols_do): Sort symbol_table into symbols_sorted on first
1983 invocation.
1984 * tests/input.at (Numbered tokens): Recombine tests now that the
1985 output should be deterministic across multiple numbers.
1986
47076da5
AD
19872009-08-12 Akim Demaille <demaille@gostai.com>
1988
1989 distcheck: fix.
1990
aa50ba7b 1991 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
47076da5 1992
36dfe466
JD
19932009-08-10 Joel E. Denny <jdenny@clemson.edu>
1994
1995 * tests/Makefile.am (TESTSUITE_AT): Add named-refs.at.
1996
07c0db18
JD
19972009-08-10 Joel E. Denny <jdenny@clemson.edu>
1998
1999 Miscellaneous code readability improvements.
2000
2001 * src/reader.c (reader): Move %define front-end variable
2002 defaults and checking into...
2003 (prepare_percent_define_front_end_variables): ... this new
2004 function.
2005
2006 * src/scan-gram.l (INITIAL): For consistency with string
2007 literals, don't store open quote on character literal. It's
2008 discarded before returning anyway.
2009 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2010 Make length test more readable, and make the character stored
2011 for an empty literal more obvious while consistent with the
2012 previous behavior.
2013
2014 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2015 USER_NUMBER_HAS_STRING_ALIAS throughout.
2016 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2017 that is repeated in symtab.h. Improve argument names to make it
2018 clear which side of the symbol-string alias pair is which.
2019 (symbol_check_alias_consistency): Improve local variable names
2020 for the same purpose.
2021 * src/symtab.h (struct symbol): Make comments about aliases
2022 clearer.
2023 (symbol_make_alias): Improve comments and argument name.
2024 * src/output.c (token_definitions_output): Update for rename to
2025 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2026
1a323c2f
AR
20272009-08-08 Alex Rozenman <rozenman@gmail.com>
2028
2029 Convert "misleading reference" messages to warnings.
2030 * src/scan-code.l: New function 'show_sub_messages', more
2031 factoring.
2032 * tests/named-ref.at: Adjust tests.
2033
38609c34
JD
20342009-08-06 Joel E. Denny <jdenny@clemson.edu>
2035
2036 maint: run "make update-copyright"
2037
642f240e
JD
20382009-08-06 Joel E. Denny <jdenny@clemson.edu>
2039
2040 maint: make update-b4-copyright easier to use
2041 * build-aux/update-b4-copyright: In warnings, report line
2042 numbers rather than character positions.
2043 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2044 that update-copyright runs it.
2045 * gnulib: Update.
2046
d0caad01
JD
20472009-08-05 Joel E. Denny <jdenny@clemson.edu>
2048
2049 maint: clean up update-b4-copyright code
2050 * build-aux/update-b4-copyright: Do not accept 2-digit
2051 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2052 Don't accept a `[' in a b4_copyright argument.
2053 Format code more consistently.
2054 Don't assume b4*copyright never occurs.
2055
ac2def56
JD
20562009-08-04 Joel E. Denny <jdenny@clemson.edu>
2057
2058 maint: automate b4_copyright updates.
2059 * Makefile.am (update-b4-copyright): New target rule.
2060 * build-aux/Makefile.am (EXTRA_DIST): Add update-b4-copyright.
2061 * build-aux/update-b4-copyright: New.
2062 * data/yacc.c: Remove stray characters around b4_copyright
2063 invocations.
2064
dbbb64f0
JD
20652009-08-04 Joel E. Denny <jdenny@clemson.edu>
2066
2067 maint: automate annual package-wide copyright-year update.
2068 * .x-update-copyright: New.
2069 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2070 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2071 update-copyright. Remove gnumakefile, which is implied by
2072 maintainer-makefile.
2073 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2074 * gnulib: Update.
2075 * maint.mk: Remove, now copied from gnulib.
2076 * examples/extexi: Add missing "(C)" in copyright statement so
2077 update-copyright can recognize it.
2078 * src/LR0.h: Likewise.
2079 * src/print.h: Likewise.
2080 * src/print_graph.h: Likewise.
2081 * src/gram.c: Add missing comma in copyright statement.
2082 * src/gram.h: Likewise.
2083
bfa018d4
JD
20842009-08-04 Joel E. Denny <jdenny@clemson.edu>
2085
2086 Fix "make distcheck".
2087 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2088 of just calc.stamp.
2089
4521fcdf
JD
20902009-08-01 Joel E. Denny <jdenny@clemson.edu>
2091
2092 Pacify "gcc -Wunused" for the input function from Flex.
2093 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2094 and later.
2095 * src/scan-code.l: Add "%option noinput", which I cannot find in
2096 the Flex manual, but which Flex has supported since at least as
2097 far back as 2.5.4. However, if any of our developers still use
2098 Flex 2.5.4, they'll need to stop configuring with
2099 --enable-gcc-warnings because "%option noinput" didn't work
2100 correctly until Flex 2.5.6.
2101 * src/scan-gram.l: Likewise.
2102 * src/scan-skel.l: Likewise.
2103
992e874a
AR
21042009-07-31 Alex Rozenman <rozenman@gmail.com>
2105
2106 Fix --enable-gcc-warnings problems.
2107 * src/reader.c: Adjust variable names.
2108 * src/scan-code.l: Fix prototypes and adjust names.
2109 * src/named-ref.c: Remove redundant "if".
2110
a1ed2b71
JD
21112009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2112
2113 Fix a --enable-gcc-warnings problem.
2114 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2115 variable.
2116
cbc6a70e 21172009-07-24 Alex Rozenman <rozenman@gmail.com>
1e20ad11
AR
2118
2119 Fix some memory leaks.
2120 * src/named-ref.c: Add a pointer check (named_ref_free).
2121 * src/scan-code.l: New function (variant_table_free). Called in
2122 code_scanner_free.
2123 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2124
ac9b0e95
JD
21252009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2126
2127 Warn about character literals not of length one.
2128 * NEWS (2.5): Document.
2129 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2130 the length.
2131 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2132 * tests/input.at (Bad character literals): New test group.
2133
2de160e1
JD
21342009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2135
2136 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2137
cba97506
JD
21382009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2139
2140 Some M4 cleanup in the testsuite.
2141 Suggested by Eric Blake at
2142 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2143 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2144 complicate the code by distinguishing between a missing value
2145 and an empty string value for an optional argument. This fix is
2146 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2147 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2148 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2149 arguments are not needed because of the following changes.
2150 Fix stale comments.
2151 Bison developers should use GNU M4 and should not use
2152 POSIXLY_CORRECT when building the test suite, so do not
2153 complicate the code by avoiding $10 and above.
2154 Do not quote an empty string value for an optional argument, and
2155 do not distinguish between a missing value and an empty string
2156 value.
2157
62eb2d1b
JD
21582009-07-21 Joel E. Denny <jdenny@ces.clemson.edu>
2159
2160 * m4/m4.m4: Make it a sym link to submodules/autoconf/m4/m4.m4.
2161
620b2e36
JD
21622009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2163
2164 Revert unnecessary column realignment in --help output.
2165 Reported by Akim Demaille at
2166 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2167 * src/getargs.c (usage): Here.
2168
cbc6a70e 21692009-07-04 Alex Rozenman <rozenman@gmail.com>
dad6544d
AR
2170
2171 Alphabetical order in src/Makefile.am.
2172 * src/Makefile.am: Adjust.
2173
cbc6a70e 21742009-07-04 Alex Rozenman <rozenman@gmail.com>
d5e8574b
AR
2175
2176 Style changes and factoring.
2177 * src/named-ref.h: Add comments.
2178 * src/parse-gram.y: Readability and style changes.
2179 * src/reader.c: Factoring: assign_named_ref function.
2180 * src/scan-code.l: Factoring and style changes. Rename
2181 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2182 Use "unsigned" type for variant index. Improve readablity.
2183 * src/scan-gram.l: Change error messages and add comments.
2184 * src/symlist.h: symbol_list_null: New function decl.
2185 * src/symlist.c: symbol_list_null: Implement here.
2186 * tests/named-refs.at: Adjust for new error messages.
2187
ae09ec85
EB
21882009-06-29 Eric Blake <ebb9@byu.net>
2189
2190 scan-code: avoid compiler warnings
2191 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2192
80d653fd
AD
21932009-06-29 Akim Demaille <demaille@gostai.com>
2194
2195 build: avoid concurrent extraction of calc++.
2196 * examples/calc++/Makefile.am (calc.stamp): New.
2197 Depend on it to create the sources of calc++ so that concurrent
2198 builds don't launch several "extexi" in parallel.
2199 Not only this is inefficient, this also builds incorrect sources
2200 with several extractions mixed together.
2201
7685e2f7
AR
22022009-06-27 Alex Rozenman <rozenman@gmail.com>
2203
2204 Implement support for named symbol references.
2205 * src/parse-gram.y: Add new syntax (named_ref.opt).
2206 * src/reader.c: Store named refs in symbol lists.
2207 * src/reader.h: New argument for symbol_append and
2208 action_append functions.
2209 * src/scan-code.h: Add new field (named_ref) into
2210 code_props data structure. Keeps named ref of midrule
2211 actions.
2212 * src/scan-code.l: Support for named refs in semantic
2213 action code. New function 'parse_named_ref'.
2214 * src/scan-gram.l: Support bracketed id.
2215 * src/symlist.c: Store named refs in symbol lists.
2216 * src/symlist.h: New field in symbol list: named_ref.
2217 * src/named-ref.h: New file, a struct for named_ref.
2218 * src/named-ref.cp: New file, named_ref_new function.
2219 * src/local.mk: Add two new files.
2220 * tests/testsuite.at: Include new test group:
2221 * tests/named-refs.at: this new file.
2222
67f8cf51
AD
22232009-06-25 Akim Demaille <demaille@gostai.com>
2224
2225 hash: check insertion for memory exhaustion.
2226 * src/uniqstr.c (uniqstr_new): New.
2227
83b66ddd
AD
22282009-06-11 Akim Demaille <demaille@gostai.com>
2229
2230 style changes.
2231 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2232 * src/print-xml.c: Style changes.
2233 * tests/conflicts.at: Comment changes.
2234
517cb0ad
AD
22352009-06-11 Akim Demaille <demaille@gostai.com>
2236
2237 xml: beware of user strings used to give a %prec to rules.
2238 * tests/conflicts.at (%prec with user strings): New.
2239 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2240 XML output.
2241
75c7a52a
AD
22422009-06-11 Akim Demaille <demaille@gostai.com>
2243
2244 hash: check insertion for memory exhaustion.
2245 * src/muscle-tab.c (muscle_insert, muscle_grow)
2246 * src/state.c (state_hash_insert): Check the return value of
2247 hash_insert.
2248
66ed9753
AD
22492009-06-10 Akim Demaille <demaille@gostai.com>
2250
2251 deterministic test suite.
2252 Some consistency checks on symbols are performed after all the
2253 symbols were read, by an iteration over the symbol table. This
2254 traversal is nondeterministic, which can be a problem for test
2255 cases.
2256 Avoid this.
2257 Addresses another form of nondeterminism reported by Joel E. Denny.
2258 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2259
2260 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2261 test in two.
2262 Use different file names for the three tests to make the
2263 maintenance easier.
2264
ed15d907
AD
22652009-06-10 Akim Demaille <demaille@gostai.com>
2266
95d176ff
AD
2267 deterministic user-token-number redeclaration errors.
2268 Address nondeterminism reported by Joel E. Denny.
2269 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2270
2271 * src/uniqstr.h: Comment changes.
2272 * src/location.h (boundary_cmp, location_cmp): New.
2273 * src/symtab.c (user_token_number_redeclaration): New.
2274 (symbol_translation): Use it.
2275 * tests/input.at (Numbered tokens): Adjust the expected output.
2276
22772009-05-25 Akim Demaille <demaille@gostai.com>
2278
ed15d907 2279 gnulib: update.
aa50ba7b
EB
2280 * gnulib: Update to latest.
2281 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2282 * m4/.gitignore: Regen.
2283 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2284 Call xalloc_die on hash_insert failures.
2285 Requested by the new __warn_unused_result__ attribute of
2286 hash_insert.
ed15d907 2287
e3a33f7c
JD
22882009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2289
2290 Convert multiple variable definition warnings to complaints.
2291 * NEWS (2.5): Add a new entry for that change.
2292 * doc/bison.texinfo (Decl Summary): Update %define entry.
2293 (Bison Options): Update -D/--define/-F/--force-define entry.
2294 * src/muscle_tab.c (muscle_percent_define_insert): Implement.
2295 * src/muscle_tab.h (muscle_percent_define_insert): Update
2296 comments.
2297 * tests/input.at (`%define errors'): Update.
2298 (`%define, --define, --force-define'): Update.
2299
34d41938
JD
23002009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2301
2302 -F/--force-define and relative %define/-D/--define priorities.
2303 * NEWS (2.5): Add documentation to -D/--define entry.
2304 * build-aux/cross-options.pl: Hard-code association of
2305 --force-define with %define.
2306 * doc/bison.texinfo (Decl Summary): In %define entry,
2307 cross-reference command-line options.
2308 (Bison Options): Add documentation to -D/--define entry.
2309 (Option Cross Key): Widen column for --force-define row.
2310 * src/getargs.c (usage): Document -F/--force-define. Realign
2311 options in output.
2312 (short_options, long_options, getargs): Parse -F/--force-define,
2313 and update muscle_percent_define_insert invocation.
2314 * src/muscle_tab.h (muscle_percent_define_how): New enum type.
2315 (muscle_percent_define_insert): Add argument with that type.
2316 * src/muscle_tab.c (muscle_percent_define_insert): Implement
2317 -F/--force-define behavior and priorities.
2318 * src/parse-gram.y (prologue_declaration): Update
2319 muscle_percent_define_insert invocations.
2320 * tests/input.at (`%define, --define'): Rename to...
2321 (`%define, --define, --force-define'): ... this and extend.
2322
246c4efa
JD
23232009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2324
2325 Update some comments to make sense for -D.
2326 * data/bison.m4 (b4_check_user_names): In header comments, say
2327 "user occurrence" instead of "grammar occurrence".
2328 * src/muscle_tab.h (muscle_percent_define_insert): Likewise.
2329 (muscle_percent_code_grow): Likewise just for consistency.
2330
531683e7
JD
23312009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2332
2333 * data/c++.m4: Update copyright year.
2334
e7bfa8b7
JD
23352009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2336
2337 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2338
8c221795
JD
23392009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2340
2341 Handle a trailing `:' in a user-supplied C++ namespace better.
2342 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2343 among the closing braces here. This fix might make the
2344 generated code easier to debug, but otherwise it should be
2345 insignificant because a trailing `:' is a C++ error already.
2346
c8bf65f0
AD
23472009-05-19 Akim Demaille <demaille@gostai.com>
2348
2349 remove useless variable.
2350 * src/getargs.c (skeleton_arg): Remove now useless variable.
2351 Should help the compiler see that this printf-like call is sane.
2352
7ac45a46
AD
23532009-05-11 Akim Demaille <demaille@gostai.com>
2354
2355 doc: use C++ headers.
2356 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2357 headers.
2358
601bdfab
AD
23592009-05-05 Akim Demaille <demaille@gostai.com>
2360
2361 fix hexadecimal token number support.
2362 * src/scan-gram.l: Catch incorrect ids after hexadecimal numbers.
2363
d19123e6
AD
23642009-05-05 Akim Demaille <demaille@gostai.com>
2365
2366 tests: check token numbers.
2367 * tests/input.at (Numbered tokens): New.
2368
ecdfea9a
AD
23692009-05-04 Akim Demaille <demaille@gostai.com>
2370
2371 bison: catch bad symbol names.
2372 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2373 * tests/input.at: Adjust.
2374
43e6aea5
AD
23752009-05-04 Akim Demaille <demaille@gostai.com>
2376
2377 space changes.
2378 * src/scan-gram.l: Untabify to be robust to zealous editors.
2379
c046698e
AD
23802009-05-04 Akim Demaille <demaille@gostai.com>
2381
2382 identifiers: dashes are letters.
2383 Dashes can now start identifiers (symbols and directives).
b10dd689 2384
c046698e
AD
2385 * src/scan-gram.l ({letter}): Add dash.
2386 ({id}): Remove it.
2387 * tests/input.at (Symbols): Adjust.
2388 Remove stray comment.
2389 * tests/regression.at (Invalid inputs): Adjust error message.
2390 * doc/bison.texinfo (Symbols): Update.
2391
966aba65
JD
23922009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2393
2394 Declare %code to be a permanent feature.
2395 * NEWS (2.4.2): Here.
2396 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2397 experimental.
2398 (Decl Summary): Likewise.
2399
812775a0
JD
24002009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2401
2402 Convert underscores to dashes in some %define variable names.
2403 For now, just api.push-pull and lr.keep-unreachable-states.
2404 Maintain old names for backward compatibility.
2405 * NEWS (2.5): Document.
2406 * data/c.m4 (b4_identification): Update comment.
2407 * data/yacc.c: Update access.
2408 * doc/bison.texinfo: Update.
2409 * etc/bench.pl.in (bench_grammar): Update use.
2410 * src/files.c (tr): Move to...
2411 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2412 think of a better place to expose it. My logic is that, for all
2413 uses of tr so far, command-line arguments can be involved, and
2414 getargs.h is already included.
2415 * src/main.c (main): Update access.
2416 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2417 variable names to new variable names before assigning value.
2418 * src/reader.c (reader): Update setting default.
2419 * tests/calc.at: Update uses.
2420 * tests/conflicts.at (Unreachable States After Conflict
2421 Resolution): Update use.
2422 * tests/input.at (%define enum variables): Update use.
2423 (%define backward compatibility): New test group.
2424 * tests/push.at: Update uses.
2425 * tests/reduce.at: Update uses.
2426 * tests/torture.at: Update uses.
2427
1c4aa81d
JD
24282009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2429
2430 Set all front-end %define defaults in one place.
2431 * src/main.c (main): Move lr.keep_unreachable_states default...
2432 * src/reader.c (reader): ... to here.
2433
1d0f55cc
JD
24342009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2435
2436 Rename lr.default_reductions to lr.default-reductions.
2437 * NEWS (2.5): Here.
2438 * doc/bison.texinfo: Here.
2439 * src/lalr.c (initialize_LA): Here.
2440 * src/print.c (print_reductions): Here.
2441 * src/reader.c (reader): Here.
2442 * src/tables.c (action_row): Here.
2443 * tests/input.at (%define enum variables): Here.
2444 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2445
0b593457
JD
24462009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2447
2448 Pacify ./configure --enable-gcc-warnings.
2449 * tests/input.at (Symbols): Prototype yyerror and yylex.
2450
0939aa2d
AD
24512009-04-21 Akim Demaille <demaille@gostai.com>
2452
2453 tests: check the use of dashes and periods in symbols.
2454 * tests/input.at (Symbol): New test group.
2455
0b593457 24562009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
ae618dcc
JD
2457
2458 Document how `%define "var" "value"' is not M4-friendly.
2459 * src/parse-gram.y (variable): In comments here.
2460
0b593457 24612009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
6789b8bd
JD
2462
2463 Add copyright updates missed during previous cherry pick.
2464 * src/output.c: Here.
2465 * src/parse-gram.y: Here.
2466 * src/scan-gram.l: Here.
2467
663ce7bb
AD
24682009-04-20 Akim Demaille <demaille@gostai.com>
2469
2470 variables: accept dashes.
2471 * src/scan-gram.l ({id}): Also accept dashes after the initial
2472 letter.
2473 ({directive}): Use {id}.
2474 * src/parse-gram.y: Comment and formatting changes.
2475 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
2476 symbols.
2477 * src/complain.h, src/complain.c (yacc_at): New.
2478 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
2479 symbol names.
2480 * src/output.c (token_definitions_output): Do not #define token
2481 names with dashes.
2482
379261b3
JD
24832009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2484
2485 Clean up recent patches a little.
2486 Reported by Akim Demaille.
2487 * doc/bison.texinfo (Understanding): Fix typos.
2488 * src/print.c (print_reductions): Don't use negated variable.
2489
25029e16
JD
24902009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2491
2492 List accepted values for a %define enum variable with an invalid value.
2493 Suggested by Akim Demaille at
2494 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2495 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2496 * src/muscle_tab.c (muscle_percent_define_check_values): Implement.
2497 * tests/input.at (%define lr.default_reductions invalid values): Merge
2498 into...
2499 (%define enum variables): ... here, and update output.
2500
620b5727
JD
25012009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2502
2503 Rename "default rule" to "default reduction".
2504 This includes changing variable names in code, changing
2505 comments, and renaming %define lr.default_rules to %define
2506 lr.default_reductions.
2507 * NEWS (2.5): Update IELR documentation.
2508 * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c:
2509 Adjust YYDEFACT and yydefact_ documentation.
2510 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2511 and lr.type documentation. Make some other wording
2512 improvements.
2513 (Glossary): Adjust cross-references and Default Reduction
2514 definition.
2515 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2516 Remove a confusing comment pointed out by Akim Demaille.
2517 (initialize_LA): Adjust code.
2518 * src/print-xml.c (print_reductions): Adjust code.
2519 * src/print.c (print_reductions): Adjust code.
2520 * src/reader.c (reader): Adjust code.
2521 * src/tables.c (action_row): Adjust code.
2522 (token_actions): Adjust code.
2523 * src/tables.h: Adjust YYDEFACT documentation.
2524 * tests/input.at (%define lr.default_rules invalid values):
2525 Rename test group to...
2526 (%define lr.default_reductions invalid values): ... this, and
2527 update grammar file and expected output.
2528 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2529 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2530
34a6c2d1
JD
25312009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2532
2533 Document %define lr.type and lr.default_rules.
2534 * NEWS (2.5): Add an entry.
2535 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2536 besides just LALR(1) and GLR(1).
2537 * doc/bison.texinfo (Introduction): Likewise.
2538 (Language and Grammar): Bison is no longer limited to LALR(1)
2539 restrictions.
2540 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2541 when trying to distinguish from GLR. Talk about LR(1) grammars
2542 rather than LALR(1) grammars.
2543 (Decl Summary): In %define api.push_pull entry, say it applies
2544 to deterministic parsers in C rather than LALR(1) parsers in C.
2545 Add lr.default_rules entry.
2546 Add lr.type entry.
2547 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2548 restrictions.
2549 (Generalized LR Parsing): Same changes as for the previous GLR
2550 section.
2551 (Memory Management): Say deterministic rather than LALR(1).
2552 (Understanding): Correct some bison output.
2553 Index discussion of "accepting state".
2554 Say deterministic rather than LALR(1).
2555 (Bison Options): In --yacc entry, say deterministic rather than
2556 LALR(1).
2557 In --report, --graph, and --xml entries, just don't mention
2558 LALR(1).
2559 (C++ Parsers): Say deterministic rather than LALR(1).
2560 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2561 (Glossary): Add Accepting State, Consistent State, Default Rule,
2562 and IELR(1) definitions.
2563 In Generalized LR (GLR) definition, make same changes as in
2564 previous GLR sections.
2565 In LALR(1) definition, say Bison uses LALR(1) by default rather
2566 than implying Bison is limited to LALR(1).
2567 (LocalWords): Add IELR.
2568
f805dfcb
JD
25692009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2570
2571 Finish implementing %define lr.type.
2572 Its value can be "LALR", "IELR", or "canonical LR".
2573 * lib/timevar.def (TV_IELR_PHASE1): New var.
2574 (TV_IELR_PHASE2): New var.
2575 (TV_IELR_PHASE3): New var.
2576 (TV_IELR_PHASE4): New var.
2577 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2578 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2579 Sbitset.h, ielr.h, and ielr.c.
2580 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2581 trace_types): Add trace_ielr.
2582 * src/lalr.h, src/lalr.c (ngotos): Export it.
2583 (F): Rename to...
2584 (goto_follows): ... this, update all uses, and export it.
2585 (set_goto_map): Export it.
2586 (map_goto): Export it.
2587 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2588 handled in ielr.
2589 (initialize_LA): Export it. Move lookback allocation to...
2590 (lalr): ... here because, for canonical LR, initialize_LA must
2591 be invoked but lookback and much of the rest of LALR isn't
2592 needed.
2593 * main.c (main): Instead of lalr, invoke ielr, which invokes
2594 lalr.
2595 * src/reader.c (reader): Default lr.type to "LALR".
2596 Default lr.default_rules to "accepting" if lr.type is "canonical
2597 LR". Leave the default as "all" otherwise.
2598 Check for a valid lr.type value.
2599 * src/state.h, src/state.c (struct state_list): Add state_list
2600 member.
2601 (state_new): Initialize state_list member to NULL.
2602 (state_new_isocore): New function, exported.
2603 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2604 exercises all values of lr.type.
2605 (GNU AWK Grammar): Rename test group to...
2606 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
2607 AT_TEST_EXISTING_GRAMMAR.
2608 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
2609 (GNU pic Grammar): Rename test group to...
2610 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
2611 AT_TEST_EXISTING_GRAMMAR.
2612 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
2613 all values of lr.type.
2614 (Single State Split): New test groups using AT_TEST_LR_TYPE.
2615 (Lane Split): Likewise.
2616 (Complex Lane Split): Likewise.
2617 (Split During Added Lookahead Propagation): Likewise.
2618
166366b2
JD
26192009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2620
2621 Add new files for IELR and canonical LR implementation.
2622 * src/AnnotationList.c: New.
2623 * src/AnnotationList.h: New.
2624 * src/InadequacyList.c: New.
2625 * src/InadequacyList.h: New.
2626 * src/Sbitset.c: New.
2627 * src/Sbitset.h: New.
2628 * src/ielr.c: New.
2629 * src/ielr.h: New.
2630
03c07b03
JD
26312009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2632
2633 Implement %define lr.default_rules.
2634 Its value describes the states that are permitted to contain
2635 default rules: "all", "consistent", or "accepting".
2636 * src/reader.c (reader): Default lr.default_rules to "all".
2637 Check for a valid lr.default_rules value.
2638 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
2639 is "accepting", then only mark the accepting state as
2640 consistent.
2641 (initialize_LA): Tell state_lookahead_tokens_count whether
2642 lr.default_rules is "accepting".
2643 * src/tables.c (action_row): If lr.default_rules is not "all",
2644 then disable default rules in inconsistent states.
2645 * src/print.c (print_reductions): Use this opportunity to
2646 perform some assertions about whether lr.default_rules was
2647 obeyed correctly.
2648 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
2649 helps with checking the parser tables for a grammar.
2650 * tests/input.at (%define lr.default_rules invalid values): New
2651 test group.
2652 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
2653 AT_TEST_TABLES_AND_PARSE.
2654 (`no %define lr.default_rules'): New test group generated by
2655 AT_TEST_LR_DEFAULT_RULES.
2656 (`%define lr.default_rules "all"'): Likewise.
2657 (`%define lr.default_rules "consistent"'): Likewise.
2658 (`%define lr.default_rules "accepting"'): Likewise.
2659
44c124a3
AD
26602009-04-20 Akim Demaille <demaille@gostai.com>
2661
2662 Consistently refer to Yacc, not YACC.
2663 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
2664
42660736
JD
26652009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
2666
2667 Pacify make maintainer-check-posix.
2668 * tests/input.at (%define, --define): Move bison command-line
2669 options before grammar file name.
2670
a2d05674
JD
26712009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2672
2673 Document semicolon warnings.
2674 * NEWS (2.5): Here.
2675
c4fae1ef
AD
26762008-12-08 Akim Demaille <demaille@gostai.com>
2677
2678 Fix portability issue in the test suite.
2679 * tests/local.at (AT_MATCHES_CHECK): New.
2680 Based on Perl instead of Sed. Sed has too many portability
2681 pitfalls, not ever Sed is GNU Sed.
2682 * tests/actions.at (Fix user actions without a trailing semicolon):
2683 Use it.
2684
42f4393a
DJ
26852008-12-07 Di-an Jan <dianj@freeshell.org>
2686
2687 Implement the FIXME that ends an user action with a semicolon
2688 if it seems necessary.
2689 * src/scan-code.l (flex rules section): Flag cpp directive from
2690 any `#' to the first unescaped end-of-line. Semicolon is not
2691 needed after `;', `{', '}', or cpp directives and is needed after
2692 any other token (whitespaces and comments have no effect).
2693 * tests/actions.at (Fix user actions without a trailing semicolon):
2694 New test.
2695 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2696 to make user actions complete statements.
2697 Adjust column numbers in error messages.
2698 * tests/regression.at (Fix user actions without a trailing semicolon):
2699 Remove. Covered by new test.
2700
bd5df716
AD
27012009-04-14 Akim Demaille <demaille@gostai.com>
2702
2703 doc: minor fixes.
2704 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
2705 (Table of Symbols): Remove duplicate entry for %debug.
2706
7ba0d59d
EB
27072009-04-10 Eric Blake <ebb9@byu.net>
2708
2709 submodules: update to latest
2710 * submodules/autoconf: Use latest upstream Autoconf.
2711
b4d71a96
EB
27122009-04-06 Eric Blake <ebb9@byu.net>
2713
2714 Work around autoconf 2.63b bug in testsuite.
2715 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
2716 autoconf bug related to # in test.
2717
4ecd3681
JD
27182009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2719
2720 * NEWS (2.5): Describe new -D/--define feature.
2721
c65e5292
AD
27222008-11-10 Akim Demaille <demaille@gostai.com>
2723
2724 --trace=muscles
2725 * src/getargs.h, src/getargs.c (trace_muscle): New.
2726 (trace_types, trace_args): Support it.
2727 * src/output.c (output_skeleton): Use it.
2728
96002de2
AD
27292008-11-10 Akim Demaille <demaille@gostai.com>
2730
2731 muscles_output.
2732 * src/output.c (muscles_output): New, extracted from...
2733 (output_skeleton): here.
2734 Adjust.
2735
fadb13b5
AD
27362008-11-21 Akim Demaille <demaille@gostai.com>
2737
2738 Display the changes in cross-options.texi.
2739 * build-aux/cross-options.pl ($sep): New, to separate items.
2740 * doc/Makefile.am ($(srcdir)/cross-options.texi): Use diff to display
2741 the changes.
2742
72183df4
DJ
27432008-11-20 Di-an Jan <dianj@freeshell.org>
2744
2745 Improves options in the manual.
2746 * doc/bison.texinfo (-g, -x): Add space before argument.
2747 (Option Cross Key): Implement FIXME: listing directives also.
2748 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2749 (Short Option): Special case -d. Put arguments inside @option.
fadb13b5 2750 (Bison Directive): Add column, automatically extracted from
72183df4
DJ
2751 src/scan-gram.l (actual name passed as the first argument)
2752 with special case for %define.
2753 * doc/Makefile.am (doc/cross-options.texi): Pass src/scan-gram.l
2754 to build-aux/cross-options.pl.
2755 * src/getargs.c (usage): Document limitations of cross-options.pl.
2756 * src/scan-gram.l: Likewise.
2757
e80b068c
AD
27582009-02-25 Akim Demaille <demaille@gostai.com>
2759
2760 Copyright years.
2761 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2762
e3ee30b8
AD
27632008-12-08 Akim Demaille <demaille@gostai.com>
2764
2765 Install autoconf as a submodule to get m4sugar.
2766 * .gitmodules: Add submodules/autoconf.
2767 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2768 submodules/autoconf.
2769
c4eb1e84
JD
27702008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2771
2772 Simplify last patch slightly.
2773 * src/getargs.c (getargs): Here.
2774
10fa0146
JD
27752008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2776
2777 Fix last warning from --enable-gcc-warnings.
2778 * src/getargs.c (getargs): Don't assign const address to non-const
2779 pointer.
2780
6f5be1ab
DJ
27812008-11-17 Di-an Jan <dianj@freeshell.org>
2782
2783 Handle --enable-gcc-warnings.
2784 * src/getargs.c (command_line_location): Set parameters to void.
2785
11c4e57d
AD
27862008-11-11 Akim Demaille <demaille@gostai.com>
2787
2788 AT_FULL_COMPILE.
2789 * tests/actions.at, tests/regression.at: Use it.
2790
e186a284
AD
27912008-11-07 Akim Demaille <demaille@gostai.com>
2792
2793 Pass command line location to skeleton_arg and language_argmatch.
2794 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2795 The location argument is now mandatory.
2796 Adjust all dependencies.
2797 (getargs): Use command_line_location.
2798
e14c6831
AD
27992008-11-07 Akim Demaille <demaille@gostai.com>
2800
2801 -D, --define.
2802 * src/getargs.c (usage): Document -D.
2803 Fix help string for --locations.
2804 (command_line_location): New.
2805 (short_options, long_options, getargs): Support -D, --define.
2806 (getargs): Move -d support at the right place.
2807 * doc/bison.texinfo (Bison Options): Update.
2808 * tests/input.at (%define, --define): New.
2809
75c21b61
AD
28102008-11-07 Akim Demaille <demaille@gostai.com>
2811
2812 Initialize the muscle table before parsing the command line.
2813 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2814 (getargs): Define file_name.
2815 * src/main.c (main): Initialize muscle_tab before calling
2816 getargs.
2817 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2818 its value is not available yet.
2819
33d2a860
AD
28202008-11-09 Akim Demaille <demaille@gostai.com>
2821
2822 Require the generation of parse-gram.output.
2823 * src/Makefile.am (YACC): Pass --report=all.
2824
006faedf
JD
28252009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2826
2827 * NEWS (2.5): New stub.
2828
ecd1b61c
JD
28292009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
2830
2831 Fix options documentation.
2832 * build-aux/cross-options.pl: As in --help output, write optional
2833 arguments as [=ARG] not =[ARG].
2834 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
2835
f67c4037
AD
28362008-11-07 Akim Demaille <demaille@gostai.com>
2837
2838 Fix --help.
2839 * src/getargs.c (usage): Fix help string for -W.
2840
0213d651
AD
28412008-11-07 Akim Demaille <demaille@gostai.com>
2842
2843 Handle more general types of option arguments.
2844 * build-aux/cross-options.pl: The argument ends at the first
2845 space, not the first non-symbol character.
2846 Use @var for each word appearing the argument description.
2847
c19178bf
JD
28482009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2849
2850 Remove spurious initial empty lines.
2851 * data/location.cc: End the @output lines with an @.
2852
0d2b2ab0
AD
28532008-11-04 Akim Demaille <demaille@gostai.com>
2854
2855 Remove spurious initial empty lines.
2856 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2857 * data/yacc.c: End the @output lines with an @.
2858
8ba62e3e
JD
28592009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
2860
2861 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
2862 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
2863 requirements for a correct m4 are stricter.
2864 * m4/m4.m4: Replace with Autoconf 2.63's m4/m4.m4.
2865 * configure.ac: Update to use AC_PROG_GNU_M4.
2866 Reported by Eric Blake.
2867
5bc993d9
JD
28682009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2869
2870 Help with updating web manual.
2871 * HACKING: Incorporate instructions from gnulib/doc/README.
2872 * bootstrap.conf (gnulib_modules): Add gendocs.
2873
580c075d
JD
28742009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
2875
2876 Fix strange %define locations for default values.
2877 Reported by Akim Demaille at
2878 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
2879 and discussed again starting at
2880 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
2881 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
2882 because location information is bogus.
2883 Use angle brackets to delimit fake file name because square brackets
2884 look like underexpanded m4. Choose a better fake file name.
2885 Use negative line numbers.
2886 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
2887 * src/location.c (location_print): If line for a boundary is negative,
2888 only print that boundary's file name.
2889 * src/location.h: Document that.
2890 * tests/skeletons.at (%define Boolean variables: invalid skeleton
2891 defaults): Update output.
2892
5d3a1ecb
AD
28932008-11-07 Akim Demaille <demaille@gostai.com>
2894
2895 Locations without columns for command line arguments.
2896 * src/location.c (location_print): Don't display negative columns.
2897 * src/location.h: Document this.
2898
015e86a7
JD
28992009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2900
2901 Add reminder about uploading public key to keys.gnupg.net.
2902 * HACKING (Release Procedure): Here.
2903
c1455bab
AD
29042009-03-31 Akim Demaille <demaille@gostai.com>
2905
2906 bootstrap: --help to stdout.
2907 * bootstrap (usage): Don't send --help to stderr.
2908 Use a here doc instead of a long string.
2909
2075a82a
AD
29102009-03-31 Akim Demaille <demaille@gostai.com>
2911
2912 bootstrap: README-hacking no longer exists
2913 * bootstrap (checkout_only_file): Set to HACKING.
2914
26fccd4d
AD
29152009-03-26 Akim Demaille <demaille@gostai.com>
2916
2917 doc: merge HACKING and README-hacking.
2918 Two files is confusing.
2919 Reported by Alexandre Duret-Lutz.
5bc993d9 2920
26fccd4d
AD
2921 * README-hacking: Merge into...
2922 * HACKING (Working from the repository): here.
2923
6469c4d7
AD
29242009-03-26 Akim Demaille <demaille@gostai.com>
2925
2926 doc: update README-hacking.
2927 * README-hacking: We now use git and git submodules.
2928 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
2929
b328890a
AD
29302009-03-26 Akim Demaille <demaille@gostai.com>
2931
2932 lalr1.cc: avoid GCC 4.3 warnings.
2933 GCC 4.3 now warns about "a || b && c" and asks for explicit
2934 parentheses.
2935 Reported by Alexandre Duret-Lutz.
2936 * data/location.cc: Update copyright years.
2937 (Position::operator==): Use parens to make precedence explicit.
2938 Compare lines and columns first, as they are more likely to be
2939 different, and they are faster to compare.
2940
f3079439
AD
29412009-03-26 Akim Demaille <demaille@gostai.com>
2942
2943 gnulib: update.
2944 * gnulib: Update to latest.
2945 * lib/Makefile.am (AM_CPPFLAGS): It is now defined by gnulib, so
2946 use +=.
2947
8defe11b
AD
29482009-01-08 Akim Demaille <demaille@gostai.com>
2949
2950 Fix grep portability issues.
2951 Grep on Solaris does not support -q.
2952 Reported by Summum Bonum.
5bc993d9 2953
8defe11b
AD
2954 * NEWS: Add a stub for 2.4.2.
2955 * THANKS: Add Summum Bonum.
2956 * tests/atlocal.in (EGREP): New.
2957 (CC, CXX, XSLTPROC): Make it possible to override them via
2958 envvars.
2959 * tests/java.at: Use $EGREP instead of egrep.
2960 Use AT_CHECK's ignore instead of grep's -q.
2961
41930e7a
JD
29622008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2963
2964 Version 2.4.1.
2965 * NEWS: Set version and date.
2966 * lib/Makefile.am: Update copyright year.
2967 * tests/atlocal.in: Update copyright year.
2968
d07932ef
JD
29692008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2970
2971 Semicolon feature removal is not about future language support.
2972 * NEWS: The semicolon feature is no longer active for newer languages,
2973 so don't claim that it causes trouble for them.
2974
0364b334
JD
29752008-12-11 Joel E. Denny <jdenny@ces.clemson.edu>
2976
2977 * gnulib: Update submodule to HEAD.
2978
876fd835
AD
29792008-12-09 Akim Demaille <demaille@gostai.com>
2980
2981 Update data/README.
2982 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2983
bee1df15
EB
29842008-12-05 Eric Blake <ebb9@byu.net>
2985
2986 Build testsuite with newer autoconf.
2987 * tests/output.at (m4_expand): Don't override in newer autoconf,
2988 where the underlying implementation changed.
2989 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2990 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2991 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2992 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2993 since some of them contain unbalanced ')'.
2994
7e6d1e22
JD
29952008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
2996
2997 * NEWS: Clarify a little.
2998
a957d06c
JD
29992008-11-19 Joel E. Denny <jdenny@ces.clemson.edu>
3000
3001 * NEWS: Update for recent changes.
3002
462503f8
JD
30032008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3004
3005 Fix unexpanded macros in GLR defines file.
3006 Reported by Csaba Raduly at
3007 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3008 * THANKS (Csaba Raduly): Add.
3009 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3010 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3011 lexer in a separate module that includes the defines file.
3012 (AT_CHECK_CALC): Use AT_FULL_COMPILE and request compilation of lexer
3013 source.
3014 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3015 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3016 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3017 (AT_DATA_SOURCE_PROLOGUE): New.
3018 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3019 (AT_DATA_SOURCE): New.
3020 (AT_FULL_COMPILE): New, copied from master branch and extended to
3021 support an additional source file.
3022
bf151b75
JD
30232008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
3024
3025 Don't let maintainer-*-check targets force a version update.
3026 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
3027 handled.
3028
f56274a8
DJ
30292008-11-17 Di-an Jan <dianj@freeshell.org>
3030
3031 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
3032 Align menus. Adjust word wrapping. Use node names for menu names.
3033 (Examples): Don't abbreviate node names.
3034 (LocalWords): Remove abbreviations.
3035 (Copying): Make description a sentence.
bf151b75 3036 (Java Action Features): Remove period to match the rest of menu.
f56274a8 3037
b5775a81
PB
30382008-11-11 Paolo Bonzini <bonzini@gnu.org>
3039
3040 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3041 * configure.ac: Adjust usage.
3042 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3043 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3044 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3045
7ed73f82
JD
30462008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3047
3048 Don't add a semicolon to actions for %skeleton or %language.
3049 It breaks Java test cases as reported by Akim Demaille.
3050 * src/scan-code.l: Implement.
3051
4b1ebc49
JD
30522008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3053
3054 Clean up %skeleton and %language priority implementation.
3055 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3056 remove static qualifier because others will soon need to see it.
3057 (language_prio): Likewise.
3058 (getargs): Use command_line_prio rather than 0.
3059 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3060 enum fields.
3061 (skeleton_prio): Extern it.
3062 (language_prio): Extern it.
3063 * src/parse-gram.y: Use grammar_prio rather than 1.
3064
738cde3e
AD
30652008-11-04 Akim Demaille <demaille@gostai.com>
3066
3067 * NEWS: Mention the trailing semicolon in action.
3068
d6fb461d
AD
30692008-11-04 Akim Demaille <demaille@gostai.com>
3070
3071 Reformat NEWS.
3072 * NEWS: Use more outline-mode markup.
3073 Suggested by Jim Meyering.
3074
14da0cdd
JD
30752008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3076
3077 Fix user actions without a trailing semicolon.
3078 Reported by Sergei Steshenko at
3079 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3080 * THANKS (Sergei Steshenko): Add.
3081 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3082 * tests/regression.at (Fix user actions without a trailing semicolon):
3083 New test case.
3084
c9ba9e59
JD
30852008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3086
3087 Initiate further development.
3088 * NEWS: Create an empty section for new entries.
3089 * gnulib: Update submodule to HEAD.
3090
bfb40910
JD
30912008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3092
3093 * NEWS: Version 2.4.
3094
241fda7a
JD
30952008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3096
3097 Prepare for next release.
3098 * NEWS: Briefly mention changes since 2.3b.
3099 * README: Say GNU m4 1.4.6, which we've been requiring in release
3100 announcements already, not 1.4.3, which breaks the build.
3101
ed4d67dc
JD
31022008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3103
3104 Say %language is experimental.
3105 We're thinking of extending it's effect on output file naming. See the
3106 thread at
3107 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3108 * NEWS: Say it's experimental.
3109 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3110 recommend it over %skeleton for now.
3111 (Bison Options): Likewise.
3112 (C++ Bison Interface): Use %skeleton not %language.
3113 (Calc++ Parser): Use %skeleton not %language.
3114 * src/getargs.c (usage): Say it's experimental.
3115
e254a580
DJ
31162008-11-01 Di-an Jan <dianj@freeshell.org>
3117 Paolo Bonzini <bonzini@gnu.org>
3118
3119 Support all Java parser class modifiers.
3120 * data/java.m4 (b4_percent_define_get3): New.
3121 (b4_final_if, b4_strictfp_if): New.
3122 * data/lalr1.java (final, strictfp, extends, implements): Support.
3123 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3124 documentation.
3125 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3126 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3127 (AT_CHECK_JAVA_GREP): New.
3128 (Java parser class modifiers): New test.
3129 (Java parser class extends and implements): New test.
3130
3131 Model exception propagation better with throws and lex_throws.
3132 * data/java.m4 (b4_list2): New.
3133 (throws): Change default.
3134 * data/lalr1.java (yyaction): Add throws.
3135 (parse): Add lex_throws in addition to throws.
3136 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3137 * tests/java.at (Java throws specifications): New test.
3138
3139 Improve documentation for Java parsers.
3140 * doc/bison.texinfo (Java Parsers): Add subsections.
3141 Don't quote first argument of %define.
3142 (Java Bison Interface): Document output files. Move documentation
3143 of parser class and merge into Java Parser Interface. Document
3144 features that error out. Document directives with no effect.
3145 Move note about Javadoc higher.
3146 (Java Semantic Values): Explicitly mention stype.
3147 Document that generic types cannot be used.
3148 (Java Location Values): Use @deftypeivar. Document constructors.
3149 Correct return value for toString.
3150 (Java Parser Interface): List undocumented constants/fields.
3151 Move documentation of fields added by %parse-param closer to list
3152 of members. Document that token names are added as fields.
3153 Document constructors accurately. Remove error method.
3154 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3155 Interface. Describe %code lexer and yylex accutately.
3156 Remove documentation that does not match the code.
3157 (Java Action Features): New.
3158 (Java Differences): Add reference. Add item on semantic values.
3159 Add note about @{ ... @}. Clarify %% epilogue placement.
3160 (Java Declarations Summary): New.
3161
3162 Fix Java skeleton.
3163 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3164 (b4_remove_comma): Quote test argument.
3165 (b4_identification): Remove "bison" field.
3166 * tests/java.at (Java parser class and package names): New test.
3167 (Java %parse-param and %lex-param): New test.
3168 (Java stype, position_class and location_class): New test.
3169
f259e4e6
PB
31702008-10-31 Di-an Jan <dianj@freeshell.org>
3171
3172 * data/lalr1.jave: Update copyright years.
3173 (YYParser): Correct name of "generated from" file in Javadoc:
3174 use b4_file_name instead of @ofile@.
3175 (Location constructor): Correct Javadoc parameter name.
3176 (yylloc): Add missing opening m4 quote after b4_location_if.
3177 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3178 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3179 (YYParser constructor): Correct Javadoc parameter name.
3180
cae5057f
JD
31812008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3182
3183 Always put auxiliary code files in the same dir as other output files.
3184 * src/files.c (compute_file_name_parts): When the user specifies
3185 --output but not --file-prefix, extract the directory prefix from the
3186 file prefix not from the grammar file name. This affects the location
3187 of files like location.hh generated by the C++ skeleton. The includes
3188 in the other output files require this fix.
3189 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3190 for expected output files.
3191 (Output files): Add a test for the above.
3192
4af432ba
JD
31932008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3194
3195 * gnulib: Update submodule to HEAD.
3196
e26d4e43
JD
31972008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3198
3199 Update copyright year.
3200 * src/files.c: Here.
3201
c0ee9e21
DJ
32022008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3203
3204 Don't overwrite the input file.
3205 * src/files.c (output_file_name_check): Fatal error if using input file
3206 for output.
3207 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3208 argument.
3209 (Conflicting output files): Add test.
3210
482dc52f
AD
32112008-10-28 Akim Demaille <demaille@gostai.com>
3212
3213 Space changes.
3214 * data/lalr1.cc: Formatting changes.
3215
52cbbe84
AD
32162008-10-28 Akim Demaille <demaille@gostai.com>
3217
3218 Don't define debugging functions when !YYDEBUG.
3219 * data/lalr1.cc (debug_stream, set_debug_stream)
3220 (debug_level_type, debug_level, set_debug_level): Don't
3221 declare them when YYDEBUG is not defined.
3222 The implementation are already YYDEBUG-aware.
3223
0925d5bf
AD
32242008-10-28 Akim Demaille <demaille@gostai.com>
3225
3226 Prefer "continue" for empty loop bodies.
3227 * etc/bench.pl.in: Use "continue" instead of {}.
3228
cf98343c
AD
32292008-10-28 Akim Demaille <demaille@gostai.com>
3230
3231 Space and comments changes.
3232 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3233 * data/c.m4, data/lalr1.cc: Space changes.
3234
9f467b7d
AD
32352008-10-28 Akim Demaille <demaille@gostai.com>
3236
3237 Make gnulib a submodule.
3238 * gnulib: New.
3239 * .gitmodules (gnulib): New.
3240
0f0e1ace
JD
32412008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3242
3243 Fix yyerror_range for user-defined location type in C++. Reported by
3244 Georg Sauthoff at
3245 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3246 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3247 * THANKS (Georg Sauthoff): Add.
3248
548e2104
JD
32492008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3250
3251 Update several administrative files mainly to facilitate releasing.
3252 * HACKING (Administrivia): Make the git-merge-changelog notes more
3253 helpful.
3254 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3255 (Release Procedure): Update for git and add numerous details that were
3256 previously missing.
3257 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3258 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3259 that announcements don't claim we bootstrapped with whatever bison
3260 happened to be in PATH. Add flex as a bootstrap tool.
3261 * Makefile.maint: Remove, previously replaced by maint.mk.
3262 * Makefile.cfg: Remove, and migrate settings to...
3263 * cfg.mk: ... here for the sake of `make announcement'.
3264 * bootstrap.conf (gnulib_modules): Add announce-gen.
3265 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3266 Berry.
3267
ddf17a6e
PB
32682008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3269
3270 Small but important bugfixes for the Java skeleton.
3271 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3272 (yy_symbol_print): Call toString on yyvaluep.
3273
e1145ad8
AD
32742008-08-29 Akim Demaille <demaille@gostai.com>
3275
3276 Clarify UPDATED use.
bee1df15 3277 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 3278 not to the release date of Bison.
bee1df15 3279 Reported by Joel E. Denny.
e1145ad8 3280
0df72d78
AD
32812008-08-29 Akim Demaille <demaille@gostai.com>
3282
3283 * README: Update FAQ pointer.
3284 Reported by Joel E. Denny.
3285
9a90b6bb
EB
32862008-08-27 Eric Blake <ebb9@byu.net>
3287
3288 Resync m4sugar from autoconf.
3289 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3290 (m4_init): Adjust to latest m4.git changes.
3291 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3292 effects.
3293 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3294 (_m4_list_cmp): Reduce side effects.
3295
65015668
AD
32962008-08-27 Akim Demaille <demaille@gostai.com>
3297
3298 Check yyerrok in calc.at.
bee1df15
EB
3299 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3300 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3301 expected.
65015668 3302
98e26a92
AD
33032008-08-27 Akim Demaille <demaille@gostai.com>
3304
3305 Support yyerrok in lalr1.cc.
3306 YYBACKUP is still to import back into lalr1.cc.
bee1df15 3307 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 3308
86c0e784
JD
33092008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3310
3311 For maintainer-check*, don't recompile for a $(VERSION) update.
3312 * cfg.mk: New file.
3313 (_is-dist-target): Override the one in GNUmakefile.
3314 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3315
88511166
JD
33162008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3317
3318 Update for recent change to gnulib.
3319 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3320 string.h now.
3321
6bbb2ed5
EB
33222008-08-15 Eric Blake <ebb9@byu.net>
3323
d67c52e8
EB
3324 Remaining m4sugar merge from autoconf.
3325 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3326 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3327 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3328 * src/output.c (output_skeleton): Tell m4 how to find it.
3329
6bbb2ed5
EB
3330 Partial m4sugar merge from autoconf: m4_map.
3331 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3332 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3333 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3334 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3335 for empty list.
3336 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3337 Likewise.
3338 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3339 declares it.
3340
8dce3875
JD
33412008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3342
3343 Keep .version and PACKAGE_VERSION in sync.
3344 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3345 dependency, and add comments justifying this in more detail. Discussed
3346 starting at
3347 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3348
882a1fbf
EB
33492008-08-06 Eric Blake <ebb9@byu.net>
3350
a3764451
EB
3351 Partial m4sugar merge from autoconf: m4_shiftn.
3352 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3353 (m4_shift2, m4_shift3): New macros.
3354 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3355 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3356 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3357 * data/java.m4 (b4_remove_comma): Likewise.
3358
882a1fbf
EB
3359 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3360 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3361 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3362 (m4_init): Consolidate wrapped text into single m4_wrap.
3363 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3364 in wrapped text.
3365
a30e920d
EB
33662008-08-05 Eric Blake <ebb9@byu.net>
3367
dfcc5959
EB
3368 Partial m4sugar merge from autoconf: builtins, version.m4.
3369 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3370 (m4_prepend): Remove, as it is unused and inherently quadratic,
3371 whereas m4_append is linear in newer m4.
3372 (m4_mkstemp): New builtin.
3373 (m4_symbols): Make rename conditional.
3374 (m4_version_prereq): Ensure fatal error if used in bison, which
3375 intentionally lacks version.m4.
3376
a30e920d
EB
3377 Fix comments in m4sugar.
3378 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3379
445b7470
JD
33802008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3381
3382 Update for recent .gitignore fix in Gnulib.
3383 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3384 anchored .gitignore entries.
3385
a1e50014
JD
33862008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3387
3388 Set gnu or gnits strictness.
3389 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3390 development and gnits strictness for releases. Based on Eric Blake's
3391 suggestion at
3392 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3393
d43f77e7
PB
33942008-07-31 Paolo Bonzini <bonzini@gnu.org>
3395
3396 * NEWS: Clarify documentation of %language.
3397
fee2ed87
PB
33982008-07-31 Paolo Bonzini <bonzini@gnu.org>
3399
3400 Support usage of git-merge-changelog.
3401 * .gitattributes: New.
3402 * HACKING: Document usage of git-merge-changelog.
3403 * bootstrap: Install git-merge-changelog entries in .git/config
3404 if appropriate.
3405
78029cd5
JD
34062008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3407
3408 Remove remaining dependence on CVS Id keyword.
3409 * ChangeLog: For the sake of people still using CVS, don't use dollars
3410 when mentioning Id.
3411 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3412 unusual anyway.
3413 * data/xslt/xml2dot.xsl: Likewise.
3414 * data/xslt/xml2text.xsl: Likewise.
3415 * data/xslt/xml2xhtml.xsl: Likewise.
3416 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3417 * doc/Makefile.am (neutralize): Remove, no longer needed.
3418 (.x.1): Don't use neutralize.
3419 (edit): Don't substitute for ID.
3420 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3421
c53d18b1
JD
34222008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3423
3424 Fix dependence on computed configure variables.
3425 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3426 $(top_srcdir)/configure.ac so that changes to computed variables, such
3427 as PACKAGE_VERSION, are seen.
3428 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3429
5523ac79
JD
34302008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3431
3432 Update copyright dates for recent changes.
3433 * Makefile.am: Here.
3434 * src/Makefile.am: Here.
3435 * src/reduce.c: Here.
3436 * tests/reduce.at: Here.
3437
8fa36911
JD
34382008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3439
3440 Use git-version-gen for version names between releases.
3441 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3442 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3443 * .prev-version: New.
3444 * .version.in: Remove.
78029cd5 3445 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
3446 revision.
3447 * GNUmakefile: Remove, now copied from Gnulib.
3448 * Makefile.am: Add code suggested by comments in
3449 build-aux/git-version-gen.
3450 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3451 .prev-version, and .version.
3452 * NEWS (2.3b+): Rename to...
3453 (?.?): ... this because we're dropping the "+" version naming scheme,
3454 but, in general, we still can't be sure of our next release name.
3455 * bootstrap: Add a quick hack to remove from .gitignore the
3456 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3457 entry. This should really be fixed in gnulib instead.
3458 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3459 * configure.ac (AC_INIT): Set version name by invoking
3460 build-aux/git-version-gen.
3461 (AC_CONFIG_FILES): Remove .version, now generated by
3462 build-aux/git-version-gen.
3463 * maint.mk: New, copied from coreutils.
3464 * doc/.cvsignore (bison.1): Add.
3465 * doc/.gitignore (/bison.1): Add.
3466 * doc/bison.1: Remove, generated.
3467 * src/.cvsignore (revision.c): Remove.
3468 * src/.gitignore (/revision.c): Remove.
3469 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3470 (BUILT_SOURCES): Remove revision.c.
3471 (revision.c): Remove.
3472 * src/getargs.c (version): Don't print revision after the VERSION.
3473 * src/revision.h: Remove.
3474
bcf07cb7
JD
34752008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3476
3477 Fix untranslatable composition of sentences. Reported by Goran
3478 Uddeborg at
3479 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3480 * THANKS (Goran Uddeborg): Add.
3481 * src/reduce.c (reduce_print): Report the number of nonterminals and
3482 rules useless in the grammar in separate sentences.
3483 * tests/reduce.at (Useless Rules): Update output.
3484 (Reduced Automaton): Likewise.
3485 (Underivable Rules): Likewise.
3486 (Empty Language): Likewise.
3487
9aacab9a
JD
34882008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3489
3490 Fix some .gitignore and .cvsignore problems.
3491 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3492 (insert_vc_ignore): ... this new function, which prepends `/' to all
3493 .gitignore entries before passing them to insert_sorted_if_absent.
3494 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3495 .cvsignore files are maintained even though Bison developers run
3496 bootstrap while using Git.
3497 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3498 unneeded by Bison.
3499 (gnulib): Add.
3500 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3501 unneeded. Reported by Eric Blake.
3502 * lib/.gitignore (/*~): Add.
3503 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3504 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3505 Blake.
3506 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3507
a9fc7990
JD
35082008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3509
3510 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3511 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3512 * bootstrap.conf (gnulib_modules): Add unsetenv.
3513 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3514 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3515 (/setenv.m4): Add.
3516 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3517 the first argument because it may become position-dependent, and unset
3518 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3519 Add comments explaining these issues in more detail.
3520
0f1d6f10
JD
35212008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3522
3523 Add .gitignore everywhere based on .cvsignore.
3524 * .gitignore: New.
3525 * build-aux/.gitignore: New.
3526 * data/.gitignore: New.
3527 * doc/.gitignore: New.
3528 * etc/.gitignore: New.
3529 * examples/.gitignore: New.
3530 * examples/calc++/.gitignore: New.
3531 * lib/.gitignore: New.
3532 * m4/.gitignore: New.
3533 * po/.gitignore: New.
3534 * runtime-po/.gitignore: New.
3535 * src/.gitignore: New.
3536 * tests/.gitignore: New.
3537
7bd1665a
JD
35382008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3539
3540 * NEWS (2.3b+): New section, empty for now.
3541 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3542
72c5b982
JD
35432008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3544
3545 * NEWS (2.3b): Update release date since there has been a delay in
3546 getting the announcements and tarballs out.
3547
bd02cd5d
JD
35482008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3549
3550 * NEWS: Version 2.3b.
3551 * configure.ac (AC_INIT): Likewise.
3552 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3553
9126263e
JD
35542008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3555
3556 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3557 been doing it for years.
3558 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3559 (Release Procedure): Add FIXME about make alpha being unmaintained.
3560
fa6aa7b3
JD
35612008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3562
3563 * data/yacc.c: Reformat m4 a little for readability.
3564 * src/lalr.c (build_relations): Correct comment.
3565
d30b312d
JMG
35662008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3567
3568 DJGPP specific issue.
3569 * djgpp/config.sed: Fixes required to run configure scripts generated
3570 by autoconf 2.62.
3571
138d4cd9
JD
35722008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3573
3574 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3575 coordinator@translationproject.org.
3576
8f7e2e1f
JD
35772008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3578
3579 * THANKS: Add Eric Blake.
3580
f55efa38
JD
35812008-04-23 Eric Blake <ebb9@byu.net>
3582
3583 Revert prior patch, by working around autoconf regression.
3584 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3585 ("Output file name: ("): Uncomment test.
3586 ("Output file name: )"): Likewise.
3587 Based on an idea from Noah Misch.
3588
096c9f9d
JD
35892008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3590
3591 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3592 2.61. Reported by Juan Manuel Guerrero at
3593 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3594 * tests/output.at ("Output file name: ("): Comment out test case for
3595 now.
3596 ("Output file name: )"): Likewise.
3597
0f664b89
JD
35982008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3599
3600 * GNUmakefile: Update git-version-gen invocation so make dist
3601 succeeds.
3602
1cfe6375
JD
36032008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3604
3605 Update to the current gnulib CVS repository, and fix trigraph handling
3606 in Bison.
3607 * bootstrap: Update gnulib CVS repository URL.
3608 (symlink_to_dir): Encapsulate the code that guarantees the destination
3609 directory exists into...
3610 (check_dst_dir): ... this new function, and...
3611 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3612 fail when copying files into lib/uniwidth/.
3613 * src/output.c (prepare_symbols): When writing yytname muscles, where
3614 symbol names will be encoded in C-string literals, tell quotearg to
3615 escape trigraphs. This used to be the default in gnulib.
3616 * tests/regression.at (Token definitions): Because of the change in
3617 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3618 escapes trigraphs in symbol names. Thus, yytname no longer has
3619 trigraphs unnecessarily doubly escaped. Update test case output.
3620 Extend test case to be sure Bison's own error messages will no longer
3621 have trigraphs in symbol names unnecessarily escaped once.
3622
74c52fc8
JD
36232008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3624
3625 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3626 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3627 * .cvsignore: Add .version.
3628 * .version.in: New.
3629 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3630 * configure.ac (AC_CONFIG_FILES): Add .version.
3631 * build-aux/.cvsignore: Add git-version-gen.
3632
8e55b3aa
JD
36332008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3634
3635 * NEWS (2.3a+): Mention that -g now takes an argument.
3636 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3637 consistency. Update the -g and -x entries now that they take
3638 arguments. Use brackets to indicate optional arguments.
3639 * src/getargs.c (usage): Explain the relationship between arguments of
3640 long and short options more completely. Document --defines and -d
3641 separately since the former takes an argument but, for POSIX Yacc, the
3642 latter does not.
3643 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 3644 (getargs): Sort cases.
8e55b3aa 3645
59c5ac72
AD
36462008-02-28 Akim Demaille <demaille@gostai.com>
3647
3648 * doc/bison.texinfo: Fix a few typos.
3649
118d4978
AD
36502008-02-28 Akim Demaille <akim@epita.fr>
3651
3652 * doc/bison.texinfo (Bison Options): Document -W.
3653 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3654
7020f1e9
AD
36552008-02-28 Akim Demaille <akim@epita.fr>
3656
3657 * src/getargs.c (short_options): Split and sort for readability.
3658 -g and -x take optional arguments, just like their long options.
3659 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3660 understand.
3661 Fix the handling of $opt which resulted in all the argument to be
3662 considered as optional.
3663
59da312b
JD
36642008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3665
3666 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3667 say its interface is experimental.
3668 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3669 Java.
3670 (Bison Options): In the -L and --language entry, mention Java.
3671 (Java Bison Interface): Say the interface is experimental.
3672 * src/getargs.c (usage): Mention -L and --language.
3673
3674 * NEWS (2.3a+): Say the push parsing interface is experimental.
3675 * doc/bison.texinfo (Push Decl): Likewise.
3676 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3677 (Push Parser Function): Likewise.
3678 (Pull Parser Function): Likewise.
3679 (Parser Create Function): Likewise.
3680 (Parser Delete Function): Likewise.
3681 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3682 yypull_parse, and yypush_parse entries.
3683
3684 * NEWS (2.3a+): Mention XML support, and say the schema is
3685 experimental.
3686 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3687 * src/getargs.c (usage): Say the XML schema is experimental.
3688
3689 * NEWS (2.3a+): Say option instead of flag.
3690
2bb3ebec
WP
36912008-02-21 Wojciech Polak <polak@gnu.org>
3692
3693 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3694 text.
3695
333e670c
JD
36962008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3697
3698 Fix impure push parser compile error reported by Bob Rossi at
3699 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3700 * data/yacc.c: Clean up whitespace in the output a little.
3701 (yypstate_allocated): Define for impure push parsers regardless of
3702 whether the pull interface is also requested.
3703 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3704 check impure push parsers without the pull interface.
3705
3706 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3707 yyerror takes arguments specified by %parse-param while yypstate_new
3708 does not.
3709 * doc/bison.texinfo (Parser Create Function): Document that
3710 yypstate_new returns 0 for multiple impure parser instances.
3711 * tests/push.at (Push Parsing: Multiple impure instances): Update
3712 expected stderr output.
3713
798096e1
JD
37142008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3715
3716 * runtime-po/POTFILES.in (push.c): Remove.
3717
9ca7f077
JD
37182008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3719
3720 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3721 * data/push.c: Rename to...
3722 * data/yacc.c: ... this, overwriting it.
3723 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3724 `%push-pull-parser' -> `%define api.push_pull "both"'.
3725 Remove old yacc.c tests, and update push.c tests to yacc.c.
3726
42ee26bb
JD
37272008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3728
3729 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3730 `"%code top" blocks' instead of `%code "top" blocks'.
3731 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3732 Clean up whitespace in the output a little.
3733
b1cc23c4
JD
37342008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3735
3736 Fix documentation problems reported by Tim Josling at
3737 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3738 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3739 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3740 integers. Explain the effect of literal string aliases on error
3741 messages. Copy token 0 documentation from the C++ skeleton
3742 documentation.
3743
ab7f29f8
JD
37442008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3745
3746 Accept a token number in a %left, %right, or %nonassoc for POSIX
3747 conformance. Reported by Tim Josling at
3748 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3749 * NEWS (2.3a+): Mention.
3750 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3751 and code numbers are treated by precedence declarations.
3752 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3753 of symbols.1.
3754 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3755 of symbol.
3756 (symbol.prec): New, just like symbol but allows INT.
3757 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3758 longer holds.
3759 * tests/regression.at (Token number in precedence declaration): New
3760 test case.
3761
a924ef36
JMG
37622008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3763
3764 DJGPP specific issues.
3765 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3766 be changed. Copyright timestamp adjusted.
3767 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3768 be changed. Copyright timestamp adjusted.
3769 * djgpp/config.site: Copyright timestamp adjusted.
3770 * djgpp/config_h.sed: Copyright timestamp adjusted.
3771 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3772 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3773 filename translation list.
3774 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3775 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3776 files shall be created. Before trying to use the temp dir where the
3777 environment variable points to check that the dir really exists. If
3778 not default to the cwd as temp dir. Copyright timestamp adjusted.
3779 * djgpp/subpipe.h: Copyright timestamp adjusted.
3780 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3781
389c8cfd
PE
37822008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3783
3784 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3785
5d1cfef4
PE
37862008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3787
3788 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3789 Problem reported by Claudio Saavedra in
3790 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3791
e2dcf996
WP
37922008-01-05 Wojciech Polak <polak@gnu.org>
3793
3794 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3795 document's title with the input grammar file name.
3796
da730230
JD
37972007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3798
3799 Automate regression testing of the XML/XSLT implementation. Discussed
3800 starting at
3801 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3802 * configure.ac (XSLTPROC): New substitution.
3803 * Makefile.am (maintainer-xml-check): New phony target invoking...
3804 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3805 invoking make maintainer-check with BISON_TEST_XML=1.
3806 * tests/atlocal.in (XSLTPROC): New.
3807 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3808 not to report reachable memory when Bison is expected to have a
3809 non-zero exit status and (2) to compare XML/XSLT output with --graph
3810 and --report=all output for every working grammar when
3811 BISON_TEST_XML=1.
3812 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3813 (AT_BISON_CHECK_XML): New.
3814 (AT_QUELL_VALGRIND): New.
3815 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3816 (AT_CHECK): ... don't redefine this since this was the old way to
3817 quell Valgrind.
3818 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3819 AT_BISON_CHECK invocations.
3820 * tests/c++.at: Likewise.
3821 * tests/calc.at: Likewise.
3822 * tests/conflicts.at: Likewise.
3823 * tests/cxx-type.at: Likewise.
3824 * tests/existing.at: Likewise.
3825 * tests/glr-regression.at: Likewise.
3826 * tests/headers.at: Likewise.
3827 * tests/input.at: Likewise.
3828 * tests/java.at: Likewise.
3829 * tests/output.at: Likewise.
3830 * tests/push.at: Likewise.
3831 * tests/reduce.at: Likewise.
3832 * tests/regression.at: Likewise.
3833 * tests/sets.at: Likewise.
3834 * tests/skeletons.at: Likewise.
3835 * tests/synclines.at: Likewise.
3836 * tests/torture.at: Likewise.
3837 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3838 tends to hang xsltproc.
3839 (Big horizontal): Likewise.
3840
408476bc
JD
38412007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3842
3843 In XML output, remove redundant class attribute on symbol element.
3844 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3845 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3846 look up a symbol to determine whether it's a nonterminal or terminal.
3847 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3848 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3849
3850 Add prec/assoc information to XML output.
3851 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3852 %prec, add a percent_prec attribute.
3853 * src/print-xml.c (print_grammar): For each terminal that has a
3854 precedence or associativity, add a prec or assoc attribute.
3855 (xml_indent): New.
3856 (xml_puts): Use xml_indent.
3857 (xml_printf): Use xml_indent.
3858 * src/print-xml.h (xml_indent): Prototype.
3859
3860 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3861 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3862
d4a26c48
JD
38632007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3864
3865 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3866 (bison:ruleByNumber): ... this for clarity.
3867 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3868 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3869 (xsl:template match="reduction"): Update.
3870 (xsl:template match="item"): Update.
3871 (xsl:template match="reduction"): Update.
3872
3873 In the XML output, don't print the list of rules where symbols appear.
3874 Compute it in XSLT instead. Discussed at
3875 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3876 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3877 (bison:ruleByRhs): New.
3878 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3879 bison:ruleByRhs.
3880 (xsl:template match="terminal/rule"): Remove.
3881 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3882 bison:ruleByRhs.
3883 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3884 Remove.
3885 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3886 bison:ruleByRhs and mode="number-link" for rule template.
3887 (xsl:template match="terminal/rule"): Remove.
3888 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3889 bison:ruleByRhs and mode="number-link" for rule template.
3890 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3891 Rewrite as...
3892 (xsl:template match="rule" mode="number-link"): ... this.
3893 * src/print-xml.c (print_grammar): Don't print the list of rules.
3894
ef1b4273
JD
38952007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3896
3897 Don't let --report affect XML output; always print all information.
3898 Discussed at
3899 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3900 * src/conflicts.c (log_resolution): Implement.
3901 * src/print-xml.c (print_core): Implement.
3902 (print_state): Implement.
3903 (print_xml): Implement.
3904
3905 * NEWS (2.3a+): Fix quotes.
3906 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3907 don't let %verbose clear the list specified by --report.
3908
0f6cd9e3
AD
39092007-11-26 Akim Demaille <akim@epita.fr>
3910
3911 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3912
d80fb37a
JD
39132007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3914
3915 In the XML output, list useless and unused symbols and rules with the
3916 useful ones and add a "usefulness" attribute. Discussed starting at
3917 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3918 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3919 (grammar_rules_print_xml): Print all rules instead of just those
3920 useful in the grammar, and add a "usefulness" attribute.
3921 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3922 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3923 (print_grammar): Print all nonterminals instead of just useful ones,
3924 and add a "usefulness" attribute to nonterminals and terminals.
3925 (print_xml): Don't print a separate "reductions" or
3926 "rules-useless-in-parser" element.
3927 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3928 (reduce_xml): Remove.
3929 (reduce_token_unused_in_grammar): New.
3930 (reduce_nonterminal_useless_in_grammar): New.
3931 * src/reduce.h (reduce_xml): Remove prototype.
3932 (reduce_token_unused_in_grammar): Add prototype.
3933 (reduce_nonterminal_useless_in_grammar): Add prototype.
3934 * data/xslt/xml2text.xsl: Update for XML changes.
3935 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3936 * tests/reduce.at (Useless Terminals): Update output.
3937 (Useless Rules): Update output.
3938 (Reduced Automaton): Update output.
3939
3940 Say "Terminals unused in grammar" instead of "Unused terminals".
3941 * NEWS (2.3a+): Update.
3942 * doc/bison.texinfo (Understanding): Update example output.
3943 * src/reduce.c (reduce_output): Implement.
3944 * data/xslt/xml2text.xsl: Implement.
3945 * data/xslt/xml2xhtml.xsl: Implement.
3946
1bb2bd75
JD
39472007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3948
3949 Accept --report-file=FILE to override the default `.output' filename.
3950 * NEWS (2.3a+): Mention.
3951 * doc/bison.texinfo (Bison Options): Add an entry.
3952 * src/files.c (compute_output_file_names): Don't override
3953 spec_verbose_file if already set.
3954 * src/getargs.c (usage): Document --report-file.
3955 (REPORT_FILE_OPTION): New anonymous enum member.
3956 (long_options): Add entry for it.
3957 (getargs): Add case for it setting spec_verbose_file.
3958
3959 * build-aux/cross-options.pl: Don't record a short option just because
3960 there's an arg.
3961 * doc/.cvsignore: Add yacc.1.
3962
a005a9c4
AD
39632007-11-14 Akim Demaille <akim@epita.fr>
3964
3965 * doc/yacc.1.in: New.
3966 * configure.ac, doc/Makefile.am: Adjust.
3967 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3968 config.h symbol.
3969 Use AC_SUBST for assignments too.
3970 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3971
cff03fb2
JD
39722007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3973
3974 * src/gram.c: Remove comments that duplicate comments in gram.h.
3975
3976 When reporting useless rules and nonterminals, say "useless in grammar"
3977 instead of "useless", and say "useless in parser" instead of "never
3978 reduced". Discussed starting at
3979 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3980 * NEWS (2.3a+): Mention this change.
3981 * data/xslt/xml2text.xsl: Update output text and expected input XML
3982 element names to match changes below.
3983 * data/xslt/xml2xhtml.xsl: Likewise.
3984 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3985 Contents: "Rules useless in parser due to conflicts".
3986 * doc/bison.texinfo (Decl Summary): Reword a little.
3987 (Understanding): Update example output for changes below.
3988 * src/gram.c: (rule_useful_p): Rename to...
3989 (rule_useful_in_grammar_p): ... this.
3990 (rule_useless_p): Rename to...
3991 (rule_useless_in_grammar_p): ... this.
3992 (rule_never_reduced_p): Rename to...
3993 (rule_useless_in_parser_p): ... this.
3994 (grammar_rules_print): Update for renames.
3995 (grammar_rules_print_xml): Update for renames.
3996 (grammar_rules_never_reduced_report): Rename to...
3997 (grammar_rules_useless_report): ... this since it is used for either
3998 kind of useless rule.
3999 * src/gram.h: Reword comments and update function names in prototypes.
4000 * src/main.c (main): Say "rule useless in parser due to conflicts".
4001 * src/print-xml.c (print_rules_never_reduced): Rename to...
4002 (print_rules_useless_in_parser): ... this, and rename output XML
4003 element "rules-never-reduced" to "rules-useless-in-parser".
4004 (print_xml): Update for rename.
4005 * src/print.c (print_results): Say "Rules useless in parser due to
4006 conflicts".
4007 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4008 (nonterminals_reduce): Say "nonterminal useless in grammar".
4009 (reduce_output): Say "Nonterminals useless in grammar".
4010 Say "Rules useless in grammar".
4011 (reduce_xml): Rename output XML element "useless" to
4012 "useless-in-grammar".
4013 (reduce_print): Don't report the count of grammatically useless rules
4014 as "rules never reduced" just because %yacc is specified.
4015 In the correct report of this count, say nonterminal(s) and rule(s)
4016 "useless in grammar".
4017 * tests/conflicts.at (S/R in initial): Update expected output.
4018 (Defaulted Conflicted Reduction): Likewise.
4019 (Unreachable States After Conflict Resolution): Likewise.
4020 * tests/existing.at (GNU pic Grammar): Likewise.
4021 * tests/reduce.at (Useless Nonterminals): Likewise.
4022 (Useless Rules): Likewise.
4023 (Reduced Automaton): Likewise.
4024 (Underivable Rules): Likewise.
4025 (Empty Language): Likewise.
4026
66f0441d
JD
40272007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4028
4029 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4030 here document and before the EOF so that BSD's implementation of Bourne
4031 shell doesn't parse the delimiter as part of the here document.
4032 * doc/.cvsignore: Add cross-options.texi.
4033 * src/getargs.c (usage): Add a blank line after the warning categories.
4034
d0ee4105
PB
40352007-11-08 Paolo Bonzini <bonzini@gnu.org>
4036
4037 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4038
e8b1fb9b
AD
40392007-11-05 Akim Demaille <akim@epita.fr>
4040
4041 Remove Id: from bison.1.
4042 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4043 (perl -0777 -pi -e 's/\.PP\nId): New.
4044 (.x.1): Use it to ignore the version control revision.
4045
2f7a96b5
AD
40462007-11-05 Akim Demaille <demaille@gostai.com>
4047
4048 * build-aux/Makefile.am: Ship cross-options.pl.
4049 * doc/Makefile.am: Always refer to cross-options.texi with
4050 $(srcdir).
4051 (MAINTAINERCLEANFILES): Add it.
4052
f4101aa6
AD
40532007-11-04 Akim Demaille <demaille@gostai.com>
4054
4055 Generate the long/short option cross-table.
4056 * build-aux/cross-options.pl: New.
4057 * doc/Makefile.am (cross-options.texi): New.
4058 * doc/bison.texinfo: Use it.
4059
727a1401
AD
40602007-11-04 Akim Demaille <demaille@gostai.com>
4061
4062 Generate bison.1 using help2man.
4063 * doc/common.x, doc/bison.x: New.
4064 * doc/Makefile.am (bison.1, .x.1): New.
4065 The code is taken from autoconf-2.61/man/Makefile.am.
4066 * configure.ac: Look for help2man.
4067
6aeb9c57
AD
40682007-11-04 Akim Demaille <demaille@gostai.com>
4069
4070 Complete --help.
4071 * src/getargs.c (usage): Document -W, make it clear that -d,
4072 -g and -x have optional arguments.
4073
d7be4085
AD
40742007-11-04 Akim Demaille <demaille@gostai.com>
4075
4076 Find sha1sum when named gsha1sum.
4077 * bootstrap (find_tool): New.
4078 ($SHA1SUM): New.
4079
d9df47b6
JD
40802007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4081
4082 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4083 at
4084 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4085 * NEWS (2.3a+): Mention.
4086 * data/bison.m4 (b4_pure_if): Don't define it here.
4087 * data/c.m4 (b4_identification): Depend on individual skeletons to
4088 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4089 values of the %define variables api.pure or api.push_pull. Define
4090 YYPURE, YYPUSH, and YYPULL accordingly.
4091 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4092 glr.cc has already defined b4_pure_flag.
4093 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4094 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 4095 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
4096 * doc/bison.texinfo (Pure Decl): Update.
4097 (Push Decl): Update.
4098 (Decl Summary): Add api.pure to %define entry.
4099 In %pure-parser entry, say it's deprecated and reference %define.
4100 (Pure Calling): Update.
4101 (Error Reporting): Update.
4102 (C++ Scanner Interface): Update.
4103 (How Can I Reset the Parser): Update.
4104 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4105 reference %define.
4106 * src/getargs.c (pure_parser): Remove global variable.
4107 * src/getargs.h (pure_parser): Remove extern.
4108 * src/output.c (prepare): Don't define pure_flag muscle.
4109 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4110 wrapper around `%define api.pure'.
4111 * tests/calc.at (Simple LALR Calculator): Update.
4112 (Simple GLR Calculator): Update.
4113 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4114 Update.
4115 (GLR: Resolve ambiguity, pure, locations): Update.
4116 (GLR: Merge conflicting parses, pure, no locations): Update.
4117 (GLR: Merge conflicting parses, pure, locations): Update.
4118 * tests/glr-regression.at (Uninitialized location when reporting
4119 ambiguity): Update
4120 * tests/input.at (Unused %define api.pure): New test case.
4121 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4122 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4123 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4124
c373bf8b
JD
41252007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4126
4127 %define push_pull -> %define api.push_pull. Discussed starting at
4128 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4129 * data/push.c: Expect the new name.
4130 * data/yacc.c: Likewise.
4131 * doc/bison.texinfo (Push Decl): Update.
4132 (Decl Summary): Update %define entry.
4133 (Push Parser Function): Update.
4134 (Pull Parser Function): Update.
4135 (Parser Create Function): Update.
4136 (Parser Delete Function): Update.
4137 * tests/calc.at (Simple LALR Calculator): Update.
4138 * tests/input.at (%define enum variables): Update.
4139 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4140 (Push Parsing: Multiple impure instances): Update.
4141 (Push Parsing: Unsupported Skeletons): Update.
4142 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4143 (Exploding the Stack Size with Malloc): Update.
4144
4145 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4146 other entries some.
4147
32f19b6b
JD
41482007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4149
4150 For the XML output's terminal element, rename @number to @token-number,
4151 and add @symbol-number. In the nonterminal element, rename @number to
4152 @symbol-number. Discussed starting at
4153 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4154 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4155 renames.
4156 (xsl:template match="nonterminal"): Likewise.
4157 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4158 (xsl:template match="nonterminal"): Likewise.
4159 * src/print-xml.c (print_grammar): Implement.
4160
255a6b90
JD
41612007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4162
4163 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4164 2007-10-11 change, the child elements here are items not rules.
408476bc 4165 (xsl:template match="item"): New.
255a6b90
JD
4166 (xsl:template match="rule"): Update for new reduced itemset.
4167 (xsl:template match="point"): Remove.
4168 (xsl:template match="empty"): For consistency with --graph, don't
4169 output "/* empty */".
4170 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4171 line-wrap, don't pass a negative value as first-line-length since this
4172 won't work with the following changes.
4173 (xsl:template name="line-wrap"): Simplify slightly.
4174 (xsl:template name="ws-search"): Eliminate recursion.
4175 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4176 set next to an item whose dot is not at the end of the RHS even if it
4177 happens to be associated with the same rule.
4178
88c78747
JD
41792007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4180
31984206
JD
4181 Add %define lr.keep_unreachable_states.
4182 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4183 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4184 * src/main.c (main): Implement it.
4185 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4186 Extend to test it, and fix a typo.
4187
41882007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4189
4190 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
4191 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4192 the example .output text.
4193 * tests/regression.at (Extra lookahead sets in report): Improve wording
4194 of comments.
4195
b7a70162
WP
41962007-10-17 Wojciech Polak <polak@gnu.org>
4197
4198 * src/print-xml.c (print_grammar): Renamed
4199 <terminal> and <nonterminal> attributes:
4200 "type" to "number" and "symbol" to "name".
4201 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4202 Use new attribute names.
4203 (xsl:template match="nonterminal"): Likewise.
4204 * data/xslt/xml2xhtml.xsl: Likewise.
4205
a0de5091
JD
42062007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4207
4208 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4209 (Option Cross Key): Likewise.
4210
4211 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4212 next to an item whose dot is not at the end of the RHS even if it
4213 happens to be associated with the same rule.
4214 * src/print.c (print_core): Likewise.
4215 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4216 (Resolved SR Conflicts): Update output.
4217 * tests/regression.at (Extra lookahead sets in report): New test case.
4218
4c20d18d
WP
42192007-10-11 Wojciech Polak <polak@gnu.org>
4220
4221 * src/print-xml.c (print_core): Remove item set
4222 redundancy.
4223 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4224 Improve processing time. Suggested by Joel E. Denny.
4225 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4226 Write xsl:param "required" attribute as comment.
4227 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4228 (xsl:template match="rule"): Support new reduced itemset.
4229 (xsl:template match="point"): Remove.
4230 * data/xslt/xml2xhtml.xsl: Likewise.
4231
f506ad1c
JD
42322007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4233
4234 * src/getargs.c (version): Update copyright year.
4235
21f1b063
JD
42362007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4237
4238 Make xml2dot.xsl and --graph produce the same output.
4239 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4240 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4241 escaped later.
4242 (xsl:template name="output-node"): Use the new escape template instead
4243 of the string-replace template directly.
4244 (xsl:template name="output-edge"): Likewise.
4245 (xsl:template name="escape"): New, escapes backslashes and newlines in
4246 addition to quotation marks.
4247 * src/graphviz.c (start_graph, output_node, output_edge): Add
4248 whitespace to output for legibility.
4249
4250 Make xml2text.xsl and --report produce the same output, and remove the
4251 XML "conflicts" element since a conflict summary is easily extracted
4252 from the automaton.
4253 * data/xslt/bison.xsl: New.
4254 (xsl:template match="state" mode="bison:count-conflicts): New.
4255 * data/xslt/xml2text.xsl: Import bison.xsl.
4256 (xsl:template match="bison-xml-report"): Instead of styling the
4257 "conflicts" element, style the "automaton" element with mode
4258 "conflicts". Unlike the former, the latter lists S/R and R/R
4259 conflicts for a state on the same line.
4260 (xsl:template match="conflicts"): Remove.
4261 (xsl:template match="conflict"): Remove.
4262 (xsl:template match="terminal"): Line-wrap the list of rules in which
4263 the terminal is used.
4264 (xsl:template match="nonterminal"): Likewise for nonterminals.
4265 (xsl:template match="automaton" mode="conflicts"): New.
4266 (xsl:template match="state" mode="conflicts"): New.
4267 (xsl:template name="line-wrap"): New.
4268 (xsl:template name="ws-search"): New.
4269 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4270 (xsl:template match="bison-xml-report"): Instead of styling the
4271 "conflicts" element, style the "automaton" element with mode
4272 "conflicts."
4273 (xsl:template match="conflicts"): Remove.
4274 (xsl:template match="conflict"): Remove.
4275 (xsl:template match="automaton" mode="conflicts"): New.
4276 (xsl:template match="state" mode="conflicts): New.
4277 * src/conflicts.c (conflicts_output_xml): Remove.
4278 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4279 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4280 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4281 the corresponding XSLT is easier. Also, never wrap between a word and
4282 the comma that follows it.
4283
793fbca5
JD
42842007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4285
4286 Improve C++ namespace support. Discussed starting at
4287 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4288 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4289 b4_namespace_close): New macros that interpret the %define variable
4290 "namespace" so its value can contain "::" to indicate nested
4291 namespaces.
4292 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4293 the above macros.
4294 * data/lalr1.cc (b4_namespace): Likewise.
4295 * data/location.cc (b4_namespace): Likewise.
4296 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4297 inside a new table in the general %define entry. Document `%define
4298 namespace' there as well. Point the %name-prefix entry to it since it
4299 explains it more completely in the case of C++.
4300 (C++ Bison Interface): Mention `%define namespace' instead of
4301 %name-prefix.
4302 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4303 entry suffices.
4304 * tests/c++.at (Relative namespace references): New test case.
4305 (Absolute namespace references): New test case.
4306 (Syntactically invalid namespace references): New test case.
4307 * tests/input.at (C++ namespace reference errors): New test case.
4308
35b8730d
JD
43092007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4310
4311 Add syncline support and location accessor to internal %define
4312 interfaces.
4313 * data/bison.m4 (b4_percent_define_get_loc): New.
4314 (b4_percent_define_get_syncline): New.
4315 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4316 (b4_percent_define_default): Record defining location as line 1 rather
4317 than 0 for the sake of synchronizing #line's, and define
4318 b4_percent_define_syncline(VARIABLE).
4319 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4320 * src/muscle_tab.c (muscle_syncline_grow): New.
4321 (muscle_code_grow): Use muscle_syncline_grow.
4322 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4323 define b4_percent_define_syncline(VARIABLE).
4324 (muscle_percent_define_get_loc): New.
4325 (muscle_percent_define_get_syncline): New.
4326 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4327 remove some unused variables.
4328 (muscle_percent_define_default): Record defining location as line 1
4329 rather than 0 for the sake of synchronizing #line's, and define
4330 b4_percent_define_syncline(VARIABLE).
4331 (muscle_percent_define_check_values): Use
4332 muscle_percent_define_get_loc.
4333 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4334 (muscle_percent_define_get_syncline): Prototype.
4335 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4336 defaults): Update output for location change.
4337 (Complaining during macro argument expansion): Extend to test
4338 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4339
7dc4a694
JD
43402007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4341
4342 Fix some error-reporting macro bugs.
4343 * data/bison.m4 (b4_cat): New.
4344 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4345 to stdout so they don't become arguments to other macros. Update
4346 comments and add examples.
4347 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4348 add examples.
4349 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4350 after printing the error directive so that M4 doesn't report subsequent
4351 problems that are induced by this problem.
4352 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4353 instead of just in them. Recognize @\n in both places. Both expand to
4354 the empty string. Needed by b4_cat.
4355 * tests/skeletons.at (Complaining during macro argument expansion):
4356 New test case.
4357 (Fatal errors make M4 exit immediately): New test case.
4358
d4bd2295
JD
43592007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4360
4361 Implement --print-datadir.
4362 * src/getargs.c (usage): Mention.
4363 (PRINT_DATADIR_OPTION): New anonymous enum member.
4364 (long_options): Add entry for it.
4365 (getargs): Add case for it calling compute_pkgdatadir.
4366 * src/output.c (output_skeleton): Encapsulate data directory
4367 computation from here...
4368 (prepare): ... and from here...
4369 (compute_pkgdatadir): ... into this new function.
4370 * src/output.h (compute_pkgdatadir): Prototype.
4371
34cdeddf
JD
43722007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4373
4374 * src/print-xml.c (escape_bufs): New static global variable
4375 replacing...
4376 (xml_escape_n): ... the static local variable buf here.
4377 (print_xml): Free memory for escape_bufs.
4378 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4379
d782395d
JD
43802007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4381
4382 Replace `%push-parser' and `%push-pull-parser' with
4383 `%define push_pull "push"' and `%define push_pull "both"'.
4384 `%define push_pull "pull"' is the default.
4385 * doc/bison.texinfo (Push Decl, Push Parser Function,
4386 Pull Parser Function, Parser Create Function, Parser Delete Function):
4387 Update declarations.
4388 (Decl Summary, Table of Symbols): Replace %push-parser and
4389 %push-pull-parser entries with a %define push_pull entry.
4390 * data/bison.m4 (b4_percent_define_check_values): New macro.
4391 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4392 definitions...
4393 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4394 definitions...
4395 * data/push.c: ... to here and compute them from the value of the
4396 %define variable push_pull.
4397 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4398 parsing requests here...
4399 * data/yacc.c: ... hack this to switch to push.c any time
4400 b4_use_push_pull_flag or the %define variable push_pull is set. This
4401 will go away when we mv push.c yacc.c.
4402 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4403 push parsing is not supported since unused %define variables are
4404 reported anyway.
4405 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4406 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4407 comments for consistency with b4_percent_define_check_values.
4408 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4409 muscles.
4410 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4411 Remove.
4412 (prologue_declaration): Remove %push-parser and %push-pull-parser
4413 rules.
4414 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4415 * tests/calc.at: Update declarations.
4416 * tests/input.at (%define enum variables): New test case.
4417 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4418 declaration.
4419 (Push Parsing: Multiple impure instances): Update declaration.
4420 (Push Parsing: Unsupported Skeletons): New test case.
4421 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4422 declaration.
4423 (Exploding the Stack Size with Malloc): Update declaration.
4424
3f999f78
WP
44252007-09-24 Wojciech Polak <polak@gnu.org>
4426
4427 Add XSLT transformations.
4428
4429 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4430 * data/xslt/xml2text.xsl: Transform XML into plain text.
4431 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4432 * data/Makefile.am (xsltdir): New variable.
4433 (dist_xslt_DATA): Add xslt/*.xsl files.
4434
a4f75309
PE
44352007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4436
4437 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4438 Problem reported by Wojciech Polak.
4439 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4440 (xml_printf): Undo change I made on 21 September; that is,
4441 indent 2 spaces, not 1.
4442
ad5feac4
JD
44432007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4444
4445 Pacify ./configure --enable-gcc-warnings.
4446 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4447 `char const *' instead of `char *'.
4448 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4449 local variable `sep'.
4450
41d7a5f2
PE
44512007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4452
4453 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4454 elsewhere.
4455 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4456 (xml_printf): Indent just 1 space for level.
4457 (e_char, xlate_char): Remove.
4458 (xml_escape_string): Rewrite to avoid undefined behavior (used
4459 storage that was freed from the stack).
4460 (xml_escape_n): Don't bother checking for subscript error.
4461
3f999f78
WP
44622007-09-21 Wojciech Polak <polak@gnu.org>
4463
4464 Add Bison XML Automaton Report.
41d7a5f2
PE
4465
4466 Add support for an -x option to generate an XML report.
4467 It is not documented yet.
4468 * src/print-xml.c: New file.
4469 * src/print-xml.h: Likewise.
4470 * lib/timevar.def (TV_XML): New var.
4471 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4472 * src/conflicts.c: Include print-xml.h.
4473 (solved_conflicts_xml_obstack): New var.
4474 (log_resolution, conflicts_solve, conflicts_free):
4475 Add support for XML report.
4476 (conflicts_output_val): New function.
4477 * src/conflicts.h (conflicts_output_val): New decl.
4478 * src/files.c (spec_xml_file): New var.
4479 (compute_output_file_names, output_file_names_free): Add XML support.
4480 * src/files.h (spec_xml_file): New decl.
4481 * src/getargs.c (xml_flag): New var.
4482 (usage, short_options, long_options, getargs): Add XML support.
4483 * src/getargs.h (xml_flag): New decl.
4484 * src/gram.c: Include print-xml.h.
4485 (rule_lhs_print_xml, rule_rhs_print_xml):
4486 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4487 New functions.
4488 * src/gram.h: Declare external ones.
4489 * src/main.c: Include print-xml.h.
4490 (main): Add XML support.
4491 * src/reduce.c: Include print-xml.h.
4492 (reduce_xml): New function.
4493 * src/reduce.h: Declare it.
4494 * src/state.c: Include print-xml.h.
4495 (state_new): Add XML support.
4496 (state_rule_lookahead_tokens_print_xml): New function.
4497 * src/state.h: Declare it.
4498 (struct state): New member solved_conflicts_xml.
4499 * src/symtab.c (symbol_class_get_string): New function.
4500 * src/symtab.h: Declare it.
4501
6d8e724d
PE
45022007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4503
4504 * GNUmakefile: Switch to coreutils's version.
4505 * bootstrap: Likewise.
4506 * Makefile.cfg: Adjust to new GNUmakefile.
4507 * README-hacking: Likewise.
4508
4509 Import from gnulib:
4510
4511 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4512 Bruno Haible <bruno@clisp.org>
4513
4514 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4515 and is a script that invokes bison. Tighten the code. Add comments.
4516
922bdd7f
JD
45172007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4518
4519 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4520 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4521 * doc/bison.texinfo (Decl Summary): Fix.
4522 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4523 * tests/input.at (Boolean %define variables): Update output.
4524 * tests/skeletons.at (%define boolean variables: invalid skeleton
4525 defaults): Rename to...
4526 (%define Boolean variables: invalid skeleton defaults): ... this and
4527 update output.
4528
1b17b01d
JD
45292007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4530
4531 In impure push mode, don't allow more than one yypstate to be allocated
4532 since multiple impure parsers would corrupt yynerrs.
4533 * data/push.c (yypstate_allocated): New static global variable
4534 initialized to 0.
4535 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4536 exhaustion if yypstate_allocated is 1, but still return 2.
4537 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4538 already 1. Otherwise, set it to 1.
4539 (yypstate_delete): Set it to 0.
4540 * tests/push.at (Push Parsing: Multiple impure instances): New test
4541 case.
4542
9987d1b3
JD
45432007-08-17 Bob Rossi <bob@brasko.net>
4544
4545 * doc/bison.texinfo (Push Decl): Document the push parser.
4546 (Table of Symbols): Ditto.
4547 (Pure Decl): Ditto.
4548 (Decl Summary): Ditto.
4549 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4550 Parser Create Function, Parser Delete Function):
4551 Add new push parser symbols.
4552 (Table of Symbols): Document push-parser, push-pull-parser,
4553 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4554
f16b0819
PE
45552007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4556
4557 Update to GPLv3.
4558 * doc/gpl-3.0.texi: New file.
4559 * doc/gpl.texi: Remove.
4560 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4561 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4562 * README-hacking, TODO, bootstrap, bootstrap.conf:
4563 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4564 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4565 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4566 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4567 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4568 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4569 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4570 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4571 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4572 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4573 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4574 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4575 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4576 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4577 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4578 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4579 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4580 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4581 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4582 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4583 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4584 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4585 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4586 * src/complain.c, src/complain.h, src/conflicts.c:
4587 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4588 * src/files.h, src/flex-scanner.h, src/getargs.c:
4589 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4590 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4591 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4592 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4593 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4594 * src/print.c, src/print.h, src/print_graph.c:
4595 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4596 * src/reduce.h, src/relation.c, src/relation.h:
4597 * src/revision.h, src/scan-code.h, src/scan-code.l:
4598 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4599 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4600 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4601 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4602 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4603 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4604 * tests/existing.at, tests/glr-regression.at:
4605 * tests/headers.at, tests/input.at, tests/java.at:
4606 * tests/local.at, tests/output.at, tests/push.at:
4607 * tests/reduce.at, tests/regression.at, tests/sets.at:
4608 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4609 * tests/torture.at:
4610 Update to GPLv3.
4611
728c4be2
JD
46122007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4613
4614 Get rid of broken %no-parser, -n, and --no-parser implementation and
4615 documentation.
4616 * TODO: Don't mention them.
4617 * doc/bison.1: Likewise.
4618 * doc/bison.texinfo (Decl Summary): Likewise.
4619 (Bison Options): Likewise.
4620 (Option Cross Key): Likewise.
4621 * src/getargs.c (no_parser_flag): Remove global variable.
4622 (usage): Don't print description of -n and --no-parser.
4623 (long_options): Remove --no-parser entry here.
4624 (getargs): Remove -n case in the switch here.
4625 * src/getargs.h (no_parser_flag): Remove extern.
4626 * tests/regression.at (Web2c Actions): Remove comment that mentions
4627 --no-parser.
4628
5d31a216
JD
46292007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4630
4631 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4632 name user variables starting with `yy'. Just pass NULL instead of a
4633 dummy local &yylval to yypush_parse.
4634 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4635 starting with `yy'.
4636
a2ea208d
JD
46372007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4638
4639 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4640 true since it's then always used regardless of whether yyoverflow is
4641 defined. Reported by Christian Burger at
4642 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4643 * THANKS: Add Christian Burger.
4644
91661ebb
JD
4645 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4646 node names: say "Decl Summary" not "Bison Declaration Summary".
4647
cbd50549
JD
46482007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4649
4650 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4651 determine whether this function has already complained about an invalid
4652 value for a %define boolean variable, don't check whether Bison has
4653 ever examined the value. As written, the check was a tautology.
4654 Instead, record and check for this complaint using a separate muscle.
4655
eb1b0740
JD
46562007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4657
4658 Fix push parsing memory leak reported by Brandon Lucia at
4659 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4660 * THANKS: Add Brandon Lucia.
4661 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4662 but the parse never completed and thus freed it.
4663 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4664 * tests/testsuite.at: Include push.at.
4665 * test/push.at: New.
4666 (Push Parsing: Memory Leak for Early Deletion): New test case.
4667
9d774aff
JD
46682007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4669
4670 Improve handling of multiple S/R conflicts in the same state and of S/R
4671 conflicts involving multiple reductions.
4672 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4673 set for a state here or Bison will abort if it is reassigned on a
4674 later conflicted reduction in the same state.
4675 Similarly, don't finalize and assign the solved conflicts report here
4676 or it will be lost if it is reassigned on a later conflicted reduction
4677 in the same state.
4678 (set_conflicts): Instead, assign them both here after all S/R conflicts
4679 in the state have been fully examined.
4680 * src/print.c (shift_set): Rename to...
4681 (no_reduce_set): ... this.
4682 (print_reductions): Update for rename, and add %nonassoc error action
4683 tokens to no_reduce_set so that, when printing the first remaining
4684 reduction on an error action token, the reduction is enclosed in
4685 brackets.
4686 (print_results): Update for rename.
4687 * tests/conflicts.at (Solved conflicts report for multiple reductions
4688 in a state): New test case.
4689 (%nonassoc error actions for multiple reductions in a state): New test
4690 case.
4691
4692 * src/main.c (main): Don't depend on C99 features.
4693
10159d2a
JD
46942007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4695
4696 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
4697 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4698 uniwidth.
10159d2a 4699
953b3935
JD
47002007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4701
4702 * bootstrap (slurp): Create target directories that don't exist.
4703 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4704
6ce2d93a
JD
47052007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4706
4707 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4708 than item number.
4709 * closure.c (closure): Likewise.
4710 * state.h (reductions): Comment sorting of rules.
4711 (state): Comment sorting of items.
4712
ce3448d5
JD
47132007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4714
4715 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4716 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4717 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4718 definition in order to avoid Gnulib headers since we don't use config.h
4719 here.
4720 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4721 rather than AT_DATA so that config.h is included.
4722
8a86eef0
JD
47232007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4724
4725 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4726 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4727 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4728 and so that YYFPRINTF is guaranteed to be defined here.
4729
b1a81613
JD
47302007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4731
4732 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4733 with...
4734 (muscle_percent_define_check_values): ... this more helpful function.
4735 Again, it's not used yet, but it will be.
4736 * src/muscle_tab.h: Likewise.
4737
71b61d4d
JD
4738 Improve some comments in parser table construction.
4739 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4740 (generate_states): Don't mention ruleset, which is internal to closure.
4741 * src/closure.c (closure): Explain sorting of core and itemset, which
4742 is required for this function to behave correctly.
4743 * src/closure.h (closure): Mention sorting.
4744
2a6b783d
JD
47452007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4746
4747 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4748 move the check for disabled transitions to an aver since conflict
4749 resolution hasn't happened yet.
4750
4751 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4752 labels a state as inconsistent just because it has error transitions.
4753 The original form of this check appeared in revision 1.1 of lalr.c,
4754 which was committed on 1991-12-21. Now (at least), changing the
4755 consistency label on such a state appears to have no useful effect in
4756 any of the places it is examined, which I enumerate below. The key
4757 point to understanding each item in this enumeration is that a state
4758 with an error transition is labelled consistent in the first place only
4759 if it has no rules, so the check cannot matter for states that have
4760 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4761 to try to identify its conflicts, and a state must have *rules* to have
4762 conflicts. (2) Labelling a state as inconsistent will affect how
4763 action_row sets the default *rule* for the state. (3) Labelling a
4764 state as inconsistent will cause build_relations to add lookback edges
4765 to *rules* in that state.
4766 * src/state.h (struct state): Word the comment for member consistent
4767 more carefully.
4768
14462c2b
JD
47692007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4770
4771 Don't depend on C99 features.
4772 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4773 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4774 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4775 * src/state.c (state_mark_reachable_states): Fix for-loop.
4776 (state_remove_unreachable_states): Fix for-loop.
4777
4778 Don't widen struct state with member reachable just to temporarily
4779 record reachability. Instead, use a local bitset.
4780 * src/state.h (struct state): Remove member.
4781 * src/state.c (state_new): Don't initialize it.
4782 (state_mark_reachable_states): Rename to...
4783 (state_record_reachable_states): ... this, and use bitset.
4784 (state_remove_unreachable_states): Use bitset.
4785
5a43d418
JD
47862007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4787
4788 * src/Makefile.am (yacc): Quote target action commands properly so
4789 that the yacc script isn't corrupt. Reported by Hans Aberg at
4790 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4791
0c650a20
JD
4792 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4793 the case of pure parsers. Reported by Frans Englich at
4794 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4795 * THANKS: Add Frans Englich.
4796
61fee93e
JD
4797 * NEWS (2.3a+): In the %code entry, reference section `Bison
4798 Declaration Summary' from the manual now since the %code summary has
4799 moved there.
4800 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4801 in the rules section must be terminated by semicolons.
4802
f124d423
JD
48032007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4804
4805 Extend the front-end API for %define variables to more completely
4806 mirror the back-end. This will be useful in the future.
4807 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4808 Update comments to mention the new front-end counterparts of these
4809 macros.
4810 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4811 for muscle_string_decode and muscle_location_decode.
4812 (muscle_string_decode): New static function.
4813 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4814 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4815 functions.
4816 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4817 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4818 implementation more closely.
4819 (muscle_percent_define_invalid_value): New function.
4820 * src/muscle_tab.h (muscle_percent_define_get,
4821 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4822 Prototype.
4823
75ad86ee
JD
48242007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4825
4826 * NEWS (2.3a+): Mention yesterday's state-removal change.
4827 (2.3a): Remove the %language entry, which was added after 2.3a.
4828 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4829 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4830 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4831 tests/existing.at: Update copyright date.
4832
5967f0cf
JD
48332007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4834
4835 If conflict resolution makes states unreachable, remove those states,
4836 report rules that are then unused, and don't report conflicts in those
4837 states.
4838 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4839 New global function.
4840 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4841 function.
4842 * src/main.c (main): After conflict resolution, remove the unreachable
4843 states and update all data structures that reference states by number.
4844 * src/state.c (state_new): Initialize each state's reachable member to
4845 false.
4846 (state_mark_reachable_states): New static function.
4847 (state_remove_unreachable_states): New global function.
4848 * src/state.h (struct state): Add member bool reachable.
4849 (state_remove_unreachable_states): Prototype.
4850 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4851 New test case.
4852 * tests/existing.at (GNU pic Grammar): Update test case output now that
4853 an unused rule is discovered.
4854
b09f4f48
JD
48552007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4856
4857 Minor code cleanup in parser table construction.
4858 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4859 (new_itemsets, save_reductions): Update for rename to nitemset.
4860 * src/closure.c (nritemset): Rename to...
4861 (nitemset): ... this since the "r" appears to meaningless and isn't
4862 used in the comments.
4863 (closure): Update for rename.
4864 * src/closure.h (nritemset): Update extern to...
4865 (nitemset): ... this.
4866 * src/lalr.c (LA): Fix a typo in comments.
4867 * src/print.c (print_core): Update for rename to nitemset.
4868 * src/print_graph.c (print_graph): Likewise.
4869 * src/state.h: Fix some typos in header comments.
4870
bbb44d83
PE
48712007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4872
9b33de72
PE
4873 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4874 still sticks to ASCII. Sorry!
4875
bbb44d83
PE
4876 * README-hacking: New file, taken mostly from coreutils, with changes
4877 for Bison. Contains much of the contents of:
4878 * README-cvs: Remove.
4879 * bootstrap: Sync from gnulib.
4880 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4881 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4882
29553547
JD
48832007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4884
4885 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4886 Setzer.
4887 (Java Differences): Fix some typos.
4888 * THANKS: Add Sebastian Setzer.
4889
01b477c6
PB
48902007-03-07 Paolo Bonzini <bonzini@gnu.org>
4891
730739e4
AD
4892 * data/java.m4 (b4_single_class_if): Remove.
4893 (b4_abstract_if): Look at "%define abstract".
4894 (b4_lexer_if): New.
4895 (b4_union_name): Rename...
4896 (b4_yystype): ... to this. Map to "%define stype".
4897 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4898 b4_maybe_throws): Fix quoting.
4899 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4900 * data/lalr1.java (Lexer interface): Always define.
4901 (Lexer interface within parser class): Remove.
4902 (YYLexer class): New, used when "%code lexer" is present.
4903 (constructor): When "%code lexer" is used, pass %lex-param
4904 to the lexer constructor.
4905 (yylex, yyparse): Remove %lex-param from method invocations
4906 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4907
4908 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4909 abstract". Rename "%define union_name" to "%define stype".
4910 Rename method names according to previous patch.
4911 (Java Scanner Interface): Describe "%code lexer" instead of
4912 "%pure-parser" and "%define single_class".
4913 (Java Differences): Mention "%code lexer".
4914
4915 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4916 Include scanner here, using macros from tests/local.at.
4917 (AT_DATA_CALC_Y): Remove final argument.
4918 (_AT_CHECK_JAVA_CALC): Likewise.
4919 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4920 of %locations and %error-verbose.
4921 (main): Test with and without %lex-param.
4922 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4923 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 4924
122bea3a
JMG
49252007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4926
4927 DJGPP spefic issue. Inhibit the use of disallowed characters for
4928 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4929 and concern testsuite case 46.
4930 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4931 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4932 * djgpp/config.bat: Inhibit the use of disallowed characters.
4933
9611cfa2
JD
49342007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4935
4936 Miscellaneous %define and %code cleanup.
4937 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4938 values are interpreted.
4939 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4940 documentation a little more.
4941 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4942 muscle_percent_define_insert, muscle_percent_code_grow): New
4943 functions/macros.
4944 * src/muscle_tab.h (muscle_percent_define_insert,
4945 muscle_percent_code_grow): Prototype.
4946 * src/parse-gram.y (prologue_declaration): Use
4947 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4948 %define and %code directives.
4949
4950 Make it easy to share %define boolean variables between the front-end
4951 and back-end. Though not used yet, this will be useful in the future.
4952 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4953 Bison uses of names rather than just skeleton uses of names.
4954 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4955 b4_percent_define_skeleton_variables(VARIABLE) to
4956 b4_percent_define_bison_variables(VARIABLE).
4957 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4958 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4959 b4_percent_code_bison_qualifiers(QUALIFIER).
4960 (b4_check_user_names_wrap): Update for renames.
4961 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4962 muscle_percent_define_default): New functions mimicking
4963 b4_percent_define_flag_if and b4_percent_define_default.
4964
4965 For %define variables, report locations for invalid values and
bbb44d83 4966 redefinitions.
9611cfa2
JD
4967 * data/bison.m4 (b4_percent_define_flag_if): Read
4968 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4969 value for VARIABLE.
4970 (b4_percent_define_default): Save a special location in
4971 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4972 must later be reported as invalid.
4973 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4974 functions.
4975 (muscle_percent_define_insert): Record the location of VARIABLE in
4976 muscle percent_define_loc(VARIABLE), and use it to report the previous
4977 location for a redefinition.
4978 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4979 (muscle_percent_define_default): Update like b4_percent_define_default.
4980 (muscle_grow_user_name_list): Rename to...
4981 (muscle_user_name_list_grow): ... this for consistency and use
4982 muscle_location_grow.
4983 * src/muscle_tab.h (muscle_location_grow): Prototype.
4984 * tests/input.at (%define errors): Update expected output.
4985 * tests/skeletons.at (%define boolean variables: invalid skeleton
4986 defaults): New test case.
4987
0bf92491
JD
49882007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4989
4990 * src/print.c (lookahead_set, state_default_rule): Remove.
4991 (print_reductions): Replace state_default_rule invocation with
4992 equivalent use of yydefact, which was computed in token_actions in
4993 tables.c.
4994 (print_results): Don't allocate lookahead_set.
4995
d3b12988
PB
49962007-02-27 Paolo Bonzini <bonzini@gnu.org>
4997
4998 * data/lalr1.java: Prefix all private members with yy.
4999
f57a7536
JD
50002007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5001
5002 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 5003 Sebastien Fricker at
f57a7536 5004 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 5005 * THANKS: Add Sebastien Fricker.
f57a7536
JD
5006 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5007 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5008 accept a variable number of arguments.
5009
6404a5bf
JD
50102007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5011
5012 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5013
e4e09639
JMG
50142007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5015
5016 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5017 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5018 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5019
d7e0a1a7
PE
50202007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5021
5022 Undo my 2007-02-07 change, switching back to the c-strcase module
5023 introduced in the 2007-02-03 change. Bruno Haible reported that
5024 the 2007-02-07 change would be dangerous in Turkish if we add a
5025 language whose name contains "i", since "i" is not lowercase "I"
5026 in Turkish.
5027 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5028 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5029 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5030 * m4/.cvsignore: Remove strcase.m4.
5031 * src/getargs.c: Revert 2007-02-07 change, as follows.
5032 Include c-strcase.h.
5033 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5034
deee93a1
JD
50352007-02-11 Bruno Haible <bruno@clisp.org>
5036
5037 Enable the Java related testsuite tests when the only Java compiler
5038 found is a gcj < 4.3. Discussed at
5039 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5040 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5041
574add85
JD
50422007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5043
5044 * data/Makefile.am: Update copyright date.
5045 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5046 yypstate_new returns NULL.
5047 (yypstate_new): Return NULL if malloc does.
5048 * src/reader.c (packgram): Move translation of rule actions from the
5049 beginning of packgram to...
5050 (check_and_convert_grammar): ... here right before packgram is invoked
5051 so it's easier to write more complete comments, and remove redundant
5052 code.
5053
e785ccf7
JD
50542007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5055
5056 As in semantic actions, make @$ in %initial-action, %destructor, and
5057 %printer imply %locations.
5058 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5059 scanning @$.
5060 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5061 (@$ in %initial-action implies %locations,
5062 @$ in %destructor implies %locations,
5063 @$ in %printer implies %locations): ... these new test cases.
5064
1cfe1ed7
PE
50652007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5066
5067 Undo most of the 2007-02-03 change, switching to the strcase module
5068 now that gnulib strcase has been fixed.
5069 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5070 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5071 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5072 * m4/.cvsignore: Add strcase.m4.
5073 * src/getargs.c: Revert 2007-02-03 change, as follows.
5074 Don't include c-strcase.h.
5075 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5076 strcasecmp has "unspecified behavior" outside the POSIX locale,
5077 but it works fine in practice if at least one argument is ASCII,
5078 as is the case in Bison.
5079
0049ec86
PB
50802007-02-07 Paolo Bonzini <bonzini@gnu.org>
5081
5082 * tests/java.at: Skip tests if only one of javac/java is present.
5083 Reported by Joel E. Denny.
5084 * tests/atlocal.in: Adjust copyright years.
5085
50862007-02-05 Paolo Bonzini <bonzini@gnu.org>
5087
5088 * data/lalr1.java (Stack): Work around old verifiers that disallow
5089 access to the private fields of an inner class, from the outer class.
5090 We can make Stack's fields public because user code doesn't have access
5091 to the instance of Stack used by parse(). Reported by Paul Eggert.
5092
2c2b7220
PE
50932007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5094
5095 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5096 the right spot for these files?
5097 * bootstrap.conf (gnulib_modules): Add c-strcase.
5098 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5099 c-strncasecmp.c.
5100 * src/getargs.c: Include c-strcase.h.
5101 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5102 to avoid unspecified behavior.
5103
b2b81dae
JD
51042007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5105
5106 * doc/bison.texinfo (Decl Summary): Correct typo.
5107
c1d19e10
PB
51082007-01-30 Paolo Bonzini <bonzini@gnu.org>
5109
5110 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5111 Complain if the value does not match empty, "true" or "false".
5112 * data/c++.m4: Adjust default definitions of %define variables.
5113 * data/java.m4: Adjust default definitions of %define variables.
5114 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5115 to above behavior.
5116 * tests/input.at (Boolean %define variables): Test new behavior.
5117
8405b70c
PB
51182007-01-29 Paolo Bonzini <bonzini@gnu.org>
5119
5120 * NEWS: Mention java.
5121 * TODO: Remove things that are done.
5122 * bootstrap.conf: Add javacomp-script and javaexec-script.
5123 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5124
5125 * data/Makefile.am: Add new files.
5126 * data/java-skel.m4: New.
5127 * data/java.m4: New.
5128 * data/lalr1.java: New.
5129
5130 * doc/bison.texinfo: Put "A Complete C++ Example" under
5131 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5132 under Other Languages.
5133
5134 * src/getargs.c (valid_languages): Add Java.
5135 * src/getargs.h (struct bison_language): Update size of string fields.
5136
5137 * tests/Makefile.am: Add java.at.
5138 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5139 * tests/java.at: New.
5140 * tests/testsuite.at: Include it.
5141
3eb82471
JD
51422007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5143
5144 Clean up.
5145 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5146 at_directive_argv arguments so these no longer have to be global
5147 variables. Also, update the implementation for the following changes.
5148 (fail_for_at_directive_too_many_args,
5149 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5150 (at_directive_name): Remove as at_directive_argv[0] will be used for
5151 this now.
5152 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5153 for the directive name.
5154 (at_directive_argc, at_directive_argv): Make these local within
5155 skel_lex instead of global.
5156 (INITIAL): Update directive start action for above changes.
5157 (SC_AT_DIRECTIVE_ARG): Rename to...
5158 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5159 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5160 (scan_skel): Move yylex_destroy to...
5161 (skel_scanner_free): ... here.
5162 * tests/skeletons.at (installed skeleton file name): Rename to...
5163 (installed skeleton file names): ... this.
5164
148d66d8
JD
51652007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5166
5167 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5168 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5169 Summary" not "Directives".
5170 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5171 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5172 since the former is now the more complete one.
5173 (Prologue Alternatives): Likewise and do the same for %defines.
5174 (Table of Symbols): Add summary of %code, add summary of %define, and
5175 move full %code documentation to...
5176 (Decl Summary): ... here for consistency with other entries in these
5177 sections.
5178 Move %define entry in order to keep this list alphabetized.
5179 Reword %define entry a little to put less emphasis on the skeleton
5180 concept, which most users shouldn't have to think about.
5181
665f0c24
PE
51822007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5183
5184 Adjust to recent gnulib changes.
5185 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5186 Add string.h, string_.h, unistd_.h, wchar_.h.
5187 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5188 * src/system.h: Don't include <stpcpy.h>; this is now done by
5189 <string.h>.
5190
592d0b1e
PB
51912007-01-23 Paolo Bonzini <bonzini@gnu.org>
5192
5193 Simplify implementation of unqualified %code, implement macros for
5194 uniform treatment of boolean %define flags. Document %define.
5195 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5196 b4_percent_code_ifdef): New.
5197 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5198 * data/c++.m4: Define default value for global_tokens_and_yystype.
5199 * data/glr.cc: Likewise.
5200 * data/location.cc: Use b4_percent_define_flag_if.
5201
148d66d8 5202 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
5203
5204 * src/parse-gram.y (Unqualified %code): Change muscle name to
5205 b4_percent_code().
5206 (content.opt): Default to empty.
5207
a7867f53
JD
52082007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5209
5210 Implement support for relative and absolute skeleton file names.
5211 Discussed starting at
5212 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5213 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5214 (Bison Options): Document in --skeleton entry.
5215 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5216 full_skeleton can't necessarily hold all of pkgdatadir.
5217 If the specified skeleton file name contains a `/', don't prepend
5218 pkgdatadir.
5219 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5220 file name contains a `/', prepend the grammar file directory.
5221 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5222 * skeletons.at: New file.
5223 (relative skeleton file names): New test case.
5224 (installed skeleton file names): New test case.
5225 * tests/testsuite.at: Include skeletons.at.
5226
5227 * bootstrap: Update copyright to 2007.
5228
830c9b18
PB
52292007-01-17 Paolo Bonzini <bonzini@gnu.org>
5230
5231 * bootstrap: Remove occurrences of .#bootmp from the files.
5232
a8c2e813
AD
52332007-01-17 Akim Demaille <akim@epita.fr>
5234
5235 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5236 nonterminals.
5237 Use per-type %printer.
5238
279cabb6
JD
52392007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5240
5241 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5242 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5243 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5244 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5245 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5246 tests/glr-regression.at, tests/input.at, tests/local.at,
5247 tests/output.at, tests/torture.at: Update copyright to 2007.
5248
bb32f4f2
AD
52492007-01-16 Akim Demaille <akim@epita.fr>
5250
5251 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5252 error code.
5253 (Calc++ Scanner): Exit with failure if we can't open the input
5254 file.
5255 Accept "-" standing for stdin.
5256 (Calc++ Top Level): Print the result only if the parsing was
5257 successful.
5258
7cff04b5
AD
52592007-01-16 Akim Demaille <akim@epita.fr>
5260
5261 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5262
a4e25e1d
JD
52632007-01-15 Paolo Bonzini <bonzini@gnu.org>
5264 and Joel E. Denny <jdenny@ces.clemson.edu>
5265
5266 Clean up %define and %code implementation in M4 some. Most
5267 importantly, rename all related macros to be in the b4_percent_define
5268 and b4_percent_code namespaces. Also, complete support for `.' in
5269 %define variable names and %code qualifiers.
5270 * data/bison.m4 (b4_check_user_names): Check for special
5271 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5272 m4_foreach loops.
5273 (b4_get_percent_define, b4_get_percent_code): Rename to...
5274 (b4_percent_define_get, b4_percent_code_get): ... these.
5275 Extend documentation with examples.
5276 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5277 b4_percent_define_skeleton_variables and
5278 b4_percent_code_skeleton_qualifiers.
5279 Expect any value for the %define variable `foo' to be stored in the
5280 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5281 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5282 expect any unqualified %code blocks to be stored in a macro named
5283 `b4_percent_code_unqualified'.
5284 Use m4_indir so that %define variable names and %code qualifiers can
5285 contain `.', which is allowed by the grammar parser.
5286 (b4_percent_define_default): New macro to set a default value for a
5287 %define variable.
5288 (m4_wrap): Update wrapped code, and fix some underquoting.
5289 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5290 Expect grammar uses of %define variables and %code qualifiers to be
5291 defined in b4_percent_define_user_variables and
5292 b4_percent_code_user_qualifiers.
5293 * data/c++.m4: Use b4_percent_define_default rather than
5294 m4_define_default. Fix some underquoting. Skeleton usage of %define
5295 variable define_location_comparison now implies skeleton usage of
5296 %define variable filename_type.
5297 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5298 data/push.c, data/yacc.c: Update macro names.
5299 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5300 muscle names.
5301
e37c665c
JMG
53022007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5303
5304 DJGPP specific issues.
5305
5306 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5307 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5308
7d2d521f
JD
53092007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5310
5311 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5312 run parsers in all tests so that Valgrind is invoked during
5313 maintainer-check-valgrind.
5314 (Duplicate representation of merged trees): Free all semantic values.
5315 (Duplicated user destructor for lookahead): Likewise.
5316
e0ac9b4b
JD
53172007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5318
5319 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5320 command-line prefix.
5321 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5322 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5323 miss Valgrind messages.
5324 (Exploding the Stack Size with Malloc): Likewise.
5325
78143faa
JD
53262007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5327
5328 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5329 locals. Reported by Juan Manuel Guerrero at
5330 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5331 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5332 Fix some indentation also.
5333 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5334 explaining this issue.
5335
7ecec4dd
JD
53362007-01-09 Paolo Bonzini <bonzini@gnu.org>
5337 and Joel E. Denny <jdenny@ces.clemson.edu>
5338
5339 Simplify union and prologue handling, and escape union and lex/parse
5340 params with digraphs.
5341 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5342 values to the empty string since these are no longer guaranteed
5343 initialized by the front-end.
5344 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5345 braces around b4_user_stype since this is no longer done by the
5346 front-end.
5347 * src/files.c, src/files.h (pre_prologue_obstack,
5348 post_prologue_obstack): Remove.
5349 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5350 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5351 with digraphs. This fixes lex params and parse params.
5352 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5353 * src/output.c (prepare): Remove muscle insertion of the prologues.
5354 (output): Remove freeing of pre_prologue_obstack and
5355 post_prologue_obstack.
5356 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5357 than prologue_augment for prologue parsing so you don't need prologue
5358 obstacks.
5c80250c
JD
5359 (grammar_declaration): For %union RHS, use `braceless' instead of
5360 "{...}" so that braces are already stripped and code is escaped with
5361 digraphs.
7ecec4dd
JD
5362 * src/reader.c (prologue_augment): Remove.
5363 (reader): Remove initialization of pre_prologue_obstack and
5364 post_prologue_obstack.
5365 * src/reader.h (prologue_augment): Remove.
5366
5367 * data/c.m4: Remove stray parenthesis.
5368
16dc6a9e
JD
53692007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5370
5371 Remove quotes from variables names in %define directives and from
5372 qualifiers in %code directives, and restrict the characters that are
5373 allowed in them to M4-friendly ones. For %define, continue to support
5374 the quoted form as a deprecated feature. Discussed starting at
5375 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5376 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5377 %code.
5378 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
5379 (Decl Summary): In %defines entry, update mention of `%code requires'
5380 and `%code provides'.
16dc6a9e
JD
5381 (C++ Location Values): Update %define uses.
5382 (Calc++ Parser Interface): Likewise.
5383 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 5384 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
5385 * src/parse-gram.y (prologue_declaration): For %define variables, use
5386 `variable' instead of `STRING'.
5387 (grammar_declaration): For %code qualifiers, use `ID' instead of
5388 `STRING'.
5389 (variable): New nonterminal that takes an `ID' or a `STRING'.
5390 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5391 and %define uses.
5392 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5393 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5394 (%define errors): Update %define uses.
5395
e9813cd4
JD
53962007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5397
5398 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5399 instead of muscle_insert for %define values so that M4-special
5400 characters are replaced with digraphs.
5401 * tests/input.at (%define errors): Extend to check weird values.
5402
6afc30cc
JD
54032007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5404
5405 Instead of having skeletons declare all valid %define variables and
5406 %code qualifiers, provide macros that retrieve the associated values
5407 and build these lists automatically. Thus Bison will now warn when a
5408 variable or qualifier is not used by the skeleton in the current
5409 invocation regardless of whether it might sometimes be used by that
5410 skeleton in other invocations. Also, move all %define value macros to
5411 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5412 form, which is replaced by %code.
5413 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5414 (b4_check_user_names): ... this, and change the series of valid name
5415 arguments to a single list argument for names used in the skeleton
5416 similar to the existing list argument for names used in the grammar.
5417 Warn instead of complaining.
5418 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5419 values and %code code, to format %code code properly, and to build
5420 lists of all %define variables and %code qualifiers used in the
5421 skeleton: b4_skeleton_percent_define_variables and
5422 b4_skeleton_percent_code_qualifiers.
5423 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5424 Remove, and...
5425 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5426 the skeleton names lists can finish building first. In place of
5427 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5428 expect the lists b4_user_percent_define_variables and
5429 b4_user_percent_code_qualifiers.
5430 * data/c++.m4: Where setting default values for b4_parser_class_name,
5431 b4_location_type, b4_filename_type, b4_namespace, and
5432 b4_define_location_comparison, update their names to the
5433 b4_percent_define_ namespace.
5434 * data/glr.c: Don't use b4_check_percent_define_variables and
5435 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5436 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5437 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 5438 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
5439 * data/location.cc: Use b4_get_percent_define.
5440 * data/push.c: Don't use b4_check_percent_define_variables and
5441 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5442 * data/yacc.c: Likewise, and don't call m4_exit in
5443 b4_use_push_for_pull_if or m4_wrap code will never execute.
5444 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5445 Rename to...
5446 (muscle_grow_user_name_list): ... this for consistency with the
5447 terminology used in bison.m4.
5448 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5449 %define variable names, and rename muscle used_percent_define_variables
5450 to user_percent_define_variables.
5451 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5452 user_percent_code_qualifiers.
5453 (content): Remove.
5454 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5455 {CODE} form is no longer accepted.
5456 * tests/input.at (Reject bad %code qualifiers): Rename to...
5457 (Reject unused %code qualifiers): ... this, and update test output.
5458 (%define error): Update test output.
5459
7eb8a0bc
JD
54602007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5461
5462 Check for unrecognized %define variables similar to checking for
5463 unrecognized %code qualifiers. Check for redefined %define variables.
5464 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5465 generalizes...
5466 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5467 (b4_check_percent_define_variables): New, also wraps it.
5468 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5469 variables using b4_check_percent_define_variables.
5470 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5471 all those exercised in the test suite and all those listed in the
5472 `Default values' section of c++.m4. Are there others?
5473 * data/push.c, data/yacc.c: Declare no valid %define variables.
5474 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5475 similar to muscle_find, but it works even when the muscle stores a
5476 const value.
5477 (muscle_grow_used_name_list): New function for constructing the used
5478 name list muscles that b4_check_for_unrecognized_names requires.
5479 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5480 %define'd more than once. Define the b4_used_percent_define_variables
5481 muscle with muscle_grow_used_name_list.
5482 (grammar_declaration): Abbreviate %code code with
5483 muscle_grow_used_name_list.
5484 * tests/input.at (%define errors): New.
5485
3fc65ead
JD
54862007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5487
5488 Provide warn_at, complain_at, and fatal_at function callbacks to the
5489 skeletons, and use this for %code qualifier complaints.
5490 * data/bison.m4 (b4_error_at): New, invoked by...
5491 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5492 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5493 @fatal_at(...@) directives.
5494 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5495 qualifiers in b4_used_percent_code_qualifiers and to use
5496 b4_complain_at.
5497 * src/location.c, src/location.h (boundary_set_from_string): New global
5498 function.
5499 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5500 function.
5501 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5502 to b4_used_percent_code_qualifiers.
5503 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5504 function.
5505 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5506 (lineno): Rename to...
5507 (out_lineno): ... this so I don't misunderstand it again.
5508 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5509 here; these newlines are in the input but not the output file.
5510 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5511 (at_directive_perform): ... this new static function, and add handling
5512 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5513 directives.
5514 * tests/input.at (Reject bad %code qualifiers): Update test output with
5515 locations and extend.
5516
5517 * tests/output.at (Output file name: [, Output file name: ]): Remove
5518 bogus comment about these tests failing.
5519
1c7b7e1d
JD
55202007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5521
5522 Clean up b4_check_percent_code_qualifiers a little.
5523 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5524 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5525 documentation and add examples.
5526 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5527 qualifiers here.
5528
08af01c2
JD
55292007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5530
5531 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5532 unreliable -- especially when they're hidden inside another macro.
5533 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5534 data/c.m4: Remove m4_divert(-1).
5535 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5536 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5537 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 5538 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
5539 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5540 pushed and popped by m4sugar, should be first on the stack.
5541
5542 Provide warn, complain, and fatal function callbacks to the skeletons.
5543 This provides more flexibility than m4_fatal, improves the error
5544 message format, and captures messages for translation. Discussed
5545 starting at
5546 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5547 * data/bison.m4 (b4_error): New, invoked by...
5548 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5549 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5550 directives. Because these M4 macros might be called when the current
5551 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5552 the previous removal of uses of m4_divert, which caused trouble.
5553 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5554 m4_fatal to report unrecognized %code qualifiers.
5555 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5556 push parser requests.
5557 * data/glr.c: Use b4_complain instead of m4_fatal to report
5558 non-deterministic push parser requests.
5559 Update @output usage to @output(...@) form.
5560 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5561 report missing %defines. Update @output usage to @output(...@) form.
5562 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5563 @output(...@) form.
5564 * src/main.c (main): Invoke skel_scanner_free.
5565 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5566 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5567 obstack_for_string from flex-scanner.h.
5568 (YY_DECL): Use to declare skel_lex static.
5569 (decode_at_digraphs): Remove; now handled in the new
5570 SC_AT_DIRECTIVE_ARG start condition.
5571 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5572 functions.
5573 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5574 at_directive_argv): New static globals.
5575 (INITIAL): Use fail_for_invalid_at.
5576 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5577 recognize the start of a generalized `@directive(...@)' form and
5578 start...
5579 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5580 directive args (using the new obstack_for_string), to decode the
5581 contained @ diagraphs, and to perform the directive. It recognizes
5582 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5583 @output(...@).
5584 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5585 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5586 `@,'.
5587 (scan_skel): Initialize obstack_for_string on the first call.
5588 (skel_scanner_free): New function to free obstack_for_string.
5589 * tests/input.at (Reject bad %code qualifiers): Update test output.
5590
8e0a5e9e
JD
55912007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5592
5593 Consolidate the 4 prologue alternative directives (%code, %requires,
5594 %provides, and %code-top) into a single %code directive with an
5595 optional qualifier field. Discussed at
5596 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5597 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5598 alternatives.
5599 * doc/bison.texinfo (Prologue Alternatives): Update.
5600 (Decl Summary): Update to %code "requires" and %code "provides".
5601 (Calc++ Parser): Update to %code "requires".
148d66d8 5602 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
5603 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5604 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5605 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5606 which are skeleton-specific.
5607 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5608 declare what %code qualifiers it supports and to complain if any other
5609 qualifiers were used in the grammar.
5610 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5611 and b4_user_code([b4_percent_code_provides]) in place of
5612 b4_user_requires and b4_user_provides.
5613 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5614 Add b4_user_code([b4_percent_code_top]) and
5615 b4_user_code([b4_percent_code]).
5616 Invoke b4_check_percent_code_qualifiers.
5617 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5618 PERCENT_REQUIRES): Remove.
5619 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5620 %requires. Rewrite the %code RHS as the unqualified form defining the
5621 muscle b4_percent_code. Add another RHS for the qualified %code form,
5622 which defines muscles of the form b4_percent_code_QUALIFIER and the
5623 b4_used_percent_code_qualifiers muscle.
5624 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5625 PERCENT_REQUIRES): Remove.
5626 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5627 %code "requires" and %code "provides".
5628 * tests/input.at (Reject bad %code qualifiers): New.
5629
95021767
JD
56302007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5631
5632 Use the new code_props interface for destructors and printers.
5633 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5634 printer_location members, and change the type of the destructor and
5635 printer members to code_props.
5636 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5637 symbol_printer_get, semantic_type_destructor_set,
5638 semantic_type_printer_set, default_tagged_destructor_set,
5639 default_tagless_destructor_set, default_tagged_printer_set,
5640 default_tagless_printer_set): Use code_props in arguments and return
5641 types in place of char const * and location.
5642 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5643 since the locations are now contained in the return of
5644 symbol_destructor_get and symbol_printer_get.
5645 * src/output.c (symbol_destructors_output, symbol_printers_output):
5646 Replace with...
5647 (symbol_code_props_output): ... this to eliminate duplicate code.
5648 (output_skeleton): Update to use symbol_code_props_output.
5649 * src/reader.c (symbol_should_be_used): Update use of
5650 symbol_destructor_get.
5651 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5652 Update uses of the various _destructor_set and _printer_set functions.
5653 * src/symtab.c: (default_tagged_destructor_location,
5654 default_tagless_destructor_location, default_tagged_printer_location,
5655 default_tagless_printer_location): Remove since we...
5656 (default_tagged_destructor, default_tagless_destructor,
5657 default_tagged_printer, default_tagless_printer): ... change the type
5658 of these to code_props.
5659 (symbol_new, semantic_type_new, symbol_destructor_set,
5660 semantic_type_destructor_set, symbol_destructor_get,
5661 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5662 symbol_check_alias_consistency, default_tagged_destructor_set,
5663 default_tagless_destructor_set, default_tagged_printer_set,
5664 default_tagless_printer_set): Update.
5665 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5666 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5667 code_props members.
5668 (symbol_print): Use SYMBOL_CODE_PRINT.
5669
f6857bbf
JD
56702007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5671
5672 Use the new code_props interface for rule actions.
5673 * src/symlist.h (symbol_list): Replace action, action_location, and
5674 used members with a code_props action_props member.
5675 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5676 grammar_midrule_action, grammar_current_rule_merge_set,
5677 grammar_current_rule_symbol_append, packgram): Update.
5678 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5679 * src/scan-code.l (handle_action_dollar): Update.
5680 (translate_rule_action): Remove, no longer used.
5681 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5682
7c0c6181
JD
56832007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5684
5685 Use the new code_props interface in parse-gram.y.
5686 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5687 Update all uses of translate_* functions to use the new code_props
5688 interface and to use gram_scanner_last_string_free and
5689 code_scanner_last_string_free where possible.
5690 (grammar_declaration): symbol_list_destructor_set and
5691 symbol_list_printer_set now perform the translation, so don't do it
5692 here. Use gram_scanner_last_string_free where possible.
5693 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5694 translate_code): Remove, no longer used.
5695 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5696 symbol_list_printer_set): Perform code translation here rather than
5697 depending on the caller to do so.
5698
5699 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5700 * src/scan-gram.h (gram_last_string): Remove declaration.
5701 * src/scan-gram.l (last_string): Declare it static.
5702
28e52c0d
JD
57032007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5704
5705 Encapsulate code properties and related functionality for the various
5706 destructors, printers, and actions into a code_props structure and
5707 interface. This patch merely implements code_props in scan-code.h and
5708 scan-code.l. Future patches will rewrite other modules to use it.
5709 Discussed starting at
5710 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5711 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5712 consistently initialize const structs that have an empty location
5713 field.
5714 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5715 to ensure consistency.
5716 * src/scan-code.h (code_props): New structure.
5717 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5718 function, macro, and const global variable for initializing a
5719 code_props with no code.
5720 (code_props_plain_init, code_props_symbol_action_init,
5721 code_props_rule_action_init, code_props_translate_code): The rest of
5722 the new code_props functional interface. Among other things, the init
5723 functions set the code_props kind field so that
5724 code_props_translate_code will know whether to behave like
5725 translate_symbol_action, translate_rule_action, or translate_code.
5726 These old translate functions must remain until all other modules are
5727 updated to use the new code_props interface.
5728 (code_scanner_last_string_free): New function similar to
5729 gram_scanner_last_string_free.
5730 (code_scanner_free): Add documentation.
5731 * src/scan-code.l: Implement the new interface.
5732 (code_lex): Make it static, add a code_props* argument, and remove the
5733 rule argument.
5734 (last_string): New static global similar to the one in scan-gram.l.
5735 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5736 instead of rule.
5737 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5738 code_props since Bison may one day use this information for destructors
5739 and printers.
5740 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5741 (handle_action_dollar): Use symbol_list_n_get and set used flag
5742 directly since symbol_list_n_used_set is removed.
5743 (translate_action): Add a code_props* argument and remove the rule,
5744 action, and location arguments. Pass the code_props* on to code_lex.
5745 (translate_rule_action, translate_symbol_action, translate_code):
5746 Rewrite as wrappers around the new code_props interface.
5747 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5748 it would eventually need to break the encapsulation of code_props.
5749
96034983
JD
57502007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5751
5752 * etc/.cvsignore: New.
5753
945e396c
JD
57542007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5755
5756 Add maintainer-push-check to run maintainer-check using push parsing in
5757 place of pull parsing where available.
5758 * Makefile.am (maintainer-push-check): New.
5759 * data/bison.m4 (b4_use_push_for_pull_if): New.
5760 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5761 appropriately based on their existing values.
5762 (yypush_parse): Don't print push-parser-specific diagnostics if push
5763 parsing is being used in place of pull parsing.
5764 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5765 push.c.
5766 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5767 variable, and insert b4_use_push_for_pull_flag into muscles.
5768 * tests/Makefile.am (maintainer-push-check): New.
5769
7d596384
JD
57702006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5771
5772 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5773 (whether successful or failed) so that yypush_parse can be invoked
5774 again to start a new parse using the same yypstate.
5775 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5776 check multiple yypull_parse invocations on the same yypstate. For pull
5777 mode, extend to check multiple yyparse invocations.
5778 (Exploding the Stack Size with Alloca): Extend to try with
5779 %push-pull-parser.
5780 (Exploding the Stack Size with Malloc): Likewise.
5781
5782 * tests/calc.at (Simple LALR Calculator): Don't specify
5783 %skeleton "push.c" since %push-pull-parser implies that now.
5784 * tests/headers.at (export YYLTYPE): Don't check for the push
5785 declarations. Otherwise, this test case can't be used to see if push
5786 mode can truly emulate pull mode.
5787 * tests/input.at (Torturing the Scanner): Likewise.
5788 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5789 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5790 AT_YACC_IF, which now includes the case of push mode since %skeleton
5791 need not be used for push mode. This will be more intuitive once
5792 push.c is renamed to yacc.c.
5793
7172e23e
JD
57942006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5795
5796 For push mode, convert yyparse from a macro to a function, invoke yylex
5797 instead of passing a yylexp argument to yypull_parse, and don't
5798 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5799 Discussed starting at
5800 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5801 * data/bison.m4 (b4_pull_if): New.
5802 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5803 * data/push.c: Improve M4 quoting a little.
5804 (b4_generate_macro_args, b4_parenthesize): Remove.
5805 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5806 any time a pull parser is requested.
5807 Don't #define this as a wrapper around yypull_parse. Instead, when
5808 both push and pull are requested, make it a function that does that
5809 same thing.
5810 (yypull_parse): If there's a b4_prefix, #define this to
5811 b4_prefix[pull_parse] when both push and pull are requested.
5812 Don't define this as a function unless both push and pull are
5813 requested.
5814 Remove the yylexp argument and hard-code yylex invocation instead.
5815 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5816 %push-parser.
5817 * src/getargs.c (pull_parser): New global initialized to true.
5818 * getargs.h (pull_parser): extern it.
5819 * src/output.c (prepare): Insert pull_flag muscle.
5820 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5821 (prologue_declaration): Set both push_parser and pull_parser = true for
5822 %push-pull-parser. Set push_parser = true and pull_parser = false for
5823 %push-parser.
5824 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5825 %push-parser since there's no backward-compatibility concern here.
5826 Scan %push-pull-parser.
5827 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5828 instead of %push-parser.
5829 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5830 prototype it in the module that calls yyparse.
5831 * tests/input.at (Torturing the Scanner): Likewise.
5832 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5833
2e7944cb
JD
58342006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5835
5836 Update etc/bench.pl. Optimize push mode a little (the yyn change
5837 deserves most of the credit).
5838 * Makefile.am (SUBDIRS): Add etc subdirectory.
5839 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5840 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5841 yytoken, yyval, and yyloc declarations to...
5842 (yyparse or yypush_parse): ... here to improve performance. For
5843 yypush_parse invocations after the first, be sure to assign yyn its old
5844 value again.
5845 (yypstate_new): Don't bother initializing the yyresult field since the
5846 initial value isn't used.
5847 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5848 remove the #define that, in push mode, set it to yyps->NAME.
5849 * etc/Makefile.am: New.
5850 * etc/bench.pl: Remove and build it instead from...
5851 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5852 "tests/bison" from the build directory by default rather than just
5853 invoking "bison" from $PATH.
5854 (calc_grammar): Update push parser code: don't declare yylval globally,
5855 don't define yyparse_wrapper, and don't #define yyparse.
5856 (bench_grammar): Update to check all working combinations of yacc.c,
5857 push.c, impure, pure, pull, and push.
5858
c3d50342
JD
58592006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5860
5861 For push mode, add pull wrappers around yypush_parse.
5862 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5863 (yypull_parse): New function wrapping yypush_parse.
5864 (yyparse): New #define wrapping yypull_parse.
5865 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5866 is declared.
5867 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5868 prototype yylex in the module that calls yyparse, and don't prototype
5869 yyparse there. Otherwise, the yyparse expansion won't compile.
5870 * tests/input.at (Torturing the Scanner): Likewise.
5871
94ebeba5
JD
58722006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5873
5874 Enable push parsers to operate in impure mode. Thus, %push-parser no
5875 longer implies %pure-parser. The point of this change is to move
5876 towards being able to test the push parser code by running the entire
5877 test suite as if %push-parser had been declared.
5878 * data/push.c (yypush_parse): For impure mode, remove the
5879 yypushed_char, yypushed_val, and yypushed_loc arguments.
5880 Instead, declare these as local variables initialized to the global
5881 yychar, yylval, and yylloc.
5882 For the first yypush_parse invocation only, restore the initial values
5883 of these global variables when it's time to read a token since they
5884 have been overwritten.
5885 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5886 %push-parser.
5887 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5888 %pure-parser along with %push-parser since this test case was designed
5889 for pure push parsers.
5890 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5891 (AT_YACC_OR_PUSH_IF): New.
5892 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5893 add a note that it's still wrong for some cases (as it has been for a
5894 while).
5895 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5896 %push-parser no longer implies %pure-parser.
5897
a0633178
JD
58982006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5899
5900 Remove some unnecessary differences between the pull parser code and
5901 the push parser code. This patch enables yynerrs in push mode.
5902 * data/push.c: Reformat M4 a little.
5903 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5904 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5905 because push mode is on. Instead, if pure mode is on, move yynerrs
5906 to...
5907 (b4_declare_parser_state_variables): ... here.
5908 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5909 to yyps->NAME so it can be used in yypush_parse.
5910 (yypush_parse): Don't omit uses of yynerrs in push mode.
5911
8646b6a3
JD
59122006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5913
5914 Fix bug such that the first pushed token's value and location are
5915 sometimes overwritten (sometimes by %initial-action) before being used.
5916 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5917 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5918 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5919 more closely mimic the pull parser logic.
5920 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5921 time to read a token, which is after any initialization of yylval and
5922 yylloc.
5923 (gottoken): Rename label to...
5924 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5925 user namespace.
5926
9baf4d74
JD
59272006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5928
5929 Rearrange initialization of the parser state variables so that the
5930 skeleton doesn't have to have a copy for pull mode and another for push
5931 mode. This patch also fixes at least a bug such that yylloc was not
5932 initialized (with b4_location_initial_line and
5933 b4_location_initial_column) upon calling yypush_parse. However, that
5934 initialization now overwrites the first token's location;
5935 %initial-action assigning @$ already did the same thing, and both bugs
5936 will be fixed in a later patch.
5937 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5938 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5939 yyss, yyvs, yyls, and yystacksize.
5940 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5941 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5942 yylsp.
5943 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5944 yyps->NAME so it can be used in yypush_parse.
5945 (yyparse or yypush_parse): For yypush_parse, don't print the
5946 "Starting parse" diagnostic for invocations after the first.
5947 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5948 yypush_parse, only do it for the first invocation.
5949 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5950 initialization to occur in yypush_parse but only on the first
5951 invocation.
5952
23522164
JD
59532006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5954
5955 * data/push.c: Add CPP guards around push parser declarations in both
5956 the header and the code file.
5957 In the code file, move the push parser declarations to the same place
5958 they appear in the header file.
5959 Clean up the M4 some, especially the inconsistent underquoting in
5960 some b4_c_function_def and b4_c_function_decl uses.
5961
bb010fe5
JD
59622006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5963
5964 Encapsulate the push parser state variables into an M4 macro so the
5965 push skeleton doesn't have to list them again for pull mode's yyparse.
5966 For push mode, remove yypush_parse's local equivalents of these
5967 variables to eliminate unnecessary copying between the two sets at
5968 run-time. This patch also fixes at least a bug related to multiple
5969 %initial-action invocations in push mode.
5970 * data/push.c (b4_declare_parser_variables): Rename to...
5971 (b4_declare_scanner_communication_variables): ... this for clarity and
5972 update both uses.
5973 (b4_declare_yyparse_variables): Remove and move its contents to the one
5974 spot where it was invoked.
5975 (b4_declare_parser_state_variables): New macro containing the parser
5976 state variables required by push mode.
5977 (struct yypstate): Replace all fields but yynew with
5978 b4_declare_parser_state_variables.
5979 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5980 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5981 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5982 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5983 parser state variable declarations with
5984 b4_declare_parser_state_variables.
5985 Don't initialize parser state variables when calling yypush_parse since
5986 yypstate_new already does that.
5987 Invoke the user's initial action only upon the first yypush_parse
5988 invocation.
5989 Remove all code that copies between the local parser state variables
5990 and the yypstate.
5991
2d212f8c
JD
59922006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5993
5994 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5995 prevent a name collision in a future patch where these names will
5996 sometimes be #define'd.
5997 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5998 since it no longer has the same name as the existing argument.
5999 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6000
e6e704dc
JD
60012006-12-19 Paolo Bonzini <bonzini@gnu.org>
6002 and Joel E. Denny <jdenny@ces.clemson.edu>
6003
6004 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6005 that the argument is case-insensitive, and there's no `=' here.
6006 For the %skeleton entry, mention that %language is better.
6007 (Bison Options): Likewise for --language and --skeleton. Move the
6008 --skeleton entry so that the `Tuning the parser' section is sorted
6009 alphabetically on long options.
6010 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6011 %language directive in detail here; cross-reference the %language
6012 documentation instead.
6013 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6014 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 6015 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
6016 * examples/extexi (normalize): Instead of replacing every %require
6017 argument with the current Bison version, just substitute for
6018 `@value{VERSION}'. This guarantees that we're testing what actually
6019 appears in the documentation.
6020 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6021 rather than `@VERSION@'.
6022
0e021770
PE
60232006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6024
fd575f05
PE
6025 * NEWS: Reword the %language news a bit, and put it earlier.
6026
0e021770
PE
6027 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6028 Rewrite to simplify the logic.
6029 (language_argmatch): Likewise.
fd575f05
PE
6030 (program_name): We now own this var.
6031 * src/getargs.h (struct bison_language): Use char[] rather than
6032 const char *.
0e021770
PE
6033
6034 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6035 Java is supported.
6036 * src/complain.c (program_name): Remove decl; no longer needed.
6037 * src/main.c (program_name): Remove; now belongs to getargs.
6038
60392006-12-18 Paolo Bonzini <bonzini@gnu.org>
6040
6041 * NEWS: Document %language.
6042
6043 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6044
6045 * data/c-skel.m4, data/c++-skel.m4: New files.
6046 * data/glr.c: Complain on push parsers.
6047
6048 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6049 over %skeleton.
148d66d8 6050 (Decl Summary): Document %language and %skeleton.
0e021770
PE
6051 (Command line): Document -L.
6052
6053 * examples/extexi: Rewrite %require directive.
6054 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6055
6056 * src/files.c (compute_exts_from_gc): Look in language structure
6057 for .y extension.
6058 (compute_file_name_parts): Check whether .tab should be added.
6059 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6060 (language, skeleton_arg, language_argmatch): New.
6061 (long_options): Add --language.
6062 (getargs): Use skeleton_arg, add -L/--language.
6063 * src/getargs.h: Include location.h.
6064 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6065 * src/output.c (prepare): Pick default skeleton from struct language.
6066 Don't dispatch C skeletons here.
6067 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6068 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6069 * src/scan-gram.l ("%language"): New rule.
6070
6071 * tests/calc.at: Test %skeleton and %language.
6072 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6073 (AT_GLR_IF): Look for %skeleton "glr.cc".
6074 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6075 (AT_YACC_IF): Reject %language.
6076
5691bf57
PE
60772006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6078
db06f0ce
PE
6079 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6080 since it wasn't used; only the typedef name 'semantic_type' is needed.
6081 Also, omit trailing white space.
6082
5691bf57
PE
6083 * bootstrap: Sync from coreutils.
6084 (gnulib_extra_files): Add build-aux/announce.gen.
6085 (slurp): Adjust .gitignore files like .cvsignore files.
6086 * build-aux/announce-gen: Remove from CVS, since bootstrap
6087 now creates this.
6088
791934e4
JD
60892006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6090
6091 Make %push-parser imply %pure-parser. This fixes several bugs; see
6092 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6093 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6094 pure_parser = true.
6095 * data/push.c: Don't bother testing b4_push_if when deciding whether
6096 to expand b4_declare_parser_variables globally.
6097 (yypush_parse): Likewise in here.
6098
6099 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6100 (yy_reduce_print): Reformat M4 for readability.
6101
ee5abb37
JD
61022006-12-15 Bob Rossi <bob@brasko.net>
6103 and Joel Denny <jdenny@ces.clemson.edu>
6104
6105 * data/push.c (yypstate): Add typedef, and update all uses of
6106 struct yypstate to just yypstate.
6107 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6108
16ca01f9
JD
61092006-12-14 Bob Rossi <bob@brasko.net>
6110
6111 * data/push.c (yypush_parse): Declare prototype regardless of
6112 %locations option.
6113
ab8e7e1a
JD
61142006-12-14 Bob Rossi <bob@brasko.net>
6115
6116 * data/push.c (yyparse): Remove the prototype and the #define when in
6117 push-parser mode.
6118
9bf32be3
JD
61192006-12-13 Bob Rossi <bob@brasko.net>
6120
6121 * data/push.c (yypstate_init): Rename to...
6122 (yypstate_new): ... this and use b4_c_function_def.
6123 (yypstate_delete): New.
6124 (yypush_parse): Change parameters yynval and yynlloc to be const.
6125 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6126 yypstate_delete functions.
6127
f02e2948
JD
61282006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6129
6130 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6131 strange test case titles. Reported by Bob Rossi.
6132
38eb7751
PE
61332006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6134
6135 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6136 of potential ambiguities in GLR grammers.
6137
bd9d212b
JD
61382006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6139
6140 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6141 `bison ', use m4_index instead of m4_substr since chopping up a string
6142 containing M4-special characters causes problems here.
6143
6144 Fix a couple of bugs related to special characters in user-specified
6145 file names, and make it easier for skeletons to compute output file
6146 names with the same file name prefix as Bison-computed output file
6147 names.
6148 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6149 b4_parser_file_name and b4_spec_defines_file instead of
6150 @output_parser_name@ and @output_header_name@, which are now redundant.
6151 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6152 b4_parser_file_name, b4_spec_defines_file, and the new
6153 @basename(FILENAME@) instead of @output_parser_name@ and
6154 @output_header_name@, which inappropriately escaped the file names as
6155 C string literals.
6156 * src/files.c (all_but_ext): Remove static qualifier.
6157 (compute_output_file_names): Move `free (all_but_ext)' to...
6158 (output_file_names_free): ... here since all_but_ext is needed later.
6159 * src/files.h (all_but_ext): Extern.
6160 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6161 exactly what MUSCLE_INSERT_STRING used to do.
6162 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6163 characters are escaped properly.
6164 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6165 all_but_ext.
6166 For pkgdatadir muscle, maintain previous functionality by using
6167 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6168 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6169 digraphs would never be expanded. Hopefully no one has M4-special
6170 characters in his Bison installation path.
6171 * src/scan-skel.l: Don't parse @output_header_name@ and
6172 @output_parser_name@ anymore since they're now redundant.
6173 In @output, use decode_at_digraphs.
6174 Parse a new @basename command that invokes last_component.
6175 (decode_at_digraphs): New.
6176 (BASE_QPUTS): Remove unused.
6177 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6178 (Output file name): New tests.
6179
3f7ca628
JD
61802006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6181
6182 Warn about output files that are generated by the skeletons and that
6183 conflict with other output files.
6184 * data/glr.c: Don't generate the header file here when glr.cc does.
6185 * src/files.c (file_names, file_names_count): New static globals.
6186 (compute_output_file_names): Invoke output_file_name_check for files
6187 not generated by the skeletons and remove existing checks.
6188 (output_file_name_check): New function that warns about conflicting
6189 output file names.
6190 (output_file_names_free): Free file_names.
6191 * src/files.h (output_file_name_check): Declare.
6192 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6193 the skeletons.
6194 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6195 (Conflicting output files): New tests.
6196
178e123e
PE
61972006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6198
6199 * doc/bison.texinfo: Fix a couple of typos.
6200
62012006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
6202
6203 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6204 Rename to...
6205 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6206 update all uses.
6207 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6208 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6209 local pv.
6210 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6211 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6212
ea17f233
JD
62132006-12-07 Bob Rossi <bob@brasko.net>
6214 and Joel Denny <jdenny@ces.clemson.edu>
6215
6216 * data/push.c (yypvarsinit): Change return type from void* to struct
6217 yypvars*. No longer cast to void* on return.
6218 (struct yypvars): Remove yylen since it need not be remembered between
6219 yypushparse invocations.
6220 (yypushparse): Don't copy between yylen and pv->yylen.
6221
55a30bda
JD
62222006-12-05 Bob Rossi <bob@brasko.net>
6223
6224 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6225 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6226 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6227 (struct yypvars): Remove b4_declare_parser_variables.
6228 (yypvarsinit): Remove init code for removed variables.
6229 (global scope): Do not declare b4_declare_parser_variables if
6230 push or pure mode.
6231 (yypushparse): Add b4_declare_parser_variables.
6232 Init new local variables, and remove init code for removed
6233 yypvars variables.
6234 (yyparse): Delete.
6235 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6236 and yyparse for other modes.
6237 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6238 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6239 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6240 (AT_PURE_LEX_IF): True if pure or push parser.
6241
85894313
JD
62422006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6243
6244 Document Yacc prologue alternatives and default %destructor's and
6245 %printer's as experimental. Don't mention Java yet. Discussed at
6246 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6247 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6248 (2.3a): Annotate this entry to say the old forms of these features were
6249 also experimental.
6250 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 6251 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
6252 of Java (we'll want this back eventually).
6253
02975b9a
JD
62542006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6255
6256 Support a file name argument to %defines. Deprecate `=' in
6257 %file-prefix, %name-prefix, and %output. Discussed at
6258 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6259 * NEWS (2.3a+): Mention.
148d66d8 6260 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
6261 form of %defines, and remove `=' from entries for %file-prefix,
6262 %name-prefix, and %output.
6263 * src/parse-gram.y (prologue_declaration): Implement.
6264 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6265 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6266 all but one occurrence of %name-prefix.
6267 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6268 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6269 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6270 occurrence of each of %file-prefix and %output. Add check for %defines
6271 with argument.
6272 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6273 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6274 Remove the `=' from %output.
6275
287b314e
JD
62762006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6277
6278 Don't escape $ in test case titles since Autoconf 2.61 now does that
6279 correctly.
6280 * tests/actions.at (Default %printer and %destructor are not for error
6281 or $undefined): Here.
6282 (Default %printer and %destructor are not for $accept): Here.
6283 * tests/input.at (Invalid $n and @n): Here.
6284
3ebecc24
JD
62852006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6286
6287 Rename <!> to <>. Discussed starting at
6288 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6289 * NEWS (2.3a+): Update.
148d66d8 6290 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
6291 Update.
6292 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6293 * src/scan-gram.l (INITIAL): Implement.
6294 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6295 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6296 comment.
6297 * tests/actions.at (Default tagless %printer and %destructor,
6298 Default tagged and per-type %printer and %destructor,
6299 Default %printer and %destructor are not for error or $undefined,
6300 Default %printer and %destructor are not for $accept,
6301 Default %printer and %destructor for mid-rule values): Update.
6302 * tests/input.at (Default %printer and %destructor redeclared,
6303 Unused values with default %destructor): Update.
6304
26b8a438
JD
63052006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6306
6307 Don't let %prec take a nonterminal.
6308 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6309 token.
6310 * tests/input.at (%prec takes a token): New test checking that %prec
6311 won't take a nonterminal.
6312
07c39ae9
JD
63132006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6314
405d53b7
JD
6315 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6316 it was double-quoted.
07c39ae9
JD
6317 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6318 grammar is maintained with Bison's highest standards.
6319 * src/getargs.c: Fix some typos in Doxygen comments.
6320
580b8926
JD
63212006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6322
6323 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6324 later. Reported by Paul Eggert in
6325 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6326 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6327 * src/scan-code.l (translate_action): Don't bother invoking
6328 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6329 (code_scanner_free): Instead of invoking
6330 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6331 which frees more.
6332 * src/scan-gram.l (gram_scanner_free): Likewise.
6333 * src/scan-skel.l (scan_skel): Likewise.
6334
4502eadc
JD
63352006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6336
6337 * src/files.c (tr): Change return type to void.
6338 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6339 has been called previously for the same key.
6340 (muscle_find): Return storage instead of value so that
6341 --enable-gcc-warnings doesn't produce warnings that the return discards
6342 const. aver that the value and storage are the same since storage
6343 could potentially be NULL when value is not.
6344 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6345 same as 0.
6346
7746c8f6
PE
63472006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6348
6349 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6350 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6351 us a slightly cleaner distribution, and also works.
6352 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6353 gnulib changes.
6354
eb095650
PE
63552006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6356 and Paul Eggert <eggert@cs.ucla.edu>
6357
6358 Don't let Bison leak memory except when it complains.
6359 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6360 (spec_defines_file, dir_prefix): Now char *, not const char *,
6361 since they are freed.
6362 * src/files.c: Likewise.
6363 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6364 Likewise.
6365 (tr): Now operates in-place. All uses changed.
6366 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6367 values.
6368 (compute_file_name_parts, compute_output_file_names): Don't store
6369 read-only data in variables that will be freed.
6370 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6371 src_extension, and header_extension.
6372 (output_file_names_free): New public function to free
6373 spec_verbose_file, spec_graph_file, spec_defines_file,
6374 parser_file_name, and dir_prefix.
6375 * src/getargs.c (getargs): Don't store read-only data in variables that
6376 will be freed.
6377 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6378 (which previously existed but was unused), and quotearg_free.
6379 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6380 * src/muscle_tab.c: Likewise.
6381 (muscle_entry): Make the value char const *,
6382 and add a new storage member that is char * and can be freed.
6383 (muscle_entry_free): New private function.
6384 (muscle_init): Use it instead of free.
6385 (muscle_insert, muscle_grow): Update and use new storage member.
6386 (muscle_code_grow): Free the string passed to muscle_grow
6387 since it's not needed anymore.
6388 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6389 add a new `char *code' member.
6390 ("{...}"): Declare semantic type as code.
6391 * src/scan-code.h (translate_rule_action):
6392 (translate_symbol_action, translate_code, translate_action): Return
6393 `char const *' rather than `char *' since external code should not free
6394 these strings.
6395 * src/scan-code.l: Likewise.
6396 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6397 which is "{...}" in the parser.
6398 * tests/Makefile.am (maintainer-check-valgrind): Set
6399 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6400 Valgrind.
6401 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6402 complain.
6403 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6404 expecting a non-zero exit status sets --leak-check=summary and
6405 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6406 this case, and we don't want to hear about it.
6407
ac564be4
PE
64082006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6409
6410 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6411 instead of from the template, to simplify configuration a bit.
6412 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6413 and m4/wint_t.m4, as they are needed with the latest gnulib.
6414
17bd8a73
JD
64152006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6416
6417 Disable unset/unused mid-rule value warnings by default, and recognize
6418 --warnings=midrule-values to enable them. Discussed starting at
6419 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6420 * NEWS (2.3a+): Mention.
6421 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6422 warnings): Add entry for midrule-values subargument.
6423 * src/reader.c (symbol_should_be_used): Don't return true just because
6424 the value is a set/used mid-rule value unless
6425 --warnings=midrule-values was specified.
6426 * tests/input.at (Unused values, Unused values before symbol
6427 declarations): Run tests with and without --warnings=midrule-values.
6428
6429 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6430 than LIST_FREE directly.
6431
89eb3c76
JD
64322006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6433
6434 Finish implementing --warnings=error, which should not be implied by
6435 --warnings=all (or by its synonyms -W and --warnings without
6436 subarguments).
6437 * src/complain.c (set_warning_issued): New function to report that
6438 warnings are being treated as errors and to record an error if so.
6439 Invoke...
6440 (warn_at, warn): ... here.
6441 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6442 "error - warnings are errors" does not appear above "all - all of the
6443 above".
6444 (getargs): For -W and --warnings without subarguments, don't let
6445 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6446 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6447
ba7560e2
JD
64482006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6449
6450 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6451 empty subargument list. For example: `bison --warnings= parser.y'.
6452
31283fc3
JD
64532006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6454
6455 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6456 the parser header file so that gcc doesn't warn.
6457
12e35840
JD
64582006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6459
6460 Split the default %destructor/%printer into two kinds: <*> and <!>.
6461 Discussed starting at
6462 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6463 * NEWS (2.3a+): Mention.
6464 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6465 previous change today related to mid-rules.
148d66d8 6466 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 6467 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
6468 (TYPE_TAG_ANY): Add as <*>.
6469 (TYPE_TAG_NONE): Add as <!>.
6470 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6471 for <*> and <!>.
6472 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6473 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6474 * src/symlist.c (symbol_list_default_new): Split into tagged and
6475 tagless versions.
6476 (symbol_list_destructor_set, symbol_list_printer_set): Split
6477 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6478 SYMLIST_DEFAULT_TAGLESS.
6479 * src/symlist.h: Update symbol_list_default*_new prototypes.
6480 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6481 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6482 * src/symtab.c (default_destructor, default_destructor_location,
6483 default_printer, default_printer_location): Split each into tagged and
6484 tagless versions.
6485 (symbol_destructor_get, symbol_destructor_location_get,
6486 symbol_printer_get, symbol_printer_location_get): Implement tagged
6487 default and tagless default cases.
6488 (default_destructor_set, default_printer_set): Split each into tagged
6489 and tagless versions.
6490 * src/symtab.h: Update prototypes.
6491 * tests/actions.at (Default %printer and %destructor): Rename to...
6492 (Default tagless %printer and %destructor): ... this, and extend.
6493 (Per-type %printer and %destructor): Rename to...
6494 (Default tagged and per-type %printer and %destructor): ... this, and
6495 extend.
6496 (Default %printer and %destructor for user-defined end token): Extend.
6497 (Default %printer and %destructor are not for error or $undefined):
6498 Update.
6499 (Default %printer and %destructor are not for $accept): Update.
6500 (Default %printer and %destructor for mid-rule values): Extend.
6501 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6502 (Unused values with default %destructor): Extend.
6503
f91b1629
JD
65042006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6505
6506 Don't apply the default %destructor/%printer to an unreferenced midrule
6507 value. Mentioned at
6508 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6509 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6510 like $@n instead of just @n so that the default %destructor/%printer
6511 logic doesn't see them as user-defined symbols.
6512 (symbol_is_dummy): Check for both forms of the name.
6513 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6514 name for which the midrule value is referenced in any action.
6515 * tests/actions.at (Default %printer and %destructor for mid-rule
6516 values): New test.
6517 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6518 for change to dummy symbol names.
6519
519d0004
JD
65202006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6521
6522 Warn about unset midrule $$ if the corresponding $n is used.
6523 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6524 $n usage.
6525 (packgram): Before invoking grammar_rule_check on any rule, make sure
6526 all actions have already been scanned in order to set `used' flags.
6527 Otherwise, checking that a midrule's $$ is set will not always work
6528 properly because the midrule check must forward-reference the midrule's
6529 parent rule.
6530 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6531 warning.
6532
a501eca9
JD
65332006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6534
6535 More improvements to the documentation of the prologue alternatives:
6536 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6537 Bison manual.
6538 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6539 some text to clarify the relative importance of the new directives and
6540 to show how these directives may be viewed as code labels.
6541
2cbe6b7f
JD
65422006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6543
6544 Similar to the recently removed %before-header, add %code-top as the
6545 alternative to the pre-prologue. Mentioned at
6546 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6547 Also, let the prologue alternatives appear in the grammar section.
6548 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6549 (prologue_declaration): Move the existing prologue alternatives to...
6550 (grammar_declaration): ... here and add %code-top.
6551 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6552
6553 Clean up and extend documentation for the prologue alternatives.
6554 * NEWS (2.3a+): Describe prologue alternatives.
6555 * doc/bison.texinfo (Prologue): Move discussion of prologue
6556 alternatives to...
6557 (Prologue Alternatives): ... this new section, and extend it to discuss
6558 all 4 directives in detail.
148d66d8
JD
6559 (Table of Symbols): Clean up discussion of prologue alternatives and
6560 add %code-top.
2cbe6b7f 6561
e557d3ea
JMG
65622006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6563
6564 DJGPP specific issues.
6565
6566 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6567 config.bat accordingly.
6568 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6569 * djgpp/config.site: Likewise.
6570
136a0f76
PB
65712006-10-16 Paolo Bonzini <bonzini@gnu.org>
6572
27bd5d67
PB
6573 Replace %*-header with %provides, %requires, %code. See discussion at
6574 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6575
136a0f76
PB
6576 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6577 (b4_user_start_header): Remove.
6578 * data/glr.c: Use new macros instead of b4_*start_header
6579 and b4_*end_header.
6580 * data/glr.cc: Likewise.
6581 * data/lalr1.cc: Likewise.
6582 * data/push.c: Likewise.
6583 * data/yacc.c: Likewise.
6584
6585 * doc/bison.texinfo: Remove %before-header, rename
6586 %{start,end,after}-header to %requires, %provides, %code.
6587
6588 * src/parse-gram.y: Likewise (also rename token names accordingly).
6589 * src/scan-gram.l: Likewise.
6590 * tests/actions.at: Likewise.
6591
10f429ef
PE
65922006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6593
6594 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6595 Problem reported by Joel E. Denny.
6596
65972006-10-14 Jim Meyering <jim@meyering.net>
6598
6599 (Sync from coreutils.)
6600 Work also when the working directory (with e.g. coreutils sources)
6601 is version controlled with git, rather than CVS.
6602 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6603 rather than CVS.
6604 In messages and comments, say e.g., "checked-out sources",
6605 rather than "CVS sources".
6606 (version_controlled_file): New function. Work for git as well as
6607 for CVS. Don't use grep's -q option.
6608 (slurp): Call it here, in place of CVS-specific code.
6609
c4bd5bf7
JD
66102006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6611
6612 Fix testsuite for ./configure --enable-gcc-warnings:
6613 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6614 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6615 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6616 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6617 * test/regression.at (Diagnostic that expects two alternatives):
6618 Likewise.
6619
46356ea4
PE
66202006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6621
231ed89a
PE
6622 * bootstrap.conf (gnulib_modules): Add config-h.
6623 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6624 worry about HAVE_CONFIG_H.
6625 * lib/abitset.c: Likewise.
6626 * lib/bitset.c: Likewise.
6627 * lib/bitset_stats.c: Likewise.
6628 * lib/bitsetv-print.c: Likewise.
6629 * lib/bitsetv.c: Likewise.
6630 * lib/ebitset.c: Likewise.
6631 * lib/get-errno.c: Likewise.
6632 * lib/lbitset.c: Likewise.
6633 * lib/subpipe.c: Likewise.
6634 * lib/timevar.c: Likewise.
6635 * lib/vbitset.c: Likewise.
6636 * lib/bitset.c: Include "bitset.h" first, to test interface.
6637 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6638 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6639 * lib/bitsetv.c: Include "bitsetv.h" first.
6640 * lib/get-errno.c: Include "get-errno.h" first.
6641 * m4/.cvsignore: Add config-h.m4.
6642 * tests/actions.at (Default %printer and %destructor for ...):
6643 Adjust expected line numbers in output to reflect removal of #if
6644 HAVE_CONFIG_H lines.
6645 * tests/glr-regression.at (Missed %merge type warnings when ...):
6646 Likewise.
6647 * tests/regression.at (Braced code in declaration in rules section):
6648 Likewise.
6649 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6650 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6651 Include <config.h> unconditionally.
6652
46356ea4
PE
6653 * bootstrap: Sync from coreutils, as follows:
6654
6655 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6656
6657 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6658 variable was sometimes used without being initialized. This
6659 messed up the installation of the INSTALL file in some cases.
6660
6661 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6662
6663 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6664 --copy. Inspired by a suggestion from Bruno Haible.
6665
6666 2006-10-03 Jim Meyering <jim@meyering.net>
6667
6668 * bootstrap: Undo last change to this file, since now gnulib-tool
6669 sticks with the automake default in generating dependencies.
6670
dd4bf078
PE
66712006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6672
cf2a5f7c
PE
6673 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6674 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6675
6676 * doc/bison.1: Add copyright notice.
6677
6678 * data/glr.c: Don't include <stdarg.h>; not used.
6679
35fe0834
PE
6680 * NEWS: The -g and --graph options now output graphs in Graphviz
6681 DOT format, not VCG format.
6682 * doc/bison.1: Likewise.
6683 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
6684 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6685 of this change in
6686 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
6687 * TODO: Remove Graphviz entry.
6688 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6689 remove vcg.c, vcg.h, vcg_defaults.h.
6690 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6691 * src/graphviz.c, src/graphviz.h: New files.
6692 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6693 * src/files.h: Make comment more generic.
6694 * src/main.c (main): Likewise.
6695 * src/print_graph.h: Likewise.
6696 * src/getargs.c (usage): Make usage description more generic.
6697 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6698 (static_graph, fgraph): Remove. All uses changed to pass
6699 arguments instead of sharing a static var.
6700 (print_core, print_actions, print_state, print_graph):
6701 Output graphviz format rather than VCG format.
6702 * tests/.cvsignore: Remove *.vcg; add *.dot.
6703 * tests/output.at: Expect *.dot files, not *.vcg files.
6704
dd4bf078
PE
6705 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6706 accommodates the 2006-10-08 change.
6707
efdd7421
PE
67082006-10-11 Bob Rossi <bob@brasko.net>
6709
6710 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6711 (b4_yyssa, b4_yyerror_range): New macros.
6712 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6713 (yypvarsinit): Remove init of removed fields.
6714 (yypushparse): Remove use of removed fields; use new macros instead.
6715
96a1981a
PE
67162006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6717
6718 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6719 in a push parser. Reindent slightly to match yacc.c better.
6720
67212006-10-11 Bob Rossi <bob@brasko.net>
6722
46356ea4
PE
6723 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6724 yymsg_alloc fields.
6725 (yypvarsinit, yypushparse): Remove init of removed fields.
6726 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 6727
c1630a8b
PE
67282006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6729
6730 * THANKS: Add Paolo Bonzini and Bob Rossi.
6731
90b9908d
PB
67322006-10-08 Paolo Bonzini <bonzini@gnu.org>
6733
6734 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6735 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6736 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6737 b4_define_user_cde and uses): Remove.
6738 (b4_comment, b4_prefix, b4_sync_start): New.
6739 * data/bison.m4: New file, with most of the content removed from c.m4.
6740 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6741 * src/output.c (output_skeleton): Pass bison.m4.
6742 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6743 only if specified.
6744
cf806753
PE
67452006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6746
6747 Fix test failure reported by Tom Lane in
6748 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6749 and try to make such failures easier to catch in the future.
6750 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6751 that's now the caller's responsibility.
6752 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6753 Set yychar = YYEOF if it's negative.
6754 * tests/actions.at (yylex): Abort if asked to read past EOF.
6755 * tests/conflicts.at (yylex): Likewise.
6756 * tests/cxx-type.at (yylex): Likewise.
6757 * tests/glr-regression.at (yylex): Likewise.
6758 * tests/input.at (yylex): Likewise.
6759 * tests/regression.at (yylex): Likewise.
6760 * tests/torture.at (yylex): Likewise.
6761
0e2f006a
PE
67622006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6763
6764 Fix problems with translating English-language diagnostics.
6765 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6766 respect to bison-runtime pot generation. The YY_ stuff
6767 wasn't being captured.
6768 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6769 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6770 * runtime-po/POTFILES.in: Add data/push.c.
6771
e3ddc1e3
PE
67722006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6773
6774 Merge bootstrap changes from coreutils.
6775
6776 2006-09-28 Jim Meyering <jim@meyering.net>
6777
6778 Automatically generated dependencies are important even
6779 when all of the sources in a directory come from gnulib.
6780 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6781 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6782
6783 2006-09-23 Jim Meyering <jim@meyering.net>
6784
6785 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6786
6787 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6788
6789 * bootstrap: Add support for --force.
6790 (usage): New function. Describe usage less tersely.
6791 (CVS_only_file): New var.
6792
01e972b3
PE
67932006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6794
6795 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6796 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6797 Adjust white space and comments to match GNU style better.
6798
c63d3e90
PE
67992006-09-20 Bob Rossi <bob@brasko.net>
6800
6801 * data/push.c (yyresult_get): Remove function.
6802 (YYPUSH_MORE): Add #define.
6803 (yypushparse): Modify return value.
6804
e70f46d1
PE
68052006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6806
6807 * stamp-h.in: Remove; no longer needed.
6808 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6809 Remove config.h, config.hin, intl (no longer created).
6810 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6811 stamp-h1.
6812
6813 Sync bootstrap from coreutils, as follows:
6814
6815 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6816
6817 * bootstrap (symlink_to_gnulib): New function.
6818 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6819 to copies-of-gnulib.
6820 (cp_mark_as_generated, slurp, gnulib_files):
6821 Avoid making a copy if it's the same as the old version.
6822 (gnulib_files): Add support for this variable (used by Bison).
6823
a92be413
PE
68242006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6825
6826 * src/getargs.c (usage): Rework to use conventions similar to
6827 coreutils, to make translation a bit easier and the code a bit
6828 smaller. Problem reported by Tim Van Holder.
6829
4f82b42a
PE
68302006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6831
3b2942e6
PE
6832 Use some of gnulib's new modules, taken from coreutils.
6833
6834 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6835 * bootstrap.conf: New file.
6836 (gnulib_modules): Add configmake, inttypes, unistd.
6837 (XGETTEXT_OPTIONS): Add complain, complain_at,
6838 fatal, fatal_at, warn, warn_at, unexpected_end.
6839 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6840 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6841 (gl_EARLY): Add.
6842 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6843 (gl_INIT): Add
6844 (GNULIB_AUTOCONF_SNIPPET): Remove.
6845 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6846 the pickiest.
6847 * lib/.cvsignore: Add inttypes_.h.
6848 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6849 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6850 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6851 no-longer-necessary initializations.
6852 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6853 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6854 use the unistd module.
6855 * src/system.h: Likewise.
6856 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6857 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6858 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6859 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6860 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6861 * src/system.h: Include inttypes.h unconditionally, now that we
6862 use the inttypes module. Don't bother to include stdint.h, since
6863 inttypes.h now does that for us.
6864 (LOCALEDIR): Remove, now that we use the configmake module.
6865 * src/getargs.c: Include configmake.h.
6866 * src/main.c: Likewise.
6867 * src/output.c: Likewise.
6868 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6869 not from $abs_top_builddir, since config.h moved.
6870
6871
4f82b42a
PE
6872 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6873 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6874
6875 * src/parse-gram.y (symbol_declaration): Don't put statements
6876 before declarations; it's not portable to C89.
6877 * src/scan-code.l (handle_action_at): Likewise.
6878
6879 * src/scan-code.l: Always initialize braces_level; the old code
6880 left it uninitialized and therefore had undefined behavior.
6881
6882 Don't attempt to redefine 'assert', since it runs afoul of
6883 systems where standard headers (mistakenly) include <assert.h>.
6884 Instead, define and use our own alternative, called 'aver'.
6885 * src/reader.c: Don't include assert.h, since we no longer
6886 use assert.
6887 * src/scan-code.l: Likewise.
6888 * src/system.h (assert): Remove, replacing with....
6889 (aver): New function, taking a bool arg. All uses changed.
6890 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6891 not merely an integer.
6892
31c10e38
PE
68932006-09-15 Bob Rossi <bob@brasko.net>
6894
e5926647
JD
6895 Add support for push parsing. Based on the original work of
6896 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
6897 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6898 * data/c.m4 (YYPUSH): New.
6899 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
e5926647 6900 * data/push.c: New file.
31c10e38
PE
6901 * src/getargs.c (push_parser): New var.
6902 * src/getargs.h (push_parser): New declaration.
6903 * src/output.c (prepare): Add macro insertion of `push_flag'.
6904 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6905 (prologue_declaration): Parse %push-parser.
6906 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6907 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6908 list of removed lines from the traces observed.
6909 (AT_CHECK_CALC_LALR): Added push parser tests.
6910
fa7b79c0
PE
69112006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6912
21fe08ca
PE
6913 * NEWS: Version 2.3a.
6914 * configure.ac (AC_INIT): Likewise.
6915
e8ec4d9b
PE
6916 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6917 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6918 due to header ordering dependencies. I don't know why the #define
6919 was there.
6920
fa7b79c0
PE
6921 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6922 runtime cost when YYDEBUG is not defined, and so that some tests
6923 that used to fail now work. Problem and initial suggestion by
6924 Paolo Bonzini.
6925 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6926 * data/glr.cc (b4_parser_class_name):
6927 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6928 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6929 (yydebug_) [YYDEBUG]: New member.
6930 (yycdebug_): Now defined only if YYDEBUG.
6931 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6932 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6933 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6934 if YYYDEBUG.
6935 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6936 Define only if YYDEBUG.
6937 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6938 set_debug_level.
6939 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6940 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6941 AT_CHECK_CALC_GLR_CC that are working now.
6942
4ec13d60
PE
69432006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6944
6945 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6946 We don't need them in glr.cc, and glr.c defines them.
6947 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6948 assumes that defining it to anything is the same as defining
6949 it to 1. Problem reported by Paolo Bonzini.
6950
8e1687ae
PE
69512006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6952
6953 * data/c.m4 (b4_null, b4_case): Define.
6954 * src/output.c (prepare_symbols): Use b4_null.
6955 (user_actions_output): Use b4_case.
6956
3dc5e96b
PE
69572006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6958
aef3da86
PE
6959 * data/glr.c (b4_shared_declarations): Put start-header first,
6960 before any #includes that we generate, so that feature-test
6961 macros work. Problem reported by Michael Deutschmann in
6962 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6963 * data/lalr1.cc: Likewise.
6964 * doc/bison.texinfo (Prologue): Document that feature-test macros
6965 should be defined before any Bison declarations.
6966 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6967 that depend on location.hh after, not before, Bison decls, since
6968 we now include location.hh after the first user prologue.
6969
3dc5e96b
PE
6970 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6971 Sander Brandenburg in
6972 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6973 Also, fix minor white space and comment issues.
aef3da86
PE
6974 (Prologue): Mention that it's better to define feature-test macros
6975 before Bison declarations. Problem reported by Michael Deutschmann.
6976
6977 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6978 by Jim Meyering.
6979 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6980 This adjusts to recent gnulib changes.
3dc5e96b 6981
b2a0b7ca
JD
69822006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6983
6984 Finish implementation of per-type %destructor/%printer. Discussed
6985 starting at
6986 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6987 and
6988 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6989 * NEWS (2.3+): Add a description of this feature to the default
6990 %destructor/%printer description.
6991 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6992 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6993 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6994 list node contains a semantic type.
6995 * src/symtab.c, src/symtab.h: Extend with a table that associates
6996 semantic types with their %destructor's and %printer's.
6997 (semantic_type_from_uniqstr, semantic_type_get,
6998 semantic_type_destructor_set, semantic_type_printer_set): New functions
6999 composing the public interface of that table.
7000 (symbol_destructor_get, symbol_destructor_location_get,
7001 symbol_printer_get, symbol_printer_location_get): If there's no
7002 per-symbol %destructor/%printer, look up the per-type before trying
7003 the default.
7004 * tests/actions.at (Per-type %printer and %destructor): New test case.
7005 * tests/input.at (Default %printer and %destructor redeclared):
7006 Extend to check that multiple occurrences of %symbol-default in a
7007 single %destructor/%printer declaration is an error.
7008 (Per-type %printer and %destructor redeclared, Unused values with
7009 per-type %destructor): New test cases.
7010
3be03b13
JD
70112006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7012
7013 Require default %destructor/%printer to be declared using
7014 %symbol-default instead of an empty symbol list, and start working on
7015 new per-type %destructor/%printer. Discussed at
7016 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7017 * NEWS (2.3+): Add %symbol-default to example.
7018 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 7019 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
7020 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7021 (generic_symlist, generic_symlist_item): New nonterminals for creating
7022 a list in which each item is a symbol, semantic type, or
7023 %symbol-default.
7024 (grammar_declaration): Use generic_symlist in %destructor and %printer
7025 declarations instead of symbols.1 or an empty list.
7026 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7027 for changes to symbol_list.
7028 * src/reader.c: Update for changes to symbol_list.
7029 * src/scan-code.l: Likewise.
7030 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7031 * src/symlist.c, src/symlist.h: Extend such that a list node may
7032 represent a semantic type or a %symbol-default in addition to just an
7033 ordinary symbol. Add switched functions for setting %destructor's and
7034 %printer's.
7035 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7036 %destructor/%printer declarations.
7037
3508ce36
JD
70382006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7039
7040 Whether the default %destructor/%printer applies to a particular symbol
7041 isn't a question of whether the user *declares* that symbol (in %token,
7042 for example). It's a question of whether the user by any means
7043 *defines* the symbol at all (by simply using a char token, for
7044 example). $end is defined by Bison whereas any other token with token
7045 number 0 is defined by the user. The error token is always defined by
7046 Bison regardless of whether the user declares it with %token, but we
7047 may one day let the user define error as a nonterminal instead.
7048 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7049 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7050 the meaning of "user-defined".
7051 * tests/actions.at (Default %printer and %destructor for user-declared
7052 end token): Rename to...
7053 (Default %printer and %destructor for user-defined end token): ...
7054 this.
7055
7056 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7057 computation of whether to apply the default, don't maintain a list of
7058 every Bison-defined symbol. Instead, just check for a first character
7059 of '$', which a user symbol cannot have, and check for the error token.
7060
9350499c
JD
70612006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7062
7063 Don't apply the default %destructor or %printer to the error token,
7064 $undefined, or $accept. This change fits the general rule that the
7065 default %destructor and %printer are only for user-declared symbols,
7066 and it solves several difficulties that are described in the new test
7067 cases listed below.
7068 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7069 * tests/actions.at (Default %printer and %destructor are not for error
7070 or $undefined, Default %printer and %destructor are not for $accept):
7071 New test cases.
7072
4d7370cb
JD
70732006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7074
7075 Allow %start after the first rule.
7076 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7077 when parsing the first rule.
7078 (check_and_convert_grammar): Search for it here after all grammar
7079 declarations have been parsed. Skip midrules, which have dummy LHS
7080 nonterminals.
7081 * src/symtab.c (symbol_is_dummy): New function.
7082 * src/symtab.h (symbol_is_dummy): Declare it.
7083 * tests/input.at (%start after first rule): New test.
7084
6d0ef4ec
JD
70852006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7086
7087 Redo some of the previous commit: add back the ability to use
7088 non-aliased/undeclared string literals since it might be useful to
7089 those declaring %token-table.
7090 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7091 commit: don't worry about complaints from symbols_pack.
7092 * src/symtab.c (symbol_new, symbol_class_set,
7093 symbol_check_alias_consistency): Undo changes in previous commit: count
7094 each string literal as a new symbol and token, assign it a symbol
7095 number, and don't complain about non-aliased string literals.
7096 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7097 and token counts but does still set aliased tokens to the same number,
7098 symbol_pack_processor now leaves empty slots in the symbols array.
7099 Remove those slots.
7100 * tests/regression.at (Undeclared string literal): Remove test case
7101 added in previous commit since non-aliased string literals are allowed
7102 again.
7103 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7104 remove unnecessary string literal declarations.
7105 * tests/sets.at (Firsts): Likewise.
7106
965537bc
JD
71072006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7108
7109 Don't allow an undeclared string literal, but allow a string literal to
7110 be used before its declaration.
7111 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7112 symbols_pack complained.
7113 * src/symtab.c (symbol_new): Don't count a string literal as a new
7114 symbol.
7115 (symbol_class_set): Don't count a string literal as a new token, and
7116 don't assign it a symbol number since symbol_make_alias does that.
7117 (symbol_make_alias): It's not necessary to decrement the symbol and
7118 token counts anymore. Don't assume that an alias declaration occurs
7119 before any uses of the identifier or string, and thus don't assert that
7120 one of them has the highest symbol number so far.
7121 (symbol_check_alias_consistency): Complain if there's a string literal
7122 that wasn't declared as an alias.
7123 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7124 symbol_pack asserts that every token has been assigned a symbol number
7125 although undeclared string literals have not.
7126 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 7127 string literal): New test cases.
965537bc
JD
7128 (Characters Escapes, Web2c Actions): Declare string literals as
7129 aliases.
7130 * tests/sets.at (Firsts): Likewise.
7131
47aee066
JD
71322006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7133
7134 In the grammar scanner, STRING_FINISH unclosed constructs and return
7135 them to the parser in order to improve error messages.
7136 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7137 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7138 * tests/input.at (Unclosed constructs): New test case.
7139 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7140 seen.
7141
7142 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7143 unused global.
7144
1f6b3679
JD
71452006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7146
7147 Handle string aliases for character tokens correctly.
7148 * src/symtab.c (symbol_user_token_number_set): If the token has an
7149 alias, check and set its alias's user token number instead of its own,
7150 which is set to indicate the alias. Previously, every occurrence of
7151 the character token in the grammar overwrote that alias indicator with
7152 the character code.
7153 * tests/input.at (String aliases for character tokens): New test.
7154
219741d8
JD
71552006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7156
7157 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7158
11daa4e7
PE
71592006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7160
7161 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7162 to prevent failures when building on older platforms.
7163 Check for autopoint failure.
7164 Set XGETTEXT_OPTIONS to values that check for C format strings,
7165 so that translators are warned about them (this also helps
7166 prevent core dumps).
7167
7168 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7169 function, since it simplifies our code a bit.
7170
7171 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7172 rather than -W, so we don't get bogus warnings about sign comparisons.
7173 Add -Wpointer-arith, since that warning is useful (it reports code
7174 that does not conform to C89 and that some compilers reject).
7175 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7176 since it's no longer needed.
7177
f9bfc42a
JD
71782006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7179
7180 Clean up scanners a bit.
7181 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7182 definitions so gcc won't warn when obstack_for_string is unused.
7183 * src/scan-code.l: config.h and system.h are already #include'd by
7184 scan-code-c.c, so get rid of them here.
7185 * src/scan-gram.l: Likewise.
7186 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7187 definitions rather than duplicating the rest of it.
7188 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7189
06e8700a
JD
71902006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7191
7192 Suppress signed/unsigned comparison warnings for yycheck.
7193 * data/c.m4 (b4_safest_int_type): New macro.
7194 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7195 a signed int type, cast it to b4_safest_int_type first.
7196 * data/yacc.c: Likewise.
7197 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7198 also overwritten.
7199
9c437126
PE
72002006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7201
7202 * doc/bison.texinfo: Fix some typos.
7203
284d8a13
PE
72042006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7205
7206 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7207 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7208
7209 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7210 the latest gnulib does this a different way.
7211 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7212 translation was patched, so stop omitting it.
7213
ec5479ce
JD
72142006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7215
7216 Enable declaration of default %printer/%destructor. Make the parser
7217 use these for all user-declared grammar symbols for which the user does
7218 not declare a specific %printer/%destructor. Thus, the parser uses it
7219 for token 0 if the user declares it but not if Bison generates it as
7220 $end. Discussed starting at
7221 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7222 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7223 and
7224 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7225 * NEWS (2.3+): Mention.
7226 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7227 declare a %destructor for a mid-rule's semantic value. It's just
7228 impossible to declare one specific to it.
7229 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7230 code. Describe default %destructor form.
7231 * src/parse-gram.y (grammar_declaration): Parse default
7232 %printer/%destructor declarations.
7233 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7234 and symbol_destructor_location_get rather than accessing the destructor
7235 and destructor_location members of struct symbol.
7236 (symbol_printers_output): Likewise but for %printer's.
7237 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7238 again.
7239 * src/symtab.c (default_destructor, default_destructor_location,
7240 default_printer, default_printer_location): New static global
7241 variables to record the default %destructor and %printer.
7242 (symbol_destructor_get, symbol_destructor_location_get,
7243 symbol_printer_get, symbol_printer_location_get): New functions to
7244 compute the appropriate %destructor and %printer for a symbol.
7245 (default_destructor_set, default_printer_set): New functions to set the
7246 default %destructor and %printer.
7247 * src/symtab.h: Prototype all those new functions.
7248 * tests/actions.at (Default %printer and %destructor): New test to
7249 check that the right %printer and %destructor are called, that they're
7250 not called for $end, and that $$ and @$ work correctly.
7251 (Default %printer and %destructor for user-declared end token): New
7252 test to check that the default %printer and %destructor are called for
7253 a user-declared end token.
7254 * tests/input.at (Default %printer and %destructor redeclared, Unused
7255 values with default %destructor): New tests to check related grammar
7256 warnings and errors.
7257
868d2d96
JD
72582006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7259
7260 Clean up handling of %destructor for the end token (token 0).
7261 Discussed starting at
7262 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7263 and
7264 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7265
7266 Make the skeletons consistent in how they pop the end token and invoke
7267 its %destructor.
7268 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7269 state, which has token number 0, since this would invoke the
7270 %destructor for the end token.
7271 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7272 until after shifting the end token, or else it won't be popped.
7273 * data/yacc.c (yyparse): Likewise.
7274
7275 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7276 it's the end token. Upon termination, destroy an unshifted lookahead
7277 even when it's the end token.
7278 * data/lalr1.cc (yy::parser::parse): Likewise.
7279 * data/yacc.c (yyparse): Likewise.
7280
7281 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7282 value warnings for the end token when the user gives the end token a
7283 %destructor.
7284
7285 * tests/actions.at (Printers and Destructors): Test all the above.
7286
62a9592d
PE
72872006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7288
7289 Update to latest gnulib and gettext versions.
7290 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7291 Add fopen-safer.
7292 (gnulib_files): Add m4/warning.m4. Don't worry about files
7293 overwritten by autopoint.
7294 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7295 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7296 rejects them.
7297 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7298 so that we can remove the intl files at a better time.
7299 (intl_files_to_remove): Remove aclocal.m4, since it gets
7300 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7301 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7302 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7303 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7304 Remove datarootdir hack; no longer needed.
7305 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7306 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7307 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7308 strdup.h.
7309 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7310 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7311
10d6970f
PE
73122006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7313
7314 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7315 it with --assume-autoconf='latest-stable'.
7316
50a33993
JD
73172006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7318
7319 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7320 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7321 YYSTYPE' and `{'.
7322 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7323 those from muscle_tab.c since the old ones are misleading.
7324
2ce4ed68
AD
73252006-07-13 Akim Demaille <akim@epita.fr>
7326
7327 Support %define "KEY" {VALUE}.
7328 * src/scan-code.h, src/scan-code.l (translate_action)
7329 (translate_rule_action, translate_symbol_action, translate_code):
7330 Return char *, not const char *.
7331 * src/parse-gram.y (declaration): Rename as...
7332 (prologue_declaration): this.
7333 (string_content): Remove this nonterminal, use STRING.
7334 (braceless, content, content.opt): New nonterminal.
7335 Use them.
7336 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7337 as value.
7338 * src/scan-gram.l (getargs.h): Don't include it.
7339
db7e5eb5
PE
73402006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7341
7342 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7343 rather than a for-loop that declares a local bool variable. This
7344 should work around a compatibility problem with a Cray x1e C++
7345 compiler reported by Hung Nguyen in
7346 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7347 The for-loop was introduced in the 2004-11-17 change but I don't
7348 know why it was needed.
7349
a5d80ba5
AD
73502006-07-12 Akim Demaille <akim@epita.fr>
7351
7352 * data/c.m4: Comment changes.
7353
23eb2a69
AD
73542006-07-10 Akim Demaille <akim@lrde.epita.fr>
7355
7356 * src/complain.c (error_message, ERROR_MESSAGE): New.
7357 To factor...
7358 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7359 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7360
ddc8ede1
PE
73612006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7362
7363 * NEWS: Instead of %union, you can define and use your own union type
7364 YYSTYPE if your grammar contains at least one <type> tag.
7365 Your YYSTYPE need not be a macro; it can be a typedef.
7366 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7367 (Union Decl, Decl Summary): Document this.
7368 * data/glr.c (YYSTYPE): Implement this.
7369 * data/glr.cc (YYSTYPE): Likewise.
7370 * data/lalr1.cc (YYSTYPE): Likewise.
7371 * data/yacc.c (YYSTYPE): Likewise.
7372 * src/output.c (prepare): Output tag_seen_flag.
7373 * src/parse-gram.y (declaration, grammar_declaration):
7374 Use 'union_seen' rather than 'typed' to determine whether
7375 %union has been seen, since grammars can now be typed without
7376 %union.
7377 (symbol_declaration, type.opt, symbol_def):
7378 Keep track of whether a tag has been seen.
7379 * src/reader.c (union_seen, tag_seen): New vars.
7380 (typed): remove.
7381 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7382 * src/scan-code.l (untyped_var_seen): New variable.
7383 (handle_action_dollar): Adjust to above changes.
7384 (handle_action_dollar, handle_action_at):
7385 Improve overflow checking for outlandish numbers.
7386 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7387 avoid new diagnostics generated by above changes.
7388 * tests/regression.at (YYSTYPE typedef): Add test to check
7389 for type tags without %union.
7390
7391 * src/symlist.c (symbol_list_length): Return int, not unsigned
7392 int, since callers expect int. This may need to get revisited
7393 once we have proper integer overflow checking.
7394
7395 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7396 object is now static.
7397
7398 * src/getargs.c (flags_argmatch): Return void, not int,
7399 to pacify ./configure --enable-gcc-warnings.
7400
7401 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7402 since last_string is already defined to FLEX_PREFIX (last_string).
7403
7b42569e
AD
74042006-07-09 Akim Demaille <akim@lrde.epita.fr>
7405
7406 Implement --warnings/-W.
7407 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7408 replaced by...
7409 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7410 Adjust callers.
7411 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7412 (warnings_args, warnings_types): New.
7413 (getargs, short_options, long_options): Accept -W/--warnings.
7414 Sort the options by alphabetical order, upper case letter right
7415 before its lower case.
7416
3b452f4e
JD
74172006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7418
7419 Change %merge result type clash warnings to errors. Discussed at
7420 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7421 * src/reader.c (record_merge_function_type): Use complain_at.
7422 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7423 declared later): Update test case results.
7424
b8a41559
AD
74252006-07-09 Akim Demaille <akim@lrde.epita.fr>
7426
7427 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7428 to be in alphabetical order.
7429 (trace_args): Spelling fixes.
7430
cd9e1ba2
PE
74312006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7432
7433 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7434 so they don't collide with user-defined macros.
7435 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7436 this was never guaranteed, and now that we're using gnulib stdint,
7437 which defines int_fast16_t to long int, the problem is exposed.
7438
cb48f191
PE
74392006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7440
b8445a15
PE
7441 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7442 need the full POSIX semantics (and weren't implementing them
7443 anyway).
7444
cb48f191
PE
7445 Adjust to Autoconf 2.60 and today's gnulib.
7446 * bootstrap (gnulib_modules): Add stdint.
7447 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7448 no longer copies it.
7449 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7450 since stdint needs the former and wcwidth (which is now required
7451 by mbswidth) needs the latter.
7452 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7453 work around a compatibility glitch between gettext 0.14.6 and
7454 Autoconf 2.60.
7455 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7456 Do not check for uintptr_t, since new stdint module does the right
7457 thing.
7458 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7459 Add stdint.h, stdint_.h, wcwidth.h.
7460 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7461 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7462 stdint.m4, wchar_t.m4, wcwidth.m4.
7463 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7464 usual order for ../lib/*.h files.
7465 (file_name_split): Use last_component, not base_name, to adjust
7466 to gnulib changes.
7467 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7468 for ../lib/*.h files.
7469 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7470 Define unconditionally, since we now assume the stdint module.
7471 * src/scan-skel.l: Include <dirname.h>.
7472 (BASE_QPUTS): Use last_component, not base_name.
7473 * src/system.h: Include <unlocked-io.h> in the usual order
7474 for ../lib/*.h files. Include <stdint.h> unconditionally,
7475 since we now use the stdint module.
7476 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7477 HAVE_UINTPTR_T, since we now use the stdint module.
7478 (base_name): Remove decl, since files now include <dirname.h>
7479 to get the decl.
7480
cd48d21d
AD
74812006-07-08 Akim Demaille <akim@lrde.epita.fr>
7482
7483 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7484 New, default to 1.
7485 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7486 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7487 default.
7488 * tests/calc.at: Adjust.
7489
8ec0a172
AD
74902006-07-08 Akim Demaille <akim@lrde.epita.fr>
7491
b8445a15 7492 * data/c.m4 (b4_basename): New.
8ec0a172
AD
7493 (b4_syncline): Also output the location of its invocation (from
7494 the skeleton).
7495 (b4_user_action, b4_define_user_action, b4_user_actions)
7496 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7497 (b4_user_stype): New.
7498 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7499
4a678af8
JD
75002006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7501
7502 In the grammar file, the first column is 1 not 0 on the first line as
7503 on every other line.
7504 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7505 * tests/input.at (Torturing the Scanner): Update output.
7506
7507 * src/scan-gram.l (scanner_cursor): Declare it static.
7508
dd60572a
JD
75092006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7510
7511 In warnings, say "previous declaration" rather than "first
7512 declaration".
7513 * src/symtab.c (redeclaration): Do that here.
7514 * src/reader.c (record_merge_function_type): In the case of a result
7515 type clash, report the previous declaration rather than the very first
7516 one in the grammar file.
7517 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7518 declared later): Add a third declaration to check this behavior.
7519 * tests/input.at (Incompatible Aliases): Update output.
7520
2073e1b6
AD
75212006-06-27 Akim Demaille <akim@epita.fr>
7522
7523 * doc/Doxyfile.in: New.
7524 * doc/Makefile.am: Use it.
7525 * src/lalr.h, src/symtab.h: Initial doxygenation.
7526
8ee5b538
JD
75272006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7528
7529 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
7530 declared after the %merge. This continues the effort of the previous
7531 patch.
8ee5b538
JD
7532 * src/reader.c (get_merge_function): Don't set the merger type yet.
7533 (record_merge_function_type): New function for setting the merger type
7534 and checking for clashes.
7535 (grammar_current_rule_merge_set): Set the location of the %merge for
7536 the current rule.
7537 (packgram): Invoke record_merge_function_type for each rule now that
7538 all symbol type declarations have been parsed.
7539 * src/reader.h (merger_list.type_declaration_location): New member
7540 storing the location of the first %merge from which the type for this
7541 merging function was derived.
7542 * src/symlist.h (symbol_list.merger_declaration_location): New member
7543 storing the location of a rule's %merge, if any.
7544 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7545 declared later): New test to catch the error fixed by the above patch.
7546
ffa4ba3a
JD
75472006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7548
7549 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
7550 declarations appear after the rules. Discussed at
7551 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7552 and
7553 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7554 Don't mistake the type of $$ in a midrule to be that of its parent
7555 rule's $$.
ffa4ba3a
JD
7556 * src/reader.c (grammar_current_rule_end): Don't invoke
7557 grammar_rule_check yet since not all symbol declarations may have been
7558 parsed yet.
7559 (grammar_midrule_action): Likewise.
7560 Don't record whether the midrule's $$ has been used yet since actions
7561 haven't been translated yet.
7562 Record the midrule's parent rule and its RHS index within the parent
7563 rule.
7564 (grammar_current_rule_action_append): Don't translate the action yet
7565 since not all symbol declarations may have been parsed yet and, thus,
7566 warnings about types for $$, $n, @$, and @n can't be reported yet.
7567 (packgram): Translate the action and invoke grammar_rule_check now that
7568 all symbol declarations have been parsed.
7569 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7570 after parsing the entire grammar file, the symbol list here in the case
7571 of a midrule is actually the midrule's empty RHS, so reference its
7572 parent rule's RHS where necessary.
7573 On the other hand, now that you can already know it's a midrule, you
7574 aren't forced to think $$ has the same type as its parent rule's $$.
7575 (handle_action_at): In the case of a midrule, reference the parent rule
7576 where necessary.
7577 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7578 members.
7579 (symbol_list_length): Now that this is invoked after all rules have
7580 been parsed, a NULL symbol (rather than a NULL symbol list node)
7581 terminates a rule. symbol_list_print already does this correctly.
7582 * src/symlist.h (symbol_list.midrule_parent_rule,
7583 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7584 remember their relationships with their parents.
7585 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7586 fixed by the above patch.
7587 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7588 implementing...
7589 (Unused values): ... this old test case and...
7590 (Unused values before symbol declarations): ... this new test case.
7591 This one is the same as `Unused values' except that all symbol
7592 declarations appear after the rules in order to catch the rest of the
7593 errors fixed by the above patch.
7594
e256e17f
JD
75952006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7596
300a1930
JD
7597 More cleanup.
7598 * src/reader.c (current_rule): Declare it static since it's no longer
7599 used outside this file.
7600 (grammar_current_rule_action_append): Remove redundant arguments from
7601 translate_rule_action invocation.
7602 * src/reader.h (current_rule): Remove this unused extern.
7603 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7604 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 7605
381ecb06
JD
76062006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7607
7608 Clean up yesterday's patch.
7609 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7610 to...
7611 * src/reader.c (grammar_current_rule_action_append): ... here for
7612 consistency with grammar_current_rule_symbol_append.
7613 * tests/regression.at (Braced code in declaration in rules section):
7614 Make yyerror and yylex static as usual.
7615
4210cd0b
JD
76162006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7617
7618 Fix bug that mistakes braced code in a declaration in the rules section
7619 to be a rule action. Mentioned at
7620 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7621 * src/scan-gram.l: Move midrule action detection from the start of the
7622 scanning of any braced code to...
7623 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7624 action. For readability, use $2 and @2 rather than the equivalent
7625 global variables.
7626 * tests/regression.at (Braced code in declaration in rules section):
7627 New test to catch the error fixed by the above patch.
7628
7629 Work on code readability some.
7630 * src/scan-code.l (current_rule): Get rid of this misleading and
7631 redundant declaration: it's actually extern'ed in reader.h.
7632 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7633 translate_action): Add a rule argument and use it instead of the global
7634 current_rule.
7635 (translate_rule_action): This already receives current_rule through an
7636 argument, so pass it on to translate_action instead of assigning
7637 current_rule to current_rule.
7638 (translate_symbol_action, translate_code): Pass rule = NULL to
7639 translate_action.
7640
34f98f46
JD
76412006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7642
7643 Rename %before-definitions to %start-header and %after-definitions to
7644 %end-header. Don't use these declarations to separate pre-prologue
7645 blocks from post-prologue blocks. Add new order-independent
7646 declarations %before-header and %after-header as alternatives to the
7647 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7648 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7649 * NEWS (2.3+): Update for these changes.
7650 * data/glr.c (b4_before_definitions): Update to...
7651 (b4_start_header): ... this.
7652 (b4_after_definitions): Update to...
7653 (b4_end_header): ... this.
7654 * data/glr.cc: Likewise.
7655 * data/lalr1.cc: Likewise.
7656 * data/yacc.c: Likewise.
7657 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7658 prologue blocks with %*-header declarations.
7659 (Calc++ Parser): Likewise.
91661ebb 7660 (Decl Summary): Update names.
148d66d8 7661 (Table of Symbols): Update description.
34f98f46
JD
7662 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7663 (PERCENT_END_HEADER): ... this.
7664 (PERCENT_BEFORE_DEFINITIONS): Update to...
7665 (PERCENT_START_HEADER): ... this.
7666 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7667 (declaration): Update token names and m4 macro names.
7668 When parsing %end-header and %start-header, invoke translate_code
7669 before muscle_code_grow, and no longer set global booleans to remember
7670 whether these declarations have been seen.
7671 Parse new %after-header and %before-header.
7672 * src/reader.c (before_definitions, after_definitions): Remove.
7673 (prologue_augment): Accept a new bool argument to specify whether to
7674 augment the pre-prologue or post-prologue.
7675 * src/reader.h (before_definitions, after_definitions): Remove these
7676 extern's.
7677 (prologue_augment): Add new bool argument.
7678 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7679 (PERCENT_END_HEADER): ... this.
7680 (PERCENT_BEFORE_DEFINITIONS): Update to...
7681 (PERCENT_START_HEADER): ... this.
7682 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7683 * tests/actions.at (Printers and Destructors): Update names.
7684
31b2b07e
JD
76852006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7686
7687 Add comparison operators for C++ location classes. Discussed at
7688 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7689 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7690 declaration indicating whether filename_type has an operator==. If
7691 filename_type is `std::string', it defaults to `1', `0' otherwise.
7692 * data/location.cc: Iff b4_define_location_comparison is `1', add
7693 operator== and operator!= for class position and for class location.
7694
7695 Some minor fixes.
7696 * src/scan-action.l: Remove unused file.
7697 * src/symtab.c (symbol_printer_set): Use printer_location not
7698 destructor_location.
7699 * src/symtab.h (struct symbol): Replace incorrect source comment for
7700 printer members.
7701 * tests/input.at (Incompatible Aliases): Update output with correct
7702 printer location.
7703
9bc0dd67
JD
77042006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7705
7706 Don't put the pre-prologue in the header file. For the yacc.c code
7707 file and the glr.c header and code files, move the pre-prologue before
7708 the token definitions. Add new %before-definitions and
7709 %after-definitions to declare code that will go in both the header file
7710 and code file. Discussed at
7711 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7712 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7713 and
7714 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7715 * NEWS (2.3+): Describe these changes.
7716 * data/glr.c (b4_pre_prologue): Move from within to before...
7717 (b4_shared_declarations): ... this.
7718 Add new b4_before_definitions before b4_token_enums.
7719 Add new b4_after_definitions at the end.
7720 * data/glr.cc (b4_pre_prologue): Replace with...
7721 (b4_before_definitions): ... this in the header file.
7722 (b4_after_definitions): New near the end of the header file.
7723 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7724 code file right before including the header file.
7725 (b4_before_definitions): New in the previous position of
7726 b4_pre_prologue in the header file.
7727 (b4_after_definitions): New near the end of the header file.
7728 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7729 (b4_token_enums_defines): In the code file, move to right before
7730 YYSTYPE for consistency with the header file.
7731 (b4_before_definitions): New right before b4_token_enums_defines in
7732 both the header and code file.
7733 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7734 header and code file.
7735 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7736 of prologues for %union dependencies.
91661ebb
JD
7737 (Decl Summary): In %defines description, mention the effect of
7738 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
7739 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7740 than in the pre-prologue so that make check succeeds.
148d66d8 7741 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
7742 %after-definitions.
7743 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7744 %before-definitions.
7745 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7746 (declaration): Parse those declarations and append to
7747 b4_before_definitions and b4_after_definitions, respectively.
7748 * src/reader.c (before_definitions, after_definitions): New bools to
7749 track whether those declarations have been seen.
7750 (prologue_augment): Add to the post-prologue if %union,
7751 %before-definitions, or %after-definitions has been seen.
7752 * src/reader.h (before_definitions, after_definitions): New extern's.
7753 * src/scan-gram.l: Scan the new declarations.
7754 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7755 prologue block in a %before-definitions or a %after-definitions based
7756 on whether the %union is declared.
7757 * tests/regression.at (Early token definitions with --yacc, Early token
7758 definitions without --yacc): Move tests for token definitions into the
7759 post-prologue since token names are no longer defined in the
7760 pre-prologue.
7761
203b9274
AD
77622006-06-20 Akim Demaille <akim@epita.fr>
7763
7764 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7765 (symbol_get): Use it.
7766 * src/parse-gram.y: Use it.
7767
a7ee59cf
JD
77682006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7769
7770 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7771 build succeeds when configured with --enable-gcc-warnings.
7772
5a2baae7
PE
77732006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7774
33ad1a9c
PE
7775 * src/parse-gram.y (char_name): New function.
7776 (CHAR, STRING, string_content): For %printer, properly escape.
7777 (ID): Prefer fputs to fprintf.
7778 (id): Reindent to be consistent with other rules.
7779 Properly quote char.
7780
5a2baae7
PE
7781 The Translation Project changed its way of publishing translations
7782 to maintainers. I haven't received any responses to my request
7783 for supporting the old way, or for documenting the new way. I
7784 have modified 'bootstrap' to use screen scraping
7785 (in this case, HTML scraping). This is unreliable and inelegant,
7786 but I don't see any better way. Yuck.
7787 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7788 (get_translations): New function, which uses HTML scraping to
7789 deduce locations of latest translations.
7790 Use this function to grab both bison and bison-runtime .po files.
7791 Don't bother priming the pump for the runtime-po domain any more,
7792 as it's now translated better than bison is.
7793
58d7a1a1
AD
77942006-06-19 Akim Demaille <akim@epita.fr>
7795
7796 * src/scan-gram.l: No longer "parse" things after `%union' until
7797 `{'. Rather, return a single "%union" token.
7798 No longer make symbols: return strings, and leave the conversion
7799 to symbols to the parser.
7800 (SC_PRE_CODE, token_type): Remove.
7801 * src/parse-gram.y (%union): New field `character'.
7802 Sort tokens.
7803 (CHAR): New token.
7804 (ID, ID_COLON): Now that the scanner no longer makes them
7805 identifiers, adjust all uses to invoke symbol_get.
7806 (id_colon): New, wraps the conversion from string to symbol.
7807 (%union): Accept a possible union_name.
7808 (symbol): Now can be a char.
7809 * data/c.m4 (b4_union_name): Leave a default value.
7810 * data/glr.c, data/yacc.c: Use it.
7811
b931235e
JD
78122006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7813
7814 For associating token numbers with token names for "yacc.c", don't use
7815 #define statements unless `--yacc' is specified; always use enum
7816 yytokentype. Most important discussions start at:
7817 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7818 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7819 and
7820 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7821 * NEWS (2.3+): Mention.
7822 * data/c.m4 (b4_yacc_if): New.
7823 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7824 token #define's.
7825 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7826 on token name definitions.
7827 * src/getargs.c (usage): Capitalize `Yacc' in English.
7828 * src/output.c (prepare): Define b4_yacc_flag.
7829 * tests/regression.at (Early token definitions): Test that tokens names
7830 are defined before the pre-prologue not just before the post-prologue.
7831 Remove this test case and copy to...
7832 (Early token definitions with --yacc): ... this to test #define's.
7833 (Early token definitions without --yacc): ... and this to test enums.
7834
9e6e7ed2
PE
78352006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7836
7837 * NEWS: Reword the post-2.3 change to not be so optimistic about
7838 removing the old "look-ahead" spelling.
7839 Update previous look-ahead/lookahead change reports.
7840 * REFERENCES: look-ahead -> lookahead (since that's
7841 what he actually wrote).
7842 * doc/refcard.tex: look ahead -> lookahead,
7843 look-ahead -> lookahead
7844
742e4900
JD
78452006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7846
7847 For consistency, use `lookahead' instead of `look-ahead' or
7848 `look_ahead'. Discussed starting at
7849 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7850 and then at
7851 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7852 * NEWS: For the next release, note the change to `--report'.
7853 * TODO, doc/bison.1: Update English.
7854 * doc/bison.texinfo: Update English.
7855 (Understanding Your Parser, Bison Options): Document as
7856 `--report=lookahead' rather than `--report=look-ahead'.
7857 * src/conflicts.c: Update English in comments.
7858 (lookahead_set): Rename from look_ahead_set.
7859 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7860 (resolve_sr_conflict): Rename local look_ahead_tokens to
7861 lookahead_tokens, and update other uses.
7862 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7863 count_rr_conflicts, conflicts_free): Update uses.
7864 * src/getargs.c (report_args): Move "lookahead" before alternate
7865 spellings.
7866 (report_types): Update uses.
7867 (usage): For `--report' usage description, state `lookahead' spelling
7868 rather than `look-ahead'.
7869 * src/getargs.h (report.report_lookahead_tokens): Rename from
7870 report_look_ahead_tokens.
7871 * src/lalr.c: Update English in comments.
7872 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7873 (state_lookahead_tokens_count): Rename from
7874 state_look_ahead_tokens_count.
7875 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7876 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7877 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7878 Update other uses.
7879 Update English in output.
7880 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7881 * src/print.c: Update English in comments.
7882 (lookahead_set): Rename from look_ahead_set.
7883 (print_reduction): Rename argument lookahead_token from
7884 look_ahead_token.
7885 (print_core, state_default_rule, print_reductions, print_results):
7886 Update uses.
7887 * src/print_graph.c: Update English in comments.
7888 (print_core): Update uses.
7889 * src/state.c: Update English in comments.
7890 (reductions_new): Update uses.
7891 (state_rule_lookahead_tokens_print): Rename from
7892 state_rule_look_ahead_tokens_print, and update other uses.
7893 * src/state.h: Update English in comments.
7894 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7895 (state_rule_lookahead_tokens_print): Rename from
7896 state_rule_look_ahead_tokens_print.
7897 * src/tables.c: Update English in comments.
7898 (conflict_row, action_row): Update uses.
7899 * tests/glr-regression.at
7900 (Incorrect lookahead during deterministic GLR,
7901 Incorrect lookahead during nondeterministic GLR): Rename
7902 print_look_ahead to print_lookahead.
7903 * tests/torture.at: Update English in comments.
7904 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7905 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7906 (Many lookahead tokens): Update uses.
7907 * data/glr.c: Update English in comments.
7908 * lalr1.cc: Likewise.
7909 * yacc.c: Likewise.
7910 * src/conflicts.h: Likewise.
7911 * src/lalr.h: Likewise.
7912 * src/main.c: Likewise.
7913 * src/output.c: Likewise.
7914 * src/parse-gram.c: Likewise.
7915 * src/tables.h: Likewise.
7916 * tests/calc.at: Likewise.
7917
3c40d0b5
JD
79182006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7919
7920 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7921
5d278082
PE
79222006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7923
7924 * TODO: Add request from Nelson H. F. Beebe to be able to install
7925 Bison without installing the yacc script.
7926
9e668899
JD
79272006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7928
7929 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7930 and yytext if they're already #define'd.
7931 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7932 * src/scan-code-c.c: ... here.
7933 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7934 <config.h>.
7935
0c8e079f
JD
79362006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7937
7938 Get Bison to build again when configured with --enable-gcc-warnings.
7939 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7940 missing #include's.
7941 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7942 loc argument as it shadows a global.
7943 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7944 invocation.
7945
7946 * src/.cvsignore: Add scan-code.c.
7947
2346344a
AD
79482006-06-07 Akim Demaille <akim@epita.fr>
7949
7950 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7951 to...
7952 * src/scan-code.l: here.
7953 * tests/input.at (Torturing the Scanner): Fix another location
7954 error.
7955
4862bdfd
AD
79562006-06-07 Akim Demaille <akim@epita.fr>
7957
7958 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7959
e9071366
AD
79602006-06-06 Akim Demaille <akim@epita.fr>
7961
7962 Extract the parsing of user actions from the grammar scanner.
7963 As a consequence, the relation between the grammar scanner and
7964 parser is much simpler. We can also split "composite tokens" back
7965 into simple tokens.
7966 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7967 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7968 rename as...
7969 * src/location.h, src/location.c (add_column_width)
7970 (location_compute): these.
7971 Fix the column count: the initial column is 0.
7972 (location_print): Be robust to ending column being 0.
7973 * src/location.h (boundary_set): New.
7974 * src/main.c: Adjust to scanner_free being renamed as
7975 gram_scanner_free.
7976 * src/output.c: Include scan-code.h.
7977 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7978 Use boundary_set.
7979 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7980 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7981 which is now, again, a separate token.
7982 Adjust all dependencies.
7983 Whereever actions with $ and @ are used, use translate_code.
7984 (action): Remove this nonterminal which is now useless.
7985 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7986 (grammar_current_rule_action_append): Use translate_code.
7987 (packgram): Bound check ruleno, itemno, and rule_length.
7988 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7989 (last_string, last_braced_code_loc, max_left_semantic_context)
7990 (scanner_initialize, scanner_free, scanner_last_string_free)
7991 (gram_out, gram_lineno, YY_DECL_): Move to...
7992 * src/scan-gram.h: this new file.
7993 (YY_DECL): Rename as...
7994 (GRAM_DECL): this.
7995 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7996 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7997 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7998 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7999 Move these declarations, and...
8000 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8001 these to...
8002 * src/flex-scanner.h: this new file.
8003 * src/scan-gram.l (rule_length, rule_length_overflow)
8004 (increment_rule_length): Remove.
8005 (last_braced_code_loc): Rename as...
8006 (gram_last_braced_code_loc): this.
8007 Adjust to the changes of the parser.
8008 Move all the handling of $ and @ into...
8009 * src/scan-code.l: here.
8010 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8011 (handle_action_dollar, handle_action_at): Move to...
8012 * src/scan-code.l: here.
8013 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8014 scan-code.h, scan-code-c.c, scan-gram.h.
8015 (EXTRA_bison_SOURCES): Add scan-code.l.
8016 (BUILT_SOURCES): Add scan-code.c.
8017 (yacc): Be robust to white spaces.
8018
8019 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8020 * tests/regression.at: Adjust the column numbers.
8021 * tests/regression.at: Adjust the error message.
7891a7c4 8022
184e42f0
JD
80232006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8024
8025 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8026 Use Akim's wording from
8027 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8028
7891a7c4
JD
80292006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8030
8031 Between Bison releases, manually append `+' to the previous Bison
8032 release number, and use that as a signal to automatically print the
8033 ChangeLog's CVS Id keyword from --version. Discussed starting at
8034 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8035 * ChangeLog: Add Id header.
8036 * configure.ac (AC_INIT): Append `+' to `2.3'.
8037 * src/.cvsignore: Add revision.c.
8038 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8039 (BUILT_SOURCES): Add revision.c.
8040 (revision.c): New target rule. This file defines a new global variable
8041 named revision. It initializes it with either the Id from ChangeLog
8042 or, if VERSION doesn't contain `+', with the empty string.
8043 * src/getargs.c (version): Print the value of revision.
8044 * src/revision.h: Extern revision.
8045
4ad3ed84
PE
80462006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8047
8048 * NEWS: Version 2.3.
8049 * configure.ac (AC_INIT): Likewise.
8050
02103984
PE
80512006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8052
8053 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8054 with no arguments, not as an object-like macro. This is for
8055 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8056 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8057 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8058 Document this.
8059
2c08afa5
JD
80602006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8061
8062 * src/getargs.c (usage): Back out yesterday's modification of the
8063 --help output so that we don't have to wait for translation before
8064 releasing 2.3.
8065
6077da58
PE
80662006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8067
8068 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8069 Problem reported by Akim Demaille.
8070
2a26b6c2
JD
80712006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8072
8073 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8074
aefef0d6
PE
80752006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8076
8077 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8078 generated source code. Problem reported by Frans Englich in
8079 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8080
fcd8e201
PE
80812006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8082
8083 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8084 shell, not within 'make', so that 'make' by an ordinary builder
8085 (using GNU make) does not worry about configuring gzip. This also
8086 works around a bug reported independently by Keith Thompson and by
8087 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8088 stderr rather than stdout, messing up the build logs.
8089
7b5cdcbd
JD
80902006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8091
8092 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8093 to make sure that YYID will never be unused. This fixes a 'make
8094 maintainer-check' failure caused by the recent changes to the 'Trivial
8095 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8096 not used.
8097 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8098
5ad0a449
JD
80992006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8100
8101 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8102 state before an empty RHS is always resolved here. Only the location
8103 of that state is guaranteed to be resolved, and that's enough. This
8104 fixes the remaining bug reported by Derek M. Jones in
8105 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8106 * tests/glr-regression.at (Uninitialized location when reporting
8107 ambiguity): Test the above case.
8108 Also, the embedded comments in this test case claim it checks the case
8109 of an empty RHS that has inherited the initial location. However, the
8110 corresponding LHS was already resolved, so yyresolveLocations didn't
8111 actually have reason to modify it. Fix this by forcing
8112 nondeterministic operation at the beginning of the parse.
8113
50cce58e
PE
81142006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8115
8116 * data/c.m4 (b4_yy_symbol_print_generate):
8117 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8118 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8119 of the bugs reported today by Derek M Jones in
8120 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8121 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8122 defined to be a type name without parens or brackets.
8123 (Location Type): Similarly for YYLTYPE.
8124 * tests/regression.at (Trivial grammars): Put in a test for this
8125 bug that will be caught by 'make maintainer-check' (though not,
8126 alas, by 'make check' unless your compiler is picky).
8127
ab8d9dc5
PE
81282006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8129
0d2c8934 8130 * NEWS: Version 2.2.
ab8d9dc5
PE
8131 * configure.ac (AC_INIT): Likewise.
8132
9138c575
JD
81332006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8134
8135 * data/glr.c (yyreportTree): Make room in yystates for the state
8136 preceding the RHS. This fixes the segmentation fault reported by Derek
8137 M. Jones in
8138 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8139 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8140 to the user. Reported for yyreportTree by Derek M. Jones later in the
8141 same thread.
8142 * THANKS: Add Derek M. Jones.
8143 Update my email address.
8144 Fix typo in Steve Murphy's name.
8145
276f48df
PE
81462006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8147
d6645148
PE
8148 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8149 checking against YYLAST that caused the parser to miss a potential
8150 alternative in its diagnostic.
8151 Problem reported by Maria Jose Moron Fernandez in
8152 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8153 * data/lalr1.cc (yysyntax_error_): Likewise.
8154 * data/yacc.c (yysyntax_error): Likewise.
8155 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8156 tokens, in case we run into an older C compiler.
8157 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8158 Use them to check for the off-by-one error fixed above.
8159
276f48df
PE
8160 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8161 YYSIZE_T, not size_t.
8162 * tests/regression.at (Trivial grammars): New test, to catch
8163 the error fixed by the above patch.
8164
cd8b5791
AD
81652006-05-14 Akim Demaille <akim@lrde.epita.fr>
8166
8167 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8168 scheme.
8169 Reported by Steve Murphy.
8170
34376418
AD
81712006-05-14 Akim Demaille <akim@lrde.epita.fr>
8172
8173 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8174 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8175
327afc7c
AD
81762006-05-14 Akim Demaille <akim@lrde.epita.fr>
8177
8178 Implement --trace=m4.
8179 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8180 * src/output.c (output_skeleton): When set, pass -dV to m4.
8181
8182 Factor the handling of flags in m4.
8183 * src/output.c (prepare): Rename the muscle names debug, defines,
8184 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8185 * data/c.m4: Adjust.
8186 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8187 Use b4_define_flag_if to define other b4_FLAG_if macros.
8188 (b4_location_if): As a consequence, rename as...
8189 (b4_locations_if): this, for consistency.
8190 Adjust all the skeletons.
8191
ba9ecd19
AD
81922006-05-14 Akim Demaille <akim@lrde.epita.fr>
8193
8194 * etc/bench.pm: Shorten bench names.
8195
4e83ea15
AD
81962006-05-14 Akim Demaille <akim@lrde.epita.fr>
8197
8198 * src/output.h, src/output.c (error_verbose): Move to...
8199 * src/getargs.h, src/getargs.c: here.
8200 Sort the flags.
8201 Adjust dependencies.
8202
6e93d810
PE
82032006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8204
8205 * data/c.m4 (b4_copyright): Put the special exception for Bison
8206 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
8207 uses changed. Suggested by Akim Demaille. Also, wrap the
8208 copyright notice, in case it is longer than 80 columns. Replace
8209 comma by newline after title.
6e93d810 8210
eaea13f5
PE
82112006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8212
8213 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8214 incompatibility, not a bug. Mention that it wasn't fixed as of
8215 flex 2.5.33.
8216
3cf084ec
AD
82172006-05-11 Akim Demaille <akim@lrde.epita.fr>
8218
8219 * examples/extexi: Enforce the precedence of concatenation over
8220 >>.
0a9f1c7d 8221 Reported by Tommy Nordgren.
3cf084ec 8222
32c96bd7
AD
82232006-05-11 Akim Demaille <akim@lrde.epita.fr>
8224
8225 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8226 with the member "token".
f94705b2 8227 Reported by Martin Nylin.
32c96bd7 8228
eaea13f5
PE
82292006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8230
8231 * data/glr.c: Switch to Bison 2.2 special-exception language in
8232 the copyright notice. Use more-regular format for titles and
8233 copyright notices.
8234 * data/glr.cc: Likewise.
8235 * data/location.cc: Likewise.
8236 * data/yacc.cc: Likewise.
8237 * doc/bison.texinfo (Conditions): Document this.
8238 * NEWS: likewise. Upgrade version to 2.2.
8239
6e2d1146
AD
82402006-04-27 Akim Demaille <akim@lrde.epita.fr>
8241
8242 * data/glr.cc: Remove dead code.
8243
47671055
PE
82442006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8245
8246 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8247 that variable and the line breaks the bootstrap. Problem reported
8248 by Juan M. Guerrero.
8249
ed2e6384
AD
82502006-04-24 Akim Demaille <akim@lrde.epita.fr>
8251
8252 * doc/bison.texinfo (Multiple start-symbols): New.
8253
3cedc2dc
AD
82542006-04-24 Akim Demaille <akim@lrde.epita.fr>
8255
8256 * etc/README, etc/bench.pl: New.
8257
b2ddc3f3
AD
82582006-04-03 Akim Demaille <akim@lrde.epita.fr>
8259
8260 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8261 rule.
8262 Reported by Mickael Labau.
8263 * tests/input.at (Torturing the Scanner): Test it.
8264
91e3ac9a
PE
82652006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8266
8267 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8268 Problem reported by Bob Rossi.
8269
82702006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8271
8272 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8273 and didn't really work.
8274 For the index, use @ifnotinfo, not @iftex.
8275 Minor cleanups of spacing and terminology.
8276
5cf61e93
AD
82772006-03-12 Akim Demaille <akim@lrde.epita.fr>
8278
8279 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8280 of AT_NAME_PREFIX when %name-prefix is not used.
8281
aa08666d
AD
82822006-03-12 Akim Demaille <akim@lrde.epita.fr>
8283
8284 Apply --prefix to C++ skeletons too: they change the namespace.
8285 The test suite already exercize these cases.
8286 * data/c++.m4 (b4_namespace): New.
8287 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8288 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8289 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8290 * doc/bison.texinfo: Document it.
8291 (Option Cross Key): Use @multitable in all formats. It looks
8292 nicer, even in TeX outputs.
8293 (Rules): Use the same code whatever the output type is.
8294 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8295 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8296 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 8297
45567173
AD
82982006-03-10 Akim Demaille <akim@lrde.epita.fr>
8299
8300 * TODO: Remove dead items.
8301
e9d8f881 83022006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
8303
8304 * doc/FAQ: Remove, merged into...
8305 * doc/bison.texinfo (FAQ): this.
8306 * doc/Makefile.am (EXTRA_DIST): Adjust.
8307
c095d689
AD
83082006-03-10 Akim Demaille <akim@lrde.epita.fr>
8309
8310 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8311 even if empty.
8312 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8313 * doc/bison.texinfo (Calc++ Scanner): Use it.
8314
6e0f8287
PE
83152006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8316
8317 Fix two nits reported by twlevo, plus one more that I discovered.
8318
8319 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8320 this is the usual Bison style.
8321 * src/location.h (location_print): Likewise.
8322
8323 * src/reader.h (token_name): Likewise.
8324
d6b771c3
PE
83252006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8326
8327 Fix some nits reported by twlevo.
8328 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8329 and "POSIX". Use more-modern syntax for URLs. Mention C++
8330 and ask for Java. Don't hardwire OS version numbers. Add
8331 copyright notice.
8332 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8333 * src/conflicts.c (solved_conflicts_obstack): Now static.
8334
1e137b71
JD
83352006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8336
8337 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8338 page. Say "you can use it" not "you may use it" as on the web page;
8339 we're describing capabilities not granting permission.
8340
73f2e47e
PE
83412006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8342
6d05403d
PE
8343 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8344 shadowing warnings. Use usual patter for iterating through RHS.
8345 * tests/glr-regression.at
8346 (Uninitialized location when reporting ambiguity):
8347 Modify yylex so that it uses its argument, rather than trying
8348 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8349 const char -> char const.
8350
73f2e47e
PE
8351 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8352 Don't use tabs inside commands; it messes up 'ps'.
8353 Problem reported by twlevo.
8354
8710fc41
JD
83552006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8356
8357 * tests/glr-regression.at (Uninitialized location when reporting
8358 ambiguity): New test case.
8359 * data/glr.c (yyresolveLocations): New function, which uses
8360 YYLLOC_DEFAULT.
8361 (yyresolveValue): Invoke yyresolveLocations before reporting an
8362 ambiguity.
8363 * doc/bison.texinfo (Default Action for Locations): Note
8364 YYLLOC_DEFAULT's usage for ambiguity locations.
8365 (GLR Semantic Actions): Cross-reference those notes.
8366
ae952af2
JD
83672006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8368
8369 * tests/glr-regression.at (Leaked semantic values when reporting
8370 ambiguity): Remove unnecessary union and type declarations.
8371 (Leaked lookahead after nondeterministic parse syntax error): New test
8372 case.
8373 * data/glr.c (yyparse): Check for zero stacks remaining before
8374 attempting to shift the lookahead so that you don't lose it.
8375
35ee866a
JD
83762006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8377
8378 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8379 * tests/glr-regression.at (Leaked semantic values when reporting
8380 ambiguity): New test case.
8381 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8382 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8383 now unnecessary yystackp parameter.
8384 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8385 destructors can be called.
8386
8387 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8388 in existing testcases.
8389
520181ab
JD
83902006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8391
8392 Don't leak semantic values for parent RHS when a user action cuts the
8393 parser, and clean up related code a bit.
8394 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
8395 cuts parse): Rename to...
8396 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
8397 for leaked parent RHS values.
8398 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8399 between an unresolved state (non-empty chain of semantic options) and
8400 an incomplete one (signaled by an empty chain).
ae952af2 8401 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
8402 successfully or unsuccessfully resolved yyGLRState to...
8403 (yyresolveValue): ... here so that yyresolveValue always leaves a
8404 yyGLRState with consistent data and thus is easier to understand.
8405 Remove the yyvalp and yylocp parameters since they are always just
8406 taken from the yys parameter. When reporting a discarded merged value
8407 in debugging output, note that it is incompletely merged. Document the
8408 interface.
8409 (yyresolveAction): If resolving any of the RHS states fails, destroy
8410 them all rather than leaking them. Thus, as long as user actions are
8411 written to clean up the RHS correctly, yyresolveAction always cleans up
8412 the RHS of a semantic option. Document the interface.
8413
18d9185c
PE
84142006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8415
8416 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8417 led to a segmentation fault in GNU Pascal. Problem reported
8418 by Waldek Hebisch.
8419
841a7737
JD
84202006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8421
8422 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8423 mid-rule action inside a nonterminal symbol in order to declare a
8424 destructor for its semantic value.
8425
fc3f467f
PE
84262006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8427
8428 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8429 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8430 __cplusplus && ! defined _STDLIB_H && !
8431 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8432 defined free))]: Include <stdlib.h> rather than rolling our own
8433 declarations of malloc and free, to avoid problems with
8434 incompatible declarations (using 'throw') C++'s stdlib.h. This
8435 should fix Debian bug 340012
8436 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8437 reported by Guillaume Melquiond.
8438
a3af26dd
PE
84392006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8440
4d7bc38c
PE
8441 * NEWS: Clarify symbols versus types in unused-value warnings.
8442
a3af26dd
PE
8443 * configure.ac (AC_INIT): Bump version number.
8444
4e26c69e
PE
84452006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8446
8447 * NEWS: Version 2.1a.
8448 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8449 since C99 requires this.
8450
498e897c
PE
84512006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8452
8453 * m4/c-working.m4: New file.
8454 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8455
57bb17ca
PE
84562006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8457
8458 * Makefile.maint: Merge from coreutils.
8459
0be105dc
PE
84602006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8461
8462 More portability fixes for problems summarized by Nelson H. F. Beebe.
8463
8464 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8465 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8466 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8467 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8468 messes up because C++ code is compiled in 32-bit mode but linked
8469 in 64-bit mode.
8470
6fc0c024
PE
84712006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8472
8473 More portability fixes for problems summarized by Nelson H. F. Beebe.
8474
7870f699
PE
8475 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8476 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8477
6fc0c024
PE
8478 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8479 nodist_PROGRAMS, since we don't need to actually compile the
8480 example if we're just doing a plain 'make'. This avoids bothering
8481 the installer unnecessarily about problems due to weird C++
8482 compilers.
8483
fe6c2fde
PE
84842006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8485
8486 More portability fixes for problems summarized by Nelson H. F. Beebe.
8487
8488 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8489 than #include "...", and compile with -I'.'. The old method was
8490 not portable, according to Posix and the C standard, and it does
8491 not work with Sun C 5.7, where previous #line directives affect
8492 the working directory used in later #include "..." directives.
8493
927b425b
JMG
84942006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8495
8496 Various DJGGP specific issues in /djgpp
8497
d9735e9e
PE
84982006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8499
8500 More portability fixes for problems summarized by Nelson H. F. Beebe.
8501
8502 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8503 '#include <map>' works and that you can apply ++ to iterators.
8504
5a6755af
PE
85052006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8506
67a0dc4f
PE
8507 Work around portability problems summarized by Nelson H. F. Beebe in
8508 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8509
8c86f0ef
PE
8510 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8511 that '#include <string>' works.
8512
de35dd59
PE
8513 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8514 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8515 "warning: sorry: semantics of inline function static data `const
8516 unsigned char translate_table[262]' are wrong (you'll wind up with
8517 multiple copies)".
8518
67a0dc4f
PE
8519 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8520 or, xor to not_, and_, or_, and xor_, respectively. This works
8521 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8522 random system header somewhere that includes the equivalent of
8523 <iso646.h>.
8524
5a6755af
PE
8525 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8526 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 8527 Suite Version 2.0.
5a6755af 8528
3f001415
JD
85292006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8530
8531 During deterministic GLR operation, user actions should be able to
8532 influence the parse by changing yychar. To make this easier to fix and
8533 to make glr.c easier to evolve in general, don't maintain yytoken in
8534 parallel with yychar; just compute yytoken when needed.
8535 * tests/glr-regression.at (Incorrect lookahead during deterministic
8536 GLR): Check that setting yychar in a user action has the intended
8537 effect.
8538 * data/glr.c (yyGLRStack): Remove yytokenp member.
8539 (yyclearin): Don't set *yytokenp.
8540 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8541 yychar rather than *yytokenp to determine the current lookahead.
8542 Compute yytoken locally when needed.
8543 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8544 point to.
8545
8546 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8547 after `--report' documentation.
8548
e2a8c0f5
PE
85492006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8550
8551 * src/parse-gram.y (grammar_declaration): Location of printer
8552 symbol is @1, not list->location. Bug reported by twlevo.
8553 * tests/input.at (Incompatible Aliases): Adjust to above change.
8554
6b702268
PE
85552006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8556
27622431
PE
8557 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8558 all the test at once. This makes the output easier to read in the
8559 normal case.
8560
6b702268
PE
8561 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8562 got from <http://bro-ids.org/download.html>. The bug is that
8563 when two actions appeared in succession, the second one was
8564 scanned before the first one was added to the grammar rule
8565 as a midrule action. Bison then output the incorrect warning
8566 "parse.y:905.17-906.36: warning: unused value: $3".
8567 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8568 associated with a value.
8569 (rhs): Don't invoke grammar_current_rule_action_append.
8570 (action): Invoke it here instead.
8571 * src/reader.c (grammar_midrule_action): Now extern.
8572 (grammar_current_rule_action_append): Don't invoke
8573 grammar_midrule_action; that is now the scanner's job.
8574 * src/reader.h (last_string, last_braced_code_loc):
8575 (grammar_midrule_action): New decls.
8576 * src/scan-gram.l (last_string): Now extern, sigh.
8577 (last_braced_code_loc): New extern variable.
8578 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8579 rule already has an action.
8580 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8581 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8582 Add some tests to check that the above changes fixed the bug.
8583
d40ba6c2
PE
85842006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8585
8586 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8587 All used changed. Check whether the symbol has a destructor,
8588 not whether it is typed.
8589 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8590 that the values are still reported as unused. All line numbers
8591 adjusted.
8592
401aace6
PE
85932006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8594
8595 Work around a bug in bro 0.8, which underparenthesizes its
8596 definition of YYLLOC_DEFAULT.
8597 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8598 their arguments.
8599 * data/lalr1.cc: Likewise.
8600 * data/yacc.cc: Likewise.
8601
06f01bc4
PE
86022006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8603
401aace6
PE
8604 Work around a bug in Pike 7.0, and give the Pike folks a
8605 better way to override the usual int widths.
8606 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8607 user can override the types.
8608 (short): #undef, to work around a bug in Pike 7.0.
8609 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8610 (union yyalloc.yyss): Use yytype_int16 rather than short.
8611 All uses changed.
8612 (yysigned_char): Remove.
8613 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8614 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8615 * tests/regression.at (Web2c Actions): Adjust to above changes.
8616
8617 * src/reader.c (check_and_convert_grammar): New function.
8618 (reader): Close the input file even if something went wrong during
8619 parsing. Minor file descriptor leak reported by twlevo.
8620
06f01bc4
PE
8621 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8622 to pacify gcc -Wswitch-default.
8623 * src/scan-gram.l (adjust_location): Use a default: break; case
8624 to pacify gcc -Wswitch-default.
8625 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8626 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8627 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8628 Move these decls to scan-skel.l, since they don't need to be
8629 visible elsewhere.
8630 * src/scan-skel.l: Accept the above decls.
8631 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8632 is used.
8633
02650b7f
PE
86342006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8635
8636 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8637 since we don't want to insist on a version number at the start
8638 of the changelog every time.
8639 * Makefile.maint: Sync from coreutils a bit better.
8640 (sc_trailing_blank): Renamed from sc_trailing_space.
8641 All uses changed.
8642 (sc_no_if_have_config_h, sc_require_config_h):
8643 (sc_prohibit_assert_without_use): New rules.
8644 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8645 (sc_dd_max_sym_length): Fix leading spaces in rule.
8646 (sc_system_h_headers): Prefix with @.
8647 (sc_useless_cpp_parens, m4-check): Output line numbers.
8648 (changelog-check): Allow version only in head.
8649 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8650 satisfy new Makefile.maint rule.
8651 * data/glr.c: Likewise.
8652 * data/glr.cc: Likewise.
8653 * data/lalr1.cc: Likewise.
8654 * data/yacc.c: Likewise.
8655 * lib/ebitsetv.c: Likewise.
8656 * lib/lbitset.c: Likewise.
8657 * lib/subpipe.c: Likewise.
8658 * lib/timevar.c: Likewise.
8659 * src/system.h: Likewise.
8660 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8661 * djgpp/Makefile.maint: Add copyright notice.
8662 * djgpp/README.in: Likewise.
8663 * djgpp/config.bat: Likewise.
8664 * djgpp/config.site: Likewise.
8665 * djgpp/config_h.sed: Likewise.
8666 * djgpp/djunpack.bat: Likewise.
8667 * djgpp/config.sed: Fix copyright notice to match standard format.
8668 * djgpp/subpipe.h: Likewise.
8669 * lib/bitsetv-print.c: Likewise.
8670 * lib/bitsetv.c: Likewise.
8671 * lib/subpipe.h: Likewise.
8672 * lib/timevar.c: Likewise.
8673 * lib/timevar.h: Likewise.
8674 * djgpp/subpipe.c: Use standard recipe for config.h.
8675 * lib/abitset.c: Likewise.
8676 * lib/bitset.c: Likewise.
8677 * lib/bitset_stats.c: Likewise.
8678 * lib/bitsetv-print.c: Likewise.
8679 * lib/bitsetv.c: Likewise.
8680 * lib/ebitsetv.c: Likewise.
8681 * lib/get-errno.c: Likewise.
8682 * lib/lbitset.c: Likewise.
8683 * lib/subpipe.c: Likewise.
8684 * lib/timevar.c: Likewise.
8685 * lib/vbitset.c: Likewise.
8686 * tests/local.at: Likewise.
8687 * src/scan-gram.l: Don't include verify.h, since system.h does
8688 that for us.
8689 * .x-sc_require_config_h: New file.
8690 * .x-sc_unmarked_diagnostics: New file.
8691
287c78f6
PE
86922006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8693
287c78f6
PE
8694 Be a bit more systematic about using 'abort'.
8695 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8696 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8697 Put 'default: abort ();' before some other case, to satisfy older
8698 pedantic compilers.
8699 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8700 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8701 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8702 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
8703 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8704 (get_decision_str, get_orientation_str, get_node_alignment_str):
8705 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8706 (get_linestyle_str, get_arrowstyle_str): Likewise.
8707 * src/conflicts.c (resolve_sr_conflict):
8708 Use a default case rather than one for the one remaining enum
8709 value, to catch invalid enum values as well.
8710 * src/lalr.c (set_goto_map, map_goto):
8711 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8712 * src/nullable.c (nullable_compute, token_definitions_output):
8713 Likewise.
8714 * src/reader.c (packgram, reader): Likewise.
8715 * src/state.c (transitions_to, state_new, state_reduction_find):
8716 Likewise.
8717 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8718 (symbol_pack): Likewise.
8719 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
8720 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8721 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
8722 * src/system.h: Don't include <assert.h>.
8723 (assert): New macro.
8724
8725 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8726 (Destructor Decl, Parser Function, Pure Calling):
8727 Describe rules for braces inside C code more carefully.
287c78f6 8728
c66dfadd
PE
87292006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8730
c21493b8
PE
8731 Fix some porting glitches found by Nelson H. F. Beebe.
8732 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8733 compilers that don't understand that abort () does not return.
8734 * src/state.c (transitions_to): Likewise.
8735 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8736 that '#include <cstdlib>' works.
8737 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8738 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8739 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8740 for the benefit of some pre-C99 compilers.
8741
b6e3facf
PE
8742 * bootstrap: Undo changes to gnulib files that autoreconf made.
8743
c66dfadd
PE
8744 Minor fixups to get 'make maintainer-check' to work.
8745 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8746 with the new verify.h implementation.
8747 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8748 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8749 * data/yacc.c (YYUSE): Likewise.
8750 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8751 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8752 * src/parse-gram.y (declaration): Don't pass a string constant
8753 to a function that expects char *, since GCC might complain
8754 about the constant value.
8755 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8756 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8757 before #defining them.
8758 * tests/glr-regression.at
8759 (Incorrectly initialized location for empty right-hand side in GLR):
8760 In yyerror, use the msg arg.
8761 (Corrupted semantic options if user action cuts parse):
8762 (Incorrect lookahead during deterministic GLR):
8763 (Incorrect lookahead during nondeterministic GLR):
8764 Don't name a local var 'index'; it shadows string.h's 'index'.
8765
ed94ef2a
AD
87662006-01-19 Akim Demaille <akim@epita.fr>
8767
8768 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8769 location, not just parts of it.
8770
e9ad4aec
PE
87712006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8772
d6ca7905
PE
8773 * NEWS: Document the fact that multiple %unions are now allowed.
8774 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
8775 * TODO: This feature is now implemented, so remove it from
8776 the wishlist.
d6ca7905 8777
ef1b70e0
PE
8778 * Makefile.maint: Merge with coreutils Makefile.maint.
8779 (CVS_LIST): Use build-aux version if available.
8780 (VERSION_REGEXP): New macro.
8781 (syntax-check-rules): Add sc_no_if_have_config_h,
8782 sc_prohibit_assert_without_use, sc_require_config_h,
8783 sc_useless_cpp_parens.
8784 (sc_obsolete_symbols): Check for O_NDELAY.
8785 (sc_dd_max_sym_length): Track coreutils.
8786 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8787 (sc_useless_cpp_parens): New rule.
8788 (news-date-check): Look for version or today's date.
8789 (changelog-check): Don't require version number near head.
8790 (copyright-check): Use current year instead of hardwiring 2005.
8791 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8792 (announcement): Add --gpg-key-ID.
8793
8794 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8795 with "file system".
8796
2073ce56 8797 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
8798 array. Problem reported by twlevo.
8799 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8800 * src/lalr.c (build_relations): Rely on new sentinel.
8801 * src/gram.c (gram_free): Adjust to new sentinel.
8802
b7691f15
JD
88032006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8804
8805 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8806 yylookaheadNeeds. All uses updated.
8807 (yysplitStack): Rename local yynewLookaheadStatuses to
8808 yynewLookaheadNeeds.
8809 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8810 GLR): In comments, change `lookahead status' to `lookahead need'.
8811
ddee1b06
PH
88122006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8813
8814 * data/glr.c (yysplitStack): A little stylistic rewrite.
8815
12f4614d
PH
88162006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8817
8818 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8819
32c29292
JD
88202006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8821
8822 * doc/bison.texinfo: Fix some typos.
8823 (GLR Semantic Actions): New subsection discussing special
8824 considerations because GLR semantic actions might be deferred.
8825 (Actions): Mention look-ahead usage of yylval.
8826 (Actions and Locations): Mention look-ahead usage of yylloc.
8827 (Special Features for Use in Actions): Add YYEOF entry and mention it
8828 in the yychar entry.
8829 In the yychar entry, remove mention of the local yychar case (pure
8830 parser) since this is irrelevant information when writing semantic
148d66d8 8831 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
8832 yychar is otherwise described as an external variable.
8833 In the yychar entry, don't call it the `current' look-ahead since it
8834 isn't when semantic actions are deferred.
8835 In the yychar and yyclearin entries, add note about deferred semantic
8836 actions.
8837 Add yylloc and yylval entries discussing look-ahead usage.
8838 (Look-Ahead Tokens): When discussing yychar, don't call it the
8839 `current' look-ahead, and do mention yylval and yylloc.
8840 (Error Recovery): Cross-reference `Action Features' when mentioning
8841 yyclearin.
148d66d8 8842 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
8843 look-ahead.
8844 In the yylloc and yylval entries, mention look-ahead usage.
8845
de366a2f 88462006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
8847
8848 * tests/glr-regression.at: Update copyright year to 2006.
8849
bf70fa87
JD
88502006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8851
8852 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8853 use during nondeterministic operation to track which stacks have
8854 actually needed the current lookahead.
8855 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8856 Allocate, deallocate, resize, and otherwise shuffle space for
8857 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8858 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8859 appropriately during nondeterministic operation.
8860 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8861 members to store the current lookahead to be used by the deferred
8862 user action.
8863 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8864 from which the RHS is taken. Set the lookahead members of the new
8865 yySemanticOption according to the lookahead status for stack yyk.
8866 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8867 yyaddDeferredAction.
8868 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8869 members of yySemanticOption before invoking yyuserAction, and then set
8870 them back to their current values afterward.
8871 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8872 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8873 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8874 titles for consistency.
8875 (Leaked merged semantic value if user action cuts parse): In order to
8876 suppress lint warnings, use arguments in merge function, and assign
8877 char value < 128 in main.
8878 (Incorrect lookahead during deterministic GLR): New test case.
8879 (Incorrect lookahead during nondeterministic GLR): New test case.
8880
05449a2c
JD
88812006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8882
de366a2f 8883 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
8884 !yyvaluep as signal that no semantic value is available to print.
8885 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8886 to print a semantic value.
8887
4158e0a1 88882006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 8889
4158e0a1
JD
8890 * tests/glr-regression.at: For consistency with my newer test cases,
8891 don't thank myself.
8892
d659304d
JD
88932006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8894
8895 * data/glr.c (yyresolveValue): When merging semantic options, if at
8896 least one user action succeeds but a later one cuts the parse, then
8897 destroy the semantic value before returning rather than leaking it.
8898 (yyresolveStates): If a user action cuts the parse and thus
8899 yyresolveValue fails, ignore the (unset) semantic value rather than
8900 corrupting the yyGLRState, and empty the semantic options list since
8901 the user actions should have called all necessary destructors.
8902 Simplify code with YYCHK.
8903 * tests/glr-regression.at (Corrupted semantic options if user action
8904 cuts parse): New test case.
8905 (Undesirable destructors if user action cuts parse): New test case.
8906 Before applying any of this patch, this test case never actually failed
8907 for me... but only because the corrupted semantic options usually
8908 masked this bug.
8909 (Leaked merged semantic value if user action cuts parse): New test
8910 case.
8911
6ec2c0f2
AD
89122006-01-05 Akim Demaille <akim@epita.fr>
8913
8914 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8915
1b9c21fb
PE
89162006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8917
8918 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8919 _MSC_VER. Problem reported by Cenzato Marco.
8920 (b4_c_function_def): Use it.
8921 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8922 b4_c_modern.
8923 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8924 than rolling our own.
8925
84866159
AD
89262006-01-04 Akim Demaille <akim@epita.fr>
8927
8928 Also warn about non-used mid-rule values.
8929 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8930 member.
8931 (symbol_list_new): Adjust.
8932 * src/reader.c (symbol_typed_p): New.
8933 (grammar_rule_check): Use it.
8934 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8935 Check its rule.
8936 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8937 Use it.
8938 * tests/actions.at (Exotic Dollars): Adjust.
8939
378f4bd8
AD
89402006-01-04 Akim Demaille <akim@epita.fr>
8941
8942 * src/reader.c (grammar_midrule_action): If $$ is set in a
8943 mid-rule, move the `used' bit to its lhs.
8944 * tests/input.at (Unused values): New.
8945 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8946
e2a21b6f
PE
89472006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8948
54662697
PE
8949 * doc/bison.texinfo (Bison Options): Say more accurately what
8950 --yacc does.
8951 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8952 about declarations in the grammar when in Yacc mode, as POSIX does
8953 not require a diagnostic when the grammar uses extensions.
8954
8955 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8956
073f9288
PE
8957 Warn about dubious constructions like "%token T T".
8958 Reported by twlevo.
8959 * src/symtab.h (struct symbol.declared): New member.
8960 * src/symtab.c (symbol_new): Initialize it to false.
8961 (symbol_class_set): New arg DECLARING, specifying whether
8962 this is a declaration that we want to warn about, if there
8963 is more than one of them. All uses changed.
8964
1221b78a
PE
8965 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8966 Allow multiple %union directives, whose contents concatenate.
8967 * src/parse-gram.y (grammar_declaration): Likewise.
8968 Use muscle_code_grow, so that we don't need stype_line any more.
8969 All uses changed.
8970
8971 * src/muscle_tab.c (muscle_grow): Fix comment.
8972
e2a21b6f
PE
8973 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8974 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8975 Update copyright year to 2006.
8976
8f7e3cf9
AD
89772006-01-03 Akim Demaille <akim@epita.fr>
8978
8979 Have glr.cc pass (some of) the calc.at tests.
8980 * data/glr.cc (b4_parse_param_orig): New.
8981 (b4_parse_param): Improve its definition, and bound it more
8982 clearly in the skeleton.
8983 (b4_epilogue): Append, instead of prepending, in order to keep
8984 #line consistency.
8985 Simplify the generation of auxiliary functions: locations and
8986 purity are mandated.
8987 (b4_global_tokens_and_yystype): Honor it.
8988 * data/location.cc (c++.m4): Don't include it.
8989 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8990 and AT_SKEL_CC_IF.
8991 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8992 AT_LALR1_CC_IF.
8993 Be sure to initialize the first position's filename.
8994 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8995 mandated anyway.
8996 (AT_CHECK_CALC_GLR_CC): New.
8997 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8998
3953ed88
AD
89992006-01-02 Akim Demaille <akim@epita.fr>
9000
9001 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9002 c.m4.
0a96ba81 9003 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
9004 * data/glr.cc: Do not include stack.hh.
9005
9ecafbbf
AD
90062006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9007
9008 * data/glr.c: Reformat whitespace with tabs.
9009 (b4_lpure_formals): Remove this unused m4 macro.
9010 * tests/cxx-type.at: Reformat whitespace with tabs.
9011 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9012 since it's a member. Rename type to isNterm for clarity.
9013
c4d497a0
AD
90142005-12-29 Akim <akim@sulaco.local>
9015
9016 Let glr.cc catch up with symbol_value_print.
9017 * data/glr.cc (b4_yysymprint_generate): Replace by...
9018 (b4_yy_symbol_print_generate): this.
9019 (yy_symbol_print, yy_symbol_value_print): Declare them.
9020
4517da37
PE
90212005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9022
9023 * src/location.h (boundary): Note that a line or column equal
9024 to INT_MAX indicates an overflow.
9025 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9026 (rule_length_overflow, increment_rule_length, add_column_width):
9027 New functions.
9028 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9029 (<SC_BRACED_CODE>"}"):
9030 Use increment_rule_length rather than incrementing it by hand.
9031 (adjust_location, handle_syncline): Diagnose overflow.
9032 (handle_action_dollar, handle_action_at):
9033 Fix bug with monstrosities like $-2147483648.
9034 Remove now-unnecessary checks.
9035 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9036 (convert_ucn_to_byte): Verify assumptions.
9037 (handle_syncline): New arg LOC. All callers changed.
9038 Don't store through a value derived from char const * pointer.
9039
9040 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9041 GCC warnings.
9042
e3233bf6
PE
90432005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9044
9045 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9046 Remove unnecessary forward static decls.
9047
8f3596a6
AD
90482005-12-27 Akim Demaille <akim@epita.fr>
9049
9050 * src/reader.c (grammar_current_rule_check): Also check that $$
9051 is used.
9052 Take the rule to check as argument, hence rename as...
9053 (grammar_rule_check): this.
9054 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9055 Rename as...
9056 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9057 (grammar_midrule_action, grammar_symbol_append): Now static.
9058 * tests/torture.at (input): Don't rely on the default action
9059 being always performed.
9060 * tests/calc.at: "Set" $$ even when the action is "cut" with
9061 YYERROR or other.
9062 * tests/actions.at (Exotic Dollars): Instead of using unused
9063 values, check that the warning is issued.
9064
721be13c
PE
90652005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9066
9067 * NEWS: Improve wording for unused-value warnings.
9068
a0af42fc
AD
90692005-12-22 Akim Demaille <akim@epita.fr>
9070
9071 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9072 (b4_yysymprint_generate): Rename as...
9073 (b4_yy_symbol_print_generate): this.
9074 Generate yy_symbol_print instead of yysymprint.
9075 Generate also yy_symbol_value_print, and use it.
9076
affac613
AD
90772005-12-22 Akim Demaille <akim@epita.fr>
9078
721be13c 9079 * NEWS: Warn about unused values.
affac613
AD
9080 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9081 a `used' member.
9082 (symbol_list_n_get, symbol_list_n_used_set): New.
9083 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9084 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9085 * src/reader.c (grammar_current_rule_check): Check that values are
9086 used.
9087 * src/symtab.c (symbol_print): Accept 0.
9088 * tests/existing.at: Remove the type information.
9089 Empty the actions.
9090 Remove useless actions (beware of mid-rule actions: perl -000
9091 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9092 * tests/actions.at (Exotic Dollars): Use unused values.
9093 * tests/calc.at: Likewise.
9094 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9095 Likewise.
9096
9097 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9098 rule_useful_p.
9099
9d9b8b70
PE
91002005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9101
8bb4c753
PE
9102 Undo 2005-12-01 tentative license wording change. The wording is
9103 still being reviewed by the lawyers, and we don't want to wait for
9104 them before publishing a test release. For now, revert to the
9105 previous wording.
9106 * NEWS: Undo 2005-12-01 change.
9107 * data/glr.c: Revert to previous license wording.
9108 * data/glr.cc: Likewise.
9109 * data/lalr1.cc: Likewise.
9110 * data/location.cc: Likewise.
9111 * data/yacc.c: Likewise.
9112
9d9b8b70
PE
9113 * NEWS: Reword %destructor vs YYABORT etc.
9114 * data/glr.c: Use American spacing, for consistency.
9115 * data/glr.cc: Likewise.
9116 * data/lalr1.cc: Likewise.
9117 * data/yacc.c: Likewise.
9118 * data/yacc.c: Reformat comments slightly.
9119 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9120 for consistency. Fix some spelling errors and reword recently-included
9121 text slightly.
9122 * tests/cxx-type.at: Cast results of malloc, for C++.
9123
2c3b392a
AD
91242005-12-21 Joel E. Denny <address@hidden>
9125
9126 * tests/cxx-type.at: Construct a tree, count the parents of shared
9127 nodes, and free each node once and only once. Previously, the memory
9128 for semantic values was leaked instead.
9129
d6cff4dc
AD
91302005-12-21 Joel E. Denny <address@hidden>
9131
9132 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9133 (yylval, yylloc): If pure, #define to yystackp->yyval and
9134 yystackp->yyloc similar to yychar and yynerrs.
9135 (yyparse): If pure, remove local yylval and yylloc. Add local
9136 yystackp to accommodate pure definitions of yylval and yylloc.
9137 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9138 yylvalp and yyllocp to &yylval and &yylloc.
9139 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9140 namespace. Previously, nerrs and char were missing, but lval and lloc
9141 weren't necessary.
9142 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9143 yylvalp and yyllocp parameters since, if pure, these are now always
9144 accessible through yystackp. If not pure, they are still accessible
9145 globally.
9146 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9147 `if (YYID (N))' to pacify lint.
9148
a85284cf
AD
91492005-12-21 Akim Demaille <akim@epita.fr>
9150
9151 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9152 destroy the RHS symbols of a rule.
9153 * data/yacc.c (yylen): Initialize to 0.
9154 Keep its value to the number of items to possibly shift.
9155 In particular, a regular successful parse that ends on YYFINAL by
9156 a (internal) YYACCEPT must not have yylen != 0.
9157 (yyerrorlab, yyreturn): Pop the RHS.
9158 Reorder a bit to emphasize the `shifting' bits of code.
9159 (YYPOPSTACK): Now accept a number of items to pop.
9160 * data/lalr1.cc: Likewise.
9161 * data/glr.c: Formatting changes.
9162 Use goto instead of fall through.
9163 * doc/bison.texinfo (Destructor Decl): Complete.
9164
d508c281
JMG
91652005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9166
9167 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9168 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9169 * djgpp/config.bat: Replace every occurence of the file name
9170 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9171 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9172 * djgpp/config.sed: Replace every occurence of the file name
9173 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9174 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9175 * djgpp/djunpack.bat: DJGPP specific file.
9176 * djgpp/fnchange.lst: DJGPP specific file.
9177 * djgpp/README.in: Add new information about how to unpack the bison
9178 source on MSDOS and other systems which have 8.3 file name restrictions
9179 using djunpack.bat and fnchange.lst.
9180
3e7a2cd9
PE
91812005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9182
9183 * bootstrap (build_cvs_prefix): Remove; unused.
9184 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9185 when getting gnulib.
9186
91872005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9188
9189 * data/glr.c: Reorder typedef declarations for structs to match order
9190 of struct declarations.
9191 Rename yystack everywhere to yystackp except in yyparse where it's not
9192 a pointer.
9193 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9194 consistency.
9195 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9196 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9197 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9198 lint.
9199
877519f8
PE
92002005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9201
0eca5a39
PE
9202 * tests/sets.at (Accept): Fix typos in regular expression used to
9203 sed out the final state number.
9204
2cec9080
PE
9205 Work around portability problem on Solaris 10: flex-generated
9206 files include <stdio.h> before <config.h>, which messes up
9207 because the latter defines __EXTENSIONS__. Address the problem
9208 by creating two new little files that include <config.h> first,
9209 then include the flex-generated files. Rewrite everyone else
9210 to include <config.h> first, as well.
9211 * lib/timevar.c: Always include "config.h".
9212 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9213 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9214 (EXTRA_bison_SOURCES): New macro.
9215 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9216 * src/system.h: Don't include config.h.
9217 * src/LR0.c: Include <config.h> first.
9218 * src/assoc.c: Likewise.
9219 * src/closure.c: Likewise.
9220 * src/complain.c: Likewise.
9221 * src/conflicts.c: Likewise.
9222 * src/derives.c: Likewise.
9223 * src/files.c: Likewise.
9224 * src/getargs.c: Likewise.
9225 * src/gram.c: Likewise.
9226 * src/lalr.c: Likewise.
9227 * src/location.c: Likewise.
9228 * src/main.c: Likewise.
9229 * src/muscle_tab.c: Likewise.
9230 * src/nullable.c: Likewise.
9231 * src/output.c: Likewise.
9232 * src/parse-gram.y: Likewise.
9233 * src/print.c: Likewise.
9234 * src/print_graph.c: Likewise.
9235 * src/reader.c: Likewise.
9236 * src/reduce.c: Likewise.
9237 * src/relation.c: Likewise.
9238 * src/state.c: Likewise.
9239 * src/symlist.c: Likewise.
9240 * src/symtab.c: Likewise.
9241 * src/tables.c: Likewise.
9242 * src/uniqstr.c: Likewise.
9243 * src/vcg.c: Likewise.
9244
877519f8
PE
9245 * src/parse-gram.y: Fix minor problems uncovered by lint.
9246 (current_lhs, current_lhs_location): Now static.
9247 (current_assoc): Remove unused variable.
9248
9249 Cleanups so that Bison-generated parsers have less lint.
9250 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9251 Prepend /*ARGSUSED*/, for lint's sake.
9252 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9253 definition if 'lint' is defined.
9254 (YYID): New macro (or function, if lint).
9255 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9256 * data/yacc.c: Likewise.
9257 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9258 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9259 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9260 is C++ only.
9261 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9262 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9263 Use YYID(0) rather than 0, for lint.
9264 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9265 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9266
f5228370
PE
92672005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9268
9269 * tests/glr-regression.at
9270 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9271 Close memory leak reported by twlevo.
9272
69ce078b
PE
92732005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9274
6ff99711
PE
9275 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9276 all stacks.
9277 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
9278 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9279 New test case.
9280 (Duplicated user destructor for lookahead): This test now is expected
9281 to succeed.
9282
af3412cd
PE
92832005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9284
32b5b719 9285 * NEWS: Document the following change.
af3412cd
PE
9286 * data/yacc.c: Say "parser skeleton" rather than "file", since
9287 it's no longer just a file.
9288 * data/glr.c: Grant a special exception for C GLR parsers, that
9289 reads like the already-existing exception for C LALR(1) parsers.
9290 * data/glr.cc: Likewise.
9291 * data/lalr1.cc: Likewise.
9292 * data/location.cc: Likewise.
9293 * data/yacc.c: Reword the "written by" statement to clarify that
9294 it was the parser skeleton, not the entire output file.
9295 * data/glr.c: Written by Paul Hilfinger.
9296 * data/glr.cc: Written by Akim Demaille.
9297 * data/lalr1.cc: Likewise.
9298
035aa4a0
PE
92992005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9300
d9963c85
PE
9301 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9302 Fix typos in previous change that broke 'make check'.
9303 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9304 supported in C.
9305 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9306 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9307 We can revert this once things settle down.
9308
035aa4a0
PE
9309 * src/conflicts.c (conflicts_print): Don't print file name twice
9310 when %expect fails because there were no conflicts.
9311 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9312 change.
9313 * tests/conflicts.at (%expect not enough, %expect too much):
9314 (%expect with reduce conflicts): Adjust to new behavior.
9315
93162005-11-18 Akim Demaille <akim@epita.fr>
9317
9318 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9319 errors.
9320 * NEWS: Document this.
9321 * doc/bison.texinfo (Expect Decl): Likewise.
9322
d1ff7a7c
AD
93232005-11-16 Akim Demaille <akim@epita.fr>
9324
9325 Generalize the display of semantic values and locations in traces.
9326 * data/glr.c (yy_reduce_print): Fix indices (again).
9327 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9328 literal integers.
9329 * data/lalr1.cc (yyreduce_print): Rename as...
9330 (yy_reduce_print): this.
9331 Display values and locations.
9332 * data/yacc.c (yy_reduce_print): Likewise.
9333 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9334 (yysymprint): Move higher to be visible from yy_reduce_print).
9335 (yyparse): Adjust.
9336 * tests/calc.at: Adjust the expected length of the traces.
9337
6de5398d
AD
93382005-11-14 Akim Demaille <akim@epita.fr>
9339
9340 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9341 from 1 to N, while values and location start at 0.
9342 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9343
a1373f55
AD
93442005-11-14 Akim Demaille <akim@epita.fr>
9345
9346 * data/glr.c (yy_reduce_print): Fix the $ number.
9347
613d8952
AD
93482005-11-14 Akim Demaille <akim@epita.fr>
9349
9350 "Use" parse parameters.
9351 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9352 * data/glr.c, data/glr.cc: Use them.
9353 * data/glr.c (YYUSE): Have a C++ definition that supports
9354 non-pointer types.
9355
b2741627
AD
93562005-11-14 Akim Demaille <akim@epita.fr>
9357
9358 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9359
5059b5c8
AD
93602005-11-14 Akim Demaille <akim@epita.fr>
9361
42249483
AD
9362 * data/glr.cc: New.
9363 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 9364
4626a15d
AD
93652005-11-12 Akim Demaille <akim@epita.fr>
9366
9367 Let position and location be PODs.
9368 * data/location.cc (position::initialize, location::initialize): New.
9369 (position::position, location::location): Define only if
9370 b4_location_constructors is defined.
9371 * data/lalr1.cc (b4_location_constructors): Define it for backward
9372 compatibility.
9373 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9374
93752005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
9376
9377 * data/lalr1.cc: Move the body of the ctor and dtor into the
9378 parser file (instead of the header).
9379 Wrap the implementations in a "namespace yy".
9380
93812005-11-12 Akim Demaille <akim@epita.fr>
9382
9383 Have glr.c include its header file when created.
9384 * data/glr.c (b4_shared_declarations): New.
9385 Output them verbatim in the parser if !%defines, otherwise
9386 output then in the header file, and include it instead.
9387
1989d947
AD
93882005-11-11 Akim Demaille <akim@epita.fr>
9389
9390 * data/glr.c: Comment changes.
9391
93922005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
9393
9394 When yydebug, report semantic and location values for reductions.
9395 * data/glr.c (yy_reduce_print): Report the semantic values and the
9396 locations.
9397 (YY_REDUCE_PRINT): Adjust.
9398 (yyglrReduce): Use them.
9399 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9400 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9401 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9402 traces.
9403
02998094
AD
94042005-11-10 Akim Demaille <akim@epita.fr>
9405
9406 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9407 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9408 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9409
5210672f
PE
94102005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9411
9412 * m4/cxx.m4, examples/Makefile.am: Don't build
9413 examples/calc++ if no C++ compiler is available. (trivial change)
9414
a8991a1d
AD
94152005-11-09 Akim Demaille <akim@epita.fr>
9416
9417 * src/scan-skel.l: Use a couple of asserts.
9418
36b5e963
AD
94192005-11-03 Akim Demaille <akim@epita.fr>
9420
9421 In some (weird) cases, the final state number is incorrect.
9422 Reported by Alexandre Duret-Lutz.
9423 * src/LR0.c (state_list_append): Remove the computation of
9424 final_state.
9425 (save_reductions): Do it here.
9426 (get_state): Alpha conversion.
9427 (generate_states): Use a for loop.
9428 * src/gram.h (item_number_is_rule_number)
9429 (item_number_is_symbol_number): New.
9430 * src/state.c: Use assert.
9431 * src/system.h: Include assert.h.
9432 * tests/sets.at (Accept): New.
9433
44e7ead1
PH
94342005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9435
9436 * data/glr.c (yyfill): Adjust comment.
36b5e963 9437 (yyresolveAction): Initialize default location properly
44e7ead1
PH
9438 for empty right-hand sides.
9439 (yydoAction): Ditto.
9440 Add comment explaining apparently dead code.
36b5e963
AD
9441 * tests/glr-regression.at
9442 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 9443 New test.
36b5e963 9444
e10a80ee
PE
94452005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9446
9447 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9448 gnulib when interrupted. This fixes some race conditions and
9449 works around some portability problems (one noted by Paul
9450 Hilfinger).
9451
067b32ee
AD
94522005-10-22 Akim <akim@epita.fr>
9453
9454 * Makefile.cfg: Adjust to config -> build-aux.
9455 Reported by twledo.
9456
4b367315
AD
94572005-10-21 Akim Demaille <akim@epita.fr>
9458
9459 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9460 the %parse-params.
9461 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9462 * data/yacc.c (b4_Pure_if): Rename as...
9463 (b4_yacc_pure_if): this.
9464 (YY_SYMBOL_PRINT, yyparse): Adjust.
9465 * doc/bison.texinfo: Formatting changes.
9466
24cc23d9
AD
94672005-10-21 Akim Demaille <akim@epita.fr>
9468
9469 Finish the transition config -> build-aux.
9470 * configure.ac, Makefile.am: Use build-aux.
9471 * config/prev-version, config/announce-gen, config/Makefile.am:
9472 Move to...
9473 * build-aux/prev-version, build-aux/announce-gen,
9474 * build-aux/Makefile.am: here.
9475
d4476375
AD
94762005-10-14 Akim Demaille <akim@epita.fr>
9477
9478 * examples/calc++/test: Use set -x only when VERBOSE.
9479
302c0aee
PE
94802005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9481
9482 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9483 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9484
7625ec2c
AD
94852005-10-13 Akim Demaille <akim@epita.fr>
9486
9487 * src/scan-skel.l: Output the base name parts of the parser and
9488 header file names.
302c0aee 9489 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
9490 additional checks.
9491 Use this to exercise C++ outputs in subdirs.
9492 Reported by Oleg Smolsky.
9493
ba0fe3c7
PE
94942005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9495
9496 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9497 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9498 Problem reported by John P. Hartmann.
9499 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9500 already defined it.
9501
9b8a5ce0
AD
95022005-10-12 Akim Demaille <akim@epita.fr>
9503
9504 * src/parse-gram.y (version_check): Exit 63 to please missing
9505 (stands for "version mismatch).
9506 * tests/input.at, doc/bison.texinfo: Adjust.
9507
4f6e011e
PE
95082005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9509
9510 Work around portability problems with Visual Age C compiler
9511 (xlc and xlC_r) reported by John P. Hartmann.
9512 * data/location.cc (initial_column, initial_line): Remove.
9513 All uses replaced by 0 and 1.
9514 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9515 that xlc complains about.
9516 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 9517 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 9518 as __STDC__.
4d7aa45e
PE
9519 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9520 __STDC_VERSION__. Use it everywhere instead of looking at
9521 __STDC__ and __cplusplus.
4f6e011e 9522
a1b3bf8c
AD
95232005-10-10 Akim Demaille <akim@epita.fr>
9524
9525 * examples/calc++/test: Be quiet unless VERBOSE.
9526
412e44aa
PE
95272005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9528
2a4647a3
PE
9529 * data/c.m4 (yydestruct, yysymprint):
9530 Use YYUSE instead of casting to void.
9531 * data/glr.c (YYUSE): New macro.
9532 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9533 Use it instead of rolling our own.
9534 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9535 (YYCHK1):
9536 Use /*CONSTCOND*/ to suppress lint warnings.
9537 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9538 (YY_STACK_PRINT): Use 'false' not '0'.
9539 (YYUSE): New macro.
9540 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9541 * data/yacc.c (YYUSE): New macro.
9542 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9543 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9544 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9545
9546
412e44aa
PE
9547 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9548 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9549
88c6637f
PE
95502005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9551
2f4f028d
PE
9552 Undo the parts of the unlocked-I/O change that substituted
9553 putc or puts for printf. This might hurt performance a bit,
9554 but some people prefer the printf style.
9555 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9556 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9557 All uses replaced by YYFPRINTF and YYDPRINTF.
9558 * data/yacc.c: Likewise.
9559 * lib/bitset.c (bitset_print): Likewise.
9560 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9561 putc and puts.
9562 * lib/lbitset.c (debug_lbitset): Likewise.
9563 * src/closure.c (print_firsts, print_fderives): Likewise.
9564 * src/gram.c (grammar_dump): Likewise.
9565 * src/lalr.c (look_ahead_tokens_print): Likewise.
9566 * src/output.c (escaped_output): Likewise.
9567 (user_actions_output): Break apart two printfs.
9568 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9569 * src/reduce.c (reduce_print): Likewise.
9570 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9571 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9572
88c6637f
PE
9573 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9574 Use assignments rather than casts-to-void to suppress
9575 unused-variable warnings. This pacifies 'lint'.
9576 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9577 unused-variable warnings.
9578
fb32e373
JMG
95792005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9580
9581 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9582
edb8f44f
PE
95832005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9584
fb9c0b33
PE
9585 Use unlocked I/O for a minor performance improvement on hosts like
9586 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9587 is to use the gnlib unlocked-io module, and to prefer putc and
9588 puts to printf when either will work (since the latter doesn't
9589 come in an unlocked flavor).
9590 * bootstrap (gnulib_modules): Add unlocked-io.
9591 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9592 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9593 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9594 and similarly for puts and putc and printf.
9595 * data/yacc.c: Likewise.
9596 * lib/bitset.c (bitset_print): Likewise.
9597 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9598 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9599 to printf.
9600 * lib/lbitset.c (debug_lbitset): Likewise.
9601 * src/closure.c (print_firsts, print_fderives): Likewise.
9602 * src/gram.c (grammar_dump): Likewise.
9603 * src/lalr.c (look_ahead_tokens_print): Likewise.
9604 * src/output.c (escaped_output): Likewise.
9605 (user_actions_output): Coalesce two printfs.
2f4f028d 9606 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
9607 * src/reduce.c (reduce_print): Likewise.
9608 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 9609 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 9610
edb8f44f
PE
9611 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9612 this confuses xgettext.
9613
b50d2359
AD
96142005-10-02 Akim Demaille <akim@epita.fr>
9615
9616 * bootstrap (gnulib_modules): Add strverscmp.
9617 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9618 * m4/.cvsignore: Add strverscmp.m4.
9619 * src/parse-gram.y (%require): New token, new rule.
9620 (version_check): New.
9621 * src/scan-gram.l (%require): Adjust.
9622 * tests/input.at (AT_REQUIRE): New.
9623 Use it.
9624 * doc/bison.texinfo (Require Decl): New.
9625 (Calc++ Parser): Use %require.
9626
21667f64
AD
96272005-10-02 Akim Demaille <akim@epita.fr>
9628
9629 * data/location.cc: New.
9630
2b81e969
AD
96312005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9632 Akim Demaille <akim@epita.fr>
9633
9634 Make sure -odir/foo.cc creates dir/location.hh etc.
9635 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9636 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9637 (spec_defines_file): Now const.
9638 (dir_prefix): New.
9639 (short_base_name): Remove.
9640 * src/files.c: Adjust.
9641 (dirname.h): Include.
9642 (base_name): Don't prototype it.
9643 (finput): Remove, duplicates gram_in.
9644 (full_base_name, short_base_name): Replace by...
9645 (all_but_ext, all_but_tab_ext): these.
9646 (compute_base_names): Rename as...
9647 (compute_file_name_parts): this.
9648 Update to compute the new variables, including dir_prefix.
9649 Adjust dependencies.
9650 * src/output.c (prepare): Output them.
9651 * src/reader.c: Adjust to use gram_in, not finput.
9652 * src/scan-skel.l (@dir_prefix@): New.
9653
ad6a9b97
JMG
96542005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9655
9656 * lib/subpipe.c: New function end_of_output_subpipe() added
9657 to allow support for non-posix systems. This is a no-op function
9658 for posix systems.
9659
9660 * lib/subpipe.h: New function end_of_output_subpipe() added
9661 to allow support for non-posix systems. This is a no-op function
9662 for posix systems.
9663
9664 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9665 handle the lack of pipe/fork functionality on non-posix systems.
9666
9667 * djgpp/Makefile.maint: DJGPP specific file.
9668
9669 * djgpp/README.in: DJGPP specific file.
9670
9671 * djgpp/config.bat: DJGPP specific configuration file.
9672
9673 * djgpp/config.sed: DJGPP specific configuration file.
9674
9675 * djgpp/config.site: DJGPP specific configuration file.
9676
9677 * djgpp/config_h.sed: DJGPP specific configuration file.
9678
9679 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9680
9681 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9682
fc695704
AD
96832005-10-02 Akim Demaille <akim@epita.fr>
9684
9685 * data/location.cc: New, extract from...
9686 * data/lalr1.cc: here.
9687 (location.hh): Include it after the user prologue, in case the
9688 filename type is defined by the user.
9689 Forward declation location and position before the pre-prologue.
9690 (yyresult_): Rename as...
9691 (yyresult): this, it's a local variable, not an attribute.
9692 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9693
96942005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
9695
9696 * examples/extexi: Restore the #line generation.
9697
fb9712a9
AD
96982005-09-30 Akim Demaille <akim@epita.fr>,
9699 Alexandre Duret-Lutz <adl@gnu.org>
9700
9701 Move the token type and YYSTYPE in the parser class.
9702 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9703 (parser::token): New, from the moved free definition of tokens.
9704 (parser::semantic_value): Now a full definition instead of an
9705 indirection to YYSTYPE.
9706 (b4_post_prologue): No longer included in the header file, but
9707 in the implementation file.
9708 * doc/bison.texi (C+ Language Interface): Update.
9709 * src/parse-gram.y: Support unary %define.
9710 * tests/actions.at: Define global_tokens_and_yystype for backward
9711 compatibility until we update the tests.
9712 * tests/calc.at: Idem.
9713 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9714 to simplify the code.
9715
55f0c7b1
PE
97162005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9717
9718 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9719 Ah, the good old days! Problem reported by Peter Klein.
9720 * bootstrap (gnulib_modules): Add strerror, strtoul.
9721 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9722 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9723
fb9712a9 97242005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
9725
9726 * data/c.m4 (b4_error_verbose_if): New.
9727 * data/lalr1.cc: Use it.
9728 (YYERROR_VERBOSE_IF): Remove.
9729 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9730 parser members, replaced by...
9731 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9732 local variables.
9733 (yysyntax_error_): Takes the state number as argument.
9734 (yyreduce_print_): Use the argument yyrule, not the former
9735 attribute yyn_.
9736
8a6f72f3
PE
97372005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9738
9739 * bootstrap (gnulib_modules): Add verify.
9740 * lib/.cvsignore: Add verify.h.
9741 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9742 * src/system.h (verify): Remove.
9743 Include verify.h instead.
9744 * src/tables.c (tables_generate): Use new API for 'verify'.
9745
0d50976f
PE
97462005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9747
ebc3737e
PE
9748 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9749 local variables whose names begin with 'yy'.
9750 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9751 Trivial changes from Joel E. Denny.
9752
0d50976f
PE
9753 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9754 it itself.
9755 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9756 don't use alloca any more.
9757
9758 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9759 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 9760 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
9761 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9762 to match yacc.c, to test more hosts.
9763
a05b79df
PE
97642005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9765
55289366
PE
9766 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9767 doesn't affect behavior.
9768 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9769 Solaris, AIX, MSC.
9770 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9771 This works a bit better with glibc, if user code has already included
9772 stdlib.h.
9773 * doc/bison.texinfo (Bison Parser): Document that users can't
9774 arbitrarily use malloc and free for other purposes. Document
9775 that <alloca.h> and <malloc.h> might be included.
9776 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9777 user must declare alloca.
9778
a05b79df
PE
9779 * HACKING (release): Forwarn the Translation Project about
9780 stable releses.
9781
3ab2ca22
AD
97822005-09-20 Akim Demaille <akim@epita.fr>
9783
9784 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9785
a9739e7c
PE
97862005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9787
a702593e
PE
9788 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9789 (YYSTACK_ALLOC_MAXIMUM): Use it.
9790 (yysyntax_error): New function.
9791 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9792 multiple syntax errors are reported, and alloca is being used.
9793 Instead, reallocate buffers twice as big each time, so that
9794 we waste at most half the allocated memory. Start with a small
9795 (128-byte) buffer that will suffice in most cases anyway.
9796 Use yysyntax_error to do most of the work.
9797
9798 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9799 yynerrs is the number of errors reported, not the number of
9800 errors encountered.
9801
a9739e7c
PE
9802 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9803 Mark it as expected to fail.
9804 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9805 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9806 Don't start user-code symbols with "yy", to avoid name space problems.
9807
f479c6c6
AD
98082005-09-19 Akim Demaille <akim@epita.fr>
9809
9810 Remove the traits, failed experiment.
9811 It never proved useful, and anyway because of the current
9812 definition, it was not possible to have several specialization of
9813 this traits, making it useless.
9814 * data/lalr1.cc (yy:traits): Remove.
9815 Inline its definitions in the parser class.
9816
e2586f82
AD
98172005-09-19 Akim Demaille <akim@epita.fr>
9818
9819 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9820 least Mac OSX with a /usr/local install of gettext.
9821
2e8cf949
AD
98222005-09-19 Akim Demaille <akim@epita.fr>
9823
9824 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9825 and yytoken for similarity with the other skeletons.
9826
c7fb0b90
AD
98272005-09-19 Akim Demaille <akim@epita.fr>
9828
4e26c69e 9829 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 9830
1bd0deda
PE
98312005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9832
9833 * NEWS: Version 2.1.
9834
9835 * NEWS: Remove notice of yytname change, since it was never in an
9836 official release.
9837 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9838 diagnostic.
9839 * src/output.c (prepare): Likewise.
9840 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9841 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9842 is not defined. This is an awful hack, but it's enough for now.
9843 All callers changed.
9844 * tests/glr-regression-at (make_value): Args are const pointers now,
9845 to avoid GCC warning.
9846 (Duplicated user destructor for lookahead): New test. Currently
9847 skipped. It fails on my host but I'm not sure it'll always fail.
9848
98492005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
9850
9851 * src/symtab.h (struct symbol): Declare the printer and destructor
9852 as const, to avoid accidental calls to free.
9853 (symbol_destructor_set, symbol_printer_set): Adjust.
9854 * src/symtab.c: Adjust.
9855
1bd0deda 98562005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
9857
9858 * data/c.m4 (b4_token_enums): New.
9859 (b4_token_defines): Rename as...
9860 (b4_token_enums_defines): this.
9861 (b4_token_defines): New, output only the #defines.
9862 * data/yacc.c, data/glr.c: Adjust.
9863 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9864 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9865 as default values.
9866
dbcdae2d
AD
98672005-09-16 Akim Demaille <akim@epita.fr>
9868
9869 * data/lalr1.cc (yylex_): Remove, inline its code.
9870 (yyreport_syntax_error_): Remove, replaced by...
9871 (yysyntax_error_): this which returns a string and leaves to the
9872 caller the call to the users' error function.
9873 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9874 Move from members of the parser object...
9875 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9876 to local variables of the parse function.
9877
70d8f291
AD
98782005-09-16 Akim Demaille <akim@epita.fr>
9879
9880 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9881 since it's in Bison's name space.
9882
b47dbebe
PE
98832005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9884
ae199bf1
PE
9885 * data/glr.c (yyresolveValue): Add default case to pacify
9886 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9887
b47dbebe
PE
9888 * NEWS: Document when yyparse started to return 2.
9889 * doc/bison.texinfo (Parser Function): Document when yyparse
9890 returns 2.
9891
9892 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9893 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9894 changed.
9895 (class position): file_name -> filename (reverting). All uses changed.
9896
98972005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9898
9899 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9900 do anything if $@ exists. This reverts part of the 2005-07-07
9901 patch.
9902
00292f66
PE
99032005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9904
9905 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9906 contains obsolete information and isn't worth distributing as a
9907 separate file anyway.
9908 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9909 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9910 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9911 (yyparse): Abort if user code uses longjmp to throw an unexpected
9912 value.
9913
a420f962
PE
99142005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9915
00292f66
PE
9916 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9917 Suggested by twlevo@xs4all.nl.
9918
127287e9
PE
9919 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9920 This avoids a diagnostic from gcc -Wswitch-enum.
9921 Problem reported by twlevo@xs4all.nl.
9922
a420f962
PE
9923 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9924 standards. Use "file name" or "file" or "name", depending on
9925 the context.
9926 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9927 not to hack/foo.tab.c.
9928 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
9929 * data/glr.c: b4_filename -> b4_file_name.
9930 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9931 All uses changed.
9932 (class position): filename -> file_name. All uses changed.
9933 * data/yacc.c: b4_filename -> b4_file_name.
9934 * lib/bitset.h: filename -> file_name in local vars.
9935 * lib/bitset_stats.c: Likewise.
9936 * src/files.c: Likewise.
9937 * src/scan-skel.l ("@output ".*\n): Likewise.
9938 * src/files.c (file_name_split): Renamed from filename_split.
9939 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
9940
99412005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9942
9943 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9944 to accommodate latest gnulib.
9945
9946 * tests/glr-regression.at (Duplicate representation of merged trees):
9947 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9948
9949 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9950 needed.
9951
42a6501d
PE
99522005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9953
9954 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9955 All uses changed. Invoke user destructor after an error during a
9956 split parse (trivial change from Joel E. Denny).
9957
9958 * tests/glr-regression.at
9959 (User destructor after an error during a split parse): New test case.
9960 Problem reported by Joel E. Denny in:
9961 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9962
ef9a1faf
PE
99632005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9964
5b4aaf78
PE
9965 * README-cvs: Give URLs for recommended tools.
9966 Mention Gzip version problem, and bootstrapping issues.
9967 Remove troubleshooting section, as it's somewhat obsolete.
9968
b5240ba5
PE
9969 * bootstrap (no_cache): New var, to accommodate different wget
9970 variants. Use it instead of '-C off'. Problem reported by
9971 twlevo@xs4all.nl.
9972
ef9a1faf
PE
9973 * data/glr.c (yydestroyStackItem): New function.
9974 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9975 debugging information. Problem reported by Joel E. Denny.
9976
e6efa9da
AD
99772005-08-25 Akim Demaille <akim@epita.fr>
9978
9979 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9980
adc90f13
PE
99812005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9982
9983 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9984 Don't invoke destructor on unresolved entries.
9985 * tests/glr-regression.at
9986 (User destructor for unresolved GLR semantic value): New test case.
9987 Problem reported by Joel E. Denny in:
9988 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9989
f9315de5
PE
99902005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9991
15d29c1f
PE
9992 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9993 Add strnlen.c.
9994 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9995 lib-prefix.m4, po.m4.
9996
dd5f2af2
PE
9997 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9998 in yydestruct diagnostic, since it might not be an error.
9999 Problem reported by Joel Denny near end of
10000 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 10001 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
10002 * data/yacc.c (yyreturn): Likewise.
10003 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10004
10005 * src/files.c: Remove obsolete FIXME comment.
10006
10007 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10008 with the other templates, and to fix bogus run-on messages such
10009 as the one reported at the end of
10010 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10011 All callers changed to avoid the newline.
10012 (yyprocessOneStack): Output two lines rather than one, to accommodate
10013 the above change. This changes the debug output format slightly.
10014
f9315de5
PE
10015 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10016 reported by Joel E. Denny in
10017 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10018 (trivial change).
10019 * tests/glr-regression.at (Duplicate representation of merged trees):
10020 New test, from Joel E. Denny in:
10021 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10022 * THANKS: Add Joel E. Denny.
10023
10024 * configure.ac (AC_INIT): Bump to 2.0c.
10025
04098407
PE
100262005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10027
10028 * NEWS: Version 2.0b.
10029
ca5d2013
PE
10030 * Makefile.am (SUBDIRS): Put examples before tests, so that
10031 "make check" doesn't finish with "All 1 tests passed".
10032
3d54b576
PE
10033 * tests/regression.at (Token definitions): Don't rely on
10034 AT_PARSER_CHECK for data that contains backslashes. It currently
10035 uses 'echo', and 'echo' isn't portable if its argument contains
10036 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10037 that the byte '\0xff' is not printable in the C locale; it is,
10038 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10039 not printable, so use '\0x81' to test.
10040
d53ae497
PE
10041 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10042 version of GCC, since the macro is used with non-GCC compilers.
10043
fc01665e
PE
10044 Fix core dump reported by Pablo De Napoli in
10045 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10046 * tests/regression.at (Invalid inputs with {}): New test.
10047 * src/parse-gram.y (token_name): Translate type before using
10048 it as an index.
10049
04098407
PE
10050 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10051 the user's name space. All uses changed to __attribute__
10052 ((__unused__)).
10053 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10054 Add __attribute__ ((__noreturn__)).
10055
10056 * etc/clcommit: Remove. We weren't using it, and it failed
10057 "make maintainer-distcheck".
10058 * Makefile.maint: Merge from coreutils.
10059 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10060 (syntax-check-rules): Change list of rules as described below.
10061 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10062 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10063 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10064 (sc_trailing_space): New rules.
10065 (sc_xalloc_h_in_src): Remove.
10066 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10067 (sc_space_tab, sc_error_exit_success, sc_changelog):
10068 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10069 (makefile-check, po-check, author_mark_check):
10070 (makefile_path_separator_check, copyright-check):
10071 Use grep -n, to make it easier to find violations.
10072 Use CVS_LIST and CVS_LIST_EXCEPT.
10073 (header_regexp, h_re): Remove.
10074 (dd_c): New macro.
10075 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10076 (my-distcheck): Use more-modern GCC flags.
10077 (signatures, %.asc): Remove.
10078 (rel-files, announcement): Remove signatures.
10079 Restore old updating code, even though we don't use it, so
10080 that we're the same as coreutils.
10081 (alpha, beta, major): Depend on news-date-check.
10082 Make the upload commands.
10083
10084 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10085 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10086 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10087 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10088 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10089 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10090 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10091 * tests/sets.at: Likewise.
10092
10093 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10094 we comment out the Autoconf version number.
10095 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10096 it's error-prone and "make maintainer-distcheck" rejects it.
10097
10098 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10099 Indent calls to "error" to pacify "make maintainer-distcheck",
10100 when the calls are not intended to be translated.
10101 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10102
10103 * src/Makefile.am (DEFS): Use +=, to pacify
10104 "make maintainer-distcheck".
10105 (bison_SOURCES): Add scan-skel.h.
10106 (sc_tight_scope): New rule, from coreutils.
10107
10108 * src/files.c (src_extension, header_extension):
10109 Now static, not extern.
10110 * src/getargs.c (short_options): Likewise.
10111 * src/muscle_tab.c (muscle_table): Likewise.
10112 * src/parse-gram.y (current_class, current_type, current_prec):
10113 Likewise.
10114 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10115 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10116 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10117 void, to avoid warning when NLS is disabled.
10118 * src/output.c: Include scan-skel.h.
10119 (scan_skel): Remove decl, since scan-skel.h does this.
10120 (output_skeleton):
10121 Indent calls to "error" to pacify "make maintainer-distcheck".
10122 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10123 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10124 "make maintainer-distcheck".
10125 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10126 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10127 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10128 (skel_lex_destroy, scan_skel): Move these decls to...
10129 * src/scan-skel.h: New file.
10130 * src/uniqstr.c (uniqstr_assert):
10131 Indent calls to "error" to pacify "make maintainer-distcheck".
10132
10133 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10134 not @VAR@.
10135
10136 * tests/torture.at: Revamp to avoid misuse of atoi that
10137 "make maintainer-distcheck" complained about.
10138
10139 * examples/extexi (message): Don't print a message more than once,
10140 and omit line-number decoration that makes Emacs compile think
10141 that informative messages are worth worrying about.
10142
101432005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10144
10145 * configure.ac: Update version number.
10146
10147 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10148 accidentally.
10149 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10150 autogenerated by the maintainer.
10151 * examples/calc++/.cvsignore: Add *.yy.
10152
10153 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10154 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10155 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10156
10157 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10158
10159 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10160 from maintainer-distcheck about casting the argument of 'free'.
10161
10162 * NEWS: Mention recent yytname changes.
10163 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10164
10165 * bootstrap: For translations that have not yet been upgraded to
10166 the new runtime-po domain, prime the pump by extracting the
10167 relevant strings from the obsolete translations. This code can be
10168 removed once the bison-runtime domain has been translated by each
10169 team.
10170
10171 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10172 now that token names are already quoted.
10173
10174 Fix problem reported by Anthony Heading.
10175 * data/glr.c (YYTOKEN_TABLE): New macro.
10176 (yytname): Define if YYTOKEN_TABLE.
10177 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10178 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10179 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10180 * src/output.c (prepare_symbols): Output token_table_flag.
10181
0ffda363
PE
101822005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10183
10184 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10185 again if the first call fails.
10186
10187 * data/glr.c (yytnamerr): New function.
10188 (yyreportSyntaxError): Use it to dequote most string literals.
10189 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10190 with other skeletons. All uses changed.
10191 (yytnameerr_): New function.
10192 (yyreport_syntax_error): Use it to dequote most string literals.
10193 * data/yacc.c (yytnamerr): New function.
10194 (yyerrlab): Use it to decode most string literals.
10195 * doc/bison.texinfo (Decl Summary, Calling Convention):
10196 Clarify quoting convention of yytname.
10197 * src/output.c (prepare_symbols): Quote all names. This undoes
10198 the 2005-04-17 change, which is now accomplished (mostly) via
10199 changes in the parsers as described above.
10200 * tests/regression.at (Token definitions, Web2c Actions):
10201 Undo most 2005-04-17 change here, too.
10202
102032005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10204
10205 Fix more problems reported by twlevo@xs4all.nl.
10206 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10207 remove trailing spaces. This loses the exit status of ./types,
10208 and isn't needed since ./types shouldn't be emitting trailing
10209 spaces.
10210 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10211 as the stack isn't valid in that case.
10212
10213 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10214 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10215 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10216 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10217 is used.
10218 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10219 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10220 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10221 Likewise.
10222
10223 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10224 overly-picky compilers that reject 'char *foo = "bar";'.
10225
10226 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10227 to FILE * parameter, not to stderr. This fixes a typo introduced
10228 in the 2005-07-12 change.
10229
10230 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10231 warnings from GCC 4.
10232
10233 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10234 (yyglrShiftDefer, yysplitStack):
10235 Remove unused parameters b4_pure_formals. All uses changed.
10236 (yyglrShift): Remove unused parameters b4_user_formals.
10237 All uses changed.
10238 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10239
6100a9aa
PE
102402005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10241
258b75ca
PE
10242 Destructor cleanups and regularization among the three skeletons.
10243 * NEWS: Document the behavior changes.
10244 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10245 stack before failing, as the cleanup code will do it for us now.
10246 * data/lalr1.cc (yyerrlab): Likewise.
10247 * data/glr.c (yyparse): Pop everything off the stack before
10248 freeing it, so that destructors get called properly.
10249 * data/lalr1.cc (yyreturn): Likewise.
10250 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10251 This is more consistent.
10252 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10253 why destructors might be called. 1.875 -> 2.1.
10254 (Destructor Decl, Decl Summary, Table of Symbols):
10255 Some English-language cleanups for %destructor.
10256 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10257 Add output line for destructor of start symbol.
10258 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10259 because of that same extra output line.
10260
1a059451
PE
10261 * NEWS: Document minor wording changes in diagnostics of
10262 Bison-generated parsers.
10263 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10264 Remove unused formals. All uses changed.
10265 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10266 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10267 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10268 Rename yyoverflowab to yyexhaustedlab.
10269 When memory exhaustion occurs during syntax-error reporting,
10270 report it separately rather than in a single diagnostic; this
10271 eases translation.
10272 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10273 (Memory Exhausted): Renamed from Parser Stack Overflow.
10274 Revamp wording slightly to prefer "memory exhaustion".
10275 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10276
97460c78
PE
10277 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10278
30757c8c
PE
10279 Add i18n support to the GLR skeleton. Partially fix the C++
10280 skeleton; a C++ expert needs to finish this. Remove debugging
10281 msgids; there's little point to having them translated, since they
10282 can be understood only by someone who can read the
10283 (English-language) source code.
10284
10285 Generate runtime-po/bison-runtime.pot automatically, so that we
10286 don't have to worry about garbage getting in that file. We'll
10287 make sure after the next official release that old msgids don't
10288 get lost. See
10289 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10290
10291 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10292 Now auto-generated.
10293 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10294 Fix typos in explanations of the runtime file.
10295 * bootstrap: Change gettext keyword from YYI18N to YY_.
10296 Use standard Makefile.in.in in runtime-po, since we'll arrange
10297 for backward-compatible bison-runtime.po files in a different way.
10298 * data/glr.c (YY_): New macro, from yacc.c.
10299 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10300 Translate messages intended for users.
10301 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10302 the wording in the other skeletons. We don't know that the memory
10303 is virtual.
10304 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10305 Use same method that yacc.c uses.
10306 Don't translate debugging messages.
10307 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10308 it doesn't work (yet), and requires C++ expertise to fix.
10309 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10310 Move defn to a more logical place, to be consistent with other
10311 skeletons.
10312 Don't translate debugging messages.
10313 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10314 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10315 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10316 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10317
ac8c5689
PE
10318 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10319 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10320 void, not int.
10321 * tests/glr-regression.at (Badly Collapsed GLR States):
10322 Likewise.
10323 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10324 yylex should return 0 at EOF rather than aborting.
10325
6100a9aa
PE
10326 Improve tests for stack overflow in GLR parser.
10327 Problem reported by twlevo@xs4all.nl.
10328 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10329 All uses removed.
10330 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10331 can handle the problem.
10332 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10333 (yyparse): New local variable yyresult to record the result.
10334 Use result of setjmp to set it, rather than storing itinto
10335 struct.
10336 (yyDone): Remove label.
10337 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10338 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10339 if YYABORT is used).
10340 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10341 yyparse status; put status > 1 into diagnostic.
10342 Check that status==2 works.
10343 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10344 Use exit status 3 for failure to open (which shouldn't happen).
10345
15f40952
PE
103462005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10347
67fd79c4
PE
10348 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10349 1 on syntax error; just let yyparse do its thing.
10350 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10351 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10352 (Exploding the Stack Size with Alloca):
10353 (Exploding the Stack Size with Malloc):
10354 Expect exit status 2, not 1, since the parser is supposed to blow
10355 its stack. Problem reported by twlevo@xs4all.nl.
10356
15f40952
PE
10357 * data/glr.c (yyparse): Don't assume that the initial calls
10358 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10359 Print a stack-overflow message and fail instead.
10360 Initialize the line-number information before creating the stack,
10361 so that the stack-overflow message can report line zero safely.
10362
f32c66b5
PE
103632005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10364
a22ff96f 10365 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
10366 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10367 (yyuserMerge): Provide a default case if b4_mergers is empty.
10368 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10369 * tests/glr-regression.at
10370 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 10371 Add casts to pacify C++ compilers.
1beb0b24
PE
10372 * tests/glr-regression.at (Improper merging of GLR delayed action
10373 sets): Declare yylex before using it.
f32c66b5 10374 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
10375 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10376 test for valgrind; valgrind is independent of g++.
10377 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10378 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10379 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10380 Use a destructor, so that we can expand the stack. Change
10381 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 10382
d741bd1b
PE
103832005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10384
10385 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10386 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10387
0410a6e0
PE
103882005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10389
10390 * PACKAGING: New file, suggested by Bruno Haible and taken from
10391 similar wording in gettext's PACKAGING file.
10392 * NEWS: Mention PACKAGING.
10393 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10394
f7ab6a50
PE
103952005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10396
baf785db 10397 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
10398 * bootstrap: Get runtime translations into runtime-po.
10399 Create runtime-po files automatically, if possible.
10400 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10401 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10402 does not infringe on the user's name space.
10403 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10404 * doc/bison.texinfo (Internationalization): Revamp the English
10405 and Texinfo syntax a bit, to try to make it clearer.
10406 (Bison Options, Option Cross Key): Mention --print-localedir.
10407 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10408 YYENABLE_NLS. Quote a bit more.
10409 * runtime-po/.cvsignore: New file.
10410 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10411 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10412 * runtime-po/quot.sed: Likewise.
10413 * runtime-po/boldquot.sed: Likewise.
10414 * runtime-po/en@quot.header: Likewise.
10415 * runtime-po/en@boldquot.header: Likewise.
10416 * runtime-po/insert-header.sin: Likewise.
10417 * runtime-po/remove-potcdate.sin: Likewise.
10418 * runtime-po/Makevars: Likewise.
10419 * runtime-po/LINGUAS: Likewise.
10420 * runtime-po/de.po: Likewise; we will rely on the translation project
10421 to maintain this, so "bootstrap" should get it.
0410a6e0 10422 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
10423 its value.
10424 * src/main.c (main): Bind the bison-runtime domain, too.
10425
104262005-07-12 Bruno Haible <bruno@clisp.org>
10427
10428 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10429 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10430 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10431 * runtime-po: New directory.
10432 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10433 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10434 * runtime-po/Rules-quot: New file, copied from po/.
10435 * runtime-po/quot.sed: Likewise.
10436 * runtime-po/boldquot.sed: Likewise.
10437 * runtime-po/en@quot.header: Likewise.
10438 * runtime-po/en@boldquot.header: Likewise.
10439 * runtime-po/insert-header.sin: Likewise.
10440 * runtime-po/remove-potcdate.sin: Likewise.
10441 * runtime-po/Makevars: New file.
10442 * runtime-po/POTFILES.in: New file.
10443 * runtime-po/LINGUAS: New file.
10444 * runtime-po/bison-runtime.pot: New file.
10445 * runtime-po/de.po: New file.
10446 * m4/bison.m4: New file.
10447 * Makefile.am (SUBDIRS): Add runtime-po.
10448 (aclocaldir, aclocal_DATA): New variables.
10449 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10450 Define aclocaldir.
10451 * src/getargs.c (usage): Document --print-localedir option.
10452 (PRINT_LOCALEDIR_OPTION): New enum item.
10453 (long_options): Add --print-localedir option.
10454 (getargs): Handle --print-localedir option.
10455 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10456 (Internationalization): New section.
10457
22dda0f0
AD
104582005-07-12 Akim Demaille <akim@epita.fr>
10459
10460 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10461 for consistency with the rest of the code.
10462 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10463 Add separators.
10464
82b248ad
AD
104652005-07-12 Akim Demaille <akim@epita.fr>
10466
10467 * src/parse-gram.y: Use %printer instead of YYPRINT.
10468
fa0e9314
AD
104692005-07-12 Akim Demaille <akim@epita.fr>
10470
867a3e00
AD
10471 * src/symtab.h, src/symtab.c (symbol_print): New.
10472 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10473 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10474
104752005-07-12 Akim Demaille <akim@epita.fr>
10476
10477 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
10478 b4_at_dollar and b4_dollar_dollar.
10479
e054b190
PE
104802005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10481
10482 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10483 and Pennello's paper.
10484
34160ec4
PE
104852005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10486
407d4a75
PE
10487 * data/yacc.c (yyparse): Undo previous patch. Instead,
10488 set yylsp[0] and yyvsp[0] only if the initial action
10489 sets yylloc and yylval, respectively.
10490
34160ec4
PE
10491 * data/yacc.c (yyparse): In the initial action, set
10492 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10493 This avoids the use of undefined variables if the initial
10494 action does not set yylloc and/or yylval.
10495
c3d5a4a7
PE
104962005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10497
b34d96c1
PE
10498 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10499 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10500 Remove from CVS. These files are automatically generated.
10501 * examples/extexi: Clarify that this file is now part of Bison,
10502 not GNU M4, and that it works with any POSIX-compatible Awk.
10503 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10504 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10505 so that we also get calc++-parser.yy. Geneate it.
10506 Use $(AWK), not gawk, since any conforming Awk will do.
10507 Put comment before action, since older 'make' can't handle comment
10508 in action.
10509 $(BUILT_SOURCES): List all built sources, not just some of them.
10510 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10511 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10512 $($(calc_sources_generated)): Remove unnecessary test for existence
10513 of target. (This had a shell syntax error anyway; a stray "x".)
10514 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10515 calc++-parser.yy.
10516 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10517
c3d5a4a7
PE
10518 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10519 implied by the other modules.
10520
828c373b
AD
105212005-07-06 Akim Demaille <akim@epita.fr>
10522
10523 Bind examples/calc++ to the package.
10524 * examples/calc++/Makefile: Remove, replaced by...
10525 * examples/calc++/Makefile.am: ... this new file.
10526 * examples/calc++/test: Remove input.
10527 * examples/calc++/compile: Remove.
10528 * examples/Makefile.am: New.
10529 * configure.ac, Makefile.am: Adjust.
10530 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10531
63cb01d6
PE
105322005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10533
fd2df2ed
PE
10534 * data/glr.c (yyFail): Drastically simplify; since the format argument
10535 never had any % directives, we can simply pass it to yyerror.
10536 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10537 be modified later, as that is the usual style in glr.c.
10538 Problems reported by Paul Hilfinger.
10539
63cb01d6
PE
10540 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10541 and size overflow errors.
10542 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10543 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10544 (YYSIZEMAX): New macro.
10545 (yystpcpy): New function, taken from yacc.c.
10546 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10547 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10548 so that we don't have to maintain their signatures.
10549 (yyFail): Check for buffer overflow, by using vsnprintf rather
10550 than vsprintf. Allocate a bigger buffer if possible.
10551 Report an error if buffer allocation fails.
10552 (yyStackOverflow): New function.
10553 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10554 the initialization was successful. It might fail if storage was
10555 exhausted.
10556 (yyexpandGLRStack): Add more checks for storage allocation failure.
10557 Use yyStackOverflow to report failures.
10558 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10559 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10560 Don't assume stack number fits in int.
10561 (yysplitStack): Check for storage allocation failure.
10562 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10563 can print diagnostics on storage allocation failure. All callers
10564 changed.
10565 (yyresolveValue): Use yybool for boolean.
10566 (yyreportSyntaxError): Check for size-calculation overflow.
10567 This code is taken from yacc.c.
10568 (yyparse): Check for storage allocation errors when allocating
10569 the initial stack.
10570
1c59e0a1
AD
105712005-07-05 Akim Demaille <akim@epita.fr>
10572
10573 Extract calc++ from the documentation.
10574 * doc/bison.texinfo (Calc++): Add the extraction marks.
10575 * examples/extexi: New, from the aborted GNU Programming 2E.
10576 Separate the different paragraph of a file with empty lines.
10577 * examples/Makefile: Use it to extract the whole calc++ example.
10578
8a0adb01
AD
105792005-06-24 Akim Demaille <akim@epita.fr>
10580
10581 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10582 class typedefs.
10583
12545799
AD
105842005-06-22 Akim Demaille <akim@epita.fr>
10585
10586 * doc/bison.texinfo (C++ Language Interface): First stab.
10587 (C++ Parsers): Remove.
10588
99be0235
AD
105892005-06-22 Akim Demaille <akim@epita.fr>
10590
10591 * data/lalr1.cc (yylex_): Honor %lex-param.
10592
0ffd4fd1
AD
105932005-06-22 Akim Demaille <akim@epita.fr>
10594
10595 Start a set of simple examples.
10596 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10597 * examples/calc++/calc++-driver.hh,
10598 * examples/calc++/calc++-parser.yy,
10599 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10600 * examples/calc++/compile, examples/calc++/test: New.
10601
0925ebb4
PE
106022005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10603
10604 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10605 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10606 which stems from the 2005-05-27 patch.
10607
43d3b664
PH
106082005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10609
10610 * data/glr.c: Modify treatment of unused parameters to permit use
10611 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10612
3062864d
PE
106132005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10614
10615 Fix infringement on user name space reported by Janos Zoltan Szabo.
10616 * data/yacc.c (yyparse): strlen -> yystrlen.
10617
989b5b8e
AD
106182005-05-30 Akim Demaille <akim@epita.fr>
10619
10620 * data/lalr1.cc (_): New.
10621 Translate the various messages.
10622
bedf57f5
PE
106232005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10624
10625 Fix infringement on user name space reported by Bruno Haible.
10626 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10627 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10628 the user's name space.
10629 (alloca): Include <stdlib.h> to get it, if it's not built in.
10630 (YYMALLOC, YYFREE): Define only if needed.
10631 (malloc, free): Declare, but only if needed, as this infringes on
10632 the user name space.
10633
4d1801f1
PE
106342005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10635
10636 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10637 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10638 with %d format.
10639 * lib/ebitset.c (min, max): Undef before defining.
10640 * lib/vbitset.c (min, max): Likewise.
10641 * lib/subpipe.c (create_subpipe): Save local variables in case
10642 vfork clobbers them.
10643
106442005-05-24 Bruno Haible <bruno@clisp.org>
10645
10646 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10647 error message syntax used by gcc-4.0.
10648
b94a9e1e
PE
106492005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10650
85ac3861
PE
10651 * README: Mention m4 1.4.3. Remove obsolete advice about
10652 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10653
b94a9e1e
PE
10654 * bootstrap: Remove workaround for problem I encountered with
10655 gettext 0.14.1; it seems to be fixed now.
10656
51c30d21
PE
106572005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10658
009ce67d
PE
10659 * NEWS: Version 2.0a.
10660
f2a97c62
PE
10661 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10662 the previous change.
10663
c8775f93
PE
10664 Various maintainer cleanups.
10665 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10666 conftest*, for benefit of CVS commands run at the same time as
10667 "configure". Add build-aux, since "bootstrap" now creates it and
10668 its subfiles.
10669 * Makefile.cfg (move_if_change): Remove.
10670 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10671 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10672 (po_repo, do-po-update, po-update, wget_files, get-targets):
10673 (config.guess-url_prefix, config.sub-url_prefix):
10674 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10675 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10676 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10677 Remove.
10678 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10679 this is now the recommended name.
10680 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10681 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10682 ylwrap. These files now go into build-aux.
10683 * config/move-if-change: Remove.
10684 * config/prev-version.txt: Bump from 1.75 to 2.0.
10685
3ea5f0ec
PE
10686 * bootstrap: Add stdio-safer, unistd-safer modules.
10687 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10688 we don't need it).
10689 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10690 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10691 * lib/subpipe.c: Include "unistd-safer.h".
10692 (create_subpipe): Make sure all the newly-created
10693 file descriptors are > 2, so that diagnostics don't
10694 get sent down them (which might cause Bison to hang, in theory).
10695 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10696 * src/files.c (xfopen): Use fopen_safer, not fopen.
10697
51c30d21
PE
10698 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10699 yesterday's yacc.c fix.
10700
cea1469d
PE
107012005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10702
3ea5f0ec
PE
10703 * data/glr.c, data/lalr1.cc: Update copyright date.
10704
cea1469d
PE
10705 Fix a destructor bug reported by Wolfgang Spraul in
10706 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10707 * data/yacc.c (yyabortlab): Don't call destructor, and
10708 don't set yychar to EMPTY.
10709 (yyoverflowlab): Don't call destructor.
10710 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10711 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10712 since we no longer output the message "discarding lookahead token
10713 end of input ()".
10714
5e6f62f2
PH
107152005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10716
10717 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10718 fix a small glitch in debugging output.
10719 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10720 after YY_SYMBOL_PRINT where needed.
10721
10722 (struct yyGLRState): Add some comments.
10723 (struct yySemanticOption): Add some comments.
10724 (union yyGLRStackItem): Add comment.
10725
10726 (yymergeOptionSets): Correct this to properly perform the union,
10727 avoiding infinite reported by Michael Rosien.
10728 Update comment.
10729
10730 * tests/glr-regression.at: Add test for GLR merging error reported
10731 by M. Rosien.
cea1469d 10732
0fb669f9
PE
107332005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10734
10735 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10736 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10737 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10738 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10739 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10740 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10741 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10742 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10743 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10744 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10745 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10746 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10747 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10748 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10749 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10750 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10751 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10752 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10753 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10754 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10755 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10756 src/output.h, src/parse-gram.c, src/parse-gram.h,
10757 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10758 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10759 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10760 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10761 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10762 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10763 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10764 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10765 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10766 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10767 tests/reduce.at, tests/regression.at, tests/sets.at,
10768 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10769 Update FSF postal mail address.
10770
51f4735e
PE
107712005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10772
10773 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10774 Problem reported by Ralf Menzel.
10775
80ce3401
PE
107762005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10777
10778 * tests/actions.at: Test that stack overflow invokes destructors.
10779 From Marcus Holland-Moritz.
10780 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10781 from here....
10782 (yyreturn): to here. That way, destructors are called properly
10783 even if the stack overflows, or the user calls YYACCEPT or
10784 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10785 (yyoverflowlab): Destroy the lookahead.
10786
107872005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10788
10789 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10790
72f000b0
PE
107912005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10792
10793 * NEWS: Bison-generated C parsers no longer quote literal strings
10794 associated with tokens.
10795 * src/output.c (prepare_symbols): Don't escape strings,
10796 since users don't want to see C escapes.
10797 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10798 in diagnostics.
c19683bb 10799 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
10800 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10801
1094323f
PE
108022005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10803
10804 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10805 the data size is known to be too small and we can't increase it.
10806 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10807
ca407bdf
PE
108082005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10809
10810 * src/parse-gram.y: Include quotearg.h.
10811 (string_as_id): Quote $1 before using it as a key, since the
10812 lexer no longer quotes it for us.
10813 (string_content): Don't strip quotes, since lexer no longer
10814 quotes it for us.
10815 * src/scan-gram.l: Include quotearg.h.
10816 ("\""): Omit quote.
10817 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10818 a key, since the rest of the lexer doesn't quote it.
10819 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10820 * tests/regression.at (Token definitions): Check for backslashes
10821 in token strings.
10822
10823 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10824 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10825 (yyparse): Revamp code to generate long syntax error message, to
10826 make it easier to translate, and to avoid problems with arithmetic
10827 overflow. Change "virtual memory" to "memory" in diagnostic, since
10828 we don't know whether the memory is virtual.
10829
1ce59070
PE
108302005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10831
10832 * NEWS: Bison-generated C parsers now use the _ macro to
10833 translate strings.
10834 * data/yacc.c (_) [!defined _]: New macro.
10835 All English strings wrapped inside this macro.
10836 * doc/bison.texinfo (Bison Parser): Document _.
10837 * po/POTFILES.in: Include src/parse-gram.c, since it now
10838 includes translateable strings that parse-gram.y doesn't.
10839
a749a695
PE
108402005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10841
10842 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10843 reverting the 2004-10-11 change to this function.
10844 (symbol_check_alias_consistency): Don't call symbol_type_set
10845 if the type name is already correct.
10846 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10847
8fb1053b
PE
108482005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10849
10850 * tests/regression.at (Token definitions): Don't use a token named
10851 c, as that generates a "#define c ..." that runs afoul of buggy
10852 stdlib.h that uses the identifier c as a member of struct
10853 drand48_data. Problem reported by Horst Wente.
10854
ff498c4a
PE
108552005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10856
10857 * bootstrap: Change translation URL from
10858 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10859 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10860 redirection glitches. Problem reported by twlevo@xs4all.nl.
10861
65211d70
PE
108622005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10863
10864 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10865 after operands; POSIX says this isn't portable for the c99 command.
10866
9577fb1f
PE
108672005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10868
10869 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10870 immediately if a data overrun has occurred; this may help us track
10871 down what may be a spurious failure on MacOS.
10872
78b178f7
PE
108732005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10874
a2599d0f
PE
10875 Respond to problems reported by twlevo@xs4all.nl.
10876
10877 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10878
78b178f7
PE
10879 * src/vcg.h: Comment fix.
10880 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10881 (G_CMAX): Change to -1 instead of INT_MAX.
10882
10883 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 10884
7296e729
PE
108852005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10886
10887 * src/tables.c (state_number_to_vector_number): Put it inside an
10888 "#if 0", since it's not currently used. Problem reported by
10889 Roland McGrath.
10890
05ac60f3
PE
108912005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10892
10893 * src/output.c (escaped_output): Renamed from
10894 escaped_file_name_output, since we now use it for symbol tags as
10895 well. All uses changed.
10896 (symbol_destructors_output, symbol_printers_output):
10897 Escape symbol tags too.
10898 Problem reported by Matyas Forstner in
10899 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10900
10901 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10902 not needed.
10903 * src/output.c (user_actions_output, token_definitions_output,
10904 symbol_destructors_output, symbol_printers_output): Likewise.
10905 * src/reader.c (prologue_augment): Likewise.
10906 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10907
10908 * src/vcg.c (output_edge): Don't quote linestyle arg.
10909 Problem reported by twlevo@xs4all.nl.
10910
7eb453ac
PE
109112005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10912
10913 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10914 example, reported by Derek M Jones. Also, make the example even
10915 more outrageous, to better illustrate how bad the problem is.
10916
4c04c52a
PE
109172005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10918
10919 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10920 putsym. Typo reported by Sebastian Piping.
10921
a61e1620
PE
109222005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10923
10924 * doc/bison.texinfo (Language and Grammar): some -> same
10925 (Epilogue): int he -> in the
10926 Typos reported by Sebastian Piping via Justin Pence.
10927
9ec93868
PE
109282005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10929
10930 * tests/glr-regression.at (Improper handling of embedded actions
10931 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10932 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10933 with dollar signs in test names.
10934 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10935 for a similar reason.
10936
73ce7e7e
PE
109372005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10938
10939 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10940 wants to redefine G_VIEW.
10941
2e72b98e
PE
109422005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10943
10944 * src/vcg.c (get_view_str): Remove case for normal_view.
10945 Problem reported by twlevo@xs4all.nl.
10946
e0d634e5
PE
109472005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10948
ccf830a4
PE
10949 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10950 Problem reported by twlevo@xs4all.nl.
10951
e0d634e5
PE
10952 * doc/bison.texinfo: Change @dircategory from "GNU programming
10953 tools" to "Software development". Requested by Richard Stallman
10954 via Karl Berry.
10955
7bbc8cb0
PE
109562005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10957
10958 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10959 Problem reported by twlevo@xs4all.nl.
10960
08b770bc
PE
109612005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10962
10963 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10964 keyword; it's not needed with modern compilers, and it doesn't
10965 affect correctness with older compilers. Suggested by
10966 twlevo@xs4all.nl.
10967
95f22ad2
PE
109682005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10969
10970 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10971 gcc -Wswitch-default.
10972 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10973 * data/yacc.c (yyparse): Likewise.
10974
d229d15c
PE
109752005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10976
10977 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10978 already. Let config.h define any nonstandard values.
10979
ecadd90f
PE
109802005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10981
10982 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10983 for the benefit of slower hosts. Problem reported by
10984 Nelson H. F. Beebe.
10985
213744b5
PE
109862005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10987
10988 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10989 being defined and not used.
10990 * data/lalr1.cc (yyparse): Likewise.
10991 Use "if (false)" rather than "if (0)".
10992
249d3236
PE
109932005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10994
10995 * TODO: Mention that we should allow NUL bytes in tokens.
10996
987cc1fb
PE
109972005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10998
10999 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11000 Problem reported by Hans Aberg.
11001
08fe02d9
PE
110022005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11003
11004 * src/getargs.c (version): Happy new year; update overall
11005 program copyright date from 2004 to 2005.
11006
11007 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11008 Problem reported by Hans Aberg.
11009 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11010 (Output file names.): Add a test for the case when standard output
11011 is closed.
11012
010c0266
PE
110132004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11014
11015 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11016 to fix an oversight in the Bison 2.0 manual.
11017
da12206a
PE
110182004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11019
11020 * NEWS: Version 2.0. Reformat the existing news items since
11021 1.875, so that related items are grouped together.
3a4734aa 11022 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
11023 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11024
c935d934
PE
11025 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11026 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11027 otherwise, we're not testing alloca. Unfortunately there's no
11028 simple way to consult HAVE_ALLOCA here.
11029
da12206a
PE
11030 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11031 for yymsg, too.
11032
11033 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11034 hand. This avoids a warning about comparing int to size_t when
11035 GCC warnings are enabled.
11036
0a2c5137
PE
110372004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11038
d7e14fc0
PE
11039 * NEWS: Bison-generated parsers no longer default to using the
11040 alloca function (when available) to extend the parser stack, due
11041 to widespread problems in unchecked stack-overflow detection.
11042 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11043 responsibility to set it to a positive value. This lets the user
11044 specify a value that is not a preprocessor constant.
11045 * data/yacc.c (YYMAXDEPTH): Likewise.
11046 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11047 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11048 to be a compile-time constant. However, explain the constraints on it.
11049 Also, explain the constraints on YYINITDEPTH.
11050 (Table of Symbols): Explain that alloca is no longer the default.
11051 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11052 to 1.
11053
0a2c5137
PE
11054 * doc/bison.texinfo (Location Default Action): Mention that n must
11055 be zero when k is zero. Suggested by Frank Heckenbach.
11056
e019c247
AD
110572004-12-22 Akim Demaille <akim@epita.fr>
11058
11059 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11060 (parser::state_type, parser::semantic_type, parser::location_type):
11061 Private, not public.
11062 (parser::parse): Return ints, not bool.
11063 Returning a bool introduces a problem: 0 corresponds to false, and
11064 it seems weird to return false on success. Returning true changes
11065 the conventions for yyparse.
11066 Alternatively we could return void and send an exception.
11067 There is no clear consensus (yet?).
11068 (state_stack, semantic_stack, location_stack): Rename as...
11069 (state_stack_type, semantic_stack_type, location_stack_type): these.
11070 Private, not public.
11071 * tests/c++.at: New.
11072 * tests/testsuite.at, tests/Makefile.am: Adjust.
11073
72731bb7
AD
110742004-12-21 Akim Demaille <akim@epita.fr>
11075
11076 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11077
9a0d8bec
AD
110782004-12-21 Akim Demaille <akim@epita.fr>
11079
11080 Don't impose std::string for filenames.
11081
11082 * data/lalr1.cc (b4_filename_type): New.
11083 (position::filename): Use it.
11084 (parser.hh): Move the inclusion of stack.hh and location.hh below
11085 the user code, so that needed headers for the filename type can be
11086 included first.
72731bb7
AD
11087 Forward declare them before the user code.
11088 * tests/Makefile.am (check-local, installcheck-local): Pass
11089 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 11090
99880de5
AD
110912004-12-20 Akim Demaille <akim@epita.fr>
11092
11093 Use more STL like names: my_class instead of MyClass.
11094
11095 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11096 (SemanticStack, SemanticType, StateStack, StateType)
11097 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11098 (Parser::value): Rename as...
11099 (location_stack, location_type, rhs_number_type, semantic_stack)
11100 (semantic_type, state_stack, state_type, token_number_type, stack)
11101 (slice, traits, parser::yylloc, parser::yylval): these.
11102
11103 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11104
9bec482e
PE
111052004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11106
11107 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11108 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11109
f6fbd3da
PE
111102004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11111
11112 Remove uses of 'short int' and 'unsigned short int'. This raises
11113 some arbitrary limits. It uses more memory but nowadays that's
11114 not much of an issue.
11115
11116 This change does not affect the generated parsers; that's a different
11117 task, as some users will want to conserve memory there.
11118
11119 Ideally we should use size_t to represent all object counts, and
11120 something like ptrdiff_t to represent signed differences of object
11121 counts; but that will require more code-cleanup than I have the
11122 time to do right now.
11123
11124 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11125 Use size_t, not int or short int, to count objects.
11126 * src/closure.c (nritemset, closure): Likewise.
11127 * src/closure.h (nritemset, closure): Likewise.
11128 * src/nullable.c (nullable_compute): Likewise.
11129 * src/print.c (print_core): Likewise.
11130 * src/print_graph.c (print_core): Likewise.
11131 * src/state.c (state_compare, state_hash): Likewise.
11132 * src/state.h (struct state): Likewise.
11133 * src/tables.c (default_goto, goto_actions): Likewise.
11134
11135 * src/gram.h (rule_number, rule): Use int, not short int.
11136 * src/output.c (prepare_rules): Likewise.
11137 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11138 errs, reductions): Likewise.
11139 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11140 Likewise.
11141 * src/tables.c (vector_number, tally, action_number,
11142 ACTION_NUMBER_MINIMUM): Likewise.
11143 * src/output.c (muscle_insert_short_int_table): Remove.
11144
efeed023
AD
111452004-12-17 Akim Demaille <akim@epita.fr>
11146
11147 * data/lalr1.cc: Extensive Doxygenation.
11148 (error_): Rename as...
11149 (error): this, since it is visible to the user.
11150 Adjust callers.
11151 (Parser::message): Now an automatic variable from...
11152 (Parser::yyreport_syntax_error_): here.
11153 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11154 Parser::error.
11155 * tests/input.at: Escape $.
11156
bc82c5a5
PE
111572004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11158
11159 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11160 Parenthesize rhs to avoid obscure problems with mistakes like
11161 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11162 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11163 b4_rhs_location): Likewise.
11164 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11165 b4_rhs_location): Likewise.
11166
fd19f271
AD
111672004-12-16 Akim Demaille <akim@epita.fr>
11168
11169 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11170 yacc.c: be sure to stay within yycheck_.
11171 * tests/actions.at: Re-enable C++ tests.
11172
10454ea4
AD
111732004-12-16 Akim Demaille <akim@epita.fr>
11174
11175 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11176 real.
11177
c5b95ccf
AD
111782004-12-16 Akim Demaille <akim@epita.fr>
11179
11180 Use #define to handle the %name-prefix.
11181
11182 * data/glr.c, data/yacc.c: Comment changes.
11183 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11184 so that one can refer to yylex in the parser file, and have it
11185 renamed, as is the case with other skeletons.
11186
617a8f12
AD
111872004-12-16 Akim Demaille <akim@epita.fr>
11188
11189 Move lalr1.cc internals into yy*.
11190
11191 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11192 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11193 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11194 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11195 (empty_, final_, terror_, errcode_, ntokens_)
11196 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11197 (looka_, ilooka_, error_range_, nerrs_):
11198 Rename as...
11199 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11200 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11201 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11202 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11203 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11204 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11205 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11206 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11207 these.
11208
1e547e6e
PE
112092004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11210
11211 Fix some problems reported by twlevo at xs4all.
11212 * src/symtab.c (symbol_new): Report an error if the input grammar
11213 contains too many symbols. This is better than calling abort() later.
11214 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11215 (struct node, struct graph):
11216 Rename member expand to stretch. All uses changed.
11217 (struct graph): Remove member layoutalgorithm. All uses removed.
11218 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11219 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11220 All uses changed.
11221 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11222
735d6bd4
AD
112232004-12-15 Akim Demaille <akim@epita.fr>
11224
11225 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11226 Add more Doxygen comments.
11227 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11228 (report_syntax_error_, translate_): Rename as...
11229 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11230 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11231
2e1f5829
AD
112322004-12-15 Akim Demaille <akim@epita.fr>
11233
11234 * data/lalr1.cc (lex_): Rename as...
11235 (yylex_): this.
11236 Move the trace here.
11237 Take the %name-prefix into account.
11238 Reported by Alexandre Duret-Lutz.
11239
a3cb6248
AD
112402004-12-15 Akim Demaille <akim@epita.fr>
11241
11242 Simplify the C++ parser constructor.
11243
11244 * data/lalr1.cc (debug_): Rename as...
11245 (yydebug_): so that the parser's internals are always in the yy*
11246 pseudo namespace.
11247 Adjust uses.
11248 (b4_parse_param_decl): Remove the leading comma as it is now only
11249 called as unique argument list.
11250 (Parser::Parser): Remove the constructor accepting a location and
11251 an initial debugging level.
11252 Remove from the other ctor the argument for the debugging level.
11253 (debug_level_type, debug_level, set_debug_level): New.
11254
11255 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11256 constructor calls.
11257
07fed891
AD
112582004-12-15 Akim Demaille <akim@epita.fr>
11259
11260 Remove b4_root related material: failure experiment
a3cb6248 11261 (which goal was to allow to derive from a class).
07fed891
AD
11262
11263 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11264 definitions and uses.
11265
e603eaa5
PE
112662004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11267
11268 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11269 not 2, since it's not portable to subtract 1 from the start of an
11270 array. The new item 0 is never set or used. All uses changed.
11271
11272 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11273 the default definition of YYLLOC_DEFAULT. Problem reported
11274 by Frank Heckenbach.
11275
fafb007d
PE
112762004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11277
11278 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11279 the normal case and one for the error case. Just use the
11280 first one uniformly. Problem reported by Frank Heckenbach.
11281 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11282 use exactly the same macro in both places.
11283 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11284 so that the normal-case YYRHSLOC works for the error case too.
11285 All uses changed.
11286 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11287 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11288 * doc/bison.texinfo (Location Default Action): Don't claim that
11289 we have an array of locations. Use the same macro for both glr
11290 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11291 the index is 0.
11292
48814dcd
PE
112932004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11294
a4e1a53b
PE
11295 * HACKING: Update email addresses to send announcements to.
11296
48814dcd
PE
11297 * configure.ac (AC_INIT): Bump version to 1.875f.
11298
337116ba
PE
112992004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11300
11301 * NEWS: Version 1.875e.
11302 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11303
11304 * src/scan-skel.l: Include "complain.h", for "fatal".
11305
11306 * src/relation.h (relation_print, relation_digraph):
11307 Relation sizes are of type relation_node, not size_t (this is
11308 merely a doc fix, since the two types are equivalent).
11309 (relation_transpose): Relation sizes are of type relation_node,
11310 not int.
11311 * src/relation.c: Likewise.
11312 (top, infinity): Now of type relation_node, not int.
11313 (traverse, relation_transpose): Use relation_node, not int.
11314
11315 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11316 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11317 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11318
11319 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 11320 specifying whether the test should be skipped. Use it tp
337116ba 11321 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 11322 fail on some hosts, and should be skipped.
337116ba 11323
da2a7671
PE
113242004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11325
11326 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11327 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11328 unless otherwise specified below.
11329
11330 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11331 to allocate kernel_base, kernel_items, kernel_size, since
11332 they needn't be initialized to 0.
11333 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11334 * src/closure.c (new_closure): Likewise, for itemset.
11335 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11336 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11337 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11338 (build_relations): Likewise for edge, states1, includes.
11339 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11340 * src/reader.c (packgram): Likewise, for ritem, rules.
11341 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11342 * src/relation.c (relation_digraph): Likewise for VERTICES.
11343 (relation_transpose): Likewise for new_R, end_R.
11344 * src/symtab.c (symbols_token_translations_init): Likewise for
11345 token_translations.
11346 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11347 (token_actions): Likewise for yydefact, actrow, conflrow,
11348 conflict_list.
11349 (save_column): Likewise for froms[symno], tos[symno].
11350 (goto_actions): Likewise for state_count.
11351 (pack_table): Likewise for base, pos, check.
11352 (tables_generate): Likewise for width.
11353
11354 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11355 for initial core. Just have a separate core, so we needn't worry
11356 about whether kernel_size and kernel_base are initialized.
11357
11358 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11359 kernel_size, kernel_items): Remove unnecessary initialization.
11360 * src/conflicts.c (conflicts): Likewise.
11361 * src/derives.c (derives): Likewise.
11362 * src/muscle_tablc (muscle_insert): Likewise.
11363 * src/relation.c (relation_digraph): Likewise.
11364 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11365 conflrow, conflict_table, conflict_list, table, check):
11366 Likewise.
11367
11368 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11369 This is because all callers pass unsigned int.
11370 * src/closure.h (new_closure): Likewise.
11371
11372 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11373 (build_relations): Initialize includes[i] in all cases.
11374 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11375 and rules[ruleno].precsym. Initialize members in order.
11376 * src/relation.c (relation_transpose): Always initialize new_R[i]
11377 and end_R[i].
11378 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11379
11380 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11381 conflict_list[0] was always 0, but now it isn't initialized.
11382
11383 * src/table.c (table_grow): When conflict_table grew, the grown
11384 area wasn't cleared. Fix this.
11385
11386 * lib/.cvsignore: Add strdup.c, strdup.h.
11387 * m4/.cvsignore: Add strdup.m4.
11388
00baeeac
PE
113892004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11390
11391 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11392 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11393 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11394 ngotos + 1 without checking for overflow.
11395 (build_relations): Use END_NODE, not -1, to denote end of edges.
11396 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11397 build_relations): Use goto_number, not int, for goto numbers.
11398 * src/tables.c (save_column, default_goto): Likewise.
11399
be3d9d42
AD
114002004-11-23 Akim Demaille <akim@epita.fr>
11401
11402 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11403 of #defining from yystype.
11404 Don't typedef yystype, C++ does not need it.
11405 This lets it possible to forward declare it as union.
11406
78e526d5
PE
114072004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11408
11409 * bootstrap (gnulib_modules): Add extensions.
11410 Problem reported by Jim Meyering.
11411
afbb696d
PE
114122004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11413
11414 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11415 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11416 src/system.h, src/tables.c: XFREE -> free, to accommodate
11417 recent change to gnulib xalloc.h.
78e526d5 11418 Problem reported by Jim Meyering.
afbb696d 11419
c1f8f16a
AD
114202004-11-17 Akim Demaille <akim@epita.fr>
11421
11422 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11423
db7e5eb5 114242004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
11425 Alexandre Duret-Lutz <adl@gnu.org>
11426
11427 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11428 changes.
11429 (YYCDEBUG): Adjust.
11430 Use it instead of cdebug_.
11431 (Parser::debug_stream, Parser::set_debug_stream): New.
11432 (Parser::symprint_): Define cdebug_ for temporary backward
11433 compatibility.
11434 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11435 debug_stream ().
11436
68e11668
AD
114372004-11-17 Akim Demaille <akim@epita.fr>
11438
11439 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11440 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11441 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11442 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11443
97cbc73e
PE
114442004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11445
11446 * data/glr.c (yyloc_default): Remove; not used.
11447 Problem reported by Frank Heckenbach.
11448
e342c3be
AD
114492004-10-25 Akim Demaille <akim@epita.fr>
11450
11451 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11452 Introduce another definition to address simple location arrays.
11453 (yyGLRStack): New member: yyerror_range.
11454 (yyrecoverSyntaxError, yyparse): Update it.
11455 (yyrecoverSyntaxError): Use it when shifting the error token to
11456 have an accurate range, equivalent to the one computed by both
11457 yacc.c and lalr1.cc.
11458 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11459 that column numbers start at column 0, as per GNU Coding
11460 Standards, the others tests, and the doc.
11461 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11462 Adjust to the above change (first column is 0).
11463 And adjust the location of the "<error>", now covering the whole
11464 line.
11465
93602feb 114662004-10-22 Akim Demaille <akim@epita.fr>
04098407 11467 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
11468
11469 Remove some arbitrary limits on goto numbers and relations.
11470 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11471 initial values, since they're never used.
11472 (set_goto_map): ngotos is now unsigned, so test for overflow
11473 by seeing whether it wraps around to zero.
11474 * src/lalr.h (goto_number): Now size_t, not short int.
11475 (GOTO_NUMBER_MAXIMUM): Remove.
11476 * src/relation.c (relation_print, traverse, relation_transpose):
11477 Check for END_NODE rather than looking at sign.
11478 * src/relation.h (END_NODE): New macro.
11479 (relation_node): Now size_t, not short int.
11480
dba08b04
PE
114812004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11482
11483 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11484 keyword, not an identifier. Problem reported by Baron Schwartz in
11485 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11486
df09ef2e
AD
114872004-10-11 Akim Demaille <akim@epita.fr>
11488
11489 * src/symtab.c (symbol_check_alias_consistency): Also check
11490 type names, destructors, and printers.
11491 Reported by Alexandre Duret-Lutz.
11492 Recode the handling of associativity and precedence in terms
11493 of symbol_precedence_set.
11494 Accept no redeclaration at all, not even equal to the previous
11495 value.
11496 (redeclaration): New.
11497 Use it to factor redeclaration complaints.
11498 (symbol_make_alias): Don't set the type of the alias, let
11499 symbol_check_alias_consistency do it as for other features.
11500 * src/symtab.h (symbol): Add new member prec_location, and
11501 type_location.
11502 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11503 * tests/input.at (Incompatible Aliases): New.
11504
146bc99d
PE
115052004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11506
11507 .cvsignore fixes to accommodate gnulib changes,
11508 and the practice of naming build directories "_build".
11509 * .cvsignore: Add "_*". Sort.
11510 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11511 * m4/.cvsignore: Add "*_gl.m4".
11512
e503aa60
AD
115132004-10-06 Akim Demaille <akim@epita.fr>
11514
11515 * src/parse-gram.y (add_param): Fix the truncation of trailing
11516 spaces.
11517
b4a20338
AD
115182004-10-05 Akim Demaille <akim@epita.fr>
11519
11520 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11521 whether the reducion was empty or not. This leaves room to
11522 improve the use of YYLLOC_DEFAULT in such a case.
11523 lalr1.cc is still experimental, so changing this is acceptable.
11524 And finally, there are probably not many users who changed the
11525 handling of locations in GLR, so changing is admissible too.
11526
11527 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11528 empty reduction, set @$ to an empty location ending the previously
11529 stacked symbol.
11530 Adjust uses to make sure the code is triggered on empty
11531 reductions.
11532 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11533 expected output: empty reductions have empty locations.
11534
f85a5e6f
AD
115352004-09-29 Akim Demaille <akim@epita.fr>
11536
11537 * data/lalr1.cc: Move towards a more standard C++ coding style
11538 for templates: Class < T > -> Class<T>.
11539
b203fc2c
AD
115402004-09-29 Akim Demaille <akim@epita.fr>
11541
11542 * data/lalr1.cc: Reinstall the former ctor, for sake of
11543 compatibility, but warn it will be removed.
11544 Move towards a more standard C++ coding style (i.e., type *var ->
11545 type* var).
11546
5b7e1e73
PE
115472004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11548
3fee967f
PE
11549 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11550 since it's less likely to work if NULs are involved in the future.
5b7e1e73 11551
0dcca5c2
AD
115522004-09-27 Akim Demaille <akim@epita.fr>
11553
11554 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11555
6dde1c82
AD
115562004-09-27 Akim Demaille <akim@epita.fr>
11557
11558 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 11559 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
11560 and argument names.
11561 (b4_cc_constructor_call): Likewise.
11562
b233d555
AD
115632004-09-24 Akim Demaille <akim@epita.fr>
11564
11565 * src/parse-gram.y (add_param): Strip the leading and trailing
11566 blanks from a formal argument declaration.
11567 (YY_LOCATION_PRINT): New.
11568
619404e3
AD
115692004-09-24 Akim Demaille <akim@epita.fr>
11570
11571 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11572 after the location.
11573
dd8d9022
AD
115742004-09-24 Akim Demaille <akim@epita.fr>
11575
11576 * doc/bison.texinfo (Table of Symbols): Sort.
11577
0092f063
AD
115782004-09-21 Akim Demaille <akim@epita.fr>
11579
11580 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11581 the useless parentheses.
11582 Suggested by Paul Eggert.
11583
451364ed
AD
115842004-09-20 Akim Demaille <akim@epita.fr>
11585
11586 Let the initial-action act on the look-ahead, and use it for the
11587 "initial push" (corresponding to an hypothetical beginning-of-file).
11588 And let lalr1.cc honor %initial-action.
11589
11590 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11591 example.
11592 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11593 (Parser::Parser): Remove the ctor that used to initialize it.
11594 (Parser::parse): Like in the other skeletons, issue the "starting
11595 parse" message before any action.
11596 Honor %initial-action.
11597 Initialize the stacks with the lookahead.
11598 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11599 look-ahead.
11600 Push them in the stacks.
11601 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11602
18d192f0
AD
116032004-09-20 Akim Demaille <akim@epita.fr>
11604
11605 * doc/bison.texinfo (Initial Action Decl): New.
11606
b8458aa5
AD
116072004-09-20 Akim Demaille <akim@epita.fr>
11608
11609 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11610 clearer criterion to define it.
11611 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11612 When reducing on an empty RHS, use the latest stacked location as
11613 location.
11614 yylloc is not always available.
11615 * data/glr.c: Likewise.
11616 Also, honor initial-actions.
11617
3fc16193
AD
116182004-09-20 Akim Demaille <akim@epita.fr>
11619
11620 * data/yacc.c (YY_LOCATION_PRINT): New.
11621 Define when we know YYLTYPE's structure, i.e., when the default
11622 YYLLOC_DEFAULT is used.
11623 * data/c.m4 (b4_yysymprint_generate): Use it.
11624 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11625 value of the result.
11626 (error_start_): Replace with...
11627 (error_range_): this location array.
11628 This allows to replace code relying on the implementation of
11629 locations by portable code.
11630 * data/yacc.c (yylerrsp): Replace with...
11631 (yyerror_range): this.
11632 Every time a token is popped, update yyerror_range[0], to have an
11633 accurate location for the error token.
11634 * data/glr.c (YY_LOCATION_PRINT): New.
11635 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11636 deference a pointer.
11637 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11638 report the location in %printers.
11639
11640 * src/scan-skel.l: Instead of abort, report error messages to ease
11641 understanding skeleton scanning failures.
11642
ecfe33e7
AD
116432004-09-16 Akim Demaille <akim@epita.fr>
11644
11645 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11646 (iterator, const_iterator): these, to be more in the C++ spirit.
11647 Also, return reverse iterators so that when displaying the stack
11648 we display its bottom first.
11649 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11650 from yacc.c.
11651 We should probably use vector here though.
11652
1576d44d
AD
116532004-09-16 Akim Demaille <akim@epita.fr>
11654
11655 Have more complete shift traces.
11656
11657 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11658 to report Shifts instead of ad hoc YYDPRINTF invocations,
11659 including for the error token.
11660 * data/lalr1.cc (symprint_): Output the location.
11661 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11662 output the location within the %printer.
11663 Activate GLR tests, at least to make sure they compile properly.
11664 They still don't pass though.
11665 * tests/calc.at: Adjust expect verbose output, since now "Entering
11666 state..." is on a different line than the "Shifting" message.
11667
9c66f418
AD
116682004-09-08 Akim Demaille <akim@epita.fr>
11669
11670 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11671 Bison directive from the Bison file to the invocation of this
11672 macro, so that these directives are passed to
11673 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11674 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11675 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11676 the extra Bison directives instead of the whole series.
11677 Change the grammar so that there are recoverable errors, and
11678 unrecoverable errors. Now we can have the parser give up before
11679 consuming the whole input. As a result we now can observe that
11680 the lookahead is freed when needed.
11681 Change the parser source to parse argv[1] instead of a hard coded
11682 string.
11683 Simplify yylex, and give a value and location to EOF.
11684 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11685 passed directives already coded in the file.
11686 Add some tests to check the location of "error".
11687 For some tests, the C++ parser is correct, and not yacc.c.
11688 For other tests, they provide different, but unsatisfying, values,
11689 so keep the C++ value so that at least one parser is "correct"
11690 according to the test suite.
11691 (Actions after errors): Remove, this is subsumed by the
11692 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11693
52d5733f
AD
116942004-09-06 Akim Demaille <akim@epita.fr>
11695
11696 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 11697 (Parser::pop): New.
52d5733f
AD
11698 Use it.
11699
a0e68930
AD
117002004-09-06 Akim Demaille <akim@epita.fr>
11701
11702 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11703 argument, an informative message.
11704 Call YY_SYMBOL_PRINT.
11705 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11706 * data/lalr1.cc (destruct_): Likewise.
11707 In addition, no longer depend on b4_yysymprint_generate and
11708 b4_yydestruct_generate to generate these functions, do it "by
11709 hand".
11710
e757bb10
AD
117112004-09-03 Akim Demaille <akim@epita.fr>
11712
11713 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11714 invoked, yydestruct the lookahead.
11715 * tests/calc.at (Calculator $1): Update the expected lengths of
11716 traces: there is an added line for the discarded lookahead.
11717 * doc/bison.texinfo (Destructor Decl): Some rewording.
11718 Define "discarded" symbols.
11719
0fe1f06d
AD
117202004-09-02 Akim Demaille <akim@epita.fr>
11721
11722 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11723
284acc8b
AD
117242004-09-02 Akim Demaille <akim@epita.fr>
11725
11726 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11727 (YYDSYMPRINTF): Rename as...
11728 (YY_SYMBOL_PRINT): this.
11729 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11730 two.
11731 Use it instead of direct symprint_ calls.
11732 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11733 one.
11734
a5eb1ed2
AD
117352004-09-02 Akim Demaille <akim@epita.fr>
11736
b7c72fe1
AD
11737 * data/lalr1.cc (b4_yysymprint_generate): New.
11738 (symprint_): New member function, defined when YYDEBUG.
11739 Use it consistently instead of token/nterm debugging output by
11740 hand.
a5eb1ed2
AD
11741 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11742 %printer calls to use cdebug_ when using lalr1.cc.
11743
417141dd
AD
117442004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11745
11746 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11747 with #ifdef YYDEBUG.
11748
2fa09258
AD
117492004-08-26 Akim Demaille <akim@epita.fr>
11750
11751 * doc/bison.texinfo (Implementing Loops): Rename as...
11752 (Implementing Gotos/Loops): this.
11753
9378b508
PE
117542004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11755
11756 Adjust to latest gnulib.
11757 * bootstrap (gnulib_modules): Add xalloc-die.
11758 Set LC_ALL=C so that file names sort consistently.
11759 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11760 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11761 uintmax_t.m4, ulonglong.m4.
11762 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11763 po.m4 since we are now using _gl.m4 instead.
11764
87a8ad5c
PE
117652004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11766
11767 * src/scan-action.l: Remove. Scanning of semantic actions is
11768 handled in scan-gram.l.
11769
dca81a78
PE
117702004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11771
11772 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11773
11774 * src/location.h (struct): The file member is a uniqstr.
11775 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11776
c9cbf7c5
PE
117772004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11778
11779 Fix bug with non-%union parsers that have printers or destructors,
11780 which led to a Bison core dump. Reported by Peter Fales in
11781 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 11782
c9cbf7c5
PE
11783 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11784 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11785 not to our own type.
11786 * src/output.c (symbol_destructors_output, symbol_printers_output):
11787 Don't assume %union.
11788 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11789 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11790 UNION-FLAG. All callers changed.
11791 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11792 Use type char, not unsigned int, when declaring an array of char;
11793 this lets us remove a cast.
11794 (Printers and Destructors): Add non-%union test cases.
11795
fa7e68c3
PE
117962004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11797
11798 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11799 GLR writeups. E.g., avoid frenchspacing and the future tense,
11800 change "lookahead" to "look-ahead", and change "wrt" to "with
11801 respect to".
2fa09258 11802
fa7e68c3
PE
118032004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11804
11805 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11806 New sections, split off from the GLR Parsers section. Put the new
11807 Simple GLR Parser near the start of the GLR section, for clarity.
11808 Rewrite connective text.
11809
99a9344e
PE
118102004-06-21 Frank Heckenbach <frank@g-n-u.de>
11811
11812 * doc/bison.texinfo (Simple GLR Parsers): New section.
11813
8dd162d3
PE
118142004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11815
11816 * NEWS, TODO, doc/bison.texinfo:
11817 Use "look-ahead" instead of "lookahead", to be consistent.
11818 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11819 while we're fixing "look-ahead".
11820 * src/conflicts.c (shift_set): Renamed from shiftset.
11821 (look_ahead_set): Renamed from lookaheadset.
11822 * src/print.c: Likewise.
11823 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11824 name for "lookahead".
11825 (report_types, usage): Likewise.
11826 * src/getargs.h (report_look_ahead_tokens): Renamed from
11827 report_lookaheads.
11828 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11829 compute_lookaheads.
11830 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11831 (look_ahead_tokens_print): Renamed from lookaheads_print.
11832 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11833 state_rule_lookaheads_print.
11834 * src/state.h: Likewise.
11835 (reductions.look_ahead_tokens): Renamed from lookaheads.
11836 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11837 AT_DATA_LOOKAHEADS_GRAMMAR.
11838
57a90331
PE
118392004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11840
11841 * README: Update location of patched M4 distribution.
11842
8ed3234a
PE
118432004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11844
11845 Don't assume the C++ compiler takes the same arguments as the C compiler
11846 (trivial change).
11847 * configure.ac (O0CXXFLAGS): New var.
11848 * tests/atlocal.in (CXXFLAGS): Use it.
11849
07971983
PE
118502004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11851
11852 Fix some "make check" problems with C++ reported by
11853 Albert Chin-A-Young for Tru64 C++ in this thread:
11854 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11855
11856 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11857 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11858 Output to a .cc file for C++, not to a .c file.
11859 * tests/calc.at (AT_CHECK_CALC): Likewise.
11860 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11861 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11862
29058652
PE
118632004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11864
11865 * tests/calc.at, tests/actions.at: Workaround for SGI
11866 C++ compiler. (trivial change)
11867
62cb8a99
PE
118682004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11869
fd418816
PE
11870 Spent a few hours checking out which prerequisite versions the
11871 current sources actually require. I went all the way back to
11872 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11873 a seemingly endless set of combinations of versions more recent
11874 than that. The bottom line is that the current sources require
11875 fairly recent versions of the build tools, and it'll be some work
11876 to change this.
11877 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11878 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11879 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11880 Add comments explaining why those particular versions are
11881 currently needed.
2fa09258 11882
62cb8a99
PE
11883 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11884 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 11885 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
11886
11887 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11888 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11889
caa52c10
PE
118902004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11891
11892 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11893 0.11.5. Suggested by Bruno Haible.
11894 * bootstrap: Remove gettext version checking.
11895
11896 * doc/bison.texinfo (Decl Summary): Also mention that %union
11897 can depend on prerequisite types. Problem reported by Tim
11898 Van Holder.
11899
4bfd5e4e
PE
119002004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11901
2cef3017
PE
11902 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11903 * README-alpha: Don't tell people not to package this.
11904
b9c85d5c
PE
11905 * bootstrap: Don't assume $(...) works; use `...` instead.
11906 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11907 gettext better.
11908
4bfd5e4e
PE
11909 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11910 put into the -d output file, and mention what to do if YYSTYPE is
11911 defined as a macro.
11912
6a36ff94
PE
119132004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11914
6712933e
PE
11915 Undo change made earlier today: it caused autopoint to not bring
11916 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11917 autopoint's.
11918
11919 * bootstrap: Check that gettext version matches what's in
11920 configure.ac. Warn users to ignore robots.txt ERROR 404.
11921 * bootstrap: Undo today's earlier change (logged below).
11922 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 11923
6a36ff94
PE
11924 The gettext version checking is causing more trouble than it's
11925 curing; remove it. Problem reported by Paul Hilfinger.
11926
11927 * bootstrap: Issue a warning that one can expect a message
11928 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11929 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11930
209ea708
PE
119312004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11932
11933 Ensure that the C++ compiler used for testing actually works on a
11934 simple test program; if not, skip the C++-related tests. Problem
11935 reported by Vin Shelton in:
161a71f3 11936 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
11937
11938 * m4/cxx.m4: New file.
11939 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11940 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11941 * tests/local.at (AT_COMPILE_CXX): Use it.
11942
41ca2549
PE
119432004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11944
383e69dc
PE
11945 * data/glr.c (yylloc): Output this macro even if locations are not
11946 being generated, as the GLR parser needs it even in that case.
11947 Problem reported by Troy A. Johnson
11948 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11949
41ca2549
PE
11950 * configure.ac (AC_INIT): Update to 1.875e.
11951
e476c87d
PE
119522004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11953
11954 * NEWS: Version 1.875d.
11955 * configure.ac (AC_INIT): Likewise.
11956 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11957
11958 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11959 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11960 lalr1.cc runs afoul of the first, and the last two are no longer
11961 supported by GCC 3.4.0.
11962 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11963 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11964
233a88ad
PE
119652004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11966
11967 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11968 unsigned int, for compatibility with latest gnulib hash module.
11969 * src/state.c (state_hash, state_hasher): Likewise.
11970 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11971 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 11972
12ffdd28
PE
119732004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11974
11975 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11976
11977 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11978 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11979 character and string literals.
11980 (unexpected_end): New function.
11981 (unexpected_eof): Use it.
11982 (unexpected_newline): New function.
11983 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11984 actions.
e476c87d 11985
12ffdd28
PE
11986 * NEWS: Document %expect-rr.
11987
11988 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11989 Fix typo by replacing $1 with $option.
11990 Remove more 'intl'-related files.
9668e2be 11991 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
11992
11993 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11994 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11995 strtoul.c.
11996 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11997 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11998 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11999 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12000 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12001 * src/.cvsignore: Add *.output.
12002
12003 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12004 gets copied to the output file.
e476c87d 12005
1f65350a
PE
120062004-04-28 Paul Eggert <eggert@twinsun.com>
12007
12008 Get files from the gnulib and po repositories, instead of relying
12009 on them being in our CVS. Upgrade to latest versions of gnulib
12010 and Automake.
12011
12012 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12013 * bootstrap: Bootstrap from gnulib and po repositories.
12014 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12015 * README-cvs: Document these changes. Remove version numbers from
12016 mentions of build tools, since they change so often. Mention Flex.
12017
12018 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12019 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
12020 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12021 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 12022 does this for us.
12ffdd28
PE
12023 (AC_ISC_POSIX): Remove; we no longer support this
12024 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
12025 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12026 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12027 Do not check for C89 headers, except for locale.h which is used
12028 by the Yacc library and must port to K&R hosts.
12029 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12030 Do not check for C89 functions, except for setlocale which is
12031 used by the Yacc library.
12032 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12033 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12034 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12035 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12036 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12037 AM_GNU_GETTEXT): Remove; now done by:
12038 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12039 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12040 for us.
12041
12042 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12043 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12044 Define to empty, as gnulib.mk will do the rest for us.
12045 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12046 for us.
12047 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12048 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12049
12050 * src/files.c: Include gnulib's xstrndup.h.
12051
12052 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12053 (REALLOC): Use xnrealloc, for likewise.
12054 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12055 (strnlen, memrchr): Remove decls; functions no longer used.
12056 Include <stpcpy.h>.
12057
12058 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12059 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12060 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12061 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12062 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12063 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12064 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12065 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12066 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12067 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12068 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12069 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12070 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12071 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12072 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12073 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12074 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12075 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12076 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12077 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12078 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12079 Remove, as these files are now generated automatically
12080 by bootstrap or automake.
12081
12082 * po/ChangeLog: Remove: all but one entry was a duplicate
12083 of this file, and I moved that 2000-11-02 entry here.
12084
12085 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12086 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12087 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12088 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12089 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12090 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12091 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12092 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12093 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12094 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12095 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12096 xstrndup.h.
12097 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12098 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12099 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12100 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12101 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12102 * src/.cvsignore: Remove *_.c.
12103
12104
12105 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12106 support it. (The latest stable gzip doesn't.)
12107
121082004-04-27 Paul Eggert <eggert@twinsun.com>
12109
12110 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12111 case, as stos_ is now used by destructors due to the 2004-02-09
12112 change.
12113
12114 Remove more K&R C support.
12115 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12116 * lib/subpipe.c (errno): Remove decl.
12117 Include <stdlib.h> unconditionally.
12118 (EXIT_FAILURE): Remove macro.
12119 * src/complain.c (vfprintf, strerror): Remove.
12120 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12121 unconditionally.
12122 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12123 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12124 (strchr, strspn, memchr): Remove decls.
12125 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12126 unconditionally. Do not declare perror.
12127 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12128 unconditionally.
12129
12130 * src/complain.c (_): Remove useless defn, as system.h defines this.
12131
12132 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12133 with latest obstack.h.
12134 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12135 to procedure types, as obstack.h now does that for us.
12136 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12137
12138 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12139 so that this include file can stand alone.
12140 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12141 does this now. Include subpipe.h first after config.h, to
12142 test whether it can stand alone.
12143
12144 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12145 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12146 unused declaration.
12147
12148 * tests/synclines.at (%union synch line): Put a dummy member in
12149 the union, because empty unions aren't allowed in C. Caught
12150 by GCC 3.4.0.
12151
4f16766c
PE
121522004-04-13 Jim Meyering <jim@meyering.net>
12153
12154 * src/conflicts.c (conflicts_print): Correct format string typo:
12155 use `%%' to produce literal `%'. (trivial change)
12156
779e7ceb
PE
121572004-03-30 Paul Eggert <eggert@twinsun.com>
12158
12159 * src/getargs.c (version): Update copyright year to 2004.
12160
12161 * data/c.m4 (b4_int_type): Use 'short int' rather than
12162 'short', and similarly for 'long', 'unsigned', etc.
12163 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12164 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12165 yy_yypstack, yydumpstack): Likewise.
12166 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12167 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12168 Likewise.
12169 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12170 yy_stack_print, yyparse): Likewise.
12171 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12172 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12173 * lib/bitset.c (bitset_print): Likewise.
12174 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12175 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12176 * lib/bitsetv.c (bitsetv_dump): Likewise.
12177 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12178 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12179 Likewise.
12180 * src/LR0.c (allocate_itemsets): Likewise.
12181 * src/gram.h (rule_number, rule): Likewise.
12182 * src/lalr.h (goto_number): Likewise.
12183 * src/nullable.c (nullable_compute): Likewise.
12184 * src/output.c (prepare_rules): Likewise.
12185 * src/relation.c (relation_print, relation_digraph): Likewise.
12186 * src/relation.h (relation_node): Likewise.
12187 * src/state.h (state_number, transitions, errs, reductions,
12188 struct state): Likewise.
12189 * src/symtab.h (symbol_number, struct symbol): Likewise.
12190 * src/tables.c (vector_number, tally, action_number,
12191 default_goto, goto_actions): Likewise.
12192 * tests/existing.at (GNU Cim Grammar): Likewise.
12193 * tests/regression.at (Web2c Actions): Likewise.
12194
12195 * src/output.c (muscle_insert_short_int_table): Renamed from
12196 muscle_insert_short_table. All uses changed.
12197
d6328241
PH
121982004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12199
12200 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12201 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12202 Add %expect-rr rule.
4f16766c 12203
d6328241
PH
12204 * src/scan-gram.l: Recognize %expect-rr.
12205
4f16766c 12206 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 12207 expected_conflicts.
4f16766c 12208 (expected_rr_conflicts): Declare.
d6328241
PH
12209
12210 * src/conflicts.c (expected_sr_conflicts): Rename from
12211 expected_conflicts.
12212 (expected_rr_conflicts): Define.
12213 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12214 for GLR parsers.
12215 Use expected_sr_conflicts in place of expected_conflicts.
12216 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 12217
d6328241 12218 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 12219
1452af69
PE
122202004-03-08 Paul Eggert <eggert@gnu.org>
12221
12222 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 12223 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
12224
12225 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12226 in lalr1.cc.
12227 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12228 * src/scan-gram.l (scan_integer): New function.
12229 ({int}): Use it.
12230 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12231 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12232 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12233 Say "long int", not "long", for uniformity with GNU style.
12234
006d217d
PE
122352004-02-25 Paul Eggert <eggert@twinsun.com>
12236
12237 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12238 compilers. This fixes a problem with Intel's C++ compiler being
12239 chatty, reported by Guido Trentalancia in
161a71f3 12240 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 12241
c2729758
ADL
122422004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12243
12244 Support %destructor and merge error locations in lalr1.cc.
12245
12246 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12247 (Parser::stos_): Define unconditionally.
12248 (Parser::destruct_): New method. Generate its body with
12249 b4_yydestruct_generate.
12250 (Parser::error_start_): New attribute.
12251 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12252 token which are discarded.
12253 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12254 error_start_ when erroneous token are discarded.
12255 (Parser::parse) <yyerrlab1>: Compute the location of the error
12256 token so that it covers all the discarded tokens.
12257 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12258 it can be called with `%skeleton "lalr1.cc"', and do that.
12259
dd0e0635
PE
122602004-02-02 Paul Eggert <eggert@twinsun.com>
12261
12262 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12263 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12264 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12265 There's no need to mention top_builddir since Automake does that
12266 for us.
12267 (INCLUDES): Remove, as Automake says it's obsolescent.
12268 Contents migrated into AM_CPPFLAGS as described above.
12269 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12270
122712004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12272
12273 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12274 (yyreportSyntaxError): Handle case where lookahead token is
12275 YYEMPTY.
12276
be16239b
PH
122772004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12278
12279 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12280 resulting parsers are compilable with C++.
12281
5fa90832
PE
122822003-12-23 Paul Eggert <eggert@twinsun.com>
12283
12284 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12285 * src/output.c (output_skeleton): Rename local var.
12286 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12287 Bison tokens, as this runs afoul of the 2003-10-07 change that
12288 disallowed NUL bytes in character constants or string literals.
12289
12290 * tests/local.at: Require Autoconf 2.59's Autotest.
12291 * tests/testsuite.at: Don't include local.at, since we now assume
12292 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12293 including it.
12294 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12295 multiple inclusion warnings.
dd0e0635 12296
b165c324
AD
122972003-12-02 Akim Demaille <akim@epita.fr>
12298
12299 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12300 conditions.
12301 From Bruno Haible.
12302
26e06a21
ADL
123032003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12304
12305 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12306
92ac3705
PE
123072003-10-07 Paul Eggert <eggert@twinsun.com>
12308
6a5ecb38
PE
12309 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12310 if testsuite doesn't exist.
12311
92ac3705
PE
12312 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12313 literals, unfortunately.
12314 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12315 Complain about NUL bytes in character constants or string literals.
12316
91d2c560
PE
123172003-10-05 Paul Eggert <eggert@twinsun.com>
12318
12319 * NEWS: Don't document %no-default-prec, as it's still
12320 too experimental.
12321 * doc/bison.texinfo: Document %no-default-prec only if
12322 the defaultprec flag is set. Normally it's not.
12323
0cc3da3a
PE
123242003-10-04 Paul Eggert <eggert@twinsun.com>
12325
12326 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12327 non-modifiable lvalue, instead of a modifiable one.
12328 * doc/bison.texinfo (Actions): Document that $$ can
12329 be assigned to. Do not claim that $$ and $N are
12330 array element references: user code should not rely on this.
12331
22fccf95
PE
123322003-10-01 Paul Eggert <eggert@twinsun.com>
12333
12334 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12335 (grammar_declaration): Use it.
12336 * src/scan-gram.l: New token %no-default-prec.
12337 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12338 * NEWS, doc/bison.texinfo: Document the above.
12339
fc8f2965
AD
123402003-10-01 Akim Demaille <akim@epita.fr>
12341
12342 VCG no longer supports long_straight_phase.
12343
12344 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12345 * src/print_graph.c (print_graph): Adjust.
12346
39a06c25
PE
123472003-09-30 Frank Heckenbach <frank@g-n-u.de>
12348 and Paul Eggert <eggert@twinsun.com>
12349
12350 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12351 Table of Symbols): Document %default-prec.
12352 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12353 (grammar_declaration): Set default_prec on %default-prec.
12354 * src/scan-gram.l (%default-prec): New token.
12355 * src/reader.h (default_prec): New flag.
12356 * src/reader.c: Likewise.
12357 (packgram): Handle it.
12358 * tests/conflicts.at (%default-prec without %prec,
12359 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 12360
39a06c25
PE
123612003-09-30 Paul Eggert <eggert@twinsun.com>
12362
12363 * tests/testsuite.at: Include local.at, not input.at, fixing
12364 a typo in the 2003-08-25 patch.
12365
62b6aef9
AD
123662003-08-27 Akim Demaille <akim@epita.fr>
12367
12368 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12369 GCC warnings.
12370
89e1cc61
AD
123712003-08-26 Akim Demaille <akim@epita.fr>
12372
12373 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12374 "<\#" to avoid magic from Gnus when posting parts of this script.
12375
a08460b0
AD
123762003-08-26 Akim Demaille <akim@epita.fr>
12377
12378 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12379 (Parser::parse): here.
12380 Adjust: nerrs and errstatus is now replaced by...
12381 (Parser::nerrs_, Parser::errstatus_): New.
12382
603f1cfd
AD
123832003-08-25 Akim Demaille <akim@epita.fr>
12384
12385 * config/announce-gen, Makefile.cfg: New.
12386 * Makefile.am: Adjust.
12387 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12388 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12389
cd3684cf
AD
123902003-08-25 Akim Demaille <akim@epita.fr>
12391
12392 When reducing initial empty rules, Bison parser read an initial
12393 location that is not defined. This results in garbage, and that
12394 affects Bison's own parser. Therefore we need (i) to extend Bison
12395 to support a means to initialize this location, and (ii) to use
12396 this CVS Bison to fix CVS Bison's parser.
12397
12398 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12399 with...
12400 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12401 * src/parse-gram.y: Adjust.
12402 (%initial-action): New.
12403 (%error-verbose): Since we require CVS Bison, there is no reason
12404 not to use it.
12405 * src/scan-gram.l: Adjust.
12406 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12407 * data/yacc.c (yyparse): Use b4_initial_action.
12408
4e03e201
AD
124092003-08-25 Akim Demaille <akim@epita.fr>
12410
12411 * doc/bison.texinfo: Don't promote stdout for error messages.
12412
8c182d05
AD
124132003-08-25 Akim Demaille <akim@epita.fr>
12414
12415 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12416 From Alexandre Duret-Lutz.
12417
6a60c4cf
PE
124182003-08-25 Akim Demaille <akim@epita.fr>
12419
12420 Version 1.875c.
12421
25f66e1a
AD
124222003-08-25 Akim Demaille <akim@epita.fr>
12423
12424 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12425 Use them.
12426
5348bfbe
AD
124272003-08-25 Akim Demaille <akim@epita.fr>
12428
12429 * data/lalr1.cc (Parser::reduce_print_): New.
12430 Use it.
12431
47301314
AD
124322003-08-25 Akim Demaille <akim@epita.fr>
12433
12434 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12435 error recovery loops. This patch is based on
161a71f3 12436 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
12437 Also, augment the similarity between lalr1.cc and yacc.c.
12438 Note: the locations of error recovery rules are not correct yet.
12439
12440 * data/lalr1.cc: Comment changes to augment the similarity between
12441 lalr1.cc and yacc.c.
12442 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12443 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12444 yyerrlab), when hitting EOF, pop the whole stack here instead of
12445 merely falling thru the default error handling mechanism.
12446 (yyerrorlab): New label, with the old contents of YYERROR,
12447 plus the following change: pop the stack of rhs corresponding
12448 to the production that invoked YYERROR. That is how Yacc
12449 behaves (required by POSIX).
12450 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12451 fail.
12452
1f7a61ff
AD
124532003-08-25 Akim Demaille <akim@epita.fr>
12454
12455 Tune local.at so that people can "autom4te -l autotest calc.at -o
12456 calc" for instance, to extract a sub test suite.
12457
12458 * tests/testsuite.at: Move the initialization, Autotest version
12459 requirement, and AT_TESTED invocation into...
12460 * tests/local.at: here.
12461 * tests/testsuite.at: Include it for compatibility with Autoconf
12462 2.57.
12463 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12464 be ignore.
12465
327b5b56
PE
124662003-08-04 Paul Eggert <eggert@twinsun.com>
12467
12468 Rework code slightly to avoid gcc -Wtraditional warnings.
12469 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12470 The returned value is now stored in *YY0. All callers changed.
12471 * src/output.c (merge_output): Adjust to the above change.
12472
0051e3ed
PE
124732003-07-26 Paul Eggert <eggert@twinsun.com>
12474
12475 * data/glr.c (YYASSERT): New macro.
12476 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12477 yyresolveStates, yyprocessOneStack):
12478 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12479 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 12480
137437c6
PE
124812003-07-25 Paul Eggert <eggert@twinsun.com>
12482
5b620e06
PE
12483 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12484 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 12485 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
12486 by Frank Heckenbach, though I have omitted the structure-initialization
12487 part of his glr-knr.diff patch since I recall that the Portable
12488 C Compiler didn't require that change.
12489
137437c6
PE
12490 Let the user specify how to allocate and free memory.
12491 Derived from a suggestion by Frank Heckenbach in
161a71f3 12492 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
12493 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12494 All uses of free, malloc, realloc changed to use these macros,
12495 and unnecessary casts removed.
12496 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12497
ddb85ca5
PE
124982003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12499
12500 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12501 use s.empty() rather than s == "" to test for empty string; see
161a71f3 12502 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
12503 (trivial change)
12504
39910e09
AD
125052003-06-25 Akim Demaille <akim@epita.fr>
12506
12507 * config/depcomp, config/install-sh: Update from masters.
12508
0ae99356
PE
125092003-06-20 Paul Eggert <eggert@twinsun.com>
12510
12511 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12512 and return properly parenthesized result.
12513 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12514 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12515 Remove unnecessary parentheses from uses.
12516 * doc/bison.texinfo (Location Default Action): Describe the
12517 conventions for parentheses.
12518
cd05d13c
PE
125192003-06-19 Paul Eggert <eggert@twinsun.com>
12520
81fd08ca
PE
12521 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12522 yyreportTree): Do not assume that size_t is the same width as int,
12523 when printing sizes. Print sizes using an unsigned format.
12524 Problem reported by Frank Heckenbach in
161a71f3 12525 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 12526
cd05d13c
PE
12527 Port to Forte Developer 7 C compiler.
12528 * data/glr.c (struct YYLTYPE): If locations are not being used,
12529 declare a single dummy member, as empty structs do not conform
12530 to the C standard.
12531 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12532 the Forte Developer 7 C compiler complains that end-of-loop
12533 code is not reached.
12534
4dcf140b
PE
125352003-06-17 Paul Eggert <eggert@twinsun.com>
12536
12537 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12538 avoid warnings from picky compilers about redefinition of PARAMS.
12539
8dd76bee
PE
125402003-06-17 Paul Eggert <eggert@twinsun.com>
12541
12542 Version 1.875b.
12543
12544 * NEWS: Document 1.875b.
12545
12546 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12547 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12548 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12549 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12550 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12551 per recent gettext manual's suggestion.
12552 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12553 Use prototypes, not old-style definitions.
12554 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12555 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12556 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12557 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12558 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12559 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12560 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12561 vbitset_or_and_cmp, vbitset_copy): Likewise.
12562
12563 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12564 Do not include <stdlib.h>.
12565 (PARAMS): Define unconditionally for C89.
12566 (ATTRIBUTE_NORETURN): Remove.
12567 (ATTRIBUTE_UNUSED): Define unconditionally.
12568
12569 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 12570 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
12571 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12572 * lib/vbitset.c, lib/vbitset.h: New files.
12573 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12574 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12575 from libbitset.
12576
12577 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12578 `How Can I Reset @code{yyparse}', since texinfo does not allow
12579 arbitrary @ in node names.
12580
12581 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12582 shouldn't be needed according to the gettext 0.12.1 documentation
12583 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 12584 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 12585 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 12586 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 12587
8dd76bee
PE
12588 * lib/.cvsignore: Add stdbool.h.
12589 * m4/.cvsignore: Add nls.m4, po.m4.
12590
12591 Upgrade to CVS gnulib.
12592 * stdbool_.h: File renamed from stdbool.h.in.
12593 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12594 AC_HEADER_STDBOOL.
12595 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12596 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12597 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12598 (MOSTLYCLEANFILES): New var.
12599 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12600 (stdbool.h): New rule.
12601 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12602 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12603 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12604 m4/quote.m4: Upgrade to today's gnulib.
12605
12606 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12607 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12608 the tests right now.
12609 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12610 yyerror are declared before use; C99 requires this.
12611
25005f6a
PH
126122003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12613
12614 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12615 first.
12616 (yyrecoverSyntaxError): Correct the logic for setting and testing
12617 yyerrState.
12618 Correct comment on handling EOF.
12619 Allow states with only a default reduction, rather than failing
8dd76bee 12620 (I can't quite reconstruct why these were not allowed before).
25005f6a 12621
137437c6 12622 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 12623 buffer overruns, corrupting state.
8dd76bee
PE
12624
12625 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
12626 definition.
12627 * src/reader.h (max_left_semantic_context): New variable declaration.
12628 * src/scan-gram.l (max_left_semantic_context): Define.
12629 (handle_action_dollar): Update max_left_semantic_context.
12630 * data/glr.c (YYMAXLEFT): New definition.
12631 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12632 (yyresolveAction): Ditto.
12633
12634 Fixes to problems with location handling in GLR parsers reported by
12635 Frank Heckenbach (2003/06/05).
12636
12637 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12638 (YYRHSLOC): Add parentheses, and define only if locations used.
12639 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12640 locations not used.
12641 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12642 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 12643
25005f6a
PH
12644 * tests/cxx-type.at: Exercise location information; update tests
12645 to differentiate output with and without locations.
8dd76bee 12646 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
12647 because default YYLTYPE not yet defined.
12648 Change semantic actions to compute strings, rather than printing
12649 them directly (to test proper passing of semantics values). Change
12650 output to prefix notation and update test data and expected results.
12651 (yylex): Track locations.
12652 (stmtMerge): Return value rather than printing, and include arguments
12653 in value.
8dd76bee 12654
711f40b7
PE
126552003-06-03 Paul Eggert <eggert@twinsun.com>
12656
12657 Avoid warnings generated by GCC 2.95.4 when Bison is
12658 configured with --enable-gcc-warnings.
12659 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12660 yy::]b4_parser_class_name[::translate_,
12661 yy::Stack::operator[] (unsigned),
12662 yy::Stack::operator[] (unsigned) const,
12663 yy::Slice::operator[] (unsigned),
12664 yy::Slice::operator[] (unsigned) const):
12665 Rename local vars to avoid warnings.
12666 * tests/glr-regression.at (Improper handling of embedded actions
12667 and $-N in GLR parsers): Remove unused local variable from yylex.
12668 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12669 (void) as arg when not pure, since we now assume C89 when building
12670 Bison. Pacify GCC by using parameter.
12671
ac695f7d
PE
126722003-06-02 Paul Eggert <eggert@twinsun.com>
12673
12674 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12675 yy::Location::lines, yy::Location::columns): Rename arguments
12676 to avoid shadowing; this removes a warning generated by GCC 3.3.
12677
26ec81e0
PE
126782003-06-01 Paul Eggert <eggert@twinsun.com>
12679
12680 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12681 to g++, as GCC 3.3 complains if you do it.
12682 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12683 everything that WARNING_CFLAGS has, except omit warnings
12684 not suitable for C++.
12685 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12686 * tests/atlocal.in (CXXFLAGS): New var.
12687 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12688
12689 Fix a GLR parser bug I reported in February; see
161a71f3 12690 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
12691 The problem was that GLR parsers did not conform to the C standard,
12692 because actions like { $1 = $2 + $3; } expanded to expressions
12693 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12694 to a local variable. The C standard says that expressions
12695 like (var = f ()) + (var = f ()) have undefined behavior.
12696 Another problem was that GCC sometimes issues warnings that
12697 yyfill and its parameters are unused.
12698
12699 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12700 as possibly unused.
12701 (yyfill): New function.
12702 (YYFILL): Use it.
12703 (yyuserAction): Change type of yynormal to bool, so that it matches
12704 the new yyfill signature. Mark it as possibly unused.
12705
12706
12707 Follow up on a bug I reported in February, where a Bison-generated
12708 parser can loop. Provide a test case and a fix for yacc.c. I
12709 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12710 The original bug report is in:
161a71f3 12711 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
12712
12713 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12714 macro's size was becoming unwieldy.
12715 (yyerrlab): Do not discard an empty lookahead symbol, as this
12716 might destroy garbage.
12717 (yyerrorlab): New label, with the old contents of YYERROR,
12718 plus the following change: pop the stack of rhs corresponding
12719 to the production that invoked YYERROR. That is how Yacc
12720 behaves, and POSIX requires this behavior.
12721 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12722 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12723 Define 'alarm' to do nothing if unistd.h is not available.
12724 Add a new rule "exp: '-' error;" to test the above change to
12725 data/yacc.c. Use 'alarm' to abort any test taking longer than
12726 10 seconds, as it's probably looping.
12727 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12728 Also, the new yacc.c generates two fewer diagnostics for an
12729 existing test.
12730
d0829076
PE
127312003-05-24 Paul Eggert <eggert@twinsun.com>
12732
c6ae27df
PE
12733 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12734 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12735 This fixes a problem reported by John Bowman when the Compaq/HP
12736 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12737 -ansi -Wall -gall).
12738 * data/yacc.c (union yyalloc): Likewise.
12739 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 12740
d0829076
PE
12741 Switch from 'int' to 'bool' where that makes sense.
12742
12743 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12744 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12745 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12746 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12747 Return or accept bool, not int. All callers changed.
12748 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12749 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12750 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12751 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12752 bitset_or_and_cmp_): Likewise.
12753 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12754 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12755 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12756 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12757 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12758 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12759 bitset_stats_or_and_cmp): Likewise.
12760 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12761 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12762 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12763 ebitset_xor_cmp): Likewise.
12764 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12765 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12766 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12767 lbitset_xor_cmp): Likewise.
12768 * lib/bbitset.h: Include <stdbool.h>.
12769 (struct bitset_vtable): The following members now return bool, not
12770 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12771 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12772 or_and_cmp).
12773 * src/conflicts.c (count_rr_conflicts): Likewise.
12774 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12775 All uses changed.
12776 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12777 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12778 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12779 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12780 graph_flag): Likewise.
12781 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12782 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12783 graph_flag): Likewise.
12784 * src/output.c (error_verbose): Likewise.
12785 * src/output.h (error_verbose): Likewise.
12786 * src/reader.c (start_flag, typed): Likewise.
12787 * src/reader.h (typed): Likewise.
12788 * src/getargs.c (LOCATIONS_OPTION): New constant.
12789 (long_options, getargs): Use it.
12790 * src/lalr.c (build_relations): Use bool, not int.
12791 * src/nullable.c (nullable_compute): Likewise.
12792 * src/print.c (print_reductions): Likewise.
12793 * src/tables.c (action_row, pack_vector): Likewise.
12794 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12795 * src/output.c (prepare): Use it.
12796 * src/output.c (token_definitions_output,
12797 symbol_destructors_output, symbol_destructors_output): Use string,
12798 not boolean integer, to keep track of whether to output separator.
12799 * src/print_graph.c (print_core): Likewise.
12800 * src/state.c (state_rule_lookaheads_print): Likewise.
12801
12802 * config/install-sh: Sync from automake 1.7.5.
12803
6b2584b7
PE
128042003-05-14 Paul Eggert <eggert@twinsun.com>
12805
12806 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12807 semicolon after a grammar declaration, in the interest of possible
12808 future changes to the Bison input language.
12809 Do not allow a stray semicolon at the start of the grammar.
12810 (rhses.1): Allow one or more semicolons after any rule, including
12811 just before "|" as required by POSIX.
12812 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12813 grammar.
12814
caf37a36
ADL
128152003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12816
12817 %parse-param support for lalr1.cc.
12818
12819 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12820 b4_cc_constructor_calls, b4_cc_constructor_call,
12821 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12822 definitions.
12823 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12824 parse-param arguments.
12825 (yy::b4_parser_class_name): Declare instance variables to
12826 hold parse-param arguments.
12827 * tests/calc.at: s/value/semantic_value/ because value clashes
12828 with a member of yy::b4_parser_class_name. Adjust C++ code
12829 to handle %parse-param. Enable %parse-param test in C++.
12830
3ab37077
PE
128312003-05-12 Paul Eggert <eggert@twinsun.com>
12832
12833 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12834 English a bit. Fix fclose typo. Change "const char" to "char
12835 const", and use ANSI C rather than K&R for "main". Suggest
12836 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12837 and suggest yy_switch_to_buffer.
12838
128392003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
12840
12841 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12842 C89. This avoids a diagnostic on compilers that define __STDC__
12843 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 12844 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 12845
e743727f
PE
128462003-05-03 Paul Eggert <eggert@twinsun.com>
12847
12848 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12849 Do not overrun array bounds.
12850 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 12851 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 12852
916708d5
AD
128532003-04-29 Akim Demaille <akim@epita.fr>
12854
12855 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12856 * src/getargs.c, src/getargs.h: here, as bool, not int.
12857 (nondeterministic_parser): New.
12858 * src/parse-gram.y, src/scan-gram.l: Support
12859 %nondeterministic-parser.
12860 * src/output.c (prepare): Use nondeterministic_parser instead
12861 of glr_parser where appropriate.
12862 * src/tables.c (conflict_row, action_row, save_row)
12863 (token_actions, token_actions, pack_vector): Ditto.
12864
a06ea4aa
AD
128652003-04-29 Akim Demaille <akim@epita.fr>
12866
12867 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12868
211074ca
AD
128692003-04-29 Akim Demaille <akim@epita.fr>
12870
12871 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12872 with %pure-parser and %locations to exercise the patch from Yakov
12873 Markovitch below.
12874
6175ffe3
PE
128752003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12876
12877 * data/yacc.c: (b4_lex_param): Corrected for the case where
12878 %lex-param is provided and %pure-parser isn't.
12879
b1e95857
PE
128802003-04-27 Paul Eggert <eggert@twinsun.com>
12881
12882 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 12883 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
12884 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12885 if it is not defined.
12886 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12887
acda9df6
PE
128882003-04-26 Paul Eggert <eggert@twinsun.com>
12889
3470c57b
PE
12890 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12891 Declare to be of type suitable for the ninf value itself, not of
12892 type suitable for the corresponding table, since the latter might
12893 be unsigned but the ninf value might be negative. This fixes a
12894 bug reported by Alexandre Duret-Lutz in
161a71f3 12895 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 12896
acda9df6
PE
12897 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12898 invokes it. We shouldn't invoke it twice because it will attempt
12899 to put error.o in the archive twice. This fixes a glitch reported
12900 by Martin Mokrejs in
161a71f3 12901 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 12902
b5250f26
PE
129032003-04-21 Paul Eggert <eggert@twinsun.com>
12904
12905 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12906 to gnulib.
12907
089ac0f1
PE
129082003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12909
12910 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12911 Fix obvious typo that results in uncompilable GLR parsers
12912 when both %pure-parser and %locations are used. (trivial change)
12913
5ededac6
PE
129142003-04-17 Paul Eggert <eggert@twinsun.com>
12915
1b8f2fff
PE
12916 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12917 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12918 Do not insert the expected token via unput, as this runs afoul
12919 of a POSIX-compatibility bug in flex 2.5.31.
12920 All uses changed to BEGIN the parent state,
12921 since we no longer insert the expected token via unput.
12922 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12923 that is no longer emitted after the above change.
12924
5ededac6
PE
12925 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12926 the first one. This change is from Paul Hilfinger, and it fixes
12927 regression reported by Werner Lemberg in
161a71f3 12928 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
12929
12930 (resolve_sr_conflict): Don't invoke state_errs_set
12931 unless one or more tokens have been explicitly made errors.
12932 Otherwise, the above change causes Bison to abort.
12933
12934 * tests/existing.at (GNU pic Grammar): New test case, taken from
12935 Lemberg's email.
12936
b8be9132
AD
129372003-03-31 Akim Demaille <akim@epita.fr>
12938
12939 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12940
d423d460
AD
129412003-03-31 Akim Demaille <akim@epita.fr>
12942
12943 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12944 output.
12945
c7e441b4
AD
129462003-03-31 Akim Demaille <akim@epita.fr>
12947
12948 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12949 From Paul Hilfinger.
12950
231897ad
AD
129512003-03-29 Akim Demaille <akim@epita.fr>
12952
12953 * m4/error.m4: Do not put under dynamic conditions some code which
12954 expansion is under static control.
12955
5b066063
AD
129562003-03-29 Akim Demaille <akim@epita.fr>
12957
12958 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12959
22a74fec
AD
129602003-03-29 Akim Demaille <akim@epita.fr>
12961
12962 * doc/bison.texinfo (Strings are Destroyed): New.
12963
0eee27e7
PE
129642003-03-13 Paul Eggert <eggert@twinsun.com>
12965
12966 * .cvsignore: Add configure.lineno.
12967 * src/.cvsignore: Add yacc.
12968 * tests/.cvsignore: Add testsuite.log.
12969 * doc/fdl.texi: Sync with latest FSF version.
12970
f61aad93
PE
129712003-03-12 Paul Eggert <eggert@twinsun.com>
12972
537636c7
PE
12973 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12974 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12975 cursor, instead of leaving it undefined. This fixes a bug
12976 reported by Tim Van Holder in
161a71f3 12977 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
12978 * tests/input.at (Torturing the Scanner): Test the scanner on
12979 an empty input file, which was Tim Van Holder's test case.
12980
12981 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12982 <sys/resource.h> can be included, include sys/time.h and
12983 sys/times.h first, if available. This works around the SunOS
12984 4.1.4 porting bug reported by Bruce Becker in
161a71f3 12985 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
12986
12987 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12988 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12989 AC_HEADER_SYS_WAIT.
12990
f61aad93
PE
12991 Merge changes from gnulib. This was prompted because the CVS
12992 snapshot didn't build on Solaris 7 due to strnlen problems.
12993
12994 These changes need to be merged back into gnulib:
12995 * lib/hash.c: Include <stdbool.h> unconditionally.
12996 * m4/onceonly.m4 (m4_quote): New macro.
12997 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12998 Quote AC_FOREACH variable-expansions properly.
12999 The 2003-01-03 obstack.h change also needs merging.
13000 {end of changes requiring merging}
5b066063 13001
f61aad93
PE
13002 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13003 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13004 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13005 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13006 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13007 New files, imported from gnulib.
13008 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13009 above.
13010
13011 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13012 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13013 gnulib sources.
13014
13015 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13016 Add.
13017 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13018 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13019 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13020 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13021 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13022 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13023 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13024 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13025 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13026 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13027 (jm_PREREQ_ARGMATCH): Remove.
13028 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13029 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13030
13031 * src/system.h: Include <stdbool.h> unconditionally.
13032
13033 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13034 assuming at least C89 in the bitset code for some time now.
13035
d2ffe116
AD
130362003-03-03 Akim Demaille <akim@epita.fr>
13037
13038 * ro.po: New.
13039
052826fd
AD
130402003-03-02 Akim Demaille <akim@epita.fr>
13041
13042 * doc/bison.texinfo (Table of Symbols): Reactivate the
13043 documentation for %lex-param, and %parse-param.
13044
c4749565
AD
130452003-03-02 Akim Demaille <akim@epita.fr>
13046
13047 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13048 generate verbose error messages.
13049 Use the number of tokens as an upper bound in yytname, as it
13050 cannot be a non terminal.
13051
d5286af1
AD
130522003-03-02 Akim Demaille <akim@epita.fr>
13053
13054 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13055 message.
13056
22e304a6
AD
130572003-03-02 Akim Demaille <akim@epita.fr>
13058
22e304a6
AD
13059 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13060 Use them to exercise yycheck overrun.
13061 Based on Andrew Suffield's grammar.
13062
67a25fed
AD
130632003-03-02 Akim Demaille <akim@epita.fr>
13064
13065 Create tests/local.at for Bison generic testing macros.
13066
13067 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13068 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13069 This new file.
13070 * tests/calc.at (AT_CHECK_CALC): Adjust.
13071 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13072 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13073 * tests/local.at: here.
13074 (AT_COMPILE_CXX): Tags the tests using it as c++.
13075 Ignore the test if CXX is not functional.
13076
9c2b381f
PE
130772003-03-01 Paul Eggert <eggert@twinsun.com>
13078
13079 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13080 not loc->end, since loc->end might contain garbage and this leads
13081 to undefined behavior on some platforms.
13082 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13083 depend on *loc, so that the reader doesn't give the the false
13084 impression that *loc is initialized.
13085 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13086 does not survive the return.
13087
0433ba88
AD
130882003-03-01 Akim Demaille <akim@epita.fr>
13089
13090 * src/scan-gram.l (code_start): Always initialize it when entering
13091 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13092 yylex invocation. An alternative would be making it static, but
13093 then it starts with the second %%'s beginning, instead of its end.
13094
b305ea69
PE
130952003-02-28 Paul Eggert <eggert@twinsun.com>
13096
13097 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13098 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 13099 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 13100
c3d25e01
PE
131012003-02-26 Paul Eggert <eggert@twinsun.com>
13102
13103 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13104 Remove Sequent/Pyramid discussion (nobody uses them any more).
13105 Merge VMS and MS-DOS discussion; these ports may well be dead
13106 but let's keep mentioning them for now. Put <> around email
13107 addresses. Add copyright notice.
13108
c267ffbc
PE
131092003-02-24 Paul Eggert <eggert@twinsun.com>
13110
13111 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13112 to avoid collision with flex use of yylineno.
13113 Problem reported by Bruce Lilly in
161a71f3 13114 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
13115 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13116 * data/yacc.c (yy_reduce_print): Likewise.
13117
13118 * config/depcomp: Sync with Automake 1.7.3.
13119
f939fc12
AD
131202003-02-21 Akim Demaille <akim@epita.fr>
13121
13122 * data/lalr1.cc: Use temporary variables instead of casts to
13123 change integer types.
13124 Suggested by Paul Eggert.
13125
95923bd6
AD
131262003-02-21 Akim Demaille <akim@epita.fr>
13127
13128 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13129 to avoid confusions with lalr1.cc's notion of Position.
13130 Suggested by Paul Eggert.
13131
2cdc240e
AD
131322003-02-20 Akim Demaille <akim@epita.fr>
13133
13134 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13135 before initial_columns.
13136 (location.hh): Use consistent variable names when defining the
13137 operator<<.
13138 Use "last" so that we subtract from Positions, not from unsigned.
13139
5d003116
AD
131402003-02-20 Akim Demaille <akim@epita.fr>
13141
13142 * data/lalr1.cc (position.hh): New subfile, including the extended
13143 and Doxygen'ed documentation of class Position.
13144 (location.hh): Use it.
13145 Document a` la Doxygen.
ba1ecc07 13146 With the help of Benoit Perrot.
5d003116 13147
d02b25f9
AD
131482003-02-20 Akim Demaille <akim@epita.fr>
13149
13150 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13151 AT_YACC_IF.
13152 Redefine AT_YYERROR_SEES_LOC_IF using it.
13153 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13154 not defined.
13155 Don't use the location in yy::Parser::error_ and
13156 yy::Parser::print_ when not %locations.
13157 Activate more lalr1.cc tests.
13158
0d1c3a04
AD
131592003-02-19 Akim Demaille <akim@epita.fr>
13160
13161 * data/lalr1.cc: When displaying a line number, be sure to make it
13162 an int.
13163
60a777aa
AD
131642003-02-19 Akim Demaille <akim@epita.fr>
13165
13166 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13167 Remove, useless.
13168 (YYABORT, YYACCEPT, YYERROR): New.
13169 * tests/calc.at: Renable the lalr1.cc test.
13170
0b86fc41
AD
131712003-02-19 Akim Demaille <akim@epita.fr>
13172
13173 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13174 error recovery, mixing with/without pops and discarding of the
13175 lookahead.
13176 Exercise YYERROR.
13177 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13178
da99a5dc
PE
131792003-02-17 Paul Eggert <eggert@twinsun.com>
13180
13181 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13182 * tests/testsuite.at (AT_COMPILE): Use them.
13183 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 13184 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 13185
93b8c255
PE
131862003-02-12 Paul Eggert <eggert@twinsun.com>
13187
13188 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13189 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 13190 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
13191 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13192 Check for malloc failure, for consistency with yacc.c.
13193 (yytname_size): Remove, for consistency with yacc.c.
13194
13195 The bug still remains in data/lalr1.cc, as I didn't have time
13196 to fix it there.
13197
7548fed2
AD
131982003-02-06 Akim Demaille <akim@epita.fr>
13199
13200 * configure.ac (GXX): Rename as...
13201 (CXX): this, to keep the original Autoconf semantics.
13202 Require 2.57.
13203 * data/lalr1.cc: Fix b4_copyright invocations.
13204 If YYDEBUG is not defined, don't depend upon name_ being defined.
13205 (location.hh): Include string and iostream.
13206 (Position::filename): New member.
13207 (Position::Position ()): New.
13208 (operator<< (Position)): New.
13209 (operator- (Position, int)): New.
13210 (Location::first, Location::last): Rename as...
13211 (Location::begin, Location::end): these, to mock the conventional
13212 iterator names.
13213 (operator<< (Location)): New.
13214 * tests/atlocal.in (CXX): New.
13215 * tests/testsuite.at (AT_COMPILE_CXX): New.
13216 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13217 locations in a more synthetic way.
13218 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13219 lalr1.cc is used.
13220 Adjust the C locations to match those from Emacs: first column is
13221 column 0.
13222 Change all the expected results.
13223 Conform to the GCS: simplify the locations when applicable.
13224 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13225 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13226 these CPP macros with the m4 macros new defined by...
13227 (AT_CHECK_PUSHDEFS): this, i.e.:
13228 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 13229 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
13230 New macros.
13231 (AT_CHECK_POPDEFS): Undefine them.
13232 (AT_CHECK_CALC_LALR1_CC): New.
13233 Use it for the first lalr1.cc test.
13234
43a176ef
AD
132352003-02-04 Akim Demaille <akim@epita.fr>
13236
13237 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13238 Location as is defined.
13239
fc049e9c
AD
132402003-02-04 Akim Demaille <akim@epita.fr>
13241
13242 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13243 name_ being defined.
13244
a737b216
PE
132452003-02-03 Paul Eggert <eggert@twinsun.com>
13246
13247 * src/gram.h (start_symbol): Remove unused decl.
13248
13249 Use more-consistent naming conventions for local vars.
13250
13251 * src/derives.c (derives_compute): Change type of local var from
13252 int to rule_number.
13253 * src/gram.c (grammar_rules_partial_print): Likewise.
13254 * src/print.c (print_core): Likewise.
13255 * src/reduce.c (reduce_grammar_tables): Likewise.
13256
13257 * src/gram.c (grammar_dump): Change name of item_number *
13258 local var from r to rp.
13259 * src/nullable.c (nullable_compute): Likewise.
13260
13261 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13262
13263 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13264 for symbol or symbol_number var.
13265 * src/reader.c (grammar_start_symbol_set): Likewise.
13266 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13267 Likewise.
13268 * src/state.c (transitions_to): Likewise.
13269 * src/state.h: Likewise.
13270 * src/tables.c (symbol_number_to_vector_number): Likewise.
13271
13272 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13273 char * var.
13274
13275 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13276 var.
13277
13278 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13279 var.
13280
13281 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13282 Use str, not s, for char * var. Use ch, not c, for character var.
13283 Use size for size var.
13284
13285 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13286 char * var.
13287 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13288 uniqstr var.
13289 * src/uniqstr.h: Likewise.
13290
13291 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13292 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13293 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13294 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13295 param to have same name as that of enum, so that we don't use
13296 "s" to stand for a non-state.
13297
68e93ad5
AD
132982003-02-02 Akim Demaille <akim@epita.fr>
13299
13300 * src/scan-skel.l: Scan more than one inert character per yylex
13301 invocation.
13302
92898986
PE
133032003-02-01 Paul Eggert <eggert@twinsun.com>
13304
13305 Version 1.875a.
13306
1d9d5d71
PE
13307 * po/LINGUAS: Add ms.
13308
0435d061
AD
133092003-01-30 Akim Demaille <akim@epita.fr>
13310
13311 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13312
6029a57f
PH
133132003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13314
13315 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13316 of $1.
0435d061
AD
13317
13318 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 13319 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 13320 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 13321
6029a57f
PH
13322 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13323 (b4_rhs_location): Ditto.
0435d061 13324 (yyfill): New function to copy from stack tree into array
6029a57f 13325 incrementally.
0435d061
AD
13326 (yyuserAction): Modify to allow incremental move of semantic values
13327 to rhs array when in GLR mode.
13328 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
13329 as needed.
13330 Remove dummy use of yystack, as there is now a guaranteed use.
13331 (yydoAction): Modify to allow incremental move of semantic values
13332 to rhs array when in GLR mode.
13333 (yyresolveAction): Ditto.
13334 (yyglrShiftDefer): Update comment.
0435d061 13335 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
13336 (yyglrReduce): Ditto.
13337 (yydoAction): Ditto
0435d061 13338
6029a57f
PH
13339 * tests/glr-regr1.at: Rename to ...
13340 * tests/glr-regression.at: Add new regression test for the problems
13341 described above (adapted from S. Eken).
13342 Update copyright notice.
13343 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13344 * tests/Makefile.am: Ditto.
13345
6cee6297
PE
133462003-01-28 Paul Eggert <eggert@twinsun.com>
13347
13348 * data/lalr1.cc: Do not use @output_header_name@ unless
13349 b4_defines_flag is set. This fixes two bugs reported by
13350 Tim Van Holder in
161a71f3
PE
13351 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13352 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 13353
b2a836b5
PE
133542003-01-21 Paul Eggert <eggert@twinsun.com>
13355
13356 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13357 we don't need to worry about yyerrlab1 being reported as an
13358 "unused label" by non-GCC C compilers. The downside is that if
13359 locations are used then a couple of statements are duplicated each
13360 time YYERROR is invoked, but the upside is that the warnings
13361 should vanish.
13362 (yyerrlab1): Move code to YERROR.
13363 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13364 This reverts some of the 2002-12-27 change.
13365
4196b931
PE
133662003-01-17 Paul Eggert <eggert@twinsun.com>
13367
13368 * src/output.c (symbol_printers_output): Fix typo that led
13369 to core dump. Problem reported by Antonio Rus in
161a71f3 13370 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 13371
3ae831b4
AD
133722003-01-13 Akim Demaille <akim@epita.fr>,
13373 Quoc Peyrot <chojin@lrde.epita.fr>,
13374 Robert Anisko <anisko_r@lrde.epita.fr>
13375
13376 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13377 when the stacks contain one element, as the loop would otherwise
13378 free the last state, and then use the top state (the one we just
13379 popped). This means that the initial elements will not be freed
13380 explicitly, as is the case in yacc.c; it is not a problem, as
13381 these elements have fake values.
13382
e3aa65c5
PE
133832003-01-11 Paul Eggert <eggert@twinsun.com>
13384
13385 * NEWS: %expect-violations are now just warnings, reverting
13386 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13387 bootstrapping problem reported by Matthias Klose; see
161a71f3 13388 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
13389 * src/conflicts.c (conflicts_print): Likewise.
13390 * tests/conflicts.at (%expect not enough, %expect too much,
13391 %expect with reduce conflicts): Likewise.
13392 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13393 that the warning is enabled if the number of conflicts changes
13394 (not necessarily increases).
13395
13396 * src/getargs.c (version): Update copyright year.
13397
f0057011
AD
133982003-01-09 Akim Demaille <akim@epita.fr>
13399
13400 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13401
1ee6d2a0
PE
134022003-01-08 Paul Eggert <eggert@twinsun.com>
13403
13404 * Makefile.maint (WGETFLAGS):
13405 New macro, containing "-C off" to disable proxy caches.
13406 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13407 (rel-check): Use $(WGET) instead of wget.
13408
d4fd77c4
PE
134092003-01-06 Paul Eggert <eggert@twinsun.com>
13410
13411 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13412 the GLR paper of Scott, Johnstone and Hussain.
13413
464c6927
PE
134142003-01-04 Paul Eggert <eggert@twinsun.com>
13415
d600ee67
PE
13416 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13417 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13418 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13419 (EXTRA_LIBRARIES): New var, for liby.a.
13420 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13421 (EXTRA_SCRIPTS): New var, for yacc.
13422
464c6927
PE
13423 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13424 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13425 Problem reported by Nelson H. F. Beebe.
13426
134272003-01-03 Paul Eggert <eggert@twinsun.com>
13428
13429 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13430 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13431 when compiling Bison 1.875's `bitset bset = obstack_alloc
13432 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13433
13434 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13435 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13436 grow to a huge size with typical invocation.
d600ee67 13437
464c6927
PE
13438 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13439 Use the pattern recommended by Autoconf 2.57, except also protect
13440 against double-definition.
13441 * src/system.h: Likewise.
13442 Portability issues reported by Nelson H. F. Beebe.
d600ee67 13443
464c6927
PE
13444 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13445 All uses changed. Provide a definition in both C and C++.
13446 (yytrue, yyfalse): Define even if defined (__cplusplus).
13447
13448 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13449 Reported by Nelson H. F. Beebe.
d600ee67 13450
464c6927
PE
13451 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13452
0f42c7d5
PE
134532003-01-02 Paul Eggert <eggert@twinsun.com>
13454
13455 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13456 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13457 Bug reported by Nelson H. F. Beebe.
13458
dc546b0f
PE
134592003-01-01 Paul Eggert <eggert@twinsun.com>
13460
13461 * Version 1.875.
13462
2c09b6a7
PE
134632002-12-30 Paul Eggert <eggert@twinsun.com>
13464
13465 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13466 Moved here from...
13467 (<INITIAL>","): Here. This causes stray "," to be treated
13468 more uniformly.
13469
dc546b0f 13470 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
13471 last brace in braced code when not in Yacc mode, for compatibility
13472 with Bison 1.35. This resurrects the 2001-12-15 patch to
13473 src/reader.c.
13474
13475 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13476 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13477
535c0f63
PE
134782002-12-28 Paul Eggert <eggert@twinsun.com>
13479
13480 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13481 that of SYM's type. This fixes Debian bug 168069, reported by
13482 Thomas Olsson.
d600ee67 13483
963fcc17
PE
134842002-12-28 Paul Eggert <eggert@twinsun.com>
13485
13486 Version 1.75f.
13487
13488 Switch back to the Yacc style of conflict reports, undoing some
13489 of the 2002-07-30 change.
13490 * doc/bison.texinfo (Understanding): Use Yacc style for
13491 conflict reports. Also, use new way of locating rules.
13492 * src/conflicts.c (conflict_report):
13493 Renamed from conflict_report_yacc, removing the old
13494 'conflict_report'. Translate the entire conflict report at once,
13495 so that we don't assume that "," has the same interpretation in
13496 all languages.
13497 (conflicts_output): Use Yacc-style conflict report for each state,
13498 instead of our more-complicated style.
13499 (conflicts_print): Use Yacc-style conflict report, except print
13500 the input file name when not emulating Yacc.
13501 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13502 Conflicted Reduction, %expect not enough, %expect too much,
13503 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13504 * tests/existing.at (GNU Cim Grammar): Likewise.
13505 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13506
13507 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13508 fatal): Don't invoke fflush; it's not needed and it might even be
13509 harmful for stdout, as stdout might not be open.
13510 * src/reduce.c (reduce_print): Likewise.
13511
b1efe548
PE
135122002-12-27 Paul Eggert <eggert@twinsun.com>
13513
13514 Fix a bug where error locations were not being recorded correctly.
13515 This problem was originally reported by Paul Hilfinger in
161a71f3 13516 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
13517
13518 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13519 top of the location stack's error locations.
13520 (yyerrlab): Set it. When discarding a token, push its location
13521 onto yylerrsp so that we don't lose track of the error's end.
13522 (yyerrlab1): Now is only the target of YYERROR, so that we can
13523 properly record the location of the action that failed. For GCC
13524 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13525 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13526 (yyerrlab2): New label, which yyerrlab now falls through to.
13527 Compute the error's location by applying YYLLOC_DEFAULT to
13528 the locations of all the symbols that went into the error.
13529 * doc/bison.texinfo (Location Default Action): Mention that
13530 YYLLOC_DEFAULT is also invoked for syntax errors.
13531 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13532 Error locations include the locations of all the tokens that were
13533 discarded, not just the last token.
d600ee67 13534
983c5c2c
PE
135352002-12-26 Paul Eggert <eggert@twinsun.com>
13536
b1efe548
PE
13537 * src/files.c: Include quote.h.
13538 (compute_output_file_names): Warn if we detect conflicting
13539 outputs to the same file. This should catch the misunderstanding
13540 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13541
13542 * src/conflicts.c (conflicts_print): If the user specifies
13543 "%expect N", report an error if there are any reduce/reduce
13544 conflicts. This is what the manual says should happen.
13545 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13546 * tests/conflicts.at (%expect with reduce conflicts): New test.
13547
983c5c2c
PE
13548 Don't use m4_include on relative file names, as it doesn't work as
13549 desired if there happens to be a file with that name under ".".
d600ee67 13550
983c5c2c
PE
13551 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13552 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13553 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13554 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13555 * src/output.c (output_skeleton): Use full path names when
13556 specifying a file to include; don't rely on include path, as
13557 it's unreliable when the working file contains a file with
13558 that name.
d600ee67 13559
983c5c2c
PE
135602002-12-25 Paul Eggert <eggert@twinsun.com>
13561
13562 Remove obsolete references to bison.simple and bison.hairy.
13563 Problem mentioned by Aubin Mahe in
161a71f3 13564 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
13565 * data/glr.c: Comment fix.
13566 * doc/bison.1: Remove references. Also, mention "yacc".
13567
13568 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13569 with -g option.
13570
13571 * src/parse-gram.y (declaration): Use enum "report_states" rather
13572 than its numeric value 1.
13573
13574 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13575 opening a new one. This fixes Debian bug 165349, reported by
13576 Bruce Stephens.
13577
23f2d9dc
PE
135782002-12-24 Paul Eggert <eggert@twinsun.com>
13579
13580 Version 1.75e.
13581
13582 * Makefile.maint (cvs-update): Don't assume that the shell
13583 supports $(...), as Solaris sh doesn't.
13584
13585 * src/parse-gram.y (lloc_default): Remove test for empty
13586 nonterminals at the end, since it didn't change the result.
13587
135882002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
13589
13590 If the user does not define YYSTYPE as a macro, Bison now declares it
13591 using typedef instead of defining it as a macro. POSIX requires this.
13592 For consistency, YYLTYPE is also declared instead of defined.
13593
13594 %union directives can now have a tag before the `{', e.g., the
13595 directive `%union foo {...}' now generates the C code
13596 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13597 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13598 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13599 instead of `yyltype'.
13600
13601 `yystype' and `yyltype' are now obsolescent macros instead of being
13602 typedefs or tags; they are no longer documented and will be
13603 withdrawn in a future release.
13604
13605 * data/glr.c (b4_location_type): Remove.
13606 (YYSTYPE): Renamed from yystype.
13607 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13608 (struct YYLTYPE): Renamed from struct yyltype.
13609 (YYLTYPE): Renamed from yyltype.
13610 (yyltype, yystype): New (and obsolescent) macros,
13611 for backward compatibility.
13612 * data/yacc.c: Likewise.
13613
13614 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13615 does not specify a union tag. This is for compatibility with
13616 Solaris 9 yacc.
13617
13618 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13619 const *, since it is now modified by stripping surrounding { }.
13620 (current_braced_code): Remove.
13621 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13622 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13623 trailing " {...}". Now of type <chars>.
13624 (grammar_declaration): Adjust to bundled tokens.
13625 (code_content): Remove; stripping is now done by add_param.
13626 (print_token_value): Print contents of bundled tokens.
13627 (token_name): New function.
13628
13629 * src/reader.h (braced_code, current_braced_code): Remove.
13630 (token_name): New decl.
13631
13632 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13633 token_type, not braced_code code_kind. All uses changed.
13634 (SC_PRE_CODE): New state, for scanning after a keyword that
13635 has (or usually has) an immediately-following braced code.
13636 (token_type): New local var, to keep track of which token type
13637 to return when scanning braced code.
13638 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 13639 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
13640 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13641 instead of returning a token type immediately.
13642 (<INITIAL>"{"): Set token type.
13643 (<SC_BRACED_CODE>"}"): Use it.
13644 (handle_action_dollar, handle_action_at): Now returns bool
13645 indicating success. Fail if ! current_rule; this prevents a core dump.
13646 (handle_symbol_code_dollar, handle_symbol_code_at):
13647 Remove; merge body into caller.
13648 (handle_dollar, handle_at): Complain in invalid contexts.
13649
13650 * NEWS, doc/bison.texinfo: Document the above.
13651 * NEWS: Fix years and program names in copyright notice.
13652
879ca4f8
PE
136532002-12-17 Paul Eggert <eggert@twinsun.com>
13654
13655 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13656 Reporting, Table of Symbols): Omit mentions of %lex-param and
13657 %parse-param from the documentation for now.
13658
1c5fe69d
PE
136592002-12-15 Paul Eggert <eggert@twinsun.com>
13660
13661 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13662 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13663 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
13664 disagreed with the Bison documentation. Bug
13665 reported by Andrew Walrond.
d600ee67 13666
1c5fe69d
PE
13667 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13668 as the caller now does that.
13669 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13670 (YYEMPTY): Parenthesize right hand side, since others use it.
13671 (yyparse): Don't assume that our generated code is the only code
13672 that sets yychar.
13673
d1de5372
PE
136742002-12-13 Paul Eggert <eggert@twinsun.com>
13675
13676 Version 1.75d.
13677
13678 POSIX requires a "yacc" command.
13679 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13680 (MOSTLYCLEANFILES): Add yacc.
13681 (yacc): New rule.
1c5fe69d 13682 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
13683 as an alias for bison y.
13684
13685 * po/LINGUAS: Add da.
d600ee67 13686
d1de5372
PE
13687 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13688 problem with latest <getopt.h>.
13689 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13690
13691 * doc/fdl.texi: Upgrade to 1.2.
13692 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13693 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13694 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13695 gnulib.
13696 * config/install-sh: Sync with autotools.
13697
13698 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 13699 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
13700 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13701 locations are requested.
13702 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13703 locations are requested.
13704
d0f3fe23
PE
137052002-12-12 Paul Eggert <eggert@twinsun.com>
13706
13707 Remove unportable casts and storage allocation tricks.
13708 While we're at it, remove almost all casts, since they
13709 usually aren't needed and are a sign of trouble.
13710
13711 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13712
13713 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13714 the pointer DSET returned by malloc; this isn't portable.
13715 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13716 Similarly for DERIVES.
13717 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13718 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13719 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13720
13721 * src/derives.c (derives_compute): Do not bother invoking
13722 int_of_rule_number, since rule numbers are integers.
13723
13724 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13725 rather than XMALLOC (char, N).
13726
13727 * src/files.c (filename_split): Rewrite to avoid cast.
13728
13729 * src/gram.h (symbol_number_as_item_number,
13730 item_number_as_symbol_number, rule_number_as_item_number,
13731 item_number_as_rule_number):
13732 Now inline functions rather than macros, to avoid casts.
13733 * src/state.h (state_number_as_int): Likewise.
13734 * src/tables.c (state_number_to_vector_number,
13735 symbol_number_to_vector_number): Likewise.
13736
13737 * src/gram.h (int_of_rule_number): Remove; no longer used.
13738
13739 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13740 since the resulting storage is always stored into.
13741
13742 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13743 where it's needed.
13744
13745 * src/muscle_tab.c (muscle_m4_output):
13746 Now inline. Return bool, not int.
13747 * src/state.c (state_compare): Likewise.
13748 * src/symtab.c (symbol_check_defined,
13749 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13750 hash_compare_symbol, hash_symbol):
13751 Likewise.
13752 * src/uniqstr.c (uniqstr_print): Likewise.
13753 * src/muscle_tab.c (muscle_m4_output_processor):
13754 New function, to avoid casts.
13755 * src/state.c (state_comparator, stage_hasher): Likewise.
13756 * src/symtab.c (symbol_check_defined_processor,
13757 symbol_check_alias_consistency_processor, symbol_pack_processor,
13758 symbol_translation_processor, hash_symbol_comparator,
13759 hash_symbol_hasher): Likewise.
13760 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13761 * src/muscle_tab.c (muscles_m4_output):
13762 Use new functions instead of casting old functions unportably.
13763 * src/state.c (state_hash_new): Likewise.
13764 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13765 symbols_token_translations_init):
13766 Likewise.
13767 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13768
13769 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13770 var instead of casting to long, to avoid casts.
13771 (prepare_states): Use MALLOC rather than alloca, so that we don't
13772 have to worry about alloca.
13773 * src/state.c (state_hash_lookup): Likewise.
13774
13775 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13776 local var instead of casting to unsigned char, to avoid casts.
13777
13778 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13779 STATE_ALLOC): Remove.
13780 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13781 rather than calloc, and use offsetof to avoid allocating slightly
13782 too much storage.
13783 (state_new): Initialize all members.
13784
13785 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13786
13787 * src/symtab.c (symbol_free): Remove; unused.
13788 (symbol_get): Remove cast in lhs of assignment.
13789 (symbols_do): Now static. Accept generic arguments, not
13790 hashing-related ones.
13791
13792 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13793 (symbol_processor): Remove.
13794 (symbols_do): Remove decl; now static.
13795
13796 * src/system.h (alloca): Remove; decl no longer needed.
13797 (<stddef.h>): Include, for offsetof.
13798 (<inttypes.>, <stdint.h>): Include if available.
13799 (uintptr_t): New type, if system lacks it.
13800 (CALLOC, MALLOC, REALLOC): New macros.
13801 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13802 new macros.
13803
13804 * src/tables.c (table_size): Now int, to pacify GCC.
13805 (table_grow, table_ninf_remap): Use signed table size.
13806 (save_row): Don't bother initializing locals when not needed.
13807 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13808 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13809
13810 * src/vcg.h: Correct misspellings.
13811
13812 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13813
13814
13815 * src/getargs.c (getargs): Don't assume EOF == -1.
13816
26b4a969
PE
138172002-12-09 Paul Eggert <eggert@twinsun.com>
13818
13819 Change identifier spellings to avoid collisions with names
13820 that are reserved by POSIX.
13821
13822 Don't use names ending in _t, since POSIX reserves them.
13823 For consistency, remove _e and _s endings -- they're weren't
13824 needed to remove ambiguity. All uses changed.
13825 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13826 turn was just renamed from struniq_t.
13827 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13828 which in turn was just renamed from struniq_processor_t.
13829 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13830 in turn was renamed from hash_compare_struniq_t.
13831 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13832 (state_list): Renamed from state_list_t.
13833 * src/assoc.h (assoc): Renamed from assoc_t.
13834 * src/conflicts.c (enum conflict_resolution): Renamed from
13835 enum conflict_resolution_e.
13836 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13837 (rule_list): Renamed from rule_list_t.
13838 * src/getargs.h (enum trace): Renamed from enum trace_e.
13839 (enum report): Renamed from enum report_e.
13840 * src/gram.h (item_number): Renamed from item_number_t.
13841 (rule_number): Renamed from rule_number_t.
13842 (struct rule_s): Remove the "rule_s" part; not used.
13843 (rule): Renamed from rule_t.
13844 (rule_filter): Renamed from rule_filter_t.
13845 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13846 (goto_list): Renamed from goto_list_t.
13847 * src/lalr.h (goto_number): Renamed from goto_number_t.
13848 * src/location.h (location): Renamed from location_t.
13849 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13850 and moved here from:
13851 * src/muscle_tab.h (muscle_entry_t): here.
13852 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13853 (rule_list): Renamed from rule_list_t.
13854 * src/print_graph.c (static_graph): Renamed from graph.
13855 * src/reader.h (braced_code): Renamed from braced_code_t.
13856 Remove brace_code_e tag.
13857 * src/relation.h (relation_node): Renamed from relation_node_t.
13858 (relation_nodes): Renamed from relation_nodes_t.
13859 (relation): Renamed from relation_t.
13860 * src/state.h (state_number): Renamed from state_number_t.
13861 (struct state): Renamed from struct state_s.
13862 (state): Renamed from state_t.
13863 (transitions): Renamed from transitions_t. Unused (and
13864 misspelled) transtion_s tag removed.
13865 (errs): Renamed from errs_t. Unused errs_s tag removed.
13866 (reductions): Renamed from reductions_t. Unused tag
13867 reductions_s removed.
13868 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13869 (struct symbol_list): Renamed from struct symbol_list_s.
13870 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13871 (struct symbol): Renamed from struct symbol_s.
13872 (symbol): Renamed from symbol_t.
13873 * src/tables.c (vector_number): Renamed from vector_number_t.
13874 (action_number): Renamed from action_t.
13875 * src/tables.h (base_number): Renamed from base_t.
13876 * src/vcg.h (enum color): Renamed from enum color_e.
13877 (enum textmode): Renamed from enum textmode_e.
13878 (enum shape): Renamed from enum shape_e.
13879 (struct colorentry): Renamed from struct colorentry_s.
13880 (struct classname): Renamed from struct classname_s.
13881 (struct infoname): Renamed from struct infoname_s.
13882 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13883 (enum decision): Renamed from enum decision_e.
13884 (enum orientation): Renamed from enum orientation_e.
13885 (enum alignment): Renamed from enum alignment_e.
13886 (enum arrow_mode): Renamed from enum arrow_mode_e.
13887 (enum crossing_type): Renamed from enum crossing_type_e.
13888 (enum view): Renamed from enum view_e.
13889 (struct node): Renamed from struct node_s.
13890 (node): Renamed from node_t.
13891 (enum linestyle): Renamed from enum linestyle_e.
13892 (enum arrowstyle): Renamed from enum arrowstyle_e.
13893 (struct edge): Renamed from struct edge.
13894 (edge): Renamed from edge_t.
13895 (struct graph): Renamed from struct graph_s.
13896 (graph): Renamed from graph_t.
13897 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13898 Rename value_t -> value.
13899 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13900 value_t_as_yystype -> value_as_yystype.
13901
13902 Don't include <errno.h> in the mainstream code, since it
13903 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13904 * lib/get-errno.c, lib/get-errno.h: New files.
13905 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13906 get-errno.c.
13907 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13908 * src/output.c (output_skeleton): Likewise.
13909 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13910 instead of errno.
13911 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13912 Likewise.
13913 (handle_action_dollar, handle_action_at): Likewise.
13914 * src/system.h: Do not include <errno.h>.
13915 (TAB_EXT): Renamed from EXT_TAB.
13916 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13917
13918 Avoid str[a-z]*, since <string.h> reserves that name space.
13919 Change all instances of "struniq" in names to "uniqstr", and
13920 likewise for "STRUNIQ" and "UNIQSTR".
13921 * src/uniqstr.c: Renamed from src/struniq.c.
13922 * src/uniqstr.h: Renamed from src/struniq.h.
13923 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13924 * src/files.c (strsuffix): Remove; unused.
13925 (concat2): Renamed from stringappend. Now static.
13926 * src/files.h (strsuffix, stringappend): Remove; unused.
13927 * src/parse-gram.y (<chars>): Renamed from <string>.
13928 (<uniqstr>): Renamed from <struniq>.
13929 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13930 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13931 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13932 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13933 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13934 (N_EXPAND): Renamed from N_STRETCH.
13935
13936 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13937 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13938 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13939 Remove; unused.
13940 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13941 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13942 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13943 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13944 (BASE_MAXIMUM): Renamed from BASE_MAX.
13945 (BASE_MINIMUM): Renamed from BASE_MIN.
13946 (ACTION_MAX): Remove; unused.
13947 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13948 Unnecessary casts removed from above defines.
13949
13950
13951 Fix misspelling in names.
13952 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13953 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13954 G_NODE_ALIGNEMENT.
13955
13956
13957 * lib/timevar.c (timevar_report): Renamed from time_report,
13958 for consistency with other names.
13959 * lib/timevar.h (timevar_report): New decl.
13960 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13961
13962
13963 Sort include-file uses.
13964
13965 Reorder all include files under src to be in the order "system.h".
13966 then the ../lib include files in angle brackets (alphabetized),
13967 then the . include files in double-quotes (alphabetized). Fix
13968 dependency breakages encountered in this process, as follows:
13969 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13970 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13971 * src/state.h: Include "symtab.h".
13972
996b1c7e
PE
139732002-12-08 Paul Eggert <eggert@twinsun.com>
13974
13975 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13976 since this causes problems when __file__ contains character
13977 sequences like "@" that are treated specially by src/scan-skel.l.
13978 Instead, just use the file's basename. This fixes the bug
13979 reported by Martin Mokrejs in
161a71f3 13980 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 13981
e19c4e5d
PE
139822002-12-06 Paul Eggert <eggert@twinsun.com>
13983
13984 Add support for rules that do not have trailing semicolons, as
13985 POSIX requires. Improve the quality of locations in Bison
13986 diagnostics.
26b4a969 13987
e19c4e5d
PE
13988 * src/location.c: Include <quotearg.h>.
13989 (empty_location): Now const.
13990 (location_print): New function. Follow the recommendation of the
13991 GNU Coding Standards for locations that span file boundaries.
13992 * src/location.h: Do not include <quotearg.h>; no longer needed.
13993 (boundary): New type.
13994 (location_t): Use it. This allows locations to span file boundaries.
13995 All member uses changed: file -> start.file or end.file (as needed),
13996 first_line -> start.line, first_column -> start.column,
13997 last_line -> end.line, last_column -> end.column.
13998 (equal_boundaries): New function.
13999 (LOCATION_RESET, LOCATION_STEP): Remove.
14000 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14001 (empty_location): Now const.
14002 (location_print): New decl.
14003 * src/parse-gram.y (lloc_default): New function, which handles
14004 empty locations more accurately.
14005 (YYLLOC_DEFAULT): Use it.
14006 (%token COLON): Remove.
14007 (%token ID_COLON): New token.
26b4a969 14008 (rules): Use it.
e19c4e5d
PE
14009 (declarations, rules): Remove trailing semicolon.
14010 (declaration, rules_or_grammar_declaration):
14011 Allow empty (";") declaration.
14012 (symbol_def): Remove empty actions; no longer needed.
14013 (rules_or_grammar_declaration): Remove trailing semicolon.
14014 (semi_colon.opt): Remove.
14015 * src/reader.h: Include location.h.
14016 (scanner_cursor): New decl.
14017 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14018 rolling our own.
14019 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14020 of *loc.
14021 (STEP): Remove. No longer needed, now that adjust_location does
14022 the work. All uses removed.
14023 (scanner_cursor): New var.
14024 (adjust_location): Renamed from extend_location. It now sets
14025 *loc and adjusts the scanner cursor. All uses changed.
14026 Don't bother testing for CR.
14027 (handle_syncline): Remove location arg; now updates scanner cursor.
14028 All callers changed.
14029 (unexpected_end_of_file): Now accepts start boundary of token or
14030 comment, not location. All callers changed. Update scanner cursor,
14031 not the location.
14032 (SC_AFTER_IDENTIFIER): New state.
14033 (context_state): Renamed from c_context. All uses changed.
14034 (id_loc, code_start, token_start): New local vars.
14035 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14036 processing of Yacc white space and equivalents here.
14037 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14038 instead of returning ID immediately, since we need to search for
14039 a subsequent colon.
14040 (<INITIAL>"'", "\""): Save token_start.
14041 (<INITIAL>"%{", "{", "%%"): Save code_start.
14042 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14043 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14044 BEGIN context_state at end, not INITIAL.
14045 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14046 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14047 Return correct token start.
14048 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14049 the start of a character, string or multiline comment is found.
14050 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14051 Reduction): Adjust reported locations to match the more-precise
14052 results now expected.
14053 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14054 * tests/reduce.at (Useless Rules, Reduced Automaton,
14055 Underivable Rules): Likewise.
14056 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14057 or "|"' now that so many other tokens are allowed by the new grammar.
14058
14059 * src/complain.h (current_file): Remove duplicate decl;
14060 current_file is now owned by files.h.
14061 * src/complain.c, src/scan-gram.l: Include files.h.
14062
140632002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 14064
e19c4e5d
PE
14065 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14066 promotes to int; it might be unsigned int.
14067 * data/yacc.c (yy_reduce_print): Likewise.
14068
14069 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14070 be #defined in the prologue, not in the Bison declarations.
14071 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 14072
b64755e3
PE
140732002-12-02 Paul Eggert <eggert@twinsun.com>
14074
14075 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14076 * lib/strtoul.c: New file, from gnulib.
14077 This fixes a porting bug reported by Peter Klein in
161a71f3 14078 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 14079
6e746484
PE
140802002-11-30 Paul Eggert <eggert@twinsun.com>
14081
b64755e3
PE
14082 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14083 and put only a forward declaration in the prologue. This is for
14084 consistency with the other scanner helper functions.
14085
6ba55592
PE
14086 Type clashes now generate warnings, not errors, since it
14087 appears that POSIX may allow some grammars with type clashes.
14088 * src/reader.c (grammar_current_rule_check): Warn about
14089 type clashes instead of complaining.
14090 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14091
6e746484
PE
14092 Add Yacc library, since POSIX requires it.
14093 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14094 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14095 * lib/main.c, lib/yyerror.c: New files.
14096
14097 gram_error can be static; it need not be extern.
14098 * src/reader.h (gram_error): Remove decl.
14099 * src/parse-gram.y (gram_error): Now static. Add static decl.
14100 (print_token_value): Omit parameter names from forward decl,
14101 for consistency.
14102
88510f9c
PE
141032002-11-29 Paul Eggert <eggert@twinsun.com>
14104
6e746484
PE
14105 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14106 be declared before being used. E.g., one should typically
14107 declare them in the prologue. Use GNU coding style in examples.
14108 Put "const" consistently after the type it modifies. Mention
14109 that C99 supports "inline". Mention that yyerror traditionally
14110 returns "int".
14111
88510f9c
PE
14112 %parse-param and %lex-param now take just one argument, the
14113 declaration; the argument name is deduced from the declaration.
14114
14115 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14116 Reporting, Table of Symbols): Document this.
14117 * src/parse-gram.y (add_param): New function.
14118 (COMMA): Remove.
14119 (declaration): Implement new rule for %parse-param and %lex-param.
14120 * src/scan-gram.l: "," now elicits a warning, rather than being
14121 a token; this is more compatible with byacc.
14122 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14123
bb92250c
PE
141242002-11-27 Paul Eggert <eggert@twinsun.com>
14125
14126 Rename identifiers to avoid real and potential collisions.
14127
14128 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14129 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 14130 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
14131 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14132 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14133 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14134 All uses changed.
14135 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14136 The name "yycontrol" violates the name space rules, and this stuff
14137 wasn't being used anyway.
14138 (input): Remove action; this stuff wasn't being used.
14139 (gram_error): Rename local variable yylloc -> loc.
14140 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14141 (YY_DECL): Don't use "yy" at start of local variables.
14142 All uses changed, e.g., yylloc -> loc.
14143 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14144 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14145 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14146 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14147
14148 * src/parse-gram.y (gram_error): loc is now const *.
14149 * src/reader.h (gram_error): Likewise.
14150
3af4feb2
PE
141512002-11-24 Paul Eggert <eggert@twinsun.com>
14152
14153 Version 1.75c.
14154
14155 * tests/actions.at (Actions after errors): Use an output format
14156 more similar to that of the Printers and Destructors test.
14157 Test the position of the ';' token too.
14158 (Printers and Destructors): Likewise.
14159 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14160 unnecessarily alarming people when the test fails.
14161
14162 * data/yacc.c (yyerrlab1): Move this label down, so that the
14163 parser does not discard the lookahead token if the user code
14164 invokes YYERROR. This change is required for POSIX conformance.
14165
14166 * lib/error.c: Sync with gnulib.
14167
141682002-11-22 Paul Eggert <eggert@twinsun.com>
14169
14170 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14171 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14172 * lib/xmalloc.c: Likewise.
26b4a969 14173
58004308
PE
141742002-11-20 Paul Eggert <eggert@twinsun.com>
14175
14176 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14177
141782002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 14179
58004308
PE
14180 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14181 should use `if (! x) abort ();' rather than `assert (x);', and
14182 anyway it's one less thing to worry about configuring.
14183
14184 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14185 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14186 and replace all instances of assert with abort.
14187 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14188 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14189
14190 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14191 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14192 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14193 hash_find_entry, hash_rehash, hash_insert): Likewise.
14194 * src/conflicts.c (resolve_sr_conflict): Likewise.
14195 * src/lalr.c (set_goto_map, map_goto): Likewise.
14196 * src/nullable.c (nullable_compute): Likewise.
14197 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14198 * src/reader.c (packgram, reader): Likewise.
14199 * src/state.c (state_new, state_free, state_transitions_set,
14200 state_reduction_find): Likewise.
14201 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14202 symbol_pack): Likewise.
14203 * src/tables.c (conflict_row, pack_vector): Likewise.
14204 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14205 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14206 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14207 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14208
14209 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14210 (ARGMATCH_CONSTRAINT): New macro.
14211 (ARGMATCH_ASSERT): Use it.
14212
14213 * src/system.h (verify): New macro.
14214 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14215 rather than assert.
14216 * src/tables.c (tables_generate): Likewise.
14217
14218 * src/struniq.c (struniq_assert): Now returns void, and aborts
14219 if the assertion is false.
14220 (struniq_assert_p): Remove.
14221 * src/struniq.h: Likewise.
14222
76ae8198
PE
142232002-11-18 Paul Eggert <eggert@twinsun.com>
14224
14225 * data/glr.c (yygetLRActions): Replace `yyindex' with
14226 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14227 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 14228 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 14229
d3c4e709
AD
142302002-11-18 Akim Demaille <akim@epita.fr>
14231
14232 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14233 space.
14234 From Tim Van Holder.
14235
8d8a7238
PE
142362002-11-17 Paul Eggert <eggert@twinsun.com>
14237
14238 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14239 to "SyntaxError" for consistency with my 2002-11-15 change.
14240
14241 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14242 not define to {}, since this breaks the common use of `YYDPRINTF
14243 ((...));' if a single statement is desired (e.g. before `else').
14244 Work around GCC warnings by surrounding corresponding calls with
14245 {} if needed.
14246 (yyhasResolvedValue): Remove unused function.
14247 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14248 loop body.
14249 (yyreportSyntaxError): Renamed from yyreportParseError.
14250 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14251 All uses changed.
14252 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14253 extern when possible. Remove unused initializations.
14254
b0937b22
AD
142552002-11-16 Akim Demaille <akim@epita.fr>
14256
14257 Augment the similarity between GLR and LALR traces.
14258
14259 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14260 (YY_REDUCE_PRINT): New.
14261 (yyparse): Use them.
14262 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14263 YYDPRINT here.
14264 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14265 state reached after the reduction/recovery, since...
14266 (yyparse, yyprocessOneStack): Report the state we are entering in.
14267
c5e3e510
AD
142682002-11-16 Akim Demaille <akim@epita.fr>
14269
14270 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14271 Add support for --trace=skeleton.
14272 * src/scan-skel.l: %option debug.
14273 Scan strings of non-@ or \n instead of character by character.
14274 (scan_skel): Handle trace_skeleton.
14275 (QPUTS): New.
14276 (@output_parser_name@, @output_header_name@): ``Restore'' their
14277 support (used to be M4 macros).
14278 * data/yacc.c: Quote larger chunks, a la glr.c.
14279 * data/lalr1.cc: Likewise.
14280 The header guards are no longer available, so use some other
14281 string than `YYLSP_NEEDED'.
14282
4c6cc1db
AD
142832002-11-16 Akim Demaille <akim@epita.fr>
14284
14285 Make the ``Printers and Destructors'' test more verbose, taking
14286 `yacc.c''s behavior as (possibly wrong) reference.
14287
14288 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14289 instead of fprint on stdout.
14290 Set and report the last_line of the symbols.
14291 Consistently display values and locations.
14292
6d9e8019
PE
142932002-11-16 Paul Eggert <eggert@twinsun.com>
14294
14295 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14296
6e649e65
PE
142972002-11-15 Paul Eggert <eggert@twinsun.com>
14298
b25d88f6
PE
14299 * tests/actions.at (Actions after errors): New test case.
14300
6e649e65
PE
14301 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14302 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14303 tests/action.at, tests/calc.at, tests/conflicts.at,
14304 tests/cxx-type.at, tests/regression.at:
14305 "parse error" -> "syntax error" for POSIX compatibility.
14306 "parsing stack overflow..." -> "parser stack overflow" so
14307 that code matches Bison documentation.
14308
0f39aab9
AD
143092002-11-15 Akim Demaille <akim@epita.fr>
14310
14311 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14312 take two BRACED_CODE, not two string_content.
14313 Free the scanner's obstack when we are done.
14314 (code_content): New.
14315 * tests/calc.at: Adjust.
14316 * doc/bison.texinfo: Adjust.
14317 Also, make sure to include the `,' for these declarations.
14318
761c1926
AD
143192002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14320
14321 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14322 definition; avoids potential autoreconf problems.
14323
b0f98b10
AD
143242002-11-15 Akim Demaille <akim@epita.fr>
14325
14326 Always check the value returned by yyparse.
14327
14328 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14329 returned by yyparse.
14330 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14331 Adjust calls.
14332 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14333 returned by yyparse.
14334
970785f1
PH
143352002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14336
14337 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14338 on input.at test.
14339
8fcc7db1
PE
143402002-11-14 Paul Eggert <eggert@twinsun.com>
14341
7ec1b48e
PE
14342 * src/output.c (output_skeleton): Call xfopen instead of
14343 duplicating xfopen's body.
14344
cfff7583 14345 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 14346 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 14347
8fcc7db1
PE
14348 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14349 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14350 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14351 file twice in the grammar, as an extra check.
14352
14353 * tests/input.at (Torturing the Scanner): Surround the
14354 backslash-newline tests with "#if 0", to make it less likely that
14355 we'll run into compiler bugs. Bring back solitary \ inside
14356 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 14357 test backslash-newline in C character constant.
8fcc7db1 14358
4e8d992c
AD
143592002-11-14 Akim Demaille <akim@epita.fr>
14360
14361 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14362 status of the compiler.
f32b346d 14363 Calling `exit 1' is no longer needed.
4e8d992c
AD
14364 Reported by Nelson H. F. Beebe.
14365
9501dc6e
AD
143662002-11-14 Akim Demaille <akim@epita.fr>
14367
14368 * tests/atlocal.in (CPPFLAGS): We have config.h.
14369 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14370 New.
14371 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14372 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14373 * tests/regression.at, tests/torture.at: Use them for all the
14374 grammars that are to be compiled.
14375 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14376 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14377 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14378
18b519c0
AD
143792002-11-14 Akim Demaille <akim@epita.fr>
14380
14381 * doc/bison.texinfo: Various formatting changes (alignments in
14382 samples, additional @group/@end group, GCS in samples.
14383 Use @deffn instead of simple @table to define the directives,
14384 macros, variables etc.
14385
9a86cdb9
PE
143862002-11-13 Paul Eggert <eggert@twinsun.com>
14387
daa33def 14388 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 14389 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 14390
daa33def 14391 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 14392 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
14393 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14394 * tests/headers.at (export YYLTYPE): Likewise.
14395
14396 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 14397 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 14398
9a86cdb9
PE
14399 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14400 comments, since they're not portable. Use GNU coding style.
14401
9c1e26bd
AD
144022002-11-13 Akim Demaille <akim@epita.fr>
14403
14404 * data/yacc.c: Leave bigger chunks of quoted text.
14405 (YYDSYMPRINTF): New.
14406 Use it to report symbol activities.
14407 * data/glr.c (YYDSYMPRINTF): New.
14408 Use it.
14409
87f721cc
PE
144102002-11-12 Paul Eggert <eggert@twinsun.com>
14411
14412 Version 1.75b.
14413
14414 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14415 (yyglrReduce): Return yyok, not 0.
14416 This should avoid the enumerated-type warnings reported
464c6927 14417 by Nelson H. F. Beebe in
161a71f3 14418 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
14419
14420 * lib/bbitset.h (BITSET_INLINE): Remove.
14421 * lib/bitset.h [! BITSET_INLINE]: Remove.
14422 (bitset_set, bitset_reset, bitset_test): Rename local vars
14423 to avoid shadowing warnings by GCC.
14424
14425 * data/glr.c (inline): Remove #define. It's the user's
14426 responsibility to #define it away, just like 'const'.
464c6927 14427 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 14428 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 14429
87f721cc
PE
14430 * Makefile.maint (po-check): Scan .l and .y files instead of the
14431 .c and the .h files that they generate. This fixes the bug
14432 reported by Tim Van Holder in:
161a71f3 14433 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
14434 Look for N_ as well as for _. Try to avoid matching #define for
14435 N_ and _.
14436 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14437 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14438 * src/scan-gram.l: Revamp regular expressions so that " and '
14439 do not confuse xgettext.
14440
14441 * src/struniq.h (struniq_new): Do not declare the return type
14442 to be 'const'; this violates the C standard.
14443 * src/struniq.c (struniq_new): Likewise.
14444
be14ade5
AD
144452002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14446
14447 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14448 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14449 linker.
14450
05291fbc
AD
144512002-11-12 Akim Demaille <akim@epita.fr>
14452
14453 * Makefile.maint: Sync with Autoconf:
14454 (local_updates): New.
14455
1f5fd52e
AD
144562002-11-12 Akim Demaille <akim@epita.fr>
14457
14458 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14459
283f1e64
AD
144602002-11-12 Akim Demaille <akim@epita.fr>
14461
14462 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14463 locations.
14464
886b69d1
AD
144652002-11-12 Akim Demaille <akim@epita.fr>
14466
14467 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14468 not yyvalue.
14469
3df37415
AD
144702002-11-12 Akim Demaille <akim@epita.fr>
14471
14472 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14473 Use it to test the GLR parser.
14474
7bd6c77e
AD
144752002-11-12 Akim Demaille <akim@epita.fr>
14476
14477 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14478 defines it.
14479 * data/glr.c (yystos): New.
14480 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14481 (YYDSYMPRINT): New.
14482 (yyval): Don't define it, it is handled via M4.
14483 (yyrecoverParseError): Free verbosely the discarded symbols.
14484 * data/yacc.c (yysymprint): Remove, rather...
14485 (b4_yysymprint_generate): invoke.
14486 * data/c.m4 (b4_yysymprint_generate): New.
14487 Accept pointers as arguments, as opposed to the version from
14488 yacc.c.
14489 (b4_yydestruct_generate): Likewise.
14490 * tests/cations.at (Printers and Destructors): Use Bison directives
14491 instead of CPP macros.
14492 Don't rely on internal details.
14493
b0400cc6
AD
144942002-11-12 Akim Demaille <akim@epita.fr>
14495
14496 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14497 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14498 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14499 it against YYEMPTY and so forth), work on yytoken (i.e., set
14500 it to YYEMPTY etc.).
14501 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14502 (b4_symbol_actions): Remove.
14503 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14504 for 0, end-of-input.
14505
72f889cc
AD
145062002-11-12 Akim Demaille <akim@epita.fr>
14507
14508 * doc/bison.texinfo (Destructor Decl): New.
14509
b1ae9233
AD
145102002-11-12 Akim Demaille <akim@epita.fr>
14511
14512 * src/tables.c (tables_generate): Use free for pointers that
14513 cannot be NULL, not XFREE.
14514 (pack_vector): Use assert, not fatal, for bound violations.
14515 * src/state.c (state_new): Likewise.
14516 * src/reader.c (reader): Likewise.
14517 * src/lalr.c (set_goto_map): Likewise.
72f889cc 14518 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
14519 the file name.
14520
7ec2d4cd
AD
145212002-11-12 Akim Demaille <akim@epita.fr>
14522
14523 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14524 Restore.
14525 * src/scan-gram.l (last_string): Is global to the file, not to
14526 yylex.
14527 * src/parse-gram.y (input): Don't append the epilogue here,
14528 (epilogue.opt): do it here, and free the scanner's obstack.
14529 * src/reader.c (epilogue_set): Rename as...
14530 (epilogue_augment): this.
14531 * data/c.m4 (b4_epilogue): Defaults to empty.
14532
573a6cd3
AD
145332002-11-12 Akim Demaille <akim@epita.fr>
14534
14535 * src/getargs.c (long_options): Remove duplicates.
14536 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14537 Remove.
14538 * doc/bison.rnh: Remove.
14539 * doc/bison.texinfo (VMS Invocation): Remove.
14540
95612cfa
AD
145412002-11-12 Akim Demaille <akim@epita.fr>
14542
14543 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14544 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14545
14546 Use struniq for symbols.
14547
14548 * src/symtab.h (symbol_t): The tag member is a struniq.
14549 (symbol_type_set): Adjust.
14550 * src/symtab.c (symbol_new): Takes a struniq.
14551 (symbol_free): Don't free the tag member.
14552 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14553 (hash_compare_symbol, hash_symbol): these.
14554 Use the fact that tags as struniqs.
14555 (symbol_get): Use struniq_new.
14556 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14557 Returns a strniq.
14558 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14559 and type members are struniqs.
14560 * src/reader.c (get_merge_function)
14561 (grammar_current_rule_merge_set): Adjust.
14562 (TYPE, current_type): Are struniq.
14563
14564 Use struniq for file names.
14565
14566 * src/files.h, src/files.c (infile): Split into...
14567 (grammar_file, current_file): these.
14568 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14569 * src/reduce.c (reduce_print): Likewise.
14570 * src/getargs.c (getargs): Likewise.
14571 * src/complain.h, src/complain.c: Likewise.
14572 * src/main.c (main): Call struniqs_new early enough to use it for
14573 file names.
14574 Don't free the input file name.
14575
3e6656f9
AD
145762002-11-12 Akim Demaille <akim@epita.fr>
14577
14578 * src/symtab.c (symbol_free): Remove dead deactivated code:
14579 type_name are properly removed.
14580 Don't use XFREE to free items that cannot be NULL.
14581 * src/struniq.h, src/struniq.c: New.
14582 * src/main.c (main): Initialize/free struniqs.
14583 * src/parse-gram.y (%union): Add astruniq member.
14584 (yyprint): Adjust.
14585 * src/scan-gram.l (<{tag}>): Return a struniq.
14586 Free the obstack bit that used to store it.
14587 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14588
7672019c
PE
145892002-11-11 Paul Eggert <eggert@twinsun.com>
14590
14591 Revamp to fix many (but not all) of the C- and M4-related quoting
14592 problems. Among other things, this fixes the Bison bug reported
14593 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 14594 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
14595
14596 Use new @ escapes consistently. Represent brackets with @{ and @}
14597 rather than @<:@ and @:>@, since this works a bit better with dumb
14598 editors like vi. Represent @ with @@, since @ is now consistently
14599 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14600 __ofile__, to avoid unexpected expansions. Similarly, use @output
14601 rather than #output.
14602
14603 * data/c.m4 (b4_copyright): Omit file name from comment, since
14604 the file name could contain "*/".
14605 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14606 be quoted. All uses changed.
14607
14608 * data/glr.c: Use new @ escapes consistently.
14609 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14610 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14611 Remove, since they couldn't handle arbitrary characters in file
14612 names.
14613 * data/lalr1.cc: Likewise.
14614 * data/yacc.c: Likewise.
14615
14616 * src/files.c (output_infix): Remove; all uses removed.
14617 * src/files.h: Likewise.
14618
14619 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14620 mishandled funny characters in file names, and anyway it isn't
14621 needed any more.
14622 * data/yacc.c: Likewise.
14623 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14624
14625 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14626 * data/yacc.c: Likewise.
14627
14628 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14629 strings now.
14630 (muscle_init): Quote filename as a C string.
14631 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14632 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14633 * src/output.c (escaped_file_name_output): New function.
14634 (prepare_symbols): Quote tokens for M4.
14635 (prepare): Don't insert output_infix, output_prefix,
14636 output_parser_name, output_header_name; this is now down by scan-skel.
14637 Insert skeleton as a C string.
14638
14639 * src/output.c (user_actions_output, symbol_destructors_output,
14640 symbol_printers_output): Quote filenames for C and M4.
14641 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14642
14643 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14644 escapes other than \\ and \'; this simplifies the code.
14645 (<SC_STRING>): Likewise, for \\ and \".
14646 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14647 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14648 Use new escapes @{ and @} for [ and ].
14649
14650 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14651 them with auto vars.
14652 Switch to new escape scheme, where @ is the escape character uniformly.
14653 Abort if a stray escape character is found. Avoid unbounded input
14654 buffer when parsing non-escaped text.
14655
14656 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14657 __oline__, #output, $@, and @{ do not have unintended meanings.
14658
acea4f3b
PE
146592002-11-09 Paul Eggert <eggert@twinsun.com>
14660
14661 Fix the test failure due to GCC warnings described in
161a71f3 14662 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
14663 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14664 evaluate to 0 if it's impossible for NINF to be in the respective
14665 table.
14666 (yygetLRActions, yyrecoverParseError): Use them.
14667
14668 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14669 counted in the token inserted at end of file. Now takes
14670 location_t *, not location_t, so that the location can be
14671 adjusted. All uses changed.
14672
14673 * tests/regression.at (Invalid inputs): Adjust wording in
14674 diagnostic to match the new behavior.
14675
14676 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14677 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14678 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14679 abort ();'. This reduces the runtime of the "Many lookaheads"
14680 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14681 GCC 3.2.
14682
20ef1ad5
PE
146832002-11-07 Paul Eggert <eggert@twinsun.com>
14684
14685 * src/parse-gram.y (CHARACTER): Remove unused token.
14686 All uses removed.
14687
14688 * src/scan-gram.l: Remove stack option. We no longer use the
14689 stack, since the stack was never deeper than 1; instead, use the
14690 new auto var c_context to record the stacked value.
14691
14692 Remove nounput option. At an unexpected end of file, we now unput
14693 the minimal input necessary to end cleanly; this simplifies the
14694 code.
14695
14696 Avoid unbounded token sizes where this is easy.
14697
14698 (unexpected_end_of_file): New function.
14699 Use it to systematize the error message on unexpected EOF.
14700 (last-string): Now auto, not static.
14701 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14702 (scanner_last_string_free): Remove; not used.
14703 (percent_percent_count): Move decl to just before use.
14704 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14705 not the (never otherwised-used) CHARACTER.
14706
93724f13
AD
147072002-11-07 Akim Demaille <akim@epita.fr>
14708
14709 Let yyerror always receive the msg as last argument, so that
14710 yyerror can be variadic.
14711
14712 * data/yacc.c (b4_yyerror_args): New.
14713 Use it when calling yyerror.
14714 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14715 Use it when calling yyerror.
14716 * doc/bison.texinfo (Error Reporting): Adjust.
14717 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14718 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14719
6e40b4eb
AD
147202002-11-06 Akim Demaille <akim@epita.fr>
14721
14722 #line should have quoted strings.
14723 Ideally, this should be done by m4_quotearg.
14724
14725 * src/scan-skel.l: Include quotearg.h.
14726 Quote __ofile__.
14727 * src/output.c (symbol_printers_output)
14728 (symbol_destructors_output): Quote the file name.
14729
2dfbfc12
AD
147302002-11-06 Akim Demaille <akim@epita.fr>
14731
14732 * tests/regression.at (Invalid inputs): Adjust to the recent
14733 messages.
14734
437c2d80
AD
147352002-11-06 Akim Demaille <akim@epita.fr>
14736
14737 Restore --no-lines.
14738 Reported by Jim Kent.
14739
14740 * data/c.m4 (b4_syncline): New.
14741 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14742 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14743 * src/output.c (user_actions_output): Likewise.
14744 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 14745 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 14746
900c5db5
AD
147472002-11-06 Akim Demaille <akim@epita.fr>
14748
14749 * src/main.c (main): Free `infile'.
14750 * src/scan-gram.l (handle_syncline): New.
14751 Recognize `#line'.
14752 * src/output.c (user_actions_output, symbol_destructors_output)
14753 (symbol_printers_output): Use the location's file name, not
14754 infile.
14755 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14756
e183b123 147572002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 14758
e183b123 14759 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 14760 either has GLR conflict entries.
e183b123 14761
193eb6b7
PE
147622002-11-05 Paul Eggert <eggert@twinsun.com>
14763
e183b123
PE
14764 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14765 "integer out of range" rather than "invalid value".
14766 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14767 accordingly.
14768
193eb6b7
PE
14769 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14770 Also, remove one static variable in the scanner.
14771
14772 * src/scan-gram.l (braces_level): Now auto, not static.
14773 Initialize to zero if the compiler is being picky.
14774 (INITIAL): Clear braces_level instead of incrementing it.
14775 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14776 as POSIX 1003.1-2001 requires.
14777 * src/system.h (IF_LINT): New macro, taken from coreutils.
14778 * configure.ac: Define "lint" if --enable-gcc-warnings.
14779
29c01725
AD
147802002-11-05 Akim Demaille <akim@epita.fr>
14781
14782 * src/scan-gram.l: When it starts with `%', complain about the
14783 whole directive, not just that `invalid character: %'.
14784
8aeac3ca
AD
147852002-11-04 Akim Demaille <akim@epita.fr>
14786
14787 * Makefile.maint: Update from Autoconf.
14788 (update, cvs-update, po-update, do-po-update): New.
14789
793a58bb
AD
147902002-11-04 Akim Demaille <akim@epita.fr>
14791
14792 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14793 and yyerror.
14794 Have yyerror `use' its arguments.
14795 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14796 returns true when location & yacc & pure & parse-param.
14797 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14798
c4d720cd
AD
147992002-11-04 Akim Demaille <akim@epita.fr>
14800
14801 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14802 clashes.
14803 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14804 font-lock-mode.
14805 Use complain_at.
14806 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14807 slot 0.
14808
613a0dc5
PE
148092002-11-03 Paul Eggert <eggert@twinsun.com>
14810
14811 * src/reader.c (get_merge_function, grammar_current_rule_check):
14812 Use consistent diagnostics for reporting type name clashes.
14813 Quote the types with <>, for consistency with Yacc.
14814 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14815
2a8d363a
AD
148162002-11-03 Akim Demaille <akim@epita.fr>
14817
14818 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14819 New.
14820 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14821 (b4_parse_param): Remove.
14822 Use b4_identification.
14823 Propagate b4_pure_args where needed to pass them to yyerror.
14824 * data/glr.m4 (b4_parse_param): Remove.
14825 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14826 (b4_lpure_formals): New.
14827 Use b4_identification.
14828 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14829 b4_user_formals and b4_user_args.
14830 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14831 (yyreportAmbiguity): When using a pure parser, also need
14832 the location, and the parse-params.
14833 Adjust callers.
14834 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14835 When using a pure parser, also need the parse-params.
14836 Adjust callers.
14837 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14838 (%pure-parser + %parse-param) LALR and GLR parsers.
14839 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14840 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14841 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14842 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14843 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14844 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14845 * doc/bison.texinfo: Untabify the whole file.
14846 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14847 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14848 (Error Reporting): Adjust to these new directives.
14849 Document %error-verbose, deprecate YYERROR_VERBOSE.
14850
9e32add8
AD
148512002-11-03 Akim Demaille <akim@epita.fr>
14852
14853 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14854 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14855 command line options.
14856 * tests/cxx-type.at: Formatting changes.
14857
b02d90a5
PE
148582002-11-03 Paul Eggert <eggert@twinsun.com>
14859
14860 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14861 to count columns correctly, and to check for invalid inputs.
9e32add8 14862
b02d90a5
PE
14863 Use mbsnwidth to count columns correctly. Account for tabs, too.
14864 Include mbswidth.h.
14865 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14866 (extend_location): New function.
14867 (YY_LINES): Remove.
14868
14869 Handle CRLF in C code rather than in Lex code.
14870 (YY_INPUT): New macro.
14871 (no_cr_read): New function.
14872
14873 Scan UCNs, even though we don't fully handle them yet.
14874 (convert_ucn_to_byte): New function.
14875
14876 Handle backslash-newline correctly in C code.
14877 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14878 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14879 all uses changed.
14880 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14881 Use {splice} wherever C allows backslash-newline.
14882 YY_STEP after space, newline, vertical-tab.
14883 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 14884
b02d90a5
PE
14885 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14886
14887 ({int}, handle_action_dollar, handle_action_at): Check for integer
14888 overflow.
9e32add8 14889
b02d90a5
PE
14890 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14891
14892 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14893 as well as \000. Check for UCHAR_MAX, not 255.
14894 Allow \x with an arbitrary positive number of digits, as in C.
14895 Check for overflow here.
14896 Allow \? and UCNs, for compatibility with C.
14897
14898 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14899 with quote slot used by complain_at.
14900
14901 * tests/input.at: Add tests for backslash-newline, m4 quotes
14902 in symbols, long literals, and funny escapes in strings.
14903
14904 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14905 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14906 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14907 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14908 * m4/mbswidth.m4: New file, from GNU coreutils.
14909
14910 * doc/bison.texinfo (Grammar Outline): Document // comments.
14911 (Symbols): Document that trigraphs have no special meaning in Bison,
14912 nor is backslash-newline allowed.
14913 (Actions): Document that trigraphs have no special meaning.
14914
14915 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14916 no longer used.
14917
149182002-11-02 Paul Eggert <eggert@twinsun.com>
14919
14920 * src/reader.c: Don't include quote.h; not needed.
14921 (get_merge_function): Reword warning to be consistent with
14922 type clash diagnostic in grammar_current_rule_check.
14923
14924 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14925 bug in trigraph handling.
14926
14927 * src/output.c (prepare_symbols): When printing token names,
14928 escape "[" as "@<:@" and likewise for "]".
14929
14930 * src/system.h (errno): Remove declaration, as we are now
14931 assuming C89 or better, and C89 guarantees errno.
14932
762b212b
PE
149332002-10-30 Paul Eggert <eggert@twinsun.com>
14934
14935 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14936 Check for close failures.
14937 * src/files.h (xfclose): Return void, not int, since it always
14938 returned zero.
14939 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14940 indicates one.
14941 * src/output.c (output_skeleton): Use xfclose rather than fclose
14942 and ferror. xfclose now checks ferror.
14943
14944 * data/glr.c (YYLEFTMOST_STATE): Remove.
14945 (yyreportTree): Use a stack-based leftmost state. This avoids
14946 our continuing battles with bogus warnings about initializers.
14947
56100c60
AD
149482002-10-30 Akim Demaille <akim@epita.fr>
14949
14950 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14951 #if.
14952
51b4a04c
PH
149532002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14954
14955 * tests/glr-regr1.at: New test for reported regressions.
14956 * tests/testsuite.at: Add glr-regr1.at test.
14957 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 14958
bf1ebda2
PE
149592002-10-24 Paul Eggert <eggert@twinsun.com>
14960
5c16c6b1
PE
14961 Version 1.75a.
14962
bf1ebda2
PE
14963 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14964 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14965 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14966 Don't assume strdup exists; POSIX says its an XSI extension.
14967 Check for buffer overflow on input.
14968
b526ee61
AD
149692002-10-24 Akim Demaille <akim@epita.fr>
14970
14971 * src/output.c (output_skeleton): Don't disable M4sugar comments
14972 too soon: it results in comments being expanded.
14973 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14974 first output.
14975
f1886bb2
AD
149762002-10-24 Akim Demaille <akim@epita.fr>
14977
14978 * data/yacc.c (m4_int_type): New.
14979 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14980 char' as only yacc.c wants K&R portability.
14981 * data/glr.c (yysigned_char): Remove.
14982 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14983 Reported by Quoc Peyrot.
14984
c5576256
PE
149852002-10-23 Paul Eggert <eggert@twinsun.com>
14986
14987 * src/main.c (main): With --trace=time, report times even if a
14988 non-fatal error occurs. Formerly, the times were reported in some
14989 such cases but not in others.
14990 * src/reader.c (reader): Just return if a complaint has been issued,
14991 instead of exiting, so that 'main' can report times.
14992
27b0ffea
AD
149932002-10-22 Akim Demaille <akim@epita.fr>
14994
14995 * src/system.h: Include sys/types.
14996 Reported by Bert Deknuydt.
14997
223a7883
PE
149982002-10-23 Paul Eggert <eggert@twinsun.com>
14999
15000 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15001 Suggested by Art Haas.
15002
150032002-10-22 Paul Eggert <eggert@twinsun.com>
15004
15005 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15006 decl; not needed any more.
15007 * src/main.c (main): Use return to exit, undoing yesterday's change.
15008 The last OS that we could find where this wouldn't work is
15009 SunOS 3.5, and that's too old to worry about now.
15010
15011 * data/glr.c (struct yyltype): Define members even when not
15012 doing locations. This is more consistent with yacc.c, and it
15013 works around the following bug reports:
161a71f3
PE
15014 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15015 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 15016
223a7883
PE
15017 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15018 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15019 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15020
8b76775a
AD
150212002-10-22 Akim Demaille <akim@epita.fr>
15022
15023 * data/README: New.
15024
6db10d14
PE
150252002-10-21 Paul Eggert <eggert@twinsun.com>
15026
15027 Be consistent about 'bool'; the old code used an enum in one
15028 module and an int in another, and this violates the C standard.
15029 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15030 * configure.ac (AC_HEADER_STDBOOL): Add.
15031 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15032 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15033 * src/symtab.c (hash_compare_symbol_t): Likewise.
15034 * src/system.h (bool, false, true): Use a definition consistent
15035 with ../lib/hash.c. All uses changed.
15036
15037 * src/complain.c (warning_issued): Renamed from warn_message_count,
15038 so that we needn't worry about integer overflow (!).
15039 Now of type bool. All uses changed.
15040 (complaint_issued): Renamed from complain_message_count; likewise.
15041
15042 * src/main.c (main): Use exit to exit with failure.
27b0ffea 15043
6db10d14
PE
15044 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15045 rather than 1 and 0.
15046 * src/main.c (main): Likewise.
15047 * src/getargs.c (getargs): Likewise.
15048 * src/reader.c (reader): Likewise.
15049
15050 * src/getarg.c (getargs): Remove duplicate code for
15051 "Try `bison --help'".
15052
15053 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15054 What was that "2" for?
15055
15056 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15057 * src/getargs.c (usage): Likewise.
15058
15059 * src/getargs.c (getargs): When there are too few operands, report
15060 the last one. When there are too many, report the first extra
15061 one. This is how diffutils does it.
15062
92a060fd
PE
150632002-10-20 Paul Eggert <eggert@twinsun.com>
15064
15065 Remove K&R vestiges.
15066 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15067 * src/complain.c (VA_START): Remove. Assume prototypes.
15068 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15069 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15070 fatal): Assume prototypes.
15071 * src/complain.h: Assume prototypes.
15072 * src/system.h (PARAMS): Remove.
15073 Include <limits.h> unconditionally, since it's guaranteeed even
15074 for a freestanding C89 compiler.
15075 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15076 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 15077
e7cb57c0
AD
150782002-10-20 Akim Demaille <akim@epita.fr>
15079
15080 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15081 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15082 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15083 (yyresolveStates, yyresolveAction, yyresolveStack)
15084 (yyprocessOneStack): Use them.
15085 (yy_reduce_print): New.
15086 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15087
0245f82d
AD
150882002-10-20 Akim Demaille <akim@epita.fr>
15089
15090 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15091 arguments and output `void'.
15092 (b4_c_function): Rename as...
15093 (b4_c_function_def): this.
15094 (b4_c_function_decl, b4_c_ansi_function_def)
15095 (b4_c_ansi_function_decl): New.
15096 Change the interpretation of the arguments: before `int, foo', now
15097 `int foo, foo'.
15098 * data/yacc.c (yyparse): Prototype and define thanks to these.
15099 Adjust b4_c_function_def uses.
15100 * data/glr.c (yyparse): Likewise, but ANSI only.
15101
39912f52
AD
151022002-10-20 Akim Demaille <akim@epita.fr>
15103
15104 * src/output.c (prepare): Move the definition of `tokens_number',
15105 `nterms_number', `undef_token_number', `user_token_number_max'
15106 to...
15107 (prepare_tokens): Here.
15108 (prepare_tokens): Rename as...
15109 (prepare_symbols): this.
15110 (prepare): Move the definition of `rules_number' to...
15111 (prepare_rules): here.
15112 (prepare): Move the definition of `last', `final_state_number',
15113 `states_number' to...
15114 (prepare_states): here.
15115 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15116
20c1e2ad
AD
151172002-10-20 Akim Demaille <akim@epita.fr>
15118
15119 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15120
21964f43
AD
151212002-10-20 Akim Demaille <akim@epita.fr>
15122
15123 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15124 * data/c.m4: here.
15125
66d30cd4
AD
151262002-10-20 Akim Demaille <akim@epita.fr>
15127
15128 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15129 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15130 `pair'.
15131 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15132 `name' to...
15133 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15134 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15135 These.
15136
95f2c9fe
PE
151372002-10-19 Paul Eggert <eggert@twinsun.com>
15138
15139 Do not create a temporary file, as that involves security and
15140 cleanup headaches. Instead, use a pair of pipes.
15141 Derived from a suggestion by Florian Krohm.
15142 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15143 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15144 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15145 (BISON_PREREQ_SUBPIPE): Add.
15146 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15147 Add subpipe.h, subpipe.c.
15148 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15149 * po/POTFILES.in: Add lib/subpipe.c.
15150 * src/output.c: Include "subpipe.h".
15151 (m4_invoke): Remove decl.
15152 (scan_skel): New decl.
15153 (output_skeleton): Use pipe rather than temporary file for m4 input.
15154 Check that m4sugar.m4 is readable, to avoid deadlock.
15155 Check for pipe I/O error.
15156 * src/scan-skel.l (readpipe): Remove decl.
15157 (scan_skel): New function, to be used in place of m4_invoke.
15158 Read from stream rather than file.
66d30cd4 15159
95f2c9fe
PE
15160 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15161 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15162 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15163 this generates a more-accurate value anyway.
15164
15165 * lib/timevar.c (timervar_accumulate): Rename locals to
15166 avoid confusion with similarly-named more-global.
15167 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15168
15169 * src/output.c (prepare): Use xstrdup to convert char const *
15170 to char *, to avoid GCC warning.
15171
c19988b7
AD
151722002-10-19 Akim Demaille <akim@epita.fr>
15173
15174 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15175 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15176 Use them to have `calc.y' ready for %pure-parser.
15177 * data/yacc.c (YYLEX): Pass a yylex return type to
15178 b4_c_function_call.
15179
ae7453f2
AD
151802002-10-19 Akim Demaille <akim@epita.fr>
15181
15182 Prototype support of %lex-param and %parse-param.
15183
15184 * src/parse-gram.y: Add the definition of the %lex-param and
15185 %parse-param tokens, plus their rules.
15186 Drop the `_' version of %glr-parser.
15187 Add the "," token.
15188 * src/scan-gram.l (INITIAL): Scan them.
15189 * src/muscle_tab.c: Comment changes.
15190 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15191 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15192 (muscle_entry_s): The `value' member is no longer const.
15193 Adjust all dependencies.
15194 * src/muscle_tab.c (muscle_init): Adjust: use
15195 MUSCLE_INSERT_STRING.
15196 Initialize the obstack earlier.
15197 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15198 (muscle_pair_list_grow): New.
15199 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15200 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15201 * tests/calc.at: Use %locations, not --locations.
15202 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15203
0e575721
AD
152042002-10-19 Akim Demaille <akim@epita.fr>
15205
15206 * src/getargs.c (usage): Take status as argument and exit
15207 accordingly.
15208 Report the traditional `Try ... --help' message when status != 0.
15209 (usage, version): Don't take a FILE * as arg, it is pointless.
15210 (getargs): When there is an incorrect number of arguments, make it
15211 an error, and report it GNUlically thanks to `usage ()'.
15212
724ce7f5
PE
152132002-10-18 Paul Eggert <eggert@twinsun.com>
15214
3a781eb2
PE
15215 * data/glr.c (yyreportParseError): Don't assume that sprintf
15216 yields the length of the printed string, as this is not true
15217 on SunOS 4.1.4. Reported by Peter Klein.
15218
724ce7f5
PE
15219 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15220 * tests/conflicts.at (%nonassoc and eof): Likewise.
15221 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15222
473d0a75
AD
152232002-10-17 Akim Demaille <akim@epita.fr>
15224
15225 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15226 * src/getargs.c (trace_types, trace_args): Adjust.
15227 * src/reader.c (grammar_current_rule_prec_set)
15228 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15229 Standardize error messages.
15230 And s/@prec/%prec/!
15231 (reader): Use trace_flag to enable scanner/parser debugging,
15232 instead of an adhoc scheme.
15233 * src/scan-gram.l: Remove trailing debugging code.
15234
e76d2469
PE
152352002-10-16 Paul Eggert <eggert@twinsun.com>
15236
93e2236a
PE
15237 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15238 MUSCLE_TAB_H.
15239
e76d2469
PE
15240 * NEWS: Officially drop support for building Bison with K&R C,
15241 since it didn't work anyway and it's not worth worrying about.
15242 * Makefile.maint (wget_files): Remove ansi2knr.c.
15243 (ansi2knr.c-url_prefix): Remove.
15244 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15245 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15246 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15247
5bd1c419
PE
152482002-10-15 Paul Eggert <eggert@twinsun.com>
15249
15250 Stop using the "enum_" trick for K&R-style function definitions;
15251 it confused me, and I was the author! Instead, assume that people
15252 who want to use K&R C compilers (when using these modules in GCC,
15253 perhaps?) will run ansi2knr.
15254
15255 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15256 All uses of "enum_" changed to "enum ".
15257 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15258 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 15259
5bd1c419
PE
15260 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15261 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15262 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15263 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15264 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15265 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15266 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15267 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15268 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15269 Use function prototypes; this removes the need for declaring
15270 static functions simply to provide their prototypes.
15271 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15272 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15273 bitset_count_, bitset_create, bitset_dump, bitset_first,
15274 bitset_free, bitset_init, bitset_last, bitset_next,
15275 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15276 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15277 bitset_print, bitset_release_memory, bitset_toggle_,
15278 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15279 debug_bitset): Likewise.
15280 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15281 * lib/bitset_stats.c (bitset_log_histogram_print,
15282 bitset_percent_histogram_print, bitset_stats_and,
15283 bitset_stats_and_cmp, bitset_stats_and_or,
15284 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15285 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15286 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15287 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15288 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15289 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15290 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15291 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15292 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15293 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15294 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15295 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15296 bitset_stats_zero): Likewise.
15297 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15298 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15299 bitsetv_dump, debug_bitsetv): Likewise.
15300 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15301 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15302 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15303 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15304 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15305 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15306 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15307 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15308 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15309 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15310 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15311 Likewise.
15312 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15313 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15314 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15315 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15316 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15317 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15318 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15319 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15320 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15321 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15322 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 15323
ae26e1f0
AD
153242002-10-14 Akim Demaille <akim@epita.fr>
15325
15326 Version 1.75.
15327
d43baf71
AD
153282002-10-14 Akim Demaille <akim@epita.fr>
15329
15330 * tests/Makefile.am (maintainer-check-posix): New.
15331
7ebc83e3
AD
153322002-10-14 Akim Demaille <akim@epita.fr>
15333
15334 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15335 member.
15336
05846dae
AD
153372002-10-14 Akim Demaille <akim@epita.fr>
15338
15339 * src/tables.c (table_ninf_remap): base -> tab.
15340 Reported by Matt Rosing.
15341
1318e37d
PE
153422002-10-14 Paul Eggert <eggert@twinsun.com>
15343
447fbb17
PE
15344 * tests/action.at, tests/calc.at, tests/conflicts.at,
15345 tests/cxx-type.at, tests/headers.at, tests/input.at,
15346 tests/regression.at, tests/synclines.at, tests/torture.at:
15347 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15348 so that the tests still work even if POSIXLY_CORRECT is set.
15349 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 15350
1318e37d
PE
15351 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15352 for portability to K&R hosts. Fix typo: signed char is guaranteed
15353 only to 127, not to 128.
15354 * data/glr.c (yysigned_char): New type.
15355 * data/yacc.c (yysigned_char): Likewise.
15356 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15357
cc0f0794
PE
153582002-10-13 Paul Eggert <eggert@twinsun.com>
15359
5038f418
PE
15360 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15361 true due to limited range of data type" warning from GCC.
15362
cc0f0794
PE
15363 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15364 by wrapping enum yytokentype's definition inside #ifndef
15365 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15366
6fed0802
AD
153672002-10-13 Akim Demaille <akim@epita.fr>
15368
15369 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15370 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15371
32f0598d
AD
153722002-10-13 Akim Demaille <akim@epita.fr>
15373
15374 * Makefile.maint: Update from Autoconf 2.54.
15375 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15376
7ea9a33f
AD
153772002-10-13 Akim Demaille <akim@epita.fr>
15378
15379 * src/print.c (print_state): Separate the list of solved conflicts
15380 from the other items.
15381 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15382
ea99527d
AD
153832002-10-13 Akim Demaille <akim@epita.fr>
15384
15385 Let nondeterministic skeletons be usable with deterministic
15386 tables.
15387
15388 With the patch, GAWK compiled by GCC without -O2 passes its test
15389 suite using a GLR parser driven by LALR tables. It fails with -O2
15390 because `struct stat' gives two different answers on my machine:
15391 88 (definition of an auto var) and later 96 (memset on this var).
15392 Hence the stack is badly corrumpted. The headers inclusion is to
15393 blame: if I move the awk.h inclusion before GLR's system header
15394 inclusion, the two struct stat have the same size.
15395
15396 * src/tables.c (pack_table): Always create conflict_table.
15397 (token_actions): Always create conflict_list.
15398 * data/glr.c (YYFLAG): Remove, unused.
15399
f377f69f
AD
154002002-10-13 Akim Demaille <akim@epita.fr>
15401
15402 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15403 (O0FLAGS): New.
15404 (VALGRIND, GXX): New.
15405 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15406 * tests/bison.in: Run $PREBISON a pre-command.
15407 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15408 (maintainer-check-g++): New.
15409 * Makefile.am (maintainer-check): New.
15410
2a1fe6ed
AD
154112002-10-13 Akim Demaille <akim@epita.fr>
15412
15413 * data/glr.c: Formatting changes.
15414 Tweak some trace messages to match yacc.c's.
15415
f50adbbd
AD
154162002-10-13 Akim Demaille <akim@epita.fr>
15417
15418 GLR parsers sometimes raise parse errors instead of performing the
15419 default reduction.
15420 Reported by Charles-Henry de Boysson.
15421
15422 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 15423 check the length of the traces when %glr.
f50adbbd
AD
15424 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15425 GLR's traces.
15426 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15427 Test GLR parsers.
15428 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15429 (yyltype): Remove the yy prefix from the member names.
15430 (yytable): Complete its comment.
15431 (yygetLRActions): Map error action number from YYTABLE from
15432 YYTABLE_NINF to 0.
15433 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15434 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15435 not satisfying as we could compare an YYACTION computed from
15436 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15437 only value for error actions.
15438 (yyreportParseError): In verbose parse error messages, don't issue
15439 `error' in the list of expected tokens.
15440 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15441 next action to perform to match glr.c's decoding.
15442 (yytable): Complete its comment.
15443
bcbad5b9
PE
154442002-10-13 Paul Eggert <eggert@twinsun.com>
15445
15446 Fix problem reported by Henrik Grubbstroem in
161a71f3 15447 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
15448 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15449 because the Bison parser reads the second action before reducing
15450 the first one.
15451 * src/scan-gram.l (rule_length): New static var.
15452 Use it to keep track of the rule length in the scanner, since
15453 we can't expect the parser to be in lock-step sync with the scanner.
15454 (handle_action_dollar, handle_action_at): Use this var.
15455 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 15456
14904b89
PE
154572002-10-12 Paul Eggert <eggert@twinsun.com>
15458
1fe611e5
PE
15459 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15460 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15461 Include <sys/time.h> when checking for clock_t and struct tms.
15462 Use same include order as source.
15463 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 15464 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 15465
1fe611e5
PE
15466 * lib/timevar.c: Update copyright date and clarify comments.
15467 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 15468
1fe611e5
PE
15469 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15470 GCC version as of today, then merge Bison's changes.
15471 Change "GCC" to "Bison" in copyright notice. timevar.def's
15472 author is Akim, so change that too.
15473
98194095
PE
15474 * src/reader.c (grammar_current_rule_check):
15475 Don't worry about the default action if $$ is untyped.
15476 Prevents bogus warnings reported by Jim Gifford in
161a71f3 15477 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 15478
14904b89
PE
15479 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15480 * data/glr.c, data/lalr1.cc, data/yacc.c:
15481 Output token definitions before the first part of user declarations.
15482 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 15483 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 15484
ff6dca18
PE
154852002-10-11 Paul Eggert <eggert@twinsun.com>
15486
15487 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15488 (yyparse): here. This undoes some of the 2002-07-25 change.
15489 Compatibility problem reported by Ralf S. Engelschall with
15490 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15491
eb714592
AD
154922002-10-11 Akim Demaille <akim@epita.fr>
15493
15494 * tests/regression.at Characters Escapes): New.
15495 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15496 characters.
15497 Reported by Jan Nieuwenhuizen.
15498
b7195100
AD
154992002-10-11 Akim Demaille <akim@epita.fr>
15500
15501 * po/id.po: New.
15502
f28a0f2d
PE
155032002-10-10 Paul Eggert <eggert@twinsun.com>
15504
15505 Portability fixes for bitsets; this also avoids several GCC
15506 warnings.
15507
15508 * lib/abitset.c: Include <stddef.h>, for offsetof.
15509 * lib/lbitset.c: Likewise.
15510
15511 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15512 properly for vectors of objects. Do not assume that adding a
15513 header size to a multiple of a word size yields a value that is
15514 properly aligned for the whole union.
15515 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15516
15517 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15518 unique names for structures.
15519 * lib/ebitset.c (ebitset_bytes): Likewise.
15520 * lib/lbitset.c (lbitset_bytes): Likewise.
15521
15522 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15523 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15524 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15525 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15526 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15527 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15528 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15529 to improve the type-checking that GCC can do.
15530 * lib/bitset.c (bitset_op4_cmp): Likewise.
15531 * lib/bitset_stats.c (bitset_stats_count,
15532 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15533 bitset_stats_copy, bitset_stats_disjoint_p,
15534 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15535 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15536 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15537 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15538 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15539 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15540 bitset_stats_or_and_cmp): Likewise.
15541 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15542 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15543 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15544 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15545
15546 * lib/abitset.h: Include bitset.h, not bbitset.h.
15547 * lib/ebitset.h: Likewise.
15548 * lib/lbitset.h: Likewise.
15549
15550 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15551 All instances of parameters of type enum bitset_opts are now of
15552 type enum_bitset_opts, to conform to the C Standard, and similarly
15553 for enum_bitset_type.
15554 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15555 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15556
15557 Do not use "struct bitset_struct" to mean different things in
15558 different modules. Not only is this confusing, it violates
15559 the C Standard, which requires that structure types in different
15560 modules must be compatible if one is to be passed to the other.
15561 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15562 All instances of "struct bitset_struct *" replaced with "bitset".
15563 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15564 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15565 struct lbitset_struct, struct bitset_stats_struct): New types.
15566 All uses of struct bitset_struct changed to union bitset_union,
15567 etc.
ba0fe3c7 15568 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
15569 struct bitset_struct): Remove.
15570 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15571 struct bitset_struct): Remove.
15572 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15573 bitset_struct): Remove.
15574 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15575 Likewise.
15576
15577 Do not call a function of type T using a call that assumes the
15578 function is of a different type U. Standard C requires that a
15579 function must be called with a type that is compatible with its
15580 definition.
15581 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15582 New decls.
15583 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15584 New functions.
15585 * lib/ebitset.c (PFV): Remove.
15586 * lib/lbitset.c (PFV): Likewise.
15587 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15588 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15589 decls.
15590 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15591 (ebitset_vtable): Use them.
15592 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15593 lbitset_xor): New functions.
15594 (lbitset_vtable): Use them.
15595
15596 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15597 Declare.
15598
15599 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15600 GCC warning.
15601 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15602 Use offsetof, for simplicity.
15603
6fbe4984
PE
156042002-10-06 Paul Eggert <eggert@twinsun.com>
15605
15606 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15607 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 15608 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
15609 which was inadvertently undone by the 2002-09-30 patch.
15610 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15611 the same width as int.
15612
420f93c8
PE
156132002-10-04 Paul Eggert <eggert@twinsun.com>
15614
15615 Version 1.50.
15616
15617 * configure.ac (AC_INIT), NEWS: Increment version number.
15618
15619 * doc/bison.texinfo: Minor spelling, grammar, and white space
15620 fixes.
15621 (Symbols): Mention that any negative value returned from yylex
15622 signifies end-of-input. Warn about negative chars. Mention
15623 the portable Standard C character set.
15624
15625 The GNU coding standard says CFLAGS and YFLAGS are reserved
15626 for the installer to set.
15627 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15628 * src/Makefile.am (AM_CFLAGS): Likewise.
15629 (AM_YFLAGS): Renamed from YFLAGS.
15630
15631 Fix some MAX and MIN problems.
15632 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15633 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15634 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15635 * src/reader.c (reader): Use it.
15636
15637 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15638 POSIX 1003.1-2001 has removed fgrep.
15639
156402002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15641
15642 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15643 interpreted as signed.
15644 * lib/ebitset.c (ebitset_list): Fix bug.
15645
ff68026d
PE
156462002-10-01 Paul Eggert <eggert@twinsun.com>
15647
15648 More fixes for 64-bit hosts and large bitsets.
15649
15650 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15651 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15652 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15653 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15654 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15655 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15656 bitset_count_): Likewise.
15657 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15658 bitset_first, bitset_last): Likewise.
15659 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15660 bitset_stats_list_reverse, bitset_stats_size,
15661 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15662 Likewise.
15663 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15664 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15665 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15666 bitsetv_reflexive_transitive_closure): Likewise.
15667 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15668 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15669 Likewise.
15670 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15671 Likewise.
420f93c8 15672
ff68026d
PE
15673 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15674 Use size_t, not unsigned int, to count bytes.
15675 * lib/abitset.h (abitset_bytes): Likewise.
15676 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15677 Likewise.
15678 * lib/bitset.h (bitset_bytes): Likewise.
15679 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15680 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15681 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15682 * lib/ebitset.c (ebitset_bytes): Likewise.
15683 * lib/ebitset.h (ebitset_bytes): Likewise.
15684 * lib/lbitset.c (lbitset_bytes): Likewise.
15685 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 15686
ff68026d
PE
15687 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15688 abitset_subset_p, abitset_disjoint_p, abitset_and,
15689 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15690 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15691 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15692 abitset_or_and, abitset_or_and_cmp):
15693 Use bitset_windex instead of unsigned int.
15694 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15695 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15696 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15697 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15698 Likewise.
15699 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 15700
ff68026d
PE
15701 * lib/bitset.c (bitset_print):
15702 Use proper printf formats for widths of integer types.
15703 * lib/bitset_stats.c (bitset_percent_histogram_print,
15704 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15705 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15706 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15707 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 15708
ff68026d
PE
15709 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15710 BITSET_SIZE_MAX): New macros.
15711 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15712 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15713 to BITSET_WINDEX_MAX.
15714
15715 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15716 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15717 since we now return the bitset_bindex type (not int).
15718
15719 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15720 when computing sizes.
15721 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15722
15723 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15724 and avoid cast to unsigned.
15725
6aa452a6
AD
157262002-09-30 Akim Demaille <akim@epita.fr>
15727
15728 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15729 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15730 Updates from Michael Hayes.
15731
927f7817
AD
157322002-09-30 Art Haas <ahaas@neosoft.com>
15733
15734 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15735 invocations.
15736 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15737 defined.
15738
9738f41e
AD
157392002-09-27 Akim Demaille <akim@epita.fr>
15740
15741 Version 1.49c.
15742
a5c75d7f
AD
157432002-09-27 Akim Demaille <akim@epita.fr>
15744
15745 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15746 (Because of AC_LIBSOURCE).
15747
8280e179
AD
157482002-09-27 Akim Demaille <akim@epita.fr>
15749
15750 Playing with Autoscan.
15751
15752 * configure.ac: Remove the old LIBOBJ tweaks.
15753 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15754 * lib/strrchr.c: New.
15755 * lib/strtol.c: New, from the Coreutils 4.5.1.
15756
ae64af35
AD
157572002-09-27 Akim Demaille <akim@epita.fr>
15758
15759 Playing with Autoscan.
15760
15761 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15762 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15763 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15764 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15765 Coreutils 4.5.1.
15766
d1a1114f
AD
157672002-09-24 Akim Demaille <akim@epita.fr>
15768
15769 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15770 (Frequently Asked Questions, Parser Stack Overflow): New.
15771
b906441c
AD
157722002-09-13 Akim Demaille <akim@epita.fr>
15773
15774 Playing with autoscan.
15775
15776 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15777 * src/files.c (skeleton_find): Remove, unused.
15778 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15779 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15780
bd701811
AD
157812002-09-13 Akim Demaille <akim@epita.fr>
15782
15783 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15784 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15785
e0a13e7b
AD
157862002-09-13 Akim Demaille <akim@epita.fr>
15787
15788 * configure.ac: Require 2.54.
15789 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15790 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15791 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15792 Remove, provided by Autoconf macros.
15793
c97011bf
AD
157942002-09-12 Akim Demaille <akim@epita.fr>
15795
15796 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15797
d862b1be
AD
157982002-09-12 Akim Demaille <akim@epita.fr>
15799
15800 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15801 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15802 Reported by Martin Mokrejs.
15803
3d38c03a
AD
158042002-09-10 Akim Demaille <akim@epita.fr>
15805
15806 * src/parse-gram.y: Associate a human readable string to each
15807 token type.
15808 * tests/regression.at (Invalid inputs): Adjust.
15809
b6347355
AD
158102002-09-10 Gary V. Vaughan <gary@gnu.org>
15811
15812 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15813 with an Autoconf-2.5x style configure.ac.
15814
09ba4ab2
PE
158152002-09-06 Paul Eggert <eggert@twinsun.com>
15816
15817 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15818 exception applies only to yacc.c. This is a modification of a
15819 patch originally suggested by Akim Demaille.
15820
21846f69
AD
158212002-09-06 Akim Demaille <akim@epita.fr>
15822
09ba4ab2
PE
15823 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15824 here to...
15825 * data/yacc.c: here.
15826
21846f69
AD
15827 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15828 LocationType.
15829 (b4_ltype): Default to yy::Location from location.hh.
15830
c0ad8bf3
AD
158312002-09-04 Jim Meyering <jim@meyering.net>
15832
15833 * data/yacc.c: Guard the declaration of yytoknum also with
15834 `#ifdef YYPRINT', so it is declared only when used.
15835
3a93251e
AD
158362002-09-04 Akim Demaille <akim@epita.fr>
15837
15838 * configure.in: Rename as...
15839 * configure.ac: this.
15840 Bump to 1.49c.
15841
427c0dda
AD
158422002-09-04 Akim Demaille <akim@epita.fr>
15843
15844 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15845 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15846 translate maintainer only messages.
15847
6a254321
PE
158482002-08-12 Paul Eggert <eggert@twinsun.com>
15849
645e30d1
PE
15850 Version 1.49b.
15851
6a254321
PE
15852 * Makefile.am (SUBDIRS): Remove intl.
15853 (DISTCLEANFILES): Remove.
15854 * NEWS: Mention that GNU M4 is now required. Clarify what is
15855 meant by "larger grammars". Mention the pt_BR translation.
15856 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15857 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15858 Bump version from 0.11.2 to 0.11.5.
15859 (BISON_PREREQ_STAGE): Remove.
15860 (AM_GNU_GETTEXT): Use external gettext.
15861 (AC_OUTPUT): Remove intl/Makefile.
15862
15863 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15864
15865 * data/glr.c: Include string.h, for strlen.
15866 (yyreportParseError): Use size_t for yysize.
15867 (yy_yypstack): No longer nested inside yypstates, as nested
15868 functions are not portable. Do not assume size_t is the
15869 same width as int.
15870 (yypstates): Do not assume that ptrdiff_t is the same width
15871 as int, and similarly for yyposn and YYINDEX.
15872
15873 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15874
15875 * lib/Makefile.am (INCLUDES): Do not include from the intl
15876 directory, which has been removed.
15877 * src/Makefile.am (INCLUDES): Likewise.
15878
15879 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15880 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15881 New vars.
15882
15883 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15884 * tests/Makefile.am (EXTRA_DIST): Likewise.
15885
15886 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15887 Do not assume that bitset_windex is the same width as unsigned.
15888
15889 * lib/abitset.c (abitset_unused_clear): Do not assume that
15890 bitset_word is the same width as int.
15891 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15892 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15893 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15894 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15895 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15896
15897 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15898 portability to one's complement hosts!).
15899 * lib/ebitset.c (ebitset_op1): Likewise.
15900 * lib/lbitset.c (lbitset_op1): Likewise.
15901
15902 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15903 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15904 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15905 Sync with fileutils.
15906 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15907 lib/gettext.h: Sync with diffutils.
15908
15909 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15910 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15911
15912 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15913 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15914 check for void *.
15915
15916 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15917 size_t; the old version tried to do this but casted improperly.
15918 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15919 (bitset_test): Now returns int, not unsigned long.
15920
15921 * lib/bitset_stats.c: Include "gettext.h".
15922 (_): New macro.
15923 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15924 name locals "index", as it generates unnecessary warnings on some
15925 hosts that have an "index" function.
15926
15927 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15928 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15929 they need translation.
15930 * src/LR0.c (state_list_append, new_itemsets, get_state,
15931 append_states, generate_states): Likewise.
15932 * src/assoc.c (assoc_to_string): Likewise.
15933 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15934 * src/gram.c (grammar_dump): Likewise.
15935 * src/injections.c (injections_compute): Likewise.
15936 * src/lalr.c (lookaheads_print): Likewise.
15937 * src/relation.c (relation_transpose): Likewise.
15938 * src/scan-gram.l: Likewise.
15939 * src/tables.c (table_grow, pack_vector): Likewise.
15940
15941 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15942 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15943 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15944 * m4/mbstate_t.m4: Sync with fileutils.
15945 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15946
15947 * po/LINGUAS: Add pt_BR.
15948 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15949 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15950 lib/timevar.c.
15951 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15952 manual recommends.
15953 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15954
15955 * src/complain.c (strerror_r): Remove decl; not needed.
15956 (strerror): Use same pattern as ../lib/error.c.
15957
15958 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15959
15960 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15961
15962 * src/main.c (main): Cast result of bindtextdomain and textdomain
15963 to void, to avoid a GCC warning when --disable-nls is in effect.
15964
15965 * src/scan-gram.l: Use strings rather than escapes when possible,
15966 to minimize the number of warnings from xgettext.
15967 (handle_action_dollar, handle_action_at): Don't use isdigit,
15968 as it mishandles negative chars and it may not work as expected
15969 outside the C locale.
15970
15971 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15972 this is a GCC extension and is not portable to other compilers.
15973
15974 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15975 Do not include <ctype.h>; no longer needed.
15976 Do not include <malloc.h>; no longer needed (and generates
15977 warnings on OpenBSD 3.0).
15978
15979 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15980 it's not portable.
15981
15982 * tests/regression.at: Do not use 'cc -c input.c -o input';
15983 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15984
15985 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15986 exit status as failure, not just exit status 1. Sun C exits
15987 with status 2 sometimes.
15988
15989 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15990 Use it for the two large tests.
15991
c8f002c7
AD
159922002-08-02 Akim Demaille <akim@epita.fr>
15993
15994 * src/conflicts.c (conflicts_output): Don't output rules never
15995 reduced here, since anyway that computation doesn't work.
15996 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15997 (rule_useless_p, rule_never_reduced_p): New.
15998 (grammar_rules_partial_print): Use a filter instead of a range.
15999 Display the title only if needed.
16000 (grammar_rules_print): Adjust.
16001 (grammar_rules_never_reduced_report): New.
16002 * src/tables.c (action_row): Move the computation of rules never
16003 reduced to...
16004 (token_actions): here.
16005 * src/main.c (main): Make the parser before making the report, so
16006 that rules never reduced are computed.
16007 Call grammar_rules_never_reduced_report.
16008 * src/print.c (print_results): Report rules never reduced.
16009 * tests/conflicts.at, tests/reduce.at: Adjust.
16010
cd08e51e
AD
160112002-08-01 Akim Demaille <akim@epita.fr>
16012
16013 Instead of attaching lookaheads and duplicating the rules being
16014 reduced by a state, attach the lookaheads to the reductions.
16015
16016 * src/state.h (state_t): Remove the `lookaheads',
16017 `lookaheads_rule' member.
16018 (reductions_t): Add a `lookaheads' member.
16019 Use a regular array for the `rules'.
16020 * src/state.c (reductions_new): Initialize the lookaheads member
16021 to 0.
16022 (state_rule_lookaheads_print): Adjust.
16023 * src/state.h, src/state.c (state_reductions_find): New.
16024 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16025 (count_rr_conflicts): Adjust.
16026 * src/lalr.c (LArule): Remove.
16027 (add_lookback_edge): Adjust.
16028 (state_lookaheads_count): New.
16029 (states_lookaheads_initialize): Merge into...
16030 (initialize_LA): this.
16031 (lalr_free): Adjust.
16032 * src/main.c (main): Don't free nullable and derives too early: it
16033 is used by --verbose.
16034 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16035
bb0027a9
AD
160362002-08-01 Akim Demaille <akim@epita.fr>
16037
16038 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16039 `rule_number_t**'.
16040 (set_derives, free_derives): Rename as...
16041 (derives_compute, derives_free): this.
16042 Adjust all dependencies.
16043 * src/nullable.c (set_nullable, free_nullable): Rename as...
16044 (nullable_compute, nullable_free): these.
16045 (rule_list_t): Store rule_t *, not rule_number_t.
16046 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16047 pointers, instead of their numbers.
16048 * src/main.c (main): Call nullable_free, and derives_free earlier,
16049 as they were lo longer used.
16050
3325ddc4
AD
160512002-08-01 Akim Demaille <akim@epita.fr>
16052
16053 * lib/timevar.c (get_time): Include children time.
16054 * src/lalr.h (LA, LArule): Don't export them: used with the
16055 state_t.
16056 * src/lalr.c (LA, LArule): Static.
16057 * src/lalr.h, src/lalr.c (lalr_free): New.
16058 * src/main.c (main): Call it.
16059 * src/tables.c (pack_vector): Check whether loc is >= to the
16060 table_size, not >.
16061 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16062 (tables_generate): do it, since that's also it which allocates
16063 them.
16064 Don't free LA and LArule, main does.
16065
c6f1a33c
AD
160662002-07-31 Akim Demaille <akim@epita.fr>
16067
16068 Separate parser tables computation and output.
16069
16070 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16071 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16072 (yydefgoto, yydefact, high): Move to...
16073 * src/tables.h, src/tables.c: here.
16074 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16075 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16076 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16077 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16078 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16079 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16080 (action_row, save_row, token_actions, save_column, default_goto)
16081 (goto_actions, sort_actions, matching_state, pack_vector)
16082 (table_ninf_remap, pack_table, prepare_actions): Move to...
16083 * src/tables.c: here.
16084 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16085 * src/output.c (token_actions, output_base, output_conflicts)
16086 (output_check): Merge into...
16087 (prepare_actions): this.
16088 (actions_output): Rename as...
16089 (user_actions_output): this.
16090 * src/main.c (main): Call tables_generate and tables_free.
16091
1509d42f
AD
160922002-07-31 Akim Demaille <akim@epita.fr>
16093
16094 Steal GCC's --time-report support.
16095
16096 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16097 stolen/adjusted from GCC.
16098 * m4/stage.m4: Remove time related checks.
16099 * m4/timevar.m4: New.
16100 * configure.in: Adjust.
16101 * src/system.h: Adjust to using timevar.h.
16102 * src/getargs.h, src/getargs.c: Support trace_time for
16103 --trace=time.
16104 * src/main.c (stage): Remove.
16105 (main): Replace `stage' invocations with timevar calls.
16106 * src/output.c: Insert pertinent timevar calls.
16107
273a74fa
AD
161082002-07-31 Akim Demaille <akim@epita.fr>
16109
16110 Let --trace have arguments.
16111
16112 * src/getargs.h (enum trace_e): New.
16113 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16114 (long_options, short_options): --trace/-T takes an optional
16115 argument.
16116 Change all the uses of trace_flag to reflect the new flags.
16117 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16118
16119 Strengthen `stage' portability.
16120
16121 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16122 * configure.in: Use it.
16123 Don't check for malloc.h and sys/times.h.
16124 * src/system.h: Include them when appropriate.
16125 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16126 times and struct tms are available.
16127
217598da
AD
161282002-07-30 Akim Demaille <akim@epita.fr>
16129
16130 In verbose parse error message, don't report `error' as an
16131 expected token.
16132 * tests/actions.at (Printers and Destructors): Adjust.
16133 * tests/calc.at (Calculator $1): Adjust.
16134 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16135 error message, do not report the parser accepts the error token in
16136 that state.
16137
52489d44
AD
161382002-07-30 Akim Demaille <akim@epita.fr>
16139
16140 Normalize conflict related messages.
16141
16142 * src/complain.h, src/complain.c (warn, complain): New.
16143 * src/conflicts.c (conflicts_print): Use them.
16144 (conflict_report_yacc): New, extracted from...
16145 (conflicts_print): here.
16146 * tests/conflicts.at, tests/existing.at: Adjust.
16147
e8832397
AD
161482002-07-30 Akim Demaille <akim@epita.fr>
16149
16150 Report rules which are never reduced by the parser: those hidden
16151 by conflicts.
16152
16153 * src/LR0.c (save_reductions): Don't make the final state too
16154 different: save its reduction (accept) instead of having a state
16155 without any action (no shift or goto, no reduce).
16156 Note: the final state is now a ``regular'' state, i.e., the
16157 parsers now contain `reduce 0' as default reduction.
16158 Nevertheless, since they decide to `accept' when yystate =
16159 final_state, they still will not reduce rule 0.
16160 * src/print.c (print_actions, print_reduction): Adjust.
16161 * src/output.c (action_row): Track reduced rules.
16162 (token_actions): Report rules never reduced.
16163 * tests/conflicts.at, tests/regression.at: Adjust.
16164
caf23d24
AD
161652002-07-30 Akim Demaille <akim@epita.fr>
16166
16167 `stage' was accidently included in a previous patch.
16168 Initiate its autoconfiscation.
16169
16170 * configure.in: Look for malloc.h and sys/times.h.
16171 * src/main.c (stage): Adjust.
16172 Report only when trace_flag.
16173
640748ee
AD
161742002-07-29 Akim Demaille <akim@epita.fr>
16175
16176 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16177 state_number_t.
16178 (errs_t): symbol_t*, not symbol_number_t.
16179 (reductions_t): rule_t*, not rule_number_t.
16180 (FOR_EACH_SHIFT): New.
16181 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16182 * src/print.c, src/print_graph.c: Adjust.
16183
88bce5a2
AD
161842002-07-29 Akim Demaille <akim@epita.fr>
16185
16186 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16187
16188 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16189 (endtoken, accept): these.
16190 * src/reader.c (reader): Set endtoken's default tag to "$end".
16191 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16192 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16193 Adjust.
16194
1bfb97db
AD
161952002-07-29 Akim Demaille <akim@epita.fr>
16196
16197 * src/reduce.c (reduce_grammar): When the language is empty,
16198 complain about the start symbol, not the axiom.
16199 Use its location.
16200 * tests/reduce.at (Empty Language): New.
16201
fc5734fe
AD
162022002-07-26 Akim Demaille <akim@epita.fr>
16203
16204 * src/reader.h, src/reader.c (gram_error): ... can't get
16205 yycontrol without making too strong assumptions on the parser
16206 itself.
16207 * src/output.c (prepare_tokens): Use the real 0th value of
16208 token_translations instead of `0'.
16209 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16210 visible here.
16211 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16212 for the time being: %locations ought to provide it to yyerror.
16213
3650b4b8
AD
162142002-07-25 Akim Demaille <akim@epita.fr>
16215
16216 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16217 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16218 * tests/regression.at (Web2c Actions): Adjust.
16219
4b3d3a8e
AD
162202002-07-25 Akim Demaille <akim@epita.fr>
16221
16222 Stop storing rules from 1 to nrules + 1.
16223
16224 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16225 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16226 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16227 Iterate from 0 to nrules.
16228 Use rule_number_as_item_number and item_number_as_rule_number.
16229 Adjust to `derive' now containing possibly 0.
16230 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16231 Handle the `- 1' part in rule numbers from/to item numbers.
16232 * src/conflicts.c (log_resolution): Fix the message which reversed
16233 shift and reduce.
16234 * src/output.c (action_row): Initialize default_rule to -1.
16235 (token_actions): Adjust.
16236 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16237 expected output.
16238 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16239
4a2a22f4
AD
162402002-07-25 Akim Demaille <akim@epita.fr>
16241
16242 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16243 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16244 (b4_c_knr_arg_decl): New.
16245 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16246 yyreport_parse_error.
16247
b8df3223
AD
162482002-07-25 Akim Demaille <akim@epita.fr>
16249
16250 * data/yacc.c (yyreport_parse_error): New, extracted from...
16251 (yyparse): here.
16252 (yydestruct, yysymprint): Move above yyparse.
16253 Be K&R compliant.
16254
a762e609
AD
162552002-07-25 Akim Demaille <akim@epita.fr>
16256
16257 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16258 replace...
16259 (b4_sint_type, b4_uint_type): these.
16260 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16261 * tests/regression.at (Web2c Actions): Adjust.
16262
12b0043a
AD
162632002-07-25 Akim Demaille <akim@epita.fr>
16264
16265 * src/gram.h (TIEM_NUMBER_MAX): New.
16266 (item_number_of_rule_number, rule_number_of_item_number): Rename
16267 as...
16268 (rule_number_as_item_number, item_number_as_rule_number): these.
16269 Adjust dependencies.
16270 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16271 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16272 (symbol_number_to_vector_number): New.
16273 (order): Of vector_number_t* type.
16274 (base_t, BASE_MAX, BASE_MIN): New.
16275 (froms, tos, width, pos, check): Of base_t type.
16276 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16277 (actrow): Of action_number_t type.
16278 (conflrow): Of unsigned int type.
16279 (table_ninf, base_ninf): New.
16280 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16281 (muscle_insert_int_table, muscle_insert_base_table)
16282 (muscle_insert_rule_number_table): New.
16283 (prepare_tokens): Output `toknum' as int_table.
16284 (action_row): Returns a rule_number_t.
16285 Use ACTION_MIN, not SHRT_MIN.
16286 (token_actions): yydefact is rule_number_t*.
16287 (table_ninf_remap): New.
16288 (pack_table): Use it for `base' and `table'.
16289 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16290 replaced with...
16291 (YYPACT_NINF, YYTABLE_NINF): these.
16292 (yypact, yytable): Compute their types instead of hard-coded
16293 `short'.
16294 * tests/regression.at (Web2c Actions): Adjust.
16295
5dde258a
AD
162962002-07-19 Akim Demaille <akim@epita.fr>
16297
16298 * src/scan-gram.l (id): Can start with an underscore.
16299
a945ec39
AD
163002002-07-16 Akim Demaille <akim@epita.fr>
16301
16302 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16303 Adjust all former `associativity' dependencies.
16304 * src/symtab.c (symbol_new): Default associativity is `undef', not
16305 `right'.
16306 (symbol_check_alias_consistence): Adjust.
16307
fae437e8
AD
163082002-07-09 Akim Demaille <akim@epita.fr>
16309
16310 * doc/bison.texinfo: Properly set the ``header'' part.
16311 Use @dircategory ``GNU programming tools'' as per Texinfo's
16312 documentation.
16313 Use @copying.
16314
1a715ef2
AD
163152002-07-09 Akim Demaille <akim@epita.fr>
16316
16317 * lib/quotearg.h: Protect against multiple inclusions.
16318 * src/location.h (location_t): Add a `file' member.
16319 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16320 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16321 `error_one_per_line' support.
16322
a5d50994
AD
163232002-07-09 Akim Demaille <akim@epita.fr>
16324
16325 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16326 * src/reader.c (lineno): Remove.
16327 Adjust all dependencies.
16328 (get_merge_function): Take a location and use complain_at.
16329 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16330 * tests/regression.at (Invalid inputs, Mixing %token styles):
16331 Adjust.
16332
b275314e
AD
163332002-07-09 Akim Demaille <akim@epita.fr>
16334
16335 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16336 recovery rule, and forbid extensions when --yacc.
16337 (gram_error): Use complain_at.
16338 * src/reader.c (reader): Exit if there were parse errors.
16339
865b9df1
AD
163402002-07-09 Akim Demaille <akim@epita.fr>
16341
16342 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16343 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16344 Reported by R Blake <blakers@mac.com>.
16345
c76e14da
AD
163462002-07-09 Akim Demaille <akim@epita.fr>
16347
16348 * data/yacc.c: Output the copyright notive in the header.
16349
7db2ed2d
AD
163502002-07-03 Akim Demaille <akim@epita.fr>
16351
16352 * src/output.c (froms, tos): Are state_number_t.
16353 (save_column): sp, sp1, and sp2 are state_number_t.
16354 (prepare): Rename `final' as `final_state_number', `nnts' as
16355 `nterms_number', `nrules' as `rules_number', `nstates' as
16356 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16357 unused.
16358 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16359 * data/lalr1.cc (nsym_): Remove, unused.
16360
e68e0410
AD
163612002-07-03 Akim Demaille <akim@epita.fr>
16362
16363 * src/lalr.h, src/lalr.c (goto_number_t): New.
16364 * src/lalr.c (goto_list_t): New.
16365 Propagate them.
16366 * src/nullable.c (rule_list_t): New.
16367 Propagate.
16368 * src/types.h: Remove.
16369
e1a4f3a4
AD
163702002-07-03 Akim Demaille <akim@epita.fr>
16371
16372 * src/closure.c (print_fderives): Use rule_rhs_print.
16373 * src/derives.c (print_derives): Use rule_rhs_print.
16374 (rule_list_t): New, replaces `shorts'.
16375 (set_derives): Add comments.
16376 * tests/sets.at (Nullable, Firsts): Adjust.
16377
536545f3
AD
163782002-07-03 Akim Demaille <akim@epita.fr>
16379
16380 * src/output.c (prepare_actions): Free `tally' and `width'.
16381 (prepare_actions): Allocate and free `order'.
16382 * src/symtab.c (symbols_free): Free `symbols'.
16383 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16384 * src/output.c (m4_invoke): Move to...
16385 * src/scan-skel.l: here.
16386 (<<EOF>>): Close yyout, and free its name.
16387
8b752b00
AD
163882002-07-03 Akim Demaille <akim@epita.fr>
16389
16390 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16391
16392 * src/LR0.c (new_state): Merge into...
16393 (state_list_append): this.
16394 (new_states): Merge into...
16395 (generate_states): here.
16396 (set_states): Don't ensure a proper `errs' state member here, do it...
16397 * src/conflicts.c (conflicts_solve): here.
16398 * src/state.h, src/state.c: Comment changes.
16399 (state_t): Rename member `shifts' as `transitions'.
16400 Adjust all dependencies.
16401 (errs_new): For consistency, also take the values as argument.
16402 (errs_dup): Remove.
16403 (state_errs_set): New.
16404 (state_reductions_set, state_transitions_set): Assert that no
16405 previous value was assigned.
16406 (state_free): New.
16407 (states_free): Use it.
16408 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16409 temporary storage: use `errs' and `nerrs' as elsewhere.
16410 (set_conflicts): Allocate and free this `errs'.
16411
613f5e1a
AD
164122002-07-02 Akim Demaille <akim@epita.fr>
16413
16414 * lib/libiberty.h: New.
16415 * lib: Update the bitset implementation from upstream.
16416 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16417 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16418 * src/main.c: Adjust bitset stats calls.
16419
26e0cadc
PE
164202002-07-01 Paul Eggert <eggert@twinsun.com>
16421
16422 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16423 char, so that negative chars don't collide with $.
16424
1154cced
AD
164252002-06-30 Akim Demaille <akim@epita.fr>
16426
16427 Have the GLR tests be `warning' checked, and fix the warnings.
16428
16429 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16430 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16431 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16432 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16433 (yyaddDeferredAction): static.
16434 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16435 (yyreportParseError): yyprefix is const.
16436 yytokenp is used only when verbose.
16437 (yy__GNUC__): Replace with __GNUC__.
16438 (yypdumpstack): yyi is size_t.
16439 (yypreference): Un-yy local variables and arguments, to avoid
16440 clashes with `yyr1'. Anyway, we are not in the user name space.
16441 (yytname_size): be an int, as is compared with ints.
16442 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16443 Use them.
16444 * tests/cxx-gram.at: Use quotation to protect $1.
16445 Use AT_COMPILE to enable warnings hunts.
16446 Prototype yylex and yyerror.
16447 `Use' argc.
16448 Include `string.h', not `strings.h'.
16449 Produce and prototype stmtMerge only when used.
16450 yylex takes a location.
16451
97650f4e
AD
164522002-06-30 Akim Demaille <akim@epita.fr>
16453
16454 We spend a lot of time in quotearg, in particular when --verbose.
16455
16456 * src/symtab.c (symbol_get): Store a quoted version of the key.
16457 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16458 Adjust all callers.
16459
d2576365
AD
164602002-06-30 Akim Demaille <akim@epita.fr>
16461
16462 * src/state.h (reductions_t): Rename member `nreds' as num.
16463 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16464 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16465
ccaf65bc
AD
164662002-06-30 Akim Demaille <akim@epita.fr>
16467
16468 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16469 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16470 (shifts_to): Rename as...
16471 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16472 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16473 (TRANSITION_IS_DISABLED, transitions_to): these.
16474
87675353
AD
164752002-06-30 Akim Demaille <akim@epita.fr>
16476
16477 * src/print.c (print_shifts, print_gotos): Merge into...
16478 (print_transitions): this.
16479 (print_transitions, print_errs, print_reductions): Align the
16480 lookaheads columns.
16481 (print_core, print_transitions, print_errs, print_state,
16482 print_grammar): Output empty lines separator before, not after.
16483 (state_default_rule_compute): Rename as...
16484 (state_default_rule): this.
16485 * tests/conflicts.at (Defaulted Conflicted Reduction),
16486 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16487 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16488
ce4ccb4b
AD
164892002-06-30 Akim Demaille <akim@epita.fr>
16490
16491 Display items as we display rules.
16492
16493 * src/gram.h, src/gram.c (rule_lhs_print): New.
16494 * src/gram.c (grammar_rules_partial_print): Use it.
16495 * src/print.c (print_core): Likewise.
16496 * tests/conflicts.at (Defaulted Conflicted Reduction),
16497 (Unresolved SR Conflicts): Adjust.
16498 (Unresolved SR Conflicts): Adjust and rename as...
16499 (Resolved SR Conflicts): this, as was meant.
16500 * tests/regression.at (Web2c Report): Adjust.
16501
bc933ef1
AD
165022002-06-30 Akim Demaille <akim@epita.fr>
16503
16504 * src/print.c (state_default_rule_compute): New, extracted from...
16505 (print_reductions): here.
16506 Pessimize, but clarify the code.
16507 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16508
53d4308d
AD
165092002-06-30 Akim Demaille <akim@epita.fr>
16510
16511 * src/output.c (action_row): Let default_rule be always a rule
16512 number.
16513
574fb2d5
AD
165142002-06-30 Akim Demaille <akim@epita.fr>
16515
16516 * src/closure.c (print_firsts, print_fderives, closure):
16517 Use BITSET_EXECUTE.
16518 * src/lalr.c (lookaheads_print): Likewise.
16519 * src/state.c (state_rule_lookaheads_print): Likewise.
16520 * src/print_graph.c (print_core): Likewise.
16521 * src/print.c (print_reductions): Likewise.
16522 * src/output.c (action_row): Likewise.
16523 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16524
05811fd7
AD
165252002-06-30 Akim Demaille <akim@epita.fr>
16526
16527 * src/print_graph.c: Use report_flag.
16528
0e4d5753
AD
165292002-06-30 Akim Demaille <akim@epita.fr>
16530
16531 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16532 to...
16533 * src/relation.h, src/relation.c (traverse, relation_digraph)
16534 (relation_print, relation_transpose): New.
16535
24c7d800
AD
165362002-06-30 Akim Demaille <akim@epita.fr>
16537
16538 * src/state.h, src/state.c (shifts_to): New.
16539 * src/lalr.c (build_relations): Use it.
16540
9222837b
AD
165412002-06-30 Akim Demaille <akim@epita.fr>
16542
16543 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16544 (item_number_of_rule_number, rule_number_of_item_number): New.
16545 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16546 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16547 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16548 Propagate their use.
16549 Much remains to be done, in particular wrt `shorts' from types.h.
16550
260008e5
AD
165512002-06-30 Akim Demaille <akim@epita.fr>
16552
16553 * src/symtab.c (symbol_new): Initialize the `printer' member.
16554
8a731ca8
AD
165552002-06-30 Akim Demaille <akim@epita.fr>
16556
16557 * src/LR0.c (save_reductions): Remove, replaced by...
16558 * src/state.h, src/state.c (state_reductions_set): New.
16559 (reductions, errs): Rename as...
16560 (reductions_t, errs_t): these.
16561 Adjust all dependencies.
16562
32e1e0a4
AD
165632002-06-30 Akim Demaille <akim@epita.fr>
16564
16565 * src/LR0.c (state_list_t, state_list_append): New.
16566 (first_state, last_state): Now symbol_list_t.
16567 (this_state): Remove.
16568 (new_itemsets, append_states, save_reductions): Take a state_t as
16569 argument.
16570 (set_states, generate_states): Adjust.
16571 (save_shifts): Remove, replaced by...
16572 * src/state.h, src/state.c (state_shifts_set): New.
16573 (shifts): Rename as...
16574 (shifts_t): this.
16575 Adjust all dependencies.
16576 * src/state.h (state_t): Remove the `next' member.
16577
e5fb6710
AD
165782002-06-30 Akim Demaille <akim@epita.fr>
16579
16580 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16581 escaped in slot 0.
16582
c7ca99d4
AD
165832002-06-30 Akim Demaille <akim@epita.fr>
16584
16585 Use hash.h for the state hash table.
16586
16587 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16588 (allocate_storage): Use state_hash_new.
16589 (free_storage): Use state_hash_free.
16590 (new_state, get_state): Adjust.
16591 * src/lalr.h, src/lalr.c (states): Move to...
16592 * src/states.h (state_t): Remove the `link' member, no longer
16593 used.
16594 * src/states.h, src/states.c: here.
16595 (state_hash_new, state_hash_free, state_hash_lookup)
16596 (state_hash_insert, states_free): New.
16597 * src/states.c (state_table, state_compare, state_hash): New.
16598 * src/output.c (output_actions): Do not free states now, since we
16599 still need to know the final_state number in `prepare', called
16600 afterwards. Do it...
16601 * src/main.c (main): here: call states_free after `output'.
16602
df0e7316
AD
166032002-06-30 Akim Demaille <akim@epita.fr>
16604
16605 * src/state.h, src/state.c (state_new): New, extracted from...
16606 * src/LR0.c (new_state): here.
16607 * src/state.h (STATE_ALLOC): Move to...
16608 * src/state.c: here.
16609 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16610 * src/state.h, src/state.c: here.
16611
39f41916
AD
166122002-06-30 Akim Demaille <akim@epita.fr>
16613
16614 * src/reader.c (gensym): Rename as...
16615 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16616 (getsym): Rename as...
16617 (symbol_get): this.
16618
d57650a5
AD
166192002-06-30 Akim Demaille <akim@epita.fr>
16620
16621 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16622 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16623 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16624 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16625
5a08f1ce
AD
166262002-06-30 Akim Demaille <akim@epita.fr>
16627
16628 Make the test suite pass with warnings checked.
16629
16630 * tests/actions.at (Printers and Destructors): Improve.
16631 Avoid unsigned vs. signed issues.
16632 * tests/calc.at: Don't exercise the scanner here, do it...
16633 * tests/input.at (Torturing the Scanner): here.
16634
720623af
PH
166352002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16636
88e7e941 16637 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
16638 reorganize first lines parallel to yacc.c.
16639
fb8135fa
AD
166402002-06-28 Akim Demaille <akim@epita.fr>
16641
16642 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16643 (b4_token_enum, b4_token_defines): New, factored from...
16644 * data/lalr1.cc, data/yacc.c, glr.c: here.
16645
41442480
AD
166462002-06-28 Akim Demaille <akim@epita.fr>
16647
16648 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16649 unused variables.
16650 * src/output.c (merger_output): static.
16651
e0e5bf84
AD
166522002-06-28 Akim Demaille <akim@epita.fr>
16653
ba0fe3c7 16654 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
16655 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16656 pacify GCC.
16657 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 16658
676385e2
PH
166592002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16660
16661 Accumulated changelog for new GLR parsing features.
16662
6a254321 16663 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
16664 conflicts_total_count.
16665 * src/conflicts.h: Ditto.
16666 * src/output.c (token_actions): Use the new name.
16667 (output_conflicts): Change conflp => conflict_list_heads, and
16668 confl => conflict_list for better readability.
16669 * data/glr.c: Use the new names.
16670 * NEWS: Add self to GLR announcement.
e0e5bf84 16671
676385e2
PH
16672 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16673
16674 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16675 Akim Demaille.
16676
16677 * data/bison.glr: Change name to glr.c
16678 * data/glr.c: Renamed from bison.glr.
16679 * data/Makefile.am: Add glr.c
e0e5bf84
AD
16680
16681 * src/getargs.c:
16682
676385e2 16683 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 16684 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 16685
676385e2
PH
16686 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16687
16688 * data/bison.glr: Be sure to restore the
16689 current #line when returning to the skeleton contents after having
16690 exposed the input file's #line.
16691
16692 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16693
16694 * data/bison.glr: Bring up to date with changes to bison.simple.
16695
16696 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16697
16698 * data/bison.glr: Correct definitions that use b4_prefix.
16699 Various reformatting.
16700 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16701 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16702 yytokenp argument; now part of stack.
16703 (yychar): Define to behave as documented.
16704 (yyclearin): Ditto.
e0e5bf84 16705
676385e2
PH
16706 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16707
16708 * src/reader.h: Add declaration for free_merger_functions.
16709
16710 * src/reader.c (merge_functions): New variable.
16711 (get_merge_function): New function.
16712 (free_merger_functions): New function.
16713 (readgram): Check for %prec that is not followed by a symbol.
16714 Handle %dprec and %merge declarations.
16715 (packgram): Initialize dprec and merger fields in rules array.
16716
16717 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16718 conflict_list_cnt, conflict_list_free): New variables.
16719 (table_grow): Also grow conflict_table.
e0e5bf84 16720 (prepare_rules): Output dprec and merger tables.
676385e2 16721 (conflict_row): New function.
e0e5bf84 16722 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
16723 default reduction in conflicted states for GLR parser so that there
16724 are spaces for the conflict lists.
16725 (save_row): Also save conflict information.
16726 (token_actions): Allocate conflict list.
16727 (merger_output): New function.
16728 (pack_vector): Pack conflict table, too.
16729 (output_conflicts): New function to output yyconflp and yyconfl.
16730 (output_check): Allocate conflict_tos.
16731 (output_actions): Output conflict tables, also.
16732 (output_skeleton): Output b4_mergers definition.
16733 (prepare): Output b4_max_rhs_length definition.
16734 Use 'bison.glr' as default skeleton for GLR parsers.
16735
16736 * src/gram.c (glr_parser): New flag.
16737 (grammar_free): Call free_merger_functions.
16738
16739 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16740 all pairs of conflicting reductions, rather than just all tokens
16741 causing conflicts. Needed to size conflict tables.
e0e5bf84 16742 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
16743 interface.
16744 (conflicts_print): Ditto.
16745 (count_total_conflicts): New function.
16746
16747 * src/reader.h (merger_list): New type.
16748 (merge_functions): New variable.
16749
16750 * src/lex.h (tok_dprec, tok_merge): New token types.
16751
16752 * src/gram.h (rule_s): Add dprec and merger fields.
16753 (glr_parser): New flag.
16754
16755 * src/conflicts.h (count_total_conflicts): New function.
16756
16757 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16758
16759 * doc/bison.texinfo (Generalized LR Parsing): New section.
16760 (GLR Parsers): New section.
16761 (Language and Grammar): Mention GLR parsing.
16762 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16763 Correct typo ("tge" -> "the").
16764
16765 * data/bison.glr: New skeleton for GLR parsing.
16766
16767 * tests/cxx-gram.at: New tests for GLR parsing.
16768
16769 * tests/testsuite.at: Include cxx-gram.at.
16770
16771 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 16772
676385e2
PH
16773 * src/parse-gram.y:
16774
16775 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16776
16777 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 16778
b5480d74 167792002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
16780
16781 * src/options.h, src/options.c: Remove.
16782 * src/getargs.c (short_options, long_options): New.
16783
60491a94
AD
167842002-06-27 Akim Demaille <akim@epita.fr>
16785
16786 * data/bison.simple, data/bison.c++: Rename as...
16787 * data/yacc.c, data/lalr1.cc: these.
16788 * doc/bison.texinfo (Environment Variables): Remove.
16789
9be0c25b
AD
167902002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16791
16792 * src/getargs.c (report_argmatch): Initialize strtok().
16793
1ae72863
AD
167942002-06-20 Akim Demaille <akim@epita.fr>
16795
16796 * data/bison.simple (b4_symbol_actions): New, replaces...
16797 (b4_symbol_destructor, b4_symbol_printer): these.
16798 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16799 user token numbers.
16800
87542d29
AD
168012002-06-20 Akim Demaille <akim@epita.fr>
16802
16803 * data/bison.simple (yydestructor): Rename as...
16804 (yydestruct): this.
16805
1a31ed21
AD
168062002-06-20 Akim Demaille <akim@epita.fr>
16807
16808 * src/symtab.h, src/symtab.c (symbol_type_set)
16809 (symbol_destructor_set, symbol_precedence_set): The location is
16810 the last argument.
16811 Adjust all callers.
16812
e776192e
AD
168132002-06-20 Akim Demaille <akim@epita.fr>
16814
16815 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16816 internals.
16817 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16818 Takes a location.
16819 * src/symtab.h, src/symtab.c (symbol_class_set)
16820 (symbol_user_token_number_set): Likewise.
16821 Adjust all callers.
16822 Promote complain_at.
16823 * tests/input.at (Type Clashes): Adjust.
16824
5c1180b3
AD
168252002-06-20 Akim Demaille <akim@epita.fr>
16826
16827 * data/bison.simple (YYLEX): Fix the declaration when
16828 %pure-parser.
16829
e3170060
AD
168302002-06-20 Akim Demaille <akim@epita.fr>
16831
16832 * data/bison.simple (yysymprint): Don't print the token number,
16833 just its name.
16834 * tests/actions.at (Destructors): Rename as...
16835 (Printers and Destructors): this.
16836 Also exercise %printer.
16837
253862fd
AD
168382002-06-20 Akim Demaille <akim@epita.fr>
16839
16840 * data/bison.simple (YYDSYMPRINT): New.
16841 Use it to remove many of the #if YYDEBUG/if (yydebug).
16842
366eea36
AD
168432002-06-20 Akim Demaille <akim@epita.fr>
16844
16845 * src/symtab.h, src/symtab.c (symbol_t): printer and
16846 printer_location are new members.
16847 (symbol_printer_set): New.
16848 * src/parse-gram.y (PERCENT_PRINTER): New token.
16849 Handle its associated rule.
16850 * src/scan-gram.l: Adjust.
16851 (handle_destructor_at, handle_destructor_dollar): Rename as...
16852 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16853 * src/output.c (symbol_printers_output): New.
16854 (output_skeleton): Call it.
16855 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16856 since there are already many grammar files with a user `yyprint'.
16857 Replace the calls to YYPRINT to calls to yysymprint.
16858 * tests/calc.at: Adjust.
16859 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16860 taking advantage of parser very internal details (stack size!).
16861
4f25ebb0
AD
168622002-06-20 Akim Demaille <akim@epita.fr>
16863
16864 * src/scan-gram.l: Complete the scanner with the missing patterns
16865 to pacify Flex.
16866 Use `quote' and `symbol_tag_get' where appropriate.
16867
93b68a0e
AD
168682002-06-19 Akim Demaille <akim@epita.fr>
16869
16870 * tests/actions.at (Destructors): Augment to test locations.
16871 * data/bison.simple (yydestructor): Pass it the current location
16872 if locations are enabled.
16873 Prototype only when __STDC__ or C++.
16874 Change the argument names to move into the yy name space: there is
16875 user code here.
16876
58612f1d
AD
168772002-06-19 Akim Demaille <akim@epita.fr>
16878
74310291
AD
16879 * data/bison.simple (b4_pure_if): New.
16880 Use it instead of #ifdef YYPURE.
16881
168822002-06-19 Akim Demaille <akim@epita.fr>
16883
16884 * data/bison.simple (b4_location_if): New.
58612f1d
AD
16885 Use it instead of #ifdef YYLSP_NEEDED.
16886
f25bfb75
AD
168872002-06-19 Akim Demaille <akim@epita.fr>
16888
16889 Prepare @$ in %destructor, but currently don't bind it in the
16890 skeleton, as %location use is not cleaned up yet.
16891
16892 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16893 (handle_action_at): New.
16894 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16895 a braced_code_t and a location as additional arguments.
16896 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16897 unquote one when outputting `b4_dollar_dollar'.
16898 Adjust callers.
16899 * data/bison.simple (b4_eval): Remove.
16900 (b4_symbol_destructor): Adjust.
16901 * tests/input.at (Invalid @n): Adjust.
16902
c732d2c6
AD
169032002-06-19 Zack Weinberg <zack@codesourcery.com>
16904
16905 * doc/bison.texinfo: Document ability to have multiple
16906 prologue sections.
16907
8c165d89
AD
169082002-06-18 Akim Demaille <akim@epita.fr>
16909
16910 * src/files.c (compute_base_names): When computing the output file
16911 names from the input file name, strip the directory part.
16912
ca98bf57
AD
169132002-06-18 Akim Demaille <akim@epita.fr>
16914
16915 * data/bison.simple.new: Comment changes.
16916 Reported by Andreas Schwab.
16917
0bfb02ff
AD
169182002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16919
16920 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16921 there are no `label `yyoverflowlab' defined but not used' warnings
16922 when yyoverflow is defined.
16923
24c0aad7
AD
169242002-06-18 Akim Demaille <akim@epita.fr>
16925
16926 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16927 new member.
16928 (symbol_destructor_set): Adjust.
16929 * src/output.c (symbol_destructors_output): Output the destructor
16930 locations.
16931 Output the symbol name.
16932 * data/bison.simple (b4_symbol_destructor): Adjust.
16933
5719c109
AD
169342002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16935 and Akim Demaille <akim@epita.fr>
16936
16937 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16938 what's left on the stack when the error recovery hits EOF.
16939 * tests/actions.at (Destructors): Complete to exercise this case.
16940
9280d3ef
AD
169412002-06-17 Akim Demaille <akim@epita.fr>
16942
16943 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16944 arguments is really empty, not only equal to `[]'.
16945 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16946 member.
16947 (symbol_destructor_set): New.
16948 * src/output.c (symbol_destructors_output): New.
16949 * src/reader.h (brace_code_t, current_braced_code): New.
16950 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16951 (handle_dollar): Rename as...
16952 (handle_action_dollar): this.
16953 (handle_destructor_dollar): New.
16954 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16955 (grammar_declaration): Use it.
16956 * data/bison.simple (yystos): Is always defined.
16957 (yydestructor): New.
16958 * tests/actions.at (Destructors): New.
16959 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16960
dafdc66f
AD
169612002-06-17 Akim Demaille <akim@epita.fr>
16962
16963 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16964 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16965 rule_length only when needed.
16966 * src/output.c (actions_output, token_definitions_output): Output
16967 the full M4 block.
16968 * src/symtab.c: Don't access directly to the symbol tag, use
16969 symbol_tag_get.
16970 * src/parse-gram.y: Use symbol_list_free.
16971
56c47203
AD
169722002-06-17 Akim Demaille <akim@epita.fr>
16973
16974 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16975 (symbol_list_prepend, get_type_name): Move to...
16976 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16977 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16978 Adjust all callers.
16979 (symbol_list_free): New.
16980 * src/scan-gram.l (handle_dollar): Takes a location.
16981 * tests/input.at (Invalid $n): Adjust.
16982
1e0bab92
AD
169832002-06-17 Akim Demaille <akim@epita.fr>
16984
16985 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16986 (symbol_list_prepend): New.
16987 * src/parse-gram.y (%union): `list' is a new member.
16988 (symbols.1): New, replaces...
16989 (terms_to_prec.1, nterms_to_type.1): these.
16990 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16991 Take a location as additional argument.
16992 Adjust all callers.
16993
04e60654
AD
169942002-06-15 Akim Demaille <akim@epita.fr>
16995
16996 * src/parse-gram.y: Move %token in the declaration section so that
16997 we don't depend upon CVS Bison.
16998
10e5b8bd
AD
169992002-06-15 Akim Demaille <akim@epita.fr>
17000
17001 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17002 * src/print.c (print_core): Use it.
17003
9801d40c
AD
170042002-06-15 Akim Demaille <akim@epita.fr>
17005
17006 * src/conflicts.c (log_resolution): Accept the rule involved in
17007 the sr conflicts instead of the lookahead number that points to
17008 that rule.
17009 (flush_reduce): Accept the current lookahead vector as argument,
17010 instead of the index in LA.
17011 (resolve_sr_conflict): Accept the current number of lookahead
17012 bitset to consider for the STATE, instead of the index in LA.
17013 (set_conflicts): Adjust.
17014 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17015
c0263492
AD
170162002-06-15 Akim Demaille <akim@epita.fr>
17017
17018 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17019 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17020 Adjust all dependencies.
17021 * src/lalr.c (initialize_lookaheads): Split into...
17022 (states_lookaheads_count, states_lookaheads_initialize): these.
17023 (lalr): Adjust.
17024
9757c359
AD
170252002-06-15 Akim Demaille <akim@epita.fr>
17026
17027 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17028 out of...
17029 (grammar_rules_print): here.
17030 * src/reduce.c (reduce_output): Use it.
17031 * tests/reduce.at (Useless Rules, Reduced Automaton)
17032 (Underivable Rules): Adjust.
17033
6b98e4b5
AD
170342002-06-15 Akim Demaille <akim@epita.fr>
17035
17036 Copy BYacc's nice way to report the grammar.
17037
17038 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17039 New.
17040 Don't print the rules' location, it is confusing and useless.
17041 (rule_print): Use grammar_rhs_print.
17042 * src/print.c (print_grammar): Use grammar_rules_print.
17043
6b98e4b5
AD
170442002-06-15 Akim Demaille <akim@epita.fr>
17045
17046 Complete and rationalize `useless thing' warnings.
17047
17048 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17049 (symbol_tag_print): New.
17050 Use them everywhere in place of accessing directly the tag member.
17051 * src/gram.h, src/gram.c (rule_print): New.
17052 Use it where a rule used to be printed `by hand'.
17053 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17054 (reduce_grammar_tables): Report the useless rules.
17055 (reduce_print): Useless things are a warning, not an error.
17056 Report it as such.
17057 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17058 (Reduced Automaton, Underivable Rules): Adjust.
17059 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17060 * tests/conflicts.at (Unresolved SR Conflicts)
17061 (Solved SR Conflicts): Adjust.
17062
ee000ba4
AD
170632002-06-15 Akim Demaille <akim@epita.fr>
17064
17065 Let symbols have a location.
17066
17067 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17068 (getsym): Adjust.
17069 Adjust all callers.
17070 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17071 Use location_t, not int.
17072 * src/symtab.c (symbol_check_defined): Take advantage of the
17073 location.
17074 * tests/regression.at (Invalid inputs): Adjust.
17075
8efe435c
AD
170762002-06-15 Akim Demaille <akim@epita.fr>
17077
17078 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17079 (input): Don't try to initialize yylloc here, do it in the
17080 scanner.
17081 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17082 * src/gram.h (rule_t): Change line and action_line into location
17083 and action_location, of location_t type.
17084 Adjust all dependencies.
17085 * src/location.h, src/location.c (empty_location): New.
17086 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17087 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17088 (grammar_current_rule_symbol_append)
17089 (grammar_current_rule_action_append): Expect a location as argument.
17090 * src/reader.c (grammar_midrule_action): Adjust to attach an
17091 action's location as dummy symbol location.
17092 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17093 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17094 the line numbers.
17095
1921f1d7
AD
170962002-06-14 Akim Demaille <akim@epita.fr>
17097
17098 Grammar declarations may be found in the grammar section.
17099
17100 * src/parse-gram.y (rules_or_grammar_declaration): New.
17101 (declarations): Each declaration may end with a semicolon, not
17102 just...
17103 (grammar_declaration): `"%union"'.
17104 (grammar): Branch to rules_or_grammar_declaration.
17105
4515534c
AD
171062002-06-14 Akim Demaille <akim@epita.fr>
17107
17108 * src/main.c (main): Invoke scanner_free.
17109
f958596b
AD
171102002-06-14 Akim Demaille <akim@epita.fr>
17111
17112 * src/output.c (m4_invoke): Extracted from...
17113 (output_skeleton): here.
17114 Free tempfile.
17115
2c569025
AD
171162002-06-14 Akim Demaille <akim@epita.fr>
17117
17118 * src/parse-gram.y (directives, directive, gram)
17119 (grammar_directives, precedence_directives, precedence_directive):
17120 Rename as...
17121 (declarations, declaration, grammar, grammar_declaration)
17122 (precedence_declaration, precedence_declarator): these.
17123 (symbol_declaration): New.
17124
592e8d4d
AD
171252002-06-14 Akim Demaille <akim@epita.fr>
17126
17127 * src/files.c (action_obstack): Remove, unused.
17128 (output_obstack): Remove it, and all its dependencies, as it is no
17129 longer needed.
17130 * src/reader.c (epilogue_set): Build the epilogue in the
17131 muscle_obstack.
17132 * src/output.h, src/output.c (muscle_obstack): Move to...
17133 * src/muscle_tab.h, src/muscle_tab.h: here.
17134 (muscle_init): Initialize muscle_obstack.
17135 (muscle_free): New.
17136 * src/main.c (main): Call it.
17137
0c15323d
AD
171382002-06-14 Akim Demaille <akim@epita.fr>
17139
17140 * src/location.h: New, extracted from...
17141 * src/reader.h: here.
17142 * src/Makefile.am (noinst_HEADERS): Merge into
17143 (bison_SOURCES): this.
17144 Add location.h.
17145 * src/parse-gram.y: Use location_t instead of Bison's.
17146 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17147 Use location_t instead of ints.
17148
e96c9728
AD
171492002-06-14 Akim Demaille <akim@epita.fr>
17150
17151 * data/bison.simple, data/bison.c++: Be sure to restore the
17152 current #line when returning to the skeleton contents after having
17153 exposed the input file's #line.
17154
75d1fe16
AD
171552002-06-12 Akim Demaille <akim@epita.fr>
17156
17157 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17158 eager.
17159 * tests/actions.at (Exotic Dollars): New.
17160
6c35d22c
AD
171612002-06-12 Akim Demaille <akim@epita.fr>
17162
17163 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17164 ['"/] too eagerly.
17165 * tests/input.at (Torturing the Scanner): New.
17166
1d6412ad
AD
171672002-06-11 Akim Demaille <akim@epita.fr>
17168
17169 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17170 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17171 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17172 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17173 * src/reader.c (reader): Use it.
17174
4cdb01db
AD
171752002-06-11 Akim Demaille <akim@epita.fr>
17176
17177 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17178 Adjust all callers.
17179 (scanner_last_string_free): New.
17180
44995b2e
AD
171812002-06-11 Akim Demaille <akim@epita.fr>
17182
17183 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17184 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17185 (last_string, YY_OBS_FREE): New.
17186 Use them when returning an ID.
17187
e9955c83
AD
171882002-06-11 Akim Demaille <akim@epita.fr>
17189
17190 Have Bison grammars parsed by a Bison grammar.
17191
17192 * src/reader.c, src/reader.h (prologue_augment): New.
17193 * src/reader.c (copy_definition): Remove.
17194
17195 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17196 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17197 (grammar_current_rule_prec_set, grammar_current_rule_check)
17198 (grammar_current_rule_symbol_append)
17199 (grammar_current_rule_action_append): Export.
17200 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17201 (symbol_list_action_append): Remove.
17202 Hook the routines from reader.
17203 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17204 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17205
17206 * src/reader.c (read_declarations): Remove, unused.
17207
17208 * src/parse-gram.y: Handle the epilogue.
17209 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17210 (grammar_start_symbol_set): this.
17211 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17212 * src/reader.c (readgram): Remove, unused.
17213 (reader): Adjust to insert eoftoken and axiom where appropriate.
17214
17215 * src/reader.c (copy_dollar): Replace with...
17216 * src/scan-gram.h (handle_dollar): this.
17217 * src/parse-gram.y: Remove `%thong'.
17218
17219 * src/reader.c (copy_at): Replace with...
17220 * src/scan-gram.h (handle_at): this.
17221
17222 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17223 New.
17224
17225 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17226 time being.
17227
17228 * src/reader.h, src/reader.c (grammar_rule_end): New.
17229
17230 * src/parse.y (current_type, current_class): New.
17231 Implement `%nterm', `%token' support.
17232 Merge `%term' into `%token'.
17233 (string_as_id): New.
17234 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17235 type name.
17236
17237 * src/parse-gram.y: Be sure to handle properly the beginning of
17238 rules.
17239
17240 * src/parse-gram.y: Handle %type.
17241 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17242
17243 * src/parse-gram.y: More directives support.
17244 * src/options.c: No longer handle source directives.
17245
17246 * src/parse-gram.y: Fix %output.
17247
17248 * src/parse-gram.y: Handle %union.
17249 Use the prologue locations.
17250 * src/reader.c (parse_union_decl): Remove.
17251
17252 * src/reader.h, src/reader.c (epilogue_set): New.
17253 * src/parse-gram.y: Use it.
17254
17255 * data/bison.simple, data/bison.c++: b4_stype is now either not
17256 defined, then default to int, or to the contents of %union,
17257 without `union' itself.
17258 Adjust.
17259 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17260
17261 * src/output.c (actions_output): Don't output braces, as they are
17262 already handled by the scanner.
17263
17264 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17265 characters to themselves.
17266
17267 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17268 that the epilogue has a proper #line.
17269
17270 * src/parse-gram.y: Handle precedence/associativity.
17271
17272 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17273 a terminal.
17274 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17275 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17276 at all to define terminals that cannot be emitted.
17277
17278 * src/scan-gram.l: Escape M4 characters.
17279
17280 * src/scan-gram.l: Working properly with escapes in user
17281 strings/characters.
17282
17283 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17284 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17285 grammar.
17286 Use more modest sizes, as for the time being the parser does not
17287 release memory, and therefore the process swallows a huge amount
17288 of memory.
17289
17290 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17291 stricter %token grammar.
17292
17293 * src/symtab.h (associativity): Add `undef_assoc'.
17294 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17295 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17296
17297 * tests/regression.at (Invalid %directive): Remove, as it is now
17298 meaningless.
17299 (Invalid inputs): Adjust to the new error messages.
17300 (Token definitions): The new grammar doesn't allow too many
17301 eccentricities.
17302
17303 * src/lex.h, src/lex.c: Remove.
17304 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17305 (copy_character, copy_string2, copy_string, copy_identifier)
17306 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17307 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17308 (parse_action): Remove.
17309 * po/POTFILES.in: Adjust.
17310
2e047461
AD
173112002-06-11 Akim Demaille <akim@epita.fr>
17312
cd05d13c 17313 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
17314 rule's action member: return the action as a string.
17315 Don't require `rule_length' as an argument: compute it.
17316 (grammar_current_rule_symbol_append)
17317 (grammar_current_rule_action_append): New, eved out from
17318 (readgram): here.
17319 Remove `action_flag', `rulelength', unused now.
17320
9af3fbce
AD
173212002-06-11 Akim Demaille <akim@epita.fr>
17322
17323 * src/reader.c (grammar_current_rule_prec_set).
17324 (grammar_current_rule_check): New, eved out from...
17325 (readgram): here.
17326 Remove `xaction', `first_rhs': useless.
17327 * tests/input.at (Type clashes): New.
17328 * tests/existing.at (GNU Cim Grammar): Adjust.
17329
1485e106
AD
173302002-06-11 Akim Demaille <akim@epita.fr>
17331
17332 * src/reader.c (grammar_midrule_action): New, Eved out from
17333 (readgram): here.
17334
da4160c3
AD
173352002-06-11 Akim Demaille <akim@epita.fr>
17336
17337 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17338 New.
17339 (readgram): Use them as replacement of inlined code, crule and
17340 crule1.
17341
f6d0f937
AD
173422002-06-11 Akim Demaille <akim@epita.fr>
17343
17344 * src/reader.c (grammar_end, grammar_symbol_append): New.
17345 (readgram): Use them.
17346 Make the use of `p' as local as possible.
17347
69078d4b
AD
173482002-06-10 Akim Demaille <akim@epita.fr>
17349
17350 GCJ's parser requires the tokens to be defined before the prologue.
17351
17352 * data/bison.simple: Output the token definition before the user's
17353 prologue.
17354 * tests/regression.at (Braces parsing, Duplicate string)
17355 (Mixing %token styles): Check the output from bison.
17356 (Early token definitions): New.
17357
5e424082
AD
173582002-06-10 Akim Demaille <akim@epita.fr>
17359
17360 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17361 assigning twice the same user number to a token, so that we can
17362 use it in...
17363 * src/lex.c (lex): here.
17364 Also use `symbol_class_set' instead of hand written code.
17365 * src/reader.c (parse_assoc_decl): Likewise.
17366
44536b35
AD
173672002-06-10 Akim Demaille <akim@epita.fr>
17368
17369 * src/symtab.c, src/symtab.c (symbol_class_set)
17370 (symbol_user_token_number_set): New.
17371 * src/reader.c (parse_token_decl): Use them.
17372 Use a switch instead of ifs.
17373 Use a single argument.
17374
8b9f2372
AD
173752002-06-10 Akim Demaille <akim@epita.fr>
17376
17377 Remove `%thong' support as it is undocumented, unused, duplicates
17378 `%token's job, and creates useless e-mail traffic with people who
17379 want to know what it is, why it is undocumented, unused, and
17380 duplicates `%token's job.
17381
17382 * src/reader.c (parse_thong_decl): Remove.
17383 * src/options.c (option_table): Remove "thong".
17384 * src/lex.h (tok_thong): Remove.
17385
3ae2b51f
AD
173862002-06-10 Akim Demaille <akim@epita.fr>
17387
17388 * src/symtab.c, src/symtab.c (symbol_type_set)
17389 (symbol_precedence_set): New.
17390 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17391 (value_components_used): Remove, unused.
17392
2f1afb73
AD
173932002-06-09 Akim Demaille <akim@epita.fr>
17394
17395 Move symbols handling code out of the reader.
17396
17397 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17398 (axiom): Move to...
17399 * src/symtab.h, src/symtab.c: here.
17400
17401 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17402 * src/reader.c (startval): Rename as...
17403 * src/symtab.h, src/symtab.c (startsymbol): this.
17404 * src/reader.c: Adjust.
17405
17406 * src/reader.c (symbol_check_defined, symbol_make_alias)
17407 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17408 (token_translations_init)
17409 Move to...
17410 * src/symtab.c: here.
17411 * src/reader.c (packsymbols): Move to...
17412 * src/symtab.h, src/symtab.c (symbols_pack): here.
17413 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17414 argument.
17415
e9bca3ad
AD
174162002-06-03 Akim Demaille <akim@epita.fr>
17417
17418 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17419 then statements.
17420
86eff183
AD
174212002-06-03 Akim Demaille <akim@epita.fr>
17422
17423 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17424 structs with non literals.
17425 * src/scan-skel.l: never-interactive.
17426 * src/conflicts.c (enum conflict_resolution_e): No trailing
17427 comma.
17428 * src/getargs.c (usage): Split long literal strings.
17429 Reported by Hans Aberg.
17430
717be197
AD
174312002-05-28 Akim Demaille <akim@epita.fr>
17432
17433 * data/bison.c++: Use C++ ostreams.
17434 (cdebug_): New member.
17435
670ddffd
AD
174362002-05-28 Akim Demaille <akim@epita.fr>
17437
17438 * src/output.c (output_skeleton): Be sure to allocate enough room
17439 for `/' _and_ for `\0' in full_skeleton.
17440
769b430f
AD
174412002-05-28 Akim Demaille <akim@epita.fr>
17442
17443 * data/bison.c++: Catch up with bison.simple:
17444 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17445 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17446 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17447 and popping traces.
17448
7067cb36
PH
174492002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17450
17451 * src/output.c (output_skeleton): Put an explicit path in front of
17452 the skeleton file name, rather than relying on the -I directory,
17453 to partially alleviate effects of having a skeleton file lying around
17454 in the current directory.
769b430f 17455
4a713ec2
PH
174562002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17457
769b430f 17458 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
17459 obstack_printf should be obstack_fgrow1.
17460
b408954b
AD
174612002-05-26 Akim Demaille <akim@epita.fr>
17462
17463 * src/state.h (state_t): `solved_conflicts' is a new member.
17464 * src/LR0.c (new_state): Set it to 0.
17465 * src/conflicts.h, src/conflicts.c (print_conflicts)
17466 (free_conflicts, solve_conflicts): Rename as...
17467 (conflicts_print, conflicts_free, conflicts_solve): these.
17468 Adjust callers.
17469 * src/conflicts.c (enum conflict_resolution_e)
17470 (solved_conflicts_obstack): New, used by...
17471 (log_resolution): this.
17472 Adjust to attach the conflict resolution to each state.
17473 Complete the description with the precedence/associativity
17474 information.
17475 (resolve_sr_conflict): Adjust.
17476 * src/print.c (print_state): Output its solved_conflicts.
17477 * tests/conflicts.at (Unresolved SR Conflicts)
17478 (Solved SR Conflicts): Exercise --report=all.
17479
a49aecd5
AD
174802002-05-26 Akim Demaille <akim@epita.fr>
17481
17482 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17483 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17484 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17485 (token_number_t, item_number_as_token_number)
17486 (token_number_as_item_number, muscle_insert_token_number_table):
17487 Rename as...
17488 (symbol_number_t, item_number_as_symbol_number)
17489 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17490 these, since it is more appropriate.
17491
5504898e
AD
174922002-05-26 Akim Demaille <akim@epita.fr>
17493
17494 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17495 `Error:' lines.
17496 * data/bison.simple (yystos) [YYDEBUG]: New.
17497 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17498 error recovery.
17499 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17500
ec3bc396
AD
175012002-05-25 Akim Demaille <akim@epita.fr>
17502
17503 * doc/bison.texinfo (Debugging): Split into...
17504 (Tracing): this new section, its former contents, and...
17505 (Understanding): this new section.
17506 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17507 by...
17508 (report_flag): this.
17509 Adjust all dependencies.
17510 (report_args, report_types, report_argmatch): New.
17511 (usage, getargs): Report/support -r, --report.
17512 * src/options.h
17513 (struct option_table_struct): Rename as..,
17514 (struct option_table_s): this.
17515 Rename the `set_flag' member to `flag' to match with getopt_long's
17516 struct.
17517 * src/options.c (option_table): Split verbose into an entry for
17518 %verbose, and another for --verbose.
17519 Support --report/-r, so remove -r from the obsolete --raw.
17520 * src/print.c: Attach full item sets and lookaheads reports to
17521 report_flag instead of trace_flag.
17522 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17523
78df8250
PE
175242002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17525 and Paul Eggert <eggert@twinsun.com>
769b430f 17526
78df8250
PE
17527 * data/bison.simple (yyparse): Correct error handling to conform to
17528 POSIX and yacc. Specifically, after syntax error is discovered,
17529 do not reduce further before shifting the error token.
17530 Clean up the code a bit by removing the labels yyerrdefault,
17531 yyerrhandle, yyerrpop.
17532 * NEWS: Document the above.
17533
c0c9ea05
PH
175342002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17535
17536 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17537 type; it isn't always big enough, since it doesn't necessarily
17538 include non-terminals.
769b430f 17539 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
17540 the latter can be removed.
17541 (yy_token_number_type): Remove, only one use.
17542 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17543 don't use TokenNumberType as element type.
769b430f 17544
c0c9ea05
PH
17545 * tests/regression.at: Modify expected output to agree with change
17546 to yyr1 and yytranslate.
769b430f 17547
6390a83f
FK
175482002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17549
17550 * src/reader.c (parse_action): Use copy_character instead of
17551 obstack_1grow.
17552
db7c8e9a
AD
175532002-05-13 Akim Demaille <akim@epita.fr>
17554
17555 * tests/regression.at (Token definitions): Prototype yylex and
17556 yyerror.
17557
fcc61800
PH
175582002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17559
158c687b 17560 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
17561 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17562 32-bit arithmetic.
17563 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17564
5683e9b2
AD
175652002-05-07 Akim Demaille <akim@epita.fr>
17566
17567 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17568 avoid GCC warnings.
17569
0c2d3f4c
AD
175702002-05-07 Akim Demaille <akim@epita.fr>
17571
17572 Kill GCC warnings.
17573
17574 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17575 over the RHS of each rule.
17576 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17577 * src/state.h (state_t): Member `nitems' is unsigned short.
17578 * src/LR0.c (get_state): Adjust.
17579 * src/reader.c (packgram): Likewise.
17580 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17581 `Type'.
17582 (muscle_insert_int_table): Remove, unused.
17583 (prepare_rules): Remove `max'.
17584
1565b720
AD
175852002-05-06 Akim Demaille <akim@epita.fr>
17586
17587 * src/closure.c (print_firsts): Display of the symbol tags.
17588 (bitmatrix_print): Move to...
17589 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17590 here.
17591 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17592
cfaee611
AD
175932002-05-06 Akim Demaille <akim@epita.fr>
17594
17595 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17596 hash_do_for_each.
17597
458be8e0
AD
175982002-05-06 Akim Demaille <akim@epita.fr>
17599
17600 * src/LR0.c (new_state, get_state): Instead of using the global
17601 `kernel_size' and `kernel_base', have two new arguments:
17602 `core_size' and `core'.
17603 Adjust callers.
17604
a900a624
AD
176052002-05-06 Akim Demaille <akim@epita.fr>
17606
17607 * src/reader.c (packgram): No longer end `ritem' with a 0
17608 sentinel: it is not used.
17609
d4e7d3a1
AD
176102002-05-05 Akim Demaille <akim@epita.fr>
17611
17612 New experimental feature: display the lookaheads in the report and
17613 graph.
17614
17615 * src/print (print_core): When --trace-flag, display the rules
17616 lookaheads.
17617 * src/print_graph.c (print_core): Likewise.
17618 Swap the arguments.
17619 Adjust caller.
17620
39ceb25b
AD
176212002-05-05 Akim Demaille <akim@epita.fr>
17622
17623 * tests/torture.at (Many lookaheads): New test.
17624
5372019f
AD
176252002-05-05 Akim Demaille <akim@epita.fr>
17626
17627 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17628 (GENERATE_MUSCLE_INSERT_TABLE): this.
17629 (output_int_table, output_unsigned_int_table, output_short_table)
17630 (output_token_number_table, output_item_number_table): Replace with...
17631 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17632 (muscle_insert_short_table, muscle_insert_token_number_table)
17633 (muscle_insert_item_number_table): these.
17634 Adjust all callers.
17635 (prepare_tokens): Don't free `translations', since...
17636 * src/reader.h, src/reader.c (grammar_free): do it.
17637 Move to...
17638 * src/gram.h, src/gram.c (grammar_free): here.
17639 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17640 b4_translate_max.
17641
5df5f6d5
AD
176422002-05-05 Akim Demaille <akim@epita.fr>
17643
17644 * src/output.c (output_unsigned_int_table): New.
17645 (prepare_rules): `i' is unsigned.
17646 `prhs', `rline', `r2' are unsigned int.
17647 Rename muscle `rhs_number_max' as `rhs_max'.
17648 Output muscles `prhs_max', `rline_max', and `r2_max'.
17649 Free rline and r1.
17650 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17651 to compute types instead of constant types.
17652 * tests/regression.at (Web2c Actions): Adjust.
17653
b87f8b21
AD
176542002-05-04 Akim Demaille <akim@epita.fr>
17655
17656 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17657 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17658 Adjust dependencies.
17659 * src/output.c (token_definitions_output): Be sure not to output a
17660 `#define 'a'' when fed with `%token 'a' "a"'.
17661 * tests/regression.at (Token definitions): New.
17662
8bb936e4
PE
176632002-05-03 Paul Eggert <eggert@twinsun.com>
17664
17665 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17666 for K&R C.
17667
176682002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17669
17670 * Makefile.am (SUBDIRS): Remove intl.
17671 (EXTRA_DIST): Add config/config.rpath.
17672
53c71a12
AD
176732002-05-03 Akim Demaille <akim@epita.fr>
17674
17675 * data/bison.simple (m4_if): Don't output empty enums.
17676 And actually, output valid enum definitions :(.
17677
289dd0cf
AD
176782002-05-03 Akim Demaille <akim@epita.fr>
17679
17680 * configure.bat: Remove, completely obsolete.
17681 * Makefile.am (EXTRA_DIST): Adjust.
17682 Don't distribute config.rpath...
17683 * config/Makefile.am (EXTRA_DIST): Do it.
17684
db85e524
AD
176852002-05-03 Akim Demaille <akim@epita.fr>
17686
17687 * configure.in (GETTEXT_VERSION): New.
17688 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17689
83ccf991
AD
176902002-05-03 Akim Demaille <akim@epita.fr>
17691
17692 * data/bison.simple (b4_token_enum): New.
17693 (b4_token_defines): Use it to output tokens both as #define and
17694 enums.
17695 Suggested by Paul Eggert.
17696 * src/output.c (token_definitions_output): Don't output spurious
17697 white spaces.
17698
1f418995
AD
176992002-05-03 Akim Demaille <akim@epita.fr>
17700
17701 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17702
45119f04
RA
177032002-05-02 Robert Anisko <robert@lrde.epita.fr>
17704
17705 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17706 Update the stack class, give a try to deque as the default container.
17707
b2d52318
AD
177082002-05-02 Akim Demaille <akim@epita.fr>
17709
17710 * data/bison.simple (yyparse): Do not implement @$ = @1.
17711 (YYLLOC_DEFAULT): Adjust to do it.
17712 * doc/bison.texinfo (Location Default Action): Fix.
17713
3a8b4109
AD
177142002-05-02 Akim Demaille <akim@epita.fr>
17715
17716 * src/reader.c (parse_braces): Merge into...
17717 (parse_action): this.
17718
84614e13
AD
177192002-05-02 Akim Demaille <akim@epita.fr>
17720
17721 * configure.in (ALL_LINGUAS): Remove.
17722 * po/LINGUAS, hr.po: New.
17723
fdbcd8e2
AD
177242002-05-02 Akim Demaille <akim@epita.fr>
17725
17726 Remove the so called hairy (semantic) parsers.
17727
17728 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17729 * src/gram.h, src/gram.c (semantic_parser): Remove.
17730 (rule_t): Remove the guard and guard_line members.
17731 * src/lex.h (token_t): remove tok_guard.
17732 * src/options.c (option_table): Remove %guard and %semantic_parser
17733 support.
17734 * src/output.c, src/output.h (guards_output): Remove.
17735 (prepare): Adjust.
17736 (token_definitions_output): Don't output the `T'
17737 tokens (???).
17738 (output_skeleton): Don't output the guards.
17739 * src/files.c, src/files.c (attrsfile): Remove.
17740 * src/reader.c (symbol_list): Remove the guard and guard_line
17741 members.
17742 Adjust dependencies.
17743 (parse_guard): Remove.
17744 * data/bison.hairy: Remove.
17745 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17746 BISON_HAIRY.
17747
82b6cb3f
AD
177482002-05-02 Akim Demaille <akim@epita.fr>
17749
17750 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17751 (parse_guard): Rename the formal argument `stack_offset' as
17752 `rule_length', which is more readable.
17753 Adjust callers.
17754 (copy_at, copy_dollar): Instead of outputting the hard coded
17755 values of $$, $n and so forth, output invocation to b4_lhs_value,
17756 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
17757 Note: this patch partially drops `semantic-parser' support: it
17758 always does `rule_length - n', where semantic parsers ought to
17759 always use `-n'.
82b6cb3f
AD
17760 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17761 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17762
6cbfbcc5
AD
177632002-05-02 Akim Demaille <akim@epita.fr>
17764
17765 * configure.in (AC_INIT): Bump to 1.49b.
17766 (AM_INIT_AUTOMAKE): Short invocation.
17767
b8548114
AD
177682002-05-02 Akim Demaille <akim@epita.fr>
17769
17770 Version 1.49a.
17771
c20cd1fa
AD
177722002-05-01 Akim Demaille <akim@epita.fr>
17773
17774 * src/skeleton.h: Remove.
17775
8a9566d4
AD
177762002-05-01 Akim Demaille <akim@epita.fr>
17777
17778 * src/skeleton.h: Fix the #endif.
17779 Reported by Magnus Fromreide.
17780
8c6d399a
PE
177812002-04-26 Paul Eggert <eggert@twinsun.com>
17782
17783 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17784 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 17785 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 17786
2b7ed18a
RA
177872002-04-25 Robert Anisko <robert@lrde.epita.fr>
17788
17789 * src/scan-skel.l: Postprocess quadrigraphs.
17790
17791 * src/reader.c (copy_character): New function, used to output
17792 single characters while replacing `[' and `]' with quadrigraphs, to
17793 avoid troubles with M4 quotes.
17794 (copy_comment): Output characters with copy_character.
17795 (read_additionnal_code): Likewise.
17796 (copy_string2): Likewise.
17797 (copy_definition): Likewise.
17798
17799 * tests/calc.at: Exercise M4 quoting.
17800
34a89c50
AD
178012002-04-25 Akim Demaille <akim@epita.fr>
17802
17803 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17804 between `!' and the command.
17805 Reported by Paul Eggert.
17806
0dd1580a
RA
178072002-04-24 Robert Anisko <robert@lrde.epita.fr>
17808
17809 * tests/calc.at: Exercise prologue splitting.
17810
17811 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17812 `b4_post_prologue' instead of `b4_prologue'.
17813
17814 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17815 muscles.
17816 (output): Free pre_prologue_obstack and post_prologue_obstack.
17817 * src/files.h, src/files.c (attrs_obstack): Remove.
17818 (pre_prologue_obstack, post_prologue_obstack): New.
17819 * src/reader.c (copy_definition): Add a parameter to specify the
17820 obstack to fill, instead of using attrs_obstack unconditionally.
17821 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17822 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17823
83c1796f
PE
178242002-04-23 Paul Eggert <eggert@twinsun.com>
17825
17826 * data/bison.simple: Remove unnecessary commentary and white
17827 space differences from 1_29-branch.
17828 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17829
17830 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17831 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17832 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17833 constructors or destructors.
17834
17835 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17836
1207eeac
AD
178372002-04-23 Akim Demaille <akim@epita.fr>
17838
17839 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17840 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17841 location with columns.
17842 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17843 All reported by Paul Eggert.
17844
78ab8f67
AD
178452002-04-22 Akim Demaille <akim@epita.fr>
17846
17847 * src/reduce.c (dump_grammar): Move to...
17848 * src/gram.h, src/gram.c (grammar_dump): here.
17849 Be sure to separate long item numbers.
17850 Don't read the members of a rule's prec if its nil.
17851
133c20e2
AD
178522002-04-22 Akim Demaille <akim@epita.fr>
17853
17854 * src/output.c (table_size, table_grow): New.
17855 (MAXTABLE): Remove, replace uses with table_size.
17856 (pack_vector): Instead of dying when the table is too big, grow it.
17857
9515e8a7
AD
178582002-04-22 Akim Demaille <akim@epita.fr>
17859
17860 * data/bison.simple (yyr1): Its type is that of a token number.
17861 * data/bison.c++ (r1_): Likewise.
17862 * tests/regression.at (Web2c Actions): Adjust.
17863
23c5a174
AD
178642002-04-22 Akim Demaille <akim@epita.fr>
17865
17866 * src/reader.c (token_translations_init): 256 is now the default
17867 value for the error token, i.e., it will be assigned another
17868 number if the user assigned 256 to one of her tokens.
17869 (reader): Don't force 256 to error.
17870 * doc/bison.texinfo (Symbols): Adjust.
17871 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17872 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17873 etc. instead of 10, 20, 30 (which was used to `jump' over error
17874 (256) and undefined (2)).
17875
5fbb0954
AD
178762002-04-22 Akim Demaille <akim@epita.fr>
17877
17878 Propagate more token_number_t.
17879
17880 * src/gram.h (token_number_as_item_number)
17881 (item_number_as_token_number): New.
17882 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17883 Use it to create output_item_number_table and
17884 output_token_number_table.
17885 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17886 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17887 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17888 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17889
4f940944
AD
178902002-04-22 Akim Demaille <akim@epita.fr>
17891
17892 * src/output.h, src/output.c (get_lines_number): Remove.
17893
3ded9a63
AD
178942002-04-19 Akim Demaille <akim@epita.fr>
17895
17896 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17897 as Lex/Flex'.
17898 (Debugging): More details about enabling the debugging features.
17899 (Table of Symbols): Describe $$, $n, @$, and @n.
17900 Suggested by Tim Josling.
17901
e0c471a9
AD
179022002-04-19 Akim Demaille <akim@epita.fr>
17903
17904 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17905
fecc10cd
AD
179062002-04-10 Akim Demaille <akim@epita.fr>
17907
17908 * src/system.h: Rely on HAVE_LIMITS_H.
17909 Suggested by Paul Eggert.
17910
51dec47b
AD
179112002-04-09 Akim Demaille <akim@epita.fr>
17912
17913 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17914 full stderr, and strip it according to the bison options, instead
17915 of composing the error message from different bits.
17916 This makes it easier to check for several error messages.
17917 Adjust all the invocations.
17918 Add an invocation exercising the error token.
17919 Add an invocation demonstrating a stupid error message.
17920 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17921 Adjust the tests.
17922 Error message are for stderr, not stdout.
17923
007a50a4
AD
179242002-04-09 Akim Demaille <akim@epita.fr>
17925
17926 * src/gram.h, src/gram.c (error_token_number): Remove, use
17927 errtoken->number.
17928 * src/reader.c (reader): Don't specify the user token number (2)
17929 for $undefined, as it uselessly prevents using it.
17930 * src/gram.h (token_number_t): Move to...
17931 * src/symtab.h: here.
17932 (state_t.number): Is a token_number_t.
17933 * src/print.c, src/reader.c: Use undeftoken->number instead of
17934 hard coded 2.
17935 (Even though this 2 is not the same as above: the number of the
17936 undeftoken remains being 2, it is its user token number which
17937 might not be 2).
17938 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17939 `user_token_number_max'.
17940 Output `undef_token_number'.
17941 * data/bison.simple, data/bison.c++: Use them.
17942 Be sure to map invalid yylex return values to
17943 `undef_token_number'. This saves us from gratuitous SEGV.
17944
17945 * tests/conflicts.at (Solved SR Conflicts)
17946 (Unresolved SR Conflicts): Adjust.
17947 * tests/regression.at (Web2c Actions): Adjust.
17948
06446ccf
AD
179492002-04-08 Akim Demaille <akim@epita.fr>
17950
17951 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17952 Adding #line.
17953 Remove the duplicate `typedefs'.
17954 (RhsNumberType): Fix the declaration and various other typos.
17955 Use __ofile__.
17956 * data/bison.simple: Use __ofile__.
17957 * src/scan-skel.l: Handle __ofile__.
17958
62a3e4f0
AD
179592002-04-08 Akim Demaille <akim@epita.fr>
17960
17961 * src/gram.h (item_number_t): New, the type of item numbers in
17962 RITEM. Note that it must be able to code symbol numbers as
17963 positive number, and the negation of rule numbers as negative
17964 numbers.
17965 Adjust all dependencies (pretty many).
17966 * src/reduce.c (rule): Remove this `short *' pointer: use
17967 item_number_t.
17968 * src/system.h (MINSHORT, MAXSHORT): Remove.
17969 Include `limits.h'.
17970 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17971 (shortcpy): Remove.
17972 (MAXTABLE): Move to...
17973 * src/output.c (MAXTABLE): here.
17974 (prepare_rules): Use output_int_table to output rhs.
17975 * data/bison.simple, data/bison.c++: Adjust.
17976 * tests/torture.at (Big triangle): Move the limit from 254 to
17977 500.
17978 * tests/regression.at (Web2c Actions): Ajust.
17979
17980 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17981 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17982 passes, but produces negative #line number, once fixed, GCC is
17983 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17984 C), it passes.
17985 * src/state.h (state_h): Code input lines on ints, not shorts.
17986
bb88b0fc
AD
179872002-04-08 Akim Demaille <akim@epita.fr>
17988
17989 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17990 and then the grammar.
17991
9a636f47
AD
179922002-04-08 Akim Demaille <akim@epita.fr>
17993
17994 * src/system.h: No longer using strndup.
17995
680e8701
AD
179962002-04-07 Akim Demaille <akim@epita.fr>
17997
17998 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17999 * src/output.c (output_table_data): Return the longest number.
18000 (prepare_tokens): Output `token_number_max').
18001 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18002 New.
18003 Use them to define yy_token_number_type/TokenNumberType.
18004 Use this type for yytranslate.
18005 * tests/torture.at (Big triangle): Push the limit from 124 to
18006 253.
18007 * tests/regression.at (Web2c Actions): Adjust.
18008
817e9f41
AD
180092002-04-07 Akim Demaille <akim@epita.fr>
18010
18011 * tests/torture.at (Big triangle): New.
18012 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18013 * tests/existing.at: here.
18014
5123689b
AD
180152002-04-07 Akim Demaille <akim@epita.fr>
18016
18017 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18018 nritems.
18019 Adjust dependencies.
18020
f3849179
AD
180212002-04-07 Akim Demaille <akim@epita.fr>
18022
18023 * src/reader.c: Normalize increments to prefix form.
18024
bd02036a
AD
180252002-04-07 Akim Demaille <akim@epita.fr>
18026
18027 * src/reader.c, symtab.c: Remove debugging code.
18028
db8837cb
AD
180292002-04-07 Akim Demaille <akim@epita.fr>
18030
18031 Rename all the `bucket's as `symbol_t'.
18032
18033 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18034 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18035 * src/symtab.c, src/symtab.h (bucket): Rename as...
18036 (symbol_t): this.
18037 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18038 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18039 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18040 (buckets_new, buckets_free, buckets_do): Rename as...
18041 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18042 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18043 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18044 (symbols_new, symbols_free, symbols_do): these.
18045
72a23c97
AD
180462002-04-07 Akim Demaille <akim@epita.fr>
18047
18048 Use lib/hash for the symbol table.
18049
18050 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18051 EOF.
18052 * src/lex.c (lex): Set the `number' member of new terminals.
18053 * src/reader.c (bucket_check_defined, bucket_make_alias)
18054 (bucket_check_alias_consistence, bucket_translation): New.
18055 (reader, grammar_free, readgram, token_translations_init)
18056 (packsymbols): Adjust.
18057 (reader): Number the predefined tokens.
18058 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18059 for predefined tokens.
18060 * src/symtab.h (bucket): Remove all the hash table related
18061 members.
18062 * src/symtab.c (symtab): Replace by...
18063 (bucket_table): this.
18064 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18065 (buckets_new, buckets_do): New.
18066
280a38c3
AD
180672002-04-07 Akim Demaille <akim@epita.fr>
18068
18069 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18070 (start_symbol, max_user_token_number, semantic_parser)
18071 (error_token_number): Initialize.
18072 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18073 Initialize.
18074 (reader): Don't.
18075 (errtoken, eoftoken, undeftoken, axiom): Extern.
18076
03b31c0c
AD
180772002-04-07 Akim Demaille <akim@epita.fr>
18078
18079 * src/gram.h (rule_s): prec and precsym are now pointers
18080 to the bucket giving the priority/associativity.
18081 Member `associativity' removed: useless.
18082 * src/reduce.c, src/conflicts.c: Adjust.
18083
8b3df748
AD
180842002-04-07 Akim Demaille <akim@epita.fr>
18085
18086 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18087 Properly escape the symbols' TAG when outputting them.
18088
e601aa1d
AD
180892002-04-07 Akim Demaille <akim@epita.fr>
18090
18091 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18092
b0299a2e
AD
180932002-04-07 Akim Demaille <akim@epita.fr>
18094
18095 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18096 (LArule): this, which is an array to rule_t*.
18097 * src/print.c, src/conflicts.c: Adjust.
18098
d7e1f00c
AD
180992002-04-07 Akim Demaille <akim@epita.fr>
18100
18101 * src/gram.h (rule_t): Rename `number' as `user_number'.
18102 `number' is a new member.
18103 Adjust dependencies.
18104 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18105
cc9305dd
AD
181062002-04-07 Akim Demaille <akim@epita.fr>
18107
18108 As a result of the previous patch, it is no longer needed
18109 to reorder ritem itself.
18110
18111 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18112
b0940840
AD
181132002-04-07 Akim Demaille <akim@epita.fr>
18114
18115 Be sure never to walk through RITEMS, but use only data related to
18116 the rules themselves. RITEMS should be banished.
18117
18118 * src/output.c (output_token_translations): Rename as...
18119 (prepare_tokens): this.
18120 In addition to `translate', prepare the muscles `tname' and
18121 `toknum', which were handled by...
18122 (output_rule_data): this.
18123 Remove, and move the remainder of its outputs into...
18124 (prepare_rules): this new routines, which also merges content from
18125 (output_gram): this.
18126 (prepare_rules): Be sure never to walk through RITEMS.
18127 (output_stos): Rename as...
18128 (prepare_stos): this.
18129 (output): Always invoke prepare_states, after all, just don't use it
18130 in the output if you don't need it.
18131
643a5994
AD
181322002-04-07 Akim Demaille <akim@epita.fr>
18133
18134 * src/LR0.c (new_state): Display `nstates' as the name of the
18135 newly created state.
18136 Adjust to initialize first_state and last_state if needed.
18137 Be sure to distinguish the initial from the final state.
18138 (new_states): Create the itemset of the initial state, and use
18139 new_state.
18140 * src/closure.c (closure): Now that the initial state has its
18141 items properly set, there is no need for a special case when
18142 creating `ruleset'.
18143
18144 As a result, now the rule 0, reducing to $axiom, is visible in the
18145 outputs. Adjust the test suite.
18146
18147 * tests/conflicts.at (Solved SR Conflicts)
18148 (Unresolved SR Conflicts): Adjust.
18149 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18150 * tests/conflicts.at (S/R in initial): New.
18151
b4c4ccc2
AD
181522002-04-07 Akim Demaille <akim@epita.fr>
18153
18154 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18155 the RHS of the rules.
18156 * src/output.c (output_gram): Likewise.
18157
bba97eb2
AD
181582002-04-07 Akim Demaille <akim@epita.fr>
18159
18160 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18161 bucket.
18162 Adjust all dependencies.
18163 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18164 `number' of the buckets too.
18165 * src/gram.h: Include `symtab.h'.
18166 (associativity): Move to...
18167 * src/symtab.h: here.
18168 No longer include `gram.h'.
18169
c3b407f4
AD
181702002-04-07 Akim Demaille <akim@epita.fr>
18171
18172 * src/gram.h, src/gram.c (rules_rhs_length): New.
18173 (ritem_longest_rhs): Use it.
18174 * src/gram.h (rule_t): `number' is a new member.
18175 * src/reader.c (packgram): Set it.
18176 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18177 the end of `rules', and count them out of `nrules'.
18178 (reduce_output, dump_grammar): Adjust.
18179 * src/print.c (print_grammar): It is no longer needed to check for
18180 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18181 * tests/reduce.at (Reduced Automaton): New test.
18182
11652ab3
AD
181832002-04-07 Akim Demaille <akim@epita.fr>
18184
18185 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18186 lacking `+ 1' to nrules, Bison reported as useless a token if it
18187 was used solely to set the precedence of the last rule...
18188
26b23c1a
AD
181892002-04-07 Akim Demaille <akim@epita.fr>
18190
18191 * data/bison.c++, data/bison.simple: Don't output the current file
18192 name in #line, to avoid useless diffs between two identical
18193 outputs under different names.
18194
18bcecb0
AD
181952002-04-07 Akim Demaille <akim@epita.fr>
18196
18197 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18198 Normalize loops to using `< nrules + 1', not `<= nrules'.
18199
fa770c86
AD
182002002-04-07 Akim Demaille <akim@epita.fr>
18201
18202 * TODO: Update.
18203
d9b739c3
AD
182042002-04-07 Akim Demaille <akim@epita.fr>
18205
18206 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18207 bucket.value as bucket.number.
18208
99013900
AD
182092002-04-07 Akim Demaille <akim@epita.fr>
18210
18211 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18212 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18213 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18214 RHS, instead of being an index in RITEMS.
18215
e966383b
PE
182162002-04-04 Paul Eggert <eggert@twinsun.com>
18217
18218 * doc/bison.texinfo: Update copyright date.
18219 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18220 (Symbols): Warn about running Bison in one character set,
18221 but compiling and/or running in an incompatible one.
18222 Warn about character code 256, too.
18223
182242002-04-03 Paul Eggert <eggert@twinsun.com>
18225
18226 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18227 YYERROR_VERBOSE is nonzero, not whether it is defined.
18228
18229 Merge changes from bison-1_29-branch.
c307773e 18230
8d6c48b9
PE
182312002-03-20 Paul Eggert <eggert@twinsun.com>
18232
18233 Merge fixes from Debian bison_1.34-1.diff.
18234
18235 * configure.in (AC_PREREQ): 2.53.
18236
e53c6322
AD
182372002-03-20 Akim Demaille <akim@epita.fr>
18238
18239 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18240
9ffbeca7
PE
182412002-03-19 Paul Eggert <eggert@twinsun.com>
18242
21db0b2a
PE
18243 * src/bison.simple (YYCOPY): New macro.
18244 (YYSTACK_RELOCATE): Use it.
18245 Remove Type arg; no longer needed. All callers changed.
18246 (yymemcpy): Remove; no longer needed.
18247
9ffbeca7
PE
18248 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18249 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18250
642cb8f8
AD
182512002-03-19 Akim Demaille <akim@epita.fr>
18252
18253 Test and fix the #line outputs.
18254
18255 * tests/atlocal.at (GCC): New.
18256 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 18257 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
18258 (Action synch line, Epilogue synch line): New tests.
18259 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18260 * data/bison.simple, data/bison.c++: Use it.
18261
3c31a486
AD
182622002-03-19 Akim Demaille <akim@epita.fr>
18263
18264 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18265 (Solved SR Conflicts, %expect not enough, %expect right)
18266 (%expect too much): Move to...
18267 * tests/conflicts.at: this new file.
18268
0d8bed56
AD
182692002-03-19 Akim Demaille <akim@epita.fr>
18270
18271 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18272 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18273 that we can move to enums for instance.
18274 * src/output.c (token_definitions_output): Output a list of
18275 `token-name, token-number' instead of the #define.
18276 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18277
9208d17f
AD
182782002-03-14 Akim Demaille <akim@epita.fr>
18279
18280 Use Gettext 0.11.1.
18281
af27eacb
RA
182822002-03-09 Robert Anisko <robert@lrde.epita.fr>
18283
18284 * data/bison.c++: Make the user able to add members to the generated
18285 parser by subclassing.
18286
9101a310
RA
182872002-03-05 Robert Anisko <robert@lrde.epita.fr>
18288
18289 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18290 a character.
18291 Reported by Nicolas Tisserand and Nicolas Burrus.
18292
fff9bf0b
RA
182932002-03-04 Robert Anisko <robert@lrde.epita.fr>
18294
18295 * src/reader.c: Warn about lacking semi-colons, do not complain.
18296
64dba31e
RA
182972002-03-04 Robert Anisko <robert@lrde.epita.fr>
18298
18299 * data/bison.c++: Remove a debug line.
18300
374f5a14
RA
183012002-03-04 Robert Anisko <robert@lrde.epita.fr>
18302
18303 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18304 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18305 provide a default implementation.
18306
bfcf1f3a
AD
183072002-03-04 Akim Demaille <akim@epita.fr>
18308
18309 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18310 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18311 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18312 * tests/semantic.at (Parsing Guards): Similarly.
18313 * src/reader.at (readgram): Complain if the last rule is not ended
18314 with a semi-colon.
18315
65ccf9fc
AD
183162002-03-04 Akim Demaille <akim@epita.fr>
18317
18318 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18319 * src/closure.c: here.
18320 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18321 RTC.
18322 * src/warshall.h, src/warshall.c: Remove.
18323 * tests/sets.at (Broken Closure): Adjust.
18324
d0039cbc
AD
183252002-03-04 Akim Demaille <akim@epita.fr>
18326
18327 * src/output.c (output_skeleton): tempdir is const.
18328 bytes_read is unused.
18329
345cea78
AD
183302002-03-04 Akim Demaille <akim@epita.fr>
18331
18332 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18333 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18334 Update.
18335 From Michael Hayes.
18336
564801f7
AD
183372002-03-04 Akim Demaille <akim@epita.fr>
18338
18339 * src/closure.c (closure): `r' is unused.
18340
e5352bc7
AD
183412002-03-04 Akim Demaille <akim@epita.fr>
18342
18343 * tests/sets.at (Broken Closure): Add the ending `;'.
18344 * src/reader.at (readgram): Complain if a rule is not ended with a
18345 semi-colon.
18346
914feea9
AD
183472002-03-04 Akim Demaille <akim@epita.fr>
18348
18349 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18350 (count_sr_conflicts): Use bitset_count.
18351 * src/reduce.c (inaccessable_symbols): Ditto.
18352 (bits_size): Remove.
18353 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18354
f0250de6
AD
183552002-03-04 Akim Demaille <akim@epita.fr>
18356
18357 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18358 * src/reduce.c: Remove the `bitset_zero's following the
18359 `bitset_create's, as now it is performed by the latter.
18360
ef017502
AD
183612002-03-04 Akim Demaille <akim@epita.fr>
18362
18363 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18364 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18365 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18366 latest sources from Michael.
18367
76514394
AD
183682002-03-04 Akim Demaille <akim@epita.fr>
18369
18370 * src/output.c (output): Don't free the grammar.
18371 * src/reader.c (grammar_free): New.
18372 * src/main.c (main): Call it and don't free symtab here.
18373
55024580
AD
183742002-03-04 Akim Demaille <akim@epita.fr>
18375
18376 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18377 before returning.
18378 Reported by Benoit Perrot.
18379
f9abaa2c
AD
183802002-03-04 Akim Demaille <akim@epita.fr>
18381
18382 Use bitset operations when possible, not loops over bits.
18383
18384 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18385 bitset_or.
18386 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18387 * src/reduce.c (useless_nonterminals): Formatting changes.
18388 * src/warshall.c (TC): Use bitset_or.
18389
0e721e75
AD
183902002-03-04 Akim Demaille <akim@epita.fr>
18391
18392 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18393 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18394 Ditto.
18395
0fb1ffb1
AD
183962002-03-04 Akim Demaille <akim@epita.fr>
18397
18398 * src/lalr.c (F): Now a bitset*.
18399 Adjust all dependencies.
18400
b86796bf
AD
184012002-03-04 Akim Demaille <akim@epita.fr>
18402
18403 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18404 Adjust all dependencies.
18405
602bbf31
AD
184062002-03-04 Akim Demaille <akim@epita.fr>
18407
18408 * src/L0.c, src/LR0.h (nstates): Be size_t.
18409 Adjust comparisons (signed vs unsigned).
18410 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18411 bitset*.
18412 Adjust all dependencies.
18413
d8a0245c
AD
184142002-03-04 Akim Demaille <akim@epita.fr>
18415
18416 * src/closure.c (firsts): Now, also a bitset.
18417 Adjust all dependencies.
18418 (varsetsize): Remove, now unused.
18419 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18420
34ba9743
AD
184212002-03-04 Akim Demaille <akim@epita.fr>
18422
18423 * src/print.c: Convert to use bitset.h, not hand coded iterations
18424 over ints.
18425
ed86e78c
AD
184262002-03-04 Akim Demaille <akim@epita.fr>
18427
18428 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18429
dfdb1797
AD
184302002-03-04 Akim Demaille <akim@epita.fr>
18431
18432 * src/closure.c (ruleset): Be a bitset.
18433 (rulesetsize): Remove.
18434
7086e707
AD
184352002-03-04 Akim Demaille <akim@epita.fr>
18436
18437 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18438 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18439 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18440 * src/closure.c (fderives): Be an array of bitsets.
18441
98254360
RA
184422002-02-28 Robert Anisko <robert@lrde.epita.fr>
18443
18444 * data/bison.c++: Merge the two generated headers. Insert a copyright
18445 notice in each output file.
18446
a75c057f
AD
184472002-02-28 Akim Demaille <akim@epita.fr>
18448
18449 * data/bison.c++: Copy the prologue of bison.simple to fetch
18450 useful M4 definitions, such as b4_header_guard.
18451
06b00abc
AD
184522002-02-25 Akim Demaille <akim@epita.fr>
18453
18454 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
18455 translator friendly scheme for the bgr
18456 copyright notice.
06b00abc 18457
70e7d534
AD
184582002-02-25 Akim Demaille <akim@epita.fr>
18459
18460 * src/output.c (header_output): Remove, now handled completely via
18461 M4.
18462
abe017f6
AD
184632002-02-25 Akim Demaille <akim@epita.fr>
18464
18465 * m4/m4.m4: New, from CVS Autoconf.
18466 * configure.in: Invoke it.
18467 * src/output.c (output_skeleton): Use its result instead of the
18468 hard coded name.
18469
381fb12e
AD
184702002-02-25 Akim Demaille <akim@epita.fr>
18471
18472 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18473 Fileutils 4.1.5.
18474 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18475 * src/output.c (output_skeleton): Use mkstemp to create a real
18476 temporary file.
18477 Move the filling of `skeleton' and its muscle to...
18478 (prepare): here.
18479 (output): Move the definition of the prologue muscle to...
18480 (prepare): here.
18481 * src/system.h (DEFAULT_TMPDIR): New.
18482
6f38107f
PE
184832002-02-14 Paul Eggert <eggert@twinsun.com>
18484
18485 Remove the support for C++ namespace cleanliness; it was
18486 causing more problems than it was curing, since it didn't work
18487 properly on some nonstandard C++ compilers. This can wait
18488 for a proper C++ parser.
18489
18490 * NEWS: Document this.
18491 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18492 of C++, as it's treated like C now.
18493 * src/bison.simple (YYSTD): Remove.
18494 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18495 Treat C++ just like Standard C instead of trying to support
18496 namespace cleanliness.
18497
80cce3da
AD
184982002-02-14 Akim Demaille <akim@epita.fr>
18499
18500 * tests/regression.at (else): Adjust to Andreas' change.
18501
842e8679
AD
185022002-02-14 Akim Demaille <akim@epita.fr>
18503
18504 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18505
4bda3f10
AD
185062002-02-13 Andreas Schwab <schwab@suse.de>
18507
18508 * src/output.c (output_rule_data): Don't output NULL, it might
18509 not be defined yet.
18510
4162fa07 185112002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 18512
4162fa07
RA
18513 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18514 (Copyright notice): Update.
b418ecd8 18515
bd16a5dc
AD
185162002-02-11 Akim Demaille <akim@epita.fr>
18517
18518 * tests/regression.at (%nonassoc and eof): Don't include
18519 nonportable headers.
18520
8d69a1a3
RA
185212002-02-08 Robert Anisko <robert@lrde.epita.fr>
18522
18523 * data/bison.c++: Correct error recovery. Make the user able to
18524 initialize the starting location.
18525
9b2d0677
AD
185262002-02-07 Akim Demaille <akim@epita.fr>
18527
18528 * tests/input.at: New.
18529
69e2658b
RA
185302002-02-07 Robert Anisko <robert@lrde.epita.fr>
18531
18532 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 18533 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
18534 directives around tables only needed for debugging.
18535
4aacc3a7
RA
185362002-02-07 Robert Anisko <robert@lrde.epita.fr>
18537
18538 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18539 C++ parsers.
18540 (yy::b4_name::parse): Use print_.
18541
762a801e
RA
185422002-02-07 Robert Anisko <robert@lrde.epita.fr>
18543
18544 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18545
4bb2bc3f
RA
185462002-02-07 Robert Anisko <robert@lrde.epita.fr>
18547
18548 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18549 C++ parsers.
18550 (yy::b4_name::parse): Build verbose error messages, and use error_.
18551
6b45a3ca
RA
185522002-02-06 Robert Anisko <robert@lrde.epita.fr>
18553
18554 * data/bison.c++: Fix m4 quoting in comments.
18555
50997c6e
RA
185562002-02-06 Robert Anisko <robert@lrde.epita.fr>
18557
18558 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18559 not expanded by m4.
18560
3f3eed27
AD
185612002-02-05 Akim Demaille <akim@epita.fr>
18562
18563 * data/bison.c++: Adjust to the M4 back end.
18564 More is certainly needed.
18565
be2a1a68
AD
185662002-02-05 Akim Demaille <akim@epita.fr>
18567
18568 Give a try to M4 as a back end.
18569
18570 * lib/readpipe.c: New, from wdiff.
18571 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18572 BISON_HAIRY.
18573 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18574 specific values. Now it is m4 that performs the lookup.
18575 * src/parse-skel.y: Remove.
18576 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18577 * src/output.c (actions_output, guards_output)
18578 (token_definitions_output): No longer keeps track of the output
18579 line number, hence remove the second argument.
18580 (guards_output): Check against the guard member of a rule, not the
18581 action member.
18582 Adjust callers.
18583 (output_skeleton): Don't look for the skeleton location, let m4 do
18584 that.
18585 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18586 file will be used.
18587 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18588 (prepare): Given that for the time being changesyntax is not
18589 usable in M4, rename the muscles using `-' to `_'.
18590 Define `defines_flag', `output_parser_name' and `output_header_name'.
18591 * src/output.h (actions_output, guards_output)
18592 (token_definitions_output): Adjust prototypes.
18593 * src/scan-skel.l: Instead of scanning the skeletons, it now
18594 processes the output of m4: `__oline__' and `#output'.
18595 * data/bison.simple: Adjust to be used by M4(sugar).
18596 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18597 to date.
18598 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18599 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18600 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18601 shamelessly stolen from CVS Autoconf.
18602
beda758b
AD
186032002-02-05 Akim Demaille <akim@epita.fr>
18604
18605 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18606 * configure.in: Check for the declarations of free and malloc.
18607 * src/muscle_tab.c: Adjust.
18608
5ece6d43
AD
186092002-02-05 Akim Demaille <akim@epita.fr>
18610
18611 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18612 which have no values.
18613
5bb18f9a
AD
186142002-02-05 Akim Demaille <akim@epita.fr>
18615
18616 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18617 * data/: here.
18618
894dd62e
PE
186192002-01-29 Paul Eggert <eggert@twinsun.com>
18620
18621 * src/bison.simple (YYSIZE_T): Do not define merely because
18622 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18623 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18624
82841af7
AD
186252002-01-27 Akim Demaille <akim@epita.fr>
18626
18627 Fix `%nonassoc and eof'.
18628
18629 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18630 which were not properly copied! Replace
18631 memcpy (res->errs, src->errs, src->nerrs);
18632 with
18633 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18634 !!!
18635 * tests/regression.at (%nonassoc and eof): Adjust to newest
18636 Autotest: `.' is not in the PATH.
18637
318b76e9
AD
186382002-01-27 Akim Demaille <akim@epita.fr>
18639
18640 * tests/sets.at (AT_EXTRACT_SETS): New.
18641 (Nullable): Use it.
18642 (Firsts): New.
18643
30d2f3d5
AD
186442002-01-26 Akim Demaille <akim@epita.fr>
18645
18646 * tests/actions.at, tests/calc.at, tests/headers.at,
18647 * tests/torture.at: Adjust to the newest Autotest which no longer
18648 forces `.' in the PATH.
18649
30f8c395
AD
186502002-01-25 Akim Demaille <akim@epita.fr>
18651
18652 * tests/regression.at (%nonassoc and eof): New.
18653 Suggested by Robert Anisko.
18654
29ae55f1
AD
186552002-01-24 Akim Demaille <akim@epita.fr>
18656
18657 Bison dumps core when trying to complain about broken input files.
18658 Reported by Cris van Pelt.
18659
18660 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18661 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18662 into...
18663 (Invalid inputs): Strengthen: exercise parse_percent_token.
18664
2b548aa6
RA
186652002-01-24 Robert Anisko <robert.anisko@epita.fr>
18666
18667 * src/Makefile.am: Add bison.c++.
18668 * src/bison.c++: New skeleton.
18669
bb0146c2
AD
186702002-01-21 Paolo Bonzini <bonzini@gnu.org>
18671
18672 * po/it.po: New.
18673
bec30531
AD
186742002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18675
18676 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18677
fc6edc45
MA
186782002-01-20 Marc Autret <marc@gnu.org>
18679
18680 * src/files.c (compute_output_file_names): Fix
18681
5e5d5415
MA
186822002-01-20 Marc Autret <marc@gnu.org>
18683
18684 * tests/output.at: New test.
18685 * src/files.c (compute_base_names): Don't map extensions when
18686 the YACC flag is set, use defaults.
18687 Reported by Evgeny Stambulchik.
18688
44ea3fbd
MA
186892002-01-20 Marc Autret <marc@gnu.org>
18690
ba0fe3c7
PE
18691 * src/system.h: Need to define __attribute__ away for non-GCC
18692 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
18693 Suggested by Albert Chin-A-Young.
18694
338963d1
TVH
186952002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18696
18697 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18698 canonical definition.
18699 * src/system.h: Use the canonical definition for PARAMS (avoids
18700 a conflict with the macro from lib/hash.h).
18701
c57b2479
AD
187022002-01-11 Akim Demaille <akim@epita.fr>
18703
18704 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 18705 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 18706
b85810ae
AD
187072002-01-09 Akim Demaille <akim@epita.fr>
18708
18709 * src/files.c, src/files.h (output_infix): New.
18710 (tab_extension): Remove.
18711 (compute_base_names): Compute the former, drop the latter.
18712 * src/output.c (prepare): Insert the muscles `output-infix', and
18713 `output-suffix'.
18714 * src/parse-skel.y (string, string.1): New.
18715 (section.header): Use it.
18716 (section.yacc): Remove.
18717 (prefix): Remove too.
18718 * src/scan-skel.l: Adjust.
18719 * src/bison.simple, src/bison.hairy: Adjust.
18720
cae60122
AD
187212002-01-09 Akim Demaille <akim@epita.fr>
18722
18723 * configure.in (WERROR_CFLAGS): Compute it.
18724 * src/Makefile.am (CFLAGS): Pass it.
18725 * tests/atlocal.in (CFLAGS): Idem.
18726 * src/files.c: Fix a few warnings.
18727 (get_extension_index): Remove, unused.
18728
ae404801
AD
187292002-01-08 Akim Demaille <akim@epita.fr>
18730
18731 * src/getargs.c (AS_FILE_NAME): New.
18732 (getargs): Use it to convert DOSish file names.
18733 * src/files.c (base_name): Rename as full_base_name to avoid
18734 clashes with `base_name ()'.
18735 (filename_split): New.
18736 (compute_base_names): N-th rewrite, using filename_split.
18737
22312b71
AD
187382002-01-08 Akim Demaille <akim@epita.fr>
18739
18740 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18741 New, stolen from the Fileutils 4.1.
18742 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18743 * configure.in: Check for the presence of memrchr, and of its
18744 prototype.
18745
a67cef01
TVH
187462002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18747
18748 * lib/hash.h (__P): Added definition for this macro.
18749 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18750 BUILT_SOURCES, to ensure they are generated first.
18751 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18752 %error-verbose to allow bootstrapping with bison 1.30x.
18753
2b25d624
AD
187542002-01-06 Akim Demaille <akim@epita.fr>
18755
18756 * src/reader.c (parse_braces): Don't fetch the next char, the
18757 convention is to fetch on entry.
18758 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18759 'switch' without a following semicolon.
18760 * tests/regression.at (braces parsing): New.
18761
3460813b
AD
187622002-01-06 Akim Demaille <akim@epita.fr>
18763
18764 Bison is dead wrong in its RR conflict reports.
18765
18766 * tests/torture.at (GNU Cim Grammar): New.
18767 * src/conflicts.c (count_rr_conflicts): Fix.
18768
73784c64
AD
187692002-01-06 Akim Demaille <akim@epita.fr>
18770
18771 Creating package.m4 from configure.ac causes too many problems.
18772
18773 * tests/Makefile.am (package.m4): Create it by hand,
18774 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18775
25d81090
AD
187762002-01-06 Akim Demaille <akim@epita.fr>
18777
18778 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18779 skeleton.h.
18780
a9b8959e
PE
187812002-01-04 Paul Eggert <eggert@twinsun.com>
18782
18783 * doc/bison.texinfo (Debugging):
18784 Remove YYSTDERR; it's no longer defined or used.
18785 Also, s/cstdio.h/cstdio/.
18786
25d81090
AD
187872002-01-03 Akim Demaille <akim@epita.fr>
18788
18789 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18790
1109455c
AD
187912002-01-03 Akim Demaille <akim@epita.fr>
18792
18793 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18794 tracing code to --trace, wait for a better --trace option, with
18795 args.
18796
7ea5e977
AD
187972002-01-03 Akim Demaille <akim@epita.fr>
18798
18799 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18800 The ISO C++ standard is extremely clear about it: stderr is
18801 considered a macro, not a regular symbol (see table 94 `Header
18802 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18803 Therefore std:: does not apply to it. It still does with fprintf.
18804 Also, s/cstdio.h/cstdio/.
18805
fab5b110
AD
188062002-01-03 Akim Demaille <akim@epita.fr>
18807
18808 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18809 for non system headers.
18810
aed7fd9b
AD
188112002-01-02 Akim Demaille <akim@epita.fr>
18812
18813 Equip the skeleton chain with location tracking, runtime trace,
18814 pure parser and scanner.
18815
18816 * src/parse-skel.y: Request a pure parser, locations, and prefix
18817 renaming.
18818 (%union): Having several members with the same type does not help
18819 type mismatches, simplify.
18820 (YYPRINT, yyprint): New.
18821 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18822 (skel_error): this.
18823 Handle locations.
18824 * src/scan-skel.l: Adjust to these changes.
18825 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18826 (LOCATION_PRINT, skel_control_t): New.
18827
24fad99e
AD
188282001-12-30 Akim Demaille <akim@epita.fr>
18829
18830 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18831 replace `gb' with BLANKS.
18832 * src/scan-skel.l: Adjust.
18833
a4b36db4
AD
188342001-12-30 Akim Demaille <akim@epita.fr>
18835
18836 * src/system.h: We don't need nor want bcopy.
18837 Throw away MS-DOS crap: we don't need getpid.
18838 * configure.in: We don't need strndup. It was even causing
18839 problems: because Flex includes the headers *before* us,
18840 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18841 not visible.
18842 * lib/xstrndup.c: New.
18843 * src/scan-skel.l: Use it.
18844 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18845 * src/parse-skel.y: Use %directives instead of #defines.
18846
1239777d
AD
188472001-12-30 Akim Demaille <akim@epita.fr>
18848
18849 * src/skeleton.h: New.
18850 * src/output.c (output_parser, output_master_parser): Remove, dead
18851 code.
18852 * src/output.h (get_lines_number, actions_output, guards_output)
18853 (token_definitions_output): Prototype them.
18854 * src/parse-skel.y: Add the license notice.
18855 Include output.h and skeleton.h.
18856 (process_skeleton): Returns void, and takes a single parameter.
18857 * src/scan-skel.l: Add the license notice.
18858 Include skeleton.h.
18859 Don't use %option yylineno: it seems that then Flex imagines
18860 REJECT has been used, and therefore it won't reallocate its
18861 buffers (which makes no other sense to me than a bug). It results
18862 in warnings for `unused: yy_flex_realloc'.
18863
9b3add5b
RA
188642001-12-30 Robert Anisko <robert.anisko@epita.fr>
18865
18866 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18867 (MUSCLE_INSERT_PREFIX): ...to there.
18868 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18869 (MUSCLE_INSERT_PREFIX): Move from here...
18870
18871 * src/bison.hairy: Add a section directive. Put braces around muscle
18872 names. This parser skeleton is still broken, but Bison should not
18873 choke on a bad muscle 'syntax'.
18874 * src/bison.simple: Add a section directive. Put braces around muscle
18875 names.
18876
18877 * src/files.h (strsuffix, stringappend): Add declarations.
18878 (tab_extension): Add declaration.
18879 (short_base_name): Add declaration.
18880
18881 * src/files.c (strsuffix, stringappend): No longer static. These
18882 functions are used in the skeleton parser.
18883 (tab_extension): New.
18884 (compute_base_names): Use the computations done in this function
fab5b110 18885 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
18886 names.
18887 (short_base_name): No longer static.
18888
18889 * src/output.c (output_skeleton): New.
18890 (output): Disable call to output_master_parser, and give a try to
18891 a new skeleton handling system.
18892 (guards_output, actions_output): No longer static.
18893 (token_definitions_output, get_lines_number): No longer static.
18894
18895 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18896
fab5b110 18897 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
18898 parse-skel.y.
18899
18900 * src/parse-skel.y: New file.
18901 * src/scan-skel.l: New file.
18902
b5b61c61
AD
189032001-12-29 Akim Demaille <akim@epita.fr>
18904
18905 %name-prefix is broken.
18906
18907 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18908 Adjust all dependencies.
18909 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18910 %name-prefix.
18911
18912 Renaming yylval but not yylloc is not consistent. Now we do.
18913
18914 * src/bison.simple: Prefix yylloc if used.
18915 * doc/bison.texinfo (Decl Summary): Document that.
18916
8c9a50be
AD
189172001-12-29 Akim Demaille <akim@epita.fr>
18918
18919 * doc/bison.texinfo: Promote `%long-directive' over
18920 `%long_directive'.
18921 Remove all references to fixed-output-files, yacc is enough.
18922
d99361e6
AD
189232001-12-29 Akim Demaille <akim@epita.fr>
18924
18925 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18926 user prologue. These are defaults.
18927 * tests/actions.at (Mid-rule actions): Make sure the user can
18928 define YYDEBUG and YYERROR_VERBOSE.
18929
b9cecb91
AD
189302001-12-29 Akim Demaille <akim@epita.fr>
18931
18932 * src/output.c (header_output): Don't forget to export YYLTYPE and
18933 yylloc.
18934 * tests/headers.at (export YYLTYPE): New, make sure it does.
18935 * tests/regression.at (%union and --defines, Invalid CPP headers):
18936 Move to...
18937 * tests/headers.at: here.
18938
aea13e97
AD
189392001-12-29 Akim Demaille <akim@epita.fr>
18940
18941 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18942
931394cb
AD
189432001-12-29 Akim Demaille <akim@epita.fr>
18944
18945 * tests/actions.at (Mid-rule actions): Output on a single line
18946 instead of several.
18947
704a47c4
AD
189482001-12-29 Akim Demaille <akim@epita.fr>
18949
18950 * doc/bison.texinfo: Formatting changes.
18951
091e20bb
AD
189522001-12-29 Akim Demaille <akim@epita.fr>
18953
18954 Don't store the token defs in a muscle, just be ready to output it
18955 on command. Now possible via `symbols'. Fixes a memory leak.
18956
18957 * src/output.c (token_definitions_output): New.
18958 (output_parser, header_output): Use it.
18959 * src/reader.c (symbols_save): Remove.
18960
cce71710
AD
189612001-12-29 Akim Demaille <akim@epita.fr>
18962
18963 * src/bison.simple: Do not provide a default for YYSTYPE and
18964 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18965 default.
18966
82c035a8
AD
189672001-12-29 Akim Demaille <akim@epita.fr>
18968
18969 Mid-rule actions are simply... ignored!
18970
18971 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18972 the empty-rule associated to the dummy symbol, not to the host
18973 rule.
18974 * tests/actions.at (Mid-rule actions): New.
18975
8419d367
AD
189762001-12-29 Akim Demaille <akim@epita.fr>
18977
18978 Memory leak.
18979
18980 * src/reader.c (reader): Free grammar.
18981
375d5806
AD
189822001-12-29 Akim Demaille <akim@epita.fr>
18983
18984 Memory leak.
18985
18986 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18987 since it allocates it for each state, although only one is needed.
18988 (allocate_storage): Do it here.
18989
f51cb8ff
AD
189902001-12-29 Akim Demaille <akim@epita.fr>
18991
18992 * src/options.h, src/options.c (create_long_option_table): Rename
18993 as...
18994 (long_option_table_new): this, with a clearer prototype.
18995 (percent_table): Remove, unused,
18996 * src/getargs.c (getargs): Adjust.
18997
29e88316
AD
189982001-12-29 Akim Demaille <akim@epita.fr>
18999
19000 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19001 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19002 as states.
19003
b9f71f19
AD
190042001-12-29 Akim Demaille <akim@epita.fr>
19005
19006 * src/lalr.c (build_relations): Rename `states' as `states1'.
19007 Sorry, I don't understand exactly what it is, no better name...
19008
1a2b5d37
AD
190092001-12-29 Akim Demaille <akim@epita.fr>
19010
19011 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19012 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19013 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19014 as rules.
19015
1cca533e
AD
190162001-12-29 Akim Demaille <akim@epita.fr>
19017
19018 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19019 ago.
19020
c03ae966
AD
190212001-12-29 Akim Demaille <akim@epita.fr>
19022
19023 * src/reader.c, src/reader.h (user_toknums): Remove.
19024 Adjust all users to use symbols[i]->user_token_number.
19025
5a670b1e
AD
190262001-12-29 Akim Demaille <akim@epita.fr>
19027
19028 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19029 Adjust all users to use symbols[i]->prec or ->assoc.
19030
ad949da9
AD
190312001-12-29 Akim Demaille <akim@epita.fr>
19032
19033 * src/reader.c, src/reader.h (tags): Remove.
19034 Adjust all users to use symbols[i]->tag.
19035
0e78e603
AD
190362001-12-29 Akim Demaille <akim@epita.fr>
19037
19038 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19039 and rule_table.
19040 * src/reader.c (packsymbols): Fill this table.
19041 Drop sprec.
19042 * src/conflicts.c (resolve_sr_conflict): Adjust.
19043 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19044 single table.
19045 Use symbols[i]->tag instead of tags[i].
19046
213e640e
AD
190472001-12-29 Akim Demaille <akim@epita.fr>
19048
19049 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19050 In addition, put a comment in there, to replace...
19051 * tests/regression.at (%union and C comments): Remove.
19052
e7b8bef1
AD
190532001-12-29 Akim Demaille <akim@epita.fr>
19054
19055 * tests/regression.at (Web2c Actions): Blindly move the actual
19056 output as expected output. The contents *seem* right to me, but I
19057 can't pretend reading perfectly parser tables... Nonetheless, all
19058 the other tests pass correctly, the table look OK, even though the
19059 presence of `$axiom' is to be noted: AFAICS it is useless (but
19060 harmless).
19061
b68e7744
AD
190622001-12-29 Akim Demaille <akim@epita.fr>
19063
19064 * src/reader.c (readgram): Don't add the rule 0 if there were no
19065 rules read. In other words, add it _after_ having performed
19066 grammar sanity checks.
19067 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19068
78d5bae9
AD
190692001-12-29 Akim Demaille <akim@epita.fr>
19070
19071 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19072 visible, and some states have now a different number.
19073
ff442794
AD
190742001-12-29 Akim Demaille <akim@epita.fr>
19075
19076 * src/reader.c (readgram): Bind the initial rule's lineno to that
19077 of the first rule.
19078 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19079 (Solved SR Conflicts): Adjust rule 0's line number.
19080
610ab194
AD
190812001-12-29 Akim Demaille <akim@epita.fr>
19082
19083 Fix the `GAWK Grammar' failure.
19084
19085 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19086 the reductions of the first state which was mistakenly confused
19087 with the final state because precisely final_state was initialized
19088 to 0.
19089 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19090 now noticed by Bison.
19091 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19092 have a reduction on $default.
19093
29d29c8f
AD
190942001-12-29 Akim Demaille <akim@epita.fr>
19095
19096 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19097 rule line numbers.
19098 * src/closure.c (print_closure): Likewise.
19099 * src/derives.c (print_derives): Likewise.
19100 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19101 now.
19102
7c6b64d0
AD
191032001-12-29 Akim Demaille <akim@epita.fr>
19104
19105 * src/lalr.c (lookaheads_print): New.
19106 (lalr): Call it when --trace-flag.
19107 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19108 are dumped.
19109
3d4daee3
AD
191102001-12-29 Akim Demaille <akim@epita.fr>
19111
19112 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19113 when walking through ritem, even via rule->rhs.
19114 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19115 (useful_production, useless_nonterminals): Likewise.
19116 (reduce_grammar_tables): Likewise, plus update nritems.
19117 * src/nullable.c (set_nullable): Likewise.
19118 * src/lalr.c (build_relations): Likewise.
19119 * tests/sets.at (Nullable): Adjust.
19120 Fortunately, now, the $axiom is no longer nullable.
19121
9e7f6bbd
AD
191222001-12-29 Akim Demaille <akim@epita.fr>
19123
19124 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19125 the 0-sentinel.
19126 * src/gram.c (ritem_longest_rhs): Likewise.
19127 * src/reduce.c (nonterminals_reduce): Likewise.
19128 * src/print_graph.c (print_graph): Likewise.
19129 * src/output.c (output_rule_data): Likewise.
19130 * src/nullable.c (set_nullable): Likewise.
19131
255ef638
AD
191322001-12-29 Akim Demaille <akim@epita.fr>
19133
19134 * src/output.c: Comment changes.
19135
0d8a7363
AD
191362001-12-27 Paul Eggert <eggert@twinsun.com>
19137
19138 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19139 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19140 Sparc, as they were causing more porting problems than the
19141 (minor) performance improvement was worth.
19142
19143 Also, catch up with 1.31's YYSTD.
19144
3db472b9
AD
191452001-12-27 Akim Demaille <akim@epita.fr>
19146
19147 * src/output.c (output_gram): Rely on nritems, not the
19148 0-sentinel. See below.
19149 Use -1 as separator, not 0.
19150 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19151 Rely on -1 as separator in yyrhs, instead of 0.
19152 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19153 twice `Now at end of input', therefore there are two lines less to
19154 expect.
19155
b365aa05
AD
191562001-12-27 Akim Demaille <akim@epita.fr>
19157
19158 * tests/regression.at (Unresolved SR Conflicts):
19159 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19160 below.
19161
30171f79
AD
191622001-12-27 Akim Demaille <akim@epita.fr>
19163
19164 * src/LR0.c (new_state): Recognize the final state by the fact it
19165 is reached by eoftoken.
19166 (insert_start_shifting_state, insert_eof_shifting_state)
19167 (insert_accepting_state, augment_automaton): Remove, since now
19168 these states are automatically computed from the initial state.
19169 (generate_states): Adjust.
19170 * src/print.c: When reporting a rule number to the user, substract
19171 1, so that the axiom rule is rule 0, and the first user rule is 1.
19172 * src/reduce.c: Likewise.
19173 * src/print_graph.c (print_core): For the time being, just as for
19174 the report, depend upon --trace-flags to dump the full set of
19175 items.
19176 * src/reader.c (readgram): Once the grammar read, insert the rule
19177 0: `$axiom: START-SYMBOL $'.
19178 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19179 number of the states has changed (the final state is no longer
19180 necessarily the last), catch up.
19181
75142d45
AD
191822001-12-27 Akim Demaille <akim@epita.fr>
19183
19184 Try to make the use of the eoftoken valid. Given that its value
19185 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19186 is used instead of > 0 where appropriate, (ii), depend upon nritems
19187 instead of the 0-sentinel.
19188
19189 * src/gram.h, src/gram.c (nritems): New.
19190 Expected to be duplication of nitems, but for the time being...
19191 * src/reader.c (packgram): Assert nritems and nitems are equal.
19192 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19193 * src/closure.c (print_closure, print_fderives): Likewise.
19194 * src/gram.c (ritem_print): Likewise.
19195 * src/print.c (print_core, print_grammar): Likewise.
19196 * src/print_graph.c: Likewise.
19197
b7c49edf
AD
191982001-12-27 Akim Demaille <akim@epita.fr>
19199
19200 * src/main.c (main): If there are complains after grammar
19201 reductions, then output the report anyway if requested, then die.
19202 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19203 * src/reader.c (eoftoken): New.
19204 (parse_token_decl): If the token being defined has value `0', it
19205 is the eoftoken.
19206 (packsymbols): No longer hack `tags' to insert `$' by hand.
19207 Be sure to preserve the value of the eoftoken.
19208 (reader): Make sure eoftoken is defined.
19209 Initialize nsyms to 0: now eoftoken is created just like the others.
19210 * src/print.c (print_grammar): Don't special case the eof token.
19211 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19212 lie anyway, albeit pleasant.
19213 * tests/calc.at: Exercise error messages with eoftoken.
19214 Change the grammar so that empty input is invalid.
19215 Adjust expectations.
19216 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19217
ec2da99f
AD
192182001-12-27 Akim Demaille <akim@epita.fr>
19219
19220 * configure.in: Check the protos of strchr ans strspn.
19221 Replace strchr if needed.
19222 * src/system.h: Provide the protos of strchr, strspn and memchr if
19223 missing.
19224 * lib/strchr.c: New.
19225 * src/reader.c (symbols_save): Use strchr.
19226
8adfa272
AD
192272001-12-27 Akim Demaille <akim@epita.fr>
19228
19229 * src/print.c, src/print_graph.c (escape): New.
19230 Use it to quote the TAGS outputs.
19231 * src/print_graph.c (print_state): Now errors are in red, and
19232 reductions in green.
19233 Prefer high to wide: output the state number on a line of its own.
19234
80dac38c
AD
192352001-12-27 Akim Demaille <akim@epita.fr>
19236
19237 * src/state.h, src/state.c (reductions_new): New.
19238 * src/LR0.c (set_state_table): Let all the states have a
19239 `reductions', even if reduced to 0.
19240 (save_reductions): Adjust.
19241 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19242 * src/print.c (print_reductions, print_actions): Adjust.
19243 * src/output.c (action_row): Adjust.
19244
2cec70b9
AD
192452001-12-27 Akim Demaille <akim@epita.fr>
19246
19247 * src/state.h, src/state.c (errs_new, errs_dup): New.
19248 * src/LR0.c (set_state_table): Let all the states have an errs,
19249 even if reduced to 0.
19250 * src/print.c (print_errs, print_reductions): Adjust.
19251 * src/output.c (output_actions, action_row): Adjust.
19252 * src/conflicts.c (resolve_sr_conflict): Adjust.
19253
13ca549a
AD
192542001-12-27 Akim Demaille <akim@epita.fr>
19255
19256 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19257
5092aba5
AD
192582001-12-27 Akim Demaille <akim@epita.fr>
19259
19260 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19261 * src/print.c: here.
19262 (lookaheadset, shiftset): New, used as additional storage by
19263 print_reductions.
19264 (print_results): Adjust.
19265 (print_shifts, print_gotos, print_errs): New, extracted from...
19266 (print_actions): here.
19267 * src/print_graph.c (print_actions): Remove dead code.
19268
11e2beca
AD
192692001-12-27 Akim Demaille <akim@epita.fr>
19270
19271 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19272 `$n' and `@n'.
19273
dac3c910
AD
192742001-12-27 Akim Demaille <akim@epita.fr>
19275
19276 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19277 (build_relations): Adjust.
19278
d0b0fefa
AD
192792001-12-27 Akim Demaille <akim@epita.fr>
19280
19281 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19282 duplication.
19283
adc8c848
AD
192842001-12-27 Akim Demaille <akim@epita.fr>
19285
19286 * src/reader.c (packgram): Catch nitems overflows.
19287
14d293ac
AD
192882001-12-27 Akim Demaille <akim@epita.fr>
19289
19290 * src/files.c, src/files.h (guard_obstack): Remove.
19291 * src/output.c (output): Adjust.
19292 * src/reader.c (parse_braces): New, factoring...
19293 (copy_action, copy_guard): these two which are renamed as...
19294 (parse_action, parse_guard): these.
19295 As a voluntary consequence, using braces around guards is now
19296 mandatory.
19297
f499b062
AD
192982001-12-27 Akim Demaille <akim@epita.fr>
19299
19300 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19301 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19302 members.
19303 (symbol_list_new): Adjust.
19304 (copy_action): action_line is the first line, not the last.
19305 (copy_guard): Just as for actions, store the `action' only, not
19306 the switch/case/break flesh.
19307 Don't parse the user action that might follow the guard, let...
19308 (readgram): do it, i.e., now, there can be an action after a
19309 guard.
19310 In other words the guard is just explicitly optional.
19311 (packgram): Adjust.
19312 * src/output.c (guards_output): New.
19313 (output_parser): Call it when needed.
19314 (output): Also free the guard and attrs obstacks.
19315 * src/files.c, src/files.h (obstack_save): Remove.
19316 (output_files): Remove.
19317 As a result, if one needs the former `.act' file, using an
19318 appropriate skeleton which requires actions and guards is now
19319 required.
19320 * src/main.c (main): Adjust.
19321 * tests/semantic.at: New.
19322 * tests/regression.at: Use `input.y' as input file name.
19323 Avoid 8+3 problems by requiring input.c when the test needs the
19324 parser.
19325
d945f5cd
AD
193262001-12-27 Akim Demaille <akim@epita.fr>
19327
19328 * src/reader.c (symbol_list_new): Be sure to initialize all the
19329 fields.
19330
d200e455
AD
193312001-12-27 Akim Demaille <akim@epita.fr>
19332
19333 All the hacks using a final pseudo state are now useless.
19334
19335 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19336 * src/lalr.c (nLA): New.
19337 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19338 instead of lookaheadsp from the pseudo state (nstate + 1).
19339
f9507c28
AD
193402001-12-27 Akim Demaille <akim@epita.fr>
19341
19342 * src/output.c (action_row, token_actions): Use a state_t instead
19343 of a integer, and nlookaheads instead of the following state's
19344 lookaheadsp.
19345
065fbd27
AD
193462001-12-27 Akim Demaille <akim@epita.fr>
19347
19348 * src/conflicts.c (log_resolution, flush_shift)
19349 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19350 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19351 (conflicts_print, print_reductions): Use a state_t instead of an
19352 integer when referring to a state.
19353 As much as possible, depend upon nlookaheads, instead of the
19354 `lookaheadsp' member of the following state (since lookaheads of
19355 successive states are successive, the difference between state n + 1
19356 and n served as the number of lookaheads for state n).
19357 * src/lalr.c (add_lookback_edge): Likewise.
19358 * src/print.c (print_core, print_actions, print_state)
19359 (print_results): Likewise.
19360 * src/print_graph.c (print_core, print_actions, print_state)
19361 (print_graph): Likewise.
19362 * src/conflicts.h: Adjust.
19363
1b177bd7
AD
193642001-12-27 Akim Demaille <akim@epita.fr>
19365
19366 * src/bison.hairy: Formatting/comment changes.
19367 ANSIfy.
19368 Remove `register' indications.
19369 Add plenty of `static'.
19370
7742ddeb
AD
193712001-12-27 Akim Demaille <akim@epita.fr>
19372
19373 * src/output.c (prepare): Drop the muscle `ntbase' which
19374 duplicates ntokens.
19375 * src/bison.simple: Formatting/comment changes.
19376 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19377 is an undocumented synonym.
19378
1fa14068
AD
193792001-12-22 Akim Demaille <akim@epita.fr>
19380
19381 * src/output.c (output_table_data): Change the prototype to use
19382 `int' for array ranges: some invocations do pass an int, not a
19383 short.
19384 Reported by Wayne Green.
19385
b9752825
AD
193862001-12-22 Akim Demaille <akim@epita.fr>
19387
19388 Some actions of web2c.y are improperly triggered.
19389 Reported by Mike Castle.
19390
19391 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19392 * tests/regression.at (Web2c): Rename as...
19393 (Web2c Report): this.
19394 (Web2c Actions): New.
19395
776209d6
AD
193962001-12-22 Akim Demaille <akim@epita.fr>
19397
19398 Reductions in web2c.y are improperly reported.
19399 Reported by Mike Castle.
19400
19401 * src/conflicts.c (print_reductions): Fix.
19402 * tests/regression.at (Web2c): New.
19403
275fc3ad
AD
194042001-12-18 Akim Demaille <akim@epita.fr>
19405
19406 Some host fail on `assert (!"foo")', which expands to
19407 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19408 Reported by Nelson Beebee.
19409
19410 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19411 `#define it_succeeded 0' and `assert (it_succeeded)'.
19412
897668ee
MA
194132001-12-17 Marc Autret <autret_m@epita.fr>
19414
19415 * src/bison.simple: Don't hard code the skeleton line and filename.
19416 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19417 New line counter 'skeleton_line' (skeleton-line muscle).
19418
ab3399e0
PE
194192001-12-17 Paul Eggert <eggert@twinsun.com>
19420
19421 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19422 YYDEBUG must be defined to a nonzero value.
19423
19424 * src/bison.simple (yytname): Do not assume that the user defines
19425 YYDEBUG to a properly parenthesized expression.
19426
3877f72b
AD
194272001-12-17 Akim Demaille <akim@epita.fr>
19428
19429 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19430 nlookaheads is a new member.
19431 Adjust all users.
19432 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19433 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19434 state.
776209d6 19435
331dbc1b
AD
194362001-12-17 Akim Demaille <akim@epita.fr>
19437
19438 * src/files.h, src/files.c (open_files, close_files): Remove.
19439 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19440 let...
19441 * src/reader.c (reader): Do it.
776209d6 19442
be750e4c
AD
194432001-12-17 Akim Demaille <akim@epita.fr>
19444
19445 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 19446
709ae8c6
AD
194472001-12-17 Akim Demaille <akim@epita.fr>
19448
19449 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19450 (flush_reduce): New.
19451 (resolve_sr_conflict): Adjust.
776209d6 19452
f87685c3
AD
194532001-12-17 Akim Demaille <akim@epita.fr>
19454
19455 * src/output.c (output_obstack): Be static and rename as...
19456 (format_obstack): this, to avoid any confusion with files.c's
19457 output_obstack.
19458 * src/reader.h (muscle_obstack): Move to...
19459 * src/output.h: here, since it's defined in output.c.
19460
837491d8
AD
194612001-12-17 Akim Demaille <akim@epita.fr>
19462
19463 * src/output.c (action_row, save_column, default_goto)
19464 (sort_actions, matching_state, pack_vector): Better variable
19465 locality.
19466
796d61fb
AD
194672001-12-17 Akim Demaille <akim@epita.fr>
19468
19469 * src/output.c: Various formatting changes.
776209d6 19470
64d15509
AD
194712001-12-17 Akim Demaille <akim@epita.fr>
19472
19473 * src/files.c (output_files): Free the output_obstack.
19474 * src/main.c (main): Call print and print_graph conditionally.
19475 * src/print.c (print): Work unconditionally.
19476 * src/print_graph.c (print_graph): Work unconditionally.
19477 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19478
fbc8ecb7
MA
194792001-12-16 Marc Autret <autret_m@epita.fr>
19480
19481 * src/output.c (actions_output): Fix. When we use %no-lines,
19482 there is one less line per action.
19483
f0440388
MA
194842001-12-16 Marc Autret <autret_m@epita.fr>
19485
19486 * src/bison.simple: Remove a useless #line directive.
19487 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19488 * src/output.c (get_lines_number): New.
776209d6 19489 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
19490 output muscles.
19491 Fix line numbering.
19492 (actions_output): Computes the number of lines taken by actions.
19493 (output_master_parser): Insert new skeleton which is the name of
19494 the output parser file name.
19495
a79986b8
MA
194962001-12-15 Marc Autret <autret_m@epita.fr>
19497
19498 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19499
4ec8e00f
MA
195002001-12-15 Marc Autret <autret_m@epita.fr>
19501
19502 * src/output.c (output_gram): Keep track of the hairy one.
19503
1a4648ff
AD
195042001-12-15 Akim Demaille <akim@epita.fr>
19505
19506 Make `make distcheck' work.
19507
19508 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19509 system.h which uses libgettext.h.
19510
9c2c67e6
AD
195112001-12-15 Akim Demaille <akim@epita.fr>
19512
19513 * src/nullable.c (set_nullable): Useless rules must be skipped,
19514 otherwise, since we range over their symbols, we might look at a
19515 nonterminal which no longer ``exists'', i.e., it is not counted in
19516 `nvars', hence we overflow our arrays.
19517
93ede233
AD
195182001-12-15 Akim Demaille <akim@epita.fr>
19519
19520 The header can also be produced directly, without any obstack!
19521 Yahoo!
19522
19523 * src/files.c, src/files.h (defines_obstack): Remove.
19524 (compute_header_macro): Global.
19525 (defines_obstack_save): Remove.
19526 * src/reader.c (parse_union_decl): No longer output to
19527 defines_obstack: its content can be found in the `stype' muscle
19528 anyway.
19529 (output_token_translations): Merge into...
19530 (symbols_output): this.
19531 Rename as...
19532 (symbols_save): this.
19533 (reader): Adjust.
19534 * src/output.c (header_output): New.
19535 (output): Call it.
19536
2666f928
AD
195372001-12-15 Akim Demaille <akim@epita.fr>
19538
19539 * src/reader.c (parse_union_decl): Instead of handling two obstack
19540 simultaneously, use one to define the `stype' muscle, and use the
19541 value of the latter to fill defines_obstack.
19542 (copy_comment): Remove.
19543 (copy_comment2): Work for a single obstack.
19544 Rename as...
19545 (copy_comment): this.
19546
428046f8
AD
195472001-12-15 Akim Demaille <akim@epita.fr>
19548
19549 * src/lex.c, src/lex.h (xgetc): No longer static.
19550 * src/reader.c (parse_union_decl): Revamp.
19551
ea52d706
AD
195522001-12-15 Akim Demaille <akim@epita.fr>
19553
19554 Still making progress in separating Bison into (i) input, (ii)
19555 process, (iii) output: now we can directly output the parser file
19556 without using table_obstack at all.
19557
19558 * src/files.c, src/files.h (table_obstack): Bye bye.
19559 (parser_file_name): New.
19560 * src/files.c (compute_output_file_names): Compute it.
19561 * src/output.c (actions_output, output_parser)
19562 (output_master_parser): To a file instead of an obstack.
19563
3f96f4dc
AD
195642001-12-15 Akim Demaille <akim@epita.fr>
19565
19566 Attach actions to rules, instead of pre-outputting them to
19567 actions_obstack.
19568
19569 * src/gram.h (rule_t): action and action_line are new members.
19570 * src/reader.c (symbol_list): Likewise.
19571 (copy_action): Save the actions within the rule.
19572 (packgram): Save them in rule_table.
19573 * src/output.c (actions_output): New.
19574 (output_parser): Use it on `%%actions'.
19575 (output_rule_data): Don't free rule_table.
19576 (output): Do it.
19577 (prepare): Don't save the `action' muscle.
19578 * src/bison.simple: s/%%action/%%actions/.
19579
51576fb3
AD
195802001-12-15 Akim Demaille <akim@epita.fr>
19581
19582 * src/reader.c (copy_action): When --yacc, don't append a `;'
19583 to the user action: let it fail if lacking.
dee049eb 19584 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 19585
2648a72d
AD
195862001-12-14 Akim Demaille <akim@epita.fr>
19587
19588 * src/lex.c (literalchar): Simply return the char you decoded, non
19589 longer mess around with obstacks and int pointers.
19590 Adjust all callers.
19591
92790e5b
AD
195922001-12-14 Akim Demaille <akim@epita.fr>
19593
19594 * src/lex.c (literalchar): Don't escape the special characters,
19595 just decode them, and keep them as char (before, eol was output as
19596 the 2 char string `\n' etc.).
19597 * src/output.c (output_rule_data): Use quotearg to output the
19598 token strings.
19599
927c1557
PE
196002001-12-13 Paul Eggert <eggert@twinsun.com>
19601
19602 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19603 Do not infringe on the global user namespace when using C++.
19604 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19605 All uses of `fprintf' and `stderr' changed.
19606
19607 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19608
ed8e1f68
AD
196092001-12-13 Akim Demaille <akim@epita.fr>
19610
19611 The computation of nullable is broken: it doesn't handle empty
19612 RHS's properly.
19613
19614 * tests/torture.at (GNU AWK Grammar): New.
19615 * tests/sets.at (Nullable): New.
19616 * src/nullable.c (set_nullable): Instead of blindly looping over
19617 `ritems', loop over the rules, and then over their rhs's.
19618
19619 Work around Autotest bugs.
19620
19621 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19622 frame, because Autotest understand lines starting with a `+' as
19623 traces from the shell. Then, they are not processed properly.
19624 Admittedly an Autotest bug, but we don't have time to wait for
19625 Autotest to catch up.
19626 * tests/regression.at (Broken Closure): Adjust to the new table
19627 frames.
19628 Move to...
19629 * tests/sets.at: here.
19630
cb581495
AD
196312001-12-13 Akim Demaille <akim@epita.fr>
19632
19633 * src/closure.c (closure): Use nrules instead of playing tricks
19634 with BITS_PER_WORD.
19635
2e729273
AD
196362001-12-13 Akim Demaille <akim@epita.fr>
19637
19638 * src/print.c (print_actions): Output the handling of `$' as the
19639 traces do: shifting the token EOF. Before EOF was treated as a
19640 nonterminal.
19641 * tests/regression.at: Adjust some tests.
19642 * src/print_graph.c (print_core): Complete the set of items via
19643 closure. The next-to-final and final states are still unsatisfying,
19644 but that's to be addressed elsewhere.
19645 No longer output the rule numbers, but do output the state number.
19646 A single loop for the shifts + gotos is enough, but picked a
19647 distinct color for each.
19648 (print_graph): Initialize and finalize closure.
19649
107f7dfb
AD
196502001-12-13 Akim Demaille <akim@epita.fr>
19651
19652 * src/reader.c (readgram): Remove dead code, an strip useless
19653 braces.
19654 (get_type): Remove, unused.
19655
9b53a24f
AD
196562001-12-12 Akim Demaille <akim@epita.fr>
19657
19658 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19659 on that of lib/error.c.
19660
dbfb6dcd
AD
196612001-12-12 Akim Demaille <akim@epita.fr>
19662
19663 Some hosts don't like `/' in includes.
19664
19665 * src/system.h: Include libgettext.h without qualifying the path.
19666 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19667 $(top_srcdir).
19668
c25fb648
MA
196692001-12-11 Marc Autret <autret_m@epita.fr>
19670
19671 * src/output.c (output_parser): Remove useless muscle.
19672
710ddc4f
MA
196732001-12-11 Marc Autret <autret_m@epita.fr>
19674
19675 * src/bison.simple: Remove #line just before %%epilogue. It
19676 is now handled in ...
19677 * src/reader.c (read_additionnal_code): Add the output of a
19678 #line for the epilogue.
19679
e83d80b8
MA
196802001-12-10 Marc Autret <autret_m@epita.fr>
19681
927c1557 19682 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
19683 replace precedent remove.
19684 * src/bison.simple: Remove #line before %%prologue because
19685 %%input-line is wrong at this time.
19686
971d5158
MA
196872001-12-10 Marc Autret <autret_m@epita.fr>
19688
19689 * src/reader.c (symbols_output): Clean up.
927c1557 19690 * src/output.c (output_gram, output): Clean up.
971d5158 19691
5edafffd
AD
196922001-12-10 Akim Demaille <akim@epita.fr>
19693
19694 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19695 * src/LR0.c (set_state_table): here.
19696 * src/lalr.c (lalr): Call it.
19697
0279f8e9
AD
196982001-12-10 Akim Demaille <akim@epita.fr>
19699
19700 * src/state.h (shifts): Remove the `number' member: shifts are
19701 attached to state, hence no longer need to be labelled with a
19702 state number.
19703
190c4f5f
AD
197042001-12-10 Akim Demaille <akim@epita.fr>
19705
19706 Now that states have a complete set of members, the linked list of
19707 shifts is useless: just fill directly the state's shifts member.
19708
19709 * src/state.h (shifts): Remove the `next' member.
19710 * src/LR0.c (first_state, last_state): Remove.
19711 Adjust the callers.
19712 (augment_automaton): Don't look for the shifts that must be added
19713 a shift on EOF: it is those of the state we looked for! But now,
19714 since shifts are attached, it is no longer needed to looking
19715 merely by its id: its number.
19716
2a73b93d
AD
197172001-12-10 Akim Demaille <akim@epita.fr>
19718
19719 * src/LR0.c (augment_automaton): Better variable locality.
19720 Remove an impossible branch: if there is a state corresponding to
19721 the start symbol being shifted, then there is shift for the start
19722 symbol from the initial state.
19723
74392f6a
AD
197242001-12-10 Akim Demaille <akim@epita.fr>
19725
19726 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19727 only when appropriate: when insert_start_shifting_state' is not
19728 invoked.
19729 * tests/regression.at (Rule Line Numbers): Adjust.
19730
37c82725
AD
197312001-12-10 Akim Demaille <akim@epita.fr>
19732
19733 * src/LR0.c (augment_automaton): Now that all states have shifts,
19734 merge the two cases addition shifts to the initial state.
19735
6a164e0c
AD
197362001-12-10 Akim Demaille <akim@epita.fr>
19737
19738 * src/lalr.c (set_state_table): Move to...
19739 * src/LR0.c: here.
19740 * src/lalr.c (lalr): Don't call it...
19741 * src/LR0.c (generate_states): do it.
19742 * src/LR0.h (first_state): Remove, only the table is used.
19743
7215de24
AD
197442001-12-10 Akim Demaille <akim@epita.fr>
19745
19746 * src/LR0.h (first_shift, first_reduction): Remove.
19747 * src/lalr.c: Don't use first_shift: find shifts through the
19748 states.
19749
80e25d4d
AD
197502001-12-10 Akim Demaille <akim@epita.fr>
19751
19752 * src/LR0.c: Attach shifts to states as soon as they are
19753 computed.
19754 * src/lalr.c (set_state_table): Instead of assigning shifts to
19755 state, just assert that the mapping was properly done.
19756
0ab3728b
AD
197572001-12-10 Akim Demaille <akim@epita.fr>
19758
19759 * src/LR0.c (insert_start_shift): Rename as...
19760 (insert_start_shifting_state): this.
19761 (insert_eof_shifting_state, insert_accepting_state): New.
19762 (augment_automaton): Adjust.
19763 Better locality of the variables.
19764 When looking if the start_symbol is shifted from the initial
19765 state, using `while (... symbol != start_symbol ...)' sounds
19766 better than `while (... symbol < start_symbol ...)': If fail
19767 to see how the order between symbols could be relevant!
19768
78af9bbc
AD
197692001-12-10 Akim Demaille <akim@epita.fr>
19770
19771 * src/getargs.h: Don't declare `spec_name_prefix' and
19772 `spec_file_prefix', declared by src/files.h.
19773 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19774 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19775 * src/output.c (prepare): Adjust.
19776 * src/reader.c (symbols_output): Likewise.
19777 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19778
bdef2a41
AD
197792001-12-10 Akim Demaille <akim@epita.fr>
19780
19781 * src/muscle_tab.c (muscle_init): NULL is a better default than
19782 `"0"'.
19783
3735969c
AD
197842001-12-10 Akim Demaille <akim@epita.fr>
19785
19786 * src/reader.c (reader): Calling symbols_output once is enough.
19787
49701457
AD
197882001-12-10 Akim Demaille <akim@epita.fr>
19789
19790 Now that states have a complete set of members, the linked list of
19791 reductions is useless: just fill directly the state's reductions
19792 member.
19793
19794 * src/state.h (struct reductions): Remove member `number' and
19795 `next'.
19796 * src/LR0.c (first_reduction, last_reduction): Remove.
19797 (save_reductions): Don't link the new reductions, store them in
19798 this_state.
19799 * src/lalr.c (set_state_table): No need to attach reductions to
19800 states, it's already done.
19801 * src/output.c (output_actions): No longer free the shifts, then
19802 the reductions, then the states: free all the states and their
19803 members.
19804
0edad749
AD
198052001-12-10 Akim Demaille <akim@epita.fr>
19806
19807 * src/options.c (OPTN, DRTV, BOTH): New.
19808 (option_table): Use them.
19809
0edad749
AD
19810 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19811 the job of system.h.
19812 * src/options.c: Don't include stdio.h and xalloc.h for the same
19813 reasons.
19814
5449dd0f
AD
198152001-12-10 Akim Demaille <akim@epita.fr>
19816
19817 * src/output.c (output, prepare): Make sure the values of the
19818 muscles `action' and `prologue' are 0-terminated.
19819
a870c567
AD
198202001-12-10 Akim Demaille <akim@epita.fr>
19821
19822 Clean up GCC warnings.
19823
19824 * src/reader.c (copy_action): `buf' is not used.
19825 (parse_skel_decl): Be static.
19826 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19827 * src/options.h (create_long_option_table): Have a real prototype.
19828 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19829 (hash_delete_at): Return const void *.
19830 Adjust casts to preserve the const.
19831
80df8768
AD
198322001-12-10 Akim Demaille <akim@epita.fr>
19833
19834 * configure.in: Require 2.52g.
19835 M4 is not needed, but AUTOM4TE is.
19836 * m4/m4.m4: Remove.
19837 * tests/Makefile.am: Adjust.
19838
f693ad14
AD
198392001-12-10 Akim Demaille <akim@epita.fr>
19840
19841 One structure for states is enough, even though theoretically
19842 there are LR(0) states and LALR(1) states.
19843
19844 * src/lalr.h (state_t): Remove.
19845 (state_table): Be state_t **, not state_t *.
19846 * src/state.h (core, CORE_ALLOC): Rename as...
19847 (state_t, STATE_ALLOC): this.
19848 Add the LALR(1) members: shifts, reductions, errs.
19849 * src/LR0.c (state_table): Rename as...
19850 (state_hash): this, to avoid name clashes with the global
19851 `state_table'.
19852 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19853 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19854
74ffbcb6
AD
198552001-12-10 Akim Demaille <akim@epita.fr>
19856
19857 Bison dumps core on bash.y.
19858 Reported by Pascal Bart.
19859
19860 * src/warshall.c (bitmatrix_print): New.
19861 (TC): Use it.
ba0fe3c7 19862 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
19863 j must be the outer loop.
19864 * tests/regression.at (Broken Closure): New.
19865
07708e19
AD
198662001-12-05 Akim Demaille <akim@epita.fr>
19867
19868 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19869 its argument.
ba1ecc07 19870 Reported by Peter Hamorsky.
07708e19 19871
92b16366
AD
198722001-12-05 Akim Demaille <akim@epita.fr>
19873
19874 * src/conflicts.c (err_table): Remove.
19875 (resolve_sr_conflict): Adjust.
19876 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19877 Rename as...
19878 (state_t.reductions, state_t.shifts): this.
19879
076ab033
AD
198802001-12-05 Akim Demaille <akim@epita.fr>
19881
19882 * src/reduce.c (reduce_grammar_tables): No longer disable the
19883 removal of useless rules via CPP but via `if (0)', so that the
19884 compiler still check the code is valid.
19885 For instance, it should have noticed `rline' no longer exists: use
19886 the `line' member of rule_t.
19887 * src/gram.c (dummy, rline): Remove, unused.
19888
3843c413
AD
198892001-12-05 Akim Demaille <akim@epita.fr>
19890
19891 * src/output.c (pack_vector): Use assert, not berror.
19892 * src/main.c (berror): Remove, unused.
19893
43168960
AD
198942001-12-05 Akim Demaille <akim@epita.fr>
19895
19896 New experimental feature: if --verbose --trace output all the
19897 items of a state, not only its kernel.
19898
19899 * src/print.c (print_core): If `trace_flag', then invoke closure
19900 before outputting the items of the state (print_core is no longer
19901 a correct name them).
19902 (print_results): Invoke new_closure/free_closure if needed.
19903
b2872512
AD
199042001-12-05 Akim Demaille <akim@epita.fr>
19905
19906 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19907 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19908 (nitemset): for consistency with the rest of the project.
19909
23cbcc6c
AD
199102001-12-05 Akim Demaille <akim@epita.fr>
19911
19912 * src/closure.c (print_closure): Improve.
19913 (closure): Use it for printing input and output.
19914
03ec521c
AD
199152001-12-05 Akim Demaille <akim@epita.fr>
19916
19917 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19918 indexed by nonterminals.
19919
3a7456dd
AD
199202001-12-05 Akim Demaille <akim@epita.fr>
19921
19922 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19923 what it was!).
19924 * src/warshall.h: Remove accidental duplication of the content.
19925
1cbcf2e7
AD
199262001-12-05 Akim Demaille <akim@epita.fr>
19927
19928 * src/closure.c (set_fderives): De-obfuscate.
19929
84182270
AD
199302001-12-05 Akim Demaille <akim@epita.fr>
19931
19932 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19933
3f6f053c
AD
199342001-12-05 Akim Demaille <akim@epita.fr>
19935
19936 * src/closure.c (set_firsts): De-obfuscate.
19937
7a5350ba
AD
199382001-12-05 Akim Demaille <akim@epita.fr>
19939
19940 * src/output.c (action_row): De-obfuscate
19941 using the good o' techniques: arrays not pointers, variable
19942 locality, BITISSET, RESETBIT etc.
19943
d954473d
AD
199442001-12-05 Akim Demaille <akim@epita.fr>
19945
19946 Pessimize the code to simplify it: from now on, all the states
19947 have a valid SHIFTS, which NSHIFTS is possibly 0.
19948
19949 * src/LR0.c (shifts_new): Be global and move to..
19950 * src/state.c, src/state.h: here.
19951 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19952 * src/print_graph: Adjust.
19953
9839bbe5
AD
199542001-12-05 Akim Demaille <akim@epita.fr>
19955
19956 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19957 * src/conflicts.c: Use it.
19958 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19959 incorrectly ``simplified''.
19960
9f136c07
AD
199612001-12-05 Akim Demaille <akim@epita.fr>
19962
19963 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19964 using the good o' techniques: arrays not pointers, variable
19965 locality, BITISSET, RESETBIT etc.
19966
b608206e
AD
199672001-12-05 Akim Demaille <akim@epita.fr>
19968
19969 * src/state.h (SHIFT_SYMBOL): New.
19970 * src/conflicts.c: Use it to deobfuscate.
19971
52afa962
AD
199722001-12-05 Akim Demaille <akim@epita.fr>
19973
19974 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19975 (print_reductions): De-obfuscate using the good o' techniques:
19976 arrays not pointers, variable locality, BITISSET.
19977
e74dc321
AD
199782001-12-05 Akim Demaille <akim@epita.fr>
19979
19980 * src/conflicts.c (print_reductions): Arrays, not pointers.
19981 Use BITISSET.
19982
768fca83
AD
199832001-12-05 Akim Demaille <akim@epita.fr>
19984
19985 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19986
a17e599f
AD
199872001-12-05 Akim Demaille <akim@epita.fr>
19988
19989 * src/conflicts.c (print_reductions): Improve variable locality.
19990
a04bc341
AD
199912001-12-05 Akim Demaille <akim@epita.fr>
19992
19993 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19994
c8ea038e
AD
199952001-12-05 Akim Demaille <akim@epita.fr>
19996
19997 * src/conflicts.c (print_reductions): Improve variable locality.
19998
aa2aab3c
AD
199992001-12-05 Akim Demaille <akim@epita.fr>
20000
20001 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20002 * src/lalr.c: Use them.
20003
b178c8cc
AD
200042001-12-05 Akim Demaille <akim@epita.fr>
20005
20006 * src/LR0.c (augment_automaton): Formatting changes.
20007 Better variable locality.
20008
f67d13aa
AD
200092001-12-05 Akim Demaille <akim@epita.fr>
20010
20011 * src/lalr.c (matrix_print): New.
20012 (transpose): Use it.
20013 Use arrays instead of pointers.
20014
c2713865
AD
200152001-12-05 Akim Demaille <akim@epita.fr>
20016
20017 * src/lalr.c (maxrhs): Move to...
20018 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20019 * src/lalr.c (build_relations): Adjust.
20020
9887c18a
AD
200212001-12-05 Akim Demaille <akim@epita.fr>
20022
20023 * src/lalr.c (transpose): Free the memory allocated to the
20024 argument, as it is replaced by the results by the unique caller.
20025 (build_relations): Merely invoke transpose: it handles the memory
20026 deallocation.
20027 Improve variable locality.
20028 Avoid variables used as mere abbreviations.
20029 (compute_lookaheads): Use arrays instead of pointers.
20030
4d4f699c
AD
200312001-12-05 Akim Demaille <akim@epita.fr>
20032
20033 * src/lalr.c (initialize_F): Improve variable locality.
20034 Avoid variables used as mere abbreviations.
20035
80a69750
AD
200362001-12-05 Akim Demaille <akim@epita.fr>
20037
20038 * src/derives.c (print_derives): Display the ruleno.
20039 * src/lalr.c (initialize_F, transpose): Better variable locality
20040 to improve readability.
20041 Avoid variables used as mere abbreviations.
20042
fe961097
AD
200432001-12-05 Akim Demaille <akim@epita.fr>
20044
20045 * src/lalr.c (traverse): Use arrays instead of pointers.
20046
e3e4e814
AD
200472001-12-05 Akim Demaille <akim@epita.fr>
20048
20049 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20050 the handling of squeue.
20051 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20052
630e182b
AD
200532001-12-05 Akim Demaille <akim@epita.fr>
20054
20055 Because useless nonterminals are now kept alive (instead of being
20056 `destroyed'), we now sometimes examine them, and store information
20057 related to them. Hence we need to know their number, and adjust
20058 memory allocations.
20059
20060 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20061 static.
20062 * src/LR0.c (allocate_itemsets): The memory allocated to
20063 `symbol_count' was used for two different purpose: once to count
20064 the number of occurrences of each symbol, and later reassigned to
20065 `shift_symbol', containing the symbol that can be shifted from a
20066 given state.
20067 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20068 only, and...
20069 (new_itemsets): Allocate `shift_symbol' here.
20070 (allocate_itemsets): symbol_count includes useless nonterminals.
20071 Make room for them.
20072 (free_storage): Use `free', not `XFREE', for pointers that cannot
20073 be null.
20074
81b51460
AD
200752001-12-05 Akim Demaille <akim@epita.fr>
20076
20077 * src/nullable.c (set_nullable): Deobfuscate the handling of
20078 ritem.
20079 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20080
3067fbef
AD
200812001-12-05 Akim Demaille <akim@epita.fr>
20082
20083 * src/gram.c, src/gram.h (ritem_print): New.
20084 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20085 (This useless function was defined only to work around VMS linkers
20086 that can't handle compilation units with variables only).
20087 * src/reduce.c (dump_grammar): Use it to trace the construction of
20088 ritem.
20089
c2bea5f9
PE
200902001-12-04 Paul Eggert <eggert@twinsun.com>
20091
7d27c823
PE
20092 * src/bison.simple (union yyalloc): Change member names
20093 to be the same as the stack names.
20094 (yyparse): yyptr is now union yyalloc *, not char *.
20095 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20096 and may generate better code on some machines.
c2bea5f9
PE
20097 (yystpcpy): Use prototype if __STDC__ is defined, not just
20098 if __cplusplus is defined.
35687a9d 20099
2c8a9dfa
AD
201002001-11-30 Akim Demaille <akim@epita.fr>
20101
20102 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20103 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20104 Gettext doesn't compile cleanly, and dies with -Werror.
20105 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20106 Include WARNING_CFLAGS here.
20107 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20108 before being defined.
20109
f4e421e6
AD
201102001-11-27 Paul Eggert <eggert@twinsun.com>
20111
20112 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20113 First arg is int, not unsigned.
20114 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20115 (SIZE_MAX, UINT_MAX): New macros.
20116 (quotearg_n_options): Abort if N is negative.
20117 Avoid overflow check on hosts where size_t is 64 bits and int
20118 is 32 bits, as overflow is impossible there.
20119 Fix off-by-one typo that caused unnecessary reallocation.
20120
7093d0f5
AD
201212001-11-29 Paul Eggert <eggert@twinsun.com>
20122
20123 Name space cleanup in generated parser.
20124
20125 * doc/bison.texinfo (Bison Parser): Discuss system headers
20126 and their effect on the user name space.
20127
20128 * src/bison.simple:
20129 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20130 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20131 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20132
20133 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20134 on user names when possible.
20135
20136 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20137 Simplify test for whather <alloca.h> exists.
20138
20139 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20140
20141 (<stdio.h>): Include if YYDEBUG.
20142
20143 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20144 ! defined (yyoverflow) && ! defined (yymemcpy).
20145
20146 (yymemcpy, yyparse): Rename local variables as needed so that
20147 they all begin with 'yy'.
20148
20149 (yystrlen, yystpcpy): New functions.
20150
20151 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20152 All uses changed.
20153
20154 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20155 instead of relying on string.h functions. Use YYSTACK_ALLOC
20156 and YYSTACK_FREE instead of malloc and free.
20157
fd51e5ff
AD
201582001-11-30 Akim Demaille <akim@epita.fr>
20159
20160 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20161 before their first uses.
20162 (YYBISON, YYPURE): Move to the top of the output.
20163
7d13ff5f
AD
201642001-11-30 Akim Demaille <akim@epita.fr>
20165
20166 * tests/reduce.at (Useless Nonterminals): Fix.
20167
892a3995
AD
201682001-11-30 Akim Demaille <akim@epita.fr>
20169
20170 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20171 if body instead of `;' to pacify GCC's warnings.
20172
68f1e3ed
AD
201732001-11-30 Akim Demaille <akim@epita.fr>
20174
20175 Instead of mapping the LHS of unused rules to -1, keep the LHS
20176 valid, but flag the rules as invalid.
20177
20178 * src/gram.h (rule_t): `useful' is a new member.
20179 * src/print.c (print_grammar): Adjust.
20180 * src/derives.c (set_derives): Likewise.
20181 * src/reader.c (packgram, reduce_output): Likewise.
20182 * src/reduce.c (reduce_grammar_tables): Likewise.
20183 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20184
d2d1b42b
AD
201852001-11-30 Akim Demaille <akim@epita.fr>
20186
20187 * src/reduce.c (reduce_output): Formatting changes.
20188 * src/print.c (print_results, print_grammar): Likewise.
20189 * tests/regression.at (Rule Line Numbers)
20190 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20191
760b53a8
AD
201922001-11-30 Akim Demaille <akim@epita.fr>
20193
20194 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20195 useless nonterminals, move them at the end of the symbol arrays.
20196 (reduce_output): Adjust.
20197 * tests/reduce.at (Useless Nonterminals): Adjust.
20198
00238958
AD
201992001-11-30 Akim Demaille <akim@epita.fr>
20200
20201 * src/reduce.c: Various comment/formatting changes.
20202 (nonterminals_reduce): New, extracted from...
20203 (reduce_grammar_tables): here.
20204 (reduce_grammar): Call nonterminals_reduce.
20205
396452de
PE
202062001-11-29 Paul Eggert <eggert@twinsun.com>
20207
20208 * src/bison.simple (YYSTACK_REALLOC): Remove.
20209 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20210 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20211 New macros.
20212 (union yyalloc): New type.
20213 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20214 an arbitrary restriction on hosts where size_t is wider than int.
20215
20216 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20217 a parser stack overflow. Allocate just one block of memory for all
20218 three stacks, instead of allocating three blocks; this typically is
20219 faster and reduces fragmentation.
20220
20221 Do not limit the number of items in the stack to a value that fits
20222 in 'int', as this is an arbitrary limit on hosts with 64-bit
20223 size_t and 32-bit int.
20224
147e184c
MA
202252001-11-29 Marc Autret <autret_m@epita.fr>
20226
20227 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20228 of defining YYERROR_VERBOSE.
20229 [AT_DATA]: $4 is now out of C declarations in the prologue.
20230
426cf563
MA
202312001-11-28 Marc Autret <autret_m@epita.fr>
20232
20233 * src/reader.c (parse_dquoted_param): New.
20234 (parse_skel_decl): Use it.
20235 * src/lex.h: Add its prototype.
20236 * src/lex.c (literalchar): Become not static.
20237
c7925b99
MA
202382001-11-28 Marc Autret <autret_m@epita.fr>
20239
20240 * src/output.h: And put its extern declaration here.
20241 * src/output.c (error_verbose): Define here.
20242 (prepare): Echo name modification.
20243 * src/getargs.h: Clean its extern declaration.
20244 * src/getargs.c (error_verbose_flag): Remove.
20245 (getargs): Remove case 'e'.
20246 * src/options.c (option_table): 'error-verbose' is now seen as simple
20247 percent option.
20248 Include output.h.
20249
20250 * src/reader.c (read_declarations): Remove case tok_include.
20251 (parse_include_decl): Remove.
20252 * src/lex.h (token_t): Remove tok_include.
20253 * src/options.c (option_table): 'include' is now a simple command line
20254 option.
20255
5b5d1929
MA
202562001-11-28 Marc Autret <autret_m@epita.fr>
20257
20258 * src/bison.simple: Adjust muscle names.
20259 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20260 * src/output.c (prepare): s/_/-/ for the muscles names.
20261 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20262
8850be4b
MA
202632001-11-28 Marc Autret <autret_m@epita.fr>
20264
20265 * src/bison.simple: Fix debug.
20266 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20267
4a38e613
AD
202682001-11-28 Akim Demaille <akim@epita.fr>
20269
20270 * src/LR0.c (shifts_new): New.
20271 (save_shifts, insert_start_shift, augment_automaton): Use it.
20272
4b35e1c1
AD
202732001-11-28 Akim Demaille <akim@epita.fr>
20274
20275 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20276 keep ruleno only.
20277
d2b04478
AD
202782001-11-28 Akim Demaille <akim@epita.fr>
20279
20280 * src/closure.c (closure): Instead of looping over word in array
20281 then bits in words, loop over bits in array.
20282
2c4c30aa
AD
202832001-11-28 Akim Demaille <akim@epita.fr>
20284
20285 * src/closure.c (closure): No longer optimize the special case
20286 where all the bits of `ruleset[r]' are set to 0, to make the code
20287 clearer.
20288
576890b7
AD
202892001-11-28 Akim Demaille <akim@epita.fr>
20290
20291 * src/closure.c (closure): `r' and `c' are new variables, used to
20292 de-obfuscate accesses to RULESET and CORE.
20293
cb487d7d
AD
202942001-11-28 Akim Demaille <akim@epita.fr>
20295
20296 * src/reduce.c (reduce_print): Use ngettext.
20297 (dump_grammar): Improve the trace accuracy.
20298
6013d43f
AD
202992001-11-28 Akim Demaille <akim@epita.fr>
20300
20301 * src/reduce.c (dump_grammar): Don't translate trace messages.
20302
cb4956ee
AD
203032001-11-28 Akim Demaille <akim@epita.fr>
20304
20305 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20306 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20307 as all tags are free'ed afterwards.
20308 From Enrico Scholz.
20309
648185ab
PE
203102001-11-27 Paul Eggert <eggert@twinsun.com>
20311
20312 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20313 use alloca when we didn't want to, and vice versa.
20314
68254a03
MA
203152001-11-27 Marc Autret <autret_m@epita.fr>
20316
9113b58f
AD
20317 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20318 initialization.
68254a03
MA
20319 * src/output.c (prepare): Remove its update.
20320
04d843a2
MA
203212001-11-27 Marc Autret <autret_m@epita.fr>
20322
20323 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20324 Use %error-verbose.
20325
d2079671 203262001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
20327
20328 * src/bison.simple: Remove YYERROR_VERBOSE using.
20329 Use %%error_verbose.
20330 (yyparse): Likewise.
20331 * src/output.c (prepare): Give its final value.
20332 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20333 * src/getargs.h: Add its extern declaration.
20334 * src/getargs.c (error_verbose_flag): New int.
20335 (getargs): Update to catch new case.
20336 * src/options.c (option_table): 'error-verbose' is a new option.
20337 (shortopts): Update.
20338
e0327bc8
AD
203392001-11-27 Akim Demaille <akim@epita.fr>
20340
20341 * src/system.h: Use intl/libgettext.h.
20342 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20343
000f1a3c
AD
203442001-11-27 Akim Demaille <akim@epita.fr>
20345
20346 * tests/torture.at (Exploding the Stack Size with Malloc):
20347 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20348
26cfe0be
AD
203492001-11-27 Akim Demaille <akim@epita.fr>
20350
20351 * src/files.c: Include error.h.
20352 Reported by Hans Aberg.
20353
f6bd5427
MA
203542001-11-26 Marc Autret <autret_m@epita.fr>
20355
d2079671 20356 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
20357 (read_declarations): Add case tok_include.
20358 * src/getargs.h (include): Add its extern definition.
20359 * src/getargs.c (include): New const char *.
20360 (getargs): Add case '-I'.
20361 * src/options.c (option_table): Add include as command line and
20362 percent option.
20363 * src/lex.h (token_t): Add tok_include.
20364
2ca209c1
AD
203652001-11-26 Akim Demaille <akim@epita.fr>
20366
20367 * src/reader.c (readgram): Make sure rules for mid-rule actions
20368 have a lineno equal to that of their host rule.
20369 Reported by Hans Aberg.
20370 * tests/regression.at (Rule Line Numbers): New.
20371
0e41b407
AD
203722001-11-26 Akim Demaille <akim@epita.fr>
20373
20374 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20375 size_ts.
20376
203772001-11-26 Akim Demaille <akim@epita.fr>
20378
20379 * src/complain.c, src/complain.h (error): Remove, provided by
20380 lib/error.[ch].
20381
e0c40012
AD
203822001-11-26 Akim Demaille <akim@epita.fr>
20383
20384 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20385 issue an error message.
20386 * tests/regression.at (Invalid %directive): New.
20387 Reported by Hans Aberg.
20388
5e147124
AD
203892001-11-26 Akim Demaille <akim@epita.fr>
20390
20391 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20392 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20393
a034c8b8
AD
203942001-11-26 Akim Demaille <akim@epita.fr>
20395
20396 * src/conflicts.c (conflicts_print): Don't complain at all when
20397 there are no reduce/reduce conflicts, and as many shift/reduce
20398 conflicts as expected.
20399 * tests/regression.at (%expect right): Adjust.
20400
c64a20f3
AD
204012001-11-23 Akim Demaille <akim@epita.fr>
20402
20403 * lib/alloca.c: Update, from fileutils.
20404
5b0d29bb
AD
204052001-11-23 Akim Demaille <akim@epita.fr>
20406
20407 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20408
722c4bfe
AD
204092001-11-23 Akim Demaille <akim@epita.fr>
20410
20411 * src/system.h: Include alloca.h.
20412 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20413
6255b435
AD
204142001-11-23 Akim Demaille <akim@epita.fr>
20415
20416 * src/print_graph.c (print_actions): Remove `rule', unused.
20417 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20418 pacify GCC's signed < unsigned warnings.
20419 * src/closure.c (itemsetsize): Likewise.
20420 * src/reader.c (symbol_list_new): Static.
20421
b29b2ed5
AD
204222001-11-23 Akim Demaille <akim@epita.fr>
20423
20424 Attaching lineno to buckets is stupid, since only one copy of each
20425 symbol is kept, only the line of the first occurrence is kept too.
20426
20427 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20428 * src/reader.c (rline_allocated): Remove, unused.
20429 (symbol_list): Have a `line' member.
20430 (symbol_list_new): New.
20431 (readgram): Use it.
20432 * src/print.c (print_grammar): Output the rule line numbers.
20433 * tests/regression.at (Solved SR Conflicts)
20434 (Unresolved SR Conflicts): Adjust.
20435 Reported by Hans Aberg.
20436
a81b1d4a
MA
204372001-11-22 Marc Autret <autret_m@epita.fr>
20438
20439 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20440
c1ecb3c1
MA
204412001-11-22 Marc Autret <autret_m@epita.fr>
20442
20443 * src/muscle_tab.c (muscle_init): Remove initialization of
20444 skeleton muscle.
20445 * src/output.c (output_master_parser): Do it here.
20446
fbe01355
AD
204472001-11-20 Akim Demaille <akim@epita.fr>
20448
20449 * po/sv.po: New.
20450 * configure.in (ALL_LINGUAS): Adjust.
20451 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20452 longer contains strings to translate.
20453
81e895c0
AD
204542001-11-19 Akim Demaille <akim@epita.fr>
20455
20456 * src/conflicts.c (conflicts_print): Add a missing \n.
20457
6bb1878b
AD
204582001-11-19 Akim Demaille <akim@epita.fr>
20459
20460 * src/nullable.c (nullable_print): New.
20461 (set_nullable): Call it when tracing.
20462 Better locality of variables.
20463
d9ec2d07
AD
204642001-11-19 Akim Demaille <akim@epita.fr>
20465
20466 * src/print.c (print_actions): Better locality of variables.
20467
720e5c1b
AD
204682001-11-19 Akim Demaille <akim@epita.fr>
20469
20470 * src/derives.c (print_derives): Fix and enrich.
20471 * src/closure.c (print_fderives): Likewise.
20472
fb908786
AD
204732001-11-19 Akim Demaille <akim@epita.fr>
20474
20475 * src/closure.c (itemsetend): Remove, replaced with...
20476 (itemsetsize): new.
20477
125ecb56
AD
204782001-11-19 Akim Demaille <akim@epita.fr>
20479
20480 * src/LR0.c (kernel_end): Remove, replaced with...
20481 (kernel_size): new.
20482
d8cf039f
AD
204832001-11-19 Akim Demaille <akim@epita.fr>
20484
20485 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20486 to clarify.
20487
7bec0760
AD
204882001-11-19 Akim Demaille <akim@epita.fr>
20489
20490 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20491
c87d4863
AD
204922001-11-19 Akim Demaille <akim@epita.fr>
20493
20494 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20495 trace messages.
20496 * src/LR0.c: Likewise.
20497 (allocate_itemsets): Use arrays instead of pointers to clarify.
20498
9bfe901c
AD
204992001-11-19 Akim Demaille <akim@epita.fr>
20500
20501 * src/getargs.c (statistics_flag): Replace with...
20502 (trace_flag): New.
20503 (longopts): Accept --trace instead of --statistics.
20504 * src/getargs.h, src/options.c: Adjust.
20505 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20506 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20507
97db7bd4
AD
205082001-11-19 Akim Demaille <akim@epita.fr>
20509
cc72668c 20510 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
20511 pointers to clarify the code.
20512 (save_reductions, save_shifts): Factor common parts of alternatives.
20513
2c5f66ed
AD
205142001-11-19 Akim Demaille <akim@epita.fr>
20515
20516 * src/LR0.c (new_state, get_state): Complete TRACE code.
20517 * src/closure.c: Include `reader.h' to get `tags', needed by the
20518 trace code.
20519 Rename the conditional DEBUG as TRACE.
20520 Output consistently TRACEs to stderr, not stdout.
20521 * src/derives.c: Likewise.
20522 * src/reduce.c: (inaccessable_symbols): Using if is better style
20523 than goto.
20524 Use `#if TRACE' instead of `#if 0' for tracing code.
20525
300f275f
AD
205262001-11-19 Akim Demaille <akim@epita.fr>
20527
20528 * src/system.h (LIST_FREE, shortcpy): New.
20529 * src/LR0.c: Use them.
20530 * src/output.c (free_itemsets, free_reductions, free_shifts):
20531 Remove, replaced by LIST_FREE.
20532
f59c437a
AD
205332001-11-19 Akim Demaille <akim@epita.fr>
20534
20535 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20536 (REDUCTIONS_ALLOC): New.
20537 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20538 allocation.
20539
6986fd9e
AD
205402001-11-19 Akim Demaille <akim@epita.fr>
20541
20542 * src/LR0.c (new_state): Complete trace code.
20543 * src/nullable.c (set_nullable): Don't translate traces.
20544
4bc30f78
AD
205452001-11-19 Akim Demaille <akim@epita.fr>
20546
20547 * src/print_graph.c (print_core): Better locality of variables.
20548 * src/print.c (print_core): Likewise.
20549
08a946e0
AD
205502001-11-19 Akim Demaille <akim@epita.fr>
20551
20552 * src/vcg.c: You do the output, so you are responsible of the
20553 handling of VCG syntax, in particular: use quotearg.
20554 * src/print_graph.c: Don't.
20555 (print_actions): Don't output the actions as part of the nodes,
20556 since that's the job of the edges.
20557 (print_state): Don't output by hand: fill the node description,
9bfe901c 20558 and ask for its output.
08a946e0 20559
f0473484
AD
205602001-11-19 Akim Demaille <akim@epita.fr>
20561
cc72668c
AD
20562 * src/bison.simple (yyparse): When verbosely reporting an error,
20563 no longer put additional quotes around token names.
f0473484
AD
20564 * tests/calc.at: Adjust.
20565
e41dc700
AD
205662001-11-19 Akim Demaille <akim@epita.fr>
20567
20568 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20569 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20570 * src/output.c: Adjust.
20571
652a871c
AD
205722001-11-19 Akim Demaille <akim@epita.fr>
20573
20574 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20575 (rule_t): this.
20576 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20577
b2ed6e58
AD
205782001-11-19 Akim Demaille <akim@epita.fr>
20579
20580 * src/gram.h (rule_t): New.
20581 (rule_table): New.
20582 (rrhs, rlhs): Remove, part of state_t.
20583 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20584 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20585 * src/reader.c, src/reduce.c: Adjust.
20586
edad7067
AD
205872001-11-19 Akim Demaille <akim@epita.fr>
20588
20589 * src/reader.c (symbols_output): New, extracted from...
20590 (packsymbols): Here.
20591 (reader): Call it.
20592
3feec034
AD
205932001-11-19 Akim Demaille <akim@epita.fr>
20594
20595 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20596 (maxrhs): this new function.
20597
ddcd5fdf
AD
205982001-11-19 Akim Demaille <akim@epita.fr>
20599
cc72668c 20600 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
20601 Adjust.
20602
bb527fc2
AD
206032001-11-19 Akim Demaille <akim@epita.fr>
20604
cc72668c 20605 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
20606 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20607 * src/lalr.c: Adjust.
20608
a845a697
AD
206092001-11-19 Akim Demaille <akim@epita.fr>
20610
20611 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20612 (set_state_table): handle the `lookaheads' members.
20613
f004bf6a
AD
206142001-11-19 Akim Demaille <akim@epita.fr>
20615
cc72668c
AD
20616 * src/lalr.h (lookaheads): Removed array, whose contents is now
20617 a member of...
f004bf6a
AD
20618 (state_t): this structure.
20619 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20620 Adjust.
20621
de326cc0
AD
206222001-11-19 Akim Demaille <akim@epita.fr>
20623
cc72668c
AD
20624 * src/lalr.h (consistent): Removed array, whose contents is now
20625 a member of...
de326cc0
AD
20626 (state_t): this structure.
20627 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20628 Adjust.
20629
90b4416b
AD
206302001-11-19 Akim Demaille <akim@epita.fr>
20631
cc72668c
AD
20632 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20633 contents are now members of...
90b4416b
AD
20634 (state_t): this structure.
20635 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20636 Adjust.
20637
9703cc49
AD
206382001-11-19 Akim Demaille <akim@epita.fr>
20639
20640 * src/lalr.h (state_t): New.
20641 (state_table): Be a state_t * instead of a core **.
20642 (accessing_symbol): Remove, part of state_t.
20643 * src/lalr.c: Adjust.
20644 (set_accessing_symbol): Merge into...
20645 (set_state_table): this.
20646 * src/print_graph.c, src/conflicts.c: Adjust.
20647
d803322e
AD
206482001-11-14 Akim Demaille <akim@epita.fr>
20649
20650 * tests/calc.at, tests/output.at, tests/regression.at,
20651 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20652 now the tests are run in private dirs, therefore AC_CLEANUP and
20653 family can be simplified to 0-ary.
20654 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20655 use abs. path to find config.h.
20656 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20657 stderr, there can be way too much random noise.
20658 Instead pass -Werror to GCC and rely on the exit status.
20659 Reported by Wolfram Wagner.
20660
3d76b07d
AD
206612001-11-14 Akim Demaille <akim@epita.fr>
20662
20663 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20664 defined only if yyoverflow is defined, to avoid `warning: unused
20665 variable `yyvs1''.
20666 Reported by The Test Suite.
20667
09b503c8
AD
206682001-11-14 Akim Demaille <akim@epita.fr>
20669
20670 * src/print.c: Include reduce.h.
20671 Reported by Hans Aberg.
20672
206732001-11-14 Akim Demaille <akim@epita.fr>
20674
20675 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20676 Revert a previous patch: these are really const.
20677 * src/conflicts.c (conflict_report): Additional useless pair of
20678 braces to pacify GCC's warnings for `if () if () {} else {}'.
20679 * src/lex.c (parse_percent_token): Replace equal_offset with
20680 arg_offset.
20681 arg is const.
20682 Be sure to strdup `arg' when used, since there is no reason for
20683 token_buffer not to change.
20684
0f37a994
AD
206852001-11-14 Akim Demaille <akim@epita.fr>
20686
20687 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20688 definition.
20689 * src/main.c (main): Use them.
20690 Suggested by Hans Aberg.
20691
d39d93b8
AD
206922001-11-12 Akim Demaille <akim@epita.fr>
20693
20694 * src/system.h (ngettext): Now that we use ngettext, be sure to
20695 provide a default definition when NLS are not used.
20696
9edcd895
AD
206972001-11-12 Akim Demaille <akim@epita.fr>
20698
20699 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20700 Use @kbd to denote user input.
20701 (Language and Grammar): ANSIfy the example.
20702 Adjust its layout for info/notinfo.
20703 (Location Tracking Calc): Output error messages to stderr.
20704 Output locations in a more GNUtically correct way.
20705 Fix a couple of Englishos.
20706 Adjust @group/@end group pairs.
20707
7da99ede
AD
207082001-11-12 Akim Demaille <akim@epita.fr>
20709
e3aa65c5 20710 %expect was not functioning at all.
7da99ede
AD
20711
20712 * src/conflicts.c (expected_conflicts): Set to -1.
20713 (conflict_report): Use ngettext.
20714 (conflicts_print): Check %expect and make its violation an error.
20715 * doc/bison.texinfo (Expect Decl): Adjust.
20716 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20717 * tests/regression.at (%expect not enough, %expect right)
20718 (%expect too much): New.
20719
ba9dda1a
AD
207202001-11-12 Akim Demaille <akim@epita.fr>
20721
20722 * tests/regression.at (Conflicts): Rename as...
20723 (Unresolved SR Conflicts): this.
20724 (Solved SR Conflicts): New.
20725
337c5bd1
AD
207262001-11-12 Akim Demaille <akim@epita.fr>
20727
20728 * src/reduce.c (print_results): Rename as...
20729 (reduce_output): This.
20730 Output to OUT, passed as argument, instead of output_obstack.
20731 (dump_grammar): Likewise.
20732 (reduce_free): New.
20733 Also free V1.
20734 (reduce_grammar): No longer call reduce_output, since...
20735 * src/print.c (print_results): do it.
20736 * src/main.c (main): Call reduce_free;
20737
c73a41af
AD
207382001-11-12 Akim Demaille <akim@epita.fr>
20739
20740 * src/conflicts.c (print_reductions): Accept OUT as argument.
20741 Output to it, not to output_obstack.
20742 * src/print.c (print_actions): Adjust.
20743
0df87bb6
AD
207442001-11-12 Akim Demaille <akim@epita.fr>
20745
20746 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20747 the result instead of using...
20748 (src_total, rrc_total, src_count, rrc_count): Remove.
20749 (any_conflicts): Remove.
20750 (print_conflicts): Split into...
20751 (conflicts_print, conflicts_output): New.
20752 * src/conflicts.h: Adjust.
20753 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 20754 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
20755 * tests/regression.at (Conflicts): New.
20756 Reported by Tom Lane.
20757
e4d3d4de
AD
207582001-11-12 Akim Demaille <akim@epita.fr>
20759
20760 * tests/regression.at (Invalid input): Remove, duplicate with
20761 ``Invalid input: 1''.
20762
6d7d248e
AD
207632001-11-12 Akim Demaille <akim@epita.fr>
20764
20765 * tests/torture.at (AT_DATA_STACK_TORTURE)
20766 (Exploding the Stack Size with Alloca)
20767 (Exploding the Stack Size with Malloc): New.
20768
e9e4c321
AD
207692001-11-12 Akim Demaille <akim@epita.fr>
20770
20771 * src/bison.simple (YYSTACK_REALLOC): New.
20772 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 20773 Reported by Per Allansson.
e9e4c321 20774
5f7e0832
AD
207752001-11-12 Pascal Bart <pascal.bart@epita.fr>
20776
20777 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20778 define CPP macro, which substitute YYSTYPE by yystype.
20779 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20780 with yyltype/YYLTYPE. This allows inclusion of the generated
20781 header within the parser if the compiler, such as GGC, accepts
20782 multiple equivalent #defines.
20783 From Akim.
20784
e3f1699f
AD
207852001-11-05 Akim Demaille <akim@epita.fr>
20786
20787 * src/reader.c (symbols_output): New, extracted from...
20788 (packsymbols): here.
20789 (reader): Adjust.
20790
65be0866
AD
207912001-11-05 Akim Demaille <akim@epita.fr>
20792
20793 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20794
e4d910bf
AD
207952001-11-05 Akim Demaille <akim@epita.fr>
20796
20797 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20798 pattern.
20799
951366c1
AD
208002001-11-05 Akim Demaille <akim@epita.fr>
20801
20802 * src/options.h (struct option_table_struct): set_flags is void*.
20803 * src/options.c (longopts): Support `--output' and `%output'.
20804 (usage): Adjust.
20805 * src/lex.h (tok_setopt): Remove, replaced with...
20806 (tok_intopt, tok_stropt): these new guys.
20807 * src/lex.c (getopt.h): Not needed.
20808 (token_buffer, unlexed_token_buffer): Not const.
20809 (percent_table): Promote `-' over `_' in directive names.
20810 Active `%name-prefix', `file-prefix', and `output'.
20811 (parse_percent_token): Accept possible arguments to directives.
20812 Promote `-' over `_' in directive names.
20813
d8988b2f
AD
208142001-11-04 Akim Demaille <akim@epita.fr>
20815
20816 * doc/bison.texinfo (Decl Summary): Split the list into
20817 `directives for grammars' and `directives for bison'.
20818 Sort'em.
20819 Add description of `%name-prefix', `file-prefix', and `output'.
20820 Promote `-' over `_' in directive names.
20821 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20822 Simplify the description of `--name-prefix'.
20823 Promote `-' over `_' in directive names.
20824 Promote `--output' over `--output-file'.
20825 Fix the description of `--defines'.
20826 * tests/output.at: Exercise %file-prefix and %output.
20827
6468d18e
AD
208282001-11-02 Akim Demaille <akim@epita.fr>
20829
20830 * doc/refcard.tex: Update.
20831
6b7e85b9
AD
208322001-11-02 Akim Demaille <akim@epita.fr>
20833
20834 * src/symtab.h (SUNDEF): New.
20835 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20836 stand for `uninitialized', instead of 0.
20837 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20838 * src/lex.c (lex): Adjust.
20839
20840 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20841 Number it 0.
20842 Let yylex return it instead of a plain 0.
20843 Reported by Dick Streefland.
20844
cd5aafcf
AD
208452001-11-02 Akim Demaille <akim@epita.fr>
20846
20847 * tests/regression.at (Mixing %token styles): New test.
20848
037ca2f1
AD
208492001-11-02 Akim Demaille <akim@epita.fr>
20850
20851 * src/reader.c (parse_thong_decl): Formatting changes.
20852 (token_translations_init): New, extracted from...
20853 (packsymbols): Here.
20854 Adjust.
20855
270a173c
AD
208562001-11-01 Akim Demaille <akim@epita.fr>
20857
20858 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20859 Check that `9foo.y' produces correct cpp guards.
20860 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20861 guards.
20862 Reported by Wwp.
20863
561f9a30
AD
208642001-11-01 Akim Demaille <akim@epita.fr>
20865
20866 * tests/regression.at (Invalid input: 2): New.
20867 * src/lex.c (unlexed_token_buffer): New.
20868 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20869 too.
20870 Reported by Wwp.
20871
f987e9d2
AD
208722001-11-01 Akim Demaille <akim@epita.fr>
20873
20874 * tests/calc.at: Catch up with 1.30.
20875 * configure.in: Bump to 1.49a.
20876 Adjust to newer Autotest.
20877
0846f581
PB
208782001-10-19 Pascal Bart <pascal.bart@epita.fr>
20879
20880 * src/conflicts.c: Move global variables rrc_total and src_total ...
20881 (print_conflicts): here.
20882 * src/output.c (output): Free global variable user_toknums.
20883 * src/lex.c (token_obstack): Become static.
20884
3c1a79b3
AD
208852001-10-18 Akim Demaille <akim@epita.fr>
20886
20887 * tests/atlocal.in (GCC): Add.
20888 * tests/calc.at: s/m4_match/m4_bmatch/.
20889 s/m4_patsubst/m4_bpatsubst/.
20890 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20891 * configure.in: AC_SUBST(GCC).
20892
5d52e7d0
MA
208932001-10-14 Marc Autret <autret_m@epita.fr>
20894
20895 * src/options.c (create_long_option_table): Fix.
20896
631aa1d3
AD
208972001-10-10 Akim Demaille <akim@epita.fr>
20898
20899 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20900
f6ec6d13
AD
209012001-10-04 Akim Demaille <akim@epita.fr>
20902
20903 * src/reader.c (parse_union_decl): Push the caracters in
20904 union_obstack, not attrs_obstack.
20905
342b8b6e
AD
209062001-10-04 Akim Demaille <akim@epita.fr>
20907
20908 Merge in the branch 1.29.
20909
20910 * src/reader.c (packsymbols): Use a temporary obstack for
20911 `%%tokendef', since output_stack is already used elsewhere.
20912
20913 2001-10-02 Akim Demaille <akim@epita.fr>
20914
20915 Bump 1.29d.
20916
20917 2001-10-02 Akim Demaille <akim@epita.fr>
20918
20919 Version 1.29c.
20920
20921 2001-10-02 Akim Demaille <akim@epita.fr>
20922
20923 * tests/regression.at (Invalid CPP headers): New.
20924 From Alexander Belopolsky.
20925 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20926
20927 2001-10-02 Akim Demaille <akim@epita.fr>
20928
20929 * tests/regression.at (Invalid input): New.
20930 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20931 Reported by Shura.
20932
20933 2001-10-02 Akim Demaille <akim@epita.fr>
20934
20935 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20936
20937 2001-10-02 Akim Demaille <akim@epita.fr>
20938
20939 * src/output.c (output_parser): Assert `skeleton'.
20940 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20941 systems.
20942 From Shura.
20943
20944 2001-10-01 Marc Autret <autret_m@epita.fr>
20945
20946 * src/lex.h: Echo modifications.
20947 * src/lex.c (unlex): Parameter is now token_t.
20948 From Hans Aberg.
20949
20950 2001-10-01 Marc Autret <autret_m@epita.fr>
20951
20952 * src/main.c: Include lex.h.
20953 From Hans Aberg.
20954
20955 2001-09-29 Akim Demaille <akim@epita.fr>
20956
20957 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20958
20959 2001-09-28 Akim Demaille <akim@epita.fr>
20960
20961 * tests/testsuite.at: Update to newer Autotest.
20962 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20963
20964 2001-09-27 Akim Demaille <akim@epita.fr>
20965
20966 Position independent wrapper.
20967
20968 * tests/bison: Remove.
20969 * tests/bison.in: New.
20970 * configure.in: Adjust.
20971
20972 2001-09-27 Paul Eggert <eggert@twinsun.com>
20973
20974 Port quotearg fixes from tar 1.13.24.
20975
20976 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20977 tm to be declared.
20978 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20979 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20980
20981 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20982 * m4/mbrtowc.m4: New file.
20983 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20984 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20985
20986 2001-09-27 Akim Demaille <akim@epita.fr>
20987
20988 Bump to 1.29c.
20989
20990 2001-09-27 Akim Demaille <akim@epita.fr>
20991
20992 Version 1.29b.
20993
20994 2001-09-25 Akim Demaille <akim@epita.fr>
20995
20996 * src/system.h: Include `xalloc.h'.
20997 Remove it from the C files.
20998 * src/files.c (output_files): Free the obstacks.
20999 * src/lex.c (init_lex): Rename as...
21000 (lex_init): this.
21001 (lex_free): New.
21002 * src/main.c (main): Use it.
21003
21004 2001-09-24 Marc Autret <autret_m@epita.fr>
21005
21006 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21007 to output informations in fout (FILE*).
21008 (open_graph, close_graph): Likewise.
21009 (output_graph, output_edge, output_node): Likewise.
21010 * src/vcg.h: Update function prototypes.
21011 * src/print_graph.c (print_graph): Open output graph file.
21012 (print_actions): Adjust.
21013 * src/files.h: Remove extern declaration.
21014 * src/files.c: Remove graph_obstack declaration.
21015 (open_files): Remove graph_obstack initialization.
21016 (output_files): Remove graph_obstack saving.
21017
21018 2001-09-24 Marc Autret <autret_m@epita.fr>
21019
21020 * src/files.c (compute_output_file_names): Fix.
21021
21022 2001-09-24 Marc Autret <autret_m@epita.fr>,
21023 Akim Demaille <akim@epita.fr>
21024
21025 * src/reader.c (reader): Remove call to free_symtab ().
21026 * src/main.c (main): Call it here.
21027 Include symtab.h.
21028 * src/conflicts.c (initialize_conflicts): Rename as...
21029 (solve_conflicts): this.
21030 * src/print.c (print_core, print_actions, print_state)
21031 (print_grammar): Dump to a file instead a `output_obstack'.
21032 (print_results): Dump `output_obstack', and then proceed with the
21033 FILE *.
21034 * src/files.c (compute_output_file_names, close_files): New.
21035 (output_files): Adjust.
21036 * src/main.c (main): Adjust.
21037
21038 2001-09-23 Marc Autret <autret_m@epita.fr>
21039
21040 * src/files.c (compute_header_macro): Computes header macro name
21041 from spec_defines_file when given.
21042
21043 2001-09-23 Marc Autret <autret_m@epita.fr>
21044
21045 * src/files.c (output_files): Add default extensions.
21046
21047 2001-09-22 Akim Demaille <akim@epita.fr>
21048
21049 * src/conflicts.c (finalize_conflicts): Rename as...
21050 (free_conflicts): this.
21051
21052 2001-09-22 Akim Demaille <akim@epita.fr>
21053
21054 * src/gram.c (gram_free): Rename back as...
21055 (dummy): this.
21056 (output_token_translations): Free `token_translations'.
21057 * src/symtab.c (free_symtab): Free the tag field.
21058
21059 2001-09-22 Akim Demaille <akim@epita.fr>
21060
21061 Remove `translations' as it is always set to true.
21062
21063 * src/gram.h: Adjust.
21064 * src/reader.c (packsymbols, parse_token_decl): Adjust
21065 * src/print.c (print_grammar): Adjust.
21066 * src/output.c (output_token_translations): Adjust.
21067 * src/lex.c (lex): Adjust.
21068 * src/gram.c: Be sure the set pointers to NULL.
21069 (dummy): Rename as...
21070 (gram_free): this.
21071
21072 2001-09-22 Akim Demaille <akim@epita.fr>
21073
21074 * configure.in: Invoke AM_LIB_DMALLOC.
21075 * src/system.h: Use dmalloc.
21076 * src/LR0.c: Be sure to have pointers initialized to NULL.
21077 (allocate_itemsets): Allocate kernel_items only if needed.
21078
21079 2001-09-22 Akim Demaille <akim@epita.fr>
21080
21081 * configure.in: Bump to 1.29b.
21082 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21083 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21084 need xmalloc.c in calc.y.
21085 From Pascal Bart.
21086
21087 2001-09-21 Akim Demaille <akim@epita.fr>
21088
21089 Version 1.29a.
21090 * Makefile.maint, config/config.guess, config/config.sub,
21091 * config/missing: Update from masters.
21092 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21093 upon package.m4.
21094 * configure.in (ALL_LINGUAS): Add `tr'.
21095
21096 2001-09-21 Akim Demaille <akim@epita.fr>
21097
21098 * tests/Makefile.am (package.m4): Move to...
21099 ($(srcdir)/$(TESTSUITE)): here.
21100
21101 2001-09-20 Akim Demaille <akim@epita.fr>
21102
21103 * src/complain.c: No longer try to be standalone: use system.h.
21104 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21105 * src/complain.h: Likewise.
21106 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21107 Remove the unused variable `n'.
21108 From Albert Chin-A-Young.
21109
21110 2001-09-18 Marc Autret <autret_m@epita.fr>
21111
21112 * doc/bison.1: Update.
21113 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21114 descriptions.
21115 (Option Cross Key): Update.
21116 Add --graph.
21117
21118 2001-09-18 Marc Autret <autret_m@epita.fr>
21119
21120 * tests/regression.at: New test (comment in %union).
21121
21122 2001-09-18 Marc Autret <autret_m@epita.fr>
21123
21124 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21125 do that.
21126 Reported by Keith Browne.
21127
21128 2001-09-18 Marc Autret <autret_m@epita.fr>
21129
21130 * tests/output.at: Add tests for --defines and --graph.
21131
21132 2001-09-18 Marc Autret <autret_m@epita.fr>
21133
21134 * tests/output.at: Removes tests of %{header,src}_extension features.
21135
21136 2001-09-18 Akim Demaille <akim@epita.fr>
21137
21138 * tests/Makefile.am (package.m4): New.
21139 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21140 (_AT_CHECK_CALC_ERROR): Likewise.
21141 Factor the `, ' part of verbose error messages.
21142
21143 2001-09-18 Marc Autret <autret_m@epita.fr>
21144
21145 * src/getargs.c (longopts): Declare --defines and --graph as options
21146 with optional arguments.
21147 * src/files.h: Add extern declarations.
21148 * src/files.c (spec_graph_file, spec_defines_file): New.
21149 (output_files): Update.
21150 Remove CPP-outed code.
21151
21152 2001-09-18 Marc Autret <autret_m@epita.fr>
21153
21154 Turn off %{source,header}_extension feature.
21155
21156 * src/files.c (compute_exts_from_gf): Update.
21157 (compute_exts_from_src): Update.
21158 (output_files): CPP-out useless code.
21159 * src/files.h: Remove {header,source}_extension extern declarations.
21160 * src/reader.c (parse_dquoted_param): CPP-out.
21161 (parse_header_extension_decl): Remove.
21162 (parse_source_extension_decl): Remove.
21163 (read_declarations): Remove cases tok_{hdrext,srcext}.
21164 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21165 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21166
21167 2001-09-10 Akim Demaille <akim@epita.fr>
21168
21169 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21170 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21171 (AT_CHECK_OUTPUT): this.
21172 Merely check ls' exit status, its output is useless.
21173
21174 2001-09-10 Akim Demaille <akim@epita.fr>
21175
21176 * tests/calc.at: Use m4_match.
21177 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21178
21179 2001-09-10 Marc Autret <autret_m@epita.fr>,
21180 Akim Demaille <akim@epita.fr>
21181
21182 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21183 enum color_e.
21184 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21185 to `normal'.
21186 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21187 * src/lex.h: Adjust prototype.
21188 (token_t): Add `tok_undef'.
21189 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21190 (parse_percent_token): Now returns token_t.
21191 Add default statement in switch.
21192 (lex): Separate `c' as an input variable, from the token_t result
21193 part.
21194 (unlexed): Is a token_t.
21195
21196 2001-09-10 Akim Demaille <akim@epita.fr>
21197
21198 * configure.in: Bump to 1.29a.
21199
21200 2001-09-07 Akim Demaille <akim@epita.fr>
21201
21202 Version 1.29.
21203
21204 2001-08-30 Akim Demaille <akim@epita.fr>
21205
21206 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21207 * m4/atconfig.m4: Remove.
21208 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21209 * tests/bison: New.
21210 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21211 m4_if, m4_patsubst, and m4_regexp.
21212 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21213 `input' file instead of echo.
21214
21215 2001-08-29 Akim Demaille <akim@epita.fr>
21216
21217 Bump to 1.28e.
21218
21219 2001-08-29 Akim Demaille <akim@epita.fr>
21220
21221 Version 1.28d.
21222
21223 2001-08-29 Paul Eggert <eggert@twinsun.com>
21224
21225 * src/bison.simple (yyparse): Don't take the address of an
21226 item before the start of an array, as that doesn't conform to
21227 the C Standard.
21228
21229 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21230
21231 * doc/bison.texinfo (Location Tracking Calc): New node.
21232
21233 2001-08-29 Paul Eggert <eggert@twinsun.com>
21234
21235 * src/output.c (output): Do not define const, as this now
21236 causes more problems than it cures.
21237
21238 2001-08-29 Akim Demaille <akim@epita.fr>
21239
21240 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21241 the nodes.
21242 Be sure to tag the `detailmenu'.
21243
21244 2001-08-29 Akim Demaille <akim@epita.fr>
21245
21246 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21247 download in a tmp dir.
21248
21249 2001-08-28 Marc Autret <autret_m@epita.fr>
21250
21251 * config/depcomp: New file.
21252
21253 2001-08-28 Marc Autret <autret_m@epita.fr>
21254
21255 * doc/bison.1 (mandoc): Adjust.
21256 From Juan Manuel Guerrero.
21257
21258 2001-08-28 Marc Autret <autret_m@epita.fr>
21259
21260 * src/print_graph.c (print_state): Fix.
21261
21262 2001-08-27 Marc Autret <autret_m@epita.fr>
21263
21264 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21265 char * members.
21266 Echo modifications to the functions prototypes.
21267 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21268
21269 2001-08-27 Marc Autret <autret_m@epita.fr>
21270
21271 * src/vcg.c: Include `xalloc.h'.
21272 (add_colorentry): New.
21273 (add_classname): New.
21274 (add_infoname): New.
21275 * src/vcg.h: Add new prototypes.
21276
21277 2001-08-27 Akim Demaille <akim@epita.fr>
21278
21279 * Makefile.maint: Sync. again with CVS Autoconf.
21280
21281 2001-08-27 Akim Demaille <akim@epita.fr>
21282
21283 * Makefile.maint: Formatting changes.
21284 (po-update, cvs-update, update): New targets.
21285 (AMTAR): Remove.
21286
21287 2001-08-27 Akim Demaille <akim@epita.fr>
21288
21289 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21290 * Makefile.maint: Sync. with CVS Autoconf.
21291
21292 2001-08-27 Marc Autret <autret_m@epita.fr>
21293
21294 * src/vcg.h (struct infoname_s): New.
21295 (struct colorentry_s): New.
21296 (graph_s): New fields {vertical,horizontal}_order in structure.
21297 Add `infoname' field.
21298 Add `colorentry' field;
21299 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21300 (G_HORIZONTAL_ORDER): New.
21301 (G_INFONAME): New.
21302 (G_COLORENTRY): New.
21303 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21304 Add output of `infoname'.
21305 Add output of `colorentry'.
21306
21307 2001-08-27 Marc Autret <autret_m@epita.fr>
21308
21309 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21310 This one shadowed a global parameter.
21311
21312 2001-08-24 Marc Autret <autret_m@epita.fr>
21313
21314 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21315 instead of `unsigned'.
21316 (print_state): Do not call obstack_object_size () in obstack_grow ()
21317 to avoid macro variables shadowing.
21318
21319 2001-08-23 Marc Autret <autret_m@epita.fr>
21320
21321 * src/lex.c (percent_table): Typo: s/naem/name/.
21322 Add graph option.
21323 Normalize new options declarations.
21324
21325 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21326
21327 * tests/suite.at: Exercise %header_extension and %source_extension.
21328
21329 2001-08-16 Marc Autret <autret_m@epita.fr>
21330
21331 * src/reader.c (parse_dquoted_param): New.
21332 (parse_header_extension_decl): Use it.
21333 (parse_source_extension_decl): Likewise.
21334
21335 2001-08-16 Marc Autret <autret_m@epita.fr>
21336
21337 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21338 (get_xxxx_str): Use assert () instead of complain ().
21339 Remove return invokations in default cases.
21340 (get_decision_str): Modify default behaviour. Remove second argument.
21341 Echo modifications on calls.
21342 (output_graph): Fix.
21343
21344 2001-08-16 Marc Autret <autret_m@epita.fr>
21345
21346 * src/getargs.c (usage): Update with ``-g, --graph''.
21347
21348 2001-08-16 Marc Autret <autret_m@epita.fr>
21349
21350 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21351 (Option Cross Key): Likewise.
21352 * doc/bison.1: Update.
21353
1c8c2190
PB
213542001-09-25 Pascal Bart <pascal.bart@epita.fr>
21355
21356 * src/output.c (output_master_parser): Don't finish action_obstack.
21357 (output_parser): Don't care about the muscle action, here.
21358 (prepare): Copy the action_obstack in the action muscle.
21359 (output): Free action_obstack.
21360
180d45ba
PB
213612001-09-23 Pascal Bart <pascal.bart@epita.fr>
21362
21363 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21364 will contain `%union' declaration.
21365 (parse_union_decl): Delete #line directive output.
21366 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21367 informations about %union.
21368 (parse_union_decl): Copy the union_obstack in the muscle stype.
21369 * src/bison.simple: Add new #line directive.
21370 Add typdef %%stype YYSTYPE.
21371
c51d1a19
PB
213722001-09-23 Pascal Bart <pascal.bart@epita.fr>
21373
21374 * src/bison.simple: Add new `#line' directive.
21375
6f9344da
PB
213762001-09-22 Pascal Bart <pascal.bart@epita.fr>
21377
21378 * src/bison.simple: New `#line' directive.
21379 * src/output.c (output_parser): Support new dynamic muscle input_line.
21380
652def80
MA
213812001-09-22 Marc Autret <autret_m@epita.fr>
21382
21383 * src/output.c (output_master_parser): New.
21384 (output_parser): Be more re-entrant.
21385
25b222fa
MA
213862001-09-21 Marc Autret <autret_m@epita.fr>
21387
21388 * src/reader.c (copy_definition, parse_union_decl): Update and use
21389 `linef' muscle.
21390 (copy_action): Likewise.
21391 Use obstack_1grow ().
21392 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21393
6bc35ae5
MA
213942001-09-21 Marc Autret <autret_m@epita.fr>
21395
21396 * src/options.c (option_table): Adjust.
21397 * src/lex.c (parse_percent_token): Fix.
21398
c0629aa1
PB
213992001-09-20 Pascal Bart <pascal.bart@epita.fr>
21400
21401 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 21402
82b6d266
PB
214032001-09-20 Pascal Bart <pascal.bart@epita.fr>
21404
21405 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21406 is now an option_table_struct*.
21407 (option_strcmp): New function option_strcmp.
21408 (parse_percent_token): Call option_strcmp.
21409 * src/getargs.c (xalloc.h, options.h): Include it.
21410 (getargs): Call create_long_option_table.
21411 (getargs): Free longopts at the end of the function.
21412 (shortopts): Move in options.c.
21413 * src/options.c (create_long_option_table): New function. Convert
21414 information from option_table to option structure.
21415 * src/reader.c (options.h): Include it.
21416
21417 * src/Makefile.am: Adjust.
21418 * src/options.c (option_table): Create from longopts and percent_table.
21419 * src/getargs.c (longopts): Delete.
21420 * src/lex.c (struct percent_table_struct): Delete.
21421 (percent_table): Delete.
21422 (options.h): Include it.
21423 * src/options.c: Create.
21424 * src/options.h: Create.
21425 Declare enum opt_access_e.
21426 Define struct option_table_struct.
21427
75f5aaea
MA
214282001-09-20 Marc Autret <autret_m@epita.fr>
21429
21430 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21431 sections of Bison.
21432
f508cb0a
PB
214332001-09-19 Pascal Bart <pascal.bart@epita.fr>
21434
21435 * src/bison.simple: s/%%filename/%%skeleton.
21436 * src/muscle_tab.c (getargs.h): Include it.
21437 (muscle_init): Insert new muscle skeleton.
21438
13105fc1
PB
214392001-09-18 Pascal Bart <pascal.bart@epita.fr>
21440
21441 * src/output.c (output_parser): Delete unused variable actions_dumped.
21442
b0c4483e
PB
214432001-09-07 Pascal Bart <pascal.bart@epita.fr>
21444
21445 * src/output.c (output): Delete call to reader_output_yylsp.
21446 * src/reader.c (reader): Likewise.
ba0fe3c7 21447 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 21448
11d82f03
MA
214492001-09-02 Marc Autret <autret_m@epita.fr>
21450
21451 * src/reader.c: Include muscle_tab.h.
21452 (parse_union_decl): Update.
21453 (parse_macro_decl): Rename parse_muscle_decl.
21454 Update to use renamed functions and variable.
21455 (read_declarations, copy_action, read_additionnal_code, : Updated
21456 with correct variables and functions names.
21457 (packsymbols, reader): Likewise.
342b8b6e 21458
11d82f03 21459 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 21460
11d82f03
MA
21461 * src/output.c: Include muscle_tab.h
21462 In all functions using macro_insert, change by using muscle_insert ().
21463 (macro_obstack): Rename muscle_obstack.
21464 Echo modifications in the whole file.
21465 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21466 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21467 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21468
21469 * src/muscle_tab.h: Update double inclusion macros.
21470 (macro_entry_s): Rename muscle_entry_s.
21471 Update prototypes.
342b8b6e 21472
11d82f03
MA
21473 * src/muscle_tab.c: Include muscle_tab.h.
21474 Rename macro_tabble to muscle_table.
21475 (mhash1, mhash2, mcmp): Use muscle_entry.
21476 (macro_init): Rename muscle_init. Update.
21477 (macro_insert): Rename muscle_insert. Update.
21478 (macro_find): Rename muscle_find. Update.
21479
21480 * src/main.c: Include muscle_tab.h.
21481 (main): Call muscle_init ().
21482 * src/Makefile.am (bison_SOURCES): Echo modifications.
21483
93a37297
MA
214842001-09-02 Marc Autret <autret_m@epita.fr>
21485
f753cd62 21486 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 21487
f753cd62
MA
21488 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21489
214902001-09-02 Marc Autret <autret_m@epita.fr>
21491
21492 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 21493
682d48cd
PB
214942001-09-01 Pascal Bart <pascal.bart@epita.fr>
21495
342b8b6e 21496 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
21497 filename.
21498
087c8fda
MA
214992001-09-01 Marc Autret <autret_m@epita.fr>
21500
21501 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21502 to an explicit value to activate the feature. We do it here.
21503
dda680cb
PB
215042001-08-31 Pascal Bart <pascal.bart@epita.fr>
21505
21506 * src/output.c (prepare): Delete the `filename' muscule insertion.
21507 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21508 (parse_union_decl): Likewise.
21509 * src/macrotab.c (macro_init): Initialize filename by infile.
21510
9e644e64
MA
215112001-08-31 Marc Autret <autret_m@epita.fr>
21512
21513 * src/bison.simple (YYLSP_NEEDED): New definition.
21514 * src/output.c (prepare): Add macro insertion of `locations_flag'
21515
17da6427
PB
215162001-08-31 Pascal Bart <pascal.bart@epita.fr>
21517
21518 * src/output.c (prepare): Delete insertion of previous muscles,
21519 and insert the `prefix' muscles.
21520 * src/macrotab.c (macro_init): Likewise.
21521 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 21522 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
21523 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21524 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 21525 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
21526 name_prefix.
21527
e8cb70b9
PB
215282001-08-31 Pascal Bart <pascal.bart@epita.fr>
21529
21530 * src/main.c (main): Standardize.
21531 * src/output.c (output_table_data, output_parser): Likewise.
21532 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21533
63c2d5de
MA
215342001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21535
342b8b6e 21536 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
21537 %%epilogue.
21538 * src/output.c (output): Rename %%declarations to %%prologue.
21539 * src/bison.simple: Echo modifications.
342b8b6e 21540
d8cb5183
MA
215412001-08-31 Marc Autret <autret_m@epita.fr>
21542
21543 * src/reader.c (readgram): CleanUp.
21544 (output_token_defines): Likewise.
21545 (packsymbols): Likewise.
21546 (reader): Likewise.
21547 * src/output.c (output): CPP-out useless code.
21548
6c686258
PB
215492001-08-31 Pascal Bart <pascal.bart@epita.fr>
21550
342b8b6e 21551 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
21552 output_trailers and output_headers.
21553 * src/output.h: Remove obsolete functions prototypes of output_headers
21554 and output_trailers.
21555
8f451ef7
PB
215562001-08-30 Pascal Bart <pascal.bart@epita.fr>
21557
21558 * src/main.c: Include macrotab.h.
342b8b6e 21559 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
21560 Adjust functions prototypes.
21561 * src/macrotab.c (macro_insert): Constify key and value.
21562 (macro_find): Constify key.
21563 (macro_insert): Include 'xalloc.h'
21564 (macro_insert): Use XMALLOC.
21565 (macro_find): Constify return value.
21566 * src/output.c (output_table_data): Rename table to table_data.
21567 (output_parser): Constify macro_key, macro_value.
21568
997b6fd0 215692001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
21570
21571 * src/reader.c (parse_skel_decl): New.
342b8b6e 21572 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
21573 * src/lex.h (token_t): New token `tok_skel'.
21574 * src/lex.c (percent_table): Add skeleton option entry.
21575 Standardize.
21576
ff48177d
MA
215772001-08-29 Marc Autret <autret_m@epita.fr>
21578
21579 * src/bison.simple: Add %%user_code directive at the end.
21580 * src/reader.c (read_additionnal_code): New.
21581 (reader): Use it.
21582 * src/output.c (output_program): Remove.
21583 (output): Update.
21584
b33160bf
MA
215852001-08-28 Marc Autret <autret_m@epita.fr>
21586
21587 * src/output.c (output_actions): Clean up.
4e5caae2 21588 (output_gram): CPP-out useless code.
b33160bf
MA
21589 * src/reader.c (reader): Clean up, CPP-out useless code.
21590
d1a2daf7
PB
215912001-08-28 Pascal Bart <pascal.bart@epita.fr>
21592
342b8b6e 21593 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 21594 directive.
d1a2daf7
PB
21595 * src/bison.simple: Add `%%definitions'.
21596
2b763dfe
MA
215972001-08-28 Marc Autret <autret_m@epita.fr>
21598
21599 * config/depcomp: New file.
21600
f1a87ef6
PE
216012001-08-27 Paul Eggert <eggert@twinsun.com>
21602
21603 * src/bison.simple (yyparse): Don't take the address of an
21604 item before the start of an array, as that doesn't conform to
21605 the C Standard.
21606
82e236e2
RA
216072001-08-27 Robert Anisko <robert.anisko@epita.fr>
21608
f1a87ef6 21609 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
21610 obstack. It was done too late here.
21611
21612 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21613 completely wrong.
21614 (reader): Initialize the macro obstack here, since we need it to grow
21615 '%define' directives.
21616
21617 * src/reader.h: Declare the macro obstack as extern.
21618
b0cfa28a
RA
216192001-08-27 Robert Anisko <robert.anisko@epita.fr>
21620
21621 * src/output.c (output_parser): Fix. Store single '%' characters in
21622 the output obstack instead of throwing them away.
21623
6fc74234
AD
216242001-08-27 Akim Demaille <akim@epita.fr>
21625
21626 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21627
9c76d118
RA
216282001-08-25 Robert Anisko <robert.anisko@epita.fr>
21629
21630 * lib/Makefile.am: Adjust.
21631
a8289c62
RA
216322001-08-25 Robert Anisko <robert.anisko@epita.fr>
21633
21634 * src/bison.simple: Update and add '%%' directives.
21635
b6610515
RA
216362001-08-25 Robert Anisko <robert.anisko@epita.fr>
21637
21638 * src/reader.c (reader): Remove calls to 'output_headers' and
21639 'output_trailers'. Remove some C output.
21640 (readgram): Disable a piece of code that was writing a default
21641 definition for 'YYSTYPE'.
21642 (reader_output_yylsp): Remove.
21643 (packsymbols): Output token defintions to a macro.
21644 (copy_definition): Disable C output.
6fc74234 21645
b6610515
RA
21646 * src/reader.c (parse_macro_decl): New function used to parse macro
21647 declarations.
21648 (copy_string2): Put the body of copy_string into this new function.
21649 Add a parameter to let the caller choose whether he wants to copy the
21650 string delimiters or not.
21651 (copy_string): Be a simple call to copy_string2 with the last argument
21652 bound to true.
21653 (read_declarations): Add case for macro definition.
21654 (copy_identifier): New.
6fc74234 21655 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
21656 rather than lex.
21657
26f609ff
RA
216582001-08-25 Robert Anisko <robert.anisko@epita.fr>
21659
21660 * src/output.c (prepare): Add prefixed names.
21661 (output_parser): Output semantic actions.
21662 (output_parser): Fix bug on '%%line' directives.
6fc74234 21663
26f609ff
RA
21664 * src/output.c (output_headers): Remove. The C code printed by this
21665 function should now be in the skeletons.
21666 (output_trailers): Remove.
21667 (output): Disable call to 'reader_output_yylsp'.
21668 (output_rule_data): Do not output tables to the table obstack.
21669
21670 * src/output.c: Remove some C dedicated output.
21671 Improve the use of macro and output obstacks.
21672 (output_defines): Remove.
6fc74234 21673
26f609ff
RA
21674 * src/output.c (output_token_translations): Associate 'translate'
21675 table with a macro. No output to the table obstack.
21676 (output_gram): Same for 'rhs' and 'prhs'.
21677 (output_stos): Same for 'stos'.
21678 (output_rule_data): Same for 'r1' and 'r2'.
21679 (token_actions): Same for 'defact'.
21680 (goto_actions): Same for 'defgoto'.
21681 (output_base): Same for 'pact' and 'pgoto'.
21682 (output_table): Same for 'table'.
21683 (output_check): Same for 'check'.
6fc74234 21684
26f609ff
RA
21685 * src/output.c (output_table_data): New function.
21686 (output_short_table): Remove.
21687 (output_short_or_char_table): Remove.
6fc74234 21688
26f609ff
RA
21689 * src/output.c (output_parser): Replace most of the skeleton copy code
21690 with something new. Skeletons are now processed character by character
21691 rather than line by line, and Bison looks for '%%' macros. This is the
21692 first step in making Bison's output process (a lot) more flexible.
21693 (output_parser): Use the macro table.
21694
6f43b113
RA
216952001-08-25 Robert Anisko <robert.anisko@epita.fr>
21696
21697 * src/main.c (main): Initialize the macro table.
21698
dd3127cf
RA
216992001-08-25 Robert Anisko <robert.anisko@epita.fr>
21700
21701 * src/lex.c (percent_table): Add tok_define.
21702 * src/lex.h: Add tok_define.
21703
aa321494
RA
217042001-08-25 Robert Anisko <robert.anisko@epita.fr>
21705
21706 * src/macrotab.c: New file.
21707 * src/macrotab.h: New file.
21708 * src/Makefile.am: Update.
21709
68bd3b6b
RA
217102001-08-25 Robert Anisko <robert.anisko@epita.fr>
21711
21712 * lib/hash.c: New file.
21713 * lib/hash.h: New file.
21714 * lib/Makefile.am: Update.
21715
45f8dd1e
AD
217162001-08-15 Akim Demaille <akim@epita.fr>
21717
21718 Version 1.28c.
21719
40a64a7a 217202001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
21721
21722 * src/reader.c (readgram): Indent output macro YYSTYPE.
21723 (packsymbols): Likewise.
21724 (output_token_defines): Likewise.
21725 * src/files.c: Standardize.
21726 (compute_header_macro): New.
21727 (defines_obstack_save): New. Use compute_header_macro.
21728 (output_files): Update. Use defines_obstack_save.
21729
f9a8293a
AD
217302001-08-15 Akim Demaille <akim@epita.fr>
21731
21732 * doc/bison.texinfo (Table of Symbols): Document
21733 YYSTACK_USE_ALLOCA.
21734
150ca7a7
AD
217352001-08-15 Akim Demaille <akim@epita.fr>
21736
21737 * missing: Update from CVS Automake.
21738 * config/config.guess, config/config.sub, config/texinfo.tex:
21739 Update from gnu.org.
21740
69b5cec4
AD
217412001-08-15 Akim Demaille <akim@epita.fr>
21742
21743 * Makefile.maint: Sync with CVS Autoconf.
21744
f2b5126e
PB
217452001-08-14 Pascal Bart <pascal.bart@epita.fr>
21746
69b5cec4 21747 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
21748 `fdl.texi'.
21749 * doc/fdl.texi: Add to package.
21750
4ecbf796
MA
217512001-08-14 Marc Autret <autret_m@epita.fr>
21752
21753 Turn on %{source,header}_extension features.
21754
69b5cec4 21755 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
21756 source_extension.
21757 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 21758 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
21759 between options.
21760
95fb5662
MA
217612001-08-14 Marc Autret <autret_m@epita.fr>
21762
21763 * src/files.c (compute_base_names): Add extensions computing when
21764 `--file-prefix' used.
21765 Standardize function calls.
21766
78d09da9
MA
217672001-08-13 Marc Autret <autret_m@epita.fr>
21768
69b5cec4 21769 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
21770 defining it (defined but null disables alloca).
21771
5a009f2c
MA
217722001-08-13 Marc Autret <autret_m@epita.fr>
21773
21774 * src/bison.simple (_yy_memcpy): CPP reformat.
21775
1e41465a
PB
217762001-08-13 Pascal Bart <pascal.bart@epita.fr>
21777
21778 * tests/atconfig.in (CPPFLAGS): Fix.
21779
c67a198d
PB
217802001-08-10 Pascal Bart <pascal.bart@epita.fr>
21781
79282c6c 21782 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
21783 `gpl.texi'.
21784 * doc/gpl.texi: Add to package.
21785
09a6de7e
MA
217862001-08-10 Marc Autret <autret_m@epita.fr>
21787
21788 * src/print_graph.h: Fix.
21789 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21790
b77b9ee0
AD
217912001-08-10 Akim Demaille <akim@epita.fr>
21792
21793 * src/system.h: Provide default declarations for stpcpy, strndup,
21794 and strnlen.
21795
3e259915
MA
217962001-08-10 Robert Anisko <anisko_r@epita.fr>
21797
21798 * doc/bison.texinfo (Locations): Update @$ stuff.
21799
ca96bc2d
MA
218002001-08-09 Robert Anisko <anisko_r@epita.fr>
21801
21802 * src/bison.simple (YYLLOC_DEFAULT): Update.
21803 (yyparse): Adjust.
21804
fdc6758b
MA
218052001-08-08 Marc Autret <autret_m@epita.fr>
21806
b77b9ee0 21807 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
21808 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21809 Reported by Fabrice Bauzac.
957d4dbf 21810
600cad3b
MA
218112001-08-08 Marc Autret <autret_m@epita.fr>
21812
21813 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21814 * src/vcg.c (output_node): Fix.
21815 * src/vcg.h: Cleanup.
21816 * src/print_graph.c: Add comments.
b77b9ee0 21817 (node_output_size): New global variable. Simplify the formatting of
600cad3b 21818 the VCG graph output.
b77b9ee0 21819 (print_actions): Unused code is now used. It notifies the final state
600cad3b 21820 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 21821 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
21822 blue.
21823 Get the current node name and node_obstack by argument.
21824 (node_obstack): New variable.
21825 (print_state): Manage node_obstack.
21826 (print_core): Use node_obstack given by argument.
21827 A node is not only computed here but in print_actions also.
21828 (print_graph): CPP out useless code instead of commenting it.
21829
976e528f
AD
218302001-08-07 Pascal Bart <pascal.bart@epita.fr>
21831
21832 * tests/atconfig.in (CPPFLAGS): Fix.
21833
20e8e5ca
AD
218342001-08-07 Akim Demaille <akim@epita.fr>
21835
21836 * src/print_graph.c (quote): New.
21837 (print_core): Use it.
21838
957d4dbf 218392001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 21840
3e3da797
AD
21841 * src/vcg.c (complain.h): Include it.
21842 Unepitaize `return' invocations.
c4b66126 21843 [NDEBUG] (main): Remove.
79282c6c 21844 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
21845 * src/files.c (open_files): Initialize graph_obstack.
21846 * src/print_graph.c (print_actions): CPP out useless code.
21847 (print_core): Don't output the last `\n' in labels.
21848 Use `quote'.
21849 * src/files.c (output_files): Output the VCG file.
21850 * src/main.c (main): Invoke print_graph ();
3e3da797 21851
957d4dbf 218522001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
21853
21854 Automaton VCG graph output.
21855 Using option ``-g'' or long option ``--graph'', you can generate
21856 a gram_filename.vcg file containing a VCG description of the LALR (1)
21857 automaton of your grammar.
21858
21859 * src/main.c: Call to print_graph() function.
21860 * src/getargs.h: Update.
21861 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21862 (graph_flag): New flag.
21863 (longopts): Update.
21864 (getargs): Add case `g'.
21865 * src/files.c (graph_obstack): New obstack struct.
21866 (open_files): Initialize new obstack.
21867 (output_files): Saves graph_obstack if required.
21868 * src/files.h (graph_obstack): New extern declaration.
21869 * src/Makefile.am: Add new source files.
21870
927c1557 218712001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
21872
21873 * src/print_graph.c, src/print_graph.h (graph): New.
21874 * src/vcg.h: New file.
21875 * src/vcg.c: New file, VCG graph handling.
21876
7333d403
AD
218772001-08-06 Marc Autret <autret_m@epita.fr>
21878
21879 Add of %source_extension and %header_extension which specify
21880 the source or/and the header output file extension.
21881
21882 * src/files.c (compute_base_names): Remove initialisation of
21883 src_extension and header_extension.
21884 (compute_exts_from_gf): Update.
21885 (compute_exts_from_src): Update.
21886 (output_files): Update.
21887 * src/reader.c (parse_header_extension_decl): New.
21888 (parse_source_extension_decl): New.
21889 (read_declarations): New case statements for the new tokens.
21890 * src/lex.c (percent_table): Add entries for %source_extension
21891 and %header_extension.
21892 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21893
84163231
AD
218942001-08-06 Marc Autret <autret_m@epita.fr>
21895
21896 * configure.in: Bump to 1.28c.
21897 * doc/bison.texinfo: Texinfo thingies.
21898
8303fc42
AD
218992001-08-04 Pascal Bart <pascal.bart@epita.fr>
21900
21901 * tests/atconfig.in (CPPFLAGS): Add.
21902 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21903
70a84437
AD
219042001-08-03 Akim Demaille <akim@epita.fr>
21905
21906 Version 1.28b.
21907
2ce10144
AD
219082001-08-03 Akim Demaille <akim@epita.fr>
21909
21910 * tests/Makefile.am (check-local): Ship testsuite.
21911 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21912 Include `string.h'.
21913
1e3e4bc1
AD
219142001-08-03 Akim Demaille <akim@epita.fr>
21915
21916 * configure.in: Try using -Wformat when compiling.
21917
42b45b7f
AD
219182001-08-03 Akim Demaille <akim@epita.fr>
21919
21920 * configure.in: Bump to 1.28b.
21921
8f13fe33
AD
219222001-08-03 Akim Demaille <akim@epita.fr>
21923
21924 * src/complain.c: Adjust strerror_r portability issues.
21925
b37ba92c
AD
219262001-08-03 Akim Demaille <akim@epita.fr>
21927
21928 Version 1.28a.
21929
b0ce6046
AD
219302001-08-03 Akim Demaille <akim@epita.fr>
21931
21932 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21933 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21934 * src/getargs.c: Include complain.h.
21935 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21936 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21937
d01c415b
AD
219382001-08-03 Akim Demaille <akim@epita.fr>
21939
21940 * src/reader.c (readgram): Display hidden chars in error messages.
21941
459dd1a6
AD
219422001-08-03 Akim Demaille <akim@epita.fr>
21943
21944 Update to gettext 0.10.39.
21945
53b74c0c
AD
219462001-08-03 Akim Demaille <akim@epita.fr>
21947
21948 * lib/strspn.c: New.
21949
234a3be3
AD
219502001-08-01 Marc Autret <autret_m@epita.fr>
21951
21952 * doc/bison.texinfo: Update.
21953 * doc/bison.1 (mandoc): Update.
21954 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21955 * src/files.c: Support output files extensions computing.
21956 (src_extension): New static variable.
21957 (header_extension): New static variable.
21958 (tr): New function.
21959 (get_extension_index): New function, gets the index of an extension
21960 filename in a string.
21961 (compute_exts_from_gf): New function, computes extensions from the
21962 grammar file extension.
21963 (compute_exts_from_src): New functions, computes extensions from the
21964 C source file extension, file given by ``-o'' option.
21965 (compute_base_names): Update.
21966 (output_files): Update.
21967
847bf1f5
AD
219682001-08-01 Robert Anisko <anisko_r@epita.fr>
21969
d995fee7 21970 * doc/bison.texi: Document @$.
847bf1f5
AD
21971 (Locations): New section.
21972
d074a105
AD
219732001-07-18 Akim Demaille <akim@epita.fr>
21974
21975 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21976 * config/prev-version.txt, config/move-if-change: New.
21977 * Makefile.am: Adjust.
21978
3419715d
AD
219792001-07-08 Pascal Bart <pascal.bart@epita.fr>
21980
21981 * src/bison.simple (yyparse): Suppress warning `comparaison
21982 between signed and unsigned'.
21983
62ab6972
AD
219842001-07-05 Pascal Bart <pascal.bart@epita.fr>
21985
21986 * src/getargs.h (raw_flag): Remove.
21987 * src/getargs.c: Die on `-r'/`--raw'.
21988 * src/lex.c (parse_percent_token): Die on `%raw'.
21989 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21990 * tests/calc.at: Suppress test with option `--raw'.
21991
1e24cc5b
AD
219922001-07-14 Akim Demaille <akim@epita.fr>
21993
21994 * config/: New.
21995 * configure.in: Require Autoconf 2.50.
21996 Update to gettext 0.10.38.
21997
32dfccf8
AD
219982001-03-16 Akim Demaille <akim@epita.fr>
21999
22000 * doc/bison.texinfo: ANSIfy the examples.
22001
cd5bd6ac
AD
220022001-03-16 Akim Demaille <akim@epita.fr>
22003
22004 * getargs.c (skeleton): New variable.
22005 (longopts): --skeleton is a new option.
22006 (shortopts, getargs): -S is a new option.
22007 * getargs.h: Declare skeleton.
22008 * output.c (output_parser): Use it.
22009
5141b016
AD
220102001-03-16 Akim Demaille <akim@epita.fr>
22011
22012 * m4/strerror_r.m4: New.
22013 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22014 * lib/error.h, lib/error.c: Update.
22015
447992b9
AD
220162001-03-16 Akim Demaille <akim@epita.fr>
22017
22018 * src/getargs.c (longopts): Clean up.
22019
274d42ce
AD
220202001-02-21 Akim Demaille <akim@epita.fr>
22021
22022 * src/reader.c (gensym): `gensym_count' is your own.
22023 Use a static buf to create the symbol name, as token_buffer is no
22024 longer a buffer.
22025
22c821f3
AD
220262001-02-08 Akim Demaille <akim@epita.fr>
22027
22028 * src/conflicts.c (conflict_report): Be sure not to append to res
22029 between two calls, which could happen if both first sprintf were
22030 skipped, but not the first cp += strlen.
22031
18569462
AD
220322001-02-08 Akim Demaille <akim@epita.fr>
22033
22034 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22035 New, from fileutils 4.0.37.
22036 * configure.in: Require Autoconf 2.49c. I took some time before
22037 making this decision. This is the only way out for portability
22038 issues in Bison, it would mean way too much duplicate effort to
22039 import in Bison features implemented in 2.49c since 2.13.
22040 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22041
0d8f3c8a
AD
220422001-02-02 Akim Demaille <akim@epita.fr>
22043
22044 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 22045 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 22046
f17bcd1f
AD
220472001-01-19 Akim Demaille <akim@epita.fr>
22048
22049 Get rid of the ad hoc handling of token_buffer in the scanner: use
22050 the obstacks.
22051
22052 * src/lex.c (token_obstack): New.
22053 (init_lex): Initialize it. No longer call...
22054 (grow_token_buffer): this. Remove it.
22055 Adjust all the places which used it to use the obstack.
22056
511e79b3
AD
220572001-01-19 Akim Demaille <akim@epita.fr>
22058
22059 * src/lex.h: Rename all the tokens:
22060 s/\bENDFILE\b/tok_eof/g;
22061 s/\bIDENTIFIER\b/tok_identifier/g;
22062 etc.
22063 Let them be enums, not #define, to ease debugging.
22064 Adjust all the code.
22065
0d6508ef
AD
220662001-01-18 Akim Demaille <akim@epita.fr>
22067
22068 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22069 * src/lex.c (maxtoken, grow_token_buffer): Static.
22070
6deb4447
AD
220712001-01-18 Akim Demaille <akim@epita.fr>
22072
22073 Since we now use obstacks, more % directives can be enabled.
22074
22075 * src/lex.c (percent_table): Also accept `%yacc',
22076 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22077 `%debug'.
22078 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22079 instead of returning a token.
22080 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22081 * src/reader.c (read_declarations): Adjust.
22082 * src/files.c (open_files): Don't call `compute_base_names', don't
22083 compute `attrsfile' since they depend upon data which might be
22084 *in* the input file now.
22085 (output_files): Do it here.
22086 * src/output.c (output_headers): Document the fact that this patch
22087 introduces a guaranteed SEGV for semantic parsers.
22088 * doc/bison.texinfo: Document them.
22089 * tests/suite.at: Exercise these %options.
22090
ff4423cc
AD
220912000-12-20 Akim Demaille <akim@epita.fr>
22092
22093 Also handle the output file (--verbose) with obstacks.
22094
22095 * files.c (foutput): Remove.
22096 (output_obstack): New.
22097 Adjust all dependencies.
22098 * src/conflicts.c: Return a string.
22099 * src/system.h (obstack_grow_string): Rename as...
22100 (obstack_sgrow): this. Be ready to work with non literals.
22101 (obstack_fgrow4): New.
22102
956dba3a
AD
221032000-12-20 Akim Demaille <akim@epita.fr>
22104
22105 * src/files.c (open_files): Fix the computation of short_base_name
22106 in the case of `-o foo.tab.c'.
22107
337bab46
AD
221082000-12-20 Akim Demaille <akim@epita.fr>
22109
22110 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22111 (copy_dollar): Now that everything uses obstacks, get rid of the
22112 FILE * parameters.
22113
5d3214b8
AD
221142000-12-20 Akim Demaille <akim@epita.fr>
22115
22116 * src/files.c (open_files): Actually the `.output' file is based
22117 on the short_base_name, not base_name.
22118 * tests/suite.at (Checking output file names): Adjust.
22119
29092a57
AD
221202000-12-20 Akim Demaille <akim@epita.fr>
22121
22122 * src/bison.s1: Remove, we now use directly...
22123 * src/bison.simple: this.
22124 * src/Makefile.am: Use pkgdata instead of data.
22125
ea5607fd
AD
221262000-12-20 Akim Demaille <akim@epita.fr>
22127
22128 * src/files.c (guard_obstack): New.
22129 (open_files): Initialize it.
22130 (output_files): Dump it...
22131 * src/files.h: Export it.
22132 * src/reader.c (copy_guard): Use it.
22133
27110317
AD
221342000-12-19 Akim Demaille <akim@epita.fr>
22135
22136 * src/files.c (outfile, defsfile, actfile): Removed as global
22137 vars.
22138 (open_files): Don't compute them.
22139 (output_files): Adjust.
22140 (base_name, short_base_name): Be global.
22141 Adjust dependencies.
22142
19c50364
AD
221432000-12-19 Akim Demaille <akim@epita.fr>
22144
22145 * src/files.c (strsuffix): New.
22146 (stringappend): Be just like strcat but allocate.
22147 (base_names): Eve out from open_files.
22148 Try to simplify the rather hairy computation of base_name and
22149 short_base_name.
22150 (open_files): Use it.
22151 * tests/suite.at (Checking output file names): New test.
22152
573c1d9f
AD
221532000-12-19 Akim Demaille <akim@epita.fr>
22154
22155 * src/system.h (obstack_grow_literal_string): Rename as...
22156 (obstack_grow_string): this.
22157 * src/output.c (output_parser): Recognize `%% actions' instead of
22158 `$'.
22159 * src/bison.s1: s/$/%% actions/.
22160 * src/bison.hairy: Likewise.
22161
ef7ddedd
AD
221622000-12-19 Akim Demaille <akim@epita.fr>
22163
22164 * src/output.c (output_parser): Compute the `#line' lines when
22165 there are.
22166 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22167 Suggested by Hans Aberg.
22168
ff61dabd
AD
221692000-12-19 Akim Demaille <akim@epita.fr>
22170
22171 Let the handling of the skeleton files be local to the procedures
22172 that use it.
22173
22174 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22175 longer static.
22176 (fparser, open_extra_files): Remove.
22177 (open_files, output_files): Don't take care of fparser.
22178 * src/files.h: Adjust.
22179 * src/output.c (output_parser): Open and close the file to the
22180 skeleton.
22181 * src/reader.c (read_declarations): When %semantic_parser, open
22182 fguard.
22183
55b96341
AD
221842000-12-19 Akim Demaille <akim@epita.fr>
22185
22186 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22187 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22188
358c15b7
AD
221892000-12-19 Akim Demaille <akim@epita.fr>
22190
22191 * src/files.c (open_files): Yipee! We no longer need all the code
22192 looking for `/tmp' since we have no tmp file.
22193
7de3329e
AD
221942000-12-19 Akim Demaille <akim@epita.fr>
22195
22196 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22197 New macros.
22198 * src/files.c (open_files): Less dependency on MSDOS etc.
22199
3abcd459
AD
222002000-12-14 Akim Demaille <akim@epita.fr>
22201
22202 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22203 Provide a default definition.
22204 Use it when executing the default @ action.
22205 * src/reader.c (reader_output_yylsp): No longer include
22206 `timestamp' and `text' in the default YYLTYPE.
22207
2a91a95e
AD
222082000-12-12 Akim Demaille <akim@epita.fr>
22209
22210 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22211 (copy_guard): Quote the file names.
22212 Reported by Laurent Mascherpa.
22213
14d3eb9b
AD
222142000-12-12 Akim Demaille <akim@epita.fr>
22215
22216 * src/output.c (output_headers, output_program, output): Be sure
22217 to escape special characters when outputting filenames.
22218 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22219 (output_headers): Don't depend on them, Use ACTSTR.
22220
d7045ec6
AD
222212000-11-17 Akim Demaille <akim@epita.fr>
22222
22223 * lib/obstack.h: Formatting changes.
22224 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22225 prevents type checking.
22226 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22227 cast the value to (void *): assigning a `foo *' to a `void *'
22228 variable is valid.
22229 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22230 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22231 append characters.
22232
6fd54b73
AD
222332000-11-17 Akim Demaille <akim@epita.fr>
22234
22235 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22236 as...
22237 (suite.m4, regression.m4, calc.m4): these.
22238 * tests/atgeneral.m4: Update from CVS Autoconf.
22239
4c50eae6
AD
222402000-11-17 Akim Demaille <akim@epita.fr>
22241
22242 * tests/regression.m4 (%union and --defines): New test,
22243 demonstrating a current bug in the obstack implementation.
22244
a35f64ea
AD
222452000-11-17 Akim Demaille <akim@epita.fr>
22246
22247 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22248 macros.
22249 Use them to declare the variables which are global or local to
22250 `yyparse'.
22251
7de23534
AD
222522000-11-17 Akim Demaille <akim@epita.fr>
22253
22254 * acconfig.h: Remove, no longer used.
22255
aa7815f5
AD
222562000-11-07 Akim Demaille <akim@epita.fr>
22257
22258 * src: s/Copyright (C)/Copyright/g.
22259
5af1f549
AD
222602000-11-07 Akim Demaille <akim@epita.fr>
22261
22262 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22263 defining.
22264 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22265
553e2b22
AD
222662000-11-07 Akim Demaille <akim@epita.fr>
22267
22268 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22269 Merge in a single CPP if/else.
22270
8a4f41d6
AD
222712000-11-07 Akim Demaille <akim@epita.fr>
22272
22273 * src/output.c (output): Remove useless variables.
22274 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22275 argument `data' for consistency with the prototypes.
22276 Qualify it `const'.
22277 (obstack_copy, obstack_copy0): Rename the second argument as
22278 `address' for consistency. Qualify it `const'.
22279 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22280 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22281 `const' their input argument (`data' or `address').
22282 Adjust the corresponding macros to include `const' in casts.
22283
095a3fb5
AD
222842000-11-03 Akim Demaille <akim@epita.fr>
22285
22286 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22287 s/PFILE1/BISON_HAIRY/.
22288 Adjust dependencies.
22289
d1cdce7c
AD
222902000-11-03 Akim Demaille <akim@epita.fr>
22291
090c5ebf 22292 For some reason, this was not applied.
d1cdce7c
AD
22293
22294 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22295 `unlink': it's no longer used.
22296
9311529b
AD
222972000-11-03 Akim Demaille <akim@epita.fr>
22298
22299 * src/files.c (skeleton_find): New function, eved out of...
22300 (open_files, open_extra_files): here.
22301
d8880f69
AD
223022000-11-03 Akim Demaille <akim@epita.fr>
22303
22304 Don't use `atexit'.
22305
22306 * src/files.c (obstack_save): New function.
22307 (done): Rename as...
22308 (output_files): this.
22309 Use `obstack_save'.
22310 * src/main.c (main): Don't use `atexit' to register `done', since
22311 it no longer has to remove tmp files, just call `output_files'
22312 when there are no errors.
22313
0dbb648e
AD
223142000-11-02 Akim Demaille <akim@epita.fr>
22315
22316 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22317 `unlink': it's no longer used.
22318 * src/files.h: Formatting changes.
22319
896fe5c1
AD
223202000-11-02 Akim Demaille <akim@epita.fr>
22321
22322 Remove the last uses of mktemp and unlink/delete.
22323
22324 * src/files.c (fdefines, ftable): Removed.
22325 (defines_ostack, table_obstack): New.
22326 Adjust dependencies of the former into uses of the latter.
22327 * src/output.c (output_short_or_char_table, output_short_table):
22328 Convert to using obstacks.
22329 * src/reader.c (copy_comment2): Accept one FILE * and two
22330 obstacks.
22331 (output_token_defines, reader_output_yylsp): Use obstacks.
22332 * src/system.h (obstack_fgrow3): New.
1f65350a 22333 * po/POTFILES.in: Adjust.
896fe5c1 22334
dd60faec
AD
223352000-11-01 Akim Demaille <akim@epita.fr>
22336
22337 Change each use of `fattrs' into a use of `attrs_obstack'.
22338
22339 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22340 * src/files.c (fattrs): Remove.
22341 (attrs_obstack): New.
22342 Adjust all dependencies.
22343 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22344
8c7ebe49
AD
223452000-11-01 Akim Demaille <akim@epita.fr>
22346
22347 Introduce obstacks.
22348 Change each use of `faction' into a use of `action_obstack'.
22349
22350 * lib/obstack.h, lib/obstack.c: New files.
22351 * src/files.c (faction): Remove.
22352 (action_obstack): New.
22353 Adjust all dependencies.
22354
77aee789
AD
223552000-10-20 Akim Demaille <akim@epita.fr>
22356
22357 * lib/quote.h (PARAMS): New macro. Use it.
22358
43591cec
AD
223592000-10-16 Akim Demaille <akim@epita.fr>
22360
22361 * src/output.c (output_short_or_char_table): New function.
22362 (output_short_table, output_token_translations): Use it.
22363 (goto_actions): Use output_short_table.
22364
1e9798d5
AD
223652000-10-16 Akim Demaille <akim@epita.fr>
22366
22367 * src/symtab.c (bucket_new): New function.
22368 (getsym): Use it.
22369
22370 * src/output.c (output_short_table): New argument to display the
22371 comment associated with the table.
22372 Adjust dependencies.
22373 (output_gram): Use it.
22374 (output_rule_data): Nicer output layout for YYTNAME.
22375
f282676b
AD
223762000-10-16 Akim Demaille <akim@epita.fr>
22377
22378 * src/lex.c (read_typename): New function.
22379 (lex): Use it.
22380 * src/reader.c (copy_dollar): Likewise.
22381
550a72a3
AD
223822000-10-16 Akim Demaille <akim@epita.fr>
22383
22384 * src/reader.c (copy_comment2): Expect the input stream to be on
22385 the `/' which is suspected to open a comment, instead of being
22386 called after `//' or `/*' was read.
22387 (copy_comment, copy_definition, parse_union_decl, copy_action)
22388 (copy_guard): Adjust.
22389
131e2fef
AD
223902000-10-16 Akim Demaille <akim@epita.fr>
22391
22392 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22393 `read_signed_integer'.
22394
79282c5a
AD
223952000-10-16 Akim Demaille <akim@epita.fr>
22396
22397 * src/reader.c (copy_dollar): New function.
22398 (copy_guard, copy_action): Use it.
22399
ff4a34be
AD
224002000-10-16 Akim Demaille <akim@epita.fr>
22401
22402 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22403 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22404 New files, from Fileutils 4.0.27.
22405 * src/main.c (printable_version): Remove.
22406 * src/lex.c, src/reader.c: Use `quote'.
22407
224082000-10-04 Akim Demaille <akim@epita.fr>
22409
22410 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22411
14ded682
AD
224122000-10-04 Akim Demaille <akim@epita.fr>
22413
22414 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22415
8e03724b
AD
224162000-10-04 Akim Demaille <akim@epita.fr>
22417
22418 When a literal string is used to define two different tokens,
22419 `bison -v' segfaults.
22420 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22421
22422 * tests/regression.m4: New file.
22423 Include the core of the sample provided by Piotr Gackiewicz.
22424 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22425 properly.
22426
a9e64249
AD
224272000-10-04 Akim Demaille <akim@epita.fr>
22428
22429 * src/reader.c (parse_expect_decl): Keep `count' within the size
22430 of `buffer'.
22431 From Neil Booth.
22432
da9abf43
AD
224332000-10-02 Paul Eggert <eggert@twinsun.com>
22434
22435 * bison.s1 (yyparse): Assign the default value
22436 unconditionally, to avoid a GCC warning and make the parser a
22437 tad smaller.
22438
c33638bb
AD
224392000-10-02 Akim Demaille <akim@epita.fr>
22440
22441 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22442 options.
22443
444c570a
AD
224442000-10-02 Akim Demaille <akim@epita.fr>
22445
22446 * src/derives.c, src/print.c, src/reduce.c: To ease the
22447 translation, move some `\n' out of the translated strings.
22448
89cab50d
AD
224492000-10-02 Akim Demaille <akim@epita.fr>
22450
22451 The location tracking mechanism is precious for parse error
22452 messages. Nevertheless, it is enabled only when `@n' is used in
22453 the grammar, which is a different issue (you can use it in error
22454 message, but not in the grammar per se). Therefore, there should
22455 be another means to enable it.
22456
22457 * src/getargs.c (getargs): Support `--locations'.
22458 (usage): Report it.
22459 * src/getargs.h (locationsflag): Export it.
22460 * src/lex.c (percent_table): Support `%locations'.
22461 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22462 with `locationsflag'.
22463 * doc/bison.texinfo: Document `--locations' and `%locations'.
22464 Sort the options.
22465 * tests/calc.m4: Test it.
22466
22467 For regularity of the names, replace each
22468 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22469 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22470 In addition replace each `flag' with `_flag'.
22471
d6c2cba0
AD
224722000-10-02 Akim Demaille <akim@epita.fr>
22473
22474 Also test parse error messages, including with YYERROR_VERBOSE.
22475
22476 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22477 associative).
22478 Use it to check the computations.
22479 Use it to check `nonassoc' is honored.
22480 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22481 `--yyerror-verbose'.
22482 (_AT_CHECK_CALC): Adjust to this option.
22483 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22484
5a35a6cb
AD
224852000-10-02 Akim Demaille <akim@epita.fr>
22486
22487 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22488 the latter demonstrates a flaw in the handling of non debugging
22489 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22490 was used in order to simplify:
22491
22492 #if YYDEBUG
22493 if (yydebug)
22494 {
22495 ...
22496 }
22497 #endif
22498
22499 into
22500
22501 if (yydebug)
22502 {
22503 ...
22504 }
22505
22506 unfortunately this leads to a CPP conflict when
22507 `--name-prefix=foo' is used since it produces `#define yydebug
22508 foodebug'.
22509
22510 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22511 (YYDPRINTF): New macro.
22512 Spread its use.
22513 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22514 the bison options.
22515 Also test `--verbose', `--defines' and `--name-prefix'.
22516
71da9eea
AD
225172000-10-02 Akim Demaille <akim@epita.fr>
22518
22519 Improve the readability of the produced parsers.
22520
22521 * src/bison.s1: Formatting changes.
22522 Improve the comment related to the `$' mark.
22523 (yydefault): Don't fall through to `yyresume': `goto' there.
22524 * src/output.c (output_parser): When the `$' is met, skip the end
22525 of its line.
22526 New variable, `number_of_dollar_signs', to check there's exactly
22527 one `$' in the parser skeleton.
22528
95e36146
AD
225292000-10-02 Akim Demaille <akim@epita.fr>
22530
22531 * lib/xstrdup.c: New file, from the fileutils.
22532 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22533 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22534 instead of strlen + xmalloc + strcpy.
22535 * src/symtab.c (copys): Remove, use xstrdup instead.
22536
d7020c20
AD
225372000-10-02 Akim Demaille <akim@epita.fr>
22538
22539 * src/gram.h (associativity): New enum type which replaces the
22540 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22541 `right_assoc', `left_assoc' and `non_assoc'.
22542 Adjust all dependencies.
22543 * src/reader.c: Formatting changes.
22544 (LTYPESTR): Don't define it, use it as a literal in
22545 `reader_output_yylsp'.
22546 * src/symtab.h (symbol_class): New enum type which replaces the
22547 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22548 `sunknown', `stoken and `snterm'.
22549
1916f98e
AD
225502000-10-02 Akim Demaille <akim@epita.fr>
22551
22552 * src/getargs.c (fixed_outfiles): Rename as...
22553 (yaccflag): for consistency and accuracy.
22554 Adjust dependencies.
22555
d7913476
AD
225562000-10-02 Akim Demaille <akim@epita.fr>
22557
22558 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22559 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22560 difficult and introduced a lot of core dump. It turns out that
22561 Bison used an implementation of `xmalloc' based on `calloc', and
22562 at various places it does depend upon the initialization to 0. I
22563 have not tried to isolate the pertinent places, and all the former
22564 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22565 someone should address this issue.
22566
22567 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22568 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22569 files.
22570 Adjust dependencies.
22571 * src/warshall.h: New file.
22572 Propagate.
22573
340ef489
AD
225742000-10-02 Akim Demaille <akim@epita.fr>
22575
22576 Various anti-`extern in *.c' changes.
22577
22578 * src/system.h: Include `assert.h'.
22579
b2ca4022
AD
225802000-10-02 Akim Demaille <akim@epita.fr>
22581
22582 * src/state.h (nstates, final_state, first_state, first_shift)
22583 (first_reduction): Move their exportation from here...
22584 * src/LR0.h: to here.
22585 Adjust dependencies.
22586 * src/getargs.c (statisticsflag): New variable.
22587 Add support for `--statistics'.
22588 Adjust dependencies.
22589
22590 Remove a lot of now useless `extern' statements in most files.
22591
403b315b
AD
225922000-10-02 Akim Demaille <akim@epita.fr>
22593
22594 * src/LR0.h: New file.
22595 Propagate its use.
22596
07a58c13
AD
225972000-10-02 Akim Demaille <akim@epita.fr>
22598
22599 * src/print.h: New file.
22600 Propagate its use.
22601 * src/print.c: Formatting and ordering changes.
22602 (verbose, terse): Replace with...
22603 (print_results): this new function.
22604 Adjust dependencies.
22605
0619caf0
AD
226062000-10-02 Akim Demaille <akim@epita.fr>
22607
22608 * src/conflicts.c (conflict_report): New function.
22609 (conflict_log, verbose_conflict_log): Replace with...
22610 (print_conflicts): this function.
22611 Adjust dependencies.
22612 * src/conflicts.h: New file.
22613 Propagate its inclusion.
22614
3519ec76
AD
226152000-10-02 Akim Demaille <akim@epita.fr>
22616
22617 * src/nullable.h: New file.
22618 Propagate its inclusion.
22619 * src/nullable.c: Formatting changes.
22620
015acc48
AD
226212000-10-02 Akim Demaille <akim@epita.fr>
22622
22623 * src/reduce.h: New file.
22624 Propagate its inclusion.
22625 * src/reduce.c: Topological sort and other formatting changes.
22626 (bool, TRUE, FALSE): Move their definition to...
22627 * src/system.h: here.
22628
8963a27b
AD
226292000-10-02 Akim Demaille <akim@epita.fr>
22630
22631 * src/files.c: Formatting changes.
22632 (tryopen, tryclose, openfiles): Rename as...
22633 (xfopen, xfclose, open_files): this.
22634 (stringappend): static.
22635 * src/files.h: Complete the list of exported symbols.
22636 Propagate its use.
22637
a70083a3
AD
226382000-10-02 Akim Demaille <akim@epita.fr>
22639
22640 * src/reader.h: New file.
22641 Propagate its use instead of tedious list of `extern' and
22642 prototypes.
22643 * src/reader.c: Formatting changes, topological sort,
22644 s/register//.
22645
abadc117
AD
226462000-10-02 Akim Demaille <akim@epita.fr>
22647
22648 * src/lex.h: Prototype `lex.c' exported functions.
22649 * src/reader.c: Adjust.
22650 * src/lex.c: Formatting changes.
22651 (safegetc): Rename as...
22652 (xgetc): this.
22653
720d742f
AD
226542000-10-02 Akim Demaille <akim@epita.fr>
22655
22656 * src/lalr.h: New file.
22657 Propagate its inclusion instead of prototypes and `extern'.
22658 * src/lalr.c: Formatting changes, topological sorting etc.
22659
f2acea59
AD
226602000-10-02 Akim Demaille <akim@epita.fr>
22661
22662 * src/output.c (token_actions): Introduce a temporary array,
22663 YYDEFACT, that makes it possible for this function to use
22664 output_short_table.
22665
d019d655
AD
226662000-10-02 Akim Demaille <akim@epita.fr>
22667
22668 `user_toknums' is output as a `short[]' in `output.c', while it is
22669 defined as a `int[]' in `reader.c'. For consistency with the
22670 other output tables, `user_toknums' is now defined as a table of
22671 shorts.
22672
22673 * src/reader.c (user_toknums): Be a short table instead of an int
22674 table.
22675 Adjust dependencies.
22676
22677 Factor the short table outputs.
22678
22679 * src/output.c (output_short_table): New function.
22680 * src/output.c (output_gram, output_stos, output_rule_data)
22681 (output_base, output_table, output_check): Use it.
22682
6c89f1c1
AD
226832000-10-02 Akim Demaille <akim@epita.fr>
22684
22685 * src/output.c (output): Topological sort of the functions, in
22686 order to get rid of the `static' prototypes.
22687 No longer use `register'.
22688 * src/output.h: New file.
22689 Propagate its inclusion in files explicitly prototyping functions
22690 from output.c.
22691
d9efd181
AD
226922000-09-21 Akim Demaille <akim@epita.fr>
22693
22694 * src/atgeneral.m4: Update from Autoconf.
22695
c29240e7 226962000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
22697
22698 * src/closure.h: New file.
22699 * src/closure.c: Formatting changes, topological sort over the
22700 functions, use of closure.h.
22701 (initialize_closure, finalize_closure): Rename as...
22702 (new_closure, free_closure): these. Adjust dependencies.
22703 * src/LR0.c: Formatting changes, topological sort, use of
22704 cloture.h.
22705 (initialize_states): Rename as...
22706 (new_states): this.
22707 * src/Makefile.am (noinst_HEADERS): Adjust.
22708
499daa50
AD
227092000-09-20 Akim Demaille <akim@epita.fr>
22710
22711 * src/acconfig.h: Don't protect config.h against multiple
22712 inclusion.
22713 Don't define PARAMS.
22714 * src/system.h: Define PARAMS.
22715 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22716 purpose of config.h. system.h must not try to fix wrong
22717 definitions in config.h.
22718
cc84fd5d
AD
227192000-09-20 Akim Demaille <akim@epita.fr>
22720
22721 * src/derives.h: New file.
22722 * src/main.c, src/derives.h: Use it.
22723 Formatting changes.
22724 * src/Makefile.am (noinst_HEADERS): Adjust.
22725
db5b3a89
AD
227262000-09-20 Akim Demaille <akim@epita.fr>
22727
22728 * tests/atgeneral.m4: Update from Autoconf.
22729 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22730 (AT_CHECK_CALC): New macros.
22731 Use these macros to test bison with options `', `--raw',
22732 `--debug', `--yacc', `--yacc --debug'.
22733
ceed8467
AD
227342000-09-19 Akim Demaille <akim@epita.fr>
22735
22736 * src/output.c: Formatting changes.
22737 * src/machine.h: Remove, leaving its contents in...
22738 * src/system.h: here.
22739 Include stdio.h.
22740 Adjust all dependencies on stdio.h and machine.h.
22741 * src/getargs.h: New file.
22742 Let all `extern' declarations about getargs.c be replaced with
22743 inclusion of `getargs.h'.
22744 * src/Makefile.am (noinst_HEADERS): Adjust.
22745
22746 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22747 scope.
22748 (yyerror): Returns void, not int.
22749 * doc/bison.texinfo: Formatting changes.
22750
05a1d24b
AD
227512000-09-19 Akim Demaille <akim@epita.fr>
22752
22753 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22754 portable.
22755
cbd25751
AD
227562000-09-18 Akim Demaille <akim@epita.fr>
22757
22758 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22759 * src/Makefile.am (INCLUDES): Don't.
22760 Be ready to fetch headers in lib/.
22761
13863333
AD
227622000-09-18 Akim Demaille <akim@epita.fr>
22763
22764 * doc/bison.texinfo: Update the copyright.
22765 ANSIfy and GNUify the examples.
22766 Remove the old menu.
22767
0d533154
AD
227682000-09-18 Akim Demaille <akim@epita.fr>
22769
22770 First set of tests: use the `calc' example from the documentation.
22771
22772 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22773 is defined only when YYDEBUG is.
22774 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22775 * src/files.c (tryopen, tryclose): Formatting changes.
22776 Move to the top and be static.
22777 * src/reader.c (read_signed_integer): Likewise.
22778 * tests/calc.m4: New file.
22779 * Makefile.am, suite.m4: Adjust.
22780 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22781
e79137ac
AD
227822000-09-18 Akim Demaille <akim@epita.fr>
22783
22784 Add support for an Autotest test suite for Bison.
22785
22786 * m4/m4.m4, m4/atconfig.m4: New files.
22787 * m4/Makefile.am (EXTRA_DIST): Adjust.
22788 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22789 files.
22790 * src/getargs.c: Display a more standard --version message.
22791 * src/reader.c (reader): Formatting changes.
22792 No longer depend upon VERSION_STRING.
22793 * configure.in: No longer use `dnl'.
22794 Set up the test suite and the new directory `tests/.
22795 (VERSION_STRING): Remove.
22796
27821bff
AD
227972000-04-14 Akim Demaille <akim@epita.fr>
22798
22799 * src/reader.c (copy_comment2): New function, same as former
22800 `copy_comment', but outputs into two FILE *.
22801 (copy_comment): Use it.
22802 (parse_union_decl): Use it.
22803 (get_type, parse_start_decl): Use the same `invalid' message.
22804 (parse_start_decl, parse_union_decl): Use the same `multiple'
22805 message.
22806 (parse_union_decl, copy_guard, copy_action): Use the same
22807 `unmatched' message.
22808 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22809
cfe5fbc0
AD
228102000-03-31 Akim Demaille <akim@epita.fr>
22811
22812 * src/files.c (tryopen, tryclose): Move to the top.
22813 Be static.
22814
cb7db13e
AD
228152000-03-31 Akim Demaille <akim@epita.fr>
22816
22817 * src/main.c (main): Don't call `done', exit does it.
22818
a0f6b076
AD
228192000-03-31 Akim Demaille <akim@epita.fr>
22820
36281465
AD
22821 * allocate.c: s/return (foo)/return foo/.
22822 * lalr.c: Likewise.
22823 * LR0.c: Likewise.
22824 * output.c: Likewise.
22825 * reader.c: Likewise.
22826 * symtab.c: Likewise.
22827 * vmsgetargs.c: Likewise.
22828
228292000-03-31 Akim Demaille <akim@epita.fr>
22830
22831 Clean up the error reporting functions.
a0f6b076
AD
22832
22833 * src/report.c: New file.
22834 * src/report.h: Likewise.
22835 * src/Makefile.am: Adjust.
22836 * m4/error.m4: New file.
22837 * m4/Makefile.am: Adjust.
22838 * configure.in (jm_PREREQ_ERROR): Call it.
22839 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22840 Remove.
22841 (fatal, fatals): Remove. All callers use complain.c::fatal.
22842 (warn, warni, warns, warnss, warnss): Remove. All callers use
22843 complain.c::complain.
22844 (toomany): Remove, use fatal instead.
22845 * src/files.c (done): No argument, use complain_message_count.
22846 * src/main.c (main): Register `done' to `atexit'.
22847
22848 * src/getargs.c (usage): More `fputs', less `fprintf'.
22849
18539825
AD
228502000-03-28 Akim Demaille <akim@epita.fr>
22851
22852 * lib/: New directory.
22853 * Makefile.am (SUBDIRS): Adjust.
22854 * configure.in: Adjust.
22855 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22856 useless.
22857 * src/alloca.c: Moved to lib/.
22858 * src/getopt.c: Likewise.
22859 * src/getopt1.c: Likewise.
22860 * src/getopt.h: Likewise.
22861 * src/ansi2knr.c: Likewise.
22862 * src/ansi2knr.1: Likewise.
22863 * src/Makefile.am: Adjust.
22864 * lib/Makefile.am: New file.
22865
9f306f2a
AD
228662000-03-28 Akim Demaille <akim@epita.fr>
22867
22868 * src/getargs.c (usage): Refresh the help message.
22869
0ba347b6
AD
228702000-03-17 Akim Demaille <akim@epita.fr>
22871
22872 * src/getopt1.c: Updated from textutils 2.0e
22873 * src/getopt.c: Likewise.
22874 * src/getopt.h: Likewise.
22875
dbe7f271
AD
228762000-03-17 Akim Demaille <akim@epita.fr>
22877
22878 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22879 the file name, not the whole `#line LINE FILE'.
22880
75bbe78d
AD
228812000-03-17 Akim Demaille <akim@epita.fr>
22882
22883 On syntax errors, report the token on which we choked.
22884
aa5fd0ee
AD
22885 * src/bison.s1 (yyparse): In the label yyerrlab, when
22886 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 22887
7b306f52
AD
228882000-03-17 Akim Demaille <akim@epita.fr>
22889
aa5fd0ee 22890 * src/reader.c (copy_at): New function.
7b306f52
AD
22891 (copy_guard): Use it.
22892 (copy_action): Use it.
22893
e87b5700
AD
228942000-03-17 Akim Demaille <akim@epita.fr>
22895
22896 Be kind to translators, save some useless translations.
22897
aa5fd0ee 22898 * src/main.c (banner): New function.
e87b5700
AD
22899 (fatal_banner): Use it.
22900 (warn_banner): Use it.
22901
ae3c3164
AD
229022000-03-17 Akim Demaille <akim@epita.fr>
22903
aa5fd0ee
AD
22904 * src/reader.c (copy_definition): Use copy_string and
22905 copy_comment. Removed now unused `match', `ended',
22906 `cplus_comment'.
ae3c3164
AD
22907 (copy_comment, copy_string): Moved, to be visible from
22908 copy_definition.
22909
4dc58e7c
AD
229102000-03-17 Akim Demaille <akim@epita.fr>
22911
aa5fd0ee
AD
22912 * src/reader.c (copy_string): Declare `static inline'. No
22913 problems with inline, since it is checked by configure.
4dc58e7c
AD
22914 (copy_comment): Likewise.
22915
0a6384c4
AD
229162000-03-17 Akim Demaille <akim@epita.fr>
22917
aa5fd0ee 22918 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 22919
3cef001a
AD
229202000-03-17 Akim Demaille <akim@epita.fr>
22921
aa5fd0ee 22922 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
22923 (copy_action): Use it. Removed now unused `match', `ended',
22924 `cplus_comment'.
22925 (copy_guard): Likewise.
22926
ca36d2ef
AD
229272000-03-17 Akim Demaille <akim@epita.fr>
22928
aa5fd0ee 22929 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
22930 (copy_action): Use it.
22931 (copy_guard): Likewise.
22932
6666f98f
AD
229332000-03-17 Akim Demaille <akim@epita.fr>
22934
22935 Change the handling of @s so that they behave exactly like $s.
22936 There is now a pseudo variable @$ (readble and writable), location
22937 of the lhs of the rule (by default ranging from the location of
22938 the first symbol of the rhs, to the location of the last symbol,
22939 or, if the rhs is empty, YYLLOC).
22940
22941 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22942 yyval.
22943 (yyparse): When providing a default semantic action, provide a
22944 default location action.
22945 (after the $): No longer change `*YYLSP', just stack YYLOC the
22946 same way you stack YYVAL.
22947 * src/reader.c (read_declarations): Use warns.
22948 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22949 (copy_action, case '@'): Likewise.
22950 Use a standard error message, to save useless work from
22951 translators.
22952
41aca2e0
AD
229532000-03-17 Akim Demaille <akim@epita.fr>
22954
aa5fd0ee
AD
22955 * src/bison.s1: Formatting and cosmetics changes.
22956 * src/reader.c: Likewise.
41aca2e0
AD
22957 Update the Copyright notice.
22958
dc08c1d5
AD
229592000-03-17 Akim Demaille <akim@epita.fr>
22960
aa5fd0ee
AD
22961 * src/bison.s1 (#line): All set to `#line' only, since the
22962 Makefile now handles them.
dc08c1d5 22963
9ee3c97b
AD
229642000-03-16 Akim Demaille <akim@epita.fr>
22965
22966 * src/output.c (output_rule_data): Output the documentation of
22967 some of the tables.
22968 (Copyright notice): Update.
22969 Formatting changes.
22970
0de741ca
AD
229712000-03-16 Akim Demaille <akim@epita.fr>
22972
22973 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22974 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22975 One `#if YYDEBUG' remains, since it uses variables which are
22976 defined only if `YYDEBUG != 0'.
22977
bb10be54
AD
229782000-03-16 Akim Demaille <akim@epita.fr>
22979
22980 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22981 and related variables so that the similarities are highlighted.
22982
b07b484a
AD
229832000-03-16 Akim Demaille <akim@epita.fr>
22984
22985 * src/bison.s1: Properly indent CPP directives.
22986
361f60b3
AD
229872000-03-16 Akim Demaille <akim@epita.fr>
22988
22989 * src/bison.s1: Properly indent the `alloca' CPP section.
22990
8c44d3ec
AD
229912000-03-16 Akim Demaille <akim@epita.fr>
22992
22993 Do not hard code values of directories in `configure.in'.
22994 Update the `configure' tool chain.
22995
22996 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22997 src/makefile.am.
22998 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22999 (AC_OUTPUT): Add m4/Makefile.
23000 Bump to bison 1.28a, 1.29 has never been released.
23001 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23002 handled via src/Makefile.am.
23003 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23004 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23005 autoheader.
23006 * Makefile.am (SUBDIRS): Add m4.
23007 (ACLOCAL_AM_FLAGS): New variable.
23008 (AUTOMAKE_OPTIONS): Add check-news.
23009 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23010 the proper line number and file name.
23011 (DEFS): Propagate the location of bison library files and of the
23012 locale files.
23013 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23014 builddir.
23015 * acinclude.m4: Remove, replaced by the directory m4.
23016 * m4/Makefile.am (EXTRA_DIST): New variable.
23017 * m4/gettext.m4: New file, from the fileutils.
23018 * m4/lcmessage.m4: Likewise
23019 * m4/progtest.m4: Likewise.
23020 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23021
f95997e7
AD
230222000-03-10 Akim Demaille <akim@epita.fr>
23023
23024 * src/closure.c:
23025 Formatting changes of various comments.
23026 Respect the GNU coding standards at various places.
23027 Don't use `_()' when no translation is needed.
23028
230291999-12-13 Jesse Thilo <jthilo@gnu.org>
23030
23031 * src/files.c:
23032 OS/2 honors TMPDIR environment variable.
23033
230341999-12-13 Jesse Thilo <jthilo@gnu.org>
23035
23036 * doc/bison.texinfo: Tweaked spelling and grammar.
23037 Updated ISBN.
23038 Removed reference to price of printed copy.
23039 Mention BISON_SIMPLE and BISON_HAIRY.
23040
230411999-12-13 Jesse Thilo <jthilo@gnu.org>
23042
23043 * configure.in, NEWS:
23044 Bison 1.29 released.
23045
230461999-10-27 Jesse Thilo <jthilo@gnu.org>
23047
23048 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23049 Added reference card.
23050
230511999-07-26 Jesse Thilo <jthilo@gnu.org>
23052
23053 * po/ru.po: Added Russian translation.
23054
230551999-07-26 Jesse Thilo <jthilo@gnu.org>
23056
23057 * configure.in: Added Russian translation.
23058
230591999-07-06 Jesse Thilo <jthilo@gnu.org>
23060
23061 * configure.in, NEWS, README:
23062 Released version 1.28.
23063
230641999-06-14 Jesse Thilo <jthilo@gnu.org>
23065
23066 * src/system.h:
23067 Squashed redefinition warning on some systems.
23068
23069 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23070 Have configure build version string instead of relying on ANSI string
23071 concatentation.
23072
230731999-06-14 Jesse Thilo <jthilo@gnu.org>
23074
23075 * po/POTFILES.in: Got rid of version.c.
23076
230771999-06-14 Jesse Thilo <jthilo@gnu.org>
23078
23079 * acconfig.h, configure.in:
23080 Have configure build version string instead of relying on ANSI string
23081 concatentation.
23082
230831999-06-08 Jesse Thilo <jthilo@gnu.org>
23084
23085 * doc/bison.1:
23086 Dropped mention of `+' for long-named options.
23087
230881999-05-30 Jesse Thilo <jthilo@gnu.org>
23089
23090 * src/files.c: Added <unistd.h> for unlink().
23091
23092 * src/Makefile.am, src/system.h:
23093 I18n fixes.
23094
230951999-05-30 Jesse Thilo <jthilo@gnu.org>
23096
23097 * README: Added a FAQ list.
23098
23099 * configure.in, acconfig.h:
23100 I18n fixes.
23101
231021999-05-30 Jesse Thilo <jthilo@gnu.org>
23103
23104 * doc/FAQ, doc/Makefile.am:
23105 Added a FAQ list.
23106
231071999-05-19 Jesse Thilo <jthilo@gnu.org>
23108
23109 * src/alloc.h, src/symtab.h, src/version.c:
23110 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23111
231121999-04-18 Jesse Thilo <jthilo@gnu.org>
23113
23114 * src/.cvsignore, src/Makefile.am:
23115 Reorganized: sources in `src', documentation in `doc'.
23116
23117 * src/lex.c (literalchar):
23118 fixed the code for escaping double quotes (thanks
23119 Jonathan Czisny.)
23120
231211999-04-18 Jesse Thilo <jthilo@gnu.org>
23122
23123 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23124 Adjusted paths to reflect directory reorganization.
23125
231261999-04-18 Jesse Thilo <jthilo@gnu.org>
23127
23128 * doc/.cvsignore, doc/Makefile.am:
23129 Reorganized: sources in `src', documentation in `doc'.
23130
231311999-04-18 Jesse Thilo <jthilo@gnu.org>
23132
23133 * configure.in:
23134 Updated AC_INIT file to reflect directory reorganization.
23135
23136 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23137 Reorganized: sources in `src', documentation in `doc'.
23138
231391999-04-13 Jesse Thilo <jthilo@gnu.org>
23140
23141 * src/allocate.c:
23142 Don't declare calloc() and realloc() if not necessary.
23143
231441999-04-13 Jesse Thilo <jthilo@gnu.org>
23145
23146 * configure.in, acconfig.h, acinclude.m4:
23147 Don't declare calloc() and realloc() if not necessary.
23148
231491999-03-23 Jesse Thilo <jthilo@gnu.org>
23150
23151 * po/.cvsignore: Added i18n support.
23152
231531999-03-23 Jesse Thilo <jthilo@gnu.org>
23154
23155 * acconfig.h, configure.in, Makefile.am:
23156 Added i18n support.
23157
231581999-03-22 Jesse Thilo <jthilo@gnu.org>
23159
23160 * src/bison.s1: Fixed #line numbers.
23161
231621999-03-15 Jesse Thilo <jthilo@gnu.org>
23163
23164 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23165 Added PO files from Translation Project.
23166
231671999-03-03 Jesse Thilo <jthilo@gnu.org>
23168
23169 * Makefile.am:
23170 Added support for non-ANSI compilers (ansi2knr).
23171
231721999-02-16 Jesse Thilo <jthilo@gnu.org>
23173
23174 * configure.in: Bumped version number to 1.27.
23175
23176 * Makefile.am:
23177 Added `bison.simple' to list of files removed by `make distclean'.
23178
231791999-02-12 Jesse Thilo <jthilo@gnu.org>
23180
23181 * src/files.c, src/files.h:
23182 Defined locations of parser files in config.h instead of Makefile.
23183
231841999-02-12 Jesse Thilo <jthilo@gnu.org>
23185
23186 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23187 Defined locations of parser files in config.h instead of Makefile.
23188
231891999-02-09 Jesse Thilo <jthilo@gnu.org>
23190
23191 * Makefile.am:
23192 Removed inappropriate use of $< macro.
23193
231941999-02-05 Jesse Thilo <jthilo@gnu.org>
23195
23196 * po/Makefile.in.in, po/POTFILES.in:
23197 Add `po' directory skeleton.
23198
231991999-01-27 Jesse Thilo <jthilo@gnu.org>
23200
23201 * README: Document help-bison list.
23202
23203 * configure.in: Add check for mkstemp().
23204
232051999-01-20 Jesse Thilo <jthilo@gnu.org>
23206
23207 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23208 Hush a few compiler warnings.
23209
23210 * src/files.c:
23211 Add tryclose(), which verifies that fclose was successful.
23212 Hush a couple of compiler warnings.
23213
232141999-01-20 Jesse Thilo <jthilo@gnu.org>
23215
23216 * Makefile.am, OChangeLog:
23217 ChangeLog is now automatically generated. Include the old version as
23218 OChangeLog.
23219
232201999-01-14 Jesse Thilo <jthilo@gnu.org>
23221
23222 * 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:
23223 Update FSF address.
23224
232251999-01-14 Jesse Thilo <jthilo@gnu.org>
23226
23227 * doc/bison.texinfo: Fix formatting glitch.
23228
23229 * doc/bison.texinfo: Update FSF address.
23230
232311999-01-14 Jesse Thilo <jthilo@gnu.org>
23232
23233 * acconfig.h: Update FSF address.
23234
232351999-01-08 Jesse Thilo <jthilo@gnu.org>
23236
23237 * src/system.h:
23238 Don't define PACKAGE here, since config.h defines it.
23239
232401998-12-30 Jesse Thilo <jthilo@gnu.org>
23241
23242 * src/reader.c: Update copyright date.
23243
23244 * src/main.c:
23245 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23246 favor of output directly to stderr (avoids buffer overruns).
23247
23248 * src/reader.c: Some checks for premature EOF.
23249
23250 * 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:
23251 Use prototypes if the compiler understands them.
23252
23253 * src/files.c: Honor TMPDIR on Unix hosts.
23254 Use prototypes if the compiler understands them.
23255
23256 * src/reader.c:
23257 Fix a couple of buffer overrun bugs.
23258 Use prototypes if the compiler understands them.
23259
23260 * src/system.h: Include unistd.h and ctype.h.
23261 Use #ifdef instead of #if for NLS symbols.
23262
232631998-12-30 Jesse Thilo <jthilo@gnu.org>
23264
23265 * doc/bison.texinfo:
23266 Delete comment "consider using @set for edition number, etc..." since
23267 we now are doing so.
23268
232691998-12-30 Jesse Thilo <jthilo@gnu.org>
23270
23271 * configure.in:
23272 Use prototypes if the compiler understands them.
23273
23274 * NEWS: Document 1.26 highlights.
23275
23276 * Makefile.am: Require Automake 1.3 or later.
23277
23278 * acconfig.h:
23279 Use prototypes if the compiler understands them.
23280
232811998-12-29 Jesse Thilo <jthilo@gnu.org>
23282
23283 * src/version.c:
23284 Use VERSION symbol from automake for version number.
23285
232861998-12-29 Jesse Thilo <jthilo@gnu.org>
23287
23288 * acconfig.h, configure.in, version.cin:
23289 Use VERSION symbol from automake for version number.
23290
232911998-11-28 Jesse Thilo <jthilo@gnu.org>
23292
23293 * Makefile.am:
23294 Distribute original version of simple parser (bison.s1), not built
23295 version (bison.simple).
23296
232971998-11-28 Jesse Thilo <jthilo@gnu.org>
23298
23299 * doc/bison.texinfo: Add info dir entry.
23300
23301 * doc/bison.texinfo:
23302 Let automake put version number into documentation.
23303
233041998-11-26 Jesse Thilo <jthilo@gnu.org>
23305
23306 * src/bison.cld, src/build.com, src/vmshlp.mar:
23307 Add non-RCS files from /gd/gnu/bison.
23308
233091998-11-26 Jesse Thilo <jthilo@gnu.org>
23310
23311 * doc/bison.1:
23312 Document the BISON_HAIRY and BISON_SIMPLE variables.
23313
233141998-11-25 Jesse Thilo <jthilo@gnu.org>
23315
23316 * src/version.c: Build version.c automatically.
23317
23318 * src/reader.c:
23319 Fix token numbering (used to start at 258, not 257).
23320
23321 * src/system.h: Include config.h.
23322
23323 * src/getargs.c: Update bug report address.
23324
23325 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23326 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23327
233281998-11-25 Jesse Thilo <jthilo@gnu.org>
23329
23330 * Makefile.am:
23331 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23332
23333 * configure.in, version.cin:
23334 Build version.c automatically.
23335
23336 * AUTHORS: Add AUTHORS file.
23337
23338 * README: Update bug report address.
23339
23340 * bison.simple:
23341 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23342
23343 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23344 Add automake stuff.
23345
233461998-11-25 Jesse Thilo <jthilo@gnu.org>
23347
23348 * doc/bison.texinfo: Clean up some formatting.
23349
233501998-05-05 Richard Stallman <rms@gnu.org>
23351
23352 * doc/bison.texinfo:
23353 Explain better why to make a pure parser.
23354
233551998-01-05 Richard Stallman <rms@gnu.org>
23356
23357 * src/files.c (openfiles):
23358 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23359 find a temporary directory, if possible. Do not unlink files while
23360 they are open.
23361
233621997-08-25 Richard Stallman <rms@gnu.org>
23363
23364 * src/reader.c (stack_offset;):
23365 Change some warni to warns.
23366
23367 * src/lex.c (literalchar): Use warns, not warni.
23368
233691997-06-28 Richard Stallman <rms@gnu.org>
23370
23371 * src/bison.s1: Add a Bison version comment.
23372
23373 * src/main.c (fatal, warn, berror):
23374 Use program_name.
23375
233761997-06-28 Richard Stallman <rms@gnu.org>
23377
23378 * Makefile.in (bison_version): New variable.
23379 (dist): Use that variable.
23380 (bison.s1): Substitute the Bison version into bison.simple.
23381
23382 * bison.simple: Add a Bison version comment.
23383
233841997-06-18 Richard Stallman <rms@gnu.org>
23385
23386 * src/main.c (fatal, warn, berror):
23387 Make error messages standard.
23388 (toomany): Improve error message text.
23389
23390 * 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:
23391 new.h renamed to alloc.h.
23392
233931997-06-18 Richard Stallman <rms@gnu.org>
23394
23395 * Makefile.in: new.h renamed to alloc.h.
23396
233971997-05-24 Richard Stallman <rms@gnu.org>
23398
23399 * src/lex.c (literalchar):
23400 Fix the code for escaping \, " and '.
23401
23402 (lex): Avoid trouble when there are many chars
23403 to discard in a char literal with just several chars in it.
23404
234051997-05-17 Richard Stallman <rms@gnu.org>
23406
23407 * src/bison.s1:
23408 Use malloc, if using alloca is troublesome.
23409 (YYSTACK_USE_ALLOCA): New flag macro.
23410 Define it for some systems and compilers.
23411 (YYSTACK_ALLOC): New macro.
23412 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23413 If it was malloc'd, free it.
23414
234151997-05-17 Richard Stallman <rms@gnu.org>
23416
23417 * bison.simple:
23418 Use malloc, if using alloca is troublesome.
23419 (YYSTACK_USE_ALLOCA): New flag macro.
23420 Define it for some systems and compilers.
23421 (YYSTACK_ALLOC): New macro.
23422 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23423 If it was malloc'd, free it.
23424
234251997-04-23 Richard Stallman <rms@gnu.org>
23426
23427 * src/bison.s1:
23428 (alloca) [__hpux]: Always define as __builtin_alloca.
23429
234301997-04-23 Richard Stallman <rms@gnu.org>
23431
23432 * bison.simple:
23433 (alloca) [__hpux]: Always define as __builtin_alloca.
23434
234351997-04-22 Richard Stallman <rms@gnu.org>
23436
23437 * src/bison.s1:
23438 [__hpux]: Include alloca.h (right for HPUX 10)
23439 instead of declaring alloca (right for HPUX 9).
23440
23441 * src/bison.s1 (__yy_memcpy):
23442 Declare arg `count' as unsigned int.
23443 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23444
234451997-04-22 Richard Stallman <rms@gnu.org>
23446
23447 * bison.simple:
23448 [__hpux]: Include alloca.h (right for HPUX 10)
23449 instead of declaring alloca (right for HPUX 9).
23450
23451 * bison.simple (__yy_memcpy):
23452 Declare arg `count' as unsigned int.
23453 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23454
234551997-01-03 Richard Stallman <rms@gnu.org>
23456
23457 * src/allocate.c: [__STDC__ or _MSC_VER]:
23458 Declare calloc and realloc to return void *.
23459
234601997-01-02 Richard Stallman <rms@gnu.org>
23461
23462 * src/system.h:
23463 [_MSC_VER]: Include stdlib.h and process.h.
23464 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23465
23466 * src/main.c (main): Return FAILURE as a value.
23467 (printable_version): Declare arg as int, not char.
23468
234691997-01-02 Richard Stallman <rms@gnu.org>
23470
23471 * Makefile.in (dist):
23472 Explicitly check for symlinks, and copy them.
23473
234741996-12-19 Richard Stallman <rms@gnu.org>
23475
23476 * src/files.c:
23477 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23478
234791996-12-18 Paul Eggert <eggert@gnu.org>
23480
23481 * src/bison.s1 (yyparse):
23482 If __GNUC__ and YYPARSE_PARAM are both defined,
23483 declare yyparse to have a void * argument.
23484
234851996-12-18 Paul Eggert <eggert@gnu.org>
23486
23487 * bison.simple (yyparse):
23488 If __GNUC__ and YYPARSE_PARAM are both defined,
23489 declare yyparse to have a void * argument.
23490
234911996-12-17 Richard Stallman <rms@gnu.org>
23492
23493 * src/reduce.c (nbits): Add some casts.
23494
234951996-08-12 Richard Stallman <rms@gnu.org>
23496
23497 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23498
234991996-08-12 Richard Stallman <rms@gnu.org>
23500
23501 * bison.simple: Test _MSDOS as well as _MSDOS_.
23502
235031996-07-31 Richard Stallman <rms@gnu.org>
23504
23505 * src/bison.s1:
23506 [__sun && __i386]: Include alloca.h.
23507
235081996-07-31 Richard Stallman <rms@gnu.org>
23509
23510 * bison.simple:
23511 [__sun && __i386]: Include alloca.h.
23512
235131996-07-30 Richard Stallman <rms@gnu.org>
23514
23515 * src/bison.s1: Comment change.
23516
23517 * src/bison.s1: Test _MSDOS_, not MSDOS.
23518
235191996-07-30 Richard Stallman <rms@gnu.org>
23520
23521 * bison.simple: Comment change.
23522
23523 * bison.simple: Test _MSDOS_, not MSDOS.
23524
235251996-06-01 Richard Stallman <rms@gnu.org>
23526
23527 * 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:
23528 Insert `_' macro around many string constants.
23529
23530 * src/main.c:
23531 Insert `_' macro around many string constants.
23532
23533 (main): Call setlocale, bindtextdomain and textdomain.
23534
23535 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23536 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23537 [ENABLE_NLS]: Include libintl.h.
23538 [ENABLE_NLS] (gettext): Define.
23539 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23540 (N_, PACKAGE, LOCALEDIR): New macros.
23541
235421996-06-01 Richard Stallman <rms@gnu.org>
23543
23544 * POTFILES.in: New file.
23545
23546 * Makefile.in (allocate.o):
23547 Define target explicitly.
23548
23549 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23550 (LDFLAGS): Set to @LDFLAGS@.
23551 (configure): Run autoconf only if preceding `cd' succeeds.
23552 (bison.s1): Redirect output to temporary file then move the
23553 temporary to the target, rather than redirecting directly to bison.s1.
23554 (clean): Remove config.status and config.log.
23555 (distclean): Don't remove config.status here.
23556
235571996-05-12 Richard Stallman <rms@gnu.org>
23558
23559 * src/bison.s1:
23560 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23561
235621996-05-12 Richard Stallman <rms@gnu.org>
23563
23564 * bison.simple:
23565 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23566
235671996-05-11 Richard Stallman <rms@gnu.org>
23568
23569 * src/bison.s1 (__yy_memcpy):
23570 Really reorder the args, as was supposedly done on Feb 14 1995.
23571 (yyparse): Calls changed accordingly.
23572
235731996-05-11 Richard Stallman <rms@gnu.org>
23574
23575 * Makefile.in (dist): Don't use $(srcdir).
23576
23577 * bison.simple (__yy_memcpy):
23578 Really reorder the args, as was supposedly done on Feb 14 1995.
23579 (yyparse): Calls changed accordingly.
23580
235811996-01-27 Richard Stallman <rms@gnu.org>
23582
23583 * src/output.c (output_rule_data):
23584 Test YYERROR_VERBOSE in the conditional
23585 around the definition of ttyname.
23586
235871995-12-29 Richard Stallman <rms@gnu.org>
23588
23589 * src/bison.s1:
23590 Fix line numbers in #line commands.
23591
235921995-12-29 Richard Stallman <rms@gnu.org>
23593
23594 * bison.simple:
23595 Fix line numbers in #line commands.
23596
235971995-12-27 Richard Stallman <rms@gnu.org>
23598
23599 * src/bison.s1 (YYPARSE_PARAM_DECL):
23600 In C++, make it always null.
23601 (YYPARSE_PARAM_ARG): New macro.
23602 (yyparse): Use YYPARSE_PARAM_ARG.
23603
236041995-12-27 Richard Stallman <rms@gnu.org>
23605
23606 * bison.simple (YYPARSE_PARAM_DECL):
23607 In C++, make it always null.
23608 (YYPARSE_PARAM_ARG): New macro.
23609 (yyparse): Use YYPARSE_PARAM_ARG.
23610
236111995-11-29 Richard Stallman <rms@gnu.org>
23612
23613 * doc/bison.texinfo:
23614 Describe literal string tokens, %raw, %no_lines, %token_table.
23615
236161995-11-29 Daniel Hagerty <hag@gnu.org>
23617
23618 * doc/bison.texinfo: Fixed update date
23619
236201995-10-16 Richard Stallman <rms@gnu.org>
23621
23622 * src/version.c: Version 1.25.
23623
236241995-10-16 Richard Stallman <rms@gnu.org>
23625
23626 * NEWS: *** empty log message ***
23627
236281995-10-16 Richard Stallman <rms@gnu.org>
23629
23630 * doc/bison.1, doc/bison.rnh:
23631 Add new options.
23632
236331995-10-15 Richard Stallman <rms@gnu.org>
23634
23635 * src/vmsgetargs.c, src/getargs.c:
23636 Added -n, -k, and -raw switches.
23637 (noparserflag, toknumflag, rawtoknumflag): New variables.
23638
23639 * src/symtab.h (SALIAS):
23640 New #define for adding aliases to %token.
23641 (struct bucket): Added `alias' field.
23642
23643 * src/reduce.c (reduce_grammar):
23644 Revise error message.
23645 (print_notices): Remove final `.' from error message.
23646
23647 * src/reader.c (reader_output_yylsp):
23648 New function.
23649 (readgram): Use `#if 0' around code that accepted %command
23650 inside grammar rules: The documentation doesn't allow it,
23651 and it will fail since the %command processors scan for the next %.
23652 (parse_token_decl): Extended the %token
23653 declaration to allow a multi-character symbol as an alias.
23654 (parse_thong_decl): New function.
23655 (read_declarations): Added %thong declarations.
23656 (read_declarations): Handle NOOP to deal with allowing
23657 % declarations as another means to specify the flags.
23658 (readgram): Allow %prec prior to semantics embedded in a rule.
23659 (skip_to_char, read_declarations, copy_definition)
23660 (parse_token_decl, parse_start_decl, parse_type_decl)
23661 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23662 (get_type_name, copy_guard, copy_action, readgram)
23663 (get_type, packsymbols): Revised most error messages.
23664 Changed `fatal' to `warnxxx' to avoid aborting for error.
23665 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23666 (read_declarations): Improve the error message for
23667 an invalid character. Do not abort.
23668 (read_declarations, copy_guard, copy_action): Use
23669 printable_version to avoid unprintable characters in printed output.
23670 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23671 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23672 Allow the type of a non-terminal can be given
23673 more than once, as long as all specifications give the same type.
23674
23675 * src/output.c:
23676 (output_headers, output_trailers, output, output_gram)
23677 (output_rule_data): Implement noparserflag variable.
23678 Implement toknumflag variable.
23679 (output): Call reader_output_yylsp to output LTYPESTR.
23680
23681 * src/main.c (main):
23682 If reader sees an error, don't process the grammar.
23683 (fatals): Updated to not use VARARGS1.
23684 (printable_version, int_to_string, warn, warni, warns, warnss)
23685 (warnsss): New error reporting functions. Avoid abort for error.
23686
23687 * src/lex.h:
23688 Added THONG and NOOP for alias processing.
23689 Added SETOPT for the new code that allows setting options with %flags.
23690
23691 * src/lex.c:
23692 Include getopt.h. Add some extern decls.
23693 (safegetc): New function to deal with EOF gracefully.
23694 (literalchar); new function to deal with reading \ escapes.
23695 (lex): Use literalchar.
23696 (lex): Implemented "..." tokens.
23697 (literalchar, lex, parse_percent_token): Made tokenbuffer
23698 always contain the token. This includes growing the token
23699 buffer while reading an integer.
23700 (parse_percent_token): Replaced if-else statement with percent_table.
23701 (parse_percent_token): Added % declarations as another
23702 way to specify the flags -n, -l, and -r. Also added hooks for
23703 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23704 major changes to files.c.
23705 (lex) Retain in the incoming stream a character following
23706 an incorrect '/'.
23707 (skip_white_space, lex): Revised most error messages
23708 and changed fatal to warn to avoid aborting.
23709 (percent_table): Added %thong declarations.
23710
23711 * src/gram.h: Comment changes.
23712
23713 * src/files.c (openfiles, open_extra_files, done):
23714 Add faction flag
23715 and actfile file. Handle noparserflag. Both for -n switch.
23716
23717 * src/conflicts.c (resolve_sr_conflict):
23718 Remove use of alloca.
23719
237201995-06-01 Jim Meyering <meyering@gnu.org>
23721
23722 * doc/bison.texinfo: *** empty log message ***
23723
237241995-05-06 Richard Stallman <rms@gnu.org>
23725
23726 * src/bison.s1: Comment change.
23727
237281995-05-06 Richard Stallman <rms@gnu.org>
23729
23730 * bison.simple: Comment change.
23731
237321995-05-03 Richard Stallman <rms@gnu.org>
23733
23734 * src/version.c: Version now 1.24.
23735
23736 * src/bison.s1: Change distribution terms.
23737
23738 * src/version.c: Version now 1.23.
23739
237401995-05-03 Richard Stallman <rms@gnu.org>
23741
23742 * doc/bison.texinfo:
23743 Rewrite "Conditions for Using Bison".
23744 Update version to 1.24.
23745
237461995-05-03 Richard Stallman <rms@gnu.org>
23747
23748 * bison.simple: Change distribution terms.
23749
237501995-02-23 Richard Stallman <rms@gnu.org>
23751
23752 * src/files.c: Test __VMS_POSIX as well as VMS.
23753
237541995-02-14 Jim Meyering <meyering@gnu.org>
23755
23756 * src/bison.s1 (__yy_memcpy):
23757 Renamed from __yy_bcopy to avoid
23758 confusion. Reverse FROM and TO arguments to be consistent with
23759 those of memcpy.
23760
237611995-02-14 Jim Meyering <meyering@gnu.org>
23762
23763 * bison.simple (__yy_memcpy):
23764 Renamed from __yy_bcopy to avoid
23765 confusion. Reverse FROM and TO arguments to be consistent with
23766 those of memcpy.
23767
237681994-11-10 David J. MacKenzie <djm@gnu.org>
23769
23770 * NEWS: reformat
23771
23772 * NEWS: New file.
23773
23774 * Makefile.in (DISTFILES): Include NEWS.
23775
23776 * Makefile.in (DISTFILES):
23777 Include install-sh, not install.sh.
23778
23779 * configure.in: Update to Autoconf v2 macro names.
23780
237811994-10-05 David J. MacKenzie <djm@gnu.org>
23782
23783 * Makefile.in: fix typo
23784
23785 * Makefile.in (prefix, exec_prefix):
23786 Let configure set them.
23787
237881994-09-28 David J. MacKenzie <djm@gnu.org>
23789
23790 * Makefile.in: Set datadir to $(prefix)/share.
23791
237921994-09-15 Richard Stallman <rms@gnu.org>
23793
23794 * src/bison.s1:
23795 Update copyright notice and GPL version.
23796
237971994-09-15 Richard Stallman <rms@gnu.org>
23798
23799 * bison.simple:
23800 Update copyright notice and GPL version.
23801
238021994-07-12 Richard Stallman <rms@gnu.org>
23803
23804 * src/reduce.c, src/reader.c:
23805 entered into RCS
23806
238071994-05-05 David J. MacKenzie <djm@gnu.org>
23808
23809 * Makefile.in: entered into RCS
23810
238111994-03-26 Richard Stallman <rms@gnu.org>
23812
23813 * src/bison.s1: entered into RCS
23814
238151994-03-26 Richard Stallman <rms@gnu.org>
23816
23817 * bison.simple: entered into RCS
23818
238191994-03-25 Richard Stallman <rms@gnu.org>
23820
23821 * src/main.c: entered into RCS
23822
238231994-03-24 Richard Stallman <rms@gnu.org>
23824
23825 * src/conflicts.c: entered into RCS
23826
238271994-01-02 Richard Stallman <rms@gnu.org>
23828
23829 * Makefile.in: *** empty log message ***
23830
238311993-11-21 Richard Stallman <rms@gnu.org>
23832
23833 * src/bison.s1: *** empty log message ***
23834
238351993-11-21 Richard Stallman <rms@gnu.org>
23836
23837 * doc/bison.texinfo: entered into RCS
23838
23839 * doc/bison.texinfo: *** empty log message ***
23840
238411993-11-21 Richard Stallman <rms@gnu.org>
23842
23843 * bison.simple: *** empty log message ***
23844
238451993-10-25 David J. MacKenzie <djm@gnu.org>
23846
23847 * doc/bison.texinfo: *** empty log message ***
23848
238491993-10-19 Richard Stallman <rms@gnu.org>
23850
23851 * src/bison.s1: *** empty log message ***
23852
238531993-10-19 Richard Stallman <rms@gnu.org>
23854
23855 * bison.simple: *** empty log message ***
23856
238571993-10-14 Richard Stallman <rms@gnu.org>
23858
23859 * src/bison.s1: *** empty log message ***
23860
238611993-10-14 Richard Stallman <rms@gnu.org>
23862
23863 * bison.simple: *** empty log message ***
23864
238651993-09-14 David J. MacKenzie <djm@gnu.org>
23866
23867 * doc/bison.texinfo: *** empty log message ***
23868
238691993-09-13 Noah Friedman <friedman@gnu.org>
23870
23871 * Makefile.in: *** empty log message ***
23872
238731993-09-10 Richard Stallman <rms@gnu.org>
23874
23875 * src/conflicts.c: *** empty log message ***
23876
23877 * src/system.h: entered into RCS
23878
238791993-09-10 Richard Stallman <rms@gnu.org>
23880
23881 * doc/bison.1: entered into RCS
23882
238831993-09-06 Noah Friedman <friedman@gnu.org>
23884
23885 * src/version.c: entered into RCS
23886
238871993-09-06 Noah Friedman <friedman@gnu.org>
23888
23889 * Makefile.in: *** empty log message ***
23890
238911993-07-30 David J. MacKenzie <djm@gnu.org>
23892
23893 * Makefile.in: *** empty log message ***
23894
238951993-07-24 Richard Stallman <rms@gnu.org>
23896
23897 * src/bison.s1: *** empty log message ***
23898
238991993-07-24 Richard Stallman <rms@gnu.org>
23900
23901 * bison.simple: *** empty log message ***
23902
239031993-07-08 David J. MacKenzie <djm@gnu.org>
23904
23905 * Makefile.in: *** empty log message ***
23906
239071993-07-04 Richard Stallman <rms@gnu.org>
23908
23909 * src/bison.s1: *** empty log message ***
23910
239111993-07-04 Richard Stallman <rms@gnu.org>
23912
23913 * bison.simple: *** empty log message ***
23914
239151993-06-26 David J. MacKenzie <djm@gnu.org>
23916
23917 * src/getargs.c: entered into RCS
23918
239191993-06-26 David J. MacKenzie <djm@gnu.org>
23920
23921 * doc/bison.texinfo: *** empty log message ***
23922
23923 * doc/bison.1: New file.
23924
239251993-06-25 Richard Stallman <rms@gnu.org>
23926
23927 * src/getargs.c: New file.
23928
239291993-06-16 Richard Stallman <rms@gnu.org>
23930
23931 * src/bison.s1: *** empty log message ***
23932
239331993-06-16 Richard Stallman <rms@gnu.org>
23934
23935 * bison.simple: *** empty log message ***
23936
239371993-06-03 Richard Stallman <rms@gnu.org>
23938
23939 * src/bison.s1: New file.
23940
239411993-06-03 Richard Stallman <rms@gnu.org>
23942
23943 * doc/bison.texinfo: *** empty log message ***
23944
239451993-06-03 Richard Stallman <rms@gnu.org>
23946
23947 * bison.simple: New file.
23948
239491993-05-19 Richard Stallman <rms@gnu.org>
23950
23951 * doc/bison.texinfo: New file.
23952
239531993-05-07 Noah Friedman <friedman@gnu.org>
23954
23955 * Makefile.in: *** empty log message ***
23956
239571993-04-28 Noah Friedman <friedman@gnu.org>
23958
23959 * src/reader.c: *** empty log message ***
23960
239611993-04-23 Noah Friedman <friedman@gnu.org>
23962
23963 * src/alloc.h: entered into RCS
23964
239651993-04-20 David J. MacKenzie <djm@gnu.org>
23966
23967 * src/version.c: *** empty log message ***
23968
23969 * src/files.c, src/allocate.c:
23970 entered into RCS
23971
23972 * src/reader.c: *** empty log message ***
23973
23974 * src/lex.c: entered into RCS
23975
23976 * src/conflicts.c: New file.
23977
23978 * src/symtab.c: entered into RCS
23979
23980 * src/alloc.h: New file.
23981
23982 * src/LR0.c: entered into RCS
23983
239841993-04-18 Noah Friedman <friedman@gnu.org>
23985
23986 * src/reader.c: New file.
23987
23988 * src/version.c: *** empty log message ***
23989
239901993-04-18 Noah Friedman <friedman@gnu.org>
23991
23992 * Makefile.in: *** empty log message ***
23993
239941993-04-17 Noah Friedman <friedman@gnu.org>
23995
23996 * Makefile.in: *** empty log message ***
23997
239981993-04-15 Richard Stallman <rms@gnu.org>
23999
24000 * src/main.c, src/files.c:
24001 New file.
24002
240031993-04-15 Noah Friedman <friedman@gnu.org>
24004
24005 * configure.in: entered into RCS
24006
24007 * configure.in: *** empty log message ***
24008
24009 * configure.in: New file.
24010
240111993-04-14 Richard Stallman <rms@gnu.org>
24012
24013 * Makefile.in: New file.
24014
240151993-04-13 Richard Stallman <rms@gnu.org>
24016
24017 * src/version.c: New file.
24018
240191993-03-25 Richard Stallman <rms@gnu.org>
24020
24021 * src/output.c: entered into RCS
24022
240231992-09-25 Richard Stallman <rms@gnu.org>
24024
24025 * configure.bat: entered into RCS
24026
240271992-06-22 Richard Stallman <rms@gnu.org>
24028
24029 * src/vmsgetargs.c: entered into RCS
24030
240311992-06-22 Richard Stallman <rms@gnu.org>
24032
24033 * doc/bison.rnh: entered into RCS
24034
240351992-04-20 David J. MacKenzie <djm@gnu.org>
24036
24037 * README: entered into RCS
24038
240391992-01-22 Richard Stallman <rms@gnu.org>
24040
24041 * src/machine.h: entered into RCS
24042
240431991-12-21 Richard Stallman <rms@gnu.org>
24044
24045 * src/lalr.c, src/closure.c:
24046 entered into RCS
24047
240481991-12-20 Richard Stallman <rms@gnu.org>
24049
24050 * src/state.h: entered into RCS
24051
240521991-12-18 Richard Stallman <rms@gnu.org>
24053
24054 * src/print.c, src/nullable.c, src/derives.c:
24055 entered into RCS
24056
240571991-11-03 David J. MacKenzie <djm@gnu.org>
24058
24059 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24060 entered into RCS
24061
240621988-09-09 Richard Stallman <rms@gnu.org>
24063
24064 * src/bison.hairy: entered into RCS
24065
240661987-12-16 Richard Stallman <rms@gnu.org>
24067
24068 * REFERENCES: entered into RCS
dc546b0f 24069
f294a2c2 24070
04098407 24071 -----
f294a2c2 24072
ea0a7676
JD
24073 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
24074 Inc.
f294a2c2 24075
04098407
PE
24076 Copying and distribution of this file, with or without
24077 modification, are permitted provided the copyright notice and this
24078 notice are preserved.