]> git.saurik.com Git - bison.git/blob - ChangeLog
Pacify -DGNULIB_POSIXCHECK.
[bison.git] / ChangeLog
1 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
2
3 Pacify -DGNULIB_POSIXCHECK.
4 * bootstrap.conf (gnulib_modules): Add all modules suggested by
5 -DGNULIB_POSIXCHECK.
6 * src/files.c (file_name_split)
7 * src/getargs.c (getargs)
8 * src/location.c (boundary_set_from_string)
9 * src/output.c (output_skeleton)
10 * src/parse-gram.y (prologue_declaration)
11 * src/scan-gram.l (handle_syncline)
12 * src/symtab.c (symbol_new): Use mbschr and mbsrchr instead of
13 strchr and strrchr. In the cases of command-line options, file
14 names, and thus locations, functionality may be improved. In the
15 case of symbol names, there should be no functional difference as
16 all characters are ASCII, so the intended benefit is just warning
17 suppression.
18
19 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
20
21 * NEWS (2.5): Fix minor typos.
22
23 2011-05-01 Joel E. Denny <joeldenny@joeldenny.org>
24
25 doc: clean up quotation style in NEWS.
26 * NEWS (2.5): For multi-character tokens in example grammar rules,
27 use "token" not 'token'. In English, use a consistent quotation
28 style; we might as well follow the precedent seen in info pages:
29 `quote' not "quote".
30
31 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
32
33 tests: pacify gcc 4.6.0's -Wunused-but-set-variable.
34 Reported by Jim Meyering at
35 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
36 * tests/actions.at
37 (Default %printer and %destructor for mid-rule values): Define
38 YYLLOC_DEFAULT so that it uses its Rhs argument.
39
40 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
41
42 glr.c: omit yyresolveLocations when locations are disabled.
43 This prevents gcc 4.6.0's -Wunused-but-set-variable from warning
44 about yyresolveLocations's local yyrhsloc. When locations are
45 enabled, there's no such warning because YYLLOC_DEFAULT then uses
46 yyrhsloc. Reported by Jim Meyering at
47 <http://lists.gnu.org/archive/html/bug-bison/2011-04/msg00002.html>.
48 * data/glr.c (yyresolveLocations): Omit definition when locations
49 are disabled.
50 (yyresolveValue): Omit yyresolveLocations invocation when
51 locations are disabled.
52
53 2011-04-16 Joel E. Denny <joeldenny@joeldenny.org>
54
55 gnulib, autoconf: update.
56 * README-hacking (Updating a submodule): Give advice on how to
57 determine the versions of gnulib and autoconf to which we should
58 update.
59 (Release Procedure): Note that submodules should be updated.
60 * bootstrap.conf (gnulib_modules): Rename pipe to spawn-pipe as
61 suggested in updated gnulib NEWS.
62 * gnulib: Choose a stable snapshot according to advice in Bison's
63 README-hacking.
64 * po/POTFILES.in (lib/pipe.c): Rename to...
65 (lib/spawn-pipe.c): ... this.
66 * src/output.c: Update to include spawn-pipe.h.
67 * submodules/autoconf: Update to latest for improvement in m4.m4
68 that excludes M4 with buggy strstr. The only other changes to
69 files that we use are copyright updates.
70
71 2011-04-09 Joel E. Denny <joeldenny@joeldenny.org>
72
73 Fix missing updates to GPLv3.
74 Reported by Tys Lefering at
75 <http://lists.gnu.org/archive/html/bison-patches/2011-04/msg00000.html>.
76 * src/print-xml.c, src/print-xml.h: In these files.
77
78 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
79
80 Add -Wconflicts-sr and -Wconflicts-rr.
81 Thus, conflict reports are now affected by -Werror and -Wnone
82 (unless %expect or %expect-rr is specified). Reported by George
83 Neuner at
84 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
85 * NEWS (2.5): Document.
86 * doc/bison.texinfo (Bison Options): Document.
87 * src/complain.c, src/complain.h (set_warning_issued): Export
88 function.
89 * src/conflicts.c (conflicts_print): Suppress conflict report
90 based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
91 conflicts as errors if -Werror.
92 * src/getargs.c (warnings_flag): Initialize with
93 warnings_conflicts_sr and warnings_conflicts_rr as well.
94 (warnings_args, warnings_types): Add entries for
95 warnings_conflicts_sr and warnings_conflicts_rr.
96 (usage): Update.
97 * src/getargs.h (enum warnings): Add entries for
98 warnings_conflicts_sr and warnings_conflicts_rr.
99 * tests/conflicts.at (-W versus %expect and %expect-rr): New test
100 group.
101 * tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
102 conflict report can produce a "warnings being treated as errors"
103 message. Also, check that stderr is now fully scrubbed by -Wnone
104 when the exit status is 0.
105
106 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
107
108 Pacify maintainer-check-posix.
109 Adding command-line options after the grammar file name is not
110 permitted, so disable checks that do that when
111 maintainer-check-posix is running.
112 * tests/local.at (AT_BISON_CHECK_NO_XML): Don't run the
113 problematic checks when POSIXLY_CORRECT=1. Also, for readability,
114 remove an unnecessary m4_if.
115
116 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
117
118 Add -Wother so -Wnone suppresses all warnings.
119 Reported by George Neuner at
120 <http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
121 * NEWS (2.5): Document.
122 * THANKS (George Neuner): Add.
123 * doc/bison.texinfo (Bison Options): Document.
124 * src/complain.c, src/complain.h
125 (warn_at, warn_at_indent, warn): Suppress warning if -Wno-other.
126 (midrule_value_at): New warning function, similar to yacc_at in
127 that it's controlled by its own warning category.
128 * src/getargs.c (warnings_flag): Initialize to warnings_other.
129 (warnings_args, warnings_types): Add entry for warnings_other.
130 (usage): Update.
131 * src/getargs.h (enum warnings): Add entry for warnings_other.
132 * src/gram.c (grammar_rules_useless_report): If -Wno-other, then
133 don't print useless rules.
134 * src/reader.c (symbol_should_be_used): Rather than adjusting the
135 return value based on whether midrule value warnings are enabled,
136 accept a new parameter for telling the caller whether true is
137 being returned for a potential midrule warning.
138 (grammar_rule_check): Use midrule_value_at for midrule value
139 warnings, and continue to use warn_at for all other warnings. Let
140 them check whether the warnings are enabled.
141 * tests/local.at (AT_BISON_CHECK): Update documentation.
142 (AT_BISON_CHECK_NO_XML): Check that -Wnone and --warnings=none
143 disable all warnings exercised in the test suite.
144
145 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
146
147 Don't let -Wnone disable -Werror.
148 Discussed at
149 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00009.html>.
150 * NEWS (2.5): Document.
151 * src/getargs.c (flags_argmatch): Accept a new argument that
152 specifies what flags "all" and thus "none" affect.
153 (FLAGS_ARGMATCH): Update flags_argmatch invocation.
154 * tests/input.at (-Werror is not affected by -Wnone and -Wall):
155 New test group.
156
157 2011-03-27 Joel E. Denny <joeldenny@joeldenny.org>
158
159 * NEWS (2.5): Document fix for -Wno-CATEGORY.
160
161 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
162
163 doc: fix confusing citation of LAC publication.
164 Suggested by Akim Demaille.
165 * doc/bison.texinfo (LAC): Here.
166
167 2011-03-20 Joel E. Denny <joeldenny@joeldenny.org>
168
169 lr.default-reductions: rename "full" value to "most".
170 Unlike "consistent" and "accepting", "full" doesn't answer the
171 question of "which states".
172 * doc/bison.texinfo (%define Summary): Update.
173 (Default Reductions): Update.
174 * src/print.c (print_reductions): Update.
175 * src/reader.c (prepare_percent_define_front_end_variables):
176 Update.
177 * src/tables.c (action_row): Update.
178 * tests/input.at (%define enum variables): Update.
179 * tests/reduce.at (%define lr.default-reductions): Update.
180
181 2011-03-13 Joel E. Denny <joeldenny@joeldenny.org>
182
183 * src/parse-gram.c, src/parse-gram.h: Regenerate.
184
185 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
186
187 named references: fix double free.
188 In `rhs[name]: "a" | "b"', do not free "name" twice.
189 Reported by Tys Lefering.
190 <http://lists.gnu.org/archive/html/bug-bison/2010-06/msg00002.html>
191 * src/named-ref.h, src/named-ref.c (named_ref_copy): New.
192 * src/parse-gram.y (current_lhs): Rename as...
193 (current_lhs_symbol): this.
194 (current_lhs): New function. Use it to free the current lhs
195 named reference.
196 * src/reader.c: Bind lhs to a copy of the current named reference.
197 * src/symlist.c: Rely on free (0) being valid.
198 * tests/named-refs.at: Test this.
199
200 2011-03-09 Akim Demaille <akim@lrde.epita.fr>
201
202 tests: style changes.
203 * tests/named-refs.at (Redundant words in LHS brackets)
204 (Unresolved references): here.
205
206 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
207
208 java: fix parser tracing bug.
209 * NEWS (2.5): Document.
210 * data/lalr1.java (YYParser::YYStack::print): Don't skip top
211 element.
212
213 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
214
215 java: finish fixing parser stack popping bug.
216 * NEWS (2.5): Document.
217 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
218 in clearing the location stack. Also fix pop function that
219 accepts no arguments.
220
221 2011-03-06 Angelo Borsotti <angelo.borsotti@gmail.com> (tiny change)
222
223 java: fix parser stack popping bug.
224 Reported at
225 <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
226 * THANKS (Angelo Borsotti): Add.
227 * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
228 in clearing the value stack. Previously, the top element of the
229 stack wasn't cleared and so the value was not garbage collected.
230
231 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
232
233 doc: cite publication for LAC.
234 * doc/bison.texinfo (LAC): Here.
235
236 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
237
238 doc: clean up terminology for mysterious conflicts.
239 * doc/bison.texinfo (Mystery Conflicts): Rename node to...
240 (Mysterious Conflicts): ... this, which is already the section
241 title and the name used in the index. Update all cross-references
242 to this node. Also, don't imply that R/R conflicts are the only
243 kind of mysterious conflict.
244
245 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
246
247 lr.default-reductions: rename "all" value to "full".
248 States that shift the error token do not have default reductions,
249 and GLR disables some default reductions, so "all" was a misnomer.
250 * doc/bison.texinfo (%define Summary): Update.
251 (Default Reductions): Update.
252 * src/print.c (print_reductions): Update.
253 * src/reader.c (prepare_percent_define_front_end_variables):
254 Update.
255 * src/tables.c (action_row): Update.
256 * tests/input.at (%define enum variables): Update.
257 * tests/reduce.at (%define lr.default-reductions): Update.
258
259 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
260
261 doc: create a new Tuning LR section in the manual.
262 And clean up all other documentation of the features described
263 there.
264 * NEWS (2.5): Tweak wording of lr.type and parse.lac entries a
265 bit, update the cross-references to the manual, and point out that
266 LAC has caveats. Don't be so adamant that IELR+LAC=canonical LR.
267 That is, as the referenced section in the manual documents, LAC
268 does not fix infinite parsing loops on syntax errors.
269 * doc/bison.texinfo: Consistently drop the "(1)" suffix from LALR,
270 IELR, and LR in @cindex.
271 (%define Summary): Condense the entries for lr.default-reductions,
272 lr.keep-unreachable-states, lr.type, and parse.lac into brief
273 summaries, and cross-reference the appropriate subsections of
274 Tuning LR. For parse.lac, mention that it's only implemented for
275 deterministic parsers in C. In parse.error entry, mention LAC,
276 and add cross-reference to the LAC section.
277 (Error Reporting): When mentioning parse.error, mention LAC, and
278 add cross-reference to the LAC section.
279 (Tuning LR): New section with an extended version of the
280 documentation removed from %define Summary. Change all
281 cross-references in the manual to point here instead of there.
282 (Calc++ Parser): When mentioning parse.error, mention LAC, and add
283 cross-reference to the LAC section.
284 (Table of Symbols): In %error-verbose entry, add cross-reference
285 to Error Reporting.
286 (Glossary): Capitalize entry titles consistently. Add definitions
287 for "defaulted state" and "unreachable state". Expand IELR
288 acronym in IELR's entry.
289
290 2011-02-20 Joel E. Denny <joeldenny@joeldenny.org>
291
292 doc: add bibliography to manual.
293 * doc/bison.texinfo (Mystery Conflicts): Cross-reference
294 bibliography instead of citing publications directly.
295 (Generalized LR Parsing): Likewise.
296 (Bibliography): New section. Not all entries are cross-referenced
297 yet, but that will come in future patches.
298
299 2011-02-19 Joel E. Denny <joeldenny@joeldenny.org>
300
301 java: test and document previous bug fix.
302 * NEWS (2.5): Document it.
303 * tests/java.at (_AT_DATA_JAVA_CALC_Y): To one of the yyerror
304 invocations, pass a location that spans multiple tokens. Change
305 yyerror to report all of a location rather than just the begin
306 position. Extend yylex and Position to count tokens on a line.
307 Remove getHashCode as it's unused. Update all expected output.
308
309 2011-02-19 Bernd Kiefer <kiefer@dfki.de> (tiny change)
310
311 java: fix location handling bug.
312 Reported at
313 <http://lists.gnu.org/archive/html/bison-patches/2011-02/msg00005.html>.
314 * data/lalr1.java (YYParser::yylloc): For non-empty RHS, fix
315 reversed access to location stack.
316 * THANKS (Bernd Kiefer): Add.
317
318 2011-02-13 Joel E. Denny <joeldenny@joeldenny.org>
319
320 doc: fix some minor inconsistencies.
321 * doc/bison.texinfo (%define Summary): Fix mislabeled entry for
322 lex_symbol.
323 (%code Summary): For consistency with the variable list in the
324 %define Summary, enclose the list of %code qualifiers in a table
325 instead of an itemize.
326
327 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
328
329 doc: clean up new subsections in manual.
330 * doc/bison.texinfo (%define Summary): Reword so it reads well as
331 a separate section. For example, add an intro, and move most of
332 the text outside of the @deffn so it is not indented so far.
333 (%code Summary): Likewise.
334 (Table of Symbols): Reword %code entry to match the %code entry in
335 Decl Summary.
336
337 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
338
339 doc: finish splitting apart the manual's Decl Summary section.
340 Suggested by Akim Demaille at
341 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
342 * doc/bison.texinfo (Decl Summary): Extract most of the %define
343 entry into...
344 (%define 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. Moreover, the majority of the text describing the
348 various new LR features should likely move to another new section
349 somewhere.
350
351 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
352
353 doc: begin to split apart the manual's Decl Summary section.
354 Discussed in thread starting at
355 <http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00013.html>.
356 * doc/bison.texinfo (Decl Summary): Extract most of the %code
357 entry into...
358 (%code Summary): ... this new subsection, and update all
359 cross-references. For readability of the patches, rewriting of
360 the text so it makes sense as a separate subsection will come in a
361 later patch.
362
363 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
364
365 doc: clean up naming of various Bison files.
366 The Bison manual's names for various files associated with a Bison
367 parser has devolved into inconsistency. This patch makes the
368 naming consistent for the most important files. First, it chooses
369 "grammar file" over "input file". The former appears to be more
370 traditional in the Bison manual, and Bison has other input
371 files (skeletons). Second, it chooses "parser implementation
372 file" over names like "parser file", "parser source file", "parser
373 source code file", and "parser output file". The new name makes
374 it clearer where Bison generates the main parser implementation,
375 and it is easily distinguishable from "parser header file".
376 * doc/bison.texinfo: Implement throughout.
377
378 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
379
380 doc: give credit to more of Bison's developers.
381 * doc/bison.texinfo (Introduction): Don't imply that only Robert
382 Corbett, Richard Stallman, and Wilfred Hansen have contributed to
383 Bison. However, I don't have time to write a full history, so
384 just point readers to THANKS and ChangeLog.
385
386 2011-02-06 Joel E. Denny <joeldenny@joeldenny.org>
387
388 doc: document experimental features better.
389 * doc/bison.texinfo (Introduction): Say that IELR(1) and canonical
390 LR(1) are experimental. Mention Java. Normally experimental
391 features probably shouldn't be mentioned in the introduction.
392 However, if Bison's limitations to LALR(1), C, and C++ are so
393 important that they should be mentioned here, then it's important
394 to point out that Bison is beginning to escape those limitations.
395 Moreover, these particular experimental features have very little
396 chance of being removed.
397 * src/getargs.c (usage): Say that IELR(1) and canonical LR(1) are
398 experimental.
399
400 2011-01-29 Joel E. Denny <joeldenny@joeldenny.org>
401
402 Do not allow identifiers that start with a dash.
403 This cleans up our previous fixes for a bug whereby Bison
404 discarded `.field' in `$-1.field'. The previous fixes were less
405 restrictive about where a dash could appear in an identifier, but
406 the restrictions were hard to explain. That bug was reported and
407 this final fix was originally suggested by Paul Hilfinger. This
408 also fixes a remaining bug reported by Paul Eggert whereby Bison
409 parses `%token ID -123' as `%token ID - 123' and handles `-' as an
410 identifier. Now, `-' cannot be an identifier. Discussed in
411 threads beginning at
412 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>,
413 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00004.html>.
414 * NEWS (2.5): Update entry describing the dash extension to
415 grammar symbol names. Also, move that entry before the named
416 references entry because the latter mentions the former.
417 * doc/bison.texinfo (Symbol): Update documentation for symbol
418 names. As suggested by Paul Eggert, mention the effect of periods
419 and dashes on named references.
420 (Decl Summary): Update documentation for unquoted %define values,
421 which, as a side effect, can no longer start with dashes either.
422 * src/scan-code.l (id): Implement.
423 * src/scan-gram.l (id): Implement.
424 * tests/actions.at (Exotic Dollars): Extend test group to exercise
425 bug reported by Paul Hilfinger.
426 * tests/input.at (Symbols): Update test group, and extend to
427 exercise bug reported by Paul Eggert.
428 * tests/named-refs.at (Stray symbols in brackets): Update test
429 group.
430 ($ or @ followed by . or -): Likewise.
431 * tests/regression.at (Invalid inputs): Likewise.
432
433 2011-01-24 Joel E. Denny <joeldenny@joeldenny.org>
434
435 * data/yacc.c: Fix last apostrophe warning from xgettext.
436
437 2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
438
439 Fix minor problems encountered by a fresh bootstrap.
440 * data/glr.c, data/yacc.c: Do not use apostrophes in '#' comments,
441 as they confuse xgettext, which tries to parse them as C character
442 constants in a preprocessor directive.
443 * data/yacc.c (yy_lac): Don't use printf %d format on *yyesp, as
444 that expression might not promote to int on some platforms.
445 * src/parse-gram.c, src/parse-gram.h: Regenerate.
446
447 2011-01-09 Joel E. Denny <joeldenny@joeldenny.org>
448
449 Improve error messages for `$' or `@' followed by `.' or `-'.
450 Previously, for this special case of an invalid reference, the
451 usual "symbol not found in production:" was printed. However,
452 because the symbol name was parsed as the empty string, that
453 message was followed immediately by a newline instead of a symbol
454 name. In reality, this is a syntax error, so the reference is
455 invalid regardless of the symbols actually appearing in the
456 production. Discussed at
457 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00012.html>.
458 * src/scan-code.l (parse_ref): Report the above case as a syntax
459 error. Other than that, continue to handle this case like any
460 other invalid reference that Bison manages to parse because
461 "possibly meant" messages can still be helpful to the user.
462 * tests/named-refs.at ($ or @ followed by . or -): New test group.
463
464 2011-01-08 Joel E. Denny <joeldenny@joeldenny.org>
465
466 doc: don't use @acronym.
467 Lately, many GNU packages are dropping it. See
468 <http://lists.gnu.org/archive/html/bison-patches/2011-01/msg00003.html>.
469 * doc/bison.texinfo: Remove all uses.
470
471 2011-01-05 Alex Rozenman <rozenman@gmail.com>
472
473 Do not allow identifiers that start with a negative number.
474 Reported by Paul Hilfinger as a side effect of named references
475 support at
476 <http://lists.gnu.org/archive/html/bug-bison/2011-01/msg00000.html>.
477 Suggested by Paul Eggert.
478 * src/scan-code.l ({letter}, {id}): Adjust lexical definitions.
479 * src/scan-gram.l ({letter}, {id}): Likewise.
480
481 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
482
483 * ChangeLog (2011-01-02): improve description.
484
485 2011-01-03 Joel E. Denny <joeldenny@joeldenny.org>
486
487 maint: don't update copyright years in bootstrap.
488 * .x-update-copyright: Add entry for bootstrap.
489 * bootstrap: Remove 2011 from copyright years. The bootstrap
490 version we're currently using comes from an older version of
491 gnulib.
492 * bootstrap.conf (bootstrap_sync): Add comments explaining this
493 issue.
494
495 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
496
497 maint: run "make update-copyright".
498
499 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
500
501 maint: prepare to use year ranges in copyright notices.
502 * README (Copyright statements): New section explaining the range
503 notation. The GNU maintainers document requires this explanation:
504 <http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices>.
505 I copied our explanation from coreutils.
506 * build-aux/update-b4-copyright: Revert 2010-06-17 changes that
507 disabled Bison's automated use of ranges.
508 * cfg.mk (update-copyright-env): Likewise.
509
510 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org>
511
512 Correct my email address.
513 * ChangeLog: In all recent entries.
514 * THANKS (Joel E. Denny): Here.
515
516 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
517
518 doc: cleanup.
519 * NEWS (2.5): Try to sort entries according to how interesting
520 users might find them.
521
522 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
523
524 doc: cleanup.
525 * NEWS (2.5): Make some minor improvements to wording, and format
526 entries more consistently.
527 * doc/bison.texinfo (Language and Grammar): Point out that IELR
528 and canonical LR are experimental features.
529 (Decl Summary): In list of %define variables, make wording more
530 consistent. Improve discussion of using LALR for GLR.
531
532 2010-12-19 Joel E. Denny <joeldenny@joeldenny.org>
533
534 parse.lac: document.
535 * NEWS (2.5): Add entry for LAC, and mention LAC in entry for
536 other corrections to verbose syntax error messages.
537 * doc/bison.texinfo (Decl Summary): Rewrite entries for
538 lr.default-reductions and lr.type to be clearer, to mention
539 %nonassoc's effect on canonical LR, and to mention LAC. Add entry
540 for parse.lac.
541 (Glossary): Add entry for LAC.
542
543 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
544
545 parse.lac: implement exploratory stack reallocations.
546 * data/yacc.c: Rename %define variable parse.lac.es-capacity to
547 parse.lac.es-capacity-initial. Accept parse.lac.memory-trace
548 with values of "failures" (default) or "full".
549 (b4_declare_parser_state_variables): Add yyesa, yyes, and
550 yyes_capacity variables.
551 (YYSTACK_USE_ALLOCA): Ignore it if LAC requested.
552 (YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_ALLOC_MAXIMUM): Define if
553 LAC requested.
554 (YYCOPY_NEEDED): New cpp macro.
555 (YYCOPY): Define if LAC requested.
556 (yy_lac_stack_realloc): New function implementing stack
557 reallocations. Use YYMAXDEPTH for maximum stack size given that
558 the stack should never need to grow larger than the main state
559 stack needs to grow without LAC.
560 (YY_LAC_ESTABLISH): Update yy_lac invocation.
561 (yy_lac): Add arguments for exploratory stack memory data
562 recorded in the main parser. Invoke yy_lac_stack_realloc when
563 reallocation is necessary.
564 (yysyntax_error): Add the same new arguments and pass them to
565 yy_lac.
566 (yypstate_delete): Free yyes if necessary.
567 (yyesa, yyes, yyes_capacity): #define these to yypstate members
568 in the case of push parsing.
569 (yyparse, yypush_parse): Initialize yyes and yyes_capacity.
570 Update yysyntax_error invocations. At yyreturn, free yyes if
571 necessary.
572 * src/parse-gram.y: %define parse.lac full.
573 * tests/input.at (LAC: errors for %define): Extend for
574 parse.lac-memory-trace.
575 * tests/regression.at (LAC: Exploratory stack): Extend to check
576 that stack reallocs happen when expected.
577 (LAC: Memory exhaustion): Update to use YYMAXDEPTH and
578 parse.lac.es-capacity-initial.
579
580 2010-12-11 Joel E. Denny <joeldenny@joeldenny.org>
581
582 parse.lac: implement as %define variable.
583 LAC = lookahead correction. See discussion at
584 <http://lists.gnu.org/archive/html/bison-patches/2009-09/msg00034.html>.
585 However, one point there must be corrected: because of %nonassoc,
586 LAC is *not* always redundant for lr.type=canonical-lr.
587 * data/yacc.c: Accept values of "none" (default) or "full" for
588 parse.lac. Accept %define parse.lac.es-capacity to specify
589 capacity of LAC's temporary exploratory stack. It defaults to 20
590 and, for now, will not grow dynamically.
591 (b4_lac_flag, b4_lac_if): New m4 macros. Evaluate as true for
592 parse.lac!=none.
593 (YYBACKUP): Invoke YY_LAC_DISCARD.
594 (YY_LAC_ESTABLISH, YY_LAC_DISCARD): New cpp macros that invoke
595 yy_lac and track when it needs to be invoked
596 (yy_lac): New function that, given the current stack, determines
597 whether a token can eventually be shifted. Return status mimics
598 yyparse return status.
599 (yysyntax_error): Change yystate argument to yyssp so stack top
600 can be passed to yy_lac. If LAC is requested, build expected
601 token list by invoking yy_lac for every token instead of just
602 checking the current state for lookaheads. Return 2 if yy_lac
603 exhausts memory.
604 (yyparse, yypush_parse): Use local variable yy_lac_established and
605 cpp macros YY_LAC_ESTABLISH and YY_LAC_DISCARD to implement LAC.
606 Update yysyntax_error invocation. Add yyexhaustedlab code if LAC
607 is requested.
608 * tests/conflicts.at (%nonassoc and eof): Extend to check the
609 effect of each of -Dlr.type=canonical-lr and -Dparse.lac=full.
610 (parse.error=verbose and consistent errors): Likewise.
611 (LAC: %nonassoc requires splitting canonical LR states): New test
612 group demonstrating how LAC can fix canonical LR.
613 * tests/input.at (LAC: Errors for %define): New test group.
614 * tests/regression.at (LAC: Exploratory stack): New test group.
615 (LAC: Memory exhaustion): New test group.
616
617 2010-11-21 Joel E. Denny <joeldenny@joeldenny.org>
618
619 build: use gnulib's new bootstrap_sync option.
620 Now, whenever we update bison's copy of gnulib, bootstrap will
621 update itself the next time it's run.
622 * bootstrap: Copy from latest gnulib for bootstrap_sync support.
623 * bootstrap.conf (bootstrap_sync): Set to true.
624 * gnulib: Update to latest so bootstrap is in sync now.
625
626 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
627
628 yysyntax_error: fix for consistent error with lookahead.
629 * NEWS (2.5): Document.
630 * data/yacc.c (yysyntax_error): In a verbose syntax error
631 message while in a consistent state with a default action (which
632 must be an error action given that yysyntax_error is being
633 invoked), continue to drop the expected token list, but don't
634 drop the unexpected token unless there actually is no lookahead.
635 Moreover, handle that internally instead of returning 1 to tell
636 the caller to do it. With that meaning of 1 gone, renumber
637 return codes more usefully.
638 (yyparse, yypush_parse): Update yysyntax_error usage. Most
639 importantly, set yytoken to YYEMPTY when there's no lookahead.
640 * data/glr.c (yyreportSyntaxError): As in yacc.c, don't drop the
641 unexpected token unless there actually is no lookahead.
642 * data/lalr1.cc (yy::parser::parse): If there's no lookahead,
643 pass yyempty_ not yyla.type to yysyntax_error_.
644 (yy::parser::yysyntax_error_): Again, don't drop the unexpected
645 token unless there actually is no lookahead.
646 * data/lalr1.java (YYParser::parse): If there's no lookahead,
647 set yytoken to yyempty_ before invoking yysyntax_error.
648 (YYParser::yysyntax_error): Again, don't drop the unexpected
649 token unless there actually is no lookahead.
650 * tests/conflicts.at (parse.error=verbose and consistent
651 errors): Extend test group to further reveal how the previous
652 use of the simple "syntax error" message was too general. Test
653 yacc.c, glr.c, lalr1.cc, and lalr1.java. No longer an expected
654 failure.
655 * tests/java.at (AT_JAVA_COMPILE, AT_JAVA_PARSER_CHECK): Move
656 to...
657 * tests/local.at: ... here.
658 (_AT_BISON_OPTION_PUSHDEFS): Push AT_SKEL_JAVA_IF definition.
659 (AT_BISON_OPTION_POPDEFS): Pop it.
660 (AT_FULL_COMPILE): Extend to handle Java.
661
662 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
663
664 yysyntax_error: more preparation for readability of next patch.
665 There are no behavioral changes here.
666 * data/glr.c (yyreportSyntaxError): Reorganize.
667 * data/lalr1.cc (yy::parser::yysyntax_error_): Reorganize.
668 * tests/conflicts.at (parse.error=verbose and consistent errors):
669 Reorganize.
670
671 2010-11-07 Joel E. Denny <joeldenny@joeldenny.org>
672
673 yysyntax_error: prepare for readability of next patches.
674 These are purely whitespace changes that result in ugly code
675 but that make the next couple of patches much easier to read.
676 * data/glr.c (yyreportSyntaxError): Reindent.
677 * data/lalr1.cc (yy::parser::yysyntax_error_): Reindent.
678 * data/lalr1.java (YYParser::yysyntax_error): Reindent.
679 * data/yacc.c (yysyntax_error): Reindent.
680
681 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
682
683 Fix memory leak.
684 * src/output.c (prepare_rules): Free temporary array.
685
686 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
687
688 yysyntax_error: improve invocation readability.
689 * data/yacc.c (yyparse, yypush_parse): For yysyntax_error
690 invocation, get rid of the while loop, which is misleading
691 because there are really at most two iterations.
692
693 2010-10-31 Joel E. Denny <joeldenny@joeldenny.org>
694
695 * ChangeLog: Correct some errors in previous entries.
696
697 2010-10-17 Joel E. Denny <joeldenny@joeldenny.org>
698
699 maint: re-anchor all .gitignore entries.
700 * bootstrap: Copy from gnulib's latest for the fix to
701 automatically anchor entries it constructs.
702 * gnulib: Update to latest just so it has the same bootstrap.
703 * .gitignore, build-aux/.gitignore, doc/.gitignore:
704 * lib/.gitignore, m4/.gitignore, po/.gitignore:
705 * runtime-po/.gitignore: Re-anchor all entries.
706
707 2010-10-08 Paul Eggert <eggert@cs.ucla.edu>
708
709 Fix portability problem on OpenBSD 4.7.
710
711 Jim Meyering reported this in
712 <http://lists.gnu.org/archive/html/bug-bison/2010-10/msg00007.html>.
713 * data/yacc.c: Use EXIT_SUCCESS as a witness for stdlib.h,
714 not _STDLIB_H. EXIT_SUCCESS has been defined by the standard
715 for quite some time.
716 * src/parse-gram.c, src/parse-gram.h: Regenerate.
717 * tests/regression.at: Tamper with the renamed witness.
718
719 Adjust to recent changes to gnulib bootstrap.
720
721 * .cvsignore, build-aux/.cvsignore, doc/.cvsignore, etc/.cvsignore:
722 * examples/calc++/.cvsignore, lib/.cvsignore, m4/.cvsignore:
723 * po/.cvsignore, runtime-po/.cvsignore, src/.cvsignore:
724 * tests/.cvsignore: Remove; I don't use CVS to maintain Bison
725 anymore and don't know of anybody else who does. If someone needs
726 these files, they can resurrect them.
727 * .gitignore, build-aux/.gitignore, doc/.gitignore, lib/.gitignore:
728 * m4/.gitignore, po/.gitignore, runtime-po/.gitignore:
729 Omit leading '/', since bootstrap omits it.
730 Adjust file names to match current contents better.
731 * bootstrap: Sync from gnulib: this contains the new gnulib_mk_hook
732 installed just for us.
733 * bootstrap.conf (excluded_files): Don't exclude codeset.m4,
734 glibc21.m4, inttypes_h.m4, size_max.m4, xsize.m4, as they are now
735 needed somehow. Don't have time to look into why.
736 (gnulib_modules): Change malloc to malloc-gnu. Do we really assume
737 the GNU malloc behavior, where malloc (0) != NULL unless we're
738 out of storage? If not, we can omit malloc-gnu; but for now I left
739 it in to be safe.
740 (vc_ignore): Remove.
741 (gnulib_mk_hook): New function.
742 * README-hacking: Renamed from HACKING, since gnulib bootstrap now
743 uses that convention.
744
745 2010-09-09 Paul Hilfinger <hilfinger@cs.berkeley.edu>
746
747 * data/glr.c (yySymbol): Define as int to avoid compiler warnings about
748 possible change of value.
749
750 2010-09-08 Paul Hilfinger <hilfinger@cs.berkeley.edu>
751
752 * data/glr.c (yy_reduce_print): Change yyrhsVals to yyvsp to remove
753 compiler errors when using %debug.
754 Add declaration of yylow when locations in use to avoid compilation
755 error.
756 (yyglrReduce): Conditionalize message "Parse ... rejected by rule..."
757 on whether we are in split mode, for consistency with behavior of
758 non-GLR parsing.
759
760 2010-09-01 Akim Demaille <demaille@gostai.com>
761
762 Address GCC warnings about shadowed local variables (yyflag).
763 * data/glr.c (YYCHK): Rename yyflag as yychk_flag.
764 (yyprocessOneStack): Reduce the scope of yyaction, yyconflicts,
765 yyrule, and yyflag.
766
767 2010-08-05 Joel E. Denny <joeldenny@joeldenny.org>
768
769 Version 2.4.3.
770 * NEWS (2.4.3): Set date.
771
772 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
773
774 maint: add gettext version to release announcements.
775 Suggested by Paul Hilfinger at
776 <http://lists.gnu.org/archive/html/bison-patches/2010-07/msg00019.html>
777 <http://lists.gnu.org/archive/html/bison-patches/2010-08/msg00002.html>.
778 * cfg.mk (bootstrap-tools): Add gettext.
779
780 2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
781
782 doc: fix -W and %expect documentation some.
783 * NEWS (2.4.3): Mention that there are documentation fixes.
784 * doc/bison.texinfo (Expect Decl): Make it clear that %expect
785 turns conflicts into errors not warnings.
786 (Shift/Reduce): Likewise.
787 (Bison Options): Don't mention -Wsyntax. It doesn't exist.
788
789 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
790
791 -Werror: fix for rules useless in parser after conflicts.
792 * NEWS (2.4.3): Document fix.
793 * src/complain.c (error_message): Extend to handle incomplete
794 error messages so warn and warn_at can be used in more cases.
795 * src/gram.c (grammar_rules_useless_report): Use warn_at so that
796 -Werror is always obeyed.
797 * src/reduce.c (reduce_print): Use warn so that the "warnings
798 being treated as errors" message is printed consistently before
799 the first warning message. This makes testing easier.
800 * tests/local.at (AT_BISON_WERROR_MSG): New macro.
801 (AT_BISON_CHECK_NO_XML): Extend to check -Werror and
802 --warnings=error when warnings appear in bison's stderr.
803
804 2010-07-29 Joel E. Denny <joeldenny@joeldenny.org>
805
806 maint: enable gnits only at stable releases.
807 * configure.ac (AM_INIT_AUTOMAKE): Underscore or dash in a
808 version string should disable gnits. Explain in comments.
809
810 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
811
812 i18n: update.
813 * po/POTFILES.in: Add src/graphviz.c.
814
815 2010-07-28 Joel E. Denny <joeldenny@joeldenny.org>
816
817 i18n: fix for gnulib.
818 * po/POTFILES.in: Add remaining gnulib files that have
819 translatable strings.
820
821 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
822
823 build: fix our adjustments for gnulib files in lib.
824 * configure.ac: For prepending lib/ to the values of config
825 variables, fix detection of empty values. Also, due to recent
826 gnulib changes, add LIBUNISTRING_UNITYPES_H and
827 LIBUNISTRING_UNIWIDTH_H to the list of those variables.
828
829 2010-07-25 Joel E. Denny <joeldenny@joeldenny.org>
830
831 maint: use announce-gen's new --mail-headers.
832 * HACKING (Announce): Update instructions.
833 * cfg.mk (announcement_Cc_): Define.
834 * configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.18 as
835 required by latest gnulib.
836 * gnulib: Update to latest.
837
838 2010-07-24 Joel E. Denny <joeldenny@joeldenny.org>
839
840 tests: handle Valgrind that complains about >&-.
841 * tests/output.at (AT_CHECK_OUTPUT): Extend to accept pre-tests.
842 (Output files: -dv >&-): Skip test group if running
843 maintainer-check-valgrind.
844
845 2010-07-23 Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
846
847 * NEWS: Describe new semantic-predicate feature.
848 * data/c.m4 (b4_predicate_case): New definition.
849 * data/java.m4 (b4_predicate_case): New definition.
850 * data/glr.c (yyimmediate): Add definition.
851 (yydoAction): Remove comment, now obsolete.
852 Do YY_REDUCE_PRINT here.
853 (yyglrReduce): Alter comment to indicate that semantic values
854 need not be deferred.
855 Remove YY_REDUCE_PRINT from here; done in yydoAction.
856 (yyprocessOneStack): Pass immediate flag.
857 Delete stacks rejected by predicates in newly split-off parsers.
858 Change handling of yyerr so that only current stack gets deleted
859 when semantic predicate fails.
860 (yyfillin): Don't crash if a semantic value is unresolved (as may
861 happen in predicate rules).
862 Copy lr state as well in debugging mode.
863 Update comment on setting of yysval to include yyloc as well.
864 (yy_reduce_print): Add yynormal argument. Perform fillin properly.
865 Report unresolved RHS values.
866 (yyimmediate): New table.
867 * src/gram.h (struct rule): Add is_predicate field.
868 * src/output.c (user_actions_output): Use b4_predicate_case for
869 predicates.
870 (prepare_symbols): Output yyimmediate.
871 * src/scan-gram.l: Add %? token, SC_PREDICATE state.
872 * src/scan-code.l (code_props_rule_action_init): Add is_predicate
873 argument.
874 * src/scan-code.h (struct code_props): Add is_predicate field.
875 (code_props_rule_action_init): New interface.
876 * src/parse-gram.y (%?{...}): New token.
877 (rhs): Add %?{...} rule.
878 * src/parse-gram.c: Regenerate.
879 * src/parse-gram.h: Regenerate.
880 * src/reader.c (grammar_current_rule_action_append): Add
881 immediate argument.
882 (grammar_midrule_action): Use new interface for
883 code_props_rule_action_init.
884 (grammar_current_rule_action_append): Ditto.
885 (packgram): Transfer is_predicate value.
886 * src/reader.h (grammar_current_rule_action_append): New interface.
887 * doc/bison.texinfo: Document semantic predicates (%?).
888
889 * data/glr.c (yylhsNonterm, yyisDefaultedState,yyDefaultAction)
890 (yygetLRActions,yynewGLRStackItem,yyaddDeferredAction,yyinitStateSet)
891 (yyinitGLRStack,yyexpandGLRStack,yyupdateSplit,yymarkStackDeleted)
892 (yyundeleteLastStack,yyglrShift,yyglrShiftDefer,yydoAction,yyglrReduce)
893 (yyidenticalOptions,yymergeOptionSets,yyresolveStates,yyresolveAction)
894 (yyresolveLocations,yyresolveValue,yyreducePrint): Update parameter
895 names in comments and mention all parameters.
896 (struct yyGLRState): Fix description of yyposn field.
897 (yyresolveLocations): Correct comment so as not to imply action when
898 yyn1==0.
899
900 2010-06-17 Paul Eggert <eggert@cs.ucla.edu>
901
902 Update from GFDL GFDL 1.2 to 1.3.
903 * doc/bison.texinfo: Update GFDL version number.
904 * doc/fdl.texi: Update to version 1.3, taken from:
905 http://www.gnu.org/licenses/fdl.texi
906
907 Do not use date ranges in copyright notices.
908 See http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices
909
910 * HACKING, Makefile.am, NEWS, PACKAGING, README, README-alpha:
911 * TODO, bootstrap, bootstrap.conf:
912 * build-aux/update-b4-copyright, cfg.mk, configure.ac:
913 * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4:
914 * data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc:
915 * data/java-skel.m4, data/java.m4, data/lalr1.cc:
916 * data/lalr1.java, data/local.mk, data/location.cc:
917 * data/stack.hh, data/variant.hh, data/xslt/bison.xsl:
918 * data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl:
919 * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint:
920 * djgpp/README.in, djgpp/config.bat, djgpp/config.sed:
921 * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat:
922 * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h:
923 * djgpp/testsuite.sed, doc/bison.texinfo, doc/local.mk:
924 * doc/refcard.tex, etc/README, etc/bench.pl.in, etc/local.mk:
925 * examples/calc++/Makefile.am, examples/extexi:
926 * examples/local.mk, lib/abitset.c, lib/abitset.h:
927 * lib/bbitset.h, lib/bitset.c, lib/bitset.h:
928 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
929 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
930 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
931 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
932 * lib/libiberty.h, lib/local.mk, lib/main.c, lib/timevar.c:
933 * lib/timevar.def, lib/timevar.h, lib/vbitset.c:
934 * lib/vbitset.h, lib/yyerror.c, m4/bison-i18n.m4:
935 * m4/c-working.m4, m4/cxx.m4, m4/subpipe.m4, m4/timevar.m4:
936 * src/AnnotationList.c, src/AnnotationList.h:
937 * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c:
938 * src/LR0.h, src/Sbitset.c, src/Sbitset.h, src/assoc.c:
939 * src/assoc.h, src/closure.c, src/closure.h, src/complain.c:
940 * src/complain.h, src/conflicts.c, src/conflicts.h:
941 * src/derives.c, src/derives.h, src/files.c, src/files.h:
942 * src/flex-scanner.h, src/getargs.c, src/getargs.h:
943 * src/gram.c, src/gram.h, src/graphviz.c, src/ielr.c:
944 * src/ielr.h, src/lalr.c, src/lalr.h, src/local.mk:
945 * src/location.c, src/location.h, src/main.c:
946 * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c:
947 * src/named-ref.h, src/nullable.c, src/nullable.h:
948 * src/output.c, src/output.h, src/parse-gram.y:
949 * src/print-xml.c, src/print-xml.h, src/print.c, src/print.h:
950 * src/print_graph.c, src/print_graph.h, src/reader.c:
951 * src/reader.h, src/reduce.c, src/reduce.h, src/relation.c:
952 * src/relation.h, src/scan-code.h, src/scan-code.l:
953 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
954 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
955 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
956 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
957 * tests/actions.at, tests/atlocal.in, tests/c++.at:
958 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
959 * tests/existing.at, tests/glr-regression.at:
960 * tests/headers.at, tests/input.at, tests/java.at:
961 * tests/local.at, tests/local.mk, tests/named-refs.at:
962 * tests/output.at, tests/push.at, tests/reduce.at:
963 * tests/regression.at, tests/sets.at, tests/skeletons.at:
964 * tests/synclines.at, tests/testsuite.at, tests/torture.at:
965 Don't use date ranges in copyright notices.
966
967 2010-05-11 Akim Demaille <demaille@gostai.com>
968
969 lalrl1.cc: give a chance to user defined YYLLOC_DEFAULT.
970 * data/lalr1.cc (YYLLOC_DEFAULT): Move its definition from the
971 header file to the implementation file, after the user %code
972 sections.
973 * NEWS (2.5): Document this.
974
975 2010-05-11 Akim Demaille <demaille@gostai.com>
976
977 doc: please Emacs.
978 * doc/bison.texinfo (Local Variables): Move this after the
979 LocalWords, since the latter are looked for in the whole document,
980 while the former are looked for only at its end.
981 Require american spell checking.
982
983 2010-05-10 Akim Demaille <demaille@gostai.com>
984
985 doc: fix lalr1.cc documentation.
986 * doc/bison.texinfo (C++ Scanner Interface): Fix yylex signature.
987 (C++ Bison Interface): Fix lalr1.cc skeleton name.
988 (C++ Parser Interface): Fix semantic_type and location_type names.
989 Document yy::parser::token.
990 Reported by Jerry Quinn.
991
992 2010-05-10 Akim Demaille <demaille@gostai.com>
993
994 c++: use YYRHSLOC.
995 * data/lalr1.cc (YYRHSLOC): New.
996 (YYLLOC_DEFAULT): Use it.
997 * data/glr.cc: If location_type was user defined, do not include
998 location.hh, and do not produce location.hh and position.hh.
999 * tests/calc.at (YYLLOC_DEFAULT): Use YYRHSLOC.
1000 Check that glr.cc supports user defined location_type.
1001 * NEWS: Document this.
1002
1003 2010-05-07 Akim Demaille <demaille@gostai.com>
1004
1005 doc: fix typo.
1006 * tests/synclines.at: here.
1007
1008 2010-05-04 Akim Demaille <demaille@gostai.com>
1009
1010 tests: enhance AT_SYNCLINES_COMPILE.
1011 * tests/synclines.at (AT_SYNCLINES_COMPILE): More distcc patterns.
1012 (AT_TEST_SYNCLINE): Remove GCC 4.5 protection which is already
1013 taken care of in AT_SYNCLINES_COMPILE.
1014
1015 2010-05-04 Akim Demaille <demaille@gostai.com>
1016
1017 lalr1.cc: don't generate location.hh when location_type is defined
1018 * data/bison.m4 (b4_percent_define_get): Accept a default value.
1019 * data/c++.m4: Do not provide a default value for the %define
1020 variable location_type, rather, use b4_percent_define_get with a
1021 default argument where its value is needed.
1022 * data/lalr1.cc: Do not load location.cc (which outputs both
1023 location.hh and position.hh) if the user defined location_type.
1024 Do not include location.hh either.
1025
1026 2010-05-04 Akim Demaille <demaille@gostai.com>
1027
1028 lalr1.cc: minor refactoring.
1029 * data/lalr1.cc: Don't issue empty namespaces.
1030
1031 2010-05-04 Akim Demaille <demaille@gostai.com>
1032
1033 tests: fix %printer.
1034 Currently, there is no check that %printer ... <foo> (nor
1035 %destructor) is about an existing <foo> type. This C++ test had
1036 it wrong (<::std::string> vs. <std::string>).
1037
1038 * tests/c++.at (AT_CHECK_VARIANTS): In list.yy, redefine the
1039 pretty-printing of lists into something better for parser traces.
1040 Update the expected output.
1041 Fix correspondance between %type/%token and %printer.
1042
1043 2010-05-04 Akim Demaille <demaille@gostai.com>
1044
1045 lalr1.cc: location_type: make sure we don't depend on loc.(begin|end).
1046 * tests/calc.at (Span): Instead of begin/end, as in the built-in
1047 location class, use first and last.
1048 Define YYLLOC_DEFAULT to adjust to these changes.
1049 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Adjust to the
1050 location_type changes.
1051
1052 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1053
1054 tests: fix maintainer-xml-check.
1055 * data/xslt/xml2dot.xsl (xsl:template match="bison-xml-report"):
1056 Update output to include comments now produced by --graph.
1057 (xsl:template match="automaton"): As for --graph, name the
1058 digraph after the grammar file.
1059 * src/print-xml.c (escape_bufs): Enlarge array.
1060 (print_xml): Add bug-report and url attributes to
1061 bison-xml-report element.
1062
1063 2010-05-01 Joel E. Denny <joeldenny@joeldenny.org>
1064
1065 In DOT output, convert from "/*" comments to "//" comments.
1066 This handles the possibility that a "*/" might appear in
1067 variable portions of those comments at some point in the future.
1068 * src/graphviz.c (start_graph): Implement.
1069
1070 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1071
1072 Document that undefined %prec identifier warnings will remain.
1073 * NEWS (2.4.3): Here.
1074 (2.4.2): Here.
1075
1076 2010-04-30 Joel E. Denny <joeldenny@joeldenny.org>
1077
1078 Revert 2009-12-30 change for undefined %prec token complaints.
1079 That is, keep them as warnings because that should be sufficient
1080 to satisfy POSIX without creating backward compatibility issues.
1081 Suggested by Richard Stallman at
1082 <http://lists.gnu.org/archive/html/bison-patches/2010-03/msg00033.html>.
1083 * NEWS (2.5): Remove mention of complaint.
1084 * src/reader.c (grammar_rule_check): Convert complaint back to
1085 warning.
1086 * tests/input.at (%prec's token must be defined): Update.
1087
1088 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1089
1090 build: don't require src/bison during bootstrap.
1091 Suggested by Eric Blake at
1092 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00003.html>.
1093 * bootstrap.conf (bootstrap_epilogue): New function to make sure
1094 src/parse-gram.[ch] are stamped later than src/parse-gram.y.
1095
1096 2010-04-25 Joel E. Denny <joeldenny@joeldenny.org>
1097
1098 i18n: fix untranslatable string.
1099 Reported by Goran Uddeborg at
1100 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00000.html>.
1101 * src/muscle-tab.c (muscle_percent_define_insert): Here.
1102
1103 2010-04-13 Akim Demaille <demaille@gostai.com>
1104
1105 tests: calc: minor refactoring.
1106 * tests/calc.at (_AT_DATA_CALC_Y): Simplify yylex.
1107
1108 2010-04-13 Akim Demaille <demaille@gostai.com>
1109
1110 tests: calc: simplify location management.
1111 * tests/local.at (AT_LOC_PUSHDEF, AT_LOC_POPDEF): New.
1112 (_AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS): Use them to
1113 define the appropriate AT_LOC accessors.
1114 * tests/calc.at: Use AT_LOC accessors.
1115
1116 2010-04-13 Akim Demaille <demaille@gostai.com>
1117
1118 test location_type.
1119 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS):
1120 Define AT_LOCATION_TYPE_IF.
1121 (_AT_BISON_OPTION_POPDEFS): Undefine AT_LOCATION_TYPE_IF.
1122 * tests/calc.at (_AT_DATA_CALC_Y): When %define location_type is
1123 used, provide a user location type and use it.
1124 (Simple LALR1 C++ Calculator): Add a test case for location_type.
1125
1126 2010-04-13 Akim Demaille <demaille@gostai.com>
1127
1128 tests: check fclose's return value.
1129 * tests/calc.at (_AT_DATA_CALC_Y): Check fclose's return status.
1130
1131 2010-04-13 Akim Demaille <demaille@gostai.com>
1132
1133 tests: don't depend on the actual location type.
1134 * tests/calc.at: Use yy::parser::location_type rather than
1135 yy::location, since the former is always right, and might point to
1136 another type than the latter.
1137
1138 2010-04-13 Akim Demaille <demaille@gostai.com>
1139
1140 formatting changes.
1141 * tests/calc.at: Formatting changes.
1142
1143 2010-04-13 Akim Demaille <demaille@gostai.com>
1144
1145 lalr1.cc: remove useless forward declaration.
1146 * data/lalr1.cc: Include location.hh before stack.hh.
1147 Remove the useless forward declarations of position and location.
1148 Reported by Chris Morley.
1149 * data/glr.cc: Likewise.
1150
1151 2010-04-11 Joel E. Denny <joeldenny@joeldenny.org>
1152
1153 * NEWS (2.4.3): Mention fix for Sun Studio C++.
1154
1155 2010-04-10 Joel E. Denny <joeldenny@joeldenny.org>
1156
1157 tests: fix for newer Sun Studio C++.
1158 Reported by Dagobert Michelsen at
1159 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00023.html>.
1160 * THANKS (Dagobert Michelsen): Add.
1161 * configure.ac (AC_PREREQ): Set to 2.64 so we get the latest
1162 Autoconf macro for handling the restrict keyword.
1163 * gnulib: Update to latest, which no longer overrides that macro
1164 from Autoconf.
1165
1166 2010-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1167
1168 portability: fix pointer arithmetic to conform to C standard.
1169 Reported by Tys Lefering at
1170 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
1171 This fix is already implemented in glr.c and does not apply to
1172 lalr1.java.
1173 * data/lalr1.cc (yy::parser::parse): Increase size of
1174 yyerror_range and adjust subscripting so you don't have to
1175 subtract one from the beginning of the array.
1176 * data/yacc.c (b4_declare_parser_state_variables,
1177 yyparse, yypush_parse): Likewise.
1178
1179 2010-04-05 Akim Demaille <demaille@gostai.com>
1180
1181 remove useless include.
1182 * src/graphviz.h: Don't include stdbool.h.
1183
1184 2010-04-05 Akim Demaille <demaille@gostai.com>
1185
1186 graph: sign the output file.
1187 * src/graphviz.c (start_graph): Issue comments about Bison.
1188 Suggested by Tys Lefering.
1189
1190 2010-03-31 Joel E. Denny <jdenny@ces.clemson.edu>
1191
1192 portability: fix test suite for GCC 4.5's new #error message.
1193 Reported by Tys Lefering at
1194 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00030.html>.
1195 * NEWS (2.4.3): Mention.
1196 * tests/synclines.at (AT_TEST_SYNCLINE): Implement.
1197
1198 2010-03-30 Akim Demaille <demaille@gostai.com>
1199
1200 fix comments.
1201 * src/graphviz.h: Add missing license notice.
1202 Document.
1203
1204 2010-03-25 Akim Demaille <demaille@gostai.com>
1205
1206 tests: fix 250: parse.error=verbose overflow.
1207 * tests/regression.at (parse.error=verbose overflow): Avoid the
1208 double inclusion of stdlib.h as it triggers hard errors.
1209
1210 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1211
1212 portability: fix for BSD make.
1213 Reported by Johan van Selst at
1214 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00016.html>.
1215 * tests/local.mk ($(TESTSUITE)): Qualify package.m4 in
1216 this dependency list as in package.m4's target rule.
1217
1218 2010-03-23 Joel E. Denny <jdenny@ces.clemson.edu>
1219
1220 portability: fix spawning on at least FreeBSD 8 and FreeBSD 9.
1221 Reported by Johan van Selst at
1222 <http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00014.html>.
1223 * NEWS (2.4.3): New.
1224 * THANKS (Johan van Selst): Add.
1225 * etc/prefix-gnulib-mk (prefix): Adjust regex for makefile
1226 targets so that gnulib's new c++defs.h is matched.
1227 * gnulib: Update to latest.
1228
1229 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1230
1231 maint: update for changes to gnulib's announce-gen.
1232 * HACKING (Announce): RELEASE_TYPE=major must now be written
1233 RELEASE_TYPE=stable.
1234
1235 2010-03-20 Joel E. Denny <jdenny@ces.clemson.edu>
1236
1237 Version 2.4.2.
1238 * NEWS (2.4.2): Set version and date. For the recent test suite
1239 portability fixes, don't be so optimistic about their success
1240 given the lack of feedback on the affected platforms.
1241
1242 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1243
1244 tests: fix maintainer-xml-check for recent changes.
1245 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Use
1246 AT_BISON_CHECK_NO_XML rather than AT_BISON_CHECK because an
1247 output file whose name conflicts with a previous output file
1248 is now never generated.
1249
1250 2010-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
1251
1252 portability: fix several issues with M4 subprocess.
1253
1254 M4's output pipe was not being drained upon fatal errors during
1255 scan_skel. As a result, broken-pipe messages from M4 were seen
1256 on at least AIX, HP-UX, Solaris, and RHEL4, and this caused a
1257 failure in the test suite. The problem was that, on platforms
1258 where the default disposition for SIGPIPE is ignore instead of
1259 terminate, M4 sometimes saw fwrite fail with errno=EPIPE and
1260 then reported it. However, there's some sort of race condition,
1261 because the new test group occasionally succeeded.
1262 Reported by Albert Chin at
1263 <http://lists.gnu.org/archive/html/bug-bison/2010-02/msg00004.html>.
1264
1265 There were also problems with the test suite livelocking on
1266 Tru64 5.1b. Reported by Didier Godefroy at
1267 <http://lists.gnu.org/archive/html/bug-bison/2009-05/msg00005.html>.
1268 Switching to create_pipe_bidi suggested by Akim Demaille.
1269
1270 To attempt to solve both of these problems, switch to gnulib's
1271 create_pipe_bidi and register M4 process as a slave. Along the
1272 way, clean up file name conflict handling, which was affected by
1273 the broken-pipe problem before the switch.
1274 * NEWS (2.4.2): Document.
1275 * THANKS (Didier Godefroy): Add.
1276 * bootstrap.conf (gnulib_modules): Add pipe.
1277 * gnulib: Update to latest to make sure we have all the latest
1278 fixes.
1279 * lib/local.mk (lib_libbison_a_SOURCES): Remove subpipe.h and
1280 subpipe.c.
1281 * po/POTFILES.in (lib/subpipe.c): Remove.
1282 * src/files.c (compute_output_file_names): Update invocations
1283 of output_file_name_check.
1284 (output_file_name_check): In the case that the grammar file
1285 would be overwritten, use complain instead of fatal, but replace
1286 the output file name with /dev/null. Use the /dev/null solution
1287 for the case of two conflicting output files as well because it
1288 seems safer in case Bison one day tries to open both files at
1289 the same time.
1290 * src/files.h (output_file_name_check): Update prototype.
1291 * src/output.c (output_skeleton): Use create_pipe_bidi and
1292 wait_subprocess. Assert that scan_skel completely drains the
1293 pipe.
1294 * src/scan-skel.l (at_directive_perform): Update
1295 output_file_name_check invocation.
1296 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): Check that the
1297 grammar file actually isn't overwritten.
1298 (Conflicting output files: -o foo.y): Update expected output.
1299 * tests/skeletons.at (Fatal errors but M4 continues producing
1300 output): New test group.
1301
1302 2010-02-04 Joel E. Denny <jdenny@ces.clemson.edu>
1303
1304 Update POTFILES.
1305 * HACKING (Release Procedure): Add reminder about keeping
1306 POTFILES files up-to-date.
1307 * po/POTFILES.in (src/muscle-tab.c, src/scan-skel.l): Add.
1308
1309 2010-02-01 Joel E. Denny <jdenny@clemson.edu>
1310
1311 Code cleanup.
1312 * tests/atlocal.in (abs_top_srcdir): Remove shell variable,
1313 which is already defined in atconfig.
1314
1315 2010-01-22 Joel E. Denny <jdenny@clemson.edu>
1316
1317 tests: fix missing include caught by g++ 4.4.1.
1318 Reported by Tys Lefering.
1319 * HACKING (Release checks): Add note about trying a recent GCC.
1320 * tests/regression.at (_AT_DATA_DANCER_Y): For C++, include
1321 cstdlib for abort.
1322 (_AT_DATA_EXPECT2_Y): Likewise.
1323
1324 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1325
1326 * cfg.mk (gnulib_dir): Assume gnulib is a subdirectory.
1327
1328 2010-01-21 Joel E. Denny <jdenny@clemson.edu>
1329
1330 maint: automate PACKAGE_COPYRIGHT_YEAR update, and update it.
1331 * HACKING (Release Procedure): Update notes on copyright years.
1332 * Makefile.am (update-package-copyright-year): New target rule.
1333 * build-aux/update-package-copyright-year: New file.
1334 * cfg.mk (update-copyright): Add update-package-copyright-year
1335 as a dependency.
1336
1337 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1338
1339 * bootstrap: Import improvements from latest gnulib.
1340
1341 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1342
1343 build: require Automake 1.11.1 to avoid a security flaw.
1344 * HACKING (Release Procedure): Don't document Automake security
1345 flaw here.
1346 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
1347 why here.
1348
1349 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1350
1351 gnulib: update to latest.
1352
1353 2010-01-19 Joel E. Denny <jdenny@clemson.edu>
1354
1355 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
1356
1357 2010-01-15 Joel E. Denny <jdenny@clemson.edu>
1358
1359 Thank the developer of the initial push parser implementation.
1360 This unfortunate oversight is several years old.
1361 * THANKS (Odd Arild Olsen): Add.
1362
1363 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1364
1365 Fix some comments concerning LR(0) versus LALR(1).
1366
1367 Stop equating LR(0) with nondeterminism and LALR(1) with
1368 determinism. That is, if all states are consistent, then LR(0)
1369 tables are deterministic. On the other hand, LALR(1) tables
1370 might be nondeterministic before conflict resolution, and GLR
1371 permits LALR(1) tables to remain nondeterministic.
1372 * src/LR0.c, src/LR0.h: Here.
1373 * src/lalr.c, src/lalr.h: Here.
1374 * src/main.c (main): Here.
1375 * src/state.c, src/state.h: Here.
1376
1377 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
1378 parser tables.
1379
1380 2010-01-04 Joel E. Denny <jdenny@clemson.edu>
1381
1382 maint: run "make update-copyright"
1383
1384 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1385
1386 POSIX: complain if %prec's token was not defined.
1387 * NEWS (2.5): Document.
1388 * src/reader.c (grammar_rule_check): Convert warning to
1389 complaint.
1390 * tests/input.at (%prec's token must be defined): Update.
1391
1392 2009-12-30 Joel E. Denny <jdenny@clemson.edu>
1393
1394 POSIX: warn if %prec's token was not defined.
1395 Reported by Florian Krohm at
1396 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
1397 * NEWS (2.4.2): Document.
1398 * src/reader.c (grammar_rule_check): Implement.
1399 (grammar_current_rule_prec_set): Add comments explaining that we
1400 here assume a %prec identifier is a token, but we still manage
1401 to support POSIX.
1402 * tests/input.at (%prec's token must be defined): New test
1403 group.
1404
1405 2009-12-31 Joel E. Denny <jdenny@clemson.edu>
1406
1407 * HACKING (Release Procedure): Recommend a secure automake.
1408
1409 2009-12-29 Joel E. Denny <jdenny@clemson.edu>
1410
1411 portability: `<' and `>' are not always defined on addresses.
1412 Specifically, don't sort objects by their memory addresses when
1413 they're not allocated in the same array or other object. Though
1414 I haven't found a test case where that fails on my platform, C
1415 says the behavior is undefined.
1416 * src/AnnotationList.c (AnnotationList__insertInto): Remove
1417 FIXME. Use new id field of InadequacyList nodes rather than
1418 their memory addresses when sorting.
1419 (AnnotationList__compute_from_inadequacies): Add
1420 inadequacy_list_node_count argument to pass to
1421 InadequacyList__new_conflict.
1422 * src/AnnotationList.h
1423 (AnnotationList__compute_from_inadequacies): Update prototype
1424 and documentation for new argument.
1425 * src/InadequacyList.c (InadequacyList__new_conflict): Add
1426 node_count argument and use it to assign a unique ID.
1427 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
1428 (InadequacyList): Add id field.
1429 (InadequacyList__new_conflict): Update prototype and
1430 documentation for new argument.
1431 * src/ielr.c (ielr_compute_annotation_lists): Update
1432 AnnotationList__compute_from_inadequacies invocation.
1433
1434 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1435
1436 Fix handling of yychar manipulation in user semantic actions.
1437 The problem was that yacc.c didn't always update the yychar
1438 translation afterwards. However, other skeletons appear to be
1439 fine. glr.c appears to already translate yychar before every
1440 use. lalr1.cc does not define yychar and does not document its
1441 replacement, yyla, for users. It does provide yyclearin, but
1442 that does not manipulate yyla and thus requires no translation
1443 update. In lalr1.java, yychar is out of scope during semantic
1444 actions.
1445 * NEWS (2.5): Document.
1446 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
1447 yytoken here.
1448 (yyparse, yypush_parse): Instead, translate before every use of
1449 yytoken, and add comments explaining this approach.
1450 * tests/actions.at (Destroying lookahead assigned by semantic
1451 action): New test group checking that translation happens before
1452 lookahead destructor calls at parser return. Previously,
1453 incorrect destructors were called.
1454 * tests/conflicts.at (parse.error=verbose and consistent
1455 errors): New test group checking that translation happens at
1456 syntax error detection before the associated verbose error
1457 message and the associated lookahead destructor calls. While
1458 the destructor call is fixed by this patch, the verbose error
1459 message is currently incorrect due to another bug (see
1460 comments in test group), so this is an expected failure for now.
1461
1462 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1463
1464 YYFAIL: warn about uses and remove from lalr1.java.
1465 * NEWS (2.5): Document.
1466 * data/lalr1.java (YYParser::YYFAIL): Rename to YYERRLAB,
1467 and make it private. Update all uses.
1468 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
1469
1470 2009-12-21 Joel E. Denny <jdenny@clemson.edu>
1471
1472 YYFAIL: deprecate.
1473 * NEWS (2.4.2): Document deprecation and the phase-out plan.
1474 * data/lalr1.java (YYParser::YYFAIL): Add comment about
1475 deprecation.
1476 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
1477 YYFAIL from GCC cpp's -Wunused-macros.
1478 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
1479 documentation.
1480 (LocalWords): Remove YYFAIL.
1481
1482 2009-12-20 Joel E. Denny <jdenny@clemson.edu>
1483
1484 tests: cleanup.
1485 * tests/c++.at (Syntax error discarding no lookahead): Don't
1486 ignore stderr. Instead, eliminate remaining warnings.
1487
1488 2009-12-18 Joel E. Denny <jdenny@clemson.edu>
1489
1490 lalr1.cc: don't discard non-existent lookahead on syntax error.
1491 * data/lalr1.cc (yy::parser::parse): Check yyempty first.
1492 * tests/c++.at (Syntax error discarding no lookahead): New test
1493 group.
1494
1495 2009-12-17 Joel E. Denny <jdenny@clemson.edu>
1496
1497 Code cleanup.
1498 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
1499 function, which is no longer used.
1500
1501 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1502
1503 Add gcc's -Wundef to test suite and fix another warning from it.
1504 * NEWS (2.4.2): Update description of -Wundef fix.
1505 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
1506 (WARN_CFLAGS_TEST): New substitution.
1507 * data/glr.c: Avoid warning about __STRICT_ANSI__.
1508 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
1509 WARN_CFLAGS.
1510 (NO_WERROR_CFLAGS): Likewise.
1511 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
1512
1513 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1514
1515 * data/yacc.c: Reformat m4 a little.
1516
1517 2009-12-16 Joel E. Denny <jdenny@clemson.edu>
1518
1519 Document gcc -Wundef fix.
1520 * NEWS (2.4.2): Here.
1521 * THANKS (Jonathan Nieder): Add.
1522
1523 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1524
1525 Simplify y.tab.c when location tracking is disabled.
1526 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
1527 tracking is not enabled. Instead, unconditionally define
1528 YY_LOCATION_PRINT as a no-op for backward compatibility.
1529
1530 2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
1531
1532 Avoid warnings from gcc -Wundef y.tab.c.
1533 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
1534 defined before using them.
1535 * data/lalr1.cc: Likewise.
1536 * data/yacc.c: Likewise.
1537
1538 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1539
1540 autoconf: update to latest for fix of M4 detection.
1541 Reported by Eric Blake.
1542 * submodules/autoconf: Update.
1543
1544 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1545
1546 portability: use -DGNULIB_POSIXCHECK.
1547 Reported by Eric Blake. See discussions at
1548 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
1549 and
1550 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
1551 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
1552 * bootstrap.conf (gnulib_modules): Add all the printf modules
1553 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
1554 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
1555 (excluded_files): Remove m4/printf-posix.m4.
1556 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
1557 lib/libbison.a so gnulib libraries can be linked.
1558
1559 2009-12-15 Joel E. Denny <jdenny@clemson.edu>
1560
1561 gnulib: update for fix of fprintf-posix, which we'll use soon.
1562 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
1563 targets so that gnulib's new arg-nonnull.h and link-warning.h
1564 are matched.
1565 * gnulib: Update.
1566
1567 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1568
1569 Enable assertion output and --disable-assert for configure.
1570 * bootstrap.conf (gnulib_modules): Add assert module.
1571 * src/system.h (aver): Define as assert, and summarize the
1572 discussion on this issue.
1573
1574 2009-12-14 Joel E. Denny <jdenny@clemson.edu>
1575
1576 Expand GLR acronym in summary of Bison.
1577 Based on discussion with Akim Demaille starting at
1578 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
1579 * doc/bison.texinfo (Introduction): Here.
1580 * src/getargs.c (usage): Here.
1581
1582 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1583
1584 Document named references.
1585 * doc/bison.texinfo (Actions): Add new example and xref to
1586 Using Named References node.
1587 (Using Named References): New node.
1588
1589 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1590
1591 cleanup.
1592 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
1593 of char*.
1594 (Sbitset__isEmpty): Use Sbitset instead of char*.
1595 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
1596 instead of char. This helps to avoid casting errors.
1597 (Sbitset__or): Use Sbitset instead of char*.
1598
1599 2009-10-16 Joel E. Denny <jdenny@clemson.edu>
1600
1601 portability: don't assume 8-bit bytes.
1602 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
1603 * src/Sbitset.h (Sbitset__nbytes): Here.
1604 (Sbitset__byteAddress): Here.
1605 (Sbitset__bit_mask): Here.
1606 (Sbitset__last_byte_mask): Here.
1607 (Sbitset__ones): Here.
1608 (SBITSET__FOR_EACH): Here.
1609
1610 2009-10-11 Joel E. Denny <jdenny@clemson.edu>
1611
1612 portability: use va_start and va_end in the same function.
1613 * src/complain.c (error_message): Move va_end from here...
1614 (ERROR_MESSAGE): ... to here.
1615
1616 2009-10-08 Joel E. Denny <jdenny@clemson.edu>
1617
1618 * data/bison.m4: Update comments for rename to muscle-tab.h.
1619
1620 2009-10-07 Joel E. Denny <jdenny@clemson.edu>
1621
1622 Minor code cleanup.
1623 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
1624 replace all uses with UNIQSTR_CONCAT.
1625 * src/uniqstr.c (uniqstr_vsprintf): New function.
1626 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
1627 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
1628 macros.
1629
1630 2009-10-06 Joel E. Denny <jdenny@clemson.edu>
1631
1632 * TODO (Complaint submessage indentation): New.
1633
1634 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1635
1636 Minor code cleanup.
1637 * src/parse-gram.y: Clean up sorting of declarations.
1638 Use types to simplify %printer declarations where possible.
1639 Provide %printer for BRACKETED_ID and symbol.prec.
1640 * src/symtab.c: Whitespace change.
1641
1642 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1643
1644 tests: skip tests of file names that platform does not support.
1645 Reported by Michael Raskin at
1646 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
1647 * THANKS (Michael Raskin): Add.
1648 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
1649 to fail at least for file names containing ":" or "\".
1650
1651 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1652
1653 yysyntax_error: avoid duplicate lookahead collection.
1654 Except when memory reallocation is required, this change
1655 eliminates the need to invoke yysyntax_error twice and thus to
1656 repeat the collection of lookaheads. It also prepares for
1657 future extensions that will make those repetitions more
1658 expensive and that will require additional memory management in
1659 yysyntax_error. Finally, it fixes an obscure bug already
1660 exercised in the test suite.
1661 * data/yacc.c (yysyntax_error): Add arguments for message
1662 buffer variables stored in the parser. Instead of size, return
1663 status similar to yyparse status but indicating success of
1664 message creation. Other than the actual reallocation of the
1665 message buffer, import and clean up memory management code
1666 from...
1667 (yyparse, yypush_parse): ... here.
1668 * tests/regression.at (parse.error=verbose overflow): No longer
1669 an expected failure.
1670
1671 2009-09-23 Joel E. Denny <jdenny@clemson.edu>
1672
1673 yysyntax_error: test memory management more.
1674 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
1675 * tests/regression.at (parse.error=verbose and
1676 YYSTACK_USE_ALLOCA): New test group.
1677 (parse.error=verbose overflow): New test group that reveals an
1678 obscure bug. Expected fail for now.
1679
1680 2009-10-04 Joel E. Denny <jdenny@clemson.edu>
1681
1682 benchmarks: use %debug consistently among grammars.
1683 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
1684 %debug by default. It can affect the timings even if yydebug=0.
1685 (generate_grammar_calc): For consistency with other grammars,
1686 use YYDEBUG environment variable to set yydebug.
1687
1688 2009-10-03 Joel E. Denny <jdenny@clemson.edu>
1689
1690 Remove dead code.
1691 * src/symtab.c (symbol_pack): Here because every symbol's number
1692 is always defined by this time.
1693
1694 2009-10-03 Alex Rozenman <rozenman@gmail.com>
1695
1696 Add additional space after periods in NEWS.
1697 * NEWS (2.5): here.
1698
1699 2009-09-29 Joel E. Denny <jdenny@clemson.edu>
1700
1701 Use the correct conversion specifier for size_t.
1702 Reported by Jim Meyering.
1703 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
1704 because Sbitset__Index is size_t.
1705 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
1706
1707 2009-09-27 Joel E. Denny <jdenny@clemson.edu>
1708
1709 tests: don't abuse AT_BISON_CHECK.
1710 * tests/regression.at (parse-gram.y: LALR = IELR): Move
1711 additional shell commands outside of AT_BISON_CHECK.
1712
1713 2009-09-26 Joel E. Denny <jdenny@clemson.edu>
1714
1715 tests: check that parse-gram.y's IELR and LALR are identical.
1716 * tests/atlocal.in (abs_top_srcdir): New shell variable.
1717 * tests/regression.at (parse-gram.y: LALR = IELR): New test
1718 group.
1719
1720 2009-09-19 Alex Rozenman <rozenman@gmail.com>
1721
1722 Keep sub-messages aligned. Fix strings for translation.
1723 * src/location.h (location_print): Add return value.
1724 * src/location.c (location_print): Return number of printed
1725 characters.
1726 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
1727 new functions.
1728 * src/complain.cpp (indent_ptr): New static variable.
1729 (error_message, complain_at_indent, warn_at_indent): Implement
1730 the alignment mechanism.
1731 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
1732 for translations. Use new alignment mechanism.
1733 * tests/named-ref.at: Adjust test-cases.
1734 * NEWS (2.5): Add an announcement about named references.
1735
1736 2009-09-17 Akim Demaille <demaille@gostai.com>
1737
1738 doc: fixes.
1739 * doc/bison.texinfo: here.
1740 Reported by Alex Rozenman.
1741
1742 2009-09-16 Akim Demaille <demaille@gostai.com>
1743
1744 doc: lalr1.cc and variants.
1745 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
1746 "variant" %define variables.
1747 (C++ Semantic Values): Split into...
1748 (C++ Unions, C++ Variants): these.
1749 The latter is new.
1750 (C++ Parser Interface): Fix type names.
1751 Document parser::syntax_error.
1752 Document the fact that locations are not mandatory.
1753 (C++ Scanner Interface): Split into...
1754 (Split Symbols, Complete Symbols): these.
1755 The later is new.
1756 (Calc++ Parsing Driver): Use variants.
1757 Add more comments.
1758 Adjust style.
1759 (Calc++ Parser): Declare all the tokens, no
1760 longer accept raw characters.
1761 Remove %union.
1762 Adjust types and printers.
1763 Remove destructors.
1764 (Calc++ Scanner): Use make_<SYMBOL> functions.
1765 Use strerror in error message.
1766
1767 2009-09-16 Akim Demaille <demaille@gostai.com>
1768
1769 doc: spell checking.
1770 * doc/bison.texinfo: here.
1771
1772 2009-09-16 Akim Demaille <demaille@gostai.com>
1773
1774 doc: comment changes.
1775 * doc/bison.texinfo: Comment changes.
1776
1777 2009-09-16 Akim Demaille <demaille@gostai.com>
1778
1779 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
1780 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
1781 constructor to take a token_type instead of the (internal) symbol
1782 number.
1783 Call yytranslate_.
1784 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
1785 don't call yytranslate_ here.
1786
1787 2009-09-16 Akim Demaille <demaille@gostai.com>
1788
1789 TODO: statistics.
1790 * TODO (Figures): New.
1791
1792 2009-09-13 Joel E. Denny <jdenny@clemson.edu>
1793
1794 tests: clean up push.at test group titles.
1795 * tests/push.at: Remove "Push Parsing: " from test group titles
1796 because these are already under the banner "Push Parsing Tests".
1797
1798 2009-09-12 Alex Rozenman <rozenman@gmail.com>
1799
1800 Provide an additional sub-message for clarity.
1801 Add "symbol not found in production" error message when
1802 an "invalid reference" is detected in named references
1803 resolution.
1804 * src/scan-code.l: Update "invalid reference" case.
1805 * tests/named-ref.at: Adjust test-cases.
1806
1807 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1808
1809 Clean up yacc.c a little.
1810 * data/yacc.c: Clean up M4 for readability, and make output
1811 whitespace more consistent. For the main parse function
1812 comment, instead of saying "yyparse or yypush_parse", say either
1813 "yyparse" or "yypush_parse" depending on which it actually is.
1814
1815 2009-09-10 Joel E. Denny <jdenny@clemson.edu>
1816
1817 Fix --enable-gcc-warnings.
1818 * src/parse-gram.y (%printer <param>): Handle param_none.
1819
1820 2009-09-09 Akim Demaille <demaille@gostai.com>
1821
1822 lalr1.cc: syntax_error as exceptions.
1823 It is common to use sort of factories in the user actions. These
1824 factories may check some "syntactic" constraints that are not
1825 enforced by the grammar itself. This is possible using YYERROR
1826 within the action itself. Provide the user with a means to throw
1827 a syntax_error exception.
1828
1829 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
1830 Declare and define yy::parser::syntax_error.
1831 * data/lalr1.cc: Include stdexcept.
1832 (yy::parser::parse): Wrap the user action within a try/catch.
1833 * data/glr.cc: Include stdexcept.
1834
1835 2009-09-09 Akim Demaille <demaille@gostai.com>
1836
1837 lalr1.cc: add missing "inline".
1838 * data/c++.m4 (b4_public_types_define): Add missing inline to
1839 implementations provided in headers.
1840
1841 2009-09-09 Akim Demaille <demaille@gostai.com>
1842
1843 %param: documentation.
1844 * NEWS (2.6): Document %param, %lex-param, and %parse-param
1845 changes.
1846 * doc/bison.texinfo: Document that %lex-param and %parse-param
1847 are n-ary.
1848 Changes some examples to demonstrate it.
1849 (Calc++ Parser): Use %param.
1850
1851 2009-09-09 Akim Demaille <demaille@gostai.com>
1852
1853 Regen.
1854
1855 2009-09-09 Akim Demaille <demaille@gostai.com>
1856
1857 style changes.
1858 * src/parse-gram.y (add_param): Scope changes.
1859
1860 2009-09-09 Akim Demaille <demaille@gostai.com>
1861
1862 %parse: support several arguments.
1863 * src/parse-gram.y (current_param): New.
1864 (param_type): Add param_none.
1865 (params): New nonterminal.
1866 Use it.
1867
1868 2009-09-09 Akim Demaille <demaille@gostai.com>
1869
1870 Regen.
1871
1872 2009-09-09 Akim Demaille <demaille@gostai.com>
1873
1874 %param.
1875 Provide a means to factor lex-param and parse-param common
1876 declarations.
1877
1878 * src/parse-gram.y (param_type): New.
1879 Define a %printer for it.
1880 (add_param): Use it.
1881 (%parse-param, %lex-param): Merge into...
1882 (%parse): this new token.
1883 Adjust the grammar to use it.
1884 * src/scan-gram.l (RETURN_VALUE): New.
1885 (RETURN_PERCENT_FLAG): Use it.
1886 (RETURN_PERCENT_PARAM): New.
1887 Use it to support %parse-param, %lex-param and %param.
1888
1889 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1890
1891 Use aver not assert.
1892 * src/output.c: Don't include assert.h.
1893 (output_skeleton): Use aver not assert.
1894 * src/system.h (aver): In documentation of why, add links to
1895 Paul Eggert's explanations in the mailing lists.
1896
1897 2009-09-05 Alex Rozenman <rozenman@gmail.com>
1898
1899 Use "Unresolved reference" error message when no symbols were found
1900 in a symbolic reference resolution. Remove .expr and -expr from
1901 the shown reference when the reference is unresolved.
1902 * src/scan-code.l: Change the error message, adjust location columns,
1903 rename variable "exact_mode" to "explicit_bracketing".
1904 * tests/named-ref.at: Adjust existing tests and add a new one.
1905
1906 2009-09-04 Akim Demaille <demaille@gostai.com>
1907
1908 Adjust synclines in src/parse-gram.[ch].
1909 * tests/bison.in: Do some magic (including working around issues
1910 with ylwrap) when this wrapper is used to compile
1911 src/parse-gram.y.
1912
1913 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1914
1915 Complain about unused %define variables and %code qualifiers.
1916 * NEWS (2.5): Document.
1917 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
1918 * doc/bison.texinfo (Decl Summary): Document complaint, and
1919 improve %define documentation a little otherwise.
1920 * tests/input.at (Reject unused %code qualifiers): Update.
1921 (%define errors): Update.
1922 (%define, --define, --force-define): Update.
1923 (%define backward compatibility): Update.
1924 (Unused %define api.pure): Update.
1925 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
1926
1927 2009-09-03 Joel E. Denny <jdenny@clemson.edu>
1928
1929 Don't suppress warnings about unused parse.error.
1930 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
1931 %define variable parse.error unless b4_error_verbose_flag is
1932 actually expanded in a skeleton.
1933
1934 2009-09-03 Akim Demaille <demaille@gostai.com>
1935
1936 * NEWS (2.4.2): Add "Internationalization" item.
1937
1938 2009-09-03 Akim Demaille <demaille@gostai.com>
1939
1940 bootstrap: fix/improve find_tool.
1941 * bootstrap (find_tool): Improve error messages.
1942 Fix typo about find_tool_names.
1943
1944 2009-08-29 Joel E. Denny <jdenny@clemson.edu>
1945
1946 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
1947 See
1948 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
1949 * src/scan-code.h (code_props_rule_action_init): Rename
1950 named_ref arg to name so it doesn't shadow named_ref type. This
1951 makes it consistent with the function definition in scan-code.l
1952 anyway.
1953
1954 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1955
1956 %define: accept unquoted values.
1957 * NEWS (2.5): Group all %define changes together, and document
1958 this one. Remove quotes in IELR and canonical LR entry.
1959 * doc/bison.texinfo: Remove quotes in most examples throughout.
1960 (Decl Summary): Update %define documentation.
1961 (Table of Symbols): Likewise.
1962 * src/ielr.c (LrType): Update documentation.
1963 * src/parse-gram.y (content.opt): Add production for ID.
1964 * tests/actions.at: Remove quotes in most tests.
1965 * tests/calc.at: Likewise.
1966 * tests/existing.at: Likewise.
1967 * tests/input.at: Likewise.
1968 * tests/local.at: Likewise.
1969 * tests/push.at: Likewise.
1970 * tests/reduce.at: Likewise.
1971 * tests/torture.at: Likewise.
1972
1973 2009-08-28 Joel E. Denny <jdenny@clemson.edu>
1974
1975 %define lr.type: make values lowercase IDs.
1976 That is, "LALR" => "lalr", "IELR" => "ielr", and
1977 "canonical LR" => "canonical-lr".
1978 * NEWS (2.5): Update documentation.
1979 * doc/bison.texinfo (Decl Summary): Likewise.
1980 * src/ielr.c (ielr): Use new values.
1981 * src/ielr.h (ielr): Update documentation.
1982 * src/reader.c (prepare_percent_define_front_end_variables): Use
1983 and validate new values.
1984 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
1985 grammars.
1986 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
1987
1988 2009-08-27 Eric Blake <ebb9@byu.net>
1989
1990 scan-gram: avoid portability trap with ctype usage.
1991 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1992 Avoid compiler warning.
1993
1994 2009-08-27 Joel E. Denny <jdenny@clemson.edu>
1995
1996 tests: use perl for printing special sequences to files.
1997 And skip tests if perl is not available. This is better than
1998 playing tricks with shell portability. Suggested by Akim
1999 Demaille.
2000 * tests/input.at (Bad character literals): Use it here for
2001 omitting final newlines.
2002 (Bad escapes in literals): Use it here for special characters.
2003
2004 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
2005
2006 tests: show a use of %define lr.default-reductions "consistent"
2007 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
2008 prevents the omission of expected tokens for %error-verbose.
2009
2010 2009-08-26 Akim Demaille <demaille@gostai.com>
2011
2012 tests: portability fix.
2013 * tests/input.at (Bad escapes in literals): Don't expect "echo
2014 '\0'" to output \ then 0.
2015
2016 2009-08-26 Joel E. Denny <jdenny@clemson.edu>
2017
2018 Actually handle the yytable zero value correctly this time.
2019 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
2020 zero values in the YYTABLE comments.
2021 * data/glr.c (yytable_value_is_error): Don't check for zero
2022 value.
2023 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
2024 * data/yacc.c (yytable_value_is_error): Likewise.
2025 * data/lalr1.java (yy_table_value_is_error_): Likewise.
2026 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
2027 * src/tables.h: In header comments, explain why it's useless to
2028 check for a zero value in yytable.
2029
2030 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2031
2032 More fixes related to last two patches.
2033 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
2034 comments: zero indicates syntax error not default action.
2035 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
2036 defined.
2037 * data/glr.c (yyis_pact_ninf): Rename to...
2038 (yypact_value_is_default): ... this.
2039 (yyisDefaultedState): Update for rename.
2040 (yyis_table_ninf): Rename to...
2041 (yytable_value_is_error): ... this, and check for value zero
2042 besides just YYTABLE_NINF.
2043 (yygetLRActions): Check for default value from yypact. It
2044 appears that this check is always performed before this function
2045 is invoked, and so adding the check here is probably redundant.
2046 However, the code may evolve after this subtlety is forgotten.
2047 Also, update for rename to yytable_value_is_error. Because that
2048 macro now checks for zero, a different but equivalent branch of
2049 the if-then-else here is evaluated.
2050 (yyreportSyntaxError): Update for rename to
2051 yytable_value_is_error. The zero condition was mishandled
2052 before.
2053 (yyrecoverSyntaxError): Update for renames. No behavioral
2054 changes.
2055 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
2056 New function.
2057 (yy_table_value_is_error_): New function.
2058 (parse): Use new functions where possible. No behavioral
2059 changes.
2060 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
2061 The zero condition was mishandled before.
2062 * data/yacc.c (yyis_pact_ninf): Rename to...
2063 (yypact_value_is_default): ... this.
2064 (yyis_table_ninf): Rename to...
2065 (yytable_value_is_error): ... this, and check for value zero
2066 besides just YYTABLE_NINF.
2067 (yysyntax_error): Update for rename to yytable_value_is_error.
2068 The zero condition was mishandled before.
2069 (yyparse): Update for renames. No behavioral changes.
2070 * src/tables.h: Improve comments about yypact, yytable, etc.
2071 more. Most importantly, say yytable value of zero means syntax
2072 error not default action.
2073
2074 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2075
2076 Fix %error-verbose for conflicts resolved by %nonassoc.
2077 * NEWS (2.5): Document.
2078 * data/glr.c (yyreportSyntaxError): Fix this by checking
2079 yyis_table_ninf.
2080 * data/yacc.c (yysyntax_error): Likewise.
2081 * data/lalr1.cc (yysyntax_error_): Fix this by checking
2082 yytable_ninf_.
2083 * data/lalr1.java (yysyntax_error): Likewise.
2084 * tests/conflicts.at (%nonassoc and eof): Update expected output
2085 and remove FIXME.
2086
2087 2009-08-25 Joel E. Denny <jdenny@clemson.edu>
2088
2089 Some code and documentation improvements.
2090 * data/c.m4 (b4_table_value_equals): New macro to capture
2091 some repeated code.
2092 * data/glr.c (yyis_pact_ninf): Use it here.
2093 (yyis_table_ninf): Likewise.
2094 (yyreportSyntaxError): Improve internal comments.
2095 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
2096 Use it everywhere possible.
2097 (yyis_table_ninf): Likewise.
2098 (yysyntax_error): Improve internal comments.
2099 * data/lalr1.cc (yysyntax_error_): Likewise.
2100 * data/lalr1.java (yysyntax_error): Likewise.
2101 * src/tables.h: Improve comments about yypact, yytable, etc.
2102
2103 2009-08-21 Joel E. Denny <jdenny@clemson.edu>
2104
2105 Use locale when quoting.
2106 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
2107 quote rather than implementing quoting here.
2108
2109 2009-08-20 Eric Blake <ebb9@byu.net>
2110
2111 Make previous patch more robust.
2112 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
2113 argmatch.h.
2114 (output_skeleton): Use it.
2115 Suggested by Akim Demaille.
2116
2117 Import latest m4/m4.m4.
2118 * submodules/autoconf: Update to autoconf 2.64.
2119 * configure.ac (M4_GNU_OPTION): New define.
2120 * src/output.c (output_skeleton): Use it to resolve FIXME.
2121 * NEWS: Mention this.
2122
2123 2009-08-19 Joel E. Denny <jdenny@clemson.edu>
2124
2125 Fix complaints about escape sequences.
2126 Discussed starting at
2127 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
2128 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
2129 For a \0 and similar escape sequences meaning the null
2130 character, report an invalid escape sequence instead of an
2131 invalid null character because the latter does not actually
2132 appear in the user's input.
2133 In all escape sequence complaints, don't escape the initial
2134 backslash, and don't quote when the sequence appears at the end
2135 of the complaint line unless there's whitespace that quotearg
2136 won't escape.
2137 Consistently say "invalid" not "unrecognized".
2138 Consistently prefer "empty character literal" over "extra
2139 characters in character literal" warning for invalid escape
2140 sequences; that is, consistently discard those sequences.
2141 * tests/input.at (Bad escapes in literals): New.
2142
2143 2009-08-19 Akim Demaille <demaille@gostai.com>
2144
2145 doc: fixes.
2146 * doc/bison.texinfo: Fix minor Texinfo errors.
2147
2148 2009-08-19 Akim Demaille <demaille@gostai.com>
2149
2150 tests: distcc compliance.
2151 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
2152 error messages from the output.
2153
2154 2009-08-19 Akim Demaille <demaille@gostai.com>
2155
2156 variables: simplify the upgrade of namespace into api.namespace.
2157
2158 This patch simplifies "variables: rename namespace as
2159 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
2160 Suggested by Joel E. Denny in
2161 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
2162
2163 * src/muscle-tab.c (muscle_percent_variable_update): New.
2164 (muscle_percent_define_insert): Use it in replacement of the
2165 previous tr invocation.
2166 Remove variable_tr, no longer needed.
2167 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2168 Remove.
2169 * data/c++.m4: No longer handle namespace -> api.namespace.
2170 * tests/input.at (%define backward compatibility): Check that
2171 namespace is treated as api.namespace.
2172
2173 2009-08-19 Akim Demaille <demaille@gostai.com>
2174
2175 doc: %initial-action to initialize yylloc.
2176 Reported by Bill Allombert.
2177 * doc/bison.texinfo: Set fill-column to 76.
2178 (Location Type): Document the use of %initial-action to initialize
2179 yylloc.
2180
2181 2009-08-19 Akim Demaille <demaille@gostai.com>
2182
2183 lalr1.cc: use state_type.
2184 * data/lalr1.cc (yysyntax_error_): Use state_type.
2185 Move argument names into yy*.
2186
2187 2009-08-19 Akim Demaille <demaille@gostai.com>
2188
2189 lalr1.cc: get rid of yyparse's yystate.
2190 yystate and yystack_[0].state are equal, keep only the latter.
2191 The former was also used as a temporary variable to compute the
2192 post-reduction state. Move this computation into an auxiliary
2193 function.
2194
2195 * data/glr.c (yyLRgotoState): Fuse variable definition and first
2196 assignment.
2197 * data/lalr1.cc (yy_lr_goto_state_): New.
2198 (yyparse): Use it.
2199 Replace remaining uses of yystate by yystate_[0].state.
2200 Remove the former.
2201
2202 2009-08-19 Akim Demaille <demaille@gostai.com>
2203
2204 lalr1.cc: destroy $$ when YYERROR is called.
2205 * data/lalr1.cc (yyreduce): Compute the resulting state before
2206 running the user action so that yylhs is a valid symbol.
2207 (yyerrorlab): Since yylhs is complete (it knows its type), we can
2208 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
2209 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
2210
2211 2009-08-18 Joel E. Denny <jdenny@clemson.edu>
2212
2213 maint: update for gnulib's recent update-copyright changes
2214 * gnulib: Update.
2215 * .x-update-copyright (COPYING): Add as it's no longer implied
2216 when .x-update-copyright is present.
2217 * cfg.mk (update-copyright-local): Remove, now ignored.
2218 (update-copyright): Declare update-b4-copyright as a dependency.
2219
2220 2009-08-17 Akim Demaille <demaille@gostai.com>
2221
2222 build: require gettext 0.17.
2223
2224 Suggested by Bruno Haible.
2225 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
2226 * configure.ac: require gettext 0.17 to ensure compatibility with
2227 gnulib.
2228
2229 2009-08-17 Akim Demaille <demaille@gostai.com>
2230
2231 build: lower gettext requirements.
2232
2233 Bison was uselessly requiring the formatstring macros from
2234 gettext, which resulted in mo files not being installed on systems
2235 that perfectly supported Bison mo files. Lower the requirement.
2236 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
2237
2238 * configure.ac: Require need-ngettext instead of
2239 need-formatstring-macros.
2240 Reported by Martin Jabocs.
2241 Suggested by Bruno Haible.
2242 * INSTALL: Restructure.
2243 (Internationalization): New.
2244
2245 2009-08-14 Joel E. Denny <jdenny@clemson.edu>
2246
2247 maint: fix use of copyright year intervals.
2248 * gnulib: Update.
2249 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
2250 as now recommended in gnulib/NEWS.
2251 * build-aux/update-b4-copyright: Fix.
2252 * cfg.mk (update-copyright-env): Configure update-copyright.
2253
2254 2009-08-13 Joel E. Denny <jdenny@clemson.edu>
2255
2256 Make it easier to write deterministic tests.
2257 Continues Akim's work from his 2009-06-10 commits.
2258 * src/reader.c (check_and_convert_grammar): Don't add any
2259 symbols after the first symbols_do invocation.
2260 * src/symtab.c (symbols_sorted): New static global.
2261 (user_token_number_redeclaration): Update comments.
2262 (symbol_from_uniqstr): If a new symbol is being created, assert
2263 that symbols_sorted hasn't been allocated yet.
2264 (symbols_free): Free symbols_sorted.
2265 (symbols_cmp, symbols_cmp_qsort): New functions.
2266 (symbols_do): Sort symbol_table into symbols_sorted on first
2267 invocation.
2268 * tests/input.at (Numbered tokens): Recombine tests now that the
2269 output should be deterministic across multiple numbers.
2270
2271 2009-08-12 Akim Demaille <demaille@gostai.com>
2272
2273 tests: GCC 4.5 compliance.
2274 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
2275 messages about #error.
2276
2277 2009-08-12 Akim Demaille <demaille@gostai.com>
2278
2279 build: fix the generation of the documentation.
2280 Some of our targets use "bison --help", but they can't depend on
2281 "bison" itself (to avoid additional requirements on the user), so
2282 they used to call "make src/bison" in the commands. Then
2283 concurrent builds may fail: one make might be aiming one of its
2284 jobs at compiling src/bison, and another job at generating the man
2285 page. If the latter is faster than the former, then we have two
2286 makes that concurrently try to compile src/bison.
2287
2288 This might also be a more convincing explanation for the failure
2289 described in the patch "build: fix paths".
2290
2291 * Makefile.am (SUFFIXES): Initialize.
2292 * build-aux/move-if-change: New, symlink to gnulib's.
2293 * build-aux/local.mk: Ship it.
2294 * doc/common.x: Remove, merged into...
2295 * doc/bison.x: here.
2296 * doc/local.mk (doc/bison.help): New.
2297 ($(CROSS_OPTIONS_TEXI)): Depend on it.
2298 Use src/bison.
2299 (.x.1): Replace with...
2300 (doc/bison.1): this explicit, simpler, target.
2301 (common_dep): Remove, inlined where appropriate.
2302 (SUFFIXES, PREPATH): Remove, unused.
2303
2304 2009-08-12 Akim Demaille <demaille@gostai.com>
2305
2306 gnulib: improve prefixing.
2307 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
2308 change the value of...
2309 (gl_LIBOBJS): this.
2310 Adjust more variables.
2311 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
2312 gl_LIBOBJS.
2313 (prefix): Also transform rules whose targets have slashes.
2314 Use $prefix liberally.
2315 Map @MKDIR_P@ to $(MKDIR_P).
2316 Prefix directories that are mkdir'd.
2317
2318 2009-08-12 Akim Demaille <demaille@gostai.com>
2319
2320 build: fix paths.
2321 When using $(top_builddir) inconsistently, Make (including GNU
2322 Make) is sometimes confused. As a result it may want to build
2323 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
2324 file, different names) concurrently, which, amusingly enough,
2325 might end with:
2326
2327 ranlib lib/libbison.a
2328 ranlib lib/libbison.a
2329 make[2]: *** [lib/libbison.a] Segmentation fault
2330
2331 on OS X.
2332
2333 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
2334 needed.
2335
2336 2009-08-12 Akim Demaille <demaille@gostai.com>
2337
2338 distcheck: fix.
2339
2340 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
2341
2342 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2343
2344 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
2345
2346 2009-08-10 Joel E. Denny <jdenny@clemson.edu>
2347
2348 Miscellaneous code readability improvements.
2349
2350 * src/reader.c (reader): Move %define front-end variable
2351 defaults and checking into...
2352 (prepare_percent_define_front_end_variables): ... this new
2353 function.
2354
2355 * src/scan-gram.l (INITIAL): For consistency with string
2356 literals, don't store open quote on character literal. It's
2357 discarded before returning anyway.
2358 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
2359 Make length test more readable, and make the character stored
2360 for an empty literal more obvious while consistent with the
2361 previous behavior.
2362
2363 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
2364 USER_NUMBER_HAS_STRING_ALIAS throughout.
2365 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
2366 that is repeated in symtab.h. Improve argument names to make it
2367 clear which side of the symbol-string alias pair is which.
2368 (symbol_check_alias_consistency): Improve local variable names
2369 for the same purpose.
2370 * src/symtab.h (struct symbol): Make comments about aliases
2371 clearer.
2372 (symbol_make_alias): Improve comments and argument name.
2373 * src/output.c (token_definitions_output): Update for rename to
2374 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
2375
2376 2009-08-08 Alex Rozenman <rozenman@gmail.com>
2377
2378 Convert "misleading reference" messages to warnings.
2379 * src/scan-code.l: New function 'show_sub_messages', more
2380 factoring.
2381 * tests/named-ref.at: Adjust tests.
2382
2383 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2384
2385 maint: run "make update-copyright"
2386
2387 2009-08-06 Joel E. Denny <jdenny@clemson.edu>
2388
2389 maint: make update-b4-copyright easier to use
2390 * build-aux/update-b4-copyright: In warnings, report line
2391 numbers rather than character positions.
2392 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
2393 that update-copyright runs it.
2394 * gnulib: Update.
2395
2396 2009-08-05 Joel E. Denny <jdenny@clemson.edu>
2397
2398 maint: clean up update-b4-copyright code
2399 * build-aux/update-b4-copyright: Do not accept 2-digit
2400 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
2401 Don't accept a `[' in a b4_copyright argument.
2402 Format code more consistently.
2403 Don't assume b4*copyright never occurs.
2404
2405 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2406
2407 maint: automate b4_copyright updates.
2408 * Makefile.am (update-b4-copyright): New target rule.
2409 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
2410 * build-aux/update-b4-copyright: New.
2411 * data/yacc.c: Remove stray characters around b4_copyright
2412 invocations.
2413
2414 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2415
2416 maint: automate annual package-wide copyright-year update.
2417 * .x-update-copyright: New.
2418 * Makefile.am (EXTRA_DIST): Remove maint.mk.
2419 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
2420 update-copyright. Remove gnumakefile, which is implied by
2421 maintainer-makefile.
2422 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
2423 * gnulib: Update.
2424 * maint.mk: Remove, now copied from gnulib.
2425 * examples/extexi: Add missing "(C)" in copyright statement so
2426 update-copyright can recognize it.
2427 * src/LR0.h: Likewise.
2428 * src/print.h: Likewise.
2429 * src/print_graph.h: Likewise.
2430 * src/gram.c: Add missing comma in copyright statement.
2431 * src/gram.h: Likewise.
2432
2433 2009-08-04 Joel E. Denny <jdenny@clemson.edu>
2434
2435 Fix "make distcheck".
2436 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
2437 of just calc.stamp.
2438
2439 2009-08-01 Joel E. Denny <jdenny@clemson.edu>
2440
2441 Pacify "gcc -Wunused" for the input function from Flex.
2442 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
2443 and later.
2444 * src/scan-code.l: Add "%option noinput", which I cannot find in
2445 the Flex manual, but which Flex has supported since at least as
2446 far back as 2.5.4. However, if any of our developers still use
2447 Flex 2.5.4, they'll need to stop configuring with
2448 --enable-gcc-warnings because "%option noinput" didn't work
2449 correctly until Flex 2.5.6.
2450 * src/scan-gram.l: Likewise.
2451 * src/scan-skel.l: Likewise.
2452
2453 2009-07-31 Alex Rozenman <rozenman@gmail.com>
2454
2455 Fix --enable-gcc-warnings problems.
2456 * src/reader.c: Adjust variable names.
2457 * src/scan-code.l: Fix prototypes and adjust names.
2458 * src/named-ref.c: Remove redundant "if".
2459
2460 2009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2461
2462 Fix a --enable-gcc-warnings problem.
2463 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
2464 variable.
2465
2466 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2467
2468 Warn about character literals not of length one.
2469 * NEWS (2.5): Document.
2470 * src/scan-gram.l (INITIAL): Remove comment that we don't check
2471 the length.
2472 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
2473 * tests/input.at (Bad character literals): New test group.
2474
2475 2009-07-24 Alex Rozenman <rozenman@gmail.com>
2476
2477 Fix some memory leaks.
2478 * src/named-ref.c: Add a pointer check (named_ref_free).
2479 * src/scan-code.l: New function (variant_table_free). Called in
2480 code_scanner_free.
2481 * src/symlist.c: Call to named_ref_free (symbol_list_free).
2482
2483 2009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
2484
2485 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
2486
2487 2009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
2488
2489 Some M4 cleanup in the testsuite.
2490 Suggested by Eric Blake at
2491 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
2492 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
2493 complicate the code by distinguishing between a missing value
2494 and an empty string value for an optional argument. This fix is
2495 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
2496 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
2497 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
2498 arguments are not needed because of the following changes.
2499 Fix stale comments.
2500 Bison developers should use GNU M4 and should not use
2501 POSIXLY_CORRECT when building the test suite, so do not
2502 complicate the code by avoiding $10 and above.
2503 Do not quote an empty string value for an optional argument, and
2504 do not distinguish between a missing value and an empty string
2505 value.
2506
2507 2009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2508
2509 Revert unnecessary column realignment in --help output.
2510 Reported by Akim Demaille at
2511 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
2512 * src/getargs.c (usage): Here.
2513
2514 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2515
2516 Alphabetical order in src/local.mk.
2517 * src/local.mk: Adjust.
2518
2519 2009-07-04 Alex Rozenman <rozenman@gmail.com>
2520
2521 Style changes and factoring.
2522 * src/named-ref.h: Add comments.
2523 * src/parse-gram.y: Readability and style changes.
2524 * src/reader.c: Factoring: assign_named_ref function.
2525 * src/scan-code.l: Factoring and style changes. Rename
2526 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
2527 Use "unsigned" type for variant index. Improve readablity.
2528 * src/scan-gram.l: Change error messages and add comments.
2529 * src/symlist.h: symbol_list_null: New function decl.
2530 * src/symlist.c: symbol_list_null: Implement here.
2531 * tests/named-refs.at: Adjust for new error messages.
2532
2533 2009-06-29 Eric Blake <ebb9@byu.net>
2534
2535 scan-code: avoid compiler warnings
2536 * src/scan-code.l (parse_named_ref): Use correct specifiers.
2537
2538 2009-06-29 Akim Demaille <demaille@gostai.com>
2539
2540 build: avoid concurrent extraction of calc++.
2541 * examples/calc++/Makefile.am (calc.stamp): New.
2542 Depend on it to create the sources of calc++ so that concurrent
2543 builds don't launch several "extexi" in parallel.
2544 Not only this is inefficient, this also builds incorrect sources
2545 with several extractions mixed together.
2546
2547 2009-06-29 Akim Demaille <demaille@gostai.com>
2548
2549 parse.error: fix.
2550 * data/bison.m4: Move code related to specific variables after the
2551 definition of the variable-maintaining macros so that we don't
2552 "invoke" b4_percent_define_check_values before it is defined.
2553
2554 2009-06-29 Akim Demaille <demaille@gostai.com>
2555
2556 variables: parse.error
2557
2558 Implement, document, and test the replacement of %error-verbose
2559 by %define parse.error "verbose".
2560 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
2561 values of the parse.error variable.
2562 Make "simple" its default value.
2563 Check the valid values.
2564 * src/parse-gram.y: Use %define parse.error.
2565 (PERCENT_ERROR_VERBOSE): New token.
2566 Support it.
2567 * src/scan-gram.l: Support %error-verbose.
2568
2569 * doc/bison.texinfo (Decl Summary): Replace the documentation of
2570 %define error-verbose by that of %define parse.error.
2571 * NEWS: Document it.
2572
2573 * tests/actions.at, tests/calc.at: Use parse.error instead of
2574 %error-verbose.
2575
2576 2009-06-27 Alex Rozenman <rozenman@gmail.com>
2577
2578 Implement support for named symbol references.
2579 * src/parse-gram.y: Add new syntax (named_ref.opt).
2580 * src/reader.c: Store named refs in symbol lists.
2581 * src/reader.h: New argument for symbol_append and
2582 action_append functions.
2583 * src/scan-code.h: Add new field (named_ref) into
2584 code_props data structure. Keeps named ref of midrule
2585 actions.
2586 * src/scan-code.l: Support for named refs in semantic
2587 action code. New function 'parse_named_ref'.
2588 * src/scan-gram.l: Support bracketed id.
2589 * src/symlist.c: Store named refs in symbol lists.
2590 * src/symlist.h: New field in symbol list: named_ref.
2591 * src/named-ref.h: New file, a struct for named_ref.
2592 * src/named-ref.cp: New file, named_ref_new function.
2593 * src/local.mk: Add two new files.
2594 * tests/testsuite.at: Include new test group:
2595 * tests/named-refs.at: this new file.
2596
2597 2009-06-25 Akim Demaille <demaille@gostai.com>
2598
2599 hash: check insertion for memory exhaustion.
2600 * src/uniqstr.c (uniqstr_new): New.
2601
2602 2009-06-24 Akim Demaille <demaille@gostai.com>
2603
2604 variables: rename namespace as api.namespace.
2605 Discussed in
2606 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
2607
2608 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
2609 New.
2610 (b4_percent_define_use): New.
2611 Use it where applicable.
2612 * data/c++.m4: Replace uses of the variable "namespace" by
2613 "api.namespace".
2614 Default the latter to the former.
2615 * doc/bison.texinfo (Decl Summary): Document "namespace" as
2616 obsolete.
2617 Document api.namespace.
2618 Use @samp to document %define uses, keep @code for identifiers.
2619 * NEWS: Likewise.
2620 * tests/c++.at, tests/input.at: Test api.namespace instead of
2621 namespace. (The tests passed with namespace.)
2622
2623 2009-06-11 Akim Demaille <demaille@gostai.com>
2624
2625 style changes.
2626 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
2627 * src/print-xml.c: Style changes.
2628 * tests/conflicts.at: Comment changes.
2629
2630 2009-06-11 Akim Demaille <demaille@gostai.com>
2631
2632 xml: beware of user strings used to give a %prec to rules.
2633 * tests/conflicts.at (%prec with user strings): New.
2634 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
2635 XML output.
2636
2637 2009-06-11 Akim Demaille <demaille@gostai.com>
2638
2639 hash: check insertion for memory exhaustion.
2640 * src/muscle-tab.c (muscle_insert, muscle_grow)
2641 * src/state.c (state_hash_insert): Check the return value of
2642 hash_insert.
2643
2644 2009-06-11 Akim Demaille <demaille@gostai.com>
2645
2646 tests: honor TESTSUITEFLAGS in every check target.
2647 * tests/local.mk (RUN_TESTSUITE): New.
2648 (check-local, installcheck-local, maintainer-check-g++)
2649 (maintainer-check-posix, maintainer-check-valgrind): Use it.
2650
2651 2009-06-10 Akim Demaille <demaille@gostai.com>
2652
2653 deterministic test suite.
2654 Some consistency checks on symbols are performed after all the
2655 symbols were read, by an iteration over the symbol table. This
2656 traversal is nondeterministic, which can be a problem for test
2657 cases.
2658 Avoid this.
2659 Addresses another form of nondeterminism reported by Joel E. Denny.
2660 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2661
2662 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
2663 test in two.
2664 Use different file names for the three tests to make the
2665 maintenance easier.
2666
2667 2009-06-10 Akim Demaille <demaille@gostai.com>
2668
2669 gnulib: update.
2670 * gnulib: Update to latest.
2671 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
2672 * m4/.gitignore: Regen.
2673 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
2674 Call xalloc_die on hash_insert failures.
2675 Requested by the new __warn_unused_result__ attribute of
2676 hash_insert.
2677
2678 2009-06-10 Akim Demaille <demaille@gostai.com>
2679
2680 deterministic user-token-number redeclaration errors.
2681 Address nondeterminism reported by Joel E. Denny.
2682 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
2683
2684 * src/uniqstr.h: Comment changes.
2685 * src/location.h (boundary_cmp, location_cmp): New.
2686 * src/symtab.c (user_token_number_redeclaration): New.
2687 (symbol_translation): Use it.
2688 * tests/input.at (Numbered tokens): Adjust the expected output.
2689
2690 2009-05-25 Akim Demaille <demaille@gostai.com>
2691
2692 build: avoid ignored errors.
2693 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
2694 errors, they pollute the output.
2695
2696 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2697
2698 Convert multiple variable definition warnings to complaints.
2699 * NEWS (2.5): Add a new entry for that change.
2700 * doc/bison.texinfo (Decl Summary): Update %define entry.
2701 (Bison Options): Update -D/--define/-F/--force-define entry.
2702 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
2703 * src/muscle-tab.h (muscle_percent_define_insert): Update
2704 comments.
2705 * tests/input.at (`%define errors'): Update.
2706 (`%define, --define, --force-define'): Update.
2707
2708 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2709
2710 -F/--force-define and relative %define/-D/--define priorities.
2711 * NEWS (2.5): Add documentation to -D/--define entry.
2712 * build-aux/cross-options.pl: Hard-code association of
2713 --force-define with %define.
2714 * doc/bison.texinfo (Decl Summary): In %define entry,
2715 cross-reference command-line options.
2716 (Bison Options): Add documentation to -D/--define entry.
2717 (Option Cross Key): Widen column for --force-define row.
2718 * src/getargs.c (usage): Document -F/--force-define. Realign
2719 options in output.
2720 (short_options, long_options, getargs): Parse -F/--force-define,
2721 and update muscle_percent_define_insert invocations.
2722 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
2723 (muscle_percent_define_insert): Add argument with that type.
2724 * src/muscle-tab.c (muscle_percent_define_insert): Implement
2725 -F/--force-define behavior and priorities.
2726 (muscle_percent_define_ensure): Update
2727 muscle_percent_define_insert invocation.
2728 * src/parse-gram.y (prologue_declaration): Update
2729 muscle_percent_define_insert invocations.
2730 * tests/input.at (`%define, --define'): Rename to...
2731 (`%define, --define, --force-define'): ... this and extend.
2732
2733 2009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
2734
2735 Update some comments to make sense for -D.
2736 * data/bison.m4 (b4_check_user_names): In header comments, say
2737 "user occurrence" instead of "grammar occurrence".
2738 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
2739 (muscle_percent_code_grow): Likewise just for consistency.
2740
2741 2009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
2742
2743 * data/c++.m4 (b4_namespace_close): Simplify slightly.
2744
2745 2009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
2746
2747 Handle a trailing `:' in a user-supplied C++ namespace better.
2748 * data/c++.m4 (b4_namespace_close): Don't let it be printed
2749 among the closing braces here. This fix might make the
2750 generated code easier to debug, but otherwise it should be
2751 insignificant because a trailing `:' is a C++ error already.
2752
2753 2009-05-19 Akim Demaille <demaille@gostai.com>
2754
2755 remove useless variable.
2756 * src/getargs.c (skeleton_arg): Remove now useless variable.
2757 Should help the compiler see that this printf-like call is sane.
2758
2759 2009-05-15 Akim Demaille <demaille@gostai.com>
2760
2761 Rename token.prefix as api.tokens.prefix.
2762 Discussed here.
2763 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
2764
2765 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
2766 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
2767 (token.prefix): Rename as...
2768 (api.tokens.prefix): this.
2769
2770 2009-05-11 Akim Demaille <demaille@gostai.com>
2771
2772 doc: use C++ headers.
2773 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
2774 headers.
2775
2776 2009-05-11 Akim Demaille <demaille@gostai.com>
2777
2778 doc: token.prefix
2779 * doc/bison.simple (Decl Summary): Document token.prefix.
2780 (Calc++ Parser): Various fixes.
2781 Formatting changes.
2782 Use token.prefix.
2783 Introduce a macro TOKEN to shorten the code and make it more
2784 readable.
2785 (Calc++ Scanner): Adjust.
2786 * NEWS (Variable token.prefix): New.
2787
2788 2009-05-04 Akim Demaille <demaille@gostai.com>
2789
2790 bison: catch bad symbol names.
2791 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
2792 * tests/input.at: Adjust.
2793
2794 2009-05-04 Akim Demaille <demaille@gostai.com>
2795
2796 identifiers: dashes are letters.
2797 Dashes can now start identifiers (symbols and directives).
2798
2799 * src/scan-gram.l ({letter}): Add dash.
2800 ({id}): Remove it.
2801 * tests/input.at (Symbols): Adjust.
2802 Remove stray comment.
2803 * tests/regression.at (Invalid inputs): Adjust error message.
2804 * doc/bison.texinfo (Symbols): Update.
2805
2806 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
2807
2808 Declare %code to be a permanent feature.
2809 * NEWS (2.4.2): Here.
2810 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
2811 experimental.
2812 (Decl Summary): Likewise.
2813
2814 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2815
2816 Convert underscores to dashes in some %define variable names.
2817 For now, just api.push-pull and lr.keep-unreachable-states.
2818 Maintain old names for backward compatibility.
2819 * NEWS (2.5): Document.
2820 * data/c.m4 (b4_identification): Update comment.
2821 * data/yacc.c: Update access.
2822 * doc/bison.texinfo: Update.
2823 * etc/bench.pl.in (bench_push_parser): Update use.
2824 * src/files.c (tr): Move to...
2825 * src/getargs.c, src/getargs.h (tr): ... here because I can't
2826 think of a better place to expose it. My logic is that, for all
2827 uses of tr so far, command-line arguments can be involved, and
2828 getargs.h is already included.
2829 * src/main.c (main): Update access.
2830 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
2831 variable names to new variable names before assigning value.
2832 * src/reader.c (reader): Update setting default.
2833 * tests/calc.at: Update uses.
2834 * tests/conflicts.at (Unreachable States After Conflict
2835 Resolution): Update use.
2836 * tests/input.at (%define enum variables): Update use.
2837 (%define backward compatibility): New test group.
2838 * tests/push.at: Update uses.
2839 * tests/reduce.at: Update uses.
2840 * tests/torture.at: Update uses.
2841
2842 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
2843
2844 Set all front-end %define defaults in one place.
2845 * src/main.c (main): Move lr.keep_unreachable_states default...
2846 * src/reader.c (reader): ... to here.
2847
2848 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2849
2850 Rename lr.default_reductions to lr.default-reductions.
2851 * NEWS (2.5): Here.
2852 * doc/bison.texinfo: Here.
2853 * src/lalr.c (initialize_LA): Here.
2854 * src/print.c (print_reductions): Here.
2855 * src/reader.c (reader): Here.
2856 * src/tables.c (action_row): Here.
2857 * tests/input.at (%define enum variables): Here.
2858 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
2859
2860 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2861
2862 Pacify ./configure --enable-gcc-warnings.
2863 * tests/input.at (Symbols): Prototype yyerror and yylex.
2864
2865 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
2866
2867 Document how `%define "var" "value"' is not M4-friendly.
2868 * src/parse-gram.y (variable): In comments here.
2869
2870 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2871
2872 Clean up recent patches a little.
2873 Reported by Akim Demaille.
2874 * doc/bison.texinfo (Understanding): Fix typos.
2875 * src/print.c (print_reductions): Don't use negated variable.
2876
2877 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
2878
2879 List accepted values for a %define enum variable with an invalid value.
2880 Suggested by Akim Demaille at
2881 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
2882 * data/bison.m4 (_b4_percent_define_check_values): Implement.
2883 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
2884 * tests/input.at (%define lr.default_reductions invalid values): Merge
2885 into...
2886 (%define enum variables): ... here, and update output.
2887
2888 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
2889
2890 Rename "default rule" to "default reduction".
2891 This includes changing variable names in code, changing
2892 comments, and renaming %define lr.default_rules to %define
2893 lr.default_reductions.
2894 * NEWS (2.5): Update IELR documentation.
2895 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
2896 documentation.
2897 * data/glr.c, data/lalr1.java: Sync copyright dates.
2898 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
2899 and lr.type documentation. Make some other wording
2900 improvements.
2901 (Glossary): Adjust cross-references and Default Reduction
2902 definition.
2903 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
2904 Remove a confusing comment pointed out by Akim Demaille.
2905 (initialize_LA): Adjust code.
2906 * src/print-xml.c (print_reductions): Adjust code.
2907 * src/print.c (print_reductions): Adjust code.
2908 * src/reader.c (reader): Adjust code.
2909 * src/tables.c (action_row): Adjust code.
2910 (token_actions): Adjust code.
2911 * src/tables.h: Adjust YYDEFACT documentation.
2912 * tests/input.at (%define lr.default_rules invalid values):
2913 Rename test group to...
2914 (%define lr.default_reductions invalid values): ... this, and
2915 update grammar file and expected output.
2916 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
2917 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
2918
2919 2009-04-21 Akim Demaille <demaille@gostai.com>
2920
2921 tests: check the use of dashes and periods in symbols.
2922 * tests/input.at (Symbol): New test group.
2923
2924 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2925
2926 Document %define lr.type and lr.default_rules.
2927 * NEWS (2.5): Add an entry.
2928 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
2929 besides just LALR(1) and GLR(1).
2930 * doc/bison.texinfo (Introduction): Likewise.
2931 (Language and Grammar): Bison is no longer limited to LALR(1)
2932 restrictions.
2933 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
2934 when trying to distinguish from GLR. Talk about LR(1) grammars
2935 rather than LALR(1) grammars.
2936 (Decl Summary): In %define api.push_pull entry, say it applies
2937 to deterministic parsers in C rather than LALR(1) parsers in C.
2938 Add lr.default_rules entry.
2939 Add lr.type entry.
2940 (Mystery Conflicts): Bison is no longer limited to LALR(1)
2941 restrictions.
2942 (Generalized LR Parsing): Same changes as for the previous GLR
2943 section.
2944 (Memory Management): Say deterministic rather than LALR(1).
2945 (Understanding): Correct some bison output.
2946 Index discussion of "accepting state".
2947 Say deterministic rather than LALR(1).
2948 (Bison Options): In --yacc entry, say deterministic rather than
2949 LALR(1).
2950 In --report, --graph, and --xml entries, just don't mention
2951 LALR(1).
2952 (C++ Parsers): Say deterministic rather than LALR(1).
2953 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
2954 (Glossary): Add Accepting State, Consistent State, Default Rule,
2955 and IELR(1) definitions.
2956 In Generalized LR (GLR) definition, make same changes as in
2957 previous GLR sections.
2958 In LALR(1) definition, say Bison uses LALR(1) by default rather
2959 than implying Bison is limited to LALR(1).
2960 (LocalWords): Add IELR.
2961
2962 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2963
2964 Finish implementing %define lr.type.
2965 Its value can be "LALR", "IELR", or "canonical LR".
2966 * lib/timevar.def (TV_IELR_PHASE1): New var.
2967 (TV_IELR_PHASE2): New var.
2968 (TV_IELR_PHASE3): New var.
2969 (TV_IELR_PHASE4): New var.
2970 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
2971 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
2972 Sbitset.h, ielr.h, and ielr.c.
2973 * src/getargs.h, src/getargs.c (enum trace, trace_args,
2974 trace_types): Add trace_ielr.
2975 * src/lalr.h, src/lalr.c (ngotos): Export it.
2976 (F): Rename to...
2977 (goto_follows): ... this, update all uses, and export it.
2978 (set_goto_map): Export it.
2979 (map_goto): Export it.
2980 (compute_lookahead_tokens): Don't free goto_follows yet. Now
2981 handled in ielr.
2982 (initialize_LA): Export it. Move lookback allocation to...
2983 (lalr): ... here because, for canonical LR, initialize_LA must
2984 be invoked but lookback and much of the rest of LALR isn't
2985 needed.
2986 * main.c (main): Instead of lalr, invoke ielr, which invokes
2987 lalr.
2988 * src/reader.c (reader): Default lr.type to "LALR".
2989 Default lr.default_rules to "accepting" if lr.type is "canonical
2990 LR". Leave the default as "all" otherwise.
2991 Check for a valid lr.type value.
2992 * src/state.h, src/state.c (struct state_list): Add state_list
2993 member.
2994 (state_new): Initialize state_list member to NULL.
2995 (state_new_isocore): New function, exported.
2996 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
2997 exercises all values of lr.type.
2998 (GNU AWK Grammar): Rename test group to...
2999 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
3000 AT_TEST_EXISTING_GRAMMAR.
3001 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
3002 (GNU pic Grammar): Rename test group to...
3003 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
3004 AT_TEST_EXISTING_GRAMMAR.
3005 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
3006 all values of lr.type.
3007 (Single State Split): New test groups using AT_TEST_LR_TYPE.
3008 (Lane Split): Likewise.
3009 (Complex Lane Split): Likewise.
3010 (Split During Added Lookahead Propagation): Likewise.
3011
3012 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3013
3014 Add new files for IELR and canonical LR implementation.
3015 * src/AnnotationList.c: New.
3016 * src/AnnotationList.h: New.
3017 * src/InadequacyList.c: New.
3018 * src/InadequacyList.h: New.
3019 * src/Sbitset.c: New.
3020 * src/Sbitset.h: New.
3021 * src/ielr.c: New.
3022 * src/ielr.h: New.
3023
3024 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3025
3026 Implement %define lr.default_rules.
3027 Its value describes the states that are permitted to contain
3028 default rules: "all", "consistent", or "accepting".
3029 * src/reader.c (reader): Default lr.default_rules to "all".
3030 Check for a valid lr.default_rules value.
3031 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
3032 is "accepting", then only mark the accepting state as
3033 consistent.
3034 (initialize_LA): Tell state_lookahead_tokens_count whether
3035 lr.default_rules is "accepting".
3036 * src/tables.c (action_row): If lr.default_rules is not "all",
3037 then disable default rules in inconsistent states.
3038 * src/print.c (print_reductions): Use this opportunity to
3039 perform some assertions about whether lr.default_rules was
3040 obeyed correctly.
3041 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
3042 helps with checking the parser tables for a grammar.
3043 * tests/input.at (%define lr.default_rules invalid values): New
3044 test group.
3045 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
3046 AT_TEST_TABLES_AND_PARSE.
3047 (`no %define lr.default_rules'): New test group generated by
3048 AT_TEST_LR_DEFAULT_RULES.
3049 (`%define lr.default_rules "all"'): Likewise.
3050 (`%define lr.default_rules "consistent"'): Likewise.
3051 (`%define lr.default_rules "accepting"'): Likewise.
3052
3053 2009-04-20 Akim Demaille <demaille@gostai.com>
3054
3055 Formatting change.
3056
3057 2009-04-20 Akim Demaille <demaille@gostai.com>
3058
3059 bison: factoring.
3060 * src/output.c (token_definitions_output): Use symbol_id_get
3061 instead of duplicating its logic.
3062 * TODO (YYERRCODE): Extend.
3063
3064 2009-04-20 Akim Demaille <demaille@gostai.com>
3065
3066 variables: prefer error-verbose to error_verbose.
3067 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
3068 instead of error_verbose.
3069 * src/scan-gram.l (%error-verbose): Map to the error-verbose
3070 variable.
3071 * doc/bison.texinfo: Promote %define error-verbose instead of
3072 %error-verbose.
3073 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
3074
3075 2009-04-15 Akim Demaille <demaille@gostai.com>
3076
3077 variables: accept dashes.
3078 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
3079 underscores.
3080 * src/scan-gram.l ({id}): Also accept dashes after the initial
3081 letter.
3082 ({directive}): Use {id}.
3083 * src/parse-gram.y: Comment and formatting changes.
3084 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
3085 symbols.
3086 * src/complain.h, src/complain.c (yacc_at): New.
3087 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
3088 symbol names.
3089 * src/output.c (token_definitions_output): Do not #define token
3090 names with dashes.
3091
3092 2009-04-20 Akim Demaille <demaille@gostai.com>
3093
3094 Consistently refer to Yacc, not YACC.
3095 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
3096
3097 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
3098
3099 Pacify make maintainer-check-posix.
3100 * tests/input.at (%define, --define): Move bison command-line
3101 options before grammar file name.
3102
3103 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3104
3105 Document semicolon warnings.
3106 * NEWS (2.5): Here.
3107
3108 2009-04-14 Akim Demaille <demaille@gostai.com>
3109
3110 variables: use `parse.assert' instead of `assert'.
3111 * TODO (assert): Remove.
3112 * data/bison.m4 (b4_assert_if): Replace with...
3113 (b4_parse_assert_if): this.
3114 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
3115 * doc/bison.texinfo (Decl Summary): Document parse.assert.
3116
3117 2009-04-14 Akim Demaille <demaille@gostai.com>
3118
3119 variables: use `parse.trace' instead of `debug'.
3120 * src/getargs.c (getargs): Map -t to %define trace.parse.
3121 * src/scan-gram.l (%debug): Map to %define trace.parse.
3122 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
3123 names to `_' in macro names.
3124 (b4_debug_if): Replace with...
3125 (b4_parse_trace_if): this.
3126 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3127 * data/yacc.c: Adjust.
3128 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
3129 Use @code to label the variable list.
3130 Document the variable parse.trace.
3131 (Tracing): Promote the parse.trace variable.
3132 * TODO: %printer is not documented.
3133
3134 2009-04-14 Akim Demaille <demaille@gostai.com>
3135
3136 doc: minor fixes.
3137 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
3138 (Table of Symbols): Remove duplicate entry for %debug.
3139
3140 2009-04-10 Eric Blake <ebb9@byu.net>
3141
3142 submodules: update to latest
3143 * submodules/autoconf: Use latest upstream Autoconf.
3144
3145 2009-04-06 Eric Blake <ebb9@byu.net>
3146
3147 Work around autoconf 2.63b bug in testsuite.
3148 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
3149 autoconf bug related to # in test.
3150
3151 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3152
3153 * NEWS (2.5): New section. Describe new -D/--define feature.
3154
3155 2009-04-06 Akim Demaille <demaille@gostai.com>
3156
3157 Regen.
3158 * src/parse-gram.h, src/parse-gram.c: Regen.
3159
3160 2009-04-06 Akim Demaille <demaille@gostai.com>
3161
3162 rename muscle_tab.* as muscle-tab.* for consistency.
3163 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
3164 * src/muscle-tab.h, src/muscle-tab.c: these.
3165 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
3166 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
3167
3168 2009-04-06 Akim Demaille <demaille@gostai.com>
3169
3170 Makefile: introduce $(BISON).
3171 * src/local.mk (BISON): New.
3172 (YACC): Use it.
3173
3174 2009-04-06 Akim Demaille <demaille@gostai.com>
3175
3176 parser: handle %locations as %define locations.
3177 * src/getargs.h, src/getargs.c (locations_flag): Remove.
3178 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
3179 to set "locations" to true.
3180 * src/output.c (prepare): Don't output "locations".
3181 * src/scan-gram.l (%locations): Handle it as a %<flag>.
3182 * src/parse-gram.y: It's no longer a token.
3183 Don't handle it.
3184 * data/bison.m4 (b4_locations_if): Define it with
3185 b4_percent_define_if_define.
3186 * data/c.m4, data/glr.cc: Adjust.
3187
3188 2009-04-06 Akim Demaille <demaille@gostai.com>
3189
3190 Regen.
3191 * src/parse-gram.c: Regen.
3192
3193 2009-04-06 Akim Demaille <demaille@gostai.com>
3194
3195 muscle: factor the handling of obsolete of obsolete directives.
3196 Suggested by Joel E. Denny.
3197
3198 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
3199 New, extracted from...
3200 * src/parse-gram.y (prologue_declaration: pure-parser): here.
3201 Remove it.
3202 (prologue_declaration: "%<flag>"): Use
3203 muscle_percent_define_ensure.
3204 (%error-verbose, %pure-parser): No longer tokens.
3205 * src/scan-gram.l (pure-parser): Return as a %<flag>.
3206
3207 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
3208
3209 Fix options documentation.
3210 * build-aux/cross-options.pl: As in --help output, write optional
3211 arguments as [=ARG] not =[ARG].
3212 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
3213
3214 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
3215
3216 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
3217 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
3218 requirements for a correct m4 are stricter.
3219 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
3220 * configure.ac: Update to use AC_PROG_GNU_M4.
3221 Reported by Eric Blake.
3222
3223 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3224
3225 Help with updating web manual.
3226 * HACKING: Incorporate instructions from gnulib/doc/README.
3227 * bootstrap.conf (gnulib_modules): Add gendocs.
3228
3229 2009-04-03 Akim Demaille <demaille@gostai.com>
3230
3231 Regen.
3232 * src/parse-gram.h, src/parse-gram.c: Regen.
3233
3234 2009-04-03 Akim Demaille <demaille@gostai.com>
3235
3236 Factor %FLAG at scan level.
3237 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
3238 definitions and associated rules, replaced by....
3239 (PERCENT_FLAG): this new token type, and rule.
3240 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
3241 Use it for %debug and %error-verbose.
3242
3243 2009-04-03 Akim Demaille <demaille@gostai.com>
3244
3245 Regen.
3246 * src/parse-gram.h, src/parse-gram.c: Regen.
3247
3248 2009-04-03 Akim Demaille <demaille@gostai.com>
3249
3250 Treat %debug as %define debug.
3251 * data/bison.m4 (b4_debug_if): New.
3252 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
3253 * data/lalr1.java: Use it instead of b4_debug_flag.
3254 * src/getargs.h, src/getargs.c (debug_flag): Remove.
3255 * src/output.c (prepare): Don't output it.
3256 * src/parse-gram.y: Treat %debug as %define debug.
3257
3258 2009-04-03 Akim Demaille <demaille@gostai.com>
3259
3260 Treat %error-verbose as %define error_verbose.
3261 This allows to pass -Derror_verbose on the command line. Better
3262 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
3263 ERROR_VERBOSE being defined as false or true.
3264 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
3265 on b4_percent_define_ifdef, for does not check the defined value,
3266 but only whether the symbol is defined, rely on
3267 b4_percent_define_flag_if, so that a value of "false" is processed
3268 as a false.
3269 If not defined, define the flag to "false".
3270 (b4_error_verbose_if): New.
3271 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
3272 b4_error_verbose_flag.
3273 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
3274 * src/output.c (prepare): Don't output it.
3275 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
3276
3277 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3278
3279 Fix strange %define locations for default values.
3280 Reported by Akim Demaille at
3281 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
3282 and discussed again starting at
3283 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
3284 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
3285 because location information is bogus.
3286 Use angle brackets to delimit fake file name because square brackets
3287 look like underexpanded m4. Choose a better fake file name.
3288 Use negative line numbers.
3289 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
3290 * src/location.c (location_print): If line for a boundary is negative,
3291 only print that boundary's file name.
3292 * src/location.h: Document that.
3293 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3294 defaults): Update output.
3295
3296 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
3297
3298 Pacify ./configure --enable-gcc-warnings.
3299 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
3300 in lib won't compile with it.
3301 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
3302
3303 2009-03-31 Akim Demaille <demaille@gostai.com>
3304
3305 bootstrap: --help to stdout.
3306 * bootstrap (usage): Don't send --help to stderr.
3307 Use a here doc instead of a long string.
3308
3309 2009-03-31 Akim Demaille <demaille@gostai.com>
3310
3311 bootstrap: README-hacking no longer exists
3312 * bootstrap (checkout_only_file): Set to HACKING.
3313
3314 2009-03-26 Akim Demaille <demaille@gostai.com>
3315
3316 doc: merge HACKING and README-hacking.
3317 Two files is confusing.
3318 Reported by Alexandre Duret-Lutz.
3319
3320 * README-hacking: Merge into...
3321 * HACKING (Working from the repository): here.
3322
3323 2009-03-26 Akim Demaille <demaille@gostai.com>
3324
3325 doc: update README-hacking.
3326 * README-hacking: We now use git and git submodules.
3327 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
3328
3329 2009-03-26 Akim Demaille <demaille@gostai.com>
3330
3331 lalr1.cc: avoid GCC 4.3 warnings.
3332 GCC 4.3 now warns about "a || b && c" and asks for explicit
3333 parentheses.
3334 Reported by Alexandre Duret-Lutz.
3335 * data/location.cc: Update copyright years.
3336 (Position::operator==): Use parens to make precedence explicit.
3337 Compare lines and columns first, as they are more likely to be
3338 different, and they are faster to compare.
3339
3340 2009-03-26 Akim Demaille <demaille@gostai.com>
3341
3342 gnulib: update.
3343 * gnulib: Update to latest.
3344 * src/local.mk (AM_CFLAGS): Move to...
3345 * Makefile.am: here.
3346 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
3347 AM_CFLAGS.
3348
3349 2009-03-02 Akim Demaille <demaille@gostai.com>
3350
3351 Comment changes.
3352
3353 2009-03-02 Akim Demaille <demaille@gostai.com>
3354
3355 Share b4_yytranslate_define.
3356 * data/lalr1.cc (b4_yytranslate_define): Move to...
3357 * data/c++.m4: here.
3358
3359 2009-03-02 Akim Demaille <demaille@gostai.com>
3360
3361 Use locations in the variant example.
3362 Yes, this obfuscates the point of this example, variants only.
3363 But glr.cc cannot work (yet?) without locations. This change
3364 makes it easier to use this example with glr.cc.
3365
3366 * examples/variant.yy (assert): %define it.
3367 (locations): Request them.
3368 (yylex): Bind the location to the stage.
3369
3370 2009-03-02 Akim Demaille <demaille@gostai.com>
3371
3372 Dub make_TOKEN as a public type interface.
3373 * data/c++.m4 (b4_symbol_constructor_declare)
3374 (b4_symbol_constructor_define): New empty stubs.
3375 (b4_public_types_declare, b4_public_types_define): Use them.
3376 * data/lalr1.cc (b4_symbol_constructor_declare)
3377 (b4_symbol_constructor_declare_)
3378 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
3379 Move to...
3380 * data/variant.hh: here.
3381 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
3382 needed.
3383 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
3384 b4_symbol_constructor_declare, as it is now done by
3385 b4_public_types_define and b4_public_types_declare.
3386
3387 2009-03-02 Akim Demaille <demaille@gostai.com>
3388
3389 Coding style changes.
3390 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3391 (b4_symbol_constructor_declarations)
3392 (b4_symbol_constructor_definition_)
3393 (b4_symbol_constructor_definitions)
3394 (b4_yytranslate_definition): Rename as...
3395 (b4_symbol_constructor_declare_)
3396 (b4_symbol_constructor_declare)
3397 (b4_symbol_constructor_define_)
3398 (b4_symbol_constructor_define)
3399 (b4_yytranslate_define): these.
3400 * data/variant.hh (b4_variant_definition): Rename as...
3401 (b4_variant_define): this.
3402
3403 2009-03-02 Akim Demaille <demaille@gostai.com>
3404
3405 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
3406 * data/bison.m4 (b4_percent_define_if_define): New.
3407 * data/c++.m4 (b4_variant_if): Move to...
3408 * data/bison.m4: Here, using b4_percent_define_if_define.
3409 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
3410 * data/bison.m4: Here, using b4_percent_define_if_define.
3411
3412 2009-03-02 Akim Demaille <demaille@gostai.com>
3413
3414 Dub symbol_type_base as a public type.
3415 * data/c++.m4 (b4_public_types_declare): Now define
3416 symbol_type_base and symbol_type.
3417 (b4_public_types_define): New.
3418 In both cases, the definitions are taken verbatim from lalr1.cc.
3419 * data/lalr1.cc: Adjust.
3420
3421 2009-03-02 Akim Demaille <demaille@gostai.com>
3422
3423 b4_public_types_declare.
3424 * data/c++.m4 (b4_public_types_declare): New.
3425 * data/glr.cc, data/lalr1.cc: Use it.
3426
3427 2009-03-02 Akim Demaille <demaille@gostai.com>
3428
3429 b4_semantic_type_declare.
3430 * data/c++.m4 (b4_semantic_type_declare): New.
3431 Factors and generalizes what was in glr.cc and lalr1.cc.
3432 * data/variant.hh (b4_semantic_type_declare): Redefine it for
3433 variants.
3434 * data/lalr1.cc, data/glr.cc: Use it.
3435
3436 2009-02-26 Akim Demaille <demaille@gostai.com>
3437
3438 Upgrade gnulib.
3439 * gnulib: Upgrade from master.
3440 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
3441 Regen.
3442
3443 2009-02-25 Akim Demaille <demaille@gostai.com>
3444
3445 Remove useless arguments.
3446 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
3447 relevant.
3448
3449 2009-02-25 Akim Demaille <demaille@gostai.com>
3450
3451 Comment changes.
3452 * data/lalr1.cc: here.
3453
3454 2009-02-25 Akim Demaille <demaille@gostai.com>
3455
3456 Fix glr.cc's debug level handling.
3457 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
3458 glr.c which is used.
3459 (debug_level, set_debug_level): Adjust.
3460
3461 2009-02-25 Akim Demaille <demaille@gostai.com>
3462
3463 Copyright years.
3464 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
3465
3466 2009-02-25 Akim Demaille <demaille@gostai.com>
3467
3468 Style changes.
3469 * etc/bench.pl.in (generate_grammar_list): Consitently use
3470 location_type, not yy::location.
3471
3472 2009-02-25 Akim Demaille <demaille@gostai.com>
3473
3474 Comment change.
3475 * data/lalr1.cc: here.
3476
3477 2009-02-19 Akim Demaille <demaille@gostai.com>
3478
3479 Make yyparser::error public.
3480 * data/lalr1.cc: here.
3481 There is no good reason to keep it private (and it is convenient
3482 to use it from the scanner for instance). It is already public in
3483 glr.cc.
3484
3485 2009-02-19 Akim Demaille <demaille@gostai.com>
3486
3487 Comment changes.
3488 * data/glr.cc: here.
3489
3490 2009-02-19 Akim Demaille <demaille@gostai.com>
3491
3492 Remove trailing blanks.
3493 The epilogue has its own ending \n, no need to add another.
3494
3495 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
3496 epilogue.
3497 * data/glr.cc: dnl when extending the epilogue.
3498 Remove stray "private:".
3499
3500 2009-02-19 Akim Demaille <demaille@gostai.com>
3501
3502 Use b4_c_modern.
3503 * data/c.m4 (b4_c_function_decl): Here.
3504
3505 2009-02-19 Akim Demaille <demaille@gostai.com>
3506
3507 Comment changes.
3508 * data/lalr1.cc: here.
3509
3510 2009-02-19 Akim Demaille <demaille@gostai.com>
3511
3512 Extract variant.hh
3513 * data/variant.hh: New, extracted from...
3514 * data/lalr1.cc: here.
3515 Adjust.
3516 * data/local.mk: Adjust.
3517
3518 2009-02-19 Akim Demaille <demaille@gostai.com>
3519
3520 Extract stack.hh from lalr1.cc.
3521 * data/stack.hh: New.
3522 * data/lalr1.cc: Extract from here.
3523 * data/local.mk: Adjust.
3524
3525 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
3526
3527 Add reminder about uploading public key to keys.gnupg.net.
3528 * HACKING (Release Procedure): Here.
3529
3530 2009-01-28 Akim Demaille <demaille@gostai.com>
3531
3532 * NEWS: Update information about 2.4.1 and 2.4.2.
3533
3534 2008-11-04 Akim Demaille <demaille@gostai.com>
3535
3536 Reformat NEWS.
3537 * NEWS: Use more outline-mode markup.
3538 Suggested by Jim Meyering.
3539
3540 2009-01-08 Akim Demaille <demaille@gostai.com>
3541
3542 Fix grep portability issues.
3543 Grep on Solaris does not support -q.
3544 Reported by Summum Bonum.
3545
3546 * NEWS: Add a stub for 2.4.2.
3547 * THANKS: Add Summum Bonum.
3548 * tests/atlocal.in (EGREP): New.
3549 (CC, CXX, XSLTPROC): Make it possible to override them via
3550 envvars.
3551 * tests/java.at: Use $EGREP instead of egrep.
3552 Use AT_CHECK's ignore instead of grep's -q.
3553
3554 2008-12-11 Akim Demaille <demaille@gostai.com>
3555
3556 Pass the token type to yysyntax_error.
3557 * data/yacc.c (yysyntax_error): Take the transated token instead
3558 of the raw number.
3559 Adjust callers.
3560 * TODO: Update.
3561
3562 2008-12-11 Akim Demaille <demaille@gostai.com>
3563
3564 Formatting changes.
3565 * data/glr.c: Formatting changes.
3566
3567 2008-12-11 Akim Demaille <demaille@gostai.com>
3568
3569 Propagate i18n changes into glr.c.
3570 * TODO: Update.
3571 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
3572 building the error message format dynamically.
3573 * data/lalr1.java: Formatting changes.
3574
3575 2008-12-11 Akim Demaille <demaille@gostai.com>
3576
3577 Use testsuite -C.
3578 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
3579 Solves problems when top_srcdir is an absolute path.
3580 Suggested by Eric Blake.
3581 * configure.ac: Require Autoconf 2.62.
3582
3583 2008-12-11 Akim Demaille <demaille@gostai.com>
3584
3585 Simplify the i18n of the error messages.
3586 * data/lalr1.cc: Comment changes.
3587 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
3588 lalr1.cc instead of building dynamically the format string.
3589
3590 2008-12-08 Akim Demaille <demaille@gostai.com>
3591
3592 Fix portability issue in the test suite.
3593 * tests/local.at (AT_MATCHES_CHECK): New.
3594 Based on Perl instead of Sed. Sed has too many portability
3595 pitfalls, not ever Sed is GNU Sed.
3596 * tests/actions.at (Fix user actions without a trailing semicolon):
3597 Use it.
3598
3599 2008-12-08 Akim Demaille <demaille@gostai.com>
3600
3601 Update data/README.
3602 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
3603
3604 2008-12-08 Akim Demaille <demaille@gostai.com>
3605
3606 Install autoconf as a submodule to get m4sugar.
3607 * .gitmodules: Add submodules/autoconf.
3608 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
3609 submodules/autoconf.
3610
3611 2008-12-08 Akim Demaille <demaille@gostai.com>
3612
3613 Test token.prefix in all the skeletons.
3614 * data/java.m4 (b4_token_enum): Use the token.prefix.
3615 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
3616 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
3617 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
3618 * tests/java.at: Comment changes.
3619 (AT_CHECK_JAVA_MINIMAL): Define the END token.
3620 (Java parser class and package names): Add token.prefix check.
3621
3622 2008-12-08 Akim Demaille <demaille@gostai.com>
3623
3624 Fix regeneration of atconfig.
3625 * tests/local.mk (tests/atconfig): The rule was incorrect, but
3626 remove it: now that there is no tests/Makefile.am, the top-level
3627 Makefile properly updates atconfig when needed.
3628
3629 2008-12-07 Di-an Jan <dianj@freeshell.org>
3630
3631 Implement the FIXME that ends an user action with a semicolon
3632 if it seems necessary.
3633 * src/scan-code.l (flex rules section): Flag cpp directive from
3634 any `#' to the first unescaped end-of-line. Semicolon is not
3635 needed after `;', `{', '}', or cpp directives and is needed after
3636 any other token (whitespaces and comments have no effect).
3637 * tests/actions.at (Fix user actions without a trailing semicolon):
3638 New test.
3639 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
3640 to make user actions complete statements.
3641 Adjust column numbers in error messages.
3642 * tests/regression.at (Fix user actions without a trailing semicolon):
3643 Remove. Covered by new test.
3644
3645 2008-12-07 Akim Demaille <demaille@gostai.com>
3646
3647 Update gnulib.
3648 * gnulib: Update from master.
3649
3650 2008-12-05 Eric Blake <ebb9@byu.net>
3651
3652 Avoid compiler warning.
3653 * src/output.c (muscle_insert_item_number_table): Delete unused
3654 function.
3655
3656 2008-12-02 Eric Blake <ebb9@byu.net>
3657
3658 Build testsuite with newer autoconf.
3659 * tests/output.at (m4_expand): Don't override in newer autoconf,
3660 where the underlying implementation changed.
3661 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
3662 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
3663 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
3664 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
3665 since some of them contain unbalanced ')'.
3666
3667 2008-12-01 Akim Demaille <demaille@gostai.com>
3668
3669 Use b4_symbol for printers and destructors everywhere.
3670 * data/bison.m4 (b4_symbol_action_location): New.
3671 * data/c.m4 (b4_symbol_actions): Remove.
3672 Adjust all callers to use by b4_symbol_foreach and the corresponding
3673 b4_symbol_printer/destructor macro.
3674 * data/glr.cc: Adjust.
3675 * data/lalr1.java: Adjust the %destructor sanity check.
3676 * src/output.c (symbol_code_props_output): Remove, we no longer
3677 need the b4_symbol_printers/destructors tables.
3678
3679 2008-12-01 Akim Demaille <demaille@gostai.com>
3680
3681 Use b4_symbol_case_.
3682 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
3683 b4_symbol_case_.
3684
3685 2008-12-01 Akim Demaille <demaille@gostai.com>
3686
3687 Move b4_symbol based macro to bison.m4.
3688 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
3689 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
3690 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
3691 (b4_type_foreach): Move to...
3692 * data/bison.m4: Here.
3693 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
3694 b4_symbol_value_template instead of b4_symbol_value.
3695
3696 2008-12-01 Akim Demaille <demaille@gostai.com>
3697
3698 b4_symbol/type_foreach.
3699 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
3700 Use them.
3701
3702 2008-12-01 Akim Demaille <demaille@gostai.com>
3703
3704 Use the symbol properties to output the printer/destructor for lalr1.cc.
3705 Instead of defining complex list of tuples to define various
3706 properties of the symbols, we now prefer to define symbols as
3707 "structs" in m4: using the symbol key (its number), and the
3708 property name, b4_symbol gives it value. Use this to handle
3709 destructors and printers.
3710
3711 * src/output.c (CODE_PROP): New.
3712 (prepare_symbol_definitions): Use it to define the printer and
3713 destructor related attributes of the symbols.
3714 * data/lalr1.cc (b4_symbol_actions): Rename as...
3715 (b4_symbol_action): this.
3716 Use b4_symbol instead of 6 arguments.
3717 (b4_symbol_printer, b4_symbol_destructor): New.
3718 Use them instead of b4_symbol_actions.
3719
3720 2008-12-01 Akim Demaille <demaille@gostai.com>
3721
3722 Avoid capturing variables too easily.
3723 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
3724 v__ and p__ instead of v and p.
3725
3726 2008-12-01 Akim Demaille <demaille@gostai.com>
3727
3728 Remove spurious empty line before syncline.
3729 * data/bison.m4 (b4_syncline): Don't output an empty line before
3730 the output.
3731
3732 2008-11-26 Akim Demaille <demaille@gostai.com>
3733
3734 Convert lib/Makefile.am into lib/local.mk.
3735 The real problem is rather gnulib.mk, which itself is extracted
3736 from a Makefile.am that gnulib expects to the "recursive". The
3737 tool prefix-gnulib-mk converts such a gnulib.mk to be
3738 non-recursive. Also, some AC_SUBST variables need to be adjusted.
3739
3740 * etc/prefix-gnulib-mk: New.
3741 * bootstrap (slurp): Use it to convert further gnulib.mk.
3742 No longer try to avoid re-creation of lib/gnulib.mk as the changes
3743 are deeper.
3744 * lib/Makefile.am: Rename as...
3745 * lib/local.mk: this.
3746 Adjust to be prefixed.
3747 * Makefile.am, configure.ac: Adjust.
3748 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
3749
3750 2008-11-26 Akim Demaille <demaille@gostai.com>
3751
3752 s/_FLAGS/FLAGS/.
3753 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
3754 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
3755 Reported by Eric Blake.
3756
3757 2008-11-26 Akim Demaille <demaille@gostai.com>
3758
3759 Use b4_parser_tables_define in glr.cc.
3760 * data/glr.c: Use b4_parser_tables_define instead of defining the
3761 (deterministic integral) tables by hand.
3762
3763 2008-11-26 Akim Demaille <demaille@gostai.com>
3764
3765 Use b4_parser_tables_define in Java.
3766 * data/java.m4 (b4_typed_parser_table): Rename as...
3767 (b4_typed_parser_table_define): this, for consistency.
3768 Accept a comment as $4.
3769 Move $2 into yy*_.
3770 (b4_integral_parser_table): Rename as...
3771 (b4_integral_parser_table_define): this.
3772 * data/lalr1.java: Adjust all uses.
3773 Use b4_parser_tables_define instead of generation by hand.
3774
3775 2008-11-26 Akim Demaille <demaille@gostai.com>
3776
3777 Prepare the convergence bw C style and Java table generation.
3778 * data/bison.m4 (b4_tables_map, b4_tables_declare)
3779 (b4_tables_define): Rename as...
3780 (b4_integral_parser_tables_map, b4_parser_tables_declare)
3781 (b4_parser_tables_define): these.
3782 * data/c.m4 (b4_table_define): Rename as...
3783 (b4_integral_parser_table_define): this.
3784 * data/lalr1.cc: Adjust.
3785 (b4_table_define, b4_table_declare): Rename as...
3786 (b4_integral_parser_table_define)
3787 (b4_integral_parser_table_declare): these.
3788 (yyrline_): Move the comment where it is actually used.
3789 * data/yacc.c: Adjust.
3790 (yyrline): Use b4_integral_parser_table_define.
3791
3792 2008-11-26 Akim Demaille <demaille@gostai.com>
3793
3794 Regen.
3795 * src/parse-gram.h, src/parse-gram.c: Regen.
3796
3797 2008-11-26 Akim Demaille <demaille@gostai.com>
3798
3799 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
3800 * data/lalr1.cc (b4_tables_map): Move to...
3801 * data/bison.m4: here.
3802 Update the comment for yytable during the flight.
3803 (b4_tables_declare, b4_tables_define): New.
3804 * data/lalr1.cc: Use them.
3805 * data/c.m4 (b4_table_define): New.
3806 * data/yacc.c: Use b4_tables_define instead of output the tables
3807 by hand.
3808 * tests/regression.at (Web2c Actions): Adjust the expected output,
3809 the order of the tables changed.
3810
3811 2008-11-26 Akim Demaille <demaille@gostai.com>
3812
3813 Get rid of (yy)rhs and (yy)prhs.
3814 These tables are no longer needed in the parsers, and they don't seem to
3815 be useful. They are not documented either.
3816
3817 * src/output.c (prepare_rules): Get rid of rhs and prhs.
3818 Adjust the computation of (yy)r2.
3819
3820 2008-11-26 Akim Demaille <demaille@gostai.com>
3821
3822 Rule length is unsigned.
3823 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
3824
3825 2008-11-26 Akim Demaille <demaille@gostai.com>
3826
3827 Get rid of lalr1-split.cc.
3828 It was no longer maintainer.
3829
3830 * data/lalr1-split.cc: Remove.
3831 * etc/bench.pl.in (bench_fusion_parser): Remove.
3832 Adjust.
3833
3834 2008-11-26 Akim Demaille <demaille@gostai.com>
3835
3836 Use yy* consistently.
3837 * data/glr.c: Now that yyrhs no longer exists as a global
3838 variable, rename local "rhs" variables into "yyrhs" for
3839 consistency.
3840
3841 2008-11-25 Akim Demaille <demaille@gostai.com>
3842
3843 Get rid of yyrhs and yyprhs in glr.c.
3844 * data/glr.c (yyrhs, yyprhs): Remove.
3845 Instead, use the state stack and yystos.
3846
3847 2008-11-25 Akim Demaille <demaille@gostai.com>
3848
3849 Flag glr tests.
3850 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
3851 as an Autotest keyword.
3852
3853 2008-11-25 Akim Demaille <demaille@gostai.com>
3854
3855 Prefer TESTSUITE_FLAGS.
3856 TESTSUITEFLAGS is barely readable.
3857
3858 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
3859 for backward compatibility.
3860 Use the former instead of the latter.
3861
3862 2008-11-25 Akim Demaille <demaille@gostai.com>
3863
3864 Get rid of yyrhs and yyprhs in larl1.java.
3865 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
3866 (yy_reduce_print): Rather, use yystos_ and the state stack.
3867
3868 2008-11-25 Akim Demaille <demaille@gostai.com>
3869
3870 Formatting changes.
3871
3872 2008-11-25 Akim Demaille <demaille@gostai.com>
3873
3874 Get rid of yyrhs and yyprhs in yacc.c.
3875 They were used to get the symbol types, given a rule number, when
3876 displaying the top of the stack before a reduction. But the
3877 symbol type is available from the state stack. This has two be
3878 benefits: two tables less in the parser (making it smaller), and a
3879 more consistent use of the three stacks which will help to fuse
3880 them.
3881
3882 * data/yacc.c (yyprhs, yyrhs): Remove.
3883 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
3884 (yy_reduce_print): Take yyssp as argument.
3885 Use it, together with yystos, to get the symbol type.
3886 * tests/regression.at (Web2c Report): Remove these tables from the
3887 expected output.
3888
3889 2008-11-25 Akim Demaille <demaille@gostai.com>
3890
3891 b4_tables_map.
3892 The point is to factor the generation of the tables across skeletons.
3893 This is language dependant.
3894
3895 * data/c.m4 (b4_comment_): New.
3896 Should be usable to define how to generate tables independently of
3897 the language.
3898 (b4_c_comment): New.
3899 (b4_comment): Bounce to b4_c_comment.
3900 Now support $2 = [PREFIX] for indentation.
3901 * data/lalr1.cc (b4_table_declare): Don't output a comment if
3902 there is no comment.
3903 Indent it properly when there is one.
3904 Output the ending semicolon.
3905 (b4_table_define): Space changes.
3906 Output the ending semicolon.
3907 (b4_tables_map): New.
3908 Use it twice instead of declaring and defining the (integral)
3909 tables by hand.
3910
3911 2008-11-25 Akim Demaille <demaille@gostai.com>
3912
3913 b4_table_declare.
3914 * data/lalr1.cc (b4_table_declare): New.
3915 Use it to declare the tables defined with b4_table_define.
3916 (b4_table_define): Declare a third arg to match b4_table_declare
3917 signature.
3918 Move all the comments around invocations of b4_table_define into
3919 the invocations itselves.
3920 Move things around to have the order for declarations and
3921 definitions.
3922
3923 2008-11-25 Akim Demaille <demaille@gostai.com>
3924
3925 Formatting changes.
3926 * data/lalr1.java: here.
3927
3928 2008-11-25 Akim Demaille <demaille@gostai.com>
3929
3930 b4_args is more general than only C++.
3931 * data/lalr1.cc (b4_args, _b4_args): Move to...
3932 * data/bison.m4: here.
3933
3934 2008-11-21 Di-an Jan <dianj@freeshell.org>
3935
3936 Implement no-XXX arguments for --warnings, --report, --trace.
3937 * src/getargs.c (flags_argmatch): Handles no-XXX.
3938 Fix typo in doxygen comment.
3939
3940 2008-11-21 Akim Demaille <demaille@gostai.com>
3941
3942 Display the changes in cross-options.texi.
3943 * build-aux/cross-options.pl ($sep): New, to separate items.
3944 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
3945 changes.
3946
3947 2008-11-20 Di-an Jan <dianj@freeshell.org>
3948
3949 Improves options in the manual.
3950 * doc/bison.texinfo (-g, -x): Add space before argument.
3951 (Option Cross Key): Implement FIXME: listing directives also.
3952 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
3953 (Short Option): Special case -d. Put arguments inside @option.
3954 (Bison Directive): Add column, automatically extracted from
3955 src/scan-gram.l (actual name passed as the first argument)
3956 with special case for %define.
3957 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
3958 to build-aux/cross-options.pl.
3959 * src/getargs.c (usage): Document limitations of cross-options.pl.
3960 * src/scan-gram.l: Likewise.
3961
3962 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3963
3964 Fix unexpanded macros in GLR defines file.
3965 Reported by Csaba Raduly at
3966 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
3967 * THANKS (Csaba Raduly): Add.
3968 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
3969 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
3970 lexer in a separate module that includes the defines file.
3971 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
3972 source.
3973 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
3974 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
3975 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
3976 (AT_DATA_SOURCE_PROLOGUE): New.
3977 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
3978 (AT_DATA_SOURCE): New.
3979 (AT_FULL_COMPILE): Extend to support an additional source file.
3980
3981 2008-11-18 Akim Demaille <demaille@gostai.com>
3982
3983 More TODO.
3984 * TODO: More short term issues.
3985
3986 2008-11-18 Akim Demaille <demaille@gostai.com>
3987
3988 Regen.
3989 * src/parse-gram.h, src/parse-gram.c: Regen.
3990
3991 2008-11-18 Akim Demaille <demaille@gostai.com>
3992
3993 Use b4_subtract where possible.
3994 * data/lalr1.cc (b4_subtract): Move to...
3995 * data/bison.m4: here.
3996 * data/glr.c (b4_rhs_data): Use it.
3997 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
3998
3999 2008-11-18 Akim Demaille <demaille@gostai.com>
4000
4001 Remove incorrect mode specification.
4002 * data/glr.cc: Don't pretend it's C code.
4003
4004 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4005
4006 Simplify last patch slightly.
4007 * src/getargs.c (getargs): Here.
4008
4009 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4010
4011 Fix last warning from --enable-gcc-warnings.
4012 * src/getargs.c (getargs): Don't assign const address to non-const
4013 pointer.
4014
4015 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
4016
4017 Don't let maintainer-*-check targets force a version update.
4018 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
4019 handled.
4020
4021 2008-11-17 Di-an Jan <dianj@freeshell.org>
4022
4023 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
4024 Align menus. Adjust word wrapping. Use node names for menu names.
4025 (Examples): Don't abbreviate node names.
4026 (LocalWords): Remove abbreviations.
4027 (Copying): Make description a sentence.
4028 (Java Action Features): Remove period to match the rest of menu.
4029
4030 2008-11-17 Di-an Jan <dianj@freeshell.org>
4031
4032 Handles several --enable-gcc-warnings.
4033 * src/getargs.c (command_line_location): Set parameters to void.
4034 * src/output.c (symbol_type_name_cmp): Make static.
4035 (symbols_by_type_name): Set parameters to void.
4036 (symbol_definitions_output): Remove unused parameter. Rename as...
4037 (prepare_symbol_definitions): this.
4038 (muscles_output): Move symbol_definitions_output to...
4039 (output): here as prepare_symbol_definitions.
4040 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
4041 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
4042
4043 2008-11-17 Di-an Jan <dianj@freeshell.org>
4044
4045 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
4046 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
4047
4048 2008-11-16 Akim Demaille <demaille@gostai.com>
4049
4050 Add missing $(EXEEXT).
4051 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
4052 "src/bison$(EXEEXT)".
4053 Reported by Di-an Jan.
4054
4055 2008-11-15 Akim Demaille <demaille@gostai.com>
4056
4057 * TODO: Update.
4058
4059 2008-11-15 Akim Demaille <demaille@gostai.com>
4060
4061 Formatting changes.
4062 * tests/input.at: here.
4063
4064 2008-11-15 Akim Demaille <demaille@gostai.com>
4065
4066 Remove duplicate header inclusion.
4067 * src/LR0.c: here.
4068
4069 2008-11-15 Akim Demaille <demaille@gostai.com>
4070
4071 * src/parse-gram.h, src/parse-gram.c: Regen.
4072
4073 2008-11-15 Akim Demaille <demaille@gostai.com>
4074
4075 Support parametric types.
4076
4077 There are two issues to handle: first scanning nested angle
4078 bracket pairs to support types such as std::pair< std::string,
4079 std::list<std::string> > >.
4080
4081 Another issue is to address idiosyncracies of C++: do not glue two
4082 closing angle brackets together (otherwise it's operator>>), and
4083 avoid sticking blindly a TYPE to the opening <, as it can result
4084 in '<:' which is a digraph for '['.
4085
4086 * src/scan-gram.l (brace_level): Rename as...
4087 (nesting): this.
4088 (SC_TAG): New.
4089 Implement support for complex tags.
4090 (tag): Accept
4091 , but not <.
4092 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
4093 (b4_symbol_variant): Leave space around types as parameters.
4094 * examples/variant.yy: Use nested template types and leading ::.
4095 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
4096 Rename as...
4097 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
4098 * tests/c++.at: Test parametric types.
4099
4100 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4101
4102 Test token.prefix.
4103 This is not sufficient, but we test at least that the make_SYMBOL
4104 interface is not affected by token.prefix. A more general test
4105 will be implemented when the support of token.prefix is generalized
4106 to more skeletons.
4107
4108 * tests/c++.at: One more variant test, using token.prefix.
4109
4110 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4111
4112 Test the make_TOKEN interface.
4113 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
4114 Factor the common code in yylex.
4115 Use it to test "%define lex_symbol".
4116
4117 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4118
4119 Formatting change.
4120
4121 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
4122
4123 Simplify code for variants bench marks.
4124 * etc/bench.pl.in (&generate_grammar_list): Define and use
4125 location_type.
4126 Factor the common code in yylex.
4127
4128 2008-11-15 Akim Demaille <demaille@gostai.com>
4129
4130 Better error message.
4131 * bootstrap (find_tool): Fix the error message.
4132
4133 2008-11-15 Akim Demaille <demaille@gostai.com>
4134
4135 Update variant.yy to newest interface.
4136 * examples/variant.yy: Define lex_symbol.
4137 Adjust.
4138
4139 2008-11-15 Akim Demaille <demaille@gostai.com>
4140
4141 Don't use locations in variant.yy.
4142 * examples/variant.yy: Adjust to not using locations.
4143
4144 2008-11-15 Akim Demaille <demaille@gostai.com>
4145
4146 Comment changes.
4147 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
4148 comments for the license.
4149
4150 2008-11-15 Akim Demaille <demaille@gostai.com>
4151
4152 Remove tests/Makefile.am.
4153 * tests/Makefile.am: Rename as...
4154 * tests/local.mk: this.
4155 * Makefile.am, configure.ac: Adjust.
4156 * Makefile.am (DISTCLEANFILES): Define.
4157 (maintainer-check, maintainer-xml-check, maintainer-push-check):
4158 Remove, we no longer need to bounce to the real targets.
4159
4160 2008-11-15 Akim Demaille <demaille@gostai.com>
4161
4162 Comment changes.
4163
4164 2008-11-15 Akim Demaille <demaille@gostai.com>
4165
4166 djgpp/local.mk.
4167 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
4168 * djgpp/local.mk: this new file.
4169
4170 2008-11-15 Akim Demaille <demaille@gostai.com>
4171
4172 Remove doc/Makefile.am.
4173 * doc/Makefile.am: Rename as...
4174 * doc/local.mk: this.
4175 Adjust paths
4176 * Makefile.am, configure.ac: Adjust.
4177 * Makefile.am (MOSTLYCLEANFILES): New.
4178 * src/local.mk: Adjust.
4179
4180 2008-11-15 Akim Demaille <demaille@gostai.com>
4181
4182 Move sc_tight_scope into maint.mk.
4183 It does not work, and I don't know how it was supposed to work: it
4184 seems to be looking for sources in the build tree. I just moved
4185 it at a better place, fixing it is still required.
4186
4187 * src/local.mk (echo): Remove.
4188 (sc_tight_scope): Move to...
4189 * maint.mk: here.
4190
4191 2008-11-15 Akim Demaille <demaille@gostai.com>
4192
4193 Regen.
4194 * src/parse-gram.h, src/parse-gram.h: Regen.
4195
4196 2008-11-15 Akim Demaille <demaille@gostai.com>
4197
4198 Remove src/Makefile.am.
4199 * src/Makefile.am: Rename as...
4200 * src/local.mk: this.
4201 Prefix all the paths with src/.
4202 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
4203 (AM_CPPFLAGS): Find find in builddir/src.
4204 (YACC): Move the flags into...
4205 (AM_YFLAGS): here.
4206 * maint.mk (sc_tight_scope): Disable.
4207 It used to bounce to the version in src/Makefile.am which is now
4208 part of this very Makefile.
4209 * Makefile.am, configure.ac: Adjust.
4210 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
4211 include "..." to find files "here": we are no longer in src/, so
4212 qualify the includes with src/.
4213 * doc/Makefile.am (PREPATH): No longer include the top_builddir
4214 prefix.
4215 (.x.1): Adjust to be able to create src/foo from the top level
4216 Makefile, instead of going bounce to src/Makefile the creation of
4217 foo.
4218
4219 2008-11-15 Akim Demaille <demaille@gostai.com>
4220
4221 Remove useless variable.
4222 * doc/Makefile.am (srcsrcdir): Remove.
4223
4224 2008-11-15 Akim Demaille <demaille@gostai.com>
4225
4226 Remove data/Makefile.am.
4227 * data/Makefile.am: Rename as...
4228 * data/local.mk: this.
4229 Adjust paths.
4230 * Makefile.am, configure.ac: Adjust.
4231
4232 2008-11-15 Akim Demaille <demaille@gostai.com>
4233
4234 Remove etc/Makefile.am.
4235 * etc/Makefile.am: Rename as...
4236 * etc/local.mk: this.
4237 Adjust.
4238 * Makefile.am, configure.ac: Adjust.
4239
4240 2008-11-15 Akim Demaille <demaille@gostai.com>
4241
4242 Remove examples/local.mk.
4243 examples/calc++/Makefile.am might be interesting to keep as is, since
4244 it is an example in itself.
4245
4246 * examples/Makefile.am: Rename as...
4247 * examples/local.mk: this.
4248 Adjust.
4249 * Makefile.am, configure.ac: Adjust.
4250
4251 2008-11-15 Akim Demaille <demaille@gostai.com>
4252
4253 Remove build-aux/Makefile.am.
4254 Recursive Makefiles are really way too slow, let's get rid of some of
4255 them.
4256
4257 * build-aux/Makefile.am: Rename as...
4258 * build-aux/local.mk: this.
4259 Adjust paths.
4260 * Makefile.am, configure.ac: Adjust.
4261
4262 2008-11-15 Akim Demaille <demaille@gostai.com>
4263
4264 Provide convenience constructors for locations and positions.
4265 * data/location.cc (position::position): Accept file, line and
4266 column as arguments with default values.
4267 Always qualify initial line and column literals as unsigned.
4268 (location::location): Provide convenience constructors.
4269
4270 2008-11-15 Akim Demaille <demaille@gostai.com>
4271
4272 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
4273 token type.
4274 Using template buys us nothing, and makes it uselessly complex to
4275 construct a symbol. Besides, it could not be generalized to other
4276 languages, while make_FOO would work in C/Java etc.
4277
4278 * data/lalr1.cc (b4_symbol_): New.
4279 (b4_symbol): Use it.
4280 (b4_symbol_constructor_declaration_)
4281 (b4_symbol_constructor_definition_): Instead of generating
4282 specializations of an overloaded template function, just generate
4283 several functions whose names are forged from the token names
4284 without the token.prefix.
4285 (b4_symbol_constructor_declarations): Generate them for all the
4286 symbols, not just by class of symbol type, now that instead of
4287 specializing a function template by the token, we generate a
4288 function named after the token.
4289 (b4_symbol_constructor_specialization_)
4290 (b4_symbol_constructor_specializations): Remove.
4291 * etc/bench.pl.in: Adjust to this new API.
4292
4293 2008-11-13 Akim Demaille <demaille@gostai.com>
4294
4295 %define token.prefix.
4296 Provide a means to add a prefix to the name of the tokens as
4297 output in the generated files. Because of name clashes, it is
4298 good to have such a prefix such as TOK_ that protects from names
4299 such as EOF, FILE etc. But it clutters the grammar itself.
4300
4301 * data/bison.m4 (token.prefix): Empty by default.
4302 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
4303 * data/lalr1.cc (b4_symbol): Ditto.
4304
4305 2008-11-13 Akim Demaille <demaille@gostai.com>
4306
4307 Compute at M4 time some of the subtractions.
4308 * data/lalr1.cc (b4_subtract): New.
4309 (b4_rhs_data): Use it.
4310
4311 2008-11-13 Akim Demaille <demaille@gostai.com>
4312
4313 symbol::token.
4314 This allows the user to get the type of a token returned by yylex.
4315
4316 * data/lalr1.cc (symbol::token): New.
4317 (yytoknum_): Define when %define lex_symbol, independently of
4318 %debug.
4319 (yytoken_number_): Move into...
4320 (symbol::token): here, since that's the only use.
4321 The other one is YYPRINT which was not officially supported
4322 by lalr1.cc, and anyway it did not work since YYPRINT uses this
4323 array under a different name (yytoknum).
4324
4325 2008-11-13 Akim Demaille <demaille@gostai.com>
4326
4327 YYERRCODE.
4328 * TODO (YYERRCODE): Mention the case of $undef.
4329
4330 2008-11-13 Akim Demaille <demaille@gostai.com>
4331
4332 TODO: YYPRINT.
4333 * TODO (YYPRINT): New.
4334
4335 2008-11-13 Akim Demaille <demaille@gostai.com>
4336
4337 Comment changes.
4338 * data/lalr1.cc, data/yacc.c: Fix the description of the
4339 yytranslate and yytoknum tables.
4340
4341 2008-11-13 Akim Demaille <demaille@gostai.com>
4342
4343 Define make_symbol in the header.
4344 To reach good performances these functions should be inlined (yet
4345 this is to measure precisely). To this end they must be available
4346 to the caller.
4347
4348 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
4349 location_type with the class name.
4350 Since will now be output in the header, declare "inline".
4351 No longer use b4_symbol_constructor_specializations, but
4352 b4_symbol_constructor_definitions in the header.
4353 Don't call it in the *.cc file.
4354
4355 2008-11-13 Akim Demaille <demaille@gostai.com>
4356
4357 Define yytranslate in the header for lex_symbol.
4358 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
4359 into the header file when using %define lex_symbol.
4360 (yytranslate_): Declare inline.
4361
4362 2008-11-13 Akim Demaille <demaille@gostai.com>
4363
4364 Define the constructors of symbol_type in
4365 b4_symbol_constructor_definitions.
4366 The constructors are called by the make_symbol functions, which a
4367 forthcoming patch will move elsewhere. Hence the interest of
4368 putting them together.
4369
4370 The stack_symbol_type does not need to be moved, it is used only
4371 by the parser.
4372
4373 * data/lalr1.cc: Move symbol_type and symbol_base_type
4374 constructors into...
4375 (b4_symbol_constructor_definitions): here.
4376 Adjust.
4377
4378 2008-11-13 Akim Demaille <demaille@gostai.com>
4379
4380 Make it easier to move the definition of yytranslate_.
4381 Forthcoming changes will make it possible to use yytranslate_
4382 from outside the parser implementation file.
4383
4384 * data/lalr1.cc (b4_yytranslate_definition): New.
4385 Use it.
4386
4387 2008-11-13 Akim Demaille <demaille@gostai.com>
4388
4389 Remove useless class specification.
4390 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
4391 to refer to the class name to use a type defined by the class for
4392 arguments of member functions.
4393
4394 2008-11-13 Akim Demaille <demaille@gostai.com>
4395
4396 Finer input type for yytranslate.
4397 This patch is debatable: the tradition expects yylex to return an int
4398 which happens to correspond to token_number (which is an enum). This
4399 allows for instance to return characters (such as '*' etc.). But this
4400 goes against the stronger typing I am trying to have with the new
4401 lex interface which return a symbol_type. So in this case, feed
4402 yytranslate_ with a token_type.
4403
4404 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
4405 expect a token_type.
4406
4407 2008-11-13 Akim Demaille <demaille@gostai.com>
4408
4409 Honor lex-params in %define lex_symbol mode.
4410 * data/lalr1.cc: Use b4_lex_param.
4411
4412 2008-11-13 Akim Demaille <demaille@gostai.com>
4413
4414 Simplify names.
4415 * src/output.c (symbol_definitions_output): Rename symbol
4416 attributes type_name and has_type_name as type and has_type.
4417 * data/lalr1.cc: Adjust uses.
4418
4419 2008-11-13 Akim Demaille <demaille@gostai.com>
4420
4421 Use b4_type_names for the union type.
4422 The union used to compute the size of the variant used to iterate
4423 over the type of all the symbols, with a lot of redundancy. Now
4424 iterate over the lists of symbols having the same type-name.
4425
4426 * data/lalr1.cc (b4_char_sizeof_): New.
4427 (b4_char_sizeof): Use it.
4428 Adjust to be called with a list of numbers instead of a single
4429 number.
4430 Adjust its caller for new-line issues.
4431
4432 2008-11-13 Akim Demaille <demaille@gostai.com>
4433
4434 Define the "identifier" of a symbol.
4435 Symbols may have several string representations, for instance if
4436 they have an alias. What I call its "id" is a string that can be
4437 used as an identifier. May not exist.
4438
4439 Currently the symbols which have the "tag_is_id" flag set are
4440 those that don't have an alias. Look harder for the id.
4441
4442 * src/output.c (is_identifier): Move to...
4443 * src/symtab.c (is_identifier): here.
4444 * src/symtab.h, src/symtab.c (symbol_id_get): New.
4445 * src/output.c (symbol_definitions_output): Use it to define "id"
4446 and "has_id".
4447 Remove the definition of "tag_is_id".
4448 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
4449 "tag_is_id" were used to produce code.
4450 We still use "tag" for documentation.
4451
4452 2008-11-11 Akim Demaille <demaille@gostai.com>
4453
4454 Locations are no longer required by lalr1.cc.
4455 * data/lalr1.cc (_b4_args, b4_args): New.
4456 Adjust all uses of locations to make them optional.
4457 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
4458 (AT_CHECK_NAMESPACE): Check the use of locations.
4459 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
4460 without locations with lalr1.cc.
4461 Test these cases.
4462 * tests/output.at: Check lalr1.cc with and without location
4463 support.
4464 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
4465 Don't use locations.
4466
4467 2008-11-11 Akim Demaille <demaille@gostai.com>
4468
4469 AT_FULL_COMPILE.
4470 * tests/local.at (AT_FULL_COMPILE): New.
4471 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
4472
4473 2008-11-11 Akim Demaille <demaille@gostai.com>
4474
4475 Support parens in calc++.
4476 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
4477 * examples/calc++/test (run): Check the expected output.
4478 Adjust callers.
4479 Check parens too.
4480
4481 2008-11-11 Akim Demaille <demaille@gostai.com>
4482
4483 Simplify lalr1.cc since %defines is mandatory.
4484 * data/lalr1.cc: Remove useless calls to b4_defines_if.
4485
4486 2008-11-11 Akim Demaille <demaille@gostai.com>
4487
4488 TODO: yyfmt.
4489 * TODO (yysyntax_error): New item.
4490
4491 2008-11-11 Akim Demaille <demaille@gostai.com>
4492
4493 Prefer M4 to CPP.
4494 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
4495 YYERROR_VERBOSE.
4496
4497 2008-11-11 Akim Demaille <demaille@gostai.com>
4498
4499 Support i18n of the parse error messages.
4500 * TODO (lalr1.cc/I18n): Remove.
4501 * data/lalr1.cc (yysyntax_error_): Support the translation of the
4502 error messages, as done in yacc.c.
4503 Stay within the yy* pseudo namespace.
4504
4505 2008-11-11 Akim Demaille <demaille@gostai.com>
4506
4507 More TODO.
4508 * TODO (single stack, yysyntax_error): New.
4509
4510 2008-11-11 Akim Demaille <demaille@gostai.com>
4511
4512 Make it possible to return a symbol_type from yylex.
4513 * data/lalr1.cc (b4_lex_symbol_if): New.
4514 (parse): When lex_symbol is defined, expected yylex to return the
4515 complete lookahead.
4516 * etc/bench.pl.in (generate_grammar_list): Extend to support this
4517 yylex interface.
4518 (bench_variant_parser): Exercise it.
4519
4520 2008-11-11 Akim Demaille <demaille@gostai.com>
4521
4522 Remove useless bench case.
4523 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
4524 no longer used.
4525
4526 2008-11-11 Akim Demaille <demaille@gostai.com>
4527
4528 Improve display of directives.
4529 * etc/bench.pl.in (parse_term): Don't add useless eol.
4530
4531 2008-11-11 Akim Demaille <demaille@gostai.com>
4532
4533 Use string_cast in the bench.
4534 * etc/bench.pl.in (generate_grammar_list): Define and use
4535 string_cast.
4536
4537 2008-11-11 Akim Demaille <demaille@gostai.com>
4538
4539 Replace yychar with a Boolean.
4540 * data/lalr1.cc (parse::yychar): Replace by...
4541 (parse::yyempty): this.
4542
4543 2008-11-11 Akim Demaille <demaille@gostai.com>
4544
4545 Factor the tables.
4546 * TODO: New item.
4547
4548 2008-11-11 Akim Demaille <demaille@gostai.com>
4549
4550 Let yytranslate handle the eof case.
4551 * data/lalr1.cc (yytranslate_): Handle the EOF case.
4552 Adjust callers.
4553 No longer expect yychar to be equal to yyeof_, rather, test the
4554 lookahead's (translated) kind.
4555
4556 2008-11-11 Akim Demaille <demaille@gostai.com>
4557
4558 yychar cannot be empty in yyerrlab.
4559 * TODO (yychar == yyempty_): New.
4560 * data/lalr1.cc: Remove the handling of this case.
4561 This eases forthcoming changes related to yychar and yytranslate.
4562
4563 2008-11-11 Akim Demaille <demaille@gostai.com>
4564
4565 Bench: syntactic sugar for %define/#define.
4566 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
4567 (&bench_push_parser, bench_variant_parser): Use this feature.
4568 (&eat): New.
4569 Use it.
4570
4571 2008-11-11 Akim Demaille <demaille@gostai.com>
4572
4573 Less memory pressure on the "list" bench.
4574 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
4575 the values, to limit memory pressure.
4576
4577 2008-11-11 Akim Demaille <demaille@gostai.com>
4578
4579 Introduce make_symbol.
4580 make_symbol provides a means to construct a full symbol (kind,
4581 value, location) in a single shot. It is meant to be a Symbol
4582 constructor, parameterized by the symbol kind so that overloading
4583 would prevent incorrect kind/value pairs. Unfortunately
4584 parameterized constructors do not work well in C++ (unless the
4585 parameter also appears as an argument, which is not acceptable),
4586 hence the use of a function instead of a constructor.
4587
4588 * data/lalr1.cc (b4_symbol_constructor_declaration_)
4589 (b4_symbol_constructor_declarations)
4590 (b4_symbol_constructor_specialization_)
4591 (b4_symbol_constructor_specializations)
4592 (b4_symbol_constructor_definition_)
4593 (b4_symbol_constructor_definitions): New.
4594 Use them where appropriate to generate declaration, declaration of
4595 the specializations, and implementations of the templated
4596 overloaded function "make_symbol".
4597 (variant::variant): Always define a default ctor.
4598 Also provide a copy ctor.
4599 (symbol_base_type, symbol_type): New ctor overloads for value-less
4600 symbols.
4601 (symbol_type): Now public, so that functions such as yylex can use
4602 it.
4603
4604 2008-11-11 Akim Demaille <demaille@gostai.com>
4605
4606 Inform m4 whether a tag is a valid id.
4607 * src/output.c (is_identifier): New.
4608 (symbol_definitions_output): Use it to define tag_is_id.
4609 But maybe this should be done at m4 level?
4610
4611 2008-11-11 Akim Demaille <demaille@gostai.com>
4612
4613 Test 214 was failing: it greps with a pattern containing [ ]*
4614 which obviously meant to catch spaces and tabs, but contained only
4615 spaces. Tabulations in sources are a nuisance, so to simplify the
4616 matter, get rid of all the tabulations in the Java sources. The
4617 other skeletons will be treated equally later.
4618
4619 * data/java.m4, data/lalr1.java: Untabify.
4620 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
4621 tabulations are no longer generated.
4622
4623 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
4624
4625 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
4626 * configure.ac: Adjust usage.
4627 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4628 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
4629 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
4630
4631 2008-11-10 Di-an Jan <dianj@freeshell.org>
4632
4633 Workaround Java's ``code too large'' problem for parser tables
4634 in most cases, by using one function per initialization.
4635 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
4636 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
4637 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
4638 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
4639 (yytname_): Use b4_typed_parser_table.
4640 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
4641 ``code too large'' error.
4642
4643 2008-11-10 Di-an Jan <dianj@freeshell.org>
4644
4645 * NEWS: Document them.
4646
4647 General Java skeleton improvements.
4648 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
4649 using gcj < 4.3 in the testsuite, according to comments in
4650 gnulib/m4/javacomp.m4.
4651 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
4652 location_type, position_type): Remove extraneous brackets from
4653 b4_percent_define_default.
4654 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
4655 m4_define and m4_define_default.
4656 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
4657 which marks the end of user code with appropriate syncline, like all
4658 the other skeletons.
4659 (b4_user_post_prologue): Add. Don't silently drop.
4660 (yylex): Remove.
4661 (parse): Inline yylex.
4662 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
4663 (%{...%}): Fix typo of %code imports.
4664 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
4665
4666 Support annotations on parser class with %define annotations.
4667 * data/lalr1.java (annotations): Add to parser class modifier.
4668 * doc/bison.texinfo (Java Parser Interface): Document
4669 %define annotations.
4670 (Java Declarations Summary): Document %define annotations.
4671 * tests/java.at (Java parser class modifiers): Test annotations.
4672
4673 Do not generate code for %error-verbose unless requested.
4674 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
4675 Make private. Make conditional on %error-verbose.
4676 (getErrorVerbose, setErrorVerbose): New.
4677 (yytnamerr_): Make conditional on %error-verbose.
4678 (yysyntax_error): Make some code conditional on %error-verbose.
4679 * doc/bison.texinfo (Java Bison Interface): Remove the parts
4680 about %error-verbose having no effect.
4681 (getErrorVerbose, setErrorVerbose): Document.
4682
4683 Move constants for token names to Lexer interface.
4684 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
4685 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
4686 (parse): Qualify EOF to Lexer.EOF.
4687 * doc/bison.texinfo (Java Parser Interface): Move documentation of
4688 EOF and token names to Java Lexer Interface.
4689 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
4690
4691 Make yyerror public.
4692 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
4693 (yyerror): Change to public. Add Javadoc comments. Use longer
4694 parameter names. Make the body rather than the declarator
4695 conditional on %locations.
4696 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
4697
4698 Allow user to add code to the constructor with %code init.
4699 * data/java.m4 (b4_init_throws): New, for %define init_throws.
4700 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
4701 Add %code init to the front of the constructor body.
4702 * doc/bison.texinfo (YYParser.YYParser): Document %code init
4703 and %define init_throws.
4704 (Java Declarations Summary): Document %code init and
4705 %define init_throws.
4706 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
4707 (Java constructor init and init_throws): Add tests.
4708
4709 2008-11-10 Akim Demaille <demaille@gostai.com>
4710
4711 Update TODO.
4712 * TODO (-D): is implemented.
4713 (associativity): Same precedence must have the same associativity.
4714 For instance, how can a * b / c be parsed if * is %left and / is
4715 %right?
4716 (YYERRORCODE, YYFAIL, YYBACKUP): New.
4717
4718 2008-11-10 Akim Demaille <demaille@gostai.com>
4719
4720 Formatting changes.
4721
4722 2008-11-10 Akim Demaille <demaille@gostai.com>
4723
4724 More information about the symbols.
4725 * src/output.c (type_names_output): Document all the symbols,
4726 including those that don't have a type-name.
4727 (symbol_definitions_output): Define "is_token" and
4728 "has_type_name".
4729 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
4730 type-name, now that they are defined too in b4_type_names.
4731
4732 2008-11-10 Akim Demaille <demaille@gostai.com>
4733
4734 Regen.
4735
4736 2008-11-10 Akim Demaille <demaille@gostai.com>
4737
4738 Make parser::yytranslate static.
4739 Small speedup (1%) on the list grammar. And makes yytranslate_
4740 available in non member functions.
4741
4742 * data/lalr1.cc (yytranslate_): Does not need to be a instance
4743 function.
4744
4745 2008-11-10 Akim Demaille <demaille@gostai.com>
4746
4747 Avoid trailing spaces.
4748 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
4749 * data/lalr1.cc: Don't indent before rule and symbol actions, as
4750 they can be empty, and anyway this incorrectly indents the first
4751 action.
4752
4753 2008-11-10 Akim Demaille <demaille@gostai.com>
4754
4755 Comment changes.
4756
4757 2008-11-10 Akim Demaille <demaille@gostai.com>
4758
4759 Use "enum" for integral constants.
4760 This is just nicer to read, I observed no speedup.
4761
4762 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
4763 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
4764 (yyuser_token_number_max_, yyundef_token_): Move into...
4765 (yytranslate_): here.
4766
4767 2008-11-10 Akim Demaille <demaille@gostai.com>
4768
4769 Shortcuts in bench directives.
4770 * etc/bench.pl.in (parse_dirs): New.
4771 Use it.
4772 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
4773 Create the benches in "benches/".
4774
4775 2008-11-10 Akim Demaille <demaille@gostai.com>
4776
4777 Formatting changes.
4778 * data/lalr1.cc: here.
4779
4780 2008-11-10 Akim Demaille <demaille@gostai.com>
4781
4782 Adjust verbose message to using emacs.
4783 * etc/bench.pl.in: Inform compilation-mode when we change the
4784 directory.
4785 (generate_grammar_list): Recognize %define "variant" in addition
4786 to %define variant.
4787
4788 2008-11-10 Akim Demaille <demaille@gostai.com>
4789
4790 Classify symbols by type-name.
4791 * src/uniqstr.h (UNIQSTR_CMP): New.
4792 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
4793 (type_names_output): New.
4794 (muscles_output): Use it.
4795 * data/lalr1.cc (b4_symbol_action_): Remove.
4796 (b4_symbol_case_, b4_type_action_): New.
4797 Adjust uses of b4_symbol_action_ to use b4_type_action_.
4798
4799 2008-11-10 Akim Demaille <demaille@gostai.com>
4800
4801 Change the handling of the symbols in the skeletons.
4802 Before we were using tables which lines were the symbols and which
4803 columns were things like number, tag, type-name etc. It is was
4804 difficult to extend: each time a column was added, all the numbers had
4805 to be updated (you asked for colon $2, not for "tag"). Also, it was
4806 hard to filter these tables when only a subset of the symbols (say the
4807 tokens, or the nterms, or the tokens that have and external number
4808 *and* a type-name) was of interest.
4809
4810 Now instead of monolithic tables, we define one macro per cell. For
4811 instance "b4_symbol(0, tag)" is a macro name which contents is
4812 self-decriptive. The macro "b4_symbol" provides easier access to
4813 these cells.
4814
4815 * src/output.c (type_names_output): Remove.
4816 (symbol_numbers_output, symbol_definitions_output): New.
4817 (muscles_output): Call them.
4818 (prepare_symbols): Define b4_symbols_number.
4819
4820 2008-11-10 Akim Demaille <demaille@gostai.com>
4821
4822 --trace=muscles
4823 * src/getargs.h, src/getargs.c (trace_muscle): New.
4824 (trace_types, trace_args): Support it.
4825 * src/output.c (output_skeleton): Use it.
4826
4827 2008-11-10 Akim Demaille <demaille@gostai.com>
4828
4829 muscles_output.
4830 * src/output.c (muscles_output): New, extracted from...
4831 (output_skeleton): here.
4832 Adjust.
4833
4834 2008-11-10 Akim Demaille <demaille@gostai.com>
4835
4836 Formatting changes.
4837
4838 2008-11-10 Akim Demaille <demaille@gostai.com>
4839
4840 Update the variant example.
4841 * examples/variant.yy: Formatting changes.
4842 One stage build.
4843
4844 2008-11-10 Akim Demaille <demaille@gostai.com>
4845
4846 Support constructor with an argument.
4847 This improves the "list" bench by 2%.
4848
4849 * data/lalr1.cc (variant::build): Add an overloaded version with
4850 an argument.
4851 * tests/c++.at (AT_CHECK_VARIANT): Check it.
4852
4853 2008-11-10 Akim Demaille <demaille@gostai.com>
4854
4855 Test variants.
4856 * tests/c++.at (AT_CHECK_VARIANTS): New.
4857 Use it with and without %define assert.
4858
4859 2008-11-10 Akim Demaille <demaille@gostai.com>
4860
4861 Add %precedence support.
4862 Unfortunately it is not possible to reuse the %prec directive. This
4863 is because to please POSIX, we do not require to end the rules with a
4864 semicolon. As a result,
4865
4866 foo: bar %prec baz
4867
4868 is ambiguous: either a rule which precedence is that of baz, or a rule,
4869 and then a declaration of the precedence of the token baz.
4870
4871 * doc/bison.texinfo: Document %precedence.
4872 (Precedence Only): New.
4873 * src/assoc.h, src/assoc.c (precedence_assoc): New.
4874 * src/conflicts.c (resolve_sr_conflict): Support it.
4875 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
4876 Parse it.
4877 * tests/calc.at: Use %precedence for NEG.
4878 * tests/conflicts.at (%precedence does not suffice)
4879 (%precedence suffices): New tests.
4880
4881 2008-11-09 Akim Demaille <demaille@gostai.com>
4882
4883 Make benches in a sub dirs.
4884 * etc/bench.pl.in ($dir): New.
4885 Use it.
4886 Check the use of constructors with an argument.
4887 (bench_variant_parser): Fix.
4888
4889 2008-11-09 Akim Demaille <demaille@gostai.com>
4890
4891 fix eof condition
4892
4893 2008-11-09 Akim Demaille <demaille@gostai.com>
4894
4895 Fix --help.
4896
4897 2008-11-09 Akim Demaille <demaille@gostai.com>
4898
4899 Require the generation of parse-gram.output.
4900 * src/Makefile.am (YACC): Pass --report=all.
4901
4902 2008-11-09 Akim Demaille <demaille@gostai.com>
4903
4904 Formatting changes.
4905
4906 2008-11-09 Akim Demaille <demaille@gostai.com>
4907
4908 Update TODO.
4909 * TODO: Remove obsolete items.
4910 Update others.
4911
4912 2008-11-09 Akim Demaille <demaille@gostai.com>
4913
4914 Enhance bench.pl.
4915 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
4916 (@token, $grammar, $bench): New.
4917 (generate_grammar_variant): Rename as...
4918 (generate_grammar_list): this.
4919 (generate_grammar): Adjust.
4920 (bench_grammar): Rename as...
4921 (bench): this.
4922 Use it in the various bench-marking routines.
4923 (-b, -g): New options.
4924
4925 2008-11-09 Akim Demaille <demaille@gostai.com>
4926
4927 Use a static hierarchy for symbols in the C++ parser.
4928 * data/lalr1.cc (symbol_base_type, symbol_type)
4929 (stack_symbol_type): Make it a static hierarchy.
4930 Adjust dependencies.
4931
4932 2008-11-09 Akim Demaille <demaille@gostai.com>
4933
4934 bench.pl -d, --directive.
4935 * etc/bench.pl.in (@directive): New.
4936 (&bench_grammar): Use it.
4937 (&bench_list_grammar): New, to provide access to the "variant"
4938 grammar.
4939 Use it.
4940 (getopts): Support -d, --directive.
4941
4942 2008-11-09 Akim Demaille <demaille@gostai.com>
4943
4944 Use inline for small operations.
4945 * data/lalr1.cc (symbol_base_type, symbol_type)
4946 (stack_symbol_type): Declare constructor and other operations as
4947 inline.
4948 (yy_destroy_): Inline.
4949
4950 2008-11-09 Akim Demaille <demaille@gostai.com>
4951
4952 Introduce a hierarchy for symbols.
4953 * data/lalr1.cc (symbol_base_type, symbol_type): New.
4954 (data_type): Rename as...
4955 (stack_symbol_type): this.
4956 Derive from symbol_base_type.
4957 (yy_symbol_value_print_): Merge into...
4958 (yy_symbol_print_): this.
4959 Rename as...
4960 (yy_print_): this.
4961 (yydestruct_): Rename as...
4962 (yy_destroy_): this.
4963 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
4964 (parser::parse): yyla is now of symbol_type.
4965 Use its type member instead of yytoken.
4966
4967 2008-11-09 Akim Demaille <demaille@gostai.com>
4968
4969 Rename data_type and stack_symbol_type.
4970 * data/lalr1.cc (data_type): Rename as...
4971 (stack_symbol_type): this.
4972
4973 2008-11-09 Akim Demaille <demaille@gostai.com>
4974
4975 Handle semantic value and location together.
4976 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
4977 yydata.value and yydata.location.
4978 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
4979 (YY_SYMBOL_PRINT): Now take semantic value and location as a
4980 single arg.
4981 Adjust all callers.
4982 (yydestruct_): New overload for a stack symbol.
4983
4984 2008-11-09 Akim Demaille <demaille@gostai.com>
4985
4986 Push a complete symbol, not connected parts.
4987 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
4988 state, value and location.
4989 Adjust callers.
4990
4991 2008-11-09 Akim Demaille <demaille@gostai.com>
4992
4993 Agregate yylval and yylloc.
4994 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
4995 (parser::yyla): this.
4996
4997 2008-11-09 Akim Demaille <demaille@gostai.com>
4998
4999 Rely on the state stack to display reduction traces.
5000 To display rhs symbols before a reduction, we used information
5001 about the rule reduced, which required the tables yyrhs and
5002 yyprhs. Now use rely only on the state stack to get the same
5003 information.
5004
5005 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
5006 Use them.
5007 (parser::yyrhs_, parser::yyprhs_): Remove.
5008 (parser::yy_reduce_print_): Use the state stack.
5009
5010 2008-11-09 Akim Demaille <demaille@gostai.com>
5011
5012 Fuse yyval and yyloc into yylhs.
5013 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
5014 yylhs.
5015 (parse): Replace yyval and yyloc with yylhs.value and
5016 yylhs.location.
5017 After a user action, compute yylhs.state earlier.
5018 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
5019 fresh error_token.
5020
5021 2008-11-09 Di-an Jan <dianj@freeshell.org>
5022
5023 Remove unused variable.
5024 * src/output.c (type_names_output): Remove unused variable sep.
5025
5026 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
5027
5028 Change tests/output.at quoting.
5029 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
5030 expanding arguments.
5031
5032 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
5033
5034 Don't add a semicolon to actions for %skeleton or %language.
5035 It breaks Java test cases as reported by Akim Demaille.
5036 * src/scan-code.l: Implement.
5037
5038 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
5039
5040 Clean up %skeleton and %language priority implementation.
5041 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
5042 remove static qualifier because others will soon need to see it.
5043 (language_prio): Likewise.
5044 (getargs): Use command_line_prio rather than 0.
5045 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
5046 enum fields.
5047 (skeleton_prio): Extern it.
5048 (language_prio): Extern it.
5049 * src/parse-gram.y: Use grammar_prio rather than 1.
5050
5051 2008-11-07 Akim Demaille <demaille@gostai.com>
5052
5053 Moving push traces into yypush_.
5054 * data/lalr1.cc (yypush_): Now takes a optional trace message.
5055 Adjust all uses.
5056
5057 2008-11-07 Akim Demaille <demaille@gostai.com>
5058
5059 The single-stack C++ parser is now the standard one.
5060 * data/lalr1.cc: Rename as...
5061 * data/lalr1-split.cc: this.
5062 * data/lalr1-fusion.cc: Rename as...
5063 * data/lalr1.cc: this.
5064 * etc/bench.pl.in: Adjust.
5065
5066 2008-11-07 Akim Demaille <demaille@gostai.com>
5067
5068 Avoid empty-if warnings.
5069 Reported by Quentin Hocquet.
5070
5071 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
5072 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
5073
5074 2008-11-07 Akim Demaille <demaille@gostai.com>
5075
5076 Pass command line location to skeleton_arg and language_argmatch.
5077 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
5078 The location argument is now mandatory.
5079 Adjust all dependencies.
5080 (getargs): Use command_line_location.
5081
5082 2008-11-07 Akim Demaille <demaille@gostai.com>
5083
5084 -D, --define.
5085 * src/getargs.c (usage): Document -D.
5086 Fix help string for --locations.
5087 (command_line_location): New.
5088 (short_options, long_options, getargs): Support -D, --define.
5089 (getargs): Move -d support at the right place.
5090 * doc/bison.texinfo (Bison Options): Update.
5091 * tests/input.at (%define, --define): New.
5092
5093 2008-11-07 Akim Demaille <demaille@gostai.com>
5094
5095 Initialize the muscle table before parsing the command line.
5096 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
5097 (getargs): Define file_name.
5098 * src/main.c (main): Initialize muscle_tab before calling
5099 getargs.
5100 * src/muscle_tab.c (muscle_init): No longer define file_name, as
5101 its value is not available yet.
5102
5103 2008-11-07 Akim Demaille <demaille@gostai.com>
5104
5105 Locations without columns for command line arguments.
5106 * src/location.c (location_print): Don't display negative columns.
5107 * src/location.h: Document this.
5108
5109 2008-11-07 Akim Demaille <demaille@gostai.com>
5110
5111 Fix --help.
5112 * src/getargs.c (usage): Fix help string for -W.
5113
5114 2008-11-07 Akim Demaille <demaille@gostai.com>
5115
5116 Handle more general types of option arguments.
5117 * build-aux/cross-options.pl: The argument ends at the first
5118 space, not the first non-symbol character.
5119 Use @var for each word appearing the argument description.
5120
5121 2008-11-07 Akim Demaille <demaille@gostai.com>
5122
5123 Destroy the variants that remain on the stack in case of error.
5124 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
5125 destructor.
5126 Display the value only if yymsg is nonnull.
5127 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
5128
5129 2008-11-07 Akim Demaille <demaille@gostai.com>
5130
5131 Add "%define assert" to variants.
5132 This is used to help the user catch cases where some value gets
5133 ovewritten by a new one. This should not happen, as this will
5134 probably leak.
5135
5136 Unfortunately this uncovered a bug in the C++ parser itself: the
5137 lookahead value was not destroyed between two calls to yylex. For
5138 instance if the previous lookahead was a std::string, and then an int,
5139 then the value of the std::string was correctly taken (i.e., the
5140 lookahead was now an empty string), but std::string structure itself
5141 was not reclaimed.
5142
5143 This is now done in variant::build(other&) (which is used to take the
5144 value of the lookahead): other is not only stolen from its value, it
5145 is also destroyed. This incurs a new performance penalty of a few
5146 percent, and union becomes faster again.
5147
5148 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
5149 (b4_variant_if): New.
5150 (variant::built): New.
5151 Use it whereever the status of the variant changes.
5152 * etc/bench.pl.in: Check the penalty of %define assert.
5153
5154 2008-11-07 Akim Demaille <demaille@gostai.com>
5155
5156 Use "%define variant" in bench.pl.
5157 * etc/bench.pl.in: No longer use the pseudo directive %variants,
5158 just use %define variants.
5159
5160 2008-11-07 Akim Demaille <demaille@gostai.com>
5161
5162 Regen.
5163 * src/parse-gram.h, src/parse-gram.c: Regen.
5164
5165 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
5166
5167 Fix user actions without a trailing semicolon.
5168 Reported by Sergei Steshenko at
5169 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
5170 * THANKS (Sergei Steshenko): Add.
5171 * src/scan-code.l (SC_RULE_ACTION): Fix it.
5172 * tests/regression.at (Fix user actions without a trailing semicolon):
5173 New test case.
5174
5175 2008-11-04 Akim Demaille <demaille@gostai.com>
5176
5177 Use b4_copyright_years.
5178 * data/yacc.c (b4_copyright_years): New.
5179 Fix its value according to the comments in the file.
5180 Use it and undefine it.
5181
5182 2008-11-04 Akim Demaille <demaille@gostai.com>
5183
5184 Formatting changes.
5185 * data/lalr1-fusion.cc, src/parse-gram.y: here.
5186
5187 2008-11-04 Akim Demaille <demaille@gostai.com>
5188
5189 Formatting changes.
5190 * data/lalr1-fusion.cc: here.
5191
5192 2008-11-04 Akim Demaille <demaille@gostai.com>
5193
5194 Use strict on bench.pl.
5195 * etc/bench.pl.in (&run, &generate_grammar): New.
5196 Rename the grammar generating functions for consistency.
5197 Change the interface so that the list of benches to run is passed
5198 as (optionless) arguments.
5199 (&compile): Use &run.
5200
5201 2008-11-04 Akim Demaille <demaille@gostai.com>
5202
5203 Remove spurious initial empty lines.
5204 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
5205 * data/yacc.c: End the @output lines with an @.
5206
5207 2008-11-04 Akim Demaille <demaille@gostai.com>
5208
5209 Improve the display of sizes.
5210 * etc/bench.p.in: Higher precision.
5211 Sort by decreasing size.
5212
5213 2008-11-04 Akim Demaille <demaille@gostai.com>
5214
5215 Don't memcpy C++ structures.
5216 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
5217 arguments.
5218 (variant::build): New overload for
5219 copy-construction-that-destroys.
5220 (variant::swap): New.
5221 (parser::yypush_): Use it in variant mode.
5222
5223 2008-11-04 Akim Demaille <demaille@gostai.com>
5224
5225 Better defaults for bench.pl.
5226 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
5227 default values.
5228 Adjust &verbose uses.
5229 (-q, --quiet): New.
5230
5231 2008-11-04 Akim Demaille <demaille@gostai.com>
5232
5233 Make variant.yy more complex.
5234 std::list cannot be copied via memcpy, they are more demanding than
5235 std::string. Use one std::list to strengthen the test.
5236
5237 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
5238 Adjust.
5239 Create a list of strings, instead of a single large string.
5240
5241 2008-11-04 Akim Demaille <demaille@gostai.com>
5242
5243 bench.pl --bench.
5244 * etc/bench.pl.in (--bench, $bench): New.
5245
5246 2008-11-04 Akim Demaille <demaille@gostai.com>
5247
5248 Sort methods.
5249 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
5250 Define it after as().
5251
5252 2008-11-04 Akim Demaille <demaille@gostai.com>
5253
5254 Useless parens.
5255 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
5256
5257 2008-11-04 Akim Demaille <demaille@gostai.com>
5258
5259 Issue missing synclines after user actions.
5260 * data/c.m4 (b4_case): Issue synclines on the output file.
5261
5262 2008-11-04 Akim Demaille <demaille@gostai.com>
5263
5264 Remove trailing empty line.
5265 * data/lalr1-fusion.cc: Don't add an empty line after the user's
5266 epilogue.
5267
5268 2008-11-04 Akim Demaille <demaille@gostai.com>
5269
5270 Fix output of copyright years.
5271 * data/bison.m4 (b4_copyright): Fix the indentation of the
5272 copyright year paragraph.
5273 Use b4_copyright_years when no years are given.
5274 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
5275 (b4_copyright_years): New.
5276 Use it.
5277
5278 2008-11-04 Akim Demaille <demaille@gostai.com>
5279
5280 Avoid the spurious initial empty line.
5281 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
5282 the end of @output request to suppress the empty line that
5283 results.
5284
5285 2008-11-04 Akim Demaille <demaille@gostai.com>
5286
5287 Remove parser::rhs_number_type.
5288 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
5289 (yyrhs_): Use b4_table_define.
5290
5291 2008-11-04 Akim Demaille <demaille@gostai.com>
5292
5293 Fix iteration type.
5294 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
5295
5296 2008-11-04 Akim Demaille <demaille@gostai.com>
5297
5298 Factor the declaration of the integer tables.
5299 * data/lalr1-fusion.cc (b4_table_define): New.
5300 Use it.
5301
5302 2008-11-03 Akim Demaille <demaille@gostai.com>
5303
5304 Fix indentation of tables in lalr1.cc
5305 * data/lalr1-fusion.cc: Fix the indentation.
5306
5307 2008-11-03 Akim Demaille <demaille@gostai.com>
5308
5309 Destroy the lhs symbols after reduction.
5310 * data/lalr1-fusion.cc (parse): After the user action, when in
5311 variant mode, destroy the lhs symbols.
5312
5313 2008-11-03 Akim Demaille <demaille@gostai.com>
5314
5315 Simplify yysyntax_error_ use.
5316 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
5317 type, but make it unnamed in the declaration when it is not used.
5318
5319 2008-11-03 Akim Demaille <demaille@gostai.com>
5320
5321 Let yy::variant::build return an lvalue.
5322 * data/lalr1-fusion.cc (variant::build): Return a reference to the
5323 object.
5324
5325 2008-11-03 Akim Demaille <demaille@gostai.com>
5326
5327 Define yy::variant only when needed.
5328 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
5329 used.
5330
5331 2008-11-03 Akim Demaille <demaille@gostai.com>
5332
5333 Bench the three-stack lalr1.cc.
5334 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
5335 one-stack one.
5336
5337 2008-11-03 Akim Demaille <demaille@gostai.com>
5338
5339 Fail on parse error in calc++.
5340 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
5341 status.
5342 * examples/calc++/test ($me, $number, $exit, run): New.
5343 Use them to propagate errors to the exit status.
5344
5345 2008-11-03 Akim Demaille <demaille@gostai.com>
5346
5347 Don't specify the skeleton twice in the example.
5348 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
5349 file does what is needed.
5350
5351 2008-11-03 Akim Demaille <demaille@gostai.com>
5352
5353 bench: Improve output.
5354 * etc/bench.pl.in (bench_grammar): Tune the printf format.
5355
5356 2008-11-03 Akim Demaille <demaille@gostai.com>
5357
5358 bench: check impact of %debug on variants.
5359 * etc/bench.pl.in (variant_grammar): Fix the computation of
5360 $variant.
5361 Generate a grammar file that can work with or without %debug.
5362 Do use the @directive.
5363 (bench_variant_parser): Check impact of %debug.
5364 (@directives): Rename all the occurrences to...
5365 (@directive): this, for consistency.
5366
5367 2008-11-03 Akim Demaille <demaille@gostai.com>
5368
5369 bench: report the size too.
5370 * etc/bench.pl.in ($iterations): Defaults to -3.
5371 (&bench_grammar): Require hireswallclock.
5372 Compute and display the size of the result.
5373 More comments.
5374
5375 2008-11-03 Akim Demaille <demaille@gostai.com>
5376
5377 bench: More use of the verbosity level.
5378 * etc/bench.pl.in ($verbose, &verbose): New.
5379 Use them.
5380 More POD documentation.
5381
5382 2008-11-03 Akim Demaille <demaille@gostai.com>
5383
5384 bench.pl: a command line interface
5385 * etc/bench.pl.in: More doc.
5386 Some fixes in the documentation.
5387 ($cflags, $iterations, &help, &getopt): New.
5388 Use them.
5389 (&variant_grammar): Let the number of stages be 10 times what is
5390 specified.
5391
5392 2008-11-03 Akim Demaille <demaille@gostai.com>
5393
5394 Bench the use of Boost.Variants.
5395 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
5396 New.
5397 (&compile): Be ready to compile C++ parsers.
5398 (&bench_push_parser): Move debug information to the outermost
5399 level.
5400 * THANKS: Add Michiel De Wilde.
5401
5402 2008-11-03 Akim Demaille <demaille@gostai.com>
5403
5404 bench.pl: Pass directives as a list instead of as a string.
5405 * etc/bench.pl.in (&directives): New.
5406 (&triangular_grammar, &calc_grammar): Use it to format the Bison
5407 directives.
5408 (&triangular_grammar): Do use the directives (were ignored).
5409 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
5410 directives.
5411
5412 2008-11-03 Akim Demaille <demaille@gostai.com>
5413
5414 Improve genericity of bench.pl.
5415 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
5416 argument.
5417 (&bench_push_parser): New.
5418 Call it.
5419
5420 2008-11-03 Akim Demaille <demaille@gostai.com>
5421
5422 Add documentation to bench.pl.
5423 * etc/bench.pl.in: Comment changes.
5424
5425 2008-11-03 Akim Demaille <demaille@gostai.com>
5426
5427 Fuse the three stacks into a single one.
5428
5429 In order to make it easy to perform benchmarks to ensure that
5430 there are no performance loss, lalr1.cc is forked into
5431 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
5432 lalr1.cc.
5433
5434 Meanwhile, to make sure that lalr1-fusion.cc is correctly
5435 exercized by the test suite, the user must install a symbolic link
5436 from lalr1.cc to it.
5437
5438 Instead of having three stacks (state, value, location), use a
5439 stack of triples. This considerably simplifies the code (and it
5440 will be easier not to require locations as currently does the C++
5441 parser), and also gives a 10% speedup according to
5442 etc/bench (probably mainly since memory allocation is done once
5443 instead of three times).
5444
5445 Another motivation is to make it easier to destruct properly
5446 semantic values: now that they are bound to their state (hence
5447 symbol type) it will be easier to call the appropriate destructor.
5448
5449 These changes should probably benefit the C parser too.
5450
5451 * data/lalr1.cc: Copy as...
5452 * data/lalr1-fusion.cc: this new file.
5453 (b4_rhs_value, b4_rhs_location): New definitions overriding those
5454 from c++.m4.
5455 (state_stack_type, semantic_stack_type, location_stack_type)
5456 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
5457 (data_type, stack_type, yystack_): New.
5458 (YYLLOC_DEFAULT, yypush_): Adjust.
5459 (yyerror_range): Now based on data_type, not location_type.
5460
5461 2008-11-03 Akim Demaille <demaille@gostai.com>
5462
5463 Push the state, value, and location at the same time.
5464 This is needed to prepare a forthcoming patch that fuses the three
5465 stacks into one.
5466
5467 * data/lalr1.cc (parser::yypush_): New.
5468 (parser::yynewstate): Change the semantics: instead of arriving to
5469 this label when value and location have been pushed, but yystate
5470 is to be pushed on the state stack, now the three of them must
5471 have been pushed before. yystate still must be the new state.
5472 This allows to use yypush_ everywhere instead of individual
5473 handling of the stacks.
5474
5475 2008-11-03 Akim Demaille <demaille@gostai.com>
5476
5477 Prefer references to pointers.
5478 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
5479 definition to use references instead of pointers.
5480 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
5481 Take the value and location as references.
5482 Adjust callers.
5483
5484 2008-11-03 Akim Demaille <demaille@gostai.com>
5485
5486 stack::size instead of stack::height.
5487 * data/lalr1.cc (stack::height): Rename as...
5488 (stack::size): this.
5489 Fix the output type.
5490 Comment changes.
5491
5492 2008-11-03 Akim Demaille <demaille@gostai.com>
5493
5494 Use variants to support objects as semantic values.
5495 This patch was inspired by work by Michiel De Wilde. But he used
5496 Boost variants which (i) requires Boost on the user side, (ii) is
5497 slow, and (iii) has useless overhead (the parser knows the type of
5498 the semantic value there is no reason to duplicate this
5499 information as Boost.Variants do).
5500
5501 This implementation reserves a buffer large enough to store the
5502 largest objects. yy::variant implements this buffer. It was
5503 implemented with Quentin Hocquet.
5504
5505 * src/output.c (type_names_output): New.
5506 (output_skeleton): Invoke it.
5507 * data/c++.m4 (b4_variant_if): New.
5508 (b4_symbol_value): If needed, provide a definition for variants.
5509 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
5510 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
5511 (b4_char_sizeof, yy::variant): New.
5512 (parser::parse): If variants are requested, define
5513 parser::union_type, parser::variant, change the definition of
5514 semantic_type, construct $$ before running the user action instead
5515 of performing a default $$ = $1.
5516 * examples/variant.yy: New.
5517 Based on an example by Michiel De Wilde.
5518
5519 2008-11-03 Akim Demaille <demaille@gostai.com>
5520
5521 Parameterize the extraction of semantic values.
5522 To make future changes easier, no longer rely on ".TYPE" being the
5523 way to get a semantic value.
5524
5525 * data/c.m4 (b4_symbol_value): New.
5526 Use it.
5527 * data/c++.m4, data/yacc.c: Use it.
5528 * data/glr.c: Use b4_symbol_value.
5529 (b4_rhs_data): New.
5530 Use it.
5531
5532 2008-11-03 Akim Demaille <demaille@gostai.com>
5533
5534 Prepare easier M4 changes.
5535 * data/lalr1.cc: Use escaped [] instead of literals to prepare
5536 future changes.
5537
5538 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5539
5540 Initiate further development.
5541 * NEWS: Create an empty section for new entries.
5542 * gnulib: Update submodule to HEAD.
5543
5544 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5545
5546 * NEWS: Version 2.4.
5547
5548 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5549
5550 Prepare for next release.
5551 * NEWS: Briefly mention changes since 2.3b.
5552 * README: Say GNU m4 1.4.6, which we've been requiring in release
5553 announcements already, not 1.4.3, which breaks the build.
5554
5555 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
5556
5557 Say %language is experimental.
5558 We're thinking of extending it's effect on output file naming. See the
5559 thread at
5560 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
5561 * NEWS: Say it's experimental.
5562 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
5563 recommend it over %skeleton for now.
5564 (Bison Options): Likewise.
5565 (C++ Bison Interface): Use %skeleton not %language.
5566 (Calc++ Parser): Use %skeleton not %language.
5567 * src/getargs.c (usage): Say it's experimental.
5568
5569 2008-11-01 Di-an Jan <dianj@freeshell.org>
5570 Paolo Bonzini <bonzini@gnu.org>
5571
5572 Support all Java parser class modifiers.
5573 * data/java.m4 (b4_percent_define_get3): New.
5574 (b4_final_if, b4_strictfp_if): New.
5575 * data/lalr1.java (final, strictfp, extends, implements): Support.
5576 * doc/bison.texinfo (final, strictfp, extends, implements): Add
5577 documentation.
5578 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
5579 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
5580 (AT_CHECK_JAVA_GREP): New.
5581 (Java parser class modifiers): New test.
5582 (Java parser class extends and implements): New test.
5583
5584 Model exception propagation better with throws and lex_throws.
5585 * data/java.m4 (b4_list2): New.
5586 (throws): Change default.
5587 * data/lalr1.java (yyaction): Add throws.
5588 (parse): Add lex_throws in addition to throws.
5589 * doc/bison.texinfo (throws, lex_throws): Add documentation.
5590 * tests/java.at (Java throws specifications): New test.
5591
5592 Improve documentation for Java parsers.
5593 * doc/bison.texinfo (Java Parsers): Add subsections.
5594 Don't quote first argument of %define.
5595 (Java Bison Interface): Document output files. Move documentation
5596 of parser class and merge into Java Parser Interface. Document
5597 features that error out. Document directives with no effect.
5598 Move note about Javadoc higher.
5599 (Java Semantic Values): Explicitly mention stype.
5600 Document that generic types cannot be used.
5601 (Java Location Values): Use @deftypeivar. Document constructors.
5602 Correct return value for toString.
5603 (Java Parser Interface): List undocumented constants/fields.
5604 Move documentation of fields added by %parse-param closer to list
5605 of members. Document that token names are added as fields.
5606 Document constructors accurately. Remove error method.
5607 (Java Scanner Interface): Move note on %pure-parser to Java Bison
5608 Interface. Describe %code lexer and yylex accutately.
5609 Remove documentation that does not match the code.
5610 (Java Action Features): New.
5611 (Java Differences): Add reference. Add item on semantic values.
5612 Add note about @{ ... @}. Clarify %% epilogue placement.
5613 (Java Declarations Summary): New.
5614
5615 Fix Java skeleton.
5616 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
5617 (b4_remove_comma): Quote test argument.
5618 (b4_identification): Remove "bison" field.
5619 * tests/java.at (Java parser class and package names): New test.
5620 (Java %parse-param and %lex-param): New test.
5621 (Java stype, position_class and location_class): New test.
5622
5623 2008-10-31 Di-an Jan <dianj@freeshell.org>
5624
5625 * data/lalr1.jave: Update copyright years.
5626 (YYParser): Correct name of "generated from" file in Javadoc:
5627 use b4_file_name instead of @ofile@.
5628 (Location constructor): Correct Javadoc parameter name.
5629 (yylloc): Add missing opening m4 quote after b4_location_if.
5630 This removes a stray [ in the Javadoc of Lexer.getStartPos.
5631 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
5632 (YYParser constructor): Correct Javadoc parameter name.
5633
5634 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
5635
5636 Always put auxiliary code files in the same dir as other output files.
5637 * src/files.c (compute_file_name_parts): When the user specifies
5638 --output but not --file-prefix, extract the directory prefix from the
5639 file prefix not from the grammar file name. This affects the location
5640 of files like location.hh generated by the C++ skeleton. The includes
5641 in the other output files require this fix.
5642 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
5643 for expected output files.
5644 (Output files): Add a test for the above.
5645
5646 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
5647
5648 * gnulib: Update submodule to HEAD.
5649
5650 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5651
5652 Update copyright year.
5653 * src/files.c: Here.
5654
5655 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
5656
5657 Don't overwrite the input file.
5658 * src/files.c (output_file_name_check): Fatal error if using input file
5659 for output.
5660 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
5661 argument.
5662 (Conflicting output files): Add test.
5663
5664 2008-10-28 Akim Demaille <demaille@gostai.com>
5665
5666 Space changes.
5667 * data/lalr1.cc: Formatting changes.
5668
5669 2008-10-28 Akim Demaille <demaille@gostai.com>
5670
5671 Don't define debugging functions when !YYDEBUG.
5672 * data/lalr1.cc (debug_stream, set_debug_stream)
5673 (debug_level_type, debug_level, set_debug_level): Don't
5674 declare them when YYDEBUG is not defined.
5675 The implementation are already YYDEBUG-aware.
5676
5677 2008-10-28 Akim Demaille <demaille@gostai.com>
5678
5679 Prefer "continue" for empty loop bodies.
5680 * etc/bench.pl.in: Use "continue" instead of {}.
5681
5682 2008-10-28 Akim Demaille <demaille@gostai.com>
5683
5684 Space and comments changes.
5685 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
5686 * data/c.m4, data/lalr1.cc: Space changes.
5687
5688 2008-10-28 Akim Demaille <demaille@gostai.com>
5689
5690 Make gnulib a submodule.
5691 * gnulib: New.
5692 * .gitmodules (gnulib): New.
5693
5694 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5695
5696 Fix yyerror_range for user-defined location type in C++. Reported by
5697 Georg Sauthoff at
5698 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
5699 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
5700 * THANKS (Georg Sauthoff): Add.
5701
5702 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
5703
5704 Update several administrative files mainly to facilitate releasing.
5705 * HACKING (Administrivia): Make the git-merge-changelog notes more
5706 helpful.
5707 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
5708 (Release Procedure): Update for git and add numerous details that were
5709 previously missing.
5710 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
5711 * maint.mk (announcement): Don't list bison as a bootstrap tool so
5712 that announcements don't claim we bootstrapped with whatever bison
5713 happened to be in PATH. Add flex as a bootstrap tool.
5714 * Makefile.maint: Remove, previously replaced by maint.mk.
5715 * Makefile.cfg: Remove, and migrate settings to...
5716 * cfg.mk: ... here for the sake of `make announcement'.
5717 * bootstrap.conf (gnulib_modules): Add announce-gen.
5718 * README: Say GNU Bison instead of just Bison. Suggested by Karl
5719 Berry.
5720
5721 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
5722
5723 Small but important bugfixes for the Java skeleton.
5724 * data/lalr1.java (yyerror): Change Location to b4_location_type.
5725 (yy_symbol_print): Call toString on yyvaluep.
5726
5727 2008-08-29 Akim Demaille <demaille@gostai.com>
5728
5729 Clarify UPDATED use.
5730 * doc/bison.texinfo: It refers to the last edition of this file,
5731 not to the release date of Bison.
5732 Reported by Joel E. Denny.
5733
5734 2008-08-29 Akim Demaille <demaille@gostai.com>
5735
5736 * README: Update FAQ pointer.
5737 Reported by Joel E. Denny.
5738
5739 2008-08-27 Eric Blake <ebb9@byu.net>
5740
5741 Resync m4sugar from autoconf.
5742 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
5743 (m4_init): Adjust to latest m4.git changes.
5744 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
5745 effects.
5746 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
5747 (_m4_list_cmp): Reduce side effects.
5748
5749 2008-08-27 Akim Demaille <demaille@gostai.com>
5750
5751 Check yyerrok in calc.at.
5752 * tests/calc.at (calc.y): Use yyerrok on "( error )".
5753 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
5754 expected.
5755
5756 2008-08-27 Akim Demaille <demaille@gostai.com>
5757
5758 Support yyerrok in lalr1.cc.
5759 YYBACKUP is still to import back into lalr1.cc.
5760 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
5761
5762 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5763
5764 For maintainer-check*, don't recompile for a $(VERSION) update.
5765 * cfg.mk: New file.
5766 (_is-dist-target): Override the one in GNUmakefile.
5767 * Makefile.am (EXTRA_DIST): Add cfg.mk.
5768
5769 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
5770
5771 Update for recent change to gnulib.
5772 * src/parse-gram.y: Don't include strverscmp.h. It comes from
5773 string.h now.
5774
5775 2008-08-15 Eric Blake <ebb9@byu.net>
5776
5777 Remaining m4sugar merge from autoconf.
5778 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
5779 * data/m4sugar/foreach.m4: New file, copied from autoconf.
5780 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
5781 * src/output.c (output_skeleton): Tell m4 how to find it.
5782
5783 Partial m4sugar merge from autoconf: m4_map.
5784 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
5785 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
5786 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
5787 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
5788 for empty list.
5789 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
5790 Likewise.
5791 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
5792 declares it.
5793
5794 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
5795
5796 Keep .version and PACKAGE_VERSION in sync.
5797 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
5798 dependency, and add comments justifying this in more detail. Discussed
5799 starting at
5800 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
5801
5802 2008-08-06 Eric Blake <ebb9@byu.net>
5803
5804 Partial m4sugar merge from autoconf: m4_shiftn.
5805 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
5806 (m4_shift2, m4_shift3): New macros.
5807 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
5808 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
5809 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
5810 * data/java.m4 (b4_remove_comma): Likewise.
5811
5812 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
5813 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
5814 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
5815 (m4_init): Consolidate wrapped text into single m4_wrap.
5816 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
5817 in wrapped text.
5818
5819 2008-08-05 Eric Blake <ebb9@byu.net>
5820
5821 Partial m4sugar merge from autoconf: builtins, version.m4.
5822 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
5823 (m4_prepend): Remove, as it is unused and inherently quadratic,
5824 whereas m4_append is linear in newer m4.
5825 (m4_mkstemp): New builtin.
5826 (m4_symbols): Make rename conditional.
5827 (m4_version_prereq): Ensure fatal error if used in bison, which
5828 intentionally lacks version.m4.
5829
5830 Fix comments in m4sugar.
5831 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
5832
5833 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5834
5835 Update for recent .gitignore fix in Gnulib.
5836 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
5837 anchored .gitignore entries.
5838
5839 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
5840
5841 Set gnu or gnits strictness.
5842 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
5843 development and gnits strictness for releases. Based on Eric Blake's
5844 suggestion at
5845 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
5846
5847 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5848
5849 * NEWS: Clarify documentation of %language.
5850
5851 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
5852
5853 Support usage of git-merge-changelog.
5854 * .gitattributes: New.
5855 * HACKING: Document usage of git-merge-changelog.
5856 * bootstrap: Install git-merge-changelog entries in .git/config
5857 if appropriate.
5858
5859 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5860
5861 Remove remaining dependence on CVS Id keyword.
5862 * ChangeLog: For the sake of people still using CVS, don't use dollars
5863 when mentioning Id.
5864 * data/xslt/bison.xsl: Remove Id from header comments, where it was
5865 unusual anyway.
5866 * data/xslt/xml2dot.xsl: Likewise.
5867 * data/xslt/xml2text.xsl: Likewise.
5868 * data/xslt/xml2xhtml.xsl: Likewise.
5869 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
5870 * doc/Makefile.am (neutralize): Remove, no longer needed.
5871 (.x.1): Don't use neutralize.
5872 (edit): Don't substitute for ID.
5873 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
5874
5875 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5876
5877 Fix dependence on computed configure variables.
5878 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
5879 $(top_srcdir)/configure.ac so that changes to computed variables, such
5880 as PACKAGE_VERSION, are seen.
5881 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
5882
5883 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
5884
5885 Update copyright dates for recent changes.
5886 * Makefile.am: Here.
5887 * src/Makefile.am: Here.
5888 * src/reduce.c: Here.
5889 * tests/reduce.at: Here.
5890
5891 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
5892
5893 Use git-version-gen for version names between releases.
5894 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
5895 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
5896 * .prev-version: New.
5897 * .version.in: Remove.
5898 * ChangeLog: Remove the Id previously used for capturing the CVS
5899 revision.
5900 * GNUmakefile: Remove, now copied from Gnulib.
5901 * Makefile.am: Add code suggested by comments in
5902 build-aux/git-version-gen.
5903 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
5904 .prev-version, and .version.
5905 * NEWS (2.3b+): Rename to...
5906 (?.?): ... this because we're dropping the "+" version naming scheme,
5907 but, in general, we still can't be sure of our next release name.
5908 * bootstrap: Add a quick hack to remove from .gitignore the
5909 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
5910 entry. This should really be fixed in gnulib instead.
5911 * bootstrap.conf (gnulib_modules): Add gnumakefile.
5912 * configure.ac (AC_INIT): Set version name by invoking
5913 build-aux/git-version-gen.
5914 (AC_CONFIG_FILES): Remove .version, now generated by
5915 build-aux/git-version-gen.
5916 * maint.mk: New, copied from coreutils.
5917 * doc/.cvsignore (bison.1): Add.
5918 * doc/.gitignore (/bison.1): Add.
5919 * doc/bison.1: Remove, generated.
5920 * src/.cvsignore (revision.c): Remove.
5921 * src/.gitignore (/revision.c): Remove.
5922 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
5923 (BUILT_SOURCES): Remove revision.c.
5924 (revision.c): Remove.
5925 * src/getargs.c (version): Don't print revision after the VERSION.
5926 * src/revision.h: Remove.
5927
5928 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5929
5930 Fix untranslatable composition of sentences. Reported by Goran
5931 Uddeborg at
5932 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
5933 * THANKS (Goran Uddeborg): Add.
5934 * src/reduce.c (reduce_print): Report the number of nonterminals and
5935 rules useless in the grammar in separate sentences.
5936 * tests/reduce.at (Useless Rules): Update output.
5937 (Reduced Automaton): Likewise.
5938 (Underivable Rules): Likewise.
5939 (Empty Language): Likewise.
5940
5941 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5942
5943 Fix some .gitignore and .cvsignore problems.
5944 * bootstrap (insert_sorted_if_absent): Replace all uses with...
5945 (insert_vc_ignore): ... this new function, which prepends `/' to all
5946 .gitignore entries before passing them to insert_sorted_if_absent.
5947 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
5948 .cvsignore files are maintained even though Bison developers run
5949 bootstrap while using Git.
5950 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
5951 unneeded by Bison.
5952 (gnulib): Add.
5953 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
5954 unneeded. Reported by Eric Blake.
5955 * lib/.gitignore (/*~): Add.
5956 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
5957 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
5958 Blake.
5959 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
5960
5961 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
5962
5963 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
5964 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5965 * bootstrap.conf (gnulib_modules): Add unsetenv.
5966 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
5967 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
5968 (/setenv.m4): Add.
5969 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
5970 the first argument because it may become position-dependent, and unset
5971 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
5972 Add comments explaining these issues in more detail.
5973
5974 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
5975
5976 Add .gitignore everywhere based on .cvsignore.
5977 * .gitignore: New.
5978 * build-aux/.gitignore: New.
5979 * data/.gitignore: New.
5980 * doc/.gitignore: New.
5981 * etc/.gitignore: New.
5982 * examples/.gitignore: New.
5983 * examples/calc++/.gitignore: New.
5984 * lib/.gitignore: New.
5985 * m4/.gitignore: New.
5986 * po/.gitignore: New.
5987 * runtime-po/.gitignore: New.
5988 * src/.gitignore: New.
5989 * tests/.gitignore: New.
5990
5991 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5992
5993 * NEWS (2.3b+): New section, empty for now.
5994 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5995
5996 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5997
5998 * NEWS (2.3b): Update release date since there has been a delay in
5999 getting the announcements and tarballs out.
6000
6001 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
6002
6003 * NEWS: Version 2.3b.
6004 * configure.ac (AC_INIT): Likewise.
6005 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
6006
6007 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
6008
6009 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
6010 been doing it for years.
6011 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
6012 (Release Procedure): Add FIXME about make alpha being unmaintained.
6013
6014 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
6015
6016 * data/yacc.c: Reformat m4 a little for readability.
6017 * src/lalr.c (build_relations): Correct comment.
6018
6019 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6020
6021 DJGPP specific issue.
6022 * djgpp/config.sed: Fixes required to run configure scripts generated
6023 by autoconf 2.62.
6024
6025 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
6026
6027 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
6028 coordinator@translationproject.org.
6029
6030 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
6031
6032 * THANKS: Add Eric Blake.
6033
6034 2008-04-23 Eric Blake <ebb9@byu.net>
6035
6036 Revert prior patch, by working around autoconf regression.
6037 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
6038 ("Output file name: ("): Uncomment test.
6039 ("Output file name: )"): Likewise.
6040 Based on an idea from Noah Misch.
6041
6042 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6043
6044 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
6045 2.61. Reported by Juan Manuel Guerrero at
6046 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
6047 * tests/output.at ("Output file name: ("): Comment out test case for
6048 now.
6049 ("Output file name: )"): Likewise.
6050
6051 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6052
6053 * GNUmakefile: Update git-version-gen invocation so make dist
6054 succeeds.
6055
6056 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
6057
6058 Update to the current gnulib CVS repository, and fix trigraph handling
6059 in Bison.
6060 * bootstrap: Update gnulib CVS repository URL.
6061 (symlink_to_dir): Encapsulate the code that guarantees the destination
6062 directory exists into...
6063 (check_dst_dir): ... this new function, and...
6064 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
6065 fail when copying files into lib/uniwidth/.
6066 * src/output.c (prepare_symbols): When writing yytname muscles, where
6067 symbol names will be encoded in C-string literals, tell quotearg to
6068 escape trigraphs. This used to be the default in gnulib.
6069 * tests/regression.at (Token definitions): Because of the change in
6070 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
6071 escapes trigraphs in symbol names. Thus, yytname no longer has
6072 trigraphs unnecessarily doubly escaped. Update test case output.
6073 Extend test case to be sure Bison's own error messages will no longer
6074 have trigraphs in symbol names unnecessarily escaped once.
6075
6076 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
6077
6078 Fix make dist infinite loop reported by Juan Manuel Guerrero at
6079 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
6080 * .cvsignore: Add .version.
6081 * .version.in: New.
6082 * bootstrap.conf (gnulib_modules): Add git-version-gen.
6083 * configure.ac (AC_CONFIG_FILES): Add .version.
6084 * build-aux/.cvsignore: Add git-version-gen.
6085
6086 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
6087
6088 * NEWS (2.3a+): Mention that -g now takes an argument.
6089 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
6090 consistency. Update the -g and -x entries now that they take
6091 arguments. Use brackets to indicate optional arguments.
6092 * src/getargs.c (usage): Explain the relationship between arguments of
6093 long and short options more completely. Document --defines and -d
6094 separately since the former takes an argument but, for POSIX Yacc, the
6095 latter does not.
6096 (short_options): Let -W take an optional argument like --warnings.
6097 (getargs): Sort cases.
6098
6099 2008-02-28 Akim Demaille <demaille@gostai.com>
6100
6101 * doc/bison.texinfo: Fix a few typos.
6102
6103 2008-02-28 Akim Demaille <akim@epita.fr>
6104
6105 * doc/bison.texinfo (Bison Options): Document -W.
6106 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
6107
6108 2008-02-28 Akim Demaille <akim@epita.fr>
6109
6110 * src/getargs.c (short_options): Split and sort for readability.
6111 -g and -x take optional arguments, just like their long options.
6112 * build-aux/cross-options.pl: Use /x to make the regexp easier to
6113 understand.
6114 Fix the handling of $opt which resulted in all the argument to be
6115 considered as optional.
6116
6117 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
6118
6119 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
6120 say its interface is experimental.
6121 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6122 Java.
6123 (Bison Options): In the -L and --language entry, mention Java.
6124 (Java Bison Interface): Say the interface is experimental.
6125 * src/getargs.c (usage): Mention -L and --language.
6126
6127 * NEWS (2.3a+): Say the push parsing interface is experimental.
6128 * doc/bison.texinfo (Push Decl): Likewise.
6129 (Decl Summary): Likewise in the "%define api.push_pull" entry.
6130 (Push Parser Function): Likewise.
6131 (Pull Parser Function): Likewise.
6132 (Parser Create Function): Likewise.
6133 (Parser Delete Function): Likewise.
6134 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
6135 yypull_parse, and yypush_parse entries.
6136
6137 * NEWS (2.3a+): Mention XML support, and say the schema is
6138 experimental.
6139 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
6140 * src/getargs.c (usage): Say the XML schema is experimental.
6141
6142 * NEWS (2.3a+): Say option instead of flag.
6143
6144 2008-02-21 Wojciech Polak <polak@gnu.org>
6145
6146 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
6147 text.
6148
6149 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
6150
6151 Fix impure push parser compile error reported by Bob Rossi at
6152 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
6153 * data/yacc.c: Clean up whitespace in the output a little.
6154 (yypstate_allocated): Define for impure push parsers regardless of
6155 whether the pull interface is also requested.
6156 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
6157 check impure push parsers without the pull interface.
6158
6159 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
6160 yyerror takes arguments specified by %parse-param while yypstate_new
6161 does not.
6162 * doc/bison.texinfo (Parser Create Function): Document that
6163 yypstate_new returns 0 for multiple impure parser instances.
6164 * tests/push.at (Push Parsing: Multiple impure instances): Update
6165 expected stderr output.
6166
6167 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6168
6169 * runtime-po/POTFILES.in (push.c): Remove.
6170
6171 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6172
6173 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
6174 * data/push.c: Rename to...
6175 * data/yacc.c: ... this, overwriting it.
6176 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
6177 `%push-pull-parser' -> `%define api.push_pull "both"'.
6178 Remove old yacc.c tests, and update push.c tests to yacc.c.
6179
6180 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
6181
6182 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
6183 `"%code top" blocks' instead of `%code "top" blocks'.
6184 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
6185 Clean up whitespace in the output a little.
6186
6187 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6188
6189 Fix documentation problems reported by Tim Josling at
6190 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
6191 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
6192 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
6193 integers. Explain the effect of literal string aliases on error
6194 messages. Copy token 0 documentation from the C++ skeleton
6195 documentation.
6196
6197 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
6198
6199 Accept a token number in a %left, %right, or %nonassoc for POSIX
6200 conformance. Reported by Tim Josling at
6201 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
6202 * NEWS (2.3a+): Mention.
6203 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
6204 and code numbers are treated by precedence declarations.
6205 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
6206 of symbols.1.
6207 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
6208 of symbol.
6209 (symbol.prec): New, just like symbol but allows INT.
6210 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
6211 longer holds.
6212 * tests/regression.at (Token number in precedence declaration): New
6213 test case.
6214
6215 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6216
6217 DJGPP specific issues.
6218 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
6219 be changed. Copyright timestamp adjusted.
6220 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
6221 be changed. Copyright timestamp adjusted.
6222 * djgpp/config.site: Copyright timestamp adjusted.
6223 * djgpp/config_h.sed: Copyright timestamp adjusted.
6224 * djgpp/djunpack.bat: Copyright timestamp adjusted.
6225 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
6226 filename translation list.
6227 * djgpp/subpipe.c (init_subpipe): Check the environment variables
6228 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
6229 files shall be created. Before trying to use the temp dir where the
6230 environment variable points to check that the dir really exists. If
6231 not default to the cwd as temp dir. Copyright timestamp adjusted.
6232 * djgpp/subpipe.h: Copyright timestamp adjusted.
6233 * djgpp/testsuite.sed: Copyright timestamp adjusted.
6234
6235 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
6236
6237 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
6238
6239 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
6240
6241 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
6242 Problem reported by Claudio Saavedra in
6243 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
6244
6245 2008-01-05 Wojciech Polak <polak@gnu.org>
6246
6247 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
6248 document's title with the input grammar file name.
6249
6250 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
6251
6252 Automate regression testing of the XML/XSLT implementation. Discussed
6253 starting at
6254 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
6255 * configure.ac (XSLTPROC): New substitution.
6256 * Makefile.am (maintainer-xml-check): New phony target invoking...
6257 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
6258 invoking make maintainer-check with BISON_TEST_XML=1.
6259 * tests/atlocal.in (XSLTPROC): New.
6260 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
6261 not to report reachable memory when Bison is expected to have a
6262 non-zero exit status and (2) to compare XML/XSLT output with --graph
6263 and --report=all output for every working grammar when
6264 BISON_TEST_XML=1.
6265 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
6266 (AT_BISON_CHECK_XML): New.
6267 (AT_QUELL_VALGRIND): New.
6268 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
6269 (AT_CHECK): ... don't redefine this since this was the old way to
6270 quell Valgrind.
6271 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
6272 AT_BISON_CHECK invocations.
6273 * tests/c++.at: Likewise.
6274 * tests/calc.at: Likewise.
6275 * tests/conflicts.at: Likewise.
6276 * tests/cxx-type.at: Likewise.
6277 * tests/existing.at: Likewise.
6278 * tests/glr-regression.at: Likewise.
6279 * tests/headers.at: Likewise.
6280 * tests/input.at: Likewise.
6281 * tests/java.at: Likewise.
6282 * tests/output.at: Likewise.
6283 * tests/push.at: Likewise.
6284 * tests/reduce.at: Likewise.
6285 * tests/regression.at: Likewise.
6286 * tests/sets.at: Likewise.
6287 * tests/skeletons.at: Likewise.
6288 * tests/synclines.at: Likewise.
6289 * tests/torture.at: Likewise.
6290 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
6291 tends to hang xsltproc.
6292 (Big horizontal): Likewise.
6293
6294 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6295
6296 In XML output, remove redundant class attribute on symbol element.
6297 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
6298 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
6299 look up a symbol to determine whether it's a nonterminal or terminal.
6300 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
6301 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
6302
6303 Add prec/assoc information to XML output.
6304 * src/gram.c (grammar_rules_print_xml): For each rule that has a
6305 %prec, add a percent_prec attribute.
6306 * src/print-xml.c (print_grammar): For each terminal that has a
6307 precedence or associativity, add a prec or assoc attribute.
6308 (xml_indent): New.
6309 (xml_puts): Use xml_indent.
6310 (xml_printf): Use xml_indent.
6311 * src/print-xml.h (xml_indent): Prototype.
6312
6313 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
6314 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6315
6316 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
6317
6318 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
6319 (bison:ruleByNumber): ... this for clarity.
6320 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
6321 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
6322 (xsl:template match="reduction"): Update.
6323 (xsl:template match="item"): Update.
6324 (xsl:template match="reduction"): Update.
6325
6326 In the XML output, don't print the list of rules where symbols appear.
6327 Compute it in XSLT instead. Discussed at
6328 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
6329 * data/xslt/bison.xsl (bison:ruleByLhs): New.
6330 (bison:ruleByRhs): New.
6331 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
6332 bison:ruleByRhs.
6333 (xsl:template match="terminal/rule"): Remove.
6334 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6335 bison:ruleByRhs.
6336 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6337 Remove.
6338 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
6339 bison:ruleByRhs and mode="number-link" for rule template.
6340 (xsl:template match="terminal/rule"): Remove.
6341 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
6342 bison:ruleByRhs and mode="number-link" for rule template.
6343 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
6344 Rewrite as...
6345 (xsl:template match="rule" mode="number-link"): ... this.
6346 * src/print-xml.c (print_grammar): Don't print the list of rules.
6347
6348 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6349
6350 Don't let --report affect XML output; always print all information.
6351 Discussed at
6352 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
6353 * src/conflicts.c (log_resolution): Implement.
6354 * src/print-xml.c (print_core): Implement.
6355 (print_state): Implement.
6356 (print_xml): Implement.
6357
6358 * NEWS (2.3a+): Fix quotes.
6359 * src/parse-gram.y (prologue_declaration): For consistency with -v,
6360 don't let %verbose clear the list specified by --report.
6361
6362 2007-11-26 Akim Demaille <akim@epita.fr>
6363
6364 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
6365
6366 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
6367
6368 In the XML output, list useless and unused symbols and rules with the
6369 useful ones and add a "usefulness" attribute. Discussed starting at
6370 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
6371 * src/gram.c (grammar_rules_partial_print_xml): Remove.
6372 (grammar_rules_print_xml): Print all rules instead of just those
6373 useful in the grammar, and add a "usefulness" attribute.
6374 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
6375 * src/print-xml.c (print_rules_useless_in_parser): Remove.
6376 (print_grammar): Print all nonterminals instead of just useful ones,
6377 and add a "usefulness" attribute to nonterminals and terminals.
6378 (print_xml): Don't print a separate "reductions" or
6379 "rules-useless-in-parser" element.
6380 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
6381 (reduce_xml): Remove.
6382 (reduce_token_unused_in_grammar): New.
6383 (reduce_nonterminal_useless_in_grammar): New.
6384 * src/reduce.h (reduce_xml): Remove prototype.
6385 (reduce_token_unused_in_grammar): Add prototype.
6386 (reduce_nonterminal_useless_in_grammar): Add prototype.
6387 * data/xslt/xml2text.xsl: Update for XML changes.
6388 * data/xslt/xml2xhtml.xsl: Update for XML changes.
6389 * tests/reduce.at (Useless Terminals): Update output.
6390 (Useless Rules): Update output.
6391 (Reduced Automaton): Update output.
6392
6393 Say "Terminals unused in grammar" instead of "Unused terminals".
6394 * NEWS (2.3a+): Update.
6395 * doc/bison.texinfo (Understanding): Update example output.
6396 * src/reduce.c (reduce_output): Implement.
6397 * data/xslt/xml2text.xsl: Implement.
6398 * data/xslt/xml2xhtml.xsl: Implement.
6399
6400 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
6401
6402 Accept --report-file=FILE to override the default `.output' filename.
6403 * NEWS (2.3a+): Mention.
6404 * doc/bison.texinfo (Bison Options): Add an entry.
6405 * src/files.c (compute_output_file_names): Don't override
6406 spec_verbose_file if already set.
6407 * src/getargs.c (usage): Document --report-file.
6408 (REPORT_FILE_OPTION): New anonymous enum member.
6409 (long_options): Add entry for it.
6410 (getargs): Add case for it setting spec_verbose_file.
6411
6412 * build-aux/cross-options.pl: Don't record a short option just because
6413 there's an arg.
6414 * doc/.cvsignore: Add yacc.1.
6415
6416 2007-11-14 Akim Demaille <akim@epita.fr>
6417
6418 * doc/yacc.1.in: New.
6419 * configure.ac, doc/Makefile.am: Adjust.
6420 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
6421 config.h symbol.
6422 Use AC_SUBST for assignments too.
6423 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
6424
6425 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6426
6427 * src/gram.c: Remove comments that duplicate comments in gram.h.
6428
6429 When reporting useless rules and nonterminals, say "useless in grammar"
6430 instead of "useless", and say "useless in parser" instead of "never
6431 reduced". Discussed starting at
6432 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
6433 * NEWS (2.3a+): Mention this change.
6434 * data/xslt/xml2text.xsl: Update output text and expected input XML
6435 element names to match changes below.
6436 * data/xslt/xml2xhtml.xsl: Likewise.
6437 (xsl:template match="bison-xml-report"): Add missing entry in Table of
6438 Contents: "Rules useless in parser due to conflicts".
6439 * doc/bison.texinfo (Decl Summary): Reword a little.
6440 (Understanding): Update example output for changes below.
6441 * src/gram.c: (rule_useful_p): Rename to...
6442 (rule_useful_in_grammar_p): ... this.
6443 (rule_useless_p): Rename to...
6444 (rule_useless_in_grammar_p): ... this.
6445 (rule_never_reduced_p): Rename to...
6446 (rule_useless_in_parser_p): ... this.
6447 (grammar_rules_print): Update for renames.
6448 (grammar_rules_print_xml): Update for renames.
6449 (grammar_rules_never_reduced_report): Rename to...
6450 (grammar_rules_useless_report): ... this since it is used for either
6451 kind of useless rule.
6452 * src/gram.h: Reword comments and update function names in prototypes.
6453 * src/main.c (main): Say "rule useless in parser due to conflicts".
6454 * src/print-xml.c (print_rules_never_reduced): Rename to...
6455 (print_rules_useless_in_parser): ... this, and rename output XML
6456 element "rules-never-reduced" to "rules-useless-in-parser".
6457 (print_xml): Update for rename.
6458 * src/print.c (print_results): Say "Rules useless in parser due to
6459 conflicts".
6460 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
6461 (nonterminals_reduce): Say "nonterminal useless in grammar".
6462 (reduce_output): Say "Nonterminals useless in grammar".
6463 Say "Rules useless in grammar".
6464 (reduce_xml): Rename output XML element "useless" to
6465 "useless-in-grammar".
6466 (reduce_print): Don't report the count of grammatically useless rules
6467 as "rules never reduced" just because %yacc is specified.
6468 In the correct report of this count, say nonterminal(s) and rule(s)
6469 "useless in grammar".
6470 * tests/conflicts.at (S/R in initial): Update expected output.
6471 (Defaulted Conflicted Reduction): Likewise.
6472 (Unreachable States After Conflict Resolution): Likewise.
6473 * tests/existing.at (GNU pic Grammar): Likewise.
6474 * tests/reduce.at (Useless Nonterminals): Likewise.
6475 (Useless Rules): Likewise.
6476 (Reduced Automaton): Likewise.
6477 (Underivable Rules): Likewise.
6478 (Empty Language): Likewise.
6479
6480 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6481
6482 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
6483 here document and before the EOF so that BSD's implementation of Bourne
6484 shell doesn't parse the delimiter as part of the here document.
6485 * doc/.cvsignore: Add cross-options.texi.
6486 * src/getargs.c (usage): Add a blank line after the warning categories.
6487
6488 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
6489
6490 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
6491
6492 2007-11-05 Akim Demaille <akim@epita.fr>
6493
6494 Remove Id: from bison.1.
6495 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
6496 (perl -0777 -pi -e 's/\.PP\nId): New.
6497 (.x.1): Use it to ignore the version control revision.
6498
6499 2007-11-05 Akim Demaille <demaille@gostai.com>
6500
6501 * build-aux/Makefile.am: Ship cross-options.pl.
6502 * doc/Makefile.am: Always refer to cross-options.texi with
6503 $(srcdir).
6504 (MAINTAINERCLEANFILES): Add it.
6505
6506 2007-11-04 Akim Demaille <demaille@gostai.com>
6507
6508 Generate the long/short option cross-table.
6509 * build-aux/cross-options.pl: New.
6510 * doc/Makefile.am (cross-options.texi): New.
6511 * doc/bison.texinfo: Use it.
6512
6513 2007-11-04 Akim Demaille <demaille@gostai.com>
6514
6515 Generate bison.1 using help2man.
6516 * doc/common.x, doc/bison.x: New.
6517 * doc/Makefile.am (bison.1, .x.1): New.
6518 The code is taken from autoconf-2.61/man/Makefile.am.
6519 * configure.ac: Look for help2man.
6520
6521 2007-11-04 Akim Demaille <demaille@gostai.com>
6522
6523 Complete --help.
6524 * src/getargs.c (usage): Document -W, make it clear that -d,
6525 -g and -x have optional arguments.
6526
6527 2007-11-04 Akim Demaille <demaille@gostai.com>
6528
6529 Find sha1sum when named gsha1sum.
6530 * bootstrap (find_tool): New.
6531 ($SHA1SUM): New.
6532
6533 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6534
6535 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
6536 at
6537 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
6538 * NEWS (2.3a+): Mention.
6539 * data/bison.m4 (b4_pure_if): Don't define it here.
6540 * data/c.m4 (b4_identification): Depend on individual skeletons to
6541 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
6542 values of the %define variables api.pure or api.push_pull. Define
6543 YYPURE, YYPUSH, and YYPULL accordingly.
6544 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
6545 glr.cc has already defined b4_pure_flag.
6546 * data/push.c: Define b4_pure_if based on `%define api.pure'.
6547 Remove YYPUSH and YYPULL since they're back in b4_identification again.
6548 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
6549 * doc/bison.texinfo (Pure Decl): Update.
6550 (Push Decl): Update.
6551 (Decl Summary): Add api.pure to %define entry.
6552 In %pure-parser entry, say it's deprecated and reference %define.
6553 (Pure Calling): Update.
6554 (Error Reporting): Update.
6555 (C++ Scanner Interface): Update.
6556 (How Can I Reset the Parser): Update.
6557 (Table of Symbols): In %pure-parser entry, say it's deprecated and
6558 reference %define.
6559 * src/getargs.c (pure_parser): Remove global variable.
6560 * src/getargs.h (pure_parser): Remove extern.
6561 * src/output.c (prepare): Don't define pure_flag muscle.
6562 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
6563 wrapper around `%define api.pure'.
6564 * tests/calc.at (Simple LALR Calculator): Update.
6565 (Simple GLR Calculator): Update.
6566 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
6567 Update.
6568 (GLR: Resolve ambiguity, pure, locations): Update.
6569 (GLR: Merge conflicting parses, pure, no locations): Update.
6570 (GLR: Merge conflicting parses, pure, locations): Update.
6571 * tests/glr-regression.at (Uninitialized location when reporting
6572 ambiguity): Update
6573 * tests/input.at (Unused %define api.pure): New test case.
6574 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
6575 AT_PURE_IF and AT_PURE_AND_LOC_IF.
6576 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6577
6578 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
6579
6580 %define push_pull -> %define api.push_pull. Discussed starting at
6581 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
6582 * data/push.c: Expect the new name.
6583 * data/yacc.c: Likewise.
6584 * doc/bison.texinfo (Push Decl): Update.
6585 (Decl Summary): Update %define entry.
6586 (Push Parser Function): Update.
6587 (Pull Parser Function): Update.
6588 (Parser Create Function): Update.
6589 (Parser Delete Function): Update.
6590 * tests/calc.at (Simple LALR Calculator): Update.
6591 * tests/input.at (%define enum variables): Update.
6592 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
6593 (Push Parsing: Multiple impure instances): Update.
6594 (Push Parsing: Unsupported Skeletons): Update.
6595 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
6596 (Exploding the Stack Size with Malloc): Update.
6597
6598 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
6599 other entries some.
6600
6601 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
6602
6603 For the XML output's terminal element, rename @number to @token-number,
6604 and add @symbol-number. In the nonterminal element, rename @number to
6605 @symbol-number. Discussed starting at
6606 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
6607 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
6608 renames.
6609 (xsl:template match="nonterminal"): Likewise.
6610 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
6611 (xsl:template match="nonterminal"): Likewise.
6612 * src/print-xml.c (print_grammar): Implement.
6613
6614 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6615
6616 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
6617 2007-10-11 change, the child elements here are items not rules.
6618 (xsl:template match="item"): New.
6619 (xsl:template match="rule"): Update for new reduced itemset.
6620 (xsl:template match="point"): Remove.
6621 (xsl:template match="empty"): For consistency with --graph, don't
6622 output "/* empty */".
6623 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
6624 line-wrap, don't pass a negative value as first-line-length since this
6625 won't work with the following changes.
6626 (xsl:template name="line-wrap"): Simplify slightly.
6627 (xsl:template name="ws-search"): Eliminate recursion.
6628 * src/print_graph.c (print_core): Don't print a reduction's lookahead
6629 set next to an item whose dot is not at the end of the RHS even if it
6630 happens to be associated with the same rule.
6631
6632 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6633
6634 Add %define lr.keep_unreachable_states.
6635 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
6636 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
6637 * src/main.c (main): Implement it.
6638 * tests/conflicts.at (Unreachable States After Conflict Resolution):
6639 Extend to test it, and fix a typo.
6640
6641 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
6642
6643 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
6644 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
6645 the example .output text.
6646 * tests/regression.at (Extra lookahead sets in report): Improve wording
6647 of comments.
6648
6649 2007-10-17 Wojciech Polak <polak@gnu.org>
6650
6651 * src/print-xml.c (print_grammar): Renamed
6652 <terminal> and <nonterminal> attributes:
6653 "type" to "number" and "symbol" to "name".
6654 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
6655 Use new attribute names.
6656 (xsl:template match="nonterminal"): Likewise.
6657 * data/xslt/xml2xhtml.xsl: Likewise.
6658
6659 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
6660
6661 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
6662 (Option Cross Key): Likewise.
6663
6664 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
6665 next to an item whose dot is not at the end of the RHS even if it
6666 happens to be associated with the same rule.
6667 * src/print.c (print_core): Likewise.
6668 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
6669 (Resolved SR Conflicts): Update output.
6670 * tests/regression.at (Extra lookahead sets in report): New test case.
6671
6672 2007-10-11 Wojciech Polak <polak@gnu.org>
6673
6674 * src/print-xml.c (print_core): Remove item set
6675 redundancy.
6676 * data/xslt/bison.xsl (bison:ruleNumber): New key.
6677 Improve processing time. Suggested by Joel E. Denny.
6678 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
6679 Write xsl:param "required" attribute as comment.
6680 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
6681 (xsl:template match="rule"): Support new reduced itemset.
6682 (xsl:template match="point"): Remove.
6683 * data/xslt/xml2xhtml.xsl: Likewise.
6684
6685 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6686
6687 * src/getargs.c (version): Update copyright year.
6688
6689 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
6690
6691 Make xml2dot.xsl and --graph produce the same output.
6692 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
6693 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
6694 escaped later.
6695 (xsl:template name="output-node"): Use the new escape template instead
6696 of the string-replace template directly.
6697 (xsl:template name="output-edge"): Likewise.
6698 (xsl:template name="escape"): New, escapes backslashes and newlines in
6699 addition to quotation marks.
6700 * src/graphviz.c (start_graph, output_node, output_edge): Add
6701 whitespace to output for legibility.
6702
6703 Make xml2text.xsl and --report produce the same output, and remove the
6704 XML "conflicts" element since a conflict summary is easily extracted
6705 from the automaton.
6706 * data/xslt/bison.xsl: New.
6707 (xsl:template match="state" mode="bison:count-conflicts): New.
6708 * data/xslt/xml2text.xsl: Import bison.xsl.
6709 (xsl:template match="bison-xml-report"): Instead of styling the
6710 "conflicts" element, style the "automaton" element with mode
6711 "conflicts". Unlike the former, the latter lists S/R and R/R
6712 conflicts for a state on the same line.
6713 (xsl:template match="conflicts"): Remove.
6714 (xsl:template match="conflict"): Remove.
6715 (xsl:template match="terminal"): Line-wrap the list of rules in which
6716 the terminal is used.
6717 (xsl:template match="nonterminal"): Likewise for nonterminals.
6718 (xsl:template match="automaton" mode="conflicts"): New.
6719 (xsl:template match="state" mode="conflicts"): New.
6720 (xsl:template name="line-wrap"): New.
6721 (xsl:template name="ws-search"): New.
6722 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
6723 (xsl:template match="bison-xml-report"): Instead of styling the
6724 "conflicts" element, style the "automaton" element with mode
6725 "conflicts."
6726 (xsl:template match="conflicts"): Remove.
6727 (xsl:template match="conflict"): Remove.
6728 (xsl:template match="automaton" mode="conflicts"): New.
6729 (xsl:template match="state" mode="conflicts): New.
6730 * src/conflicts.c (conflicts_output_xml): Remove.
6731 * src/conflicts.h (conflicts_output_xml): Remove prototype.
6732 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
6733 * src/print.c (print_grammar): Consistently wrap at the 66th column so
6734 the corresponding XSLT is easier. Also, never wrap between a word and
6735 the comma that follows it.
6736
6737 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6738
6739 Improve C++ namespace support. Discussed starting at
6740 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
6741 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
6742 b4_namespace_close): New macros that interpret the %define variable
6743 "namespace" so its value can contain "::" to indicate nested
6744 namespaces.
6745 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
6746 the above macros.
6747 * data/lalr1.cc (b4_namespace): Likewise.
6748 * data/location.cc (b4_namespace): Likewise.
6749 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
6750 inside a new table in the general %define entry. Document `%define
6751 namespace' there as well. Point the %name-prefix entry to it since it
6752 explains it more completely in the case of C++.
6753 (C++ Bison Interface): Mention `%define namespace' instead of
6754 %name-prefix.
6755 (Table of Symbols): Remove the `%define push_pull' entry. The %define
6756 entry suffices.
6757 * tests/c++.at (Relative namespace references): New test case.
6758 (Absolute namespace references): New test case.
6759 (Syntactically invalid namespace references): New test case.
6760 * tests/input.at (C++ namespace reference errors): New test case.
6761
6762 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
6763
6764 Add syncline support and location accessor to internal %define
6765 interfaces.
6766 * data/bison.m4 (b4_percent_define_get_loc): New.
6767 (b4_percent_define_get_syncline): New.
6768 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
6769 (b4_percent_define_default): Record defining location as line 1 rather
6770 than 0 for the sake of synchronizing #line's, and define
6771 b4_percent_define_syncline(VARIABLE).
6772 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
6773 * src/muscle_tab.c (muscle_syncline_grow): New.
6774 (muscle_code_grow): Use muscle_syncline_grow.
6775 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
6776 define b4_percent_define_syncline(VARIABLE).
6777 (muscle_percent_define_get_loc): New.
6778 (muscle_percent_define_get_syncline): New.
6779 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
6780 remove some unused variables.
6781 (muscle_percent_define_default): Record defining location as line 1
6782 rather than 0 for the sake of synchronizing #line's, and define
6783 b4_percent_define_syncline(VARIABLE).
6784 (muscle_percent_define_check_values): Use
6785 muscle_percent_define_get_loc.
6786 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
6787 (muscle_percent_define_get_syncline): Prototype.
6788 * tests/skeletons.at (%define Boolean variables: invalid skeleton
6789 defaults): Update output for location change.
6790 (Complaining during macro argument expansion): Extend to test
6791 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
6792
6793 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
6794
6795 Fix some error-reporting macro bugs.
6796 * data/bison.m4 (b4_cat): New.
6797 (b4_error, b4_error_at): Use b4_cat to send error directives directly
6798 to stdout so they don't become arguments to other macros. Update
6799 comments and add examples.
6800 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
6801 add examples.
6802 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
6803 after printing the error directive so that M4 doesn't report subsequent
6804 problems that are induced by this problem.
6805 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
6806 instead of just in them. Recognize @\n in both places. Both expand to
6807 the empty string. Needed by b4_cat.
6808 * tests/skeletons.at (Complaining during macro argument expansion):
6809 New test case.
6810 (Fatal errors make M4 exit immediately): New test case.
6811
6812 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
6813
6814 Implement --print-datadir.
6815 * src/getargs.c (usage): Mention.
6816 (PRINT_DATADIR_OPTION): New anonymous enum member.
6817 (long_options): Add entry for it.
6818 (getargs): Add case for it calling compute_pkgdatadir.
6819 * src/output.c (output_skeleton): Encapsulate data directory
6820 computation from here...
6821 (prepare): ... and from here...
6822 (compute_pkgdatadir): ... into this new function.
6823 * src/output.h (compute_pkgdatadir): Prototype.
6824
6825 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
6826
6827 * src/print-xml.c (escape_bufs): New static global variable
6828 replacing...
6829 (xml_escape_n): ... the static local variable buf here.
6830 (print_xml): Free memory for escape_bufs.
6831 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
6832
6833 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
6834
6835 Replace `%push-parser' and `%push-pull-parser' with
6836 `%define push_pull "push"' and `%define push_pull "both"'.
6837 `%define push_pull "pull"' is the default.
6838 * doc/bison.texinfo (Push Decl, Push Parser Function,
6839 Pull Parser Function, Parser Create Function, Parser Delete Function):
6840 Update declarations.
6841 (Decl Summary, Table of Symbols): Replace %push-parser and
6842 %push-pull-parser entries with a %define push_pull entry.
6843 * data/bison.m4 (b4_percent_define_check_values): New macro.
6844 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
6845 definitions...
6846 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
6847 definitions...
6848 * data/push.c: ... to here and compute them from the value of the
6849 %define variable push_pull.
6850 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
6851 parsing requests here...
6852 * data/yacc.c: ... hack this to switch to push.c any time
6853 b4_use_push_pull_flag or the %define variable push_pull is set. This
6854 will go away when we mv push.c yacc.c.
6855 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
6856 push parsing is not supported since unused %define variables are
6857 reported anyway.
6858 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
6859 * src/muscle_tab.h (muscle_percent_define_check_values): Update
6860 comments for consistency with b4_percent_define_check_values.
6861 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
6862 muscles.
6863 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
6864 Remove.
6865 (prologue_declaration): Remove %push-parser and %push-pull-parser
6866 rules.
6867 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
6868 * tests/calc.at: Update declarations.
6869 * tests/input.at (%define enum variables): New test case.
6870 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
6871 declaration.
6872 (Push Parsing: Multiple impure instances): Update declaration.
6873 (Push Parsing: Unsupported Skeletons): New test case.
6874 * tests/torture.at (Exploding the Stack Size with Alloca): Update
6875 declaration.
6876 (Exploding the Stack Size with Malloc): Update declaration.
6877
6878 2007-09-24 Wojciech Polak <polak@gnu.org>
6879
6880 Add XSLT transformations.
6881
6882 * data/xslt/xml2dot.xsl: Transform XML into DOT.
6883 * data/xslt/xml2text.xsl: Transform XML into plain text.
6884 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
6885 * data/Makefile.am (xsltdir): New variable.
6886 (dist_xslt_DATA): Add xslt/*.xsl files.
6887
6888 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
6889
6890 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
6891 Problem reported by Wojciech Polak.
6892 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
6893 (xml_printf): Undo change I made on 21 September; that is,
6894 indent 2 spaces, not 1.
6895
6896 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
6897
6898 Pacify ./configure --enable-gcc-warnings.
6899 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
6900 `char const *' instead of `char *'.
6901 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
6902 local variable `sep'.
6903
6904 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6905
6906 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
6907 elsewhere.
6908 * src/print-xml.c: Prefer "const" after types; that's more consistent.
6909 (xml_printf): Indent just 1 space for level.
6910 (e_char, xlate_char): Remove.
6911 (xml_escape_string): Rewrite to avoid undefined behavior (used
6912 storage that was freed from the stack).
6913 (xml_escape_n): Don't bother checking for subscript error.
6914
6915 2007-09-21 Wojciech Polak <polak@gnu.org>
6916
6917 Add Bison XML Automaton Report.
6918
6919 Add support for an -x option to generate an XML report.
6920 It is not documented yet.
6921 * src/print-xml.c: New file.
6922 * src/print-xml.h: Likewise.
6923 * lib/timevar.def (TV_XML): New var.
6924 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
6925 * src/conflicts.c: Include print-xml.h.
6926 (solved_conflicts_xml_obstack): New var.
6927 (log_resolution, conflicts_solve, conflicts_free):
6928 Add support for XML report.
6929 (conflicts_output_val): New function.
6930 * src/conflicts.h (conflicts_output_val): New decl.
6931 * src/files.c (spec_xml_file): New var.
6932 (compute_output_file_names, output_file_names_free): Add XML support.
6933 * src/files.h (spec_xml_file): New decl.
6934 * src/getargs.c (xml_flag): New var.
6935 (usage, short_options, long_options, getargs): Add XML support.
6936 * src/getargs.h (xml_flag): New decl.
6937 * src/gram.c: Include print-xml.h.
6938 (rule_lhs_print_xml, rule_rhs_print_xml):
6939 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
6940 New functions.
6941 * src/gram.h: Declare external ones.
6942 * src/main.c: Include print-xml.h.
6943 (main): Add XML support.
6944 * src/reduce.c: Include print-xml.h.
6945 (reduce_xml): New function.
6946 * src/reduce.h: Declare it.
6947 * src/state.c: Include print-xml.h.
6948 (state_new): Add XML support.
6949 (state_rule_lookahead_tokens_print_xml): New function.
6950 * src/state.h: Declare it.
6951 (struct state): New member solved_conflicts_xml.
6952 * src/symtab.c (symbol_class_get_string): New function.
6953 * src/symtab.h: Declare it.
6954
6955 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
6956
6957 * GNUmakefile: Switch to coreutils's version.
6958 * bootstrap: Likewise.
6959 * Makefile.cfg: Adjust to new GNUmakefile.
6960 * README-hacking: Likewise.
6961
6962 Import from gnulib:
6963
6964 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
6965 Bruno Haible <bruno@clisp.org>
6966
6967 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6968 and is a script that invokes bison. Tighten the code. Add comments.
6969
6970 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
6971
6972 Spell "boolean" as "Boolean". Reported by Akim Demaille.
6973 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
6974 * doc/bison.texinfo (Decl Summary): Fix.
6975 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
6976 * tests/input.at (Boolean %define variables): Update output.
6977 * tests/skeletons.at (%define boolean variables: invalid skeleton
6978 defaults): Rename to...
6979 (%define Boolean variables: invalid skeleton defaults): ... this and
6980 update output.
6981
6982 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
6983
6984 In impure push mode, don't allow more than one yypstate to be allocated
6985 since multiple impure parsers would corrupt yynerrs.
6986 * data/push.c (yypstate_allocated): New static global variable
6987 initialized to 0.
6988 (yypull_parse): If yypstate_new returns 0, don't report it as memory
6989 exhaustion if yypstate_allocated is 1, but still return 2.
6990 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
6991 already 1. Otherwise, set it to 1.
6992 (yypstate_delete): Set it to 0.
6993 * tests/push.at (Push Parsing: Multiple impure instances): New test
6994 case.
6995
6996 2007-08-17 Bob Rossi <bob@brasko.net>
6997
6998 * doc/bison.texinfo (Push Decl): Document the push parser.
6999 (Table of Symbols): Ditto.
7000 (Pure Decl): Ditto.
7001 (Decl Summary): Ditto.
7002 (Multiple Parsers, Push Parser Function, Pull Parser Function,
7003 Parser Create Function, Parser Delete Function):
7004 Add new push parser symbols.
7005 (Table of Symbols): Document push-parser, push-pull-parser,
7006 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
7007
7008 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
7009
7010 Update to GPLv3.
7011 * doc/gpl-3.0.texi: New file.
7012 * doc/gpl.texi: Remove.
7013 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
7014 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
7015 * README-hacking, TODO, bootstrap, bootstrap.conf:
7016 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
7017 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
7018 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
7019 * data/lalr1.cc, data/lalr1.java, data/location.cc:
7020 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
7021 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
7022 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
7023 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
7024 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
7025 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
7026 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
7027 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
7028 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
7029 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
7030 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
7031 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
7032 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
7033 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
7034 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
7035 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
7036 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
7037 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
7038 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
7039 * src/complain.c, src/complain.h, src/conflicts.c:
7040 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
7041 * src/files.h, src/flex-scanner.h, src/getargs.c:
7042 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
7043 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
7044 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
7045 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
7046 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
7047 * src/print.c, src/print.h, src/print_graph.c:
7048 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
7049 * src/reduce.h, src/relation.c, src/relation.h:
7050 * src/revision.h, src/scan-code.h, src/scan-code.l:
7051 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
7052 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
7053 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
7054 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
7055 * tests/Makefile.am, tests/actions.at, tests/c++.at:
7056 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
7057 * tests/existing.at, tests/glr-regression.at:
7058 * tests/headers.at, tests/input.at, tests/java.at:
7059 * tests/local.at, tests/output.at, tests/push.at:
7060 * tests/reduce.at, tests/regression.at, tests/sets.at:
7061 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
7062 * tests/torture.at:
7063 Update to GPLv3.
7064
7065 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7066
7067 Get rid of broken %no-parser, -n, and --no-parser implementation and
7068 documentation.
7069 * TODO: Don't mention them.
7070 * doc/bison.1: Likewise.
7071 * doc/bison.texinfo (Decl Summary): Likewise.
7072 (Bison Options): Likewise.
7073 (Option Cross Key): Likewise.
7074 * src/getargs.c (no_parser_flag): Remove global variable.
7075 (usage): Don't print description of -n and --no-parser.
7076 (long_options): Remove --no-parser entry here.
7077 (getargs): Remove -n case in the switch here.
7078 * src/getargs.h (no_parser_flag): Remove extern.
7079 * tests/regression.at (Web2c Actions): Remove comment that mentions
7080 --no-parser.
7081
7082 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
7083
7084 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
7085 name user variables starting with `yy'. Just pass NULL instead of a
7086 dummy local &yylval to yypush_parse.
7087 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
7088 starting with `yy'.
7089
7090 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
7091
7092 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
7093 true since it's then always used regardless of whether yyoverflow is
7094 defined. Reported by Christian Burger at
7095 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
7096 * THANKS: Add Christian Burger.
7097
7098 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7099 node names: say "Decl Summary" not "Bison Declaration Summary".
7100
7101 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
7102
7103 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
7104 determine whether this function has already complained about an invalid
7105 value for a %define boolean variable, don't check whether Bison has
7106 ever examined the value. As written, the check was a tautology.
7107 Instead, record and check for this complaint using a separate muscle.
7108
7109 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
7110
7111 Fix push parsing memory leak reported by Brandon Lucia at
7112 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
7113 * THANKS: Add Brandon Lucia.
7114 * data/push.c (yypstate_delete): Free the stack if it was reallocated
7115 but the parse never completed and thus freed it.
7116 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
7117 * tests/testsuite.at: Include push.at.
7118 * test/push.at: New.
7119 (Push Parsing: Memory Leak for Early Deletion): New test case.
7120
7121 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
7122
7123 Improve handling of multiple S/R conflicts in the same state and of S/R
7124 conflicts involving multiple reductions.
7125 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
7126 set for a state here or Bison will abort if it is reassigned on a
7127 later conflicted reduction in the same state.
7128 Similarly, don't finalize and assign the solved conflicts report here
7129 or it will be lost if it is reassigned on a later conflicted reduction
7130 in the same state.
7131 (set_conflicts): Instead, assign them both here after all S/R conflicts
7132 in the state have been fully examined.
7133 * src/print.c (shift_set): Rename to...
7134 (no_reduce_set): ... this.
7135 (print_reductions): Update for rename, and add %nonassoc error action
7136 tokens to no_reduce_set so that, when printing the first remaining
7137 reduction on an error action token, the reduction is enclosed in
7138 brackets.
7139 (print_results): Update for rename.
7140 * tests/conflicts.at (Solved conflicts report for multiple reductions
7141 in a state): New test case.
7142 (%nonassoc error actions for multiple reductions in a state): New test
7143 case.
7144
7145 * src/main.c (main): Don't depend on C99 features.
7146
7147 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
7148
7149 * build-aux/.cvsignore: Add compile.
7150 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
7151 uniwidth.
7152
7153 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
7154
7155 * bootstrap (slurp): Create target directories that don't exist.
7156 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
7157
7158 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7159
7160 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
7161 than item number.
7162 * closure.c (closure): Likewise.
7163 * state.h (reductions): Comment sorting of rules.
7164 (state): Comment sorting of items.
7165
7166 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
7167
7168 Fix C++ test cases after recent Gnulib changes. Discussed starting at
7169 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
7170 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
7171 definition in order to avoid Gnulib headers since we don't use config.h
7172 here.
7173 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
7174 rather than AT_DATA so that config.h is included.
7175
7176 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
7177
7178 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
7179 instead of fprintf. Guard these functions with #if YYDEBUG instead of
7180 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
7181 and so that YYFPRINTF is guaranteed to be defined here.
7182
7183 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7184
7185 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
7186 with...
7187 (muscle_percent_define_check_values): ... this more helpful function.
7188 Again, it's not used yet, but it will be.
7189 * src/muscle_tab.h: Likewise.
7190
7191 Improve some comments in parser table construction.
7192 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
7193 (generate_states): Don't mention ruleset, which is internal to closure.
7194 * src/closure.c (closure): Explain sorting of core and itemset, which
7195 is required for this function to behave correctly.
7196 * src/closure.h (closure): Mention sorting.
7197
7198 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
7199
7200 * src/lalr.c (state_lookahead_tokens_count): For code readability,
7201 move the check for disabled transitions to an aver since conflict
7202 resolution hasn't happened yet.
7203
7204 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
7205 labels a state as inconsistent just because it has error transitions.
7206 The original form of this check appeared in revision 1.1 of lalr.c,
7207 which was committed on 1991-12-21. Now (at least), changing the
7208 consistency label on such a state appears to have no useful effect in
7209 any of the places it is examined, which I enumerate below. The key
7210 point to understanding each item in this enumeration is that a state
7211 with an error transition is labelled consistent in the first place only
7212 if it has no rules, so the check cannot matter for states that have
7213 rules. (1) Labelling a state as inconsistent will cause set_conflicts
7214 to try to identify its conflicts, and a state must have *rules* to have
7215 conflicts. (2) Labelling a state as inconsistent will affect how
7216 action_row sets the default *rule* for the state. (3) Labelling a
7217 state as inconsistent will cause build_relations to add lookback edges
7218 to *rules* in that state.
7219 * src/state.h (struct state): Word the comment for member consistent
7220 more carefully.
7221
7222 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
7223
7224 Don't depend on C99 features.
7225 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
7226 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
7227 * src/reader.c (check_and_convert_grammar): Fix for-loop.
7228 * src/state.c (state_mark_reachable_states): Fix for-loop.
7229 (state_remove_unreachable_states): Fix for-loop.
7230
7231 Don't widen struct state with member reachable just to temporarily
7232 record reachability. Instead, use a local bitset.
7233 * src/state.h (struct state): Remove member.
7234 * src/state.c (state_new): Don't initialize it.
7235 (state_mark_reachable_states): Rename to...
7236 (state_record_reachable_states): ... this, and use bitset.
7237 (state_remove_unreachable_states): Use bitset.
7238
7239 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
7240
7241 * src/Makefile.am (yacc): Quote target action commands properly so
7242 that the yacc script isn't corrupt. Reported by Hans Aberg at
7243 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
7244
7245 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
7246 the case of pure parsers. Reported by Frans Englich at
7247 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
7248 * THANKS: Add Frans Englich.
7249
7250 * NEWS (2.3a+): In the %code entry, reference section `Bison
7251 Declaration Summary' from the manual now since the %code summary has
7252 moved there.
7253 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
7254 in the rules section must be terminated by semicolons.
7255
7256 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
7257
7258 Extend the front-end API for %define variables to more completely
7259 mirror the back-end. This will be useful in the future.
7260 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
7261 Update comments to mention the new front-end counterparts of these
7262 macros.
7263 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
7264 for muscle_string_decode and muscle_location_decode.
7265 (muscle_string_decode): New static function.
7266 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
7267 (muscle_percent_define_get, muscle_percent_define_ifdef): New
7268 functions.
7269 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
7270 muscle_percent_define_get to mimic the b4_percent_define_flag_if
7271 implementation more closely.
7272 (muscle_percent_define_invalid_value): New function.
7273 * src/muscle_tab.h (muscle_percent_define_get,
7274 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
7275 Prototype.
7276
7277 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
7278
7279 * NEWS (2.3a+): Mention yesterday's state-removal change.
7280 (2.3a): Remove the %language entry, which was added after 2.3a.
7281 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
7282 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
7283 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
7284 tests/existing.at: Update copyright date.
7285
7286 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7287
7288 If conflict resolution makes states unreachable, remove those states,
7289 report rules that are then unused, and don't report conflicts in those
7290 states.
7291 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
7292 New global function.
7293 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
7294 function.
7295 * src/main.c (main): After conflict resolution, remove the unreachable
7296 states and update all data structures that reference states by number.
7297 * src/state.c (state_new): Initialize each state's reachable member to
7298 false.
7299 (state_mark_reachable_states): New static function.
7300 (state_remove_unreachable_states): New global function.
7301 * src/state.h (struct state): Add member bool reachable.
7302 (state_remove_unreachable_states): Prototype.
7303 * tests/conflicts.at (Unreachable States After Conflict Resolution):
7304 New test case.
7305 * tests/existing.at (GNU pic Grammar): Update test case output now that
7306 an unused rule is discovered.
7307
7308 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
7309
7310 Minor code cleanup in parser table construction.
7311 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
7312 (new_itemsets, save_reductions): Update for rename to nitemset.
7313 * src/closure.c (nritemset): Rename to...
7314 (nitemset): ... this since the "r" appears to meaningless and isn't
7315 used in the comments.
7316 (closure): Update for rename.
7317 * src/closure.h (nritemset): Update extern to...
7318 (nitemset): ... this.
7319 * src/lalr.c (LA): Fix a typo in comments.
7320 * src/print.c (print_core): Update for rename to nitemset.
7321 * src/print_graph.c (print_graph): Likewise.
7322 * src/state.h: Fix some typos in header comments.
7323
7324 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
7325
7326 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
7327 still sticks to ASCII. Sorry!
7328
7329 * README-hacking: New file, taken mostly from coreutils, with changes
7330 for Bison. Contains much of the contents of:
7331 * README-cvs: Remove.
7332 * bootstrap: Sync from gnulib.
7333 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
7334 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
7335
7336 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
7337
7338 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
7339 Setzer.
7340 (Java Differences): Fix some typos.
7341 * THANKS: Add Sebastian Setzer.
7342
7343 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
7344
7345 * data/java.m4 (b4_single_class_if): Remove.
7346 (b4_abstract_if): Look at "%define abstract".
7347 (b4_lexer_if): New.
7348 (b4_union_name): Rename...
7349 (b4_yystype): ... to this. Map to "%define stype".
7350 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
7351 b4_maybe_throws): Fix quoting.
7352 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
7353 * data/lalr1.java (Lexer interface): Always define.
7354 (Lexer interface within parser class): Remove.
7355 (YYLexer class): New, used when "%code lexer" is present.
7356 (constructor): When "%code lexer" is used, pass %lex-param
7357 to the lexer constructor.
7358 (yylex, yyparse): Remove %lex-param from method invocations
7359 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
7360
7361 * doc/bison.texinfo (Java Bison Interface): Mention "%define
7362 abstract". Rename "%define union_name" to "%define stype".
7363 Rename method names according to previous patch.
7364 (Java Scanner Interface): Describe "%code lexer" instead of
7365 "%pure-parser" and "%define single_class".
7366 (Java Differences): Mention "%code lexer".
7367
7368 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
7369 Include scanner here, using macros from tests/local.at.
7370 (AT_DATA_CALC_Y): Remove final argument.
7371 (_AT_CHECK_JAVA_CALC): Likewise.
7372 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
7373 of %locations and %error-verbose.
7374 (main): Test with and without %lex-param.
7375 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
7376 (AT_BISON_OPTION_POPDEFS): Pop it.
7377
7378 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7379
7380 DJGPP spefic issue. Inhibit the use of disallowed characters for
7381 file name genertion on Win98, WinXP, etc. These are |<>":?*\
7382 and concern testsuite case 46.
7383 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
7384 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
7385 * djgpp/config.bat: Inhibit the use of disallowed characters.
7386
7387 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7388
7389 Miscellaneous %define and %code cleanup.
7390 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
7391 values are interpreted.
7392 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
7393 documentation a little more.
7394 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
7395 muscle_percent_define_insert, muscle_percent_code_grow): New
7396 functions/macros.
7397 * src/muscle_tab.h (muscle_percent_define_insert,
7398 muscle_percent_code_grow): Prototype.
7399 * src/parse-gram.y (prologue_declaration): Use
7400 muscle_percent_define_insert and muscle_percent_code_grow when parsing
7401 %define and %code directives.
7402
7403 Make it easy to share %define boolean variables between the front-end
7404 and back-end. Though not used yet, this will be useful in the future.
7405 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
7406 Bison uses of names rather than just skeleton uses of names.
7407 (b4_percent_define_get, b4_percent_define_ifdef): Rename
7408 b4_percent_define_skeleton_variables(VARIABLE) to
7409 b4_percent_define_bison_variables(VARIABLE).
7410 (b4_percent_code_get, b4_percent_code_ifdef): Rename
7411 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
7412 b4_percent_code_bison_qualifiers(QUALIFIER).
7413 (b4_check_user_names_wrap): Update for renames.
7414 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
7415 muscle_percent_define_default): New functions mimicking
7416 b4_percent_define_flag_if and b4_percent_define_default.
7417
7418 For %define variables, report locations for invalid values and
7419 redefinitions.
7420 * data/bison.m4 (b4_percent_define_flag_if): Read
7421 b4_percent_define_loc(VARIABLE) to report the location of an invalid
7422 value for VARIABLE.
7423 (b4_percent_define_default): Save a special location in
7424 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
7425 must later be reported as invalid.
7426 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
7427 functions.
7428 (muscle_percent_define_insert): Record the location of VARIABLE in
7429 muscle percent_define_loc(VARIABLE), and use it to report the previous
7430 location for a redefinition.
7431 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
7432 (muscle_percent_define_default): Update like b4_percent_define_default.
7433 (muscle_grow_user_name_list): Rename to...
7434 (muscle_user_name_list_grow): ... this for consistency and use
7435 muscle_location_grow.
7436 * src/muscle_tab.h (muscle_location_grow): Prototype.
7437 * tests/input.at (%define errors): Update expected output.
7438 * tests/skeletons.at (%define boolean variables: invalid skeleton
7439 defaults): New test case.
7440
7441 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
7442
7443 * src/print.c (lookahead_set, state_default_rule): Remove.
7444 (print_reductions): Replace state_default_rule invocation with
7445 equivalent use of yydefact, which was computed in token_actions in
7446 tables.c.
7447 (print_results): Don't allocate lookahead_set.
7448
7449 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
7450
7451 * data/lalr1.java: Prefix all private members with yy.
7452
7453 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
7454
7455 Use YYFPRINTF instead of fprintf where appropriate. Reported by
7456 Sebastien Fricker at
7457 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
7458 * THANKS: Add Sebastien Fricker.
7459 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
7460 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
7461 accept a variable number of arguments.
7462
7463 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
7464
7465 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
7466
7467 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7468
7469 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
7470 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
7471 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
7472
7473 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
7474
7475 Undo my 2007-02-07 change, switching back to the c-strcase module
7476 introduced in the 2007-02-03 change. Bruno Haible reported that
7477 the 2007-02-07 change would be dangerous in Turkish if we add a
7478 language whose name contains "i", since "i" is not lowercase "I"
7479 in Turkish.
7480 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
7481 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
7482 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
7483 * m4/.cvsignore: Remove strcase.m4.
7484 * src/getargs.c: Revert 2007-02-07 change, as follows.
7485 Include c-strcase.h.
7486 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
7487
7488 2007-02-11 Bruno Haible <bruno@clisp.org>
7489
7490 Enable the Java related testsuite tests when the only Java compiler
7491 found is a gcj < 4.3. Discussed at
7492 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
7493 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
7494
7495 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
7496
7497 * data/Makefile.am: Update copyright date.
7498 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
7499 yypstate_new returns NULL.
7500 (yypstate_new): Return NULL if malloc does.
7501 * src/reader.c (packgram): Move translation of rule actions from the
7502 beginning of packgram to...
7503 (check_and_convert_grammar): ... here right before packgram is invoked
7504 so it's easier to write more complete comments, and remove redundant
7505 code.
7506
7507 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
7508
7509 As in semantic actions, make @$ in %initial-action, %destructor, and
7510 %printer imply %locations.
7511 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
7512 scanning @$.
7513 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
7514 (@$ in %initial-action implies %locations,
7515 @$ in %destructor implies %locations,
7516 @$ in %printer implies %locations): ... these new test cases.
7517
7518 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
7519
7520 Undo most of the 2007-02-03 change, switching to the strcase module
7521 now that gnulib strcase has been fixed.
7522 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
7523 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
7524 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
7525 * m4/.cvsignore: Add strcase.m4.
7526 * src/getargs.c: Revert 2007-02-03 change, as follows.
7527 Don't include c-strcase.h.
7528 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
7529 strcasecmp has "unspecified behavior" outside the POSIX locale,
7530 but it works fine in practice if at least one argument is ASCII,
7531 as is the case in Bison.
7532
7533 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
7534
7535 * tests/java.at: Skip tests if only one of javac/java is present.
7536 Reported by Joel E. Denny.
7537 * tests/atlocal.in: Adjust copyright years.
7538
7539 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
7540
7541 * data/lalr1.java (Stack): Work around old verifiers that disallow
7542 access to the private fields of an inner class, from the outer class.
7543 We can make Stack's fields public because user code doesn't have access
7544 to the instance of Stack used by parse(). Reported by Paul Eggert.
7545
7546 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
7547
7548 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
7549 the right spot for these files?
7550 * bootstrap.conf (gnulib_modules): Add c-strcase.
7551 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
7552 c-strncasecmp.c.
7553 * src/getargs.c: Include c-strcase.h.
7554 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
7555 to avoid unspecified behavior.
7556
7557 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
7558
7559 * doc/bison.texinfo (Decl Summary): Correct typo.
7560
7561 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
7562
7563 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
7564 Complain if the value does not match empty, "true" or "false".
7565 * data/c++.m4: Adjust default definitions of %define variables.
7566 * data/java.m4: Adjust default definitions of %define variables.
7567 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
7568 to above behavior.
7569 * tests/input.at (Boolean %define variables): Test new behavior.
7570
7571 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
7572
7573 * NEWS: Mention java.
7574 * TODO: Remove things that are done.
7575 * bootstrap.conf: Add javacomp-script and javaexec-script.
7576 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
7577
7578 * data/Makefile.am: Add new files.
7579 * data/java-skel.m4: New.
7580 * data/java.m4: New.
7581 * data/lalr1.java: New.
7582
7583 * doc/bison.texinfo: Put "A Complete C++ Example" under
7584 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
7585 under Other Languages.
7586
7587 * src/getargs.c (valid_languages): Add Java.
7588 * src/getargs.h (struct bison_language): Update size of string fields.
7589
7590 * tests/Makefile.am: Add java.at.
7591 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
7592 * tests/java.at: New.
7593 * tests/testsuite.at: Include it.
7594
7595 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
7596
7597 Clean up.
7598 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
7599 at_directive_argv arguments so these no longer have to be global
7600 variables. Also, update the implementation for the following changes.
7601 (fail_for_at_directive_too_many_args,
7602 fail_for_at_directive_too_few_args): Add at_directive_name argument.
7603 (at_directive_name): Remove as at_directive_argv[0] will be used for
7604 this now.
7605 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
7606 for the directive name.
7607 (at_directive_argc, at_directive_argv): Make these local within
7608 skel_lex instead of global.
7609 (INITIAL): Update directive start action for above changes.
7610 (SC_AT_DIRECTIVE_ARG): Rename to...
7611 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
7612 (SC_AT_DIRECTIVE_SKIP_WS): Update.
7613 (scan_skel): Move yylex_destroy to...
7614 (skel_scanner_free): ... here.
7615 * tests/skeletons.at (installed skeleton file name): Rename to...
7616 (installed skeleton file names): ... this.
7617
7618 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
7619
7620 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
7621 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
7622 Summary" not "Directives".
7623 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
7624 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
7625 since the former is now the more complete one.
7626 (Prologue Alternatives): Likewise and do the same for %defines.
7627 (Table of Symbols): Add summary of %code, add summary of %define, and
7628 move full %code documentation to...
7629 (Decl Summary): ... here for consistency with other entries in these
7630 sections.
7631 Move %define entry in order to keep this list alphabetized.
7632 Reword %define entry a little to put less emphasis on the skeleton
7633 concept, which most users shouldn't have to think about.
7634
7635 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
7636
7637 Adjust to recent gnulib changes.
7638 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
7639 Add string.h, string_.h, unistd_.h, wchar_.h.
7640 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
7641 * src/system.h: Don't include <stpcpy.h>; this is now done by
7642 <string.h>.
7643
7644 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
7645
7646 Simplify implementation of unqualified %code, implement macros for
7647 uniform treatment of boolean %define flags. Document %define.
7648 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
7649 b4_percent_code_ifdef): New.
7650 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
7651 * data/c++.m4: Define default value for global_tokens_and_yystype.
7652 * data/glr.cc: Likewise.
7653 * data/location.cc: Use b4_percent_define_flag_if.
7654
7655 * doc/bison.texinfo (Decl Summary): Document %define.
7656
7657 * src/parse-gram.y (Unqualified %code): Change muscle name to
7658 b4_percent_code().
7659 (content.opt): Default to empty.
7660
7661 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7662
7663 Implement support for relative and absolute skeleton file names.
7664 Discussed starting at
7665 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
7666 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
7667 (Bison Options): Document in --skeleton entry.
7668 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
7669 full_skeleton can't necessarily hold all of pkgdatadir.
7670 If the specified skeleton file name contains a `/', don't prepend
7671 pkgdatadir.
7672 * src/parse-gram.y (prologue_declaration): If the specified skeleton
7673 file name contains a `/', prepend the grammar file directory.
7674 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
7675 * skeletons.at: New file.
7676 (relative skeleton file names): New test case.
7677 (installed skeleton file names): New test case.
7678 * tests/testsuite.at: Include skeletons.at.
7679
7680 * bootstrap: Update copyright to 2007.
7681
7682 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
7683
7684 * bootstrap: Remove occurrences of .#bootmp from the files.
7685
7686 2007-01-17 Akim Demaille <akim@epita.fr>
7687
7688 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
7689 nonterminals.
7690 Use per-type %printer.
7691
7692 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
7693
7694 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
7695 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7696 djgpp/config.site, src/files.c, src/files.h, src/main.c,
7697 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
7698 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
7699 tests/glr-regression.at, tests/input.at, tests/local.at,
7700 tests/output.at, tests/torture.at: Update copyright to 2007.
7701
7702 2007-01-16 Akim Demaille <akim@epita.fr>
7703
7704 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
7705 error code.
7706 (Calc++ Scanner): Exit with failure if we can't open the input
7707 file.
7708 Accept "-" standing for stdin.
7709 (Calc++ Top Level): Print the result only if the parsing was
7710 successful.
7711
7712 2007-01-16 Akim Demaille <akim@epita.fr>
7713
7714 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
7715
7716 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
7717 and Joel E. Denny <jdenny@ces.clemson.edu>
7718
7719 Clean up %define and %code implementation in M4 some. Most
7720 importantly, rename all related macros to be in the b4_percent_define
7721 and b4_percent_code namespaces. Also, complete support for `.' in
7722 %define variable names and %code qualifiers.
7723 * data/bison.m4 (b4_check_user_names): Check for special
7724 "SKELETON-NAMESPACE(name)" macros instead of using two nested
7725 m4_foreach loops.
7726 (b4_get_percent_define, b4_get_percent_code): Rename to...
7727 (b4_percent_define_get, b4_percent_code_get): ... these.
7728 Extend documentation with examples.
7729 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
7730 b4_percent_define_skeleton_variables and
7731 b4_percent_code_skeleton_qualifiers.
7732 Expect any value for the %define variable `foo' to be stored in the
7733 macro named `b4_percent_define(foo)'; expect any %code blocks for the
7734 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
7735 expect any unqualified %code blocks to be stored in a macro named
7736 `b4_percent_code_unqualified'.
7737 Use m4_indir so that %define variable names and %code qualifiers can
7738 contain `.', which is allowed by the grammar parser.
7739 (b4_percent_define_default): New macro to set a default value for a
7740 %define variable.
7741 (m4_wrap): Update wrapped code, and fix some underquoting.
7742 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
7743 Expect grammar uses of %define variables and %code qualifiers to be
7744 defined in b4_percent_define_user_variables and
7745 b4_percent_code_user_qualifiers.
7746 * data/c++.m4: Use b4_percent_define_default rather than
7747 m4_define_default. Fix some underquoting. Skeleton usage of %define
7748 variable define_location_comparison now implies skeleton usage of
7749 %define variable filename_type.
7750 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7751 data/push.c, data/yacc.c: Update macro names.
7752 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
7753 muscle names.
7754
7755 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7756
7757 DJGPP specific issues.
7758
7759 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
7760 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7761
7762 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7763
7764 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
7765 run parsers in all tests so that Valgrind is invoked during
7766 maintainer-check-valgrind.
7767 (Duplicate representation of merged trees): Free all semantic values.
7768 (Duplicated user destructor for lookahead): Likewise.
7769
7770 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7771
7772 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
7773 command-line prefix.
7774 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
7775 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
7776 miss Valgrind messages.
7777 (Exploding the Stack Size with Malloc): Likewise.
7778
7779 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
7780
7781 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
7782 locals. Reported by Juan Manuel Guerrero at
7783 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
7784 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
7785 Fix some indentation also.
7786 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
7787 explaining this issue.
7788
7789 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
7790 and Joel E. Denny <jdenny@ces.clemson.edu>
7791
7792 Simplify union and prologue handling, and escape union and lex/parse
7793 params with digraphs.
7794 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
7795 values to the empty string since these are no longer guaranteed
7796 initialized by the front-end.
7797 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
7798 braces around b4_user_stype since this is no longer done by the
7799 front-end.
7800 * src/files.c, src/files.h (pre_prologue_obstack,
7801 post_prologue_obstack): Remove.
7802 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
7803 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
7804 with digraphs. This fixes lex params and parse params.
7805 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
7806 * src/output.c (prepare): Remove muscle insertion of the prologues.
7807 (output): Remove freeing of pre_prologue_obstack and
7808 post_prologue_obstack.
7809 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
7810 than prologue_augment for prologue parsing so you don't need prologue
7811 obstacks.
7812 (grammar_declaration): For %union RHS, use `braceless' instead of
7813 "{...}" so that braces are already stripped and code is escaped with
7814 digraphs.
7815 * src/reader.c (prologue_augment): Remove.
7816 (reader): Remove initialization of pre_prologue_obstack and
7817 post_prologue_obstack.
7818 * src/reader.h (prologue_augment): Remove.
7819
7820 * data/c.m4: Remove stray parenthesis.
7821
7822 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7823
7824 Remove quotes from variables names in %define directives and from
7825 qualifiers in %code directives, and restrict the characters that are
7826 allowed in them to M4-friendly ones. For %define, continue to support
7827 the quoted form as a deprecated feature. Discussed starting at
7828 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
7829 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
7830 %code.
7831 * doc/bison.texinfo (Prologue Alternatives): Update.
7832 (Decl Summary): In %defines entry, update mention of `%code requires'
7833 and `%code provides'.
7834 (C++ Location Values): Update %define uses.
7835 (Calc++ Parser Interface): Likewise.
7836 (Calc++ Parser): Likewise, and update `%code requires' uses.
7837 (Table of Symbols): Update %code documentation.
7838 * src/parse-gram.y (prologue_declaration): For %define variables, use
7839 `variable' instead of `STRING'.
7840 (grammar_declaration): For %code qualifiers, use `ID' instead of
7841 `STRING'.
7842 (variable): New nonterminal that takes an `ID' or a `STRING'.
7843 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
7844 and %define uses.
7845 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
7846 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
7847 (%define errors): Update %define uses.
7848
7849 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7850
7851 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
7852 instead of muscle_insert for %define values so that M4-special
7853 characters are replaced with digraphs.
7854 * tests/input.at (%define errors): Extend to check weird values.
7855
7856 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7857
7858 Instead of having skeletons declare all valid %define variables and
7859 %code qualifiers, provide macros that retrieve the associated values
7860 and build these lists automatically. Thus Bison will now warn when a
7861 variable or qualifier is not used by the skeleton in the current
7862 invocation regardless of whether it might sometimes be used by that
7863 skeleton in other invocations. Also, move all %define value macros to
7864 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
7865 form, which is replaced by %code.
7866 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
7867 (b4_check_user_names): ... this, and change the series of valid name
7868 arguments to a single list argument for names used in the skeleton
7869 similar to the existing list argument for names used in the grammar.
7870 Warn instead of complaining.
7871 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
7872 values and %code code, to format %code code properly, and to build
7873 lists of all %define variables and %code qualifiers used in the
7874 skeleton: b4_skeleton_percent_define_variables and
7875 b4_skeleton_percent_code_qualifiers.
7876 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
7877 Remove, and...
7878 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
7879 the skeleton names lists can finish building first. In place of
7880 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
7881 expect the lists b4_user_percent_define_variables and
7882 b4_user_percent_code_qualifiers.
7883 * data/c++.m4: Where setting default values for b4_parser_class_name,
7884 b4_location_type, b4_filename_type, b4_namespace, and
7885 b4_define_location_comparison, update their names to the
7886 b4_percent_define_ namespace.
7887 * data/glr.c: Don't use b4_check_percent_define_variables and
7888 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7889 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
7890 (b4_parser_class_name, b4_namespace): Define these using
7891 b4_get_percent_define for parser_class_name and namespace.
7892 * data/location.cc: Use b4_get_percent_define.
7893 * data/push.c: Don't use b4_check_percent_define_variables and
7894 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
7895 * data/yacc.c: Likewise, and don't call m4_exit in
7896 b4_use_push_for_pull_if or m4_wrap code will never execute.
7897 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
7898 Rename to...
7899 (muscle_grow_user_name_list): ... this for consistency with the
7900 terminology used in bison.m4.
7901 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
7902 %define variable names, and rename muscle used_percent_define_variables
7903 to user_percent_define_variables.
7904 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
7905 user_percent_code_qualifiers.
7906 (content): Remove.
7907 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
7908 {CODE} form is no longer accepted.
7909 * tests/input.at (Reject bad %code qualifiers): Rename to...
7910 (Reject unused %code qualifiers): ... this, and update test output.
7911 (%define error): Update test output.
7912
7913 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
7914
7915 Check for unrecognized %define variables similar to checking for
7916 unrecognized %code qualifiers. Check for redefined %define variables.
7917 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
7918 generalizes...
7919 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
7920 (b4_check_percent_define_variables): New, also wraps it.
7921 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
7922 variables using b4_check_percent_define_variables.
7923 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
7924 all those exercised in the test suite and all those listed in the
7925 `Default values' section of c++.m4. Are there others?
7926 * data/push.c, data/yacc.c: Declare no valid %define variables.
7927 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
7928 similar to muscle_find, but it works even when the muscle stores a
7929 const value.
7930 (muscle_grow_used_name_list): New function for constructing the used
7931 name list muscles that b4_check_for_unrecognized_names requires.
7932 * src/parse-gram.y (prologue_declaration): Warn if a variable is
7933 %define'd more than once. Define the b4_used_percent_define_variables
7934 muscle with muscle_grow_used_name_list.
7935 (grammar_declaration): Abbreviate %code code with
7936 muscle_grow_used_name_list.
7937 * tests/input.at (%define errors): New.
7938
7939 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7940
7941 Provide warn_at, complain_at, and fatal_at function callbacks to the
7942 skeletons, and use this for %code qualifier complaints.
7943 * data/bison.m4 (b4_error_at): New, invoked by...
7944 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
7945 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
7946 @fatal_at(...@) directives.
7947 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
7948 qualifiers in b4_used_percent_code_qualifiers and to use
7949 b4_complain_at.
7950 * src/location.c, src/location.h (boundary_set_from_string): New global
7951 function.
7952 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
7953 function.
7954 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
7955 to b4_used_percent_code_qualifiers.
7956 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
7957 function.
7958 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
7959 (lineno): Rename to...
7960 (out_lineno): ... this so I don't misunderstand it again.
7961 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
7962 here; these newlines are in the input but not the output file.
7963 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
7964 (at_directive_perform): ... this new static function, and add handling
7965 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
7966 directives.
7967 * tests/input.at (Reject bad %code qualifiers): Update test output with
7968 locations and extend.
7969
7970 * tests/output.at (Output file name: [, Output file name: ]): Remove
7971 bogus comment about these tests failing.
7972
7973 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7974
7975 Clean up b4_check_percent_code_qualifiers a little.
7976 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
7977 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
7978 documentation and add examples.
7979 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
7980 qualifiers here.
7981
7982 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7983
7984 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
7985 unreliable -- especially when they're hidden inside another macro.
7986 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
7987 data/c.m4: Remove m4_divert(-1).
7988 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
7989 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
7990 m4_divert_push(0) and m4_divert_pop(0).
7991 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
7992 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
7993 pushed and popped by m4sugar, should be first on the stack.
7994
7995 Provide warn, complain, and fatal function callbacks to the skeletons.
7996 This provides more flexibility than m4_fatal, improves the error
7997 message format, and captures messages for translation. Discussed
7998 starting at
7999 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
8000 * data/bison.m4 (b4_error): New, invoked by...
8001 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
8002 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
8003 directives. Because these M4 macros might be called when the current
8004 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
8005 the previous removal of uses of m4_divert, which caused trouble.
8006 (b4_check_percent_code_qualifiers): Use b4_complain instead of
8007 m4_fatal to report unrecognized %code qualifiers.
8008 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
8009 push parser requests.
8010 * data/glr.c: Use b4_complain instead of m4_fatal to report
8011 non-deterministic push parser requests.
8012 Update @output usage to @output(...@) form.
8013 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
8014 report missing %defines. Update @output usage to @output(...@) form.
8015 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
8016 @output(...@) form.
8017 * src/main.c (main): Invoke skel_scanner_free.
8018 * src/scan-skel.h (skel_scanner_free): Prototype new function.
8019 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
8020 obstack_for_string from flex-scanner.h.
8021 (YY_DECL): Use to declare skel_lex static.
8022 (decode_at_digraphs): Remove; now handled in the new
8023 SC_AT_DIRECTIVE_ARG start condition.
8024 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
8025 functions.
8026 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
8027 at_directive_argv): New static globals.
8028 (INITIAL): Use fail_for_invalid_at.
8029 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
8030 recognize the start of a generalized `@directive(...@)' form and
8031 start...
8032 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
8033 directive args (using the new obstack_for_string), to decode the
8034 contained @ diagraphs, and to perform the directive. It recognizes
8035 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
8036 @output(...@).
8037 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
8038 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
8039 `@,'.
8040 (scan_skel): Initialize obstack_for_string on the first call.
8041 (skel_scanner_free): New function to free obstack_for_string.
8042 * tests/input.at (Reject bad %code qualifiers): Update test output.
8043
8044 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
8045
8046 Consolidate the 4 prologue alternative directives (%code, %requires,
8047 %provides, and %code-top) into a single %code directive with an
8048 optional qualifier field. Discussed at
8049 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
8050 * NEWS (2.3a+): Rewrite the existing entry for the prologue
8051 alternatives.
8052 * doc/bison.texinfo (Prologue Alternatives): Update.
8053 (Decl Summary): Update to %code "requires" and %code "provides".
8054 (Calc++ Parser): Update to %code "requires".
8055 (Table of Symbols): Remove entries for %requires, %provides, and
8056 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
8057 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
8058 are replaced by b4_percent_code_provides and b4_percent_code_requires,
8059 which are skeleton-specific.
8060 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
8061 declare what %code qualifiers it supports and to complain if any other
8062 qualifiers were used in the grammar.
8063 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
8064 and b4_user_code([b4_percent_code_provides]) in place of
8065 b4_user_requires and b4_user_provides.
8066 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
8067 Add b4_user_code([b4_percent_code_top]) and
8068 b4_user_code([b4_percent_code]).
8069 Invoke b4_check_percent_code_qualifiers.
8070 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8071 PERCENT_REQUIRES): Remove.
8072 (grammar_declaration): Remove RHS's for %code-top, %provides, and
8073 %requires. Rewrite the %code RHS as the unqualified form defining the
8074 muscle b4_percent_code. Add another RHS for the qualified %code form,
8075 which defines muscles of the form b4_percent_code_QUALIFIER and the
8076 b4_used_percent_code_qualifiers muscle.
8077 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
8078 PERCENT_REQUIRES): Remove.
8079 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
8080 %code "requires" and %code "provides".
8081 * tests/input.at (Reject bad %code qualifiers): New.
8082
8083 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8084
8085 Use the new code_props interface for destructors and printers.
8086 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
8087 printer_location members, and change the type of the destructor and
8088 printer members to code_props.
8089 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
8090 symbol_printer_get, semantic_type_destructor_set,
8091 semantic_type_printer_set, default_tagged_destructor_set,
8092 default_tagless_destructor_set, default_tagged_printer_set,
8093 default_tagless_printer_set): Use code_props in arguments and return
8094 types in place of char const * and location.
8095 (symbol_destructor_location_get, symbol_printer_location_get): Remove
8096 since the locations are now contained in the return of
8097 symbol_destructor_get and symbol_printer_get.
8098 * src/output.c (symbol_destructors_output, symbol_printers_output):
8099 Replace with...
8100 (symbol_code_props_output): ... this to eliminate duplicate code.
8101 (output_skeleton): Update to use symbol_code_props_output.
8102 * src/reader.c (symbol_should_be_used): Update use of
8103 symbol_destructor_get.
8104 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8105 Update uses of the various _destructor_set and _printer_set functions.
8106 * src/symtab.c: (default_tagged_destructor_location,
8107 default_tagless_destructor_location, default_tagged_printer_location,
8108 default_tagless_printer_location): Remove since we...
8109 (default_tagged_destructor, default_tagless_destructor,
8110 default_tagged_printer, default_tagless_printer): ... change the type
8111 of these to code_props.
8112 (symbol_new, semantic_type_new, symbol_destructor_set,
8113 semantic_type_destructor_set, symbol_destructor_get,
8114 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
8115 symbol_check_alias_consistency, default_tagged_destructor_set,
8116 default_tagless_destructor_set, default_tagged_printer_set,
8117 default_tagless_printer_set): Update.
8118 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
8119 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
8120 code_props members.
8121 (symbol_print): Use SYMBOL_CODE_PRINT.
8122
8123 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
8124
8125 Use the new code_props interface for rule actions.
8126 * src/symlist.h (symbol_list): Replace action, action_location, and
8127 used members with a code_props action_props member.
8128 * src/reader.c (symbol_should_be_used, grammar_rule_check,
8129 grammar_midrule_action, grammar_current_rule_merge_set,
8130 grammar_current_rule_symbol_append, packgram): Update.
8131 * src/scan-code.h (translate_rule_action): Remove, no longer used.
8132 * src/scan-code.l (handle_action_dollar): Update.
8133 (translate_rule_action): Remove, no longer used.
8134 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
8135
8136 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8137
8138 Use the new code_props interface in parse-gram.y.
8139 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
8140 Update all uses of translate_* functions to use the new code_props
8141 interface and to use gram_scanner_last_string_free and
8142 code_scanner_last_string_free where possible.
8143 (grammar_declaration): symbol_list_destructor_set and
8144 symbol_list_printer_set now perform the translation, so don't do it
8145 here. Use gram_scanner_last_string_free where possible.
8146 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
8147 translate_code): Remove, no longer used.
8148 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
8149 symbol_list_printer_set): Perform code translation here rather than
8150 depending on the caller to do so.
8151
8152 * src/symlist.h (struct symbol_list): Correct some documentation typos.
8153 * src/scan-gram.h (gram_last_string): Remove declaration.
8154 * src/scan-gram.l (last_string): Declare it static.
8155
8156 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8157
8158 Encapsulate code properties and related functionality for the various
8159 destructors, printers, and actions into a code_props structure and
8160 interface. This patch merely implements code_props in scan-code.h and
8161 scan-code.l. Future patches will rewrite other modules to use it.
8162 Discussed starting at
8163 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
8164 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
8165 consistently initialize const structs that have an empty location
8166 field.
8167 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
8168 to ensure consistency.
8169 * src/scan-code.h (code_props): New structure.
8170 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
8171 function, macro, and const global variable for initializing a
8172 code_props with no code.
8173 (code_props_plain_init, code_props_symbol_action_init,
8174 code_props_rule_action_init, code_props_translate_code): The rest of
8175 the new code_props functional interface. Among other things, the init
8176 functions set the code_props kind field so that
8177 code_props_translate_code will know whether to behave like
8178 translate_symbol_action, translate_rule_action, or translate_code.
8179 These old translate functions must remain until all other modules are
8180 updated to use the new code_props interface.
8181 (code_scanner_last_string_free): New function similar to
8182 gram_scanner_last_string_free.
8183 (code_scanner_free): Add documentation.
8184 * src/scan-code.l: Implement the new interface.
8185 (code_lex): Make it static, add a code_props* argument, and remove the
8186 rule argument.
8187 (last_string): New static global similar to the one in scan-gram.l.
8188 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
8189 instead of rule.
8190 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
8191 code_props since Bison may one day use this information for destructors
8192 and printers.
8193 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
8194 (handle_action_dollar): Use symbol_list_n_get and set used flag
8195 directly since symbol_list_n_used_set is removed.
8196 (translate_action): Add a code_props* argument and remove the rule,
8197 action, and location arguments. Pass the code_props* on to code_lex.
8198 (translate_rule_action, translate_symbol_action, translate_code):
8199 Rewrite as wrappers around the new code_props interface.
8200 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
8201 it would eventually need to break the encapsulation of code_props.
8202
8203 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8204
8205 * etc/.cvsignore: New.
8206
8207 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
8208
8209 Add maintainer-push-check to run maintainer-check using push parsing in
8210 place of pull parsing where available.
8211 * Makefile.am (maintainer-push-check): New.
8212 * data/bison.m4 (b4_use_push_for_pull_if): New.
8213 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
8214 appropriately based on their existing values.
8215 (yypush_parse): Don't print push-parser-specific diagnostics if push
8216 parsing is being used in place of pull parsing.
8217 * data/yacc.c: If push parsing should replace pull parsing, redirect to
8218 push.c.
8219 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
8220 variable, and insert b4_use_push_for_pull_flag into muscles.
8221 * tests/Makefile.am (maintainer-push-check): New.
8222
8223 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8224
8225 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
8226 (whether successful or failed) so that yypush_parse can be invoked
8227 again to start a new parse using the same yypstate.
8228 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
8229 check multiple yypull_parse invocations on the same yypstate. For pull
8230 mode, extend to check multiple yyparse invocations.
8231 (Exploding the Stack Size with Alloca): Extend to try with
8232 %push-pull-parser.
8233 (Exploding the Stack Size with Malloc): Likewise.
8234
8235 * tests/calc.at (Simple LALR Calculator): Don't specify
8236 %skeleton "push.c" since %push-pull-parser implies that now.
8237 * tests/headers.at (export YYLTYPE): Don't check for the push
8238 declarations. Otherwise, this test case can't be used to see if push
8239 mode can truly emulate pull mode.
8240 * tests/input.at (Torturing the Scanner): Likewise.
8241 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
8242 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
8243 AT_YACC_IF, which now includes the case of push mode since %skeleton
8244 need not be used for push mode. This will be more intuitive once
8245 push.c is renamed to yacc.c.
8246
8247 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
8248
8249 For push mode, convert yyparse from a macro to a function, invoke yylex
8250 instead of passing a yylexp argument to yypull_parse, and don't
8251 generate yypull_parse or yyparse unless %push-pull-parser is declared.
8252 Discussed starting at
8253 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
8254 * data/bison.m4 (b4_pull_if): New.
8255 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
8256 * data/push.c: Improve M4 quoting a little.
8257 (b4_generate_macro_args, b4_parenthesize): Remove.
8258 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
8259 any time a pull parser is requested.
8260 Don't #define this as a wrapper around yypull_parse. Instead, when
8261 both push and pull are requested, make it a function that does that
8262 same thing.
8263 (yypull_parse): If there's a b4_prefix, #define this to
8264 b4_prefix[pull_parse] when both push and pull are requested.
8265 Don't define this as a function unless both push and pull are
8266 requested.
8267 Remove the yylexp argument and hard-code yylex invocation instead.
8268 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
8269 %push-parser.
8270 * src/getargs.c (pull_parser): New global initialized to true.
8271 * getargs.h (pull_parser): extern it.
8272 * src/output.c (prepare): Insert pull_flag muscle.
8273 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
8274 (prologue_declaration): Set both push_parser and pull_parser = true for
8275 %push-pull-parser. Set push_parser = true and pull_parser = false for
8276 %push-parser.
8277 * src/scan-gram.l: Don't accept %push_parser as an alternative to
8278 %push-parser since there's no backward-compatibility concern here.
8279 Scan %push-pull-parser.
8280 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
8281 instead of %push-parser.
8282 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
8283 prototype it in the module that calls yyparse.
8284 * tests/input.at (Torturing the Scanner): Likewise.
8285 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
8286
8287 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
8288
8289 Update etc/bench.pl. Optimize push mode a little (the yyn change
8290 deserves most of the credit).
8291 * Makefile.am (SUBDIRS): Add etc subdirectory.
8292 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
8293 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
8294 yytoken, yyval, and yyloc declarations to...
8295 (yyparse or yypush_parse): ... here to improve performance. For
8296 yypush_parse invocations after the first, be sure to assign yyn its old
8297 value again.
8298 (yypstate_new): Don't bother initializing the yyresult field since the
8299 initial value isn't used.
8300 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
8301 remove the #define that, in push mode, set it to yyps->NAME.
8302 * etc/Makefile.am: New.
8303 * etc/bench.pl: Remove and build it instead from...
8304 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
8305 "tests/bison" from the build directory by default rather than just
8306 invoking "bison" from $PATH.
8307 (calc_grammar): Update push parser code: don't declare yylval globally,
8308 don't define yyparse_wrapper, and don't #define yyparse.
8309 (bench_grammar): Update to check all working combinations of yacc.c,
8310 push.c, impure, pure, pull, and push.
8311
8312 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8313
8314 For push mode, add pull wrappers around yypush_parse.
8315 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
8316 (yypull_parse): New function wrapping yypush_parse.
8317 (yyparse): New #define wrapping yypull_parse.
8318 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
8319 is declared.
8320 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
8321 prototype yylex in the module that calls yyparse, and don't prototype
8322 yyparse there. Otherwise, the yyparse expansion won't compile.
8323 * tests/input.at (Torturing the Scanner): Likewise.
8324
8325 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
8326
8327 Enable push parsers to operate in impure mode. Thus, %push-parser no
8328 longer implies %pure-parser. The point of this change is to move
8329 towards being able to test the push parser code by running the entire
8330 test suite as if %push-parser had been declared.
8331 * data/push.c (yypush_parse): For impure mode, remove the
8332 yypushed_char, yypushed_val, and yypushed_loc arguments.
8333 Instead, declare these as local variables initialized to the global
8334 yychar, yylval, and yylloc.
8335 For the first yypush_parse invocation only, restore the initial values
8336 of these global variables when it's time to read a token since they
8337 have been overwritten.
8338 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
8339 %push-parser.
8340 * tests/calc.at (Simple LALR(1) Calculator): Always declare
8341 %pure-parser along with %push-parser since this test case was designed
8342 for pure push parsers.
8343 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
8344 (AT_YACC_OR_PUSH_IF): New.
8345 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
8346 add a note that it's still wrong for some cases (as it has been for a
8347 while).
8348 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
8349 %push-parser no longer implies %pure-parser.
8350
8351 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8352
8353 Remove some unnecessary differences between the pull parser code and
8354 the push parser code. This patch enables yynerrs in push mode.
8355 * data/push.c: Reformat M4 a little.
8356 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
8357 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
8358 because push mode is on. Instead, if pure mode is on, move yynerrs
8359 to...
8360 (b4_declare_parser_state_variables): ... here.
8361 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
8362 to yyps->NAME so it can be used in yypush_parse.
8363 (yypush_parse): Don't omit uses of yynerrs in push mode.
8364
8365 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8366
8367 Fix bug such that the first pushed token's value and location are
8368 sometimes overwritten (sometimes by %initial-action) before being used.
8369 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
8370 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
8371 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
8372 more closely mimic the pull parser logic.
8373 Don't copy the pushed token to yychar, yylval, and yylloc until it's
8374 time to read a token, which is after any initialization of yylval and
8375 yylloc.
8376 (gottoken): Rename label to...
8377 (yyread_pushed_token): ... for clarity and to avoid infringing on the
8378 user namespace.
8379
8380 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
8381
8382 Rearrange initialization of the parser state variables so that the
8383 skeleton doesn't have to have a copy for pull mode and another for push
8384 mode. This patch also fixes at least a bug such that yylloc was not
8385 initialized (with b4_location_initial_line and
8386 b4_location_initial_column) upon calling yypush_parse. However, that
8387 initialization now overwrites the first token's location;
8388 %initial-action assigning @$ already did the same thing, and both bugs
8389 will be fixed in a later patch.
8390 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
8391 (b4_declare_parser_state_variables): Remove initialization of yytoken,
8392 yyss, yyvs, yyls, and yystacksize.
8393 (yypstate_new): Remove initialization of some yypstate fields: yystate,
8394 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
8395 yylsp.
8396 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
8397 yyps->NAME so it can be used in yypush_parse.
8398 (yyparse or yypush_parse): For yypush_parse, don't print the
8399 "Starting parse" diagnostic for invocations after the first.
8400 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
8401 yypush_parse, only do it for the first invocation.
8402 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
8403 initialization to occur in yypush_parse but only on the first
8404 invocation.
8405
8406 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8407
8408 * data/push.c: Add CPP guards around push parser declarations in both
8409 the header and the code file.
8410 In the code file, move the push parser declarations to the same place
8411 they appear in the header file.
8412 Clean up the M4 some, especially the inconsistent underquoting in
8413 some b4_c_function_def and b4_c_function_decl uses.
8414
8415 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8416
8417 Encapsulate the push parser state variables into an M4 macro so the
8418 push skeleton doesn't have to list them again for pull mode's yyparse.
8419 For push mode, remove yypush_parse's local equivalents of these
8420 variables to eliminate unnecessary copying between the two sets at
8421 run-time. This patch also fixes at least a bug related to multiple
8422 %initial-action invocations in push mode.
8423 * data/push.c (b4_declare_parser_variables): Rename to...
8424 (b4_declare_scanner_communication_variables): ... this for clarity and
8425 update both uses.
8426 (b4_declare_yyparse_variables): Remove and move its contents to the one
8427 spot where it was invoked.
8428 (b4_declare_parser_state_variables): New macro containing the parser
8429 state variables required by push mode.
8430 (struct yypstate): Replace all fields but yynew with
8431 b4_declare_parser_state_variables.
8432 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
8433 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
8434 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
8435 (yyparse or yypush_parse): For yyparse in pull mode, replace local
8436 parser state variable declarations with
8437 b4_declare_parser_state_variables.
8438 Don't initialize parser state variables when calling yypush_parse since
8439 yypstate_new already does that.
8440 Invoke the user's initial action only upon the first yypush_parse
8441 invocation.
8442 Remove all code that copies between the local parser state variables
8443 and the yypstate.
8444
8445 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
8446
8447 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
8448 prevent a name collision in a future patch where these names will
8449 sometimes be #define'd.
8450 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
8451 since it no longer has the same name as the existing argument.
8452 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
8453
8454 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
8455 and Joel E. Denny <jdenny@ces.clemson.edu>
8456
8457 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
8458 that the argument is case-insensitive, and there's no `=' here.
8459 For the %skeleton entry, mention that %language is better.
8460 (Bison Options): Likewise for --language and --skeleton. Move the
8461 --skeleton entry so that the `Tuning the parser' section is sorted
8462 alphabetically on long options.
8463 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
8464 %language directive in detail here; cross-reference the %language
8465 documentation instead.
8466 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
8467 `%require "2.3b"' so that the example is always up-to-date.
8468 (Table of Symbols): Add entries for %language and %skeleton.
8469 * examples/extexi (normalize): Instead of replacing every %require
8470 argument with the current Bison version, just substitute for
8471 `@value{VERSION}'. This guarantees that we're testing what actually
8472 appears in the documentation.
8473 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
8474 rather than `@VERSION@'.
8475
8476 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8477
8478 * NEWS: Reword the %language news a bit, and put it earlier.
8479
8480 * src/getargs.c (skeleton_arg): Last arg is now location const *.
8481 Rewrite to simplify the logic.
8482 (language_argmatch): Likewise.
8483 (program_name): We now own this var.
8484 * src/getargs.h (struct bison_language): Use char[] rather than
8485 const char *.
8486
8487 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
8488 Java is supported.
8489 * src/complain.c (program_name): Remove decl; no longer needed.
8490 * src/main.c (program_name): Remove; now belongs to getargs.
8491
8492 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
8493
8494 * NEWS: Document %language.
8495
8496 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
8497
8498 * data/c-skel.m4, data/c++-skel.m4: New files.
8499 * data/glr.c: Complain on push parsers.
8500
8501 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
8502 over %skeleton.
8503 (Decl Summary): Document %language and %skeleton.
8504 (Command line): Document -L.
8505
8506 * examples/extexi: Rewrite %require directive.
8507 * examples/calc++/Makefile.am: Pass VERSION to extexi.
8508
8509 * src/files.c (compute_exts_from_gc): Look in language structure
8510 for .y extension.
8511 (compute_file_name_parts): Check whether .tab should be added.
8512 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
8513 (language, skeleton_arg, language_argmatch): New.
8514 (long_options): Add --language.
8515 (getargs): Use skeleton_arg, add -L/--language.
8516 * src/getargs.h: Include location.h.
8517 (struct bison_language, language, skeleton_arg, language_argmatch): New.
8518 * src/output.c (prepare): Pick default skeleton from struct language.
8519 Don't dispatch C skeletons here.
8520 * src/parse-gram.y (PERCENT_LANGUAGE): New.
8521 (prologue_declaration): Add "%language" rule, use skeleton_arg.
8522 * src/scan-gram.l ("%language"): New rule.
8523
8524 * tests/calc.at: Test %skeleton and %language.
8525 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
8526 (AT_GLR_IF): Look for %skeleton "glr.cc".
8527 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
8528 (AT_YACC_IF): Reject %language.
8529
8530 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
8531
8532 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
8533 since it wasn't used; only the typedef name 'semantic_type' is needed.
8534 Also, omit trailing white space.
8535
8536 * bootstrap: Sync from coreutils.
8537 (gnulib_extra_files): Add build-aux/announce.gen.
8538 (slurp): Adjust .gitignore files like .cvsignore files.
8539 * build-aux/announce-gen: Remove from CVS, since bootstrap
8540 now creates this.
8541
8542 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
8543
8544 Make %push-parser imply %pure-parser. This fixes several bugs; see
8545 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
8546 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
8547 pure_parser = true.
8548 * data/push.c: Don't bother testing b4_push_if when deciding whether
8549 to expand b4_declare_parser_variables globally.
8550 (yypush_parse): Likewise in here.
8551
8552 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
8553 (yy_reduce_print): Reformat M4 for readability.
8554
8555 2006-12-15 Bob Rossi <bob@brasko.net>
8556 and Joel Denny <jdenny@ces.clemson.edu>
8557
8558 * data/push.c (yypstate): Add typedef, and update all uses of
8559 struct yypstate to just yypstate.
8560 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
8561
8562 2006-12-14 Bob Rossi <bob@brasko.net>
8563
8564 * data/push.c (yypush_parse): Declare prototype regardless of
8565 %locations option.
8566
8567 2006-12-14 Bob Rossi <bob@brasko.net>
8568
8569 * data/push.c (yyparse): Remove the prototype and the #define when in
8570 push-parser mode.
8571
8572 2006-12-13 Bob Rossi <bob@brasko.net>
8573
8574 * data/push.c (yypstate_init): Rename to...
8575 (yypstate_new): ... this and use b4_c_function_def.
8576 (yypstate_delete): New.
8577 (yypush_parse): Change parameters yynval and yynlloc to be const.
8578 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
8579 yypstate_delete functions.
8580
8581 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
8582
8583 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
8584 strange test case titles. Reported by Bob Rossi.
8585
8586 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
8587
8588 * TODO: Add pointer to Sylvain Schmitz's work on static detection
8589 of potential ambiguities in GLR grammers.
8590
8591 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
8592
8593 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
8594 `bison ', use m4_index instead of m4_substr since chopping up a string
8595 containing M4-special characters causes problems here.
8596
8597 Fix a couple of bugs related to special characters in user-specified
8598 file names, and make it easier for skeletons to compute output file
8599 names with the same file name prefix as Bison-computed output file
8600 names.
8601 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
8602 b4_parser_file_name and b4_spec_defines_file instead of
8603 @output_parser_name@ and @output_header_name@, which are now redundant.
8604 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
8605 b4_parser_file_name, b4_spec_defines_file, and the new
8606 @basename(FILENAME@) instead of @output_parser_name@ and
8607 @output_header_name@, which inappropriately escaped the file names as
8608 C string literals.
8609 * src/files.c (all_but_ext): Remove static qualifier.
8610 (compute_output_file_names): Move `free (all_but_ext)' to...
8611 (output_file_names_free): ... here since all_but_ext is needed later.
8612 * src/files.h (all_but_ext): Extern.
8613 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
8614 exactly what MUSCLE_INSERT_STRING used to do.
8615 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
8616 characters are escaped properly.
8617 * src/output.c (prepare): Define muscle file_name_all_but_ext as
8618 all_but_ext.
8619 For pkgdatadir muscle, maintain previous functionality by using
8620 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
8621 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
8622 digraphs would never be expanded. Hopefully no one has M4-special
8623 characters in his Bison installation path.
8624 * src/scan-skel.l: Don't parse @output_header_name@ and
8625 @output_parser_name@ anymore since they're now redundant.
8626 In @output, use decode_at_digraphs.
8627 Parse a new @basename command that invokes last_component.
8628 (decode_at_digraphs): New.
8629 (BASE_QPUTS): Remove unused.
8630 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
8631 (Output file name): New tests.
8632
8633 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
8634
8635 Warn about output files that are generated by the skeletons and that
8636 conflict with other output files.
8637 * data/glr.c: Don't generate the header file here when glr.cc does.
8638 * src/files.c (file_names, file_names_count): New static globals.
8639 (compute_output_file_names): Invoke output_file_name_check for files
8640 not generated by the skeletons and remove existing checks.
8641 (output_file_name_check): New function that warns about conflicting
8642 output file names.
8643 (output_file_names_free): Free file_names.
8644 * src/files.h (output_file_name_check): Declare.
8645 * src/scan-skel.l: Invoke output_file_name_check for files generated by
8646 the skeletons.
8647 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
8648 (Conflicting output files): New tests.
8649
8650 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8651
8652 * doc/bison.texinfo: Fix a couple of typos.
8653
8654 2006-12-08 Bob Rossi <bob@brasko.net>
8655
8656 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
8657 Rename to...
8658 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
8659 update all uses.
8660 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
8661 (yypush_parse): Rename yypvars argument to yyps and remove redundant
8662 local pv.
8663 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
8664 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
8665
8666 2006-12-07 Bob Rossi <bob@brasko.net>
8667 and Joel Denny <jdenny@ces.clemson.edu>
8668
8669 * data/push.c (yypvarsinit): Change return type from void* to struct
8670 yypvars*. No longer cast to void* on return.
8671 (struct yypvars): Remove yylen since it need not be remembered between
8672 yypushparse invocations.
8673 (yypushparse): Don't copy between yylen and pv->yylen.
8674
8675 2006-12-05 Bob Rossi <bob@brasko.net>
8676
8677 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
8678 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
8679 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
8680 (struct yypvars): Remove b4_declare_parser_variables.
8681 (yypvarsinit): Remove init code for removed variables.
8682 (global scope): Do not declare b4_declare_parser_variables if
8683 push or pure mode.
8684 (yypushparse): Add b4_declare_parser_variables.
8685 Init new local variables, and remove init code for removed
8686 yypvars variables.
8687 (yyparse): Delete.
8688 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
8689 and yyparse for other modes.
8690 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
8691 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
8692 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
8693 (AT_PURE_LEX_IF): True if pure or push parser.
8694
8695 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
8696
8697 Document Yacc prologue alternatives and default %destructor's and
8698 %printer's as experimental. Don't mention Java yet. Discussed at
8699 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
8700 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
8701 (2.3a): Annotate this entry to say the old forms of these features were
8702 also experimental.
8703 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
8704 Table of Symbols): Say they're experimental. Comment out any mention
8705 of Java (we'll want this back eventually).
8706
8707 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
8708
8709 Support a file name argument to %defines. Deprecate `=' in
8710 %file-prefix, %name-prefix, and %output. Discussed at
8711 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
8712 * NEWS (2.3a+): Mention.
8713 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
8714 form of %defines, and remove `=' from entries for %file-prefix,
8715 %name-prefix, and %output.
8716 * src/parse-gram.y (prologue_declaration): Implement.
8717 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
8718 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
8719 all but one occurrence of %name-prefix.
8720 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
8721 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
8722 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
8723 occurrence of each of %file-prefix and %output. Add check for %defines
8724 with argument.
8725 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
8726 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
8727 Remove the `=' from %output.
8728
8729 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
8730
8731 Don't escape $ in test case titles since Autoconf 2.61 now does that
8732 correctly.
8733 * tests/actions.at (Default %printer and %destructor are not for error
8734 or $undefined): Here.
8735 (Default %printer and %destructor are not for $accept): Here.
8736 * tests/input.at (Invalid $n and @n): Here.
8737
8738 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
8739
8740 Rename <!> to <>. Discussed starting at
8741 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
8742 * NEWS (2.3a+): Update.
8743 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
8744 Update.
8745 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
8746 * src/scan-gram.l (INITIAL): Implement.
8747 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
8748 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
8749 comment.
8750 * tests/actions.at (Default tagless %printer and %destructor,
8751 Default tagged and per-type %printer and %destructor,
8752 Default %printer and %destructor are not for error or $undefined,
8753 Default %printer and %destructor are not for $accept,
8754 Default %printer and %destructor for mid-rule values): Update.
8755 * tests/input.at (Default %printer and %destructor redeclared,
8756 Unused values with default %destructor): Update.
8757
8758 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
8759
8760 Don't let %prec take a nonterminal.
8761 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
8762 token.
8763 * tests/input.at (%prec takes a token): New test checking that %prec
8764 won't take a nonterminal.
8765
8766 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8767
8768 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
8769 it was double-quoted.
8770 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
8771 grammar is maintained with Bison's highest standards.
8772 * src/getargs.c: Fix some typos in Doxygen comments.
8773
8774 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
8775
8776 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
8777 later. Reported by Paul Eggert in
8778 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
8779 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
8780 * src/scan-code.l (translate_action): Don't bother invoking
8781 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
8782 (code_scanner_free): Instead of invoking
8783 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
8784 which frees more.
8785 * src/scan-gram.l (gram_scanner_free): Likewise.
8786 * src/scan-skel.l (scan_skel): Likewise.
8787
8788 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
8789
8790 * src/files.c (tr): Change return type to void.
8791 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
8792 has been called previously for the same key.
8793 (muscle_find): Return storage instead of value so that
8794 --enable-gcc-warnings doesn't produce warnings that the return discards
8795 const. aver that the value and storage are the same since storage
8796 could potentially be NULL when value is not.
8797 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
8798 same as 0.
8799
8800 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8801
8802 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
8803 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
8804 us a slightly cleaner distribution, and also works.
8805 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
8806 gnulib changes.
8807
8808 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
8809 and Paul Eggert <eggert@cs.ucla.edu>
8810
8811 Don't let Bison leak memory except when it complains.
8812 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
8813 (spec_defines_file, dir_prefix): Now char *, not const char *,
8814 since they are freed.
8815 * src/files.c: Likewise.
8816 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
8817 Likewise.
8818 (tr): Now operates in-place. All uses changed.
8819 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
8820 values.
8821 (compute_file_name_parts, compute_output_file_names): Don't store
8822 read-only data in variables that will be freed.
8823 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
8824 src_extension, and header_extension.
8825 (output_file_names_free): New public function to free
8826 spec_verbose_file, spec_graph_file, spec_defines_file,
8827 parser_file_name, and dir_prefix.
8828 * src/getargs.c (getargs): Don't store read-only data in variables that
8829 will be freed.
8830 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
8831 (which previously existed but was unused), and quotearg_free.
8832 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
8833 * src/muscle_tab.c: Likewise.
8834 (muscle_entry): Make the value char const *,
8835 and add a new storage member that is char * and can be freed.
8836 (muscle_entry_free): New private function.
8837 (muscle_init): Use it instead of free.
8838 (muscle_insert, muscle_grow): Update and use new storage member.
8839 (muscle_code_grow): Free the string passed to muscle_grow
8840 since it's not needed anymore.
8841 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
8842 add a new `char *code' member.
8843 ("{...}"): Declare semantic type as code.
8844 * src/scan-code.h (translate_rule_action):
8845 (translate_symbol_action, translate_code, translate_action): Return
8846 `char const *' rather than `char *' since external code should not free
8847 these strings.
8848 * src/scan-code.l: Likewise.
8849 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
8850 which is "{...}" in the parser.
8851 * tests/Makefile.am (maintainer-check-valgrind): Set
8852 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
8853 Valgrind.
8854 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
8855 complain.
8856 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
8857 expecting a non-zero exit status sets --leak-check=summary and
8858 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
8859 this case, and we don't want to hear about it.
8860
8861 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
8862
8863 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
8864 instead of from the template, to simplify configuration a bit.
8865 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
8866 and m4/wint_t.m4, as they are needed with the latest gnulib.
8867
8868 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8869
8870 Disable unset/unused mid-rule value warnings by default, and recognize
8871 --warnings=midrule-values to enable them. Discussed starting at
8872 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
8873 * NEWS (2.3a+): Mention.
8874 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
8875 warnings): Add entry for midrule-values subargument.
8876 * src/reader.c (symbol_should_be_used): Don't return true just because
8877 the value is a set/used mid-rule value unless
8878 --warnings=midrule-values was specified.
8879 * tests/input.at (Unused values, Unused values before symbol
8880 declarations): Run tests with and without --warnings=midrule-values.
8881
8882 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
8883 than LIST_FREE directly.
8884
8885 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8886
8887 Finish implementing --warnings=error, which should not be implied by
8888 --warnings=all (or by its synonyms -W and --warnings without
8889 subarguments).
8890 * src/complain.c (set_warning_issued): New function to report that
8891 warnings are being treated as errors and to record an error if so.
8892 Invoke...
8893 (warn_at, warn): ... here.
8894 * src/getargs.c (warnings_args, warnings_types): Reorder so that
8895 "error - warnings are errors" does not appear above "all - all of the
8896 above".
8897 (getargs): For -W and --warnings without subarguments, don't let
8898 FLAGS_ARGMATCH set warnings_error in warnings_flag.
8899 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
8900
8901 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
8902
8903 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
8904 empty subargument list. For example: `bison --warnings= parser.y'.
8905
8906 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8907
8908 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
8909 the parser header file so that gcc doesn't warn.
8910
8911 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8912
8913 Split the default %destructor/%printer into two kinds: <*> and <!>.
8914 Discussed starting at
8915 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
8916 * NEWS (2.3a+): Mention.
8917 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8918 previous change today related to mid-rules.
8919 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
8920 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
8921 (TYPE_TAG_ANY): Add as <*>.
8922 (TYPE_TAG_NONE): Add as <!>.
8923 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
8924 for <*> and <!>.
8925 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
8926 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
8927 * src/symlist.c (symbol_list_default_new): Split into tagged and
8928 tagless versions.
8929 (symbol_list_destructor_set, symbol_list_printer_set): Split
8930 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
8931 SYMLIST_DEFAULT_TAGLESS.
8932 * src/symlist.h: Update symbol_list_default*_new prototypes.
8933 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
8934 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
8935 * src/symtab.c (default_destructor, default_destructor_location,
8936 default_printer, default_printer_location): Split each into tagged and
8937 tagless versions.
8938 (symbol_destructor_get, symbol_destructor_location_get,
8939 symbol_printer_get, symbol_printer_location_get): Implement tagged
8940 default and tagless default cases.
8941 (default_destructor_set, default_printer_set): Split each into tagged
8942 and tagless versions.
8943 * src/symtab.h: Update prototypes.
8944 * tests/actions.at (Default %printer and %destructor): Rename to...
8945 (Default tagless %printer and %destructor): ... this, and extend.
8946 (Per-type %printer and %destructor): Rename to...
8947 (Default tagged and per-type %printer and %destructor): ... this, and
8948 extend.
8949 (Default %printer and %destructor for user-defined end token): Extend.
8950 (Default %printer and %destructor are not for error or $undefined):
8951 Update.
8952 (Default %printer and %destructor are not for $accept): Update.
8953 (Default %printer and %destructor for mid-rule values): Extend.
8954 * tests/input.at (Default %printer and %destructor redeclared): Extend.
8955 (Unused values with default %destructor): Extend.
8956
8957 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
8958
8959 Don't apply the default %destructor/%printer to an unreferenced midrule
8960 value. Mentioned at
8961 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
8962 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
8963 like $@n instead of just @n so that the default %destructor/%printer
8964 logic doesn't see them as user-defined symbols.
8965 (symbol_is_dummy): Check for both forms of the name.
8966 * src/reader.c (packgram): Remove the `$' from each midrule symbol
8967 name for which the midrule value is referenced in any action.
8968 * tests/actions.at (Default %printer and %destructor for mid-rule
8969 values): New test.
8970 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
8971 for change to dummy symbol names.
8972
8973 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8974
8975 Warn about unset midrule $$ if the corresponding $n is used.
8976 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
8977 $n usage.
8978 (packgram): Before invoking grammar_rule_check on any rule, make sure
8979 all actions have already been scanned in order to set `used' flags.
8980 Otherwise, checking that a midrule's $$ is set will not always work
8981 properly because the midrule check must forward-reference the midrule's
8982 parent rule.
8983 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
8984 warning.
8985
8986 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
8987
8988 More improvements to the documentation of the prologue alternatives:
8989 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
8990 Bison manual.
8991 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
8992 some text to clarify the relative importance of the new directives and
8993 to show how these directives may be viewed as code labels.
8994
8995 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
8996
8997 Similar to the recently removed %before-header, add %code-top as the
8998 alternative to the pre-prologue. Mentioned at
8999 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
9000 Also, let the prologue alternatives appear in the grammar section.
9001 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
9002 (prologue_declaration): Move the existing prologue alternatives to...
9003 (grammar_declaration): ... here and add %code-top.
9004 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
9005
9006 Clean up and extend documentation for the prologue alternatives.
9007 * NEWS (2.3a+): Describe prologue alternatives.
9008 * doc/bison.texinfo (Prologue): Move discussion of prologue
9009 alternatives to...
9010 (Prologue Alternatives): ... this new section, and extend it to discuss
9011 all 4 directives in detail.
9012 (Table of Symbols): Clean up discussion of prologue alternatives and
9013 add %code-top.
9014
9015 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9016
9017 DJGPP specific issues.
9018
9019 * djgpp/config.bat: config.hin has been moved to lib. Adjust
9020 config.bat accordingly.
9021 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
9022 * djgpp/config.site: Likewise.
9023
9024 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
9025
9026 Replace %*-header with %provides, %requires, %code. See discussion at
9027 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
9028
9029 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
9030 (b4_user_start_header): Remove.
9031 * data/glr.c: Use new macros instead of b4_*start_header
9032 and b4_*end_header.
9033 * data/glr.cc: Likewise.
9034 * data/lalr1.cc: Likewise.
9035 * data/push.c: Likewise.
9036 * data/yacc.c: Likewise.
9037
9038 * doc/bison.texinfo: Remove %before-header, rename
9039 %{start,end,after}-header to %requires, %provides, %code.
9040
9041 * src/parse-gram.y: Likewise (also rename token names accordingly).
9042 * src/scan-gram.l: Likewise.
9043 * tests/actions.at: Likewise.
9044
9045 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
9046
9047 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
9048 Problem reported by Joel E. Denny.
9049
9050 2006-10-14 Jim Meyering <jim@meyering.net>
9051
9052 (Sync from coreutils.)
9053 Work also when the working directory (with e.g. coreutils sources)
9054 is version controlled with git, rather than CVS.
9055 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
9056 rather than CVS.
9057 In messages and comments, say e.g., "checked-out sources",
9058 rather than "CVS sources".
9059 (version_controlled_file): New function. Work for git as well as
9060 for CVS. Don't use grep's -q option.
9061 (slurp): Call it here, in place of CVS-specific code.
9062
9063 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
9064
9065 Fix testsuite for ./configure --enable-gcc-warnings:
9066 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
9067 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
9068 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
9069 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
9070 * test/regression.at (Diagnostic that expects two alternatives):
9071 Likewise.
9072
9073 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9074
9075 * bootstrap.conf (gnulib_modules): Add config-h.
9076 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
9077 worry about HAVE_CONFIG_H.
9078 * lib/abitset.c: Likewise.
9079 * lib/bitset.c: Likewise.
9080 * lib/bitset_stats.c: Likewise.
9081 * lib/bitsetv-print.c: Likewise.
9082 * lib/bitsetv.c: Likewise.
9083 * lib/ebitset.c: Likewise.
9084 * lib/get-errno.c: Likewise.
9085 * lib/lbitset.c: Likewise.
9086 * lib/subpipe.c: Likewise.
9087 * lib/timevar.c: Likewise.
9088 * lib/vbitset.c: Likewise.
9089 * lib/bitset.c: Include "bitset.h" first, to test interface.
9090 * lib/bitset_stats.c: Include "bitset_stats.h" first.
9091 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
9092 * lib/bitsetv.c: Include "bitsetv.h" first.
9093 * lib/get-errno.c: Include "get-errno.h" first.
9094 * m4/.cvsignore: Add config-h.m4.
9095 * tests/actions.at (Default %printer and %destructor for ...):
9096 Adjust expected line numbers in output to reflect removal of #if
9097 HAVE_CONFIG_H lines.
9098 * tests/glr-regression.at (Missed %merge type warnings when ...):
9099 Likewise.
9100 * tests/regression.at (Braced code in declaration in rules section):
9101 Likewise.
9102 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
9103 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
9104 Include <config.h> unconditionally.
9105
9106 * bootstrap: Sync from coreutils, as follows:
9107
9108 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9109
9110 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
9111 variable was sometimes used without being initialized. This
9112 messed up the installation of the INSTALL file in some cases.
9113
9114 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9115
9116 * bootstrap (usage, main program, symlink_to_gnulib): Add option
9117 --copy. Inspired by a suggestion from Bruno Haible.
9118
9119 2006-10-03 Jim Meyering <jim@meyering.net>
9120
9121 * bootstrap: Undo last change to this file, since now gnulib-tool
9122 sticks with the automake default in generating dependencies.
9123
9124 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
9125
9126 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
9127 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
9128
9129 * doc/bison.1: Add copyright notice.
9130
9131 * data/glr.c: Don't include <stdarg.h>; not used.
9132
9133 * NEWS: The -g and --graph options now output graphs in Graphviz
9134 DOT format, not VCG format.
9135 * doc/bison.1: Likewise.
9136 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
9137 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
9138 of this change in
9139 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
9140 * TODO: Remove Graphviz entry.
9141 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
9142 remove vcg.c, vcg.h, vcg_defaults.h.
9143 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
9144 * src/graphviz.c, src/graphviz.h: New files.
9145 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
9146 * src/files.h: Make comment more generic.
9147 * src/main.c (main): Likewise.
9148 * src/print_graph.h: Likewise.
9149 * src/getargs.c (usage): Make usage description more generic.
9150 * src/print_graph.c: Include graphviz.h rather than vcg.h.
9151 (static_graph, fgraph): Remove. All uses changed to pass
9152 arguments instead of sharing a static var.
9153 (print_core, print_actions, print_state, print_graph):
9154 Output graphviz format rather than VCG format.
9155 * tests/.cvsignore: Remove *.vcg; add *.dot.
9156 * tests/output.at: Expect *.dot files, not *.vcg files.
9157
9158 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
9159 accommodates the 2006-10-08 change.
9160
9161 2006-10-11 Bob Rossi <bob@brasko.net>
9162
9163 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
9164 (b4_yyssa, b4_yyerror_range): New macros.
9165 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
9166 (yypvarsinit): Remove init of removed fields.
9167 (yypushparse): Remove use of removed fields; use new macros instead.
9168
9169 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
9170
9171 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
9172 in a push parser. Reindent slightly to match yacc.c better.
9173
9174 2006-10-11 Bob Rossi <bob@brasko.net>
9175
9176 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
9177 yymsg_alloc fields.
9178 (yypvarsinit, yypushparse): Remove init of removed fields.
9179 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
9180
9181 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
9182
9183 * THANKS: Add Paolo Bonzini and Bob Rossi.
9184
9185 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
9186
9187 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
9188 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
9189 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
9190 b4_define_user_cde and uses): Remove.
9191 (b4_comment, b4_prefix, b4_sync_start): New.
9192 * data/bison.m4: New file, with most of the content removed from c.m4.
9193 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
9194 * src/output.c (output_skeleton): Pass bison.m4.
9195 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
9196 only if specified.
9197
9198 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
9199
9200 Fix test failure reported by Tom Lane in
9201 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
9202 and try to make such failures easier to catch in the future.
9203 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
9204 that's now the caller's responsibility.
9205 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
9206 Set yychar = YYEOF if it's negative.
9207 * tests/actions.at (yylex): Abort if asked to read past EOF.
9208 * tests/conflicts.at (yylex): Likewise.
9209 * tests/cxx-type.at (yylex): Likewise.
9210 * tests/glr-regression.at (yylex): Likewise.
9211 * tests/input.at (yylex): Likewise.
9212 * tests/regression.at (yylex): Likewise.
9213 * tests/torture.at (yylex): Likewise.
9214
9215 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
9216
9217 Fix problems with translating English-language diagnostics.
9218 * bootstrap: Fix bug introduced in recent bootstrap changes, with
9219 respect to bison-runtime pot generation. The YY_ stuff
9220 wasn't being captured.
9221 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
9222 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
9223 * runtime-po/POTFILES.in: Add data/push.c.
9224
9225 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
9226
9227 Merge bootstrap changes from coreutils.
9228
9229 2006-09-28 Jim Meyering <jim@meyering.net>
9230
9231 Automatically generated dependencies are important even
9232 when all of the sources in a directory come from gnulib.
9233 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
9234 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
9235
9236 2006-09-23 Jim Meyering <jim@meyering.net>
9237
9238 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
9239
9240 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9241
9242 * bootstrap: Add support for --force.
9243 (usage): New function. Describe usage less tersely.
9244 (CVS_only_file): New var.
9245
9246 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
9247
9248 * data/push.c (YYPUSH_MORE): Make it an enum instead.
9249 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
9250 Adjust white space and comments to match GNU style better.
9251
9252 2006-09-20 Bob Rossi <bob@brasko.net>
9253
9254 * data/push.c (yyresult_get): Remove function.
9255 (YYPUSH_MORE): Add #define.
9256 (yypushparse): Modify return value.
9257
9258 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9259
9260 * stamp-h.in: Remove; no longer needed.
9261 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
9262 Remove config.h, config.hin, intl (no longer created).
9263 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
9264 stamp-h1.
9265
9266 Sync bootstrap from coreutils, as follows:
9267
9268 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
9269
9270 * bootstrap (symlink_to_gnulib): New function.
9271 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
9272 to copies-of-gnulib.
9273 (cp_mark_as_generated, slurp, gnulib_files):
9274 Avoid making a copy if it's the same as the old version.
9275 (gnulib_files): Add support for this variable (used by Bison).
9276
9277 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
9278
9279 * src/getargs.c (usage): Rework to use conventions similar to
9280 coreutils, to make translation a bit easier and the code a bit
9281 smaller. Problem reported by Tim Van Holder.
9282
9283 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
9284
9285 Use some of gnulib's new modules, taken from coreutils.
9286
9287 * bootstrap: Sync from coreutils, except add support for gnulib_files.
9288 * bootstrap.conf: New file.
9289 (gnulib_modules): Add configmake, inttypes, unistd.
9290 (XGETTEXT_OPTIONS): Add complain, complain_at,
9291 fatal, fatal_at, warn, warn_at, unexpected_end.
9292 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
9293 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
9294 (gl_EARLY): Add.
9295 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
9296 (gl_INIT): Add
9297 (GNULIB_AUTOCONF_SNIPPET): Remove.
9298 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
9299 the pickiest.
9300 * lib/.cvsignore: Add inttypes_.h.
9301 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
9302 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
9303 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
9304 no-longer-necessary initializations.
9305 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
9306 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
9307 use the unistd module.
9308 * src/system.h: Likewise.
9309 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
9310 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
9311 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
9312 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
9313 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
9314 * src/system.h: Include inttypes.h unconditionally, now that we
9315 use the inttypes module. Don't bother to include stdint.h, since
9316 inttypes.h now does that for us.
9317 (LOCALEDIR): Remove, now that we use the configmake module.
9318 * src/getargs.c: Include configmake.h.
9319 * src/main.c: Likewise.
9320 * src/output.c: Likewise.
9321 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
9322 not from $abs_top_builddir, since config.h moved.
9323
9324
9325 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
9326 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
9327
9328 * src/parse-gram.y (symbol_declaration): Don't put statements
9329 before declarations; it's not portable to C89.
9330 * src/scan-code.l (handle_action_at): Likewise.
9331
9332 * src/scan-code.l: Always initialize braces_level; the old code
9333 left it uninitialized and therefore had undefined behavior.
9334
9335 Don't attempt to redefine 'assert', since it runs afoul of
9336 systems where standard headers (mistakenly) include <assert.h>.
9337 Instead, define and use our own alternative, called 'aver'.
9338 * src/reader.c: Don't include assert.h, since we no longer
9339 use assert.
9340 * src/scan-code.l: Likewise.
9341 * src/system.h (assert): Remove, replacing with....
9342 (aver): New function, taking a bool arg. All uses changed.
9343 * src/tables.c (pack_vector): Ensure that aver arg is bool,
9344 not merely an integer.
9345
9346 2006-09-15 Bob Rossi <bob@brasko.net>
9347
9348 Add support for push parsing. Based on the original work of
9349 Odd Arild Olsen <oao@fibula.no>.
9350 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
9351 * data/c.m4 (YYPUSH): New.
9352 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
9353 * data/push.c: New file.
9354 * src/getargs.c (push_parser): New var.
9355 * src/getargs.h (push_parser): New declaration.
9356 * src/output.c (prepare): Add macro insertion of `push_flag'.
9357 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
9358 (prologue_declaration): Parse %push-parser.
9359 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
9360 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
9361 list of removed lines from the traces observed.
9362 (AT_CHECK_CALC_LALR): Added push parser tests.
9363
9364 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
9365
9366 * NEWS: Version 2.3a.
9367 * configure.ac (AC_INIT): Likewise.
9368
9369 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
9370 "#define YYSTYPE int" that caused "make maintainer-check" to fail
9371 due to header ordering dependencies. I don't know why the #define
9372 was there.
9373
9374 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
9375 runtime cost when YYDEBUG is not defined, and so that some tests
9376 that used to fail now work. Problem and initial suggestion by
9377 Paolo Bonzini.
9378 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
9379 * data/glr.cc (b4_parser_class_name):
9380 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
9381 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
9382 (yydebug_) [YYDEBUG]: New member.
9383 (yycdebug_): Now defined only if YYDEBUG.
9384 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
9385 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
9386 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
9387 if YYYDEBUG.
9388 (debug_stream, set_debug_stream, debug_level, set_debug_level):
9389 Define only if YYDEBUG.
9390 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
9391 set_debug_level.
9392 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
9393 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
9394 AT_CHECK_CALC_GLR_CC that are working now.
9395
9396 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
9397
9398 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
9399 We don't need them in glr.cc, and glr.c defines them.
9400 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
9401 assumes that defining it to anything is the same as defining
9402 it to 1. Problem reported by Paolo Bonzini.
9403
9404 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
9405
9406 * data/c.m4 (b4_null, b4_case): Define.
9407 * src/output.c (prepare_symbols): Use b4_null.
9408 (user_actions_output): Use b4_case.
9409
9410 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
9411
9412 * data/glr.c (b4_shared_declarations): Put start-header first,
9413 before any #includes that we generate, so that feature-test
9414 macros work. Problem reported by Michael Deutschmann in
9415 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
9416 * data/lalr1.cc: Likewise.
9417 * doc/bison.texinfo (Prologue): Document that feature-test macros
9418 should be defined before any Bison declarations.
9419 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
9420 that depend on location.hh after, not before, Bison decls, since
9421 we now include location.hh after the first user prologue.
9422
9423 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
9424 Sander Brandenburg in
9425 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
9426 Also, fix minor white space and comment issues.
9427 (Prologue): Mention that it's better to define feature-test macros
9428 before Bison declarations. Problem reported by Michael Deutschmann.
9429
9430 * README-cvs: Fix typo: "&" should be "&&". Problem reported
9431 by Jim Meyering.
9432 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
9433 This adjusts to recent gnulib changes.
9434
9435 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9436
9437 Finish implementation of per-type %destructor/%printer. Discussed
9438 starting at
9439 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
9440 and
9441 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
9442 * NEWS (2.3+): Add a description of this feature to the default
9443 %destructor/%printer description.
9444 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
9445 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
9446 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
9447 list node contains a semantic type.
9448 * src/symtab.c, src/symtab.h: Extend with a table that associates
9449 semantic types with their %destructor's and %printer's.
9450 (semantic_type_from_uniqstr, semantic_type_get,
9451 semantic_type_destructor_set, semantic_type_printer_set): New functions
9452 composing the public interface of that table.
9453 (symbol_destructor_get, symbol_destructor_location_get,
9454 symbol_printer_get, symbol_printer_location_get): If there's no
9455 per-symbol %destructor/%printer, look up the per-type before trying
9456 the default.
9457 * tests/actions.at (Per-type %printer and %destructor): New test case.
9458 * tests/input.at (Default %printer and %destructor redeclared):
9459 Extend to check that multiple occurrences of %symbol-default in a
9460 single %destructor/%printer declaration is an error.
9461 (Per-type %printer and %destructor redeclared, Unused values with
9462 per-type %destructor): New test cases.
9463
9464 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
9465
9466 Require default %destructor/%printer to be declared using
9467 %symbol-default instead of an empty symbol list, and start working on
9468 new per-type %destructor/%printer. Discussed at
9469 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
9470 * NEWS (2.3+): Add %symbol-default to example.
9471 * bison.texinfo (Freeing Discarded Symbols): Likewise.
9472 (Table of Symbols): Add entry for %symbol-default.
9473 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
9474 (generic_symlist, generic_symlist_item): New nonterminals for creating
9475 a list in which each item is a symbol, semantic type, or
9476 %symbol-default.
9477 (grammar_declaration): Use generic_symlist in %destructor and %printer
9478 declarations instead of symbols.1 or an empty list.
9479 (symbol_declaration, precedence_declaration, symbols.1): Update actions
9480 for changes to symbol_list.
9481 * src/reader.c: Update for changes to symbol_list.
9482 * src/scan-code.l: Likewise.
9483 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
9484 * src/symlist.c, src/symlist.h: Extend such that a list node may
9485 represent a semantic type or a %symbol-default in addition to just an
9486 ordinary symbol. Add switched functions for setting %destructor's and
9487 %printer's.
9488 * tests/actions.at, tests/input.at: Add %symbol-default to all default
9489 %destructor/%printer declarations.
9490
9491 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
9492
9493 Whether the default %destructor/%printer applies to a particular symbol
9494 isn't a question of whether the user *declares* that symbol (in %token,
9495 for example). It's a question of whether the user by any means
9496 *defines* the symbol at all (by simply using a char token, for
9497 example). $end is defined by Bison whereas any other token with token
9498 number 0 is defined by the user. The error token is always defined by
9499 Bison regardless of whether the user declares it with %token, but we
9500 may one day let the user define error as a nonterminal instead.
9501 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
9502 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
9503 the meaning of "user-defined".
9504 * tests/actions.at (Default %printer and %destructor for user-declared
9505 end token): Rename to...
9506 (Default %printer and %destructor for user-defined end token): ...
9507 this.
9508
9509 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
9510 computation of whether to apply the default, don't maintain a list of
9511 every Bison-defined symbol. Instead, just check for a first character
9512 of '$', which a user symbol cannot have, and check for the error token.
9513
9514 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
9515
9516 Don't apply the default %destructor or %printer to the error token,
9517 $undefined, or $accept. This change fits the general rule that the
9518 default %destructor and %printer are only for user-declared symbols,
9519 and it solves several difficulties that are described in the new test
9520 cases listed below.
9521 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
9522 * tests/actions.at (Default %printer and %destructor are not for error
9523 or $undefined, Default %printer and %destructor are not for $accept):
9524 New test cases.
9525
9526 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
9527
9528 Allow %start after the first rule.
9529 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
9530 when parsing the first rule.
9531 (check_and_convert_grammar): Search for it here after all grammar
9532 declarations have been parsed. Skip midrules, which have dummy LHS
9533 nonterminals.
9534 * src/symtab.c (symbol_is_dummy): New function.
9535 * src/symtab.h (symbol_is_dummy): Declare it.
9536 * tests/input.at (%start after first rule): New test.
9537
9538 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9539
9540 Redo some of the previous commit: add back the ability to use
9541 non-aliased/undeclared string literals since it might be useful to
9542 those declaring %token-table.
9543 * src/reader.c (check_and_convert_grammar): Undo changes in previous
9544 commit: don't worry about complaints from symbols_pack.
9545 * src/symtab.c (symbol_new, symbol_class_set,
9546 symbol_check_alias_consistency): Undo changes in previous commit: count
9547 each string literal as a new symbol and token, assign it a symbol
9548 number, and don't complain about non-aliased string literals.
9549 (symbols_pack): Since symbol_make_alias still does not decrement symbol
9550 and token counts but does still set aliased tokens to the same number,
9551 symbol_pack_processor now leaves empty slots in the symbols array.
9552 Remove those slots.
9553 * tests/regression.at (Undeclared string literal): Remove test case
9554 added in previous commit since non-aliased string literals are allowed
9555 again.
9556 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
9557 remove unnecessary string literal declarations.
9558 * tests/sets.at (Firsts): Likewise.
9559
9560 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
9561
9562 Don't allow an undeclared string literal, but allow a string literal to
9563 be used before its declaration.
9564 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
9565 symbols_pack complained.
9566 * src/symtab.c (symbol_new): Don't count a string literal as a new
9567 symbol.
9568 (symbol_class_set): Don't count a string literal as a new token, and
9569 don't assign it a symbol number since symbol_make_alias does that.
9570 (symbol_make_alias): It's not necessary to decrement the symbol and
9571 token counts anymore. Don't assume that an alias declaration occurs
9572 before any uses of the identifier or string, and thus don't assert that
9573 one of them has the highest symbol number so far.
9574 (symbol_check_alias_consistency): Complain if there's a string literal
9575 that wasn't declared as an alias.
9576 (symbols_pack): Bail if symbol_check_alias_consistency failed since
9577 symbol_pack asserts that every token has been assigned a symbol number
9578 although undeclared string literals have not.
9579 * tests/regression.at (String alias declared after use, Undeclared
9580 string literal): New test cases.
9581 (Characters Escapes, Web2c Actions): Declare string literals as
9582 aliases.
9583 * tests/sets.at (Firsts): Likewise.
9584
9585 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
9586
9587 In the grammar scanner, STRING_FINISH unclosed constructs and return
9588 them to the parser in order to improve error messages.
9589 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
9590 SC_BRACED_CODE, SC_PROLOGUE): Implement.
9591 * tests/input.at (Unclosed constructs): New test case.
9592 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
9593 seen.
9594
9595 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
9596 unused global.
9597
9598 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
9599
9600 Handle string aliases for character tokens correctly.
9601 * src/symtab.c (symbol_user_token_number_set): If the token has an
9602 alias, check and set its alias's user token number instead of its own,
9603 which is set to indicate the alias. Previously, every occurrence of
9604 the character token in the grammar overwrote that alias indicator with
9605 the character code.
9606 * tests/input.at (String aliases for character tokens): New test.
9607
9608 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
9609
9610 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
9611
9612 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
9613
9614 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
9615 to prevent failures when building on older platforms.
9616 Check for autopoint failure.
9617 Set XGETTEXT_OPTIONS to values that check for C format strings,
9618 so that translators are warned about them (this also helps
9619 prevent core dumps).
9620
9621 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
9622 function, since it simplifies our code a bit.
9623
9624 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
9625 rather than -W, so we don't get bogus warnings about sign comparisons.
9626 Add -Wpointer-arith, since that warning is useful (it reports code
9627 that does not conform to C89 and that some compilers reject).
9628 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
9629 since it's no longer needed.
9630
9631 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
9632
9633 Clean up scanners a bit.
9634 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
9635 definitions so gcc won't warn when obstack_for_string is unused.
9636 * src/scan-code.l: config.h and system.h are already #include'd by
9637 scan-code-c.c, so get rid of them here.
9638 * src/scan-gram.l: Likewise.
9639 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
9640 definitions rather than duplicating the rest of it.
9641 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
9642
9643 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
9644
9645 Suppress signed/unsigned comparison warnings for yycheck.
9646 * data/c.m4 (b4_safest_int_type): New macro.
9647 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
9648 a signed int type, cast it to b4_safest_int_type first.
9649 * data/yacc.c: Likewise.
9650 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
9651 also overwritten.
9652
9653 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
9654
9655 * doc/bison.texinfo: Fix some typos.
9656
9657 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
9658
9659 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
9660 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
9661
9662 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
9663 the latest gnulib does this a different way.
9664 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
9665 translation was patched, so stop omitting it.
9666
9667 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9668
9669 Enable declaration of default %printer/%destructor. Make the parser
9670 use these for all user-declared grammar symbols for which the user does
9671 not declare a specific %printer/%destructor. Thus, the parser uses it
9672 for token 0 if the user declares it but not if Bison generates it as
9673 $end. Discussed starting at
9674 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
9675 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
9676 and
9677 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
9678 * NEWS (2.3+): Mention.
9679 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
9680 declare a %destructor for a mid-rule's semantic value. It's just
9681 impossible to declare one specific to it.
9682 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
9683 code. Describe default %destructor form.
9684 * src/parse-gram.y (grammar_declaration): Parse default
9685 %printer/%destructor declarations.
9686 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
9687 and symbol_destructor_location_get rather than accessing the destructor
9688 and destructor_location members of struct symbol.
9689 (symbol_printers_output): Likewise but for %printer's.
9690 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
9691 again.
9692 * src/symtab.c (default_destructor, default_destructor_location,
9693 default_printer, default_printer_location): New static global
9694 variables to record the default %destructor and %printer.
9695 (symbol_destructor_get, symbol_destructor_location_get,
9696 symbol_printer_get, symbol_printer_location_get): New functions to
9697 compute the appropriate %destructor and %printer for a symbol.
9698 (default_destructor_set, default_printer_set): New functions to set the
9699 default %destructor and %printer.
9700 * src/symtab.h: Prototype all those new functions.
9701 * tests/actions.at (Default %printer and %destructor): New test to
9702 check that the right %printer and %destructor are called, that they're
9703 not called for $end, and that $$ and @$ work correctly.
9704 (Default %printer and %destructor for user-declared end token): New
9705 test to check that the default %printer and %destructor are called for
9706 a user-declared end token.
9707 * tests/input.at (Default %printer and %destructor redeclared, Unused
9708 values with default %destructor): New tests to check related grammar
9709 warnings and errors.
9710
9711 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
9712
9713 Clean up handling of %destructor for the end token (token 0).
9714 Discussed starting at
9715 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
9716 and
9717 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
9718
9719 Make the skeletons consistent in how they pop the end token and invoke
9720 its %destructor.
9721 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
9722 state, which has token number 0, since this would invoke the
9723 %destructor for the end token.
9724 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
9725 until after shifting the end token, or else it won't be popped.
9726 * data/yacc.c (yyparse): Likewise.
9727
9728 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
9729 it's the end token. Upon termination, destroy an unshifted lookahead
9730 even when it's the end token.
9731 * data/lalr1.cc (yy::parser::parse): Likewise.
9732 * data/yacc.c (yyparse): Likewise.
9733
9734 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
9735 value warnings for the end token when the user gives the end token a
9736 %destructor.
9737
9738 * tests/actions.at (Printers and Destructors): Test all the above.
9739
9740 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
9741
9742 Update to latest gnulib and gettext versions.
9743 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
9744 Add fopen-safer.
9745 (gnulib_files): Add m4/warning.m4. Don't worry about files
9746 overwritten by autopoint.
9747 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
9748 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
9749 rejects them.
9750 Don't use autoreconf; instead, invoke autopoint etc. by hand,
9751 so that we can remove the intl files at a better time.
9752 (intl_files_to_remove): Remove aclocal.m4, since it gets
9753 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
9754 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
9755 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
9756 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
9757 Remove datarootdir hack; no longer needed.
9758 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
9759 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
9760 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
9761 strdup.h.
9762 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
9763 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
9764
9765 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
9766
9767 * bootstrap: Adjust to today's change to gnulib-tool by invoking
9768 it with --assume-autoconf='latest-stable'.
9769
9770 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
9771
9772 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
9773 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
9774 YYSTYPE' and `{'.
9775 * src/muscle_tab.h (muscle_grow): Replace the header comments with
9776 those from muscle_tab.c since the old ones are misleading.
9777
9778 2006-07-13 Akim Demaille <akim@epita.fr>
9779
9780 Support %define "KEY" {VALUE}.
9781 * src/scan-code.h, src/scan-code.l (translate_action)
9782 (translate_rule_action, translate_symbol_action, translate_code):
9783 Return char *, not const char *.
9784 * src/parse-gram.y (declaration): Rename as...
9785 (prologue_declaration): this.
9786 (string_content): Remove this nonterminal, use STRING.
9787 (braceless, content, content.opt): New nonterminal.
9788 Use them.
9789 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
9790 as value.
9791 * src/scan-gram.l (getargs.h): Don't include it.
9792
9793 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
9794
9795 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
9796 rather than a for-loop that declares a local bool variable. This
9797 should work around a compatibility problem with a Cray x1e C++
9798 compiler reported by Hung Nguyen in
9799 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
9800 The for-loop was introduced in the 2004-11-17 change but I don't
9801 know why it was needed.
9802
9803 2006-07-12 Akim Demaille <akim@epita.fr>
9804
9805 * data/c.m4: Comment changes.
9806
9807 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
9808
9809 * src/complain.c (error_message, ERROR_MESSAGE): New.
9810 To factor...
9811 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
9812 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
9813
9814 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9815
9816 * NEWS: Instead of %union, you can define and use your own union type
9817 YYSTYPE if your grammar contains at least one <type> tag.
9818 Your YYSTYPE need not be a macro; it can be a typedef.
9819 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
9820 (Union Decl, Decl Summary): Document this.
9821 * data/glr.c (YYSTYPE): Implement this.
9822 * data/glr.cc (YYSTYPE): Likewise.
9823 * data/lalr1.cc (YYSTYPE): Likewise.
9824 * data/yacc.c (YYSTYPE): Likewise.
9825 * src/output.c (prepare): Output tag_seen_flag.
9826 * src/parse-gram.y (declaration, grammar_declaration):
9827 Use 'union_seen' rather than 'typed' to determine whether
9828 %union has been seen, since grammars can now be typed without
9829 %union.
9830 (symbol_declaration, type.opt, symbol_def):
9831 Keep track of whether a tag has been seen.
9832 * src/reader.c (union_seen, tag_seen): New vars.
9833 (typed): remove.
9834 * src/reader.h (union_seen, tag_seen, typed): Likewise.
9835 * src/scan-code.l (untyped_var_seen): New variable.
9836 (handle_action_dollar): Adjust to above changes.
9837 (handle_action_dollar, handle_action_at):
9838 Improve overflow checking for outlandish numbers.
9839 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
9840 avoid new diagnostics generated by above changes.
9841 * tests/regression.at (YYSTYPE typedef): Add test to check
9842 for type tags without %union.
9843
9844 * src/symlist.c (symbol_list_length): Return int, not unsigned
9845 int, since callers expect int. This may need to get revisited
9846 once we have proper integer overflow checking.
9847
9848 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
9849 object is now static.
9850
9851 * src/getargs.c (flags_argmatch): Return void, not int,
9852 to pacify ./configure --enable-gcc-warnings.
9853
9854 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
9855 since last_string is already defined to FLEX_PREFIX (last_string).
9856
9857 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9858
9859 Implement --warnings/-W.
9860 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
9861 replaced by...
9862 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
9863 Adjust callers.
9864 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
9865 (warnings_args, warnings_types): New.
9866 (getargs, short_options, long_options): Accept -W/--warnings.
9867 Sort the options by alphabetical order, upper case letter right
9868 before its lower case.
9869
9870 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
9871
9872 Change %merge result type clash warnings to errors. Discussed at
9873 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
9874 * src/reader.c (record_merge_function_type): Use complain_at.
9875 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9876 declared later): Update test case results.
9877
9878 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
9879
9880 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
9881 to be in alphabetical order.
9882 (trace_args): Spelling fixes.
9883
9884 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
9885
9886 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
9887 so they don't collide with user-defined macros.
9888 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
9889 this was never guaranteed, and now that we're using gnulib stdint,
9890 which defines int_fast16_t to long int, the problem is exposed.
9891
9892 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
9893
9894 * data/c.m4 (b4_basename): Simplify a bit, since we don't
9895 need the full POSIX semantics (and weren't implementing them
9896 anyway).
9897
9898 Adjust to Autoconf 2.60 and today's gnulib.
9899 * bootstrap (gnulib_modules): Add stdint.
9900 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
9901 no longer copies it.
9902 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
9903 since stdint needs the former and wcwidth (which is now required
9904 by mbswidth) needs the latter.
9905 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
9906 work around a compatibility glitch between gettext 0.14.6 and
9907 Autoconf 2.60.
9908 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
9909 Do not check for uintptr_t, since new stdint module does the right
9910 thing.
9911 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
9912 Add stdint.h, stdint_.h, wcwidth.h.
9913 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
9914 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
9915 stdint.m4, wchar_t.m4, wcwidth.m4.
9916 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
9917 usual order for ../lib/*.h files.
9918 (file_name_split): Use last_component, not base_name, to adjust
9919 to gnulib changes.
9920 * src/parse-gram.h: Include <strverscmp.h> in the usual order
9921 for ../lib/*.h files.
9922 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
9923 Define unconditionally, since we now assume the stdint module.
9924 * src/scan-skel.l: Include <dirname.h>.
9925 (BASE_QPUTS): Use last_component, not base_name.
9926 * src/system.h: Include <unlocked-io.h> in the usual order
9927 for ../lib/*.h files. Include <stdint.h> unconditionally,
9928 since we now use the stdint module.
9929 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
9930 HAVE_UINTPTR_T, since we now use the stdint module.
9931 (base_name): Remove decl, since files now include <dirname.h>
9932 to get the decl.
9933
9934 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9935
9936 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
9937 New, default to 1.
9938 * data/yacc.c, data/glr.c, data/location.cc: Use them.
9939 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
9940 default.
9941 * tests/calc.at: Adjust.
9942
9943 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
9944
9945 * data/c.m4 (b4_basename): New.
9946 (b4_syncline): Also output the location of its invocation (from
9947 the skeleton).
9948 (b4_user_action, b4_define_user_action, b4_user_actions)
9949 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
9950 (b4_user_stype): New.
9951 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
9952
9953 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9954
9955 In the grammar file, the first column is 1 not 0 on the first line as
9956 on every other line.
9957 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
9958 * tests/input.at (Torturing the Scanner): Update output.
9959
9960 * src/scan-gram.l (scanner_cursor): Declare it static.
9961
9962 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
9963
9964 In warnings, say "previous declaration" rather than "first
9965 declaration".
9966 * src/symtab.c (redeclaration): Do that here.
9967 * src/reader.c (record_merge_function_type): In the case of a result
9968 type clash, report the previous declaration rather than the very first
9969 one in the grammar file.
9970 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9971 declared later): Add a third declaration to check this behavior.
9972 * tests/input.at (Incompatible Aliases): Update output.
9973
9974 2006-06-27 Akim Demaille <akim@epita.fr>
9975
9976 * doc/Doxyfile.in: New.
9977 * doc/Makefile.am: Use it.
9978 * src/lalr.h, src/symtab.h: Initial doxygenation.
9979
9980 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
9981
9982 Don't miss %merge result type warnings just because the LHS types are
9983 declared after the %merge. This continues the effort of the previous
9984 patch.
9985 * src/reader.c (get_merge_function): Don't set the merger type yet.
9986 (record_merge_function_type): New function for setting the merger type
9987 and checking for clashes.
9988 (grammar_current_rule_merge_set): Set the location of the %merge for
9989 the current rule.
9990 (packgram): Invoke record_merge_function_type for each rule now that
9991 all symbol type declarations have been parsed.
9992 * src/reader.h (merger_list.type_declaration_location): New member
9993 storing the location of the first %merge from which the type for this
9994 merging function was derived.
9995 * src/symlist.h (symbol_list.merger_declaration_location): New member
9996 storing the location of a rule's %merge, if any.
9997 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
9998 declared later): New test to catch the error fixed by the above patch.
9999
10000 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10001
10002 Get action warnings (grammar_rule_check) right even when symbol
10003 declarations appear after the rules. Discussed at
10004 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
10005 and
10006 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
10007 Don't mistake the type of $$ in a midrule to be that of its parent
10008 rule's $$.
10009 * src/reader.c (grammar_current_rule_end): Don't invoke
10010 grammar_rule_check yet since not all symbol declarations may have been
10011 parsed yet.
10012 (grammar_midrule_action): Likewise.
10013 Don't record whether the midrule's $$ has been used yet since actions
10014 haven't been translated yet.
10015 Record the midrule's parent rule and its RHS index within the parent
10016 rule.
10017 (grammar_current_rule_action_append): Don't translate the action yet
10018 since not all symbol declarations may have been parsed yet and, thus,
10019 warnings about types for $$, $n, @$, and @n can't be reported yet.
10020 (packgram): Translate the action and invoke grammar_rule_check now that
10021 all symbol declarations have been parsed.
10022 * src/scan-code.l (handle_action_dollar): Now that this is invoked
10023 after parsing the entire grammar file, the symbol list here in the case
10024 of a midrule is actually the midrule's empty RHS, so reference its
10025 parent rule's RHS where necessary.
10026 On the other hand, now that you can already know it's a midrule, you
10027 aren't forced to think $$ has the same type as its parent rule's $$.
10028 (handle_action_at): In the case of a midrule, reference the parent rule
10029 where necessary.
10030 * src/symlist.c (symbol_list_new): Initialize new midrule-related
10031 members.
10032 (symbol_list_length): Now that this is invoked after all rules have
10033 been parsed, a NULL symbol (rather than a NULL symbol list node)
10034 terminates a rule. symbol_list_print already does this correctly.
10035 * src/symlist.h (symbol_list.midrule_parent_rule,
10036 symbol_list.midrule_parent_rhs_index): New members so that midrules can
10037 remember their relationships with their parents.
10038 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
10039 fixed by the above patch.
10040 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
10041 implementing...
10042 (Unused values): ... this old test case and...
10043 (Unused values before symbol declarations): ... this new test case.
10044 This one is the same as `Unused values' except that all symbol
10045 declarations appear after the rules in order to catch the rest of the
10046 errors fixed by the above patch.
10047
10048 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
10049
10050 More cleanup.
10051 * src/reader.c (current_rule): Declare it static since it's no longer
10052 used outside this file.
10053 (grammar_current_rule_action_append): Remove redundant arguments from
10054 translate_rule_action invocation.
10055 * src/reader.h (current_rule): Remove this unused extern.
10056 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
10057 * src/scan-code.l (translate_rule_action): Likewise.
10058
10059 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
10060
10061 Clean up yesterday's patch.
10062 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
10063 to...
10064 * src/reader.c (grammar_current_rule_action_append): ... here for
10065 consistency with grammar_current_rule_symbol_append.
10066 * tests/regression.at (Braced code in declaration in rules section):
10067 Make yyerror and yylex static as usual.
10068
10069 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
10070
10071 Fix bug that mistakes braced code in a declaration in the rules section
10072 to be a rule action. Mentioned at
10073 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
10074 * src/scan-gram.l: Move midrule action detection from the start of the
10075 scanning of any braced code to...
10076 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
10077 action. For readability, use $2 and @2 rather than the equivalent
10078 global variables.
10079 * tests/regression.at (Braced code in declaration in rules section):
10080 New test to catch the error fixed by the above patch.
10081
10082 Work on code readability some.
10083 * src/scan-code.l (current_rule): Get rid of this misleading and
10084 redundant declaration: it's actually extern'ed in reader.h.
10085 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
10086 translate_action): Add a rule argument and use it instead of the global
10087 current_rule.
10088 (translate_rule_action): This already receives current_rule through an
10089 argument, so pass it on to translate_action instead of assigning
10090 current_rule to current_rule.
10091 (translate_symbol_action, translate_code): Pass rule = NULL to
10092 translate_action.
10093
10094 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
10095
10096 Rename %before-definitions to %start-header and %after-definitions to
10097 %end-header. Don't use these declarations to separate pre-prologue
10098 blocks from post-prologue blocks. Add new order-independent
10099 declarations %before-header and %after-header as alternatives to the
10100 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
10101 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
10102 * NEWS (2.3+): Update for these changes.
10103 * data/glr.c (b4_before_definitions): Update to...
10104 (b4_start_header): ... this.
10105 (b4_after_definitions): Update to...
10106 (b4_end_header): ... this.
10107 * data/glr.cc: Likewise.
10108 * data/lalr1.cc: Likewise.
10109 * data/yacc.c: Likewise.
10110 * doc/bison.texinfo (The prologue): Update names, and replace remaining
10111 prologue blocks with %*-header declarations.
10112 (Calc++ Parser): Likewise.
10113 (Decl Summary): Update names.
10114 (Table of Symbols): Update description.
10115 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
10116 (PERCENT_END_HEADER): ... this.
10117 (PERCENT_BEFORE_DEFINITIONS): Update to...
10118 (PERCENT_START_HEADER): ... this.
10119 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10120 (declaration): Update token names and m4 macro names.
10121 When parsing %end-header and %start-header, invoke translate_code
10122 before muscle_code_grow, and no longer set global booleans to remember
10123 whether these declarations have been seen.
10124 Parse new %after-header and %before-header.
10125 * src/reader.c (before_definitions, after_definitions): Remove.
10126 (prologue_augment): Accept a new bool argument to specify whether to
10127 augment the pre-prologue or post-prologue.
10128 * src/reader.h (before_definitions, after_definitions): Remove these
10129 extern's.
10130 (prologue_augment): Add new bool argument.
10131 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
10132 (PERCENT_END_HEADER): ... this.
10133 (PERCENT_BEFORE_DEFINITIONS): Update to...
10134 (PERCENT_START_HEADER): ... this.
10135 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
10136 * tests/actions.at (Printers and Destructors): Update names.
10137
10138 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
10139
10140 Add comparison operators for C++ location classes. Discussed at
10141 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
10142 * data/c++.m4 (b4_define_location_comparison): New boolean %define
10143 declaration indicating whether filename_type has an operator==. If
10144 filename_type is `std::string', it defaults to `1', `0' otherwise.
10145 * data/location.cc: Iff b4_define_location_comparison is `1', add
10146 operator== and operator!= for class position and for class location.
10147
10148 Some minor fixes.
10149 * src/scan-action.l: Remove unused file.
10150 * src/symtab.c (symbol_printer_set): Use printer_location not
10151 destructor_location.
10152 * src/symtab.h (struct symbol): Replace incorrect source comment for
10153 printer members.
10154 * tests/input.at (Incompatible Aliases): Update output with correct
10155 printer location.
10156
10157 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
10158
10159 Don't put the pre-prologue in the header file. For the yacc.c code
10160 file and the glr.c header and code files, move the pre-prologue before
10161 the token definitions. Add new %before-definitions and
10162 %after-definitions to declare code that will go in both the header file
10163 and code file. Discussed at
10164 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
10165 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
10166 and
10167 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
10168 * NEWS (2.3+): Describe these changes.
10169 * data/glr.c (b4_pre_prologue): Move from within to before...
10170 (b4_shared_declarations): ... this.
10171 Add new b4_before_definitions before b4_token_enums.
10172 Add new b4_after_definitions at the end.
10173 * data/glr.cc (b4_pre_prologue): Replace with...
10174 (b4_before_definitions): ... this in the header file.
10175 (b4_after_definitions): New near the end of the header file.
10176 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
10177 code file right before including the header file.
10178 (b4_before_definitions): New in the previous position of
10179 b4_pre_prologue in the header file.
10180 (b4_after_definitions): New near the end of the header file.
10181 * data/yacc.c: Clean up some m4 quoting especially in the header file.
10182 (b4_token_enums_defines): In the code file, move to right before
10183 YYSTYPE for consistency with the header file.
10184 (b4_before_definitions): New right before b4_token_enums_defines in
10185 both the header and code file.
10186 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
10187 header and code file.
10188 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
10189 of prologues for %union dependencies.
10190 (Decl Summary): In %defines description, mention the effect of
10191 %before-definitions and %after-definitions on the header file.
10192 (Calc++ Parser): Forward declare driver in a %before-definitions rather
10193 than in the pre-prologue so that make check succeeds.
10194 (Table of Symbols): Add entries for %before-definitions and
10195 %after-definitions.
10196 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
10197 %before-definitions.
10198 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
10199 (declaration): Parse those declarations and append to
10200 b4_before_definitions and b4_after_definitions, respectively.
10201 * src/reader.c (before_definitions, after_definitions): New bools to
10202 track whether those declarations have been seen.
10203 (prologue_augment): Add to the post-prologue if %union,
10204 %before-definitions, or %after-definitions has been seen.
10205 * src/reader.h (before_definitions, after_definitions): New extern's.
10206 * src/scan-gram.l: Scan the new declarations.
10207 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
10208 prologue block in a %before-definitions or a %after-definitions based
10209 on whether the %union is declared.
10210 * tests/regression.at (Early token definitions with --yacc, Early token
10211 definitions without --yacc): Move tests for token definitions into the
10212 post-prologue since token names are no longer defined in the
10213 pre-prologue.
10214
10215 2006-06-20 Akim Demaille <akim@epita.fr>
10216
10217 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
10218 (symbol_get): Use it.
10219 * src/parse-gram.y: Use it.
10220
10221 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
10222
10223 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
10224 build succeeds when configured with --enable-gcc-warnings.
10225
10226 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
10227
10228 * src/parse-gram.y (char_name): New function.
10229 (CHAR, STRING, string_content): For %printer, properly escape.
10230 (ID): Prefer fputs to fprintf.
10231 (id): Reindent to be consistent with other rules.
10232 Properly quote char.
10233
10234 The Translation Project changed its way of publishing translations
10235 to maintainers. I haven't received any responses to my request
10236 for supporting the old way, or for documenting the new way. I
10237 have modified 'bootstrap' to use screen scraping
10238 (in this case, HTML scraping). This is unreliable and inelegant,
10239 but I don't see any better way. Yuck.
10240 * bootstrap (TP_URL, WGET_COMMAND): New vars.
10241 (get_translations): New function, which uses HTML scraping to
10242 deduce locations of latest translations.
10243 Use this function to grab both bison and bison-runtime .po files.
10244 Don't bother priming the pump for the runtime-po domain any more,
10245 as it's now translated better than bison is.
10246
10247 2006-06-19 Akim Demaille <akim@epita.fr>
10248
10249 * src/scan-gram.l: No longer "parse" things after `%union' until
10250 `{'. Rather, return a single "%union" token.
10251 No longer make symbols: return strings, and leave the conversion
10252 to symbols to the parser.
10253 (SC_PRE_CODE, token_type): Remove.
10254 * src/parse-gram.y (%union): New field `character'.
10255 Sort tokens.
10256 (CHAR): New token.
10257 (ID, ID_COLON): Now that the scanner no longer makes them
10258 identifiers, adjust all uses to invoke symbol_get.
10259 (id_colon): New, wraps the conversion from string to symbol.
10260 (%union): Accept a possible union_name.
10261 (symbol): Now can be a char.
10262 * data/c.m4 (b4_union_name): Leave a default value.
10263 * data/glr.c, data/yacc.c: Use it.
10264
10265 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
10266
10267 For associating token numbers with token names for "yacc.c", don't use
10268 #define statements unless `--yacc' is specified; always use enum
10269 yytokentype. Most important discussions start at:
10270 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
10271 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
10272 and
10273 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
10274 * NEWS (2.3+): Mention.
10275 * data/c.m4 (b4_yacc_if): New.
10276 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
10277 token #define's.
10278 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
10279 on token name definitions.
10280 * src/getargs.c (usage): Capitalize `Yacc' in English.
10281 * src/output.c (prepare): Define b4_yacc_flag.
10282 * tests/regression.at (Early token definitions): Test that tokens names
10283 are defined before the pre-prologue not just before the post-prologue.
10284 Remove this test case and copy to...
10285 (Early token definitions with --yacc): ... this to test #define's.
10286 (Early token definitions without --yacc): ... and this to test enums.
10287
10288 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
10289
10290 * NEWS: Reword the post-2.3 change to not be so optimistic about
10291 removing the old "look-ahead" spelling.
10292 Update previous look-ahead/lookahead change reports.
10293 * REFERENCES: look-ahead -> lookahead (since that's
10294 what he actually wrote).
10295 * doc/refcard.tex: look ahead -> lookahead,
10296 look-ahead -> lookahead
10297
10298 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
10299
10300 For consistency, use `lookahead' instead of `look-ahead' or
10301 `look_ahead'. Discussed starting at
10302 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
10303 and then at
10304 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
10305 * NEWS: For the next release, note the change to `--report'.
10306 * TODO, doc/bison.1: Update English.
10307 * doc/bison.texinfo: Update English.
10308 (Understanding Your Parser, Bison Options): Document as
10309 `--report=lookahead' rather than `--report=look-ahead'.
10310 * src/conflicts.c: Update English in comments.
10311 (lookahead_set): Rename from look_ahead_set.
10312 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
10313 (resolve_sr_conflict): Rename local look_ahead_tokens to
10314 lookahead_tokens, and update other uses.
10315 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
10316 count_rr_conflicts, conflicts_free): Update uses.
10317 * src/getargs.c (report_args): Move "lookahead" before alternate
10318 spellings.
10319 (report_types): Update uses.
10320 (usage): For `--report' usage description, state `lookahead' spelling
10321 rather than `look-ahead'.
10322 * src/getargs.h (report.report_lookahead_tokens): Rename from
10323 report_look_ahead_tokens.
10324 * src/lalr.c: Update English in comments.
10325 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
10326 (state_lookahead_tokens_count): Rename from
10327 state_look_ahead_tokens_count.
10328 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10329 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
10330 Rename local n_look_ahead_tokens to n_lookahead_tokens.
10331 Update other uses.
10332 Update English in output.
10333 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
10334 * src/print.c: Update English in comments.
10335 (lookahead_set): Rename from look_ahead_set.
10336 (print_reduction): Rename argument lookahead_token from
10337 look_ahead_token.
10338 (print_core, state_default_rule, print_reductions, print_results):
10339 Update uses.
10340 * src/print_graph.c: Update English in comments.
10341 (print_core): Update uses.
10342 * src/state.c: Update English in comments.
10343 (reductions_new): Update uses.
10344 (state_rule_lookahead_tokens_print): Rename from
10345 state_rule_look_ahead_tokens_print, and update other uses.
10346 * src/state.h: Update English in comments.
10347 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
10348 (state_rule_lookahead_tokens_print): Rename from
10349 state_rule_look_ahead_tokens_print.
10350 * src/tables.c: Update English in comments.
10351 (conflict_row, action_row): Update uses.
10352 * tests/glr-regression.at
10353 (Incorrect lookahead during deterministic GLR,
10354 Incorrect lookahead during nondeterministic GLR): Rename
10355 print_look_ahead to print_lookahead.
10356 * tests/torture.at: Update English in comments.
10357 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
10358 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
10359 (Many lookahead tokens): Update uses.
10360 * data/glr.c: Update English in comments.
10361 * lalr1.cc: Likewise.
10362 * yacc.c: Likewise.
10363 * src/conflicts.h: Likewise.
10364 * src/lalr.h: Likewise.
10365 * src/main.c: Likewise.
10366 * src/output.c: Likewise.
10367 * src/parse-gram.c: Likewise.
10368 * src/tables.h: Likewise.
10369 * tests/calc.at: Likewise.
10370
10371 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
10372
10373 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
10374
10375 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
10376
10377 * TODO: Add request from Nelson H. F. Beebe to be able to install
10378 Bison without installing the yacc script.
10379
10380 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10381
10382 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
10383 and yytext if they're already #define'd.
10384 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
10385 * src/scan-code-c.c: ... here.
10386 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
10387 <config.h>.
10388
10389 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
10390
10391 Get Bison to build again when configured with --enable-gcc-warnings.
10392 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
10393 missing #include's.
10394 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
10395 loc argument as it shadows a global.
10396 * src/scan-gram.l: Remove stray comma that prevents boundary_set
10397 invocation.
10398
10399 * src/.cvsignore: Add scan-code.c.
10400
10401 2006-06-07 Akim Demaille <akim@epita.fr>
10402
10403 * src/scan-gram.l: Move the "add a trailing ; to actions" code
10404 to...
10405 * src/scan-code.l: here.
10406 * tests/input.at (Torturing the Scanner): Fix another location
10407 error.
10408
10409 2006-06-07 Akim Demaille <akim@epita.fr>
10410
10411 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
10412
10413 2006-06-06 Akim Demaille <akim@epita.fr>
10414
10415 Extract the parsing of user actions from the grammar scanner.
10416 As a consequence, the relation between the grammar scanner and
10417 parser is much simpler. We can also split "composite tokens" back
10418 into simple tokens.
10419 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
10420 * src/scan-gram.l (add_column_width, adjust_location): Move to and
10421 rename as...
10422 * src/location.h, src/location.c (add_column_width)
10423 (location_compute): these.
10424 Fix the column count: the initial column is 0.
10425 (location_print): Be robust to ending column being 0.
10426 * src/location.h (boundary_set): New.
10427 * src/main.c: Adjust to scanner_free being renamed as
10428 gram_scanner_free.
10429 * src/output.c: Include scan-code.h.
10430 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
10431 Use boundary_set.
10432 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
10433 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
10434 which is now, again, a separate token.
10435 Adjust all dependencies.
10436 Whereever actions with $ and @ are used, use translate_code.
10437 (action): Remove this nonterminal which is now useless.
10438 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
10439 (grammar_current_rule_action_append): Use translate_code.
10440 (packgram): Bound check ruleno, itemno, and rule_length.
10441 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
10442 (last_string, last_braced_code_loc, max_left_semantic_context)
10443 (scanner_initialize, scanner_free, scanner_last_string_free)
10444 (gram_out, gram_lineno, YY_DECL_): Move to...
10445 * src/scan-gram.h: this new file.
10446 (YY_DECL): Rename as...
10447 (GRAM_DECL): this.
10448 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
10449 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10450 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10451 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10452 Move these declarations, and...
10453 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
10454 these to...
10455 * src/flex-scanner.h: this new file.
10456 * src/scan-gram.l (rule_length, rule_length_overflow)
10457 (increment_rule_length): Remove.
10458 (last_braced_code_loc): Rename as...
10459 (gram_last_braced_code_loc): this.
10460 Adjust to the changes of the parser.
10461 Move all the handling of $ and @ into...
10462 * src/scan-code.l: here.
10463 * src/scan-gram.l (handle_dollar, handle_at): Remove.
10464 (handle_action_dollar, handle_action_at): Move to...
10465 * src/scan-code.l: here.
10466 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
10467 scan-code.h, scan-code-c.c, scan-gram.h.
10468 (EXTRA_bison_SOURCES): Add scan-code.l.
10469 (BUILT_SOURCES): Add scan-code.c.
10470 (yacc): Be robust to white spaces.
10471
10472 * tests/conflicts.at, tests/input.at, tests/reduce.at,
10473 * tests/regression.at: Adjust the column numbers.
10474 * tests/regression.at: Adjust the error message.
10475
10476 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10477
10478 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10479 Use Akim's wording from
10480 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
10481
10482 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
10483
10484 Between Bison releases, manually append `+' to the previous Bison
10485 release number, and use that as a signal to automatically print the
10486 ChangeLog's CVS Id keyword from --version. Discussed starting at
10487 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
10488 * ChangeLog: Add Id header.
10489 * configure.ac (AC_INIT): Append `+' to `2.3'.
10490 * src/.cvsignore: Add revision.c.
10491 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
10492 (BUILT_SOURCES): Add revision.c.
10493 (revision.c): New target rule. This file defines a new global variable
10494 named revision. It initializes it with either the Id from ChangeLog
10495 or, if VERSION doesn't contain `+', with the empty string.
10496 * src/getargs.c (version): Print the value of revision.
10497 * src/revision.h: Extern revision.
10498
10499 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
10500
10501 * NEWS: Version 2.3.
10502 * configure.ac (AC_INIT): Likewise.
10503
10504 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
10505
10506 * data/glr.c (YYRECOVERING): Define to be a function-like macro
10507 with no arguments, not as an object-like macro. This is for
10508 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
10509 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
10510 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
10511 Document this.
10512
10513 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
10514
10515 * src/getargs.c (usage): Back out yesterday's modification of the
10516 --help output so that we don't have to wait for translation before
10517 releasing 2.3.
10518
10519 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
10520
10521 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
10522 Problem reported by Akim Demaille.
10523
10524 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
10525
10526 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
10527
10528 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
10529
10530 * data/yacc.c (yy_reduce_print): Omit trailing white space in
10531 generated source code. Problem reported by Frans Englich in
10532 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
10533
10534 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
10535
10536 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
10537 shell, not within 'make', so that 'make' by an ordinary builder
10538 (using GNU make) does not worry about configuring gzip. This also
10539 works around a bug reported independently by Keith Thompson and by
10540 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
10541 stderr rather than stdout, messing up the build logs.
10542
10543 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10544
10545 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
10546 to make sure that YYID will never be unused. This fixes a 'make
10547 maintainer-check' failure caused by the recent changes to the 'Trivial
10548 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
10549 not used.
10550 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
10551
10552 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
10553
10554 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
10555 state before an empty RHS is always resolved here. Only the location
10556 of that state is guaranteed to be resolved, and that's enough. This
10557 fixes the remaining bug reported by Derek M. Jones in
10558 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10559 * tests/glr-regression.at (Uninitialized location when reporting
10560 ambiguity): Test the above case.
10561 Also, the embedded comments in this test case claim it checks the case
10562 of an empty RHS that has inherited the initial location. However, the
10563 corresponding LHS was already resolved, so yyresolveLocations didn't
10564 actually have reason to modify it. Fix this by forcing
10565 nondeterministic operation at the beginning of the parse.
10566
10567 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
10568
10569 * data/c.m4 (b4_yy_symbol_print_generate):
10570 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
10571 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
10572 of the bugs reported today by Derek M Jones in
10573 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
10574 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
10575 defined to be a type name without parens or brackets.
10576 (Location Type): Similarly for YYLTYPE.
10577 * tests/regression.at (Trivial grammars): Put in a test for this
10578 bug that will be caught by 'make maintainer-check' (though not,
10579 alas, by 'make check' unless your compiler is picky).
10580
10581 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
10582
10583 * NEWS: Version 2.2.
10584 * configure.ac (AC_INIT): Likewise.
10585
10586 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
10587
10588 * data/glr.c (yyreportTree): Make room in yystates for the state
10589 preceding the RHS. This fixes the segmentation fault reported by Derek
10590 M. Jones in
10591 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
10592 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
10593 to the user. Reported for yyreportTree by Derek M. Jones later in the
10594 same thread.
10595 * THANKS: Add Derek M. Jones.
10596 Update my email address.
10597 Fix typo in Steve Murphy's name.
10598
10599 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
10600
10601 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
10602 checking against YYLAST that caused the parser to miss a potential
10603 alternative in its diagnostic.
10604 Problem reported by Maria Jose Moron Fernandez in
10605 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
10606 * data/lalr1.cc (yysyntax_error_): Likewise.
10607 * data/yacc.c (yysyntax_error): Likewise.
10608 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
10609 tokens, in case we run into an older C compiler.
10610 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
10611 Use them to check for the off-by-one error fixed above.
10612
10613 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
10614 YYSIZE_T, not size_t.
10615 * tests/regression.at (Trivial grammars): New test, to catch
10616 the error fixed by the above patch.
10617
10618 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10619
10620 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
10621 scheme.
10622 Reported by Steve Murphy.
10623
10624 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10625
10626 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
10627 * data/glr.cc: b4_location_flag is now b4_locations_flag.
10628
10629 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10630
10631 Implement --trace=m4.
10632 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
10633 * src/output.c (output_skeleton): When set, pass -dV to m4.
10634
10635 Factor the handling of flags in m4.
10636 * src/output.c (prepare): Rename the muscle names debug, defines,
10637 error_verbose to debug_flag, defines_flag, error_verbose_flag.
10638 * data/c.m4: Adjust.
10639 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
10640 Use b4_define_flag_if to define other b4_FLAG_if macros.
10641 (b4_location_if): As a consequence, rename as...
10642 (b4_locations_if): this, for consistency.
10643 Adjust all the skeletons.
10644
10645 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10646
10647 * etc/bench.pm: Shorten bench names.
10648
10649 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
10650
10651 * src/output.h, src/output.c (error_verbose): Move to...
10652 * src/getargs.h, src/getargs.c: here.
10653 Sort the flags.
10654 Adjust dependencies.
10655
10656 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
10657
10658 * data/c.m4 (b4_copyright): Put the special exception for Bison
10659 skeletons here, so we don't have to put it in each skeleton. All
10660 uses changed. Suggested by Akim Demaille. Also, wrap the
10661 copyright notice, in case it is longer than 80 columns. Replace
10662 comma by newline after title.
10663
10664 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
10665
10666 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
10667 incompatibility, not a bug. Mention that it wasn't fixed as of
10668 flex 2.5.33.
10669
10670 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10671
10672 * examples/extexi: Enforce the precedence of concatenation over
10673 >>.
10674 Reported by Tommy Nordgren.
10675
10676 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
10677
10678 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
10679 with the member "token".
10680 Reported by Martin Nylin.
10681
10682 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
10683
10684 * data/glr.c: Switch to Bison 2.2 special-exception language in
10685 the copyright notice. Use more-regular format for titles and
10686 copyright notices.
10687 * data/glr.cc: Likewise.
10688 * data/location.cc: Likewise.
10689 * data/yacc.cc: Likewise.
10690 * doc/bison.texinfo (Conditions): Document this.
10691 * NEWS: likewise. Upgrade version to 2.2.
10692
10693 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
10694
10695 * data/glr.cc: Remove dead code.
10696
10697 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
10698
10699 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
10700 that variable and the line breaks the bootstrap. Problem reported
10701 by Juan M. Guerrero.
10702
10703 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10704
10705 * doc/bison.texinfo (Multiple start-symbols): New.
10706
10707 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
10708
10709 * etc/README, etc/bench.pl: New.
10710
10711 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
10712
10713 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
10714 rule.
10715 Reported by Mickael Labau.
10716 * tests/input.at (Torturing the Scanner): Test it.
10717
10718 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
10719
10720 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
10721 Problem reported by Bob Rossi.
10722
10723 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
10724
10725 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
10726 and didn't really work.
10727 For the index, use @ifnotinfo, not @iftex.
10728 Minor cleanups of spacing and terminology.
10729
10730 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10731
10732 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
10733 of AT_NAME_PREFIX when %name-prefix is not used.
10734
10735 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
10736
10737 Apply --prefix to C++ skeletons too: they change the namespace.
10738 The test suite already exercize these cases.
10739 * data/c++.m4 (b4_namespace): New.
10740 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
10741 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
10742 * data/yacc.c, data/glr.c: Remove a useless `[]'.
10743 * doc/bison.texinfo: Document it.
10744 (Option Cross Key): Use @multitable in all formats. It looks
10745 nicer, even in TeX outputs.
10746 (Rules): Use the same code whatever the output type is.
10747 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
10748 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
10749 * tests/calc.at: Use it, instead of hard coding `yy'.
10750
10751 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10752
10753 * TODO: Remove dead items.
10754
10755 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10756
10757 * doc/FAQ: Remove, merged into...
10758 * doc/bison.texinfo (FAQ): this.
10759 * doc/Makefile.am (EXTRA_DIST): Adjust.
10760
10761 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
10762
10763 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
10764 even if empty.
10765 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
10766 * doc/bison.texinfo (Calc++ Scanner): Use it.
10767
10768 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
10769
10770 Fix two nits reported by twlevo, plus one more that I discovered.
10771
10772 * src/assoc.h (assoc_to_string): Give a name to the arg, as
10773 this is the usual Bison style.
10774 * src/location.h (location_print): Likewise.
10775
10776 * src/reader.h (token_name): Likewise.
10777
10778 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
10779
10780 Fix some nits reported by twlevo.
10781 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
10782 and "POSIX". Use more-modern syntax for URLs. Mention C++
10783 and ask for Java. Don't hardwire OS version numbers. Add
10784 copyright notice.
10785 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
10786 * src/conflicts.c (solved_conflicts_obstack): Now static.
10787
10788 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
10789
10790 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
10791 page. Say "you can use it" not "you may use it" as on the web page;
10792 we're describing capabilities not granting permission.
10793
10794 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
10795
10796 * data/glr.c (yyresolveLocations): Rename local variables to avoid
10797 shadowing warnings. Use usual patter for iterating through RHS.
10798 * tests/glr-regression.at
10799 (Uninitialized location when reporting ambiguity):
10800 Modify yylex so that it uses its argument, rather than trying
10801 to rely on ARGSUSED (which doesn't work for gcc with warnings).
10802 const char -> char const.
10803
10804 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
10805 Don't use tabs inside commands; it messes up 'ps'.
10806 Problem reported by twlevo.
10807
10808 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
10809
10810 * tests/glr-regression.at (Uninitialized location when reporting
10811 ambiguity): New test case.
10812 * data/glr.c (yyresolveLocations): New function, which uses
10813 YYLLOC_DEFAULT.
10814 (yyresolveValue): Invoke yyresolveLocations before reporting an
10815 ambiguity.
10816 * doc/bison.texinfo (Default Action for Locations): Note
10817 YYLLOC_DEFAULT's usage for ambiguity locations.
10818 (GLR Semantic Actions): Cross-reference those notes.
10819
10820 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
10821
10822 * tests/glr-regression.at (Leaked semantic values when reporting
10823 ambiguity): Remove unnecessary union and type declarations.
10824 (Leaked lookahead after nondeterministic parse syntax error): New test
10825 case.
10826 * data/glr.c (yyparse): Check for zero stacks remaining before
10827 attempting to shift the lookahead so that you don't lose it.
10828
10829 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10830
10831 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
10832 * tests/glr-regression.at (Leaked semantic values when reporting
10833 ambiguity): New test case.
10834 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
10835 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
10836 now unnecessary yystackp parameter.
10837 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
10838 destructors can be called.
10839
10840 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
10841 in existing testcases.
10842
10843 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
10844
10845 Don't leak semantic values for parent RHS when a user action cuts the
10846 parser, and clean up related code a bit.
10847 * tests/glr-regression.at (Leaked merged semantic value if user action
10848 cuts parse): Rename to...
10849 (Leaked semantic values if user action cuts parse): ... this. Add check
10850 for leaked parent RHS values.
10851 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
10852 between an unresolved state (non-empty chain of semantic options) and
10853 an incomplete one (signaled by an empty chain).
10854 (yyresolveStates): Document the interface. Move all manipulation of a
10855 successfully or unsuccessfully resolved yyGLRState to...
10856 (yyresolveValue): ... here so that yyresolveValue always leaves a
10857 yyGLRState with consistent data and thus is easier to understand.
10858 Remove the yyvalp and yylocp parameters since they are always just
10859 taken from the yys parameter. When reporting a discarded merged value
10860 in debugging output, note that it is incompletely merged. Document the
10861 interface.
10862 (yyresolveAction): If resolving any of the RHS states fails, destroy
10863 them all rather than leaking them. Thus, as long as user actions are
10864 written to clean up the RHS correctly, yyresolveAction always cleans up
10865 the RHS of a semantic option. Document the interface.
10866
10867 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
10868
10869 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
10870 led to a segmentation fault in GNU Pascal. Problem reported
10871 by Waldek Hebisch.
10872
10873 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
10874
10875 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
10876 mid-rule action inside a nonterminal symbol in order to declare a
10877 destructor for its semantic value.
10878
10879 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
10880
10881 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
10882 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
10883 __cplusplus && ! defined _STDLIB_H && !
10884 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
10885 defined free))]: Include <stdlib.h> rather than rolling our own
10886 declarations of malloc and free, to avoid problems with
10887 incompatible declarations (using 'throw') C++'s stdlib.h. This
10888 should fix Debian bug 340012
10889 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
10890 reported by Guillaume Melquiond.
10891
10892 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10893
10894 * NEWS: Clarify symbols versus types in unused-value warnings.
10895
10896 * configure.ac (AC_INIT): Bump version number.
10897
10898 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
10899
10900 * NEWS: Version 2.1a.
10901 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
10902 since C99 requires this.
10903
10904 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
10905
10906 * m4/c-working.m4: New file.
10907 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
10908
10909 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
10910
10911 * Makefile.maint: Merge from coreutils.
10912
10913 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
10914
10915 More portability fixes for problems summarized by Nelson H. F. Beebe.
10916
10917 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
10918 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
10919 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
10920 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
10921 messes up because C++ code is compiled in 32-bit mode but linked
10922 in 64-bit mode.
10923
10924 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
10925
10926 More portability fixes for problems summarized by Nelson H. F. Beebe.
10927
10928 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
10929 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
10930
10931 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
10932 nodist_PROGRAMS, since we don't need to actually compile the
10933 example if we're just doing a plain 'make'. This avoids bothering
10934 the installer unnecessarily about problems due to weird C++
10935 compilers.
10936
10937 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
10938
10939 More portability fixes for problems summarized by Nelson H. F. Beebe.
10940
10941 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
10942 than #include "...", and compile with -I'.'. The old method was
10943 not portable, according to Posix and the C standard, and it does
10944 not work with Sun C 5.7, where previous #line directives affect
10945 the working directory used in later #include "..." directives.
10946
10947 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10948
10949 Various DJGGP specific issues in /djgpp
10950
10951 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
10952
10953 More portability fixes for problems summarized by Nelson H. F. Beebe.
10954
10955 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
10956 '#include <map>' works and that you can apply ++ to iterators.
10957
10958 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
10959
10960 Work around portability problems summarized by Nelson H. F. Beebe in
10961 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
10962
10963 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
10964 that '#include <string>' works.
10965
10966 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
10967 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
10968 "warning: sorry: semantics of inline function static data `const
10969 unsigned char translate_table[262]' are wrong (you'll wind up with
10970 multiple copies)".
10971
10972 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
10973 or, xor to not_, and_, or_, and xor_, respectively. This works
10974 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
10975 random system header somewhere that includes the equivalent of
10976 <iso646.h>.
10977
10978 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
10979 -E" works; it apparently doesn't work with PathScale EKO Compiler
10980 Suite Version 2.0.
10981
10982 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
10983
10984 During deterministic GLR operation, user actions should be able to
10985 influence the parse by changing yychar. To make this easier to fix and
10986 to make glr.c easier to evolve in general, don't maintain yytoken in
10987 parallel with yychar; just compute yytoken when needed.
10988 * tests/glr-regression.at (Incorrect lookahead during deterministic
10989 GLR): Check that setting yychar in a user action has the intended
10990 effect.
10991 * data/glr.c (yyGLRStack): Remove yytokenp member.
10992 (yyclearin): Don't set *yytokenp.
10993 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
10994 yychar rather than *yytokenp to determine the current lookahead.
10995 Compute yytoken locally when needed.
10996 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
10997 point to.
10998
10999 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
11000 after `--report' documentation.
11001
11002 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
11003
11004 * src/parse-gram.y (grammar_declaration): Location of printer
11005 symbol is @1, not list->location. Bug reported by twlevo.
11006 * tests/input.at (Incompatible Aliases): Adjust to above change.
11007
11008 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
11009
11010 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
11011 all the test at once. This makes the output easier to read in the
11012 normal case.
11013
11014 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
11015 got from <http://bro-ids.org/download.html>. The bug is that
11016 when two actions appeared in succession, the second one was
11017 scanned before the first one was added to the grammar rule
11018 as a midrule action. Bison then output the incorrect warning
11019 "parse.y:905.17-906.36: warning: unused value: $3".
11020 * src/parse-gram.y (BRACED_CODE, action): These are no longer
11021 associated with a value.
11022 (rhs): Don't invoke grammar_current_rule_action_append.
11023 (action): Invoke it here instead.
11024 * src/reader.c (grammar_midrule_action): Now extern.
11025 (grammar_current_rule_action_append): Don't invoke
11026 grammar_midrule_action; that is now the scanner's job.
11027 * src/reader.h (last_string, last_braced_code_loc):
11028 (grammar_midrule_action): New decls.
11029 * src/scan-gram.l (last_string): Now extern, sigh.
11030 (last_braced_code_loc): New extern variable.
11031 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
11032 rule already has an action.
11033 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
11034 * tests/input.at (AT_CHECK_UNUSED_VALUES):
11035 Add some tests to check that the above changes fixed the bug.
11036
11037 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
11038
11039 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
11040 All used changed. Check whether the symbol has a destructor,
11041 not whether it is typed.
11042 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
11043 that the values are still reported as unused. All line numbers
11044 adjusted.
11045
11046 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
11047
11048 Work around a bug in bro 0.8, which underparenthesizes its
11049 definition of YYLLOC_DEFAULT.
11050 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
11051 their arguments.
11052 * data/lalr1.cc: Likewise.
11053 * data/yacc.cc: Likewise.
11054
11055 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
11056
11057 Work around a bug in Pike 7.0, and give the Pike folks a
11058 better way to override the usual int widths.
11059 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
11060 user can override the types.
11061 (short): #undef, to work around a bug in Pike 7.0.
11062 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
11063 (union yyalloc.yyss): Use yytype_int16 rather than short.
11064 All uses changed.
11065 (yysigned_char): Remove.
11066 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
11067 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
11068 * tests/regression.at (Web2c Actions): Adjust to above changes.
11069
11070 * src/reader.c (check_and_convert_grammar): New function.
11071 (reader): Close the input file even if something went wrong during
11072 parsing. Minor file descriptor leak reported by twlevo.
11073
11074 * src/assoc.c (assoc_to_string): Use a default: abort (); case
11075 to pacify gcc -Wswitch-default.
11076 * src/scan-gram.l (adjust_location): Use a default: break; case
11077 to pacify gcc -Wswitch-default.
11078 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
11079 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11080 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11081 Move these decls to scan-skel.l, since they don't need to be
11082 visible elsewhere.
11083 * src/scan-skel.l: Accept the above decls.
11084 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
11085 is used.
11086
11087 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
11088
11089 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
11090 since we don't want to insist on a version number at the start
11091 of the changelog every time.
11092 * Makefile.maint: Sync from coreutils a bit better.
11093 (sc_trailing_blank): Renamed from sc_trailing_space.
11094 All uses changed.
11095 (sc_no_if_have_config_h, sc_require_config_h):
11096 (sc_prohibit_assert_without_use): New rules.
11097 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
11098 (sc_dd_max_sym_length): Fix leading spaces in rule.
11099 (sc_system_h_headers): Prefix with @.
11100 (sc_useless_cpp_parens, m4-check): Output line numbers.
11101 (changelog-check): Allow version only in head.
11102 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
11103 satisfy new Makefile.maint rule.
11104 * data/glr.c: Likewise.
11105 * data/glr.cc: Likewise.
11106 * data/lalr1.cc: Likewise.
11107 * data/yacc.c: Likewise.
11108 * lib/ebitsetv.c: Likewise.
11109 * lib/lbitset.c: Likewise.
11110 * lib/subpipe.c: Likewise.
11111 * lib/timevar.c: Likewise.
11112 * src/system.h: Likewise.
11113 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
11114 * djgpp/Makefile.maint: Add copyright notice.
11115 * djgpp/README.in: Likewise.
11116 * djgpp/config.bat: Likewise.
11117 * djgpp/config.site: Likewise.
11118 * djgpp/config_h.sed: Likewise.
11119 * djgpp/djunpack.bat: Likewise.
11120 * djgpp/config.sed: Fix copyright notice to match standard format.
11121 * djgpp/subpipe.h: Likewise.
11122 * lib/bitsetv-print.c: Likewise.
11123 * lib/bitsetv.c: Likewise.
11124 * lib/subpipe.h: Likewise.
11125 * lib/timevar.c: Likewise.
11126 * lib/timevar.h: Likewise.
11127 * djgpp/subpipe.c: Use standard recipe for config.h.
11128 * lib/abitset.c: Likewise.
11129 * lib/bitset.c: Likewise.
11130 * lib/bitset_stats.c: Likewise.
11131 * lib/bitsetv-print.c: Likewise.
11132 * lib/bitsetv.c: Likewise.
11133 * lib/ebitsetv.c: Likewise.
11134 * lib/get-errno.c: Likewise.
11135 * lib/lbitset.c: Likewise.
11136 * lib/subpipe.c: Likewise.
11137 * lib/timevar.c: Likewise.
11138 * lib/vbitset.c: Likewise.
11139 * tests/local.at: Likewise.
11140 * src/scan-gram.l: Don't include verify.h, since system.h does
11141 that for us.
11142 * .x-sc_require_config_h: New file.
11143 * .x-sc_unmarked_diagnostics: New file.
11144
11145 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
11146
11147 Be a bit more systematic about using 'abort'.
11148 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
11149 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
11150 Put 'default: abort ();' before some other case, to satisfy older
11151 pedantic compilers.
11152 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11153 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
11154 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
11155 * src/conflicts.c (resolve_sr_conflict): Likewise.
11156 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
11157 (get_decision_str, get_orientation_str, get_node_alignment_str):
11158 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
11159 (get_linestyle_str, get_arrowstyle_str): Likewise.
11160 * src/conflicts.c (resolve_sr_conflict):
11161 Use a default case rather than one for the one remaining enum
11162 value, to catch invalid enum values as well.
11163 * src/lalr.c (set_goto_map, map_goto):
11164 Prefer "assert (FOO);" to "if (!FOO) abort ();".
11165 * src/nullable.c (nullable_compute, token_definitions_output):
11166 Likewise.
11167 * src/reader.c (packgram, reader): Likewise.
11168 * src/state.c (transitions_to, state_new, state_reduction_find):
11169 Likewise.
11170 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
11171 (symbol_pack): Likewise.
11172 * src/tables.c (conflict_row, pack_vector): Likewise.
11173 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
11174 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
11175 * src/system.h: Don't include <assert.h>.
11176 (assert): New macro.
11177
11178 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
11179 (Destructor Decl, Parser Function, Pure Calling):
11180 Describe rules for braces inside C code more carefully.
11181
11182 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
11183
11184 Fix some porting glitches found by Nelson H. F. Beebe.
11185 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
11186 compilers that don't understand that abort () does not return.
11187 * src/state.c (transitions_to): Likewise.
11188 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
11189 that '#include <cstdlib>' works.
11190 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
11191 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
11192 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
11193 for the benefit of some pre-C99 compilers.
11194
11195 * bootstrap: Undo changes to gnulib files that autoreconf made.
11196
11197 Minor fixups to get 'make maintainer-check' to work.
11198 * configure.ac: Don't use -Wnested-externs, as it's incompatible
11199 with the new verify.h implementation.
11200 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
11201 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
11202 * data/yacc.c (YYUSE): Likewise.
11203 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
11204 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
11205 * src/parse-gram.y (declaration): Don't pass a string constant
11206 to a function that expects char *, since GCC might complain
11207 about the constant value.
11208 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
11209 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
11210 before #defining them.
11211 * tests/glr-regression.at
11212 (Incorrectly initialized location for empty right-hand side in GLR):
11213 In yyerror, use the msg arg.
11214 (Corrupted semantic options if user action cuts parse):
11215 (Incorrect lookahead during deterministic GLR):
11216 (Incorrect lookahead during nondeterministic GLR):
11217 Don't name a local var 'index'; it shadows string.h's 'index'.
11218
11219 2006-01-19 Akim Demaille <akim@epita.fr>
11220
11221 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
11222 location, not just parts of it.
11223
11224 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
11225
11226 * NEWS: Document the fact that multiple %unions are now allowed.
11227 * doc/bison.texinfo (Union Decl): Likewise.
11228 * TODO: This feature is now implemented, so remove it from
11229 the wishlist.
11230
11231 * Makefile.maint: Merge with coreutils Makefile.maint.
11232 (CVS_LIST): Use build-aux version if available.
11233 (VERSION_REGEXP): New macro.
11234 (syntax-check-rules): Add sc_no_if_have_config_h,
11235 sc_prohibit_assert_without_use, sc_require_config_h,
11236 sc_useless_cpp_parens.
11237 (sc_obsolete_symbols): Check for O_NDELAY.
11238 (sc_dd_max_sym_length): Track coreutils.
11239 (sc_unmarked_diagnostics): Look in all files, not just *.c.
11240 (sc_useless_cpp_parens): New rule.
11241 (news-date-check): Look for version or today's date.
11242 (changelog-check): Don't require version number near head.
11243 (copyright-check): Use current year instead of hardwiring 2005.
11244 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
11245 (announcement): Add --gpg-key-ID.
11246
11247 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
11248 with "file system".
11249
11250 Avoid undefined behavior that addressed just before the start of an
11251 array. Problem reported by twlevo.
11252 * src/reader.c (packgram): Prepend a new sentinel before ritem.
11253 * src/lalr.c (build_relations): Rely on new sentinel.
11254 * src/gram.c (gram_free): Adjust to new sentinel.
11255
11256 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
11257
11258 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
11259 yylookaheadNeeds. All uses updated.
11260 (yysplitStack): Rename local yynewLookaheadStatuses to
11261 yynewLookaheadNeeds.
11262 * data/glr-regression.at (Incorrect lookahead during nondeterministic
11263 GLR): In comments, change `lookahead status' to `lookahead need'.
11264
11265 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11266
11267 * data/glr.c (yysplitStack): A little stylistic rewrite.
11268
11269 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11270
11271 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
11272
11273 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
11274
11275 * doc/bison.texinfo: Fix some typos.
11276 (GLR Semantic Actions): New subsection discussing special
11277 considerations because GLR semantic actions might be deferred.
11278 (Actions): Mention look-ahead usage of yylval.
11279 (Actions and Locations): Mention look-ahead usage of yylloc.
11280 (Special Features for Use in Actions): Add YYEOF entry and mention it
11281 in the yychar entry.
11282 In the yychar entry, remove mention of the local yychar case (pure
11283 parser) since this is irrelevant information when writing semantic
11284 actions and since it's already discussed in `Table of Symbols' where
11285 yychar is otherwise described as an external variable.
11286 In the yychar entry, don't call it the `current' look-ahead since it
11287 isn't when semantic actions are deferred.
11288 In the yychar and yyclearin entries, add note about deferred semantic
11289 actions.
11290 Add yylloc and yylval entries discussing look-ahead usage.
11291 (Look-Ahead Tokens): When discussing yychar, don't call it the
11292 `current' look-ahead, and do mention yylval and yylloc.
11293 (Error Recovery): Cross-reference `Action Features' when mentioning
11294 yyclearin.
11295 (Table of Symbols): In the yychar entry, don't call it the `current'
11296 look-ahead.
11297 In the yylloc and yylval entries, mention look-ahead usage.
11298
11299 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
11300
11301 * tests/glr-regression.at: Update copyright year to 2006.
11302
11303 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11304
11305 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
11306 use during nondeterministic operation to track which stacks have
11307 actually needed the current lookahead.
11308 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
11309 Allocate, deallocate, resize, and otherwise shuffle space for
11310 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
11311 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
11312 appropriately during nondeterministic operation.
11313 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
11314 members to store the current lookahead to be used by the deferred
11315 user action.
11316 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
11317 from which the RHS is taken. Set the lookahead members of the new
11318 yySemanticOption according to the lookahead status for stack yyk.
11319 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
11320 yyaddDeferredAction.
11321 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
11322 members of yySemanticOption before invoking yyuserAction, and then set
11323 them back to their current values afterward.
11324 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
11325 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
11326 * tests/glr-regression.at: Remove `.' from the ends of recent test case
11327 titles for consistency.
11328 (Leaked merged semantic value if user action cuts parse): In order to
11329 suppress lint warnings, use arguments in merge function, and assign
11330 char value < 128 in main.
11331 (Incorrect lookahead during deterministic GLR): New test case.
11332 (Incorrect lookahead during nondeterministic GLR): New test case.
11333
11334 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11335
11336 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
11337 !yyvaluep as signal that no semantic value is available to print.
11338 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
11339 to print a semantic value.
11340
11341 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
11342
11343 * tests/glr-regression.at: For consistency with my newer test cases,
11344 don't thank myself.
11345
11346 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
11347
11348 * data/glr.c (yyresolveValue): When merging semantic options, if at
11349 least one user action succeeds but a later one cuts the parse, then
11350 destroy the semantic value before returning rather than leaking it.
11351 (yyresolveStates): If a user action cuts the parse and thus
11352 yyresolveValue fails, ignore the (unset) semantic value rather than
11353 corrupting the yyGLRState, and empty the semantic options list since
11354 the user actions should have called all necessary destructors.
11355 Simplify code with YYCHK.
11356 * tests/glr-regression.at (Corrupted semantic options if user action
11357 cuts parse): New test case.
11358 (Undesirable destructors if user action cuts parse): New test case.
11359 Before applying any of this patch, this test case never actually failed
11360 for me... but only because the corrupted semantic options usually
11361 masked this bug.
11362 (Leaked merged semantic value if user action cuts parse): New test
11363 case.
11364
11365 2006-01-05 Akim Demaille <akim@epita.fr>
11366
11367 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
11368
11369 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
11370
11371 * data/c.m4 (b4_c_modern): New macro, with a new provision for
11372 _MSC_VER. Problem reported by Cenzato Marco.
11373 (b4_c_function_def): Use it.
11374 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
11375 b4_c_modern.
11376 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
11377 than rolling our own.
11378
11379 2006-01-04 Akim Demaille <akim@epita.fr>
11380
11381 Also warn about non-used mid-rule values.
11382 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
11383 member.
11384 (symbol_list_new): Adjust.
11385 * src/reader.c (symbol_typed_p): New.
11386 (grammar_rule_check): Use it.
11387 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
11388 Check its rule.
11389 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
11390 Use it.
11391 * tests/actions.at (Exotic Dollars): Adjust.
11392
11393 2006-01-04 Akim Demaille <akim@epita.fr>
11394
11395 * src/reader.c (grammar_midrule_action): If $$ is set in a
11396 mid-rule, move the `used' bit to its lhs.
11397 * tests/input.at (Unused values): New.
11398 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
11399
11400 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
11401
11402 * doc/bison.texinfo (Bison Options): Say more accurately what
11403 --yacc does.
11404 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
11405 about declarations in the grammar when in Yacc mode, as POSIX does
11406 not require a diagnostic when the grammar uses extensions.
11407
11408 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
11409
11410 Warn about dubious constructions like "%token T T".
11411 Reported by twlevo.
11412 * src/symtab.h (struct symbol.declared): New member.
11413 * src/symtab.c (symbol_new): Initialize it to false.
11414 (symbol_class_set): New arg DECLARING, specifying whether
11415 this is a declaration that we want to warn about, if there
11416 is more than one of them. All uses changed.
11417
11418 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
11419 Allow multiple %union directives, whose contents concatenate.
11420 * src/parse-gram.y (grammar_declaration): Likewise.
11421 Use muscle_code_grow, so that we don't need stype_line any more.
11422 All uses changed.
11423
11424 * src/muscle_tab.c (muscle_grow): Fix comment.
11425
11426 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
11427 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
11428 Update copyright year to 2006.
11429
11430 2006-01-03 Akim Demaille <akim@epita.fr>
11431
11432 Have glr.cc pass (some of) the calc.at tests.
11433 * data/glr.cc (b4_parse_param_orig): New.
11434 (b4_parse_param): Improve its definition, and bound it more
11435 clearly in the skeleton.
11436 (b4_epilogue): Append, instead of prepending, in order to keep
11437 #line consistency.
11438 Simplify the generation of auxiliary functions: locations and
11439 purity are mandated.
11440 (b4_global_tokens_and_yystype): Honor it.
11441 * data/location.cc (c++.m4): Don't include it.
11442 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
11443 and AT_SKEL_CC_IF.
11444 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
11445 AT_LALR1_CC_IF.
11446 Be sure to initialize the first position's filename.
11447 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
11448 mandated anyway.
11449 (AT_CHECK_CALC_GLR_CC): New.
11450 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
11451
11452 2006-01-02 Akim Demaille <akim@epita.fr>
11453
11454 * src/output.c (output_skeleton): Don't hard wire the inclusion of
11455 c.m4.
11456 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
11457 * data/glr.cc: Do not include stack.hh.
11458
11459 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
11460
11461 * data/glr.c: Reformat whitespace with tabs.
11462 (b4_lpure_formals): Remove this unused m4 macro.
11463 * tests/cxx-type.at: Reformat whitespace with tabs.
11464 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
11465 since it's a member. Rename type to isNterm for clarity.
11466
11467 2005-12-29 Akim <akim@sulaco.local>
11468
11469 Let glr.cc catch up with symbol_value_print.
11470 * data/glr.cc (b4_yysymprint_generate): Replace by...
11471 (b4_yy_symbol_print_generate): this.
11472 (yy_symbol_print, yy_symbol_value_print): Declare them.
11473
11474 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
11475
11476 * src/location.h (boundary): Note that a line or column equal
11477 to INT_MAX indicates an overflow.
11478 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
11479 (rule_length_overflow, increment_rule_length, add_column_width):
11480 New functions.
11481 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
11482 (<SC_BRACED_CODE>"}"):
11483 Use increment_rule_length rather than incrementing it by hand.
11484 (adjust_location, handle_syncline): Diagnose overflow.
11485 (handle_action_dollar, handle_action_at):
11486 Fix bug with monstrosities like $-2147483648.
11487 Remove now-unnecessary checks.
11488 (scan_integer): Verify assumptions and remove now-unnecessary checks.
11489 (convert_ucn_to_byte): Verify assumptions.
11490 (handle_syncline): New arg LOC. All callers changed.
11491 Don't store through a value derived from char const * pointer.
11492
11493 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
11494 GCC warnings.
11495
11496 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
11497
11498 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
11499 Remove unnecessary forward static decls.
11500
11501 2005-12-27 Akim Demaille <akim@epita.fr>
11502
11503 * src/reader.c (grammar_current_rule_check): Also check that $$
11504 is used.
11505 Take the rule to check as argument, hence rename as...
11506 (grammar_rule_check): this.
11507 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
11508 Rename as...
11509 (grammar_rule_begin, grammar_rule_end): these, for consistency.
11510 (grammar_midrule_action, grammar_symbol_append): Now static.
11511 * tests/torture.at (input): Don't rely on the default action
11512 being always performed.
11513 * tests/calc.at: "Set" $$ even when the action is "cut" with
11514 YYERROR or other.
11515 * tests/actions.at (Exotic Dollars): Instead of using unused
11516 values, check that the warning is issued.
11517
11518 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
11519
11520 * NEWS: Improve wording for unused-value warnings.
11521
11522 2005-12-22 Akim Demaille <akim@epita.fr>
11523
11524 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
11525 (b4_yysymprint_generate): Rename as...
11526 (b4_yy_symbol_print_generate): this.
11527 Generate yy_symbol_print instead of yysymprint.
11528 Generate also yy_symbol_value_print, and use it.
11529
11530 2005-12-22 Akim Demaille <akim@epita.fr>
11531
11532 * NEWS: Warn about unused values.
11533 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
11534 a `used' member.
11535 (symbol_list_n_get, symbol_list_n_used_set): New.
11536 (symbol_list_n_type_name_get): Use symbol_list_n_get.
11537 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
11538 * src/reader.c (grammar_current_rule_check): Check that values are
11539 used.
11540 * src/symtab.c (symbol_print): Accept 0.
11541 * tests/existing.at: Remove the type information.
11542 Empty the actions.
11543 Remove useless actions (beware of mid-rule actions: perl -000
11544 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
11545 * tests/actions.at (Exotic Dollars): Use unused values.
11546 * tests/calc.at: Likewise.
11547 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11548 Likewise.
11549
11550 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
11551 rule_useful_p.
11552
11553 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
11554
11555 Undo 2005-12-01 tentative license wording change. The wording is
11556 still being reviewed by the lawyers, and we don't want to wait for
11557 them before publishing a test release. For now, revert to the
11558 previous wording.
11559 * NEWS: Undo 2005-12-01 change.
11560 * data/glr.c: Revert to previous license wording.
11561 * data/glr.cc: Likewise.
11562 * data/lalr1.cc: Likewise.
11563 * data/location.cc: Likewise.
11564 * data/yacc.c: Likewise.
11565
11566 * NEWS: Reword %destructor vs YYABORT etc.
11567 * data/glr.c: Use American spacing, for consistency.
11568 * data/glr.cc: Likewise.
11569 * data/lalr1.cc: Likewise.
11570 * data/yacc.c: Likewise.
11571 * data/yacc.c: Reformat comments slightly.
11572 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
11573 for consistency. Fix some spelling errors and reword recently-included
11574 text slightly.
11575 * tests/cxx-type.at: Cast results of malloc, for C++.
11576
11577 2005-12-21 Joel E. Denny <address@hidden>
11578
11579 * tests/cxx-type.at: Construct a tree, count the parents of shared
11580 nodes, and free each node once and only once. Previously, the memory
11581 for semantic values was leaked instead.
11582
11583 2005-12-21 Joel E. Denny <address@hidden>
11584
11585 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
11586 (yylval, yylloc): If pure, #define to yystackp->yyval and
11587 yystackp->yyloc similar to yychar and yynerrs.
11588 (yyparse): If pure, remove local yylval and yylloc. Add local
11589 yystackp to accommodate pure definitions of yylval and yylloc.
11590 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
11591 yylvalp and yyllocp to &yylval and &yylloc.
11592 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
11593 namespace. Previously, nerrs and char were missing, but lval and lloc
11594 weren't necessary.
11595 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
11596 yylvalp and yyllocp parameters since, if pure, these are now always
11597 accessible through yystackp. If not pure, they are still accessible
11598 globally.
11599 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
11600 `if (YYID (N))' to pacify lint.
11601
11602 2005-12-21 Akim Demaille <akim@epita.fr>
11603
11604 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
11605 destroy the RHS symbols of a rule.
11606 * data/yacc.c (yylen): Initialize to 0.
11607 Keep its value to the number of items to possibly shift.
11608 In particular, a regular successful parse that ends on YYFINAL by
11609 a (internal) YYACCEPT must not have yylen != 0.
11610 (yyerrorlab, yyreturn): Pop the RHS.
11611 Reorder a bit to emphasize the `shifting' bits of code.
11612 (YYPOPSTACK): Now accept a number of items to pop.
11613 * data/lalr1.cc: Likewise.
11614 * data/glr.c: Formatting changes.
11615 Use goto instead of fall through.
11616 * doc/bison.texinfo (Destructor Decl): Complete.
11617
11618 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
11619
11620 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
11621 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
11622 * djgpp/config.bat: Replace every occurence of the file name
11623 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11624 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11625 * djgpp/config.sed: Replace every occurence of the file name
11626 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
11627 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
11628 * djgpp/djunpack.bat: DJGPP specific file.
11629 * djgpp/fnchange.lst: DJGPP specific file.
11630 * djgpp/README.in: Add new information about how to unpack the bison
11631 source on MSDOS and other systems which have 8.3 file name restrictions
11632 using djunpack.bat and fnchange.lst.
11633
11634 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
11635
11636 * bootstrap (build_cvs_prefix): Remove; unused.
11637 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
11638 when getting gnulib.
11639
11640 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
11641
11642 * data/glr.c: Reorder typedef declarations for structs to match order
11643 of struct declarations.
11644 Rename yystack everywhere to yystackp except in yyparse where it's not
11645 a pointer.
11646 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
11647 consistency.
11648 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
11649 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
11650 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
11651 lint.
11652
11653 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
11654
11655 * tests/sets.at (Accept): Fix typos in regular expression used to
11656 sed out the final state number.
11657
11658 Work around portability problem on Solaris 10: flex-generated
11659 files include <stdio.h> before <config.h>, which messes up
11660 because the latter defines __EXTENSIONS__. Address the problem
11661 by creating two new little files that include <config.h> first,
11662 then include the flex-generated files. Rewrite everyone else
11663 to include <config.h> first, as well.
11664 * lib/timevar.c: Always include "config.h".
11665 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
11666 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
11667 (EXTRA_bison_SOURCES): New macro.
11668 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
11669 * src/system.h: Don't include config.h.
11670 * src/LR0.c: Include <config.h> first.
11671 * src/assoc.c: Likewise.
11672 * src/closure.c: Likewise.
11673 * src/complain.c: Likewise.
11674 * src/conflicts.c: Likewise.
11675 * src/derives.c: Likewise.
11676 * src/files.c: Likewise.
11677 * src/getargs.c: Likewise.
11678 * src/gram.c: Likewise.
11679 * src/lalr.c: Likewise.
11680 * src/location.c: Likewise.
11681 * src/main.c: Likewise.
11682 * src/muscle_tab.c: Likewise.
11683 * src/nullable.c: Likewise.
11684 * src/output.c: Likewise.
11685 * src/parse-gram.y: Likewise.
11686 * src/print.c: Likewise.
11687 * src/print_graph.c: Likewise.
11688 * src/reader.c: Likewise.
11689 * src/reduce.c: Likewise.
11690 * src/relation.c: Likewise.
11691 * src/state.c: Likewise.
11692 * src/symlist.c: Likewise.
11693 * src/symtab.c: Likewise.
11694 * src/tables.c: Likewise.
11695 * src/uniqstr.c: Likewise.
11696 * src/vcg.c: Likewise.
11697
11698 * src/parse-gram.y: Fix minor problems uncovered by lint.
11699 (current_lhs, current_lhs_location): Now static.
11700 (current_assoc): Remove unused variable.
11701
11702 Cleanups so that Bison-generated parsers have less lint.
11703 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
11704 Prepend /*ARGSUSED*/, for lint's sake.
11705 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
11706 definition if 'lint' is defined.
11707 (YYID): New macro (or function, if lint).
11708 All uses of /*CONSTCOND*/0 replaced by YYID(0).
11709 * data/yacc.c: Likewise.
11710 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
11711 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
11712 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
11713 is C++ only.
11714 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
11715 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
11716 Use YYID(0) rather than 0, for lint.
11717 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
11718 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
11719
11720 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
11721
11722 * tests/glr-regression.at
11723 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11724 Close memory leak reported by twlevo.
11725
11726 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
11727
11728 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
11729 all stacks.
11730 (yyparse): Iterate another stack in order to call user destructors.
11731 * tests/glr-regression.at (No users destructors if stack 0 deleted):
11732 New test case.
11733 (Duplicated user destructor for lookahead): This test now is expected
11734 to succeed.
11735
11736 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
11737
11738 * NEWS: Document the following change.
11739 * data/yacc.c: Say "parser skeleton" rather than "file", since
11740 it's no longer just a file.
11741 * data/glr.c: Grant a special exception for C GLR parsers, that
11742 reads like the already-existing exception for C LALR(1) parsers.
11743 * data/glr.cc: Likewise.
11744 * data/lalr1.cc: Likewise.
11745 * data/location.cc: Likewise.
11746 * data/yacc.c: Reword the "written by" statement to clarify that
11747 it was the parser skeleton, not the entire output file.
11748 * data/glr.c: Written by Paul Hilfinger.
11749 * data/glr.cc: Written by Akim Demaille.
11750 * data/lalr1.cc: Likewise.
11751
11752 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
11753
11754 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
11755 Fix typos in previous change that broke 'make check'.
11756 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
11757 supported in C.
11758 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
11759 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
11760 We can revert this once things settle down.
11761
11762 * src/conflicts.c (conflicts_print): Don't print file name twice
11763 when %expect fails because there were no conflicts.
11764 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
11765 change.
11766 * tests/conflicts.at (%expect not enough, %expect too much):
11767 (%expect with reduce conflicts): Adjust to new behavior.
11768
11769 2005-11-18 Akim Demaille <akim@epita.fr>
11770
11771 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
11772 errors.
11773 * NEWS: Document this.
11774 * doc/bison.texinfo (Expect Decl): Likewise.
11775
11776 2005-11-16 Akim Demaille <akim@epita.fr>
11777
11778 Generalize the display of semantic values and locations in traces.
11779 * data/glr.c (yy_reduce_print): Fix indices (again).
11780 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
11781 literal integers.
11782 * data/lalr1.cc (yyreduce_print): Rename as...
11783 (yy_reduce_print): this.
11784 Display values and locations.
11785 * data/yacc.c (yy_reduce_print): Likewise.
11786 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
11787 (yysymprint): Move higher to be visible from yy_reduce_print).
11788 (yyparse): Adjust.
11789 * tests/calc.at: Adjust the expected length of the traces.
11790
11791 2005-11-14 Akim Demaille <akim@epita.fr>
11792
11793 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
11794 from 1 to N, while values and location start at 0.
11795 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
11796
11797 2005-11-14 Akim Demaille <akim@epita.fr>
11798
11799 * data/glr.c (yy_reduce_print): Fix the $ number.
11800
11801 2005-11-14 Akim Demaille <akim@epita.fr>
11802
11803 "Use" parse parameters.
11804 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
11805 * data/glr.c, data/glr.cc: Use them.
11806 * data/glr.c (YYUSE): Have a C++ definition that supports
11807 non-pointer types.
11808
11809 2005-11-14 Akim Demaille <akim@epita.fr>
11810
11811 * data/glr.c (yyexpandGLRStack): Declare only if defined.
11812
11813 2005-11-14 Akim Demaille <akim@epita.fr>
11814
11815 * data/glr.cc: New.
11816 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
11817
11818 2005-11-12 Akim Demaille <akim@epita.fr>
11819
11820 Let position and location be PODs.
11821 * data/location.cc (position::initialize, location::initialize): New.
11822 (position::position, location::location): Define only if
11823 b4_location_constructors is defined.
11824 * data/lalr1.cc (b4_location_constructors): Define it for backward
11825 compatibility.
11826 * doc/bison.texinfo (Initial Action Decl): Use initialize.
11827
11828 2005-11-12 Akim Demaille <akim@epita.fr>
11829
11830 * data/lalr1.cc: Move the body of the ctor and dtor into the
11831 parser file (instead of the header).
11832 Wrap the implementations in a "namespace yy".
11833
11834 2005-11-12 Akim Demaille <akim@epita.fr>
11835
11836 Have glr.c include its header file when created.
11837 * data/glr.c (b4_shared_declarations): New.
11838 Output them verbatim in the parser if !%defines, otherwise
11839 output then in the header file, and include it instead.
11840
11841 2005-11-11 Akim Demaille <akim@epita.fr>
11842
11843 * data/glr.c: Comment changes.
11844
11845 2005-11-11 Akim Demaille <akim@epita.fr>
11846
11847 When yydebug, report semantic and location values for reductions.
11848 * data/glr.c (yy_reduce_print): Report the semantic values and the
11849 locations.
11850 (YY_REDUCE_PRINT): Adjust.
11851 (yyglrReduce): Use them.
11852 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
11853 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
11854 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
11855 traces.
11856
11857 2005-11-10 Akim Demaille <akim@epita.fr>
11858
11859 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
11860 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
11861 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
11862
11863 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
11864
11865 * m4/cxx.m4, examples/Makefile.am: Don't build
11866 examples/calc++ if no C++ compiler is available. (trivial change)
11867
11868 2005-11-09 Akim Demaille <akim@epita.fr>
11869
11870 * src/scan-skel.l: Use a couple of asserts.
11871
11872 2005-11-03 Akim Demaille <akim@epita.fr>
11873
11874 In some (weird) cases, the final state number is incorrect.
11875 Reported by Alexandre Duret-Lutz.
11876 * src/LR0.c (state_list_append): Remove the computation of
11877 final_state.
11878 (save_reductions): Do it here.
11879 (get_state): Alpha conversion.
11880 (generate_states): Use a for loop.
11881 * src/gram.h (item_number_is_rule_number)
11882 (item_number_is_symbol_number): New.
11883 * src/state.c: Use assert.
11884 * src/system.h: Include assert.h.
11885 * tests/sets.at (Accept): New.
11886
11887 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11888
11889 * data/glr.c (yyfill): Adjust comment.
11890 (yyresolveAction): Initialize default location properly
11891 for empty right-hand sides.
11892 (yydoAction): Ditto.
11893 Add comment explaining apparently dead code.
11894 * tests/glr-regression.at
11895 (Incorrectly initialized location for empty right-hand side in GLR):
11896 New test.
11897
11898 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
11899
11900 * bootstrap (cleanup_gnulib): New function. Use it to clean up
11901 gnulib when interrupted. This fixes some race conditions and
11902 works around some portability problems (one noted by Paul
11903 Hilfinger).
11904
11905 2005-10-22 Akim <akim@epita.fr>
11906
11907 * Makefile.cfg: Adjust to config -> build-aux.
11908 Reported by twledo.
11909
11910 2005-10-21 Akim Demaille <akim@epita.fr>
11911
11912 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
11913 the %parse-params.
11914 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
11915 * data/yacc.c (b4_Pure_if): Rename as...
11916 (b4_yacc_pure_if): this.
11917 (YY_SYMBOL_PRINT, yyparse): Adjust.
11918 * doc/bison.texinfo: Formatting changes.
11919
11920 2005-10-21 Akim Demaille <akim@epita.fr>
11921
11922 Finish the transition config -> build-aux.
11923 * configure.ac, Makefile.am: Use build-aux.
11924 * config/prev-version, config/announce-gen, config/Makefile.am:
11925 Move to...
11926 * build-aux/prev-version, build-aux/announce-gen,
11927 * build-aux/Makefile.am: here.
11928
11929 2005-10-14 Akim Demaille <akim@epita.fr>
11930
11931 * examples/calc++/test: Use set -x only when VERBOSE.
11932
11933 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
11934
11935 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
11936 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
11937
11938 2005-10-13 Akim Demaille <akim@epita.fr>
11939
11940 * src/scan-skel.l: Output the base name parts of the parser and
11941 header file names.
11942 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
11943 additional checks.
11944 Use this to exercise C++ outputs in subdirs.
11945 Reported by Oleg Smolsky.
11946
11947 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
11948
11949 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
11950 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
11951 Problem reported by John P. Hartmann.
11952 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
11953 already defined it.
11954
11955 2005-10-12 Akim Demaille <akim@epita.fr>
11956
11957 * src/parse-gram.y (version_check): Exit 63 to please missing
11958 (stands for "version mismatch).
11959 * tests/input.at, doc/bison.texinfo: Adjust.
11960
11961 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
11962
11963 Work around portability problems with Visual Age C compiler
11964 (xlc and xlC_r) reported by John P. Hartmann.
11965 * data/location.cc (initial_column, initial_line): Remove.
11966 All uses replaced by 0 and 1.
11967 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
11968 that xlc complains about.
11969 * src/scan-skel.l (skel_wrap): Likewise.
11970 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
11971 as __STDC__.
11972 * data/yacc.c (YYMODERN_C): New macro, which also looks at
11973 __STDC_VERSION__. Use it everywhere instead of looking at
11974 __STDC__ and __cplusplus.
11975
11976 2005-10-10 Akim Demaille <akim@epita.fr>
11977
11978 * examples/calc++/test: Be quiet unless VERBOSE.
11979
11980 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
11981
11982 * data/c.m4 (yydestruct, yysymprint):
11983 Use YYUSE instead of casting to void.
11984 * data/glr.c (YYUSE): New macro.
11985 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
11986 Use it instead of rolling our own.
11987 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11988 (YYCHK1):
11989 Use /*CONSTCOND*/ to suppress lint warnings.
11990 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
11991 (YY_STACK_PRINT): Use 'false' not '0'.
11992 (YYUSE): New macro.
11993 (yysymprint_, yydestruct_): Use it instead of rolling our own.
11994 * data/yacc.c (YYUSE): New macro.
11995 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
11996 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
11997 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
11998
11999
12000 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
12001 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
12002
12003 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
12004
12005 Undo the parts of the unlocked-I/O change that substituted
12006 putc or puts for printf. This might hurt performance a bit,
12007 but some people prefer the printf style.
12008 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
12009 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
12010 All uses replaced by YYFPRINTF and YYDPRINTF.
12011 * data/yacc.c: Likewise.
12012 * lib/bitset.c (bitset_print): Likewise.
12013 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
12014 putc and puts.
12015 * lib/lbitset.c (debug_lbitset): Likewise.
12016 * src/closure.c (print_firsts, print_fderives): Likewise.
12017 * src/gram.c (grammar_dump): Likewise.
12018 * src/lalr.c (look_ahead_tokens_print): Likewise.
12019 * src/output.c (escaped_output): Likewise.
12020 (user_actions_output): Break apart two printfs.
12021 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
12022 * src/reduce.c (reduce_print): Likewise.
12023 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
12024 * src/system.h: Include unlocked-io.h rathe than stdio.h.
12025
12026 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
12027 Use assignments rather than casts-to-void to suppress
12028 unused-variable warnings. This pacifies 'lint'.
12029 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
12030 unused-variable warnings.
12031
12032 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
12033
12034 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
12035
12036 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
12037
12038 Use unlocked I/O for a minor performance improvement on hosts like
12039 GNU/Linux and Solaris that support unlocked I/O. The basic idea
12040 is to use the gnlib unlocked-io module, and to prefer putc and
12041 puts to printf when either will work (since the latter doesn't
12042 come in an unlocked flavor).
12043 * bootstrap (gnulib_modules): Add unlocked-io.
12044 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
12045 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
12046 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
12047 and similarly for puts and putc and printf.
12048 * data/yacc.c: Likewise.
12049 * lib/bitset.c (bitset_print): Likewise.
12050 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
12051 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
12052 to printf.
12053 * lib/lbitset.c (debug_lbitset): Likewise.
12054 * src/closure.c (print_firsts, print_fderives): Likewise.
12055 * src/gram.c (grammar_dump): Likewise.
12056 * src/lalr.c (look_ahead_tokens_print): Likewise.
12057 * src/output.c (escaped_output): Likewise.
12058 (user_actions_output): Coalesce two printfs.
12059 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
12060 * src/reduce.c (reduce_print): Likewise.
12061 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
12062 * src/system.h: Include unlocked-io.h rather than stdio.h.
12063
12064 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
12065 this confuses xgettext.
12066
12067 2005-10-02 Akim Demaille <akim@epita.fr>
12068
12069 * bootstrap (gnulib_modules): Add strverscmp.
12070 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
12071 * m4/.cvsignore: Add strverscmp.m4.
12072 * src/parse-gram.y (%require): New token, new rule.
12073 (version_check): New.
12074 * src/scan-gram.l (%require): Adjust.
12075 * tests/input.at (AT_REQUIRE): New.
12076 Use it.
12077 * doc/bison.texinfo (Require Decl): New.
12078 (Calc++ Parser): Use %require.
12079
12080 2005-10-02 Akim Demaille <akim@epita.fr>
12081
12082 * data/location.cc: New.
12083
12084 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
12085 Akim Demaille <akim@epita.fr>
12086
12087 Make sure -odir/foo.cc creates dir/location.hh etc.
12088 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
12089 (spec_file_prefix, spec_verbose_file, spec_graph_file)
12090 (spec_defines_file): Now const.
12091 (dir_prefix): New.
12092 (short_base_name): Remove.
12093 * src/files.c: Adjust.
12094 (dirname.h): Include.
12095 (base_name): Don't prototype it.
12096 (finput): Remove, duplicates gram_in.
12097 (full_base_name, short_base_name): Replace by...
12098 (all_but_ext, all_but_tab_ext): these.
12099 (compute_base_names): Rename as...
12100 (compute_file_name_parts): this.
12101 Update to compute the new variables, including dir_prefix.
12102 Adjust dependencies.
12103 * src/output.c (prepare): Output them.
12104 * src/reader.c: Adjust to use gram_in, not finput.
12105 * src/scan-skel.l (@dir_prefix@): New.
12106
12107 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
12108
12109 * lib/subpipe.c: New function end_of_output_subpipe() added
12110 to allow support for non-posix systems. This is a no-op function
12111 for posix systems.
12112
12113 * lib/subpipe.h: New function end_of_output_subpipe() added
12114 to allow support for non-posix systems. This is a no-op function
12115 for posix systems.
12116
12117 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
12118 handle the lack of pipe/fork functionality on non-posix systems.
12119
12120 * djgpp/Makefile.maint: DJGPP specific file.
12121
12122 * djgpp/README.in: DJGPP specific file.
12123
12124 * djgpp/config.bat: DJGPP specific configuration file.
12125
12126 * djgpp/config.sed: DJGPP specific configuration file.
12127
12128 * djgpp/config.site: DJGPP specific configuration file.
12129
12130 * djgpp/config_h.sed: DJGPP specific configuration file.
12131
12132 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
12133
12134 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
12135
12136 2005-10-02 Akim Demaille <akim@epita.fr>
12137
12138 * data/location.cc: New, extract from...
12139 * data/lalr1.cc: here.
12140 (location.hh): Include it after the user prologue, in case the
12141 filename type is defined by the user.
12142 Forward declation location and position before the pre-prologue.
12143 (yyresult_): Rename as...
12144 (yyresult): this, it's a local variable, not an attribute.
12145 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
12146
12147 2005-10-01 Akim Demaille <akim@epita.fr>
12148
12149 * examples/extexi: Restore the #line generation.
12150
12151 2005-09-30 Akim Demaille <akim@epita.fr>,
12152 Alexandre Duret-Lutz <adl@gnu.org>
12153
12154 Move the token type and YYSTYPE in the parser class.
12155 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
12156 (parser::token): New, from the moved free definition of tokens.
12157 (parser::semantic_value): Now a full definition instead of an
12158 indirection to YYSTYPE.
12159 (b4_post_prologue): No longer included in the header file, but
12160 in the implementation file.
12161 * doc/bison.texi (C+ Language Interface): Update.
12162 * src/parse-gram.y: Support unary %define.
12163 * tests/actions.at: Define global_tokens_and_yystype for backward
12164 compatibility until we update the tests.
12165 * tests/calc.at: Idem.
12166 (first_line, first_column, last_line, last_column): Define for lalr1.cc
12167 to simplify the code.
12168
12169 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
12170
12171 Port to SunOS 4.1.4, which lacks strtoul and strerror.
12172 Ah, the good old days! Problem reported by Peter Klein.
12173 * bootstrap (gnulib_modules): Add strerror, strtoul.
12174 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
12175 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
12176
12177 2005-09-29 Akim Demaille <akim@epita.fr>
12178
12179 * data/c.m4 (b4_error_verbose_if): New.
12180 * data/lalr1.cc: Use it.
12181 (YYERROR_VERBOSE_IF): Remove.
12182 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
12183 parser members, replaced by...
12184 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
12185 local variables.
12186 (yysyntax_error_): Takes the state number as argument.
12187 (yyreduce_print_): Use the argument yyrule, not the former
12188 attribute yyn_.
12189
12190 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
12191
12192 * bootstrap (gnulib_modules): Add verify.
12193 * lib/.cvsignore: Add verify.h.
12194 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
12195 * src/system.h (verify): Remove.
12196 Include verify.h instead.
12197 * src/tables.c (tables_generate): Use new API for 'verify'.
12198
12199 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
12200
12201 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
12202 local variables whose names begin with 'yy'.
12203 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
12204 Trivial changes from Joel E. Denny.
12205
12206 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
12207 it itself.
12208 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
12209 don't use alloca any more.
12210
12211 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
12212 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
12213 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
12214 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
12215 to match yacc.c, to test more hosts.
12216
12217 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
12218
12219 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
12220 doesn't affect behavior.
12221 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
12222 Solaris, AIX, MSC.
12223 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
12224 This works a bit better with glibc, if user code has already included
12225 stdlib.h.
12226 * doc/bison.texinfo (Bison Parser): Document that users can't
12227 arbitrarily use malloc and free for other purposes. Document
12228 that <alloca.h> and <malloc.h> might be included.
12229 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
12230 user must declare alloca.
12231
12232 * HACKING (release): Forwarn the Translation Project about
12233 stable releses.
12234
12235 2005-09-20 Akim Demaille <akim@epita.fr>
12236
12237 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
12238
12239 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
12240
12241 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
12242 (YYSTACK_ALLOC_MAXIMUM): Use it.
12243 (yysyntax_error): New function.
12244 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
12245 multiple syntax errors are reported, and alloca is being used.
12246 Instead, reallocate buffers twice as big each time, so that
12247 we waste at most half the allocated memory. Start with a small
12248 (128-byte) buffer that will suffice in most cases anyway.
12249 Use yysyntax_error to do most of the work.
12250
12251 * doc/bison.texinfo (Error Reporting, Table of Symbols):
12252 yynerrs is the number of errors reported, not the number of
12253 errors encountered.
12254
12255 * tests/glr-regression.at (Duplicated user destructor for lookahead):
12256 Mark it as expected to fail.
12257 Cast result of malloc; problem reported by twlevo@xs4all.nl.
12258 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
12259 Don't start user-code symbols with "yy", to avoid name space problems.
12260
12261 2005-09-19 Akim Demaille <akim@epita.fr>
12262
12263 Remove the traits, failed experiment.
12264 It never proved useful, and anyway because of the current
12265 definition, it was not possible to have several specialization of
12266 this traits, making it useless.
12267 * data/lalr1.cc (yy:traits): Remove.
12268 Inline its definitions in the parser class.
12269
12270 2005-09-19 Akim Demaille <akim@epita.fr>
12271
12272 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
12273 least Mac OSX with a /usr/local install of gettext.
12274
12275 2005-09-19 Akim Demaille <akim@epita.fr>
12276
12277 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
12278 and yytoken for similarity with the other skeletons.
12279
12280 2005-09-19 Akim Demaille <akim@epita.fr>
12281
12282 * NEWS, configure.ac: update version number to 2.1a.
12283
12284 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
12285
12286 * NEWS: Version 2.1.
12287
12288 * NEWS: Remove notice of yytname change, since it was never in an
12289 official release.
12290 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
12291 diagnostic.
12292 * src/output.c (prepare): Likewise.
12293 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
12294 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
12295 is not defined. This is an awful hack, but it's enough for now.
12296 All callers changed.
12297 * tests/glr-regression-at (make_value): Args are const pointers now,
12298 to avoid GCC warning.
12299 (Duplicated user destructor for lookahead): New test. Currently
12300 skipped. It fails on my host but I'm not sure it'll always fail.
12301
12302 2005-09-16 Akim Demaille <akim@epita.fr>
12303
12304 * src/symtab.h (struct symbol): Declare the printer and destructor
12305 as const, to avoid accidental calls to free.
12306 (symbol_destructor_set, symbol_printer_set): Adjust.
12307 * src/symtab.c: Adjust.
12308
12309 2005-09-16 Akim Demaille <akim@epita.fr>
12310
12311 * data/c.m4 (b4_token_enums): New.
12312 (b4_token_defines): Rename as...
12313 (b4_token_enums_defines): this.
12314 (b4_token_defines): New, output only the #defines.
12315 * data/yacc.c, data/glr.c: Adjust.
12316 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
12317 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
12318 as default values.
12319
12320 2005-09-16 Akim Demaille <akim@epita.fr>
12321
12322 * data/lalr1.cc (yylex_): Remove, inline its code.
12323 (yyreport_syntax_error_): Remove, replaced by...
12324 (yysyntax_error_): this which returns a string and leaves to the
12325 caller the call to the users' error function.
12326 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
12327 Move from members of the parser object...
12328 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
12329 to local variables of the parse function.
12330
12331 2005-09-16 Akim Demaille <akim@epita.fr>
12332
12333 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
12334 since it's in Bison's name space.
12335
12336 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
12337
12338 * data/glr.c (yyresolveValue): Add default case to pacify
12339 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
12340
12341 * NEWS: Document when yyparse started to return 2.
12342 * doc/bison.texinfo (Parser Function): Document when yyparse
12343 returns 2.
12344
12345 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
12346 (b4_filename_type): Renamed back from b4_file_name_type. All uses
12347 changed.
12348 (class position): file_name -> filename (reverting). All uses changed.
12349
12350 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
12351
12352 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
12353 do anything if $@ exists. This reverts part of the 2005-07-07
12354 patch.
12355
12356 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
12357
12358 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
12359 contains obsolete information and isn't worth distributing as a
12360 separate file anyway.
12361 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
12362 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
12363 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
12364 (yyparse): Abort if user code uses longjmp to throw an unexpected
12365 value.
12366
12367 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
12368
12369 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
12370 Suggested by twlevo@xs4all.nl.
12371
12372 * data/glr.c (YYCHK1): Do not assume YYE is in range.
12373 This avoids a diagnostic from gcc -Wswitch-enum.
12374 Problem reported by twlevo@xs4all.nl.
12375
12376 * doc/bison.texinfo: Don't use "filename", as per GNU coding
12377 standards. Use "file name" or "file" or "name", depending on
12378 the context.
12379 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
12380 not to hack/foo.tab.c.
12381 (Calc++ Top Level): 2nd arg of main is not const.
12382 * data/glr.c: b4_filename -> b4_file_name.
12383 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
12384 All uses changed.
12385 (class position): filename -> file_name. All uses changed.
12386 * data/yacc.c: b4_filename -> b4_file_name.
12387 * lib/bitset.h: filename -> file_name in local vars.
12388 * lib/bitset_stats.c: Likewise.
12389 * src/files.c: Likewise.
12390 * src/scan-skel.l ("@output ".*\n): Likewise.
12391 * src/files.c (file_name_split): Renamed from filename_split.
12392 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
12393
12394 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
12395
12396 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
12397 to accommodate latest gnulib.
12398
12399 * tests/glr-regression.at (Duplicate representation of merged trees):
12400 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
12401
12402 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
12403 needed.
12404
12405 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
12406
12407 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
12408 All uses changed. Invoke user destructor after an error during a
12409 split parse (trivial change from Joel E. Denny).
12410
12411 * tests/glr-regression.at
12412 (User destructor after an error during a split parse): New test case.
12413 Problem reported by Joel E. Denny in:
12414 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
12415
12416 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
12417
12418 * README-cvs: Give URLs for recommended tools.
12419 Mention Gzip version problem, and bootstrapping issues.
12420 Remove troubleshooting section, as it's somewhat obsolete.
12421
12422 * bootstrap (no_cache): New var, to accommodate different wget
12423 variants. Use it instead of '-C off'. Problem reported by
12424 twlevo@xs4all.nl.
12425
12426 * data/glr.c (yydestroyStackItem): New function.
12427 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
12428 debugging information. Problem reported by Joel E. Denny.
12429
12430 2005-08-25 Akim Demaille <akim@epita.fr>
12431
12432 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
12433
12434 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
12435
12436 * data/glr.c (yyrecoverSyntaxError, yyreturn):
12437 Don't invoke destructor on unresolved entries.
12438 * tests/glr-regression.at
12439 (User destructor for unresolved GLR semantic value): New test case.
12440 Problem reported by Joel E. Denny in:
12441 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
12442
12443 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
12444
12445 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
12446 Add strnlen.c.
12447 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
12448 lib-prefix.m4, po.m4.
12449
12450 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
12451 in yydestruct diagnostic, since it might not be an error.
12452 Problem reported by Joel Denny near end of
12453 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12454 * data/lalr1.cc (yyerturn): Likewise.
12455 * data/yacc.c (yyreturn): Likewise.
12456 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
12457
12458 * src/files.c: Remove obsolete FIXME comment.
12459
12460 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
12461 with the other templates, and to fix bogus run-on messages such
12462 as the one reported at the end of
12463 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
12464 All callers changed to avoid the newline.
12465 (yyprocessOneStack): Output two lines rather than one, to accommodate
12466 the above change. This changes the debug output format slightly.
12467
12468 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
12469 reported by Joel E. Denny in
12470 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
12471 (trivial change).
12472 * tests/glr-regression.at (Duplicate representation of merged trees):
12473 New test, from Joel E. Denny in:
12474 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
12475 * THANKS: Add Joel E. Denny.
12476
12477 * configure.ac (AC_INIT): Bump to 2.0c.
12478
12479 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
12480
12481 * NEWS: Version 2.0b.
12482
12483 * Makefile.am (SUBDIRS): Put examples before tests, so that
12484 "make check" doesn't finish with "All 1 tests passed".
12485
12486 * tests/regression.at (Token definitions): Don't rely on
12487 AT_PARSER_CHECK for data that contains backslashes. It currently
12488 uses 'echo', and 'echo' isn't portable if its argument contains
12489 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
12490 that the byte '\0xff' is not printable in the C locale; it is,
12491 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
12492 not printable, so use '\0x81' to test.
12493
12494 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
12495 version of GCC, since the macro is used with non-GCC compilers.
12496
12497 Fix core dump reported by Pablo De Napoli in
12498 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
12499 * tests/regression.at (Invalid inputs with {}): New test.
12500 * src/parse-gram.y (token_name): Translate type before using
12501 it as an index.
12502
12503 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
12504 the user's name space. All uses changed to __attribute__
12505 ((__unused__)).
12506 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
12507 Add __attribute__ ((__noreturn__)).
12508
12509 * etc/clcommit: Remove. We weren't using it, and it failed
12510 "make maintainer-distcheck".
12511 * Makefile.maint: Merge from coreutils.
12512 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
12513 (syntax-check-rules): Change list of rules as described below.
12514 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
12515 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
12516 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
12517 (sc_trailing_space): New rules.
12518 (sc_xalloc_h_in_src): Remove.
12519 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
12520 (sc_space_tab, sc_error_exit_success, sc_changelog):
12521 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
12522 (makefile-check, po-check, author_mark_check):
12523 (makefile_path_separator_check, copyright-check):
12524 Use grep -n, to make it easier to find violations.
12525 Use CVS_LIST and CVS_LIST_EXCEPT.
12526 (header_regexp, h_re): Remove.
12527 (dd_c): New macro.
12528 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
12529 (my-distcheck): Use more-modern GCC flags.
12530 (signatures, %.asc): Remove.
12531 (rel-files, announcement): Remove signatures.
12532 Restore old updating code, even though we don't use it, so
12533 that we're the same as coreutils.
12534 (alpha, beta, major): Depend on news-date-check.
12535 Make the upload commands.
12536
12537 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
12538 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
12539 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
12540 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
12541 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
12542 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
12543 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
12544 * tests/sets.at: Likewise.
12545
12546 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
12547 we comment out the Autoconf version number.
12548 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
12549 it's error-prone and "make maintainer-distcheck" rejects it.
12550
12551 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
12552 Indent calls to "error" to pacify "make maintainer-distcheck",
12553 when the calls are not intended to be translated.
12554 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
12555
12556 * src/Makefile.am (DEFS): Use +=, to pacify
12557 "make maintainer-distcheck".
12558 (bison_SOURCES): Add scan-skel.h.
12559 (sc_tight_scope): New rule, from coreutils.
12560
12561 * src/files.c (src_extension, header_extension):
12562 Now static, not extern.
12563 * src/getargs.c (short_options): Likewise.
12564 * src/muscle_tab.c (muscle_table): Likewise.
12565 * src/parse-gram.y (current_class, current_type, current_prec):
12566 Likewise.
12567 * src/reader.c (grammar_end, previous_rule_end): Likewise.
12568 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
12569 * src/main.c (main): Cast bindtextdomain and textdomain calls to
12570 void, to avoid warning when NLS is disabled.
12571 * src/output.c: Include scan-skel.h.
12572 (scan_skel): Remove decl, since scan-skel.h does this.
12573 (output_skeleton):
12574 Indent calls to "error" to pacify "make maintainer-distcheck".
12575 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
12576 * src/reader.h (gram_end, gram_lineno): New decls to pacify
12577 "make maintainer-distcheck".
12578 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
12579 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
12580 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
12581 (skel_lex_destroy, scan_skel): Move these decls to...
12582 * src/scan-skel.h: New file.
12583 * src/uniqstr.c (uniqstr_assert):
12584 Indent calls to "error" to pacify "make maintainer-distcheck".
12585
12586 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
12587 not @VAR@.
12588
12589 * tests/torture.at: Revamp to avoid misuse of atoi that
12590 "make maintainer-distcheck" complained about.
12591
12592 * examples/extexi (message): Don't print a message more than once,
12593 and omit line-number decoration that makes Emacs compile think
12594 that informative messages are worth worrying about.
12595
12596 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
12597
12598 * configure.ac: Update version number.
12599
12600 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
12601 accidentally.
12602 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
12603 autogenerated by the maintainer.
12604 * examples/calc++/.cvsignore: Add *.yy.
12605
12606 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
12607 * lib/bitset_stats.c (bitset_stats_init): Likewise.
12608 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12609
12610 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
12611
12612 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
12613 from maintainer-distcheck about casting the argument of 'free'.
12614
12615 * NEWS: Mention recent yytname changes.
12616 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
12617
12618 * bootstrap: For translations that have not yet been upgraded to
12619 the new runtime-po domain, prime the pump by extracting the
12620 relevant strings from the obsolete translations. This code can be
12621 removed once the bison-runtime domain has been translated by each
12622 team.
12623
12624 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
12625 now that token names are already quoted.
12626
12627 Fix problem reported by Anthony Heading.
12628 * data/glr.c (YYTOKEN_TABLE): New macro.
12629 (yytname): Define if YYTOKEN_TABLE.
12630 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
12631 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
12632 (YYERROR_VERBOSE): Define the same way the other skeletons do.
12633 * src/output.c (prepare_symbols): Output token_table_flag.
12634
12635 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
12636
12637 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
12638 again if the first call fails.
12639
12640 * data/glr.c (yytnamerr): New function.
12641 (yyreportSyntaxError): Use it to dequote most string literals.
12642 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
12643 with other skeletons. All uses changed.
12644 (yytnameerr_): New function.
12645 (yyreport_syntax_error): Use it to dequote most string literals.
12646 * data/yacc.c (yytnamerr): New function.
12647 (yyerrlab): Use it to decode most string literals.
12648 * doc/bison.texinfo (Decl Summary, Calling Convention):
12649 Clarify quoting convention of yytname.
12650 * src/output.c (prepare_symbols): Quote all names. This undoes
12651 the 2005-04-17 change, which is now accomplished (mostly) via
12652 changes in the parsers as described above.
12653 * tests/regression.at (Token definitions, Web2c Actions):
12654 Undo most 2005-04-17 change here, too.
12655
12656 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
12657
12658 Fix more problems reported by twlevo@xs4all.nl.
12659 * tests/cxx-type.at: Don't pipe output of ./types through sed to
12660 remove trailing spaces. This loses the exit status of ./types,
12661 and isn't needed since ./types shouldn't be emitting trailing
12662 spaces.
12663 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
12664 as the stack isn't valid in that case.
12665
12666 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
12667 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
12668 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
12669 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
12670 is used.
12671 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
12672 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
12673 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
12674 Likewise.
12675
12676 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
12677 overly-picky compilers that reject 'char *foo = "bar";'.
12678
12679 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
12680 to FILE * parameter, not to stderr. This fixes a typo introduced
12681 in the 2005-07-12 change.
12682
12683 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
12684 warnings from GCC 4.
12685
12686 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
12687 (yyglrShiftDefer, yysplitStack):
12688 Remove unused parameters b4_pure_formals. All uses changed.
12689 (yyglrShift): Remove unused parameters b4_user_formals.
12690 All uses changed.
12691 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
12692
12693 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
12694
12695 Destructor cleanups and regularization among the three skeletons.
12696 * NEWS: Document the behavior changes.
12697 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
12698 stack before failing, as the cleanup code will do it for us now.
12699 * data/lalr1.cc (yyerrlab): Likewise.
12700 * data/glr.c (yyparse): Pop everything off the stack before
12701 freeing it, so that destructors get called properly.
12702 * data/lalr1.cc (yyreturn): Likewise.
12703 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
12704 This is more consistent.
12705 * doc/bison.texinfo (Destructor Decl): Mention more reasons
12706 why destructors might be called. 1.875 -> 2.1.
12707 (Destructor Decl, Decl Summary, Table of Symbols):
12708 Some English-language cleanups for %destructor.
12709 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12710 Add output line for destructor of start symbol.
12711 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
12712 because of that same extra output line.
12713
12714 * NEWS: Document minor wording changes in diagnostics of
12715 Bison-generated parsers.
12716 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
12717 Remove unused formals. All uses changed.
12718 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
12719 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
12720 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
12721 Rename yyoverflowab to yyexhaustedlab.
12722 When memory exhaustion occurs during syntax-error reporting,
12723 report it separately rather than in a single diagnostic; this
12724 eases translation.
12725 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
12726 (Memory Exhausted): Renamed from Parser Stack Overflow.
12727 Revamp wording slightly to prefer "memory exhaustion".
12728 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
12729
12730 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
12731
12732 Add i18n support to the GLR skeleton. Partially fix the C++
12733 skeleton; a C++ expert needs to finish this. Remove debugging
12734 msgids; there's little point to having them translated, since they
12735 can be understood only by someone who can read the
12736 (English-language) source code.
12737
12738 Generate runtime-po/bison-runtime.pot automatically, so that we
12739 don't have to worry about garbage getting in that file. We'll
12740 make sure after the next official release that old msgids don't
12741 get lost. See
12742 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
12743
12744 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
12745 Now auto-generated.
12746 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
12747 Fix typos in explanations of the runtime file.
12748 * bootstrap: Change gettext keyword from YYI18N to YY_.
12749 Use standard Makefile.in.in in runtime-po, since we'll arrange
12750 for backward-compatible bison-runtime.po files in a different way.
12751 * data/glr.c (YY_): New macro, from yacc.c.
12752 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
12753 Translate messages intended for users.
12754 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
12755 the wording in the other skeletons. We don't know that the memory
12756 is virtual.
12757 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
12758 Use same method that yacc.c uses.
12759 Don't translate debugging messages.
12760 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
12761 it doesn't work (yet), and requires C++ expertise to fix.
12762 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
12763 Move defn to a more logical place, to be consistent with other
12764 skeletons.
12765 Don't translate debugging messages.
12766 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
12767 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
12768 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
12769 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
12770
12771 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
12772 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
12773 void, not int.
12774 * tests/glr-regression.at (Badly Collapsed GLR States):
12775 Likewise.
12776 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12777 yylex should return 0 at EOF rather than aborting.
12778
12779 Improve tests for stack overflow in GLR parser.
12780 Problem reported by twlevo@xs4all.nl.
12781 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
12782 All uses removed.
12783 (yyStackOverflow): Just longjmp, but with value 2 so that caller
12784 can handle the problem.
12785 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
12786 (yyparse): New local variable yyresult to record the result.
12787 Use result of setjmp to set it, rather than storing itinto
12788 struct.
12789 (yyDone): Remove label.
12790 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
12791 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
12792 if YYABORT is used).
12793 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
12794 yyparse status; put status > 1 into diagnostic.
12795 Check that status==2 works.
12796 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
12797 Use exit status 3 for failure to open (which shouldn't happen).
12798
12799 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
12800
12801 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
12802 1 on syntax error; just let yyparse do its thing.
12803 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
12804 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
12805 (Exploding the Stack Size with Alloca):
12806 (Exploding the Stack Size with Malloc):
12807 Expect exit status 2, not 1, since the parser is supposed to blow
12808 its stack. Problem reported by twlevo@xs4all.nl.
12809
12810 * data/glr.c (yyparse): Don't assume that the initial calls
12811 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
12812 Print a stack-overflow message and fail instead.
12813 Initialize the line-number information before creating the stack,
12814 so that the stack-overflow message can report line zero safely.
12815
12816 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
12817
12818 Fix problems reported by twlevo@xs4all.nl.
12819 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
12820 (yyuserMerge): Provide a default case if b4_mergers is empty.
12821 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
12822 * tests/glr-regression.at
12823 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
12824 Add casts to pacify C++ compilers.
12825 * tests/glr-regression.at (Improper merging of GLR delayed action
12826 sets): Declare yylex before using it.
12827 * tests/Makefile.am (maintainer-check-g++): Fix a stray
12828 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
12829 test for valgrind; valgrind is independent of g++.
12830 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
12831 for compatibility with POSIX 1003.1-2001 (if running coreutils).
12832 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
12833 Use a destructor, so that we can expand the stack. Change
12834 YYSTYPE to char * so that we can free it. Cast result of malloc.
12835
12836 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12837
12838 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
12839 a valgrind failure. Problem reported by twlevo@xs4all.nl.
12840
12841 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
12842
12843 * PACKAGING: New file, suggested by Bruno Haible and taken from
12844 similar wording in gettext's PACKAGING file.
12845 * NEWS: Mention PACKAGING.
12846 * Makefile.am (EXTRA_DIST): Add PACKAGING.
12847
12848 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
12849
12850 * NEWS: Document recent i18n improvements.
12851 * bootstrap: Get runtime translations into runtime-po.
12852 Create runtime-po files automatically, if possible.
12853 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
12854 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
12855 does not infringe on the user's name space.
12856 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
12857 * doc/bison.texinfo (Internationalization): Revamp the English
12858 and Texinfo syntax a bit, to try to make it clearer.
12859 (Bison Options, Option Cross Key): Mention --print-localedir.
12860 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
12861 YYENABLE_NLS. Quote a bit more.
12862 * runtime-po/.cvsignore: New file.
12863 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
12864 * runtime-po/Rules-quot: Remove; now created by bootstrap.
12865 * runtime-po/quot.sed: Likewise.
12866 * runtime-po/boldquot.sed: Likewise.
12867 * runtime-po/en@quot.header: Likewise.
12868 * runtime-po/en@boldquot.header: Likewise.
12869 * runtime-po/insert-header.sin: Likewise.
12870 * runtime-po/remove-potcdate.sin: Likewise.
12871 * runtime-po/Makevars: Likewise.
12872 * runtime-po/LINGUAS: Likewise.
12873 * runtime-po/de.po: Likewise; we will rely on the translation project
12874 to maintain this, so "bootstrap" should get it.
12875 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
12876 its value.
12877 * src/main.c (main): Bind the bison-runtime domain, too.
12878
12879 2005-07-12 Bruno Haible <bruno@clisp.org>
12880
12881 * data/yacc.c: Include <libintl.h> when NLS is enabled.
12882 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
12883 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
12884 * runtime-po: New directory.
12885 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
12886 $(DOMAIN).pot-update rule, so that old messages are never dropped.
12887 * runtime-po/Rules-quot: New file, copied from po/.
12888 * runtime-po/quot.sed: Likewise.
12889 * runtime-po/boldquot.sed: Likewise.
12890 * runtime-po/en@quot.header: Likewise.
12891 * runtime-po/en@boldquot.header: Likewise.
12892 * runtime-po/insert-header.sin: Likewise.
12893 * runtime-po/remove-potcdate.sin: Likewise.
12894 * runtime-po/Makevars: New file.
12895 * runtime-po/POTFILES.in: New file.
12896 * runtime-po/LINGUAS: New file.
12897 * runtime-po/bison-runtime.pot: New file.
12898 * runtime-po/de.po: New file.
12899 * m4/bison.m4: New file.
12900 * Makefile.am (SUBDIRS): Add runtime-po.
12901 (aclocaldir, aclocal_DATA): New variables.
12902 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
12903 Define aclocaldir.
12904 * src/getargs.c (usage): Document --print-localedir option.
12905 (PRINT_LOCALEDIR_OPTION): New enum item.
12906 (long_options): Add --print-localedir option.
12907 (getargs): Handle --print-localedir option.
12908 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
12909 (Internationalization): New section.
12910
12911 2005-07-12 Akim Demaille <akim@epita.fr>
12912
12913 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
12914 for consistency with the rest of the code.
12915 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
12916 Add separators.
12917
12918 2005-07-12 Akim Demaille <akim@epita.fr>
12919
12920 * src/parse-gram.y: Use %printer instead of YYPRINT.
12921
12922 2005-07-12 Akim Demaille <akim@epita.fr>
12923
12924 * src/symtab.h, src/symtab.c (symbol_print): New.
12925 * src/symlist.h, src/symlist.c (symbol_list_print): New.
12926 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
12927
12928 2005-07-12 Akim Demaille <akim@epita.fr>
12929
12930 * data/glr.c (b4_syncline): Fix (swap) the definitions of
12931 b4_at_dollar and b4_dollar_dollar.
12932
12933 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
12934
12935 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
12936 and Pennello's paper.
12937
12938 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
12939
12940 * data/yacc.c (yyparse): Undo previous patch. Instead,
12941 set yylsp[0] and yyvsp[0] only if the initial action
12942 sets yylloc and yylval, respectively.
12943
12944 * data/yacc.c (yyparse): In the initial action, set
12945 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
12946 This avoids the use of undefined variables if the initial
12947 action does not set yylloc and/or yylval.
12948
12949 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
12950
12951 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
12952 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
12953 Remove from CVS. These files are automatically generated.
12954 * examples/extexi: Clarify that this file is now part of Bison,
12955 not GNU M4, and that it works with any POSIX-compatible Awk.
12956 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
12957 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
12958 so that we also get calc++-parser.yy. Geneate it.
12959 Use $(AWK), not gawk, since any conforming Awk will do.
12960 Put comment before action, since older 'make' can't handle comment
12961 in action.
12962 $(BUILT_SOURCES): List all built sources, not just some of them.
12963 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
12964 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
12965 $($(calc_sources_generated)): Remove unnecessary test for existence
12966 of target. (This had a shell syntax error anyway; a stray "x".)
12967 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
12968 calc++-parser.yy.
12969 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
12970
12971 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
12972 implied by the other modules.
12973
12974 2005-07-06 Akim Demaille <akim@epita.fr>
12975
12976 Bind examples/calc++ to the package.
12977 * examples/calc++/Makefile: Remove, replaced by...
12978 * examples/calc++/Makefile.am: ... this new file.
12979 * examples/calc++/test: Remove input.
12980 * examples/calc++/compile: Remove.
12981 * examples/Makefile.am: New.
12982 * configure.ac, Makefile.am: Adjust.
12983 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
12984
12985 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
12986
12987 * data/glr.c (yyFail): Drastically simplify; since the format argument
12988 never had any % directives, we can simply pass it to yyerror.
12989 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
12990 be modified later, as that is the usual style in glr.c.
12991 Problems reported by Paul Hilfinger.
12992
12993 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
12994 and size overflow errors.
12995 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
12996 in case the user prolog sets feature-test macros like _GNU_SOURCE.
12997 (YYSIZEMAX): New macro.
12998 (yystpcpy): New function, taken from yacc.c.
12999 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
13000 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
13001 so that we don't have to maintain their signatures.
13002 (yyFail): Check for buffer overflow, by using vsnprintf rather
13003 than vsprintf. Allocate a bigger buffer if possible.
13004 Report an error if buffer allocation fails.
13005 (yyStackOverflow): New function.
13006 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
13007 the initialization was successful. It might fail if storage was
13008 exhausted.
13009 (yyexpandGLRStack): Add more checks for storage allocation failure.
13010 Use yyStackOverflow to report failures.
13011 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
13012 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
13013 Don't assume stack number fits in int.
13014 (yysplitStack): Check for storage allocation failure.
13015 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
13016 can print diagnostics on storage allocation failure. All callers
13017 changed.
13018 (yyresolveValue): Use yybool for boolean.
13019 (yyreportSyntaxError): Check for size-calculation overflow.
13020 This code is taken from yacc.c.
13021 (yyparse): Check for storage allocation errors when allocating
13022 the initial stack.
13023
13024 2005-07-05 Akim Demaille <akim@epita.fr>
13025
13026 Extract calc++ from the documentation.
13027 * doc/bison.texinfo (Calc++): Add the extraction marks.
13028 * examples/extexi: New, from the aborted GNU Programming 2E.
13029 Separate the different paragraph of a file with empty lines.
13030 * examples/Makefile: Use it to extract the whole calc++ example.
13031
13032 2005-06-24 Akim Demaille <akim@epita.fr>
13033
13034 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
13035 class typedefs.
13036
13037 2005-06-22 Akim Demaille <akim@epita.fr>
13038
13039 * doc/bison.texinfo (C++ Language Interface): First stab.
13040 (C++ Parsers): Remove.
13041
13042 2005-06-22 Akim Demaille <akim@epita.fr>
13043
13044 * data/lalr1.cc (yylex_): Honor %lex-param.
13045
13046 2005-06-22 Akim Demaille <akim@epita.fr>
13047
13048 Start a set of simple examples.
13049 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
13050 * examples/calc++/calc++-driver.hh,
13051 * examples/calc++/calc++-parser.yy,
13052 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
13053 * examples/calc++/compile, examples/calc++/test: New.
13054
13055 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
13056
13057 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
13058 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
13059 which stems from the 2005-05-27 patch.
13060
13061 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13062
13063 * data/glr.c: Modify treatment of unused parameters to permit use
13064 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
13065
13066 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
13067
13068 Fix infringement on user name space reported by Janos Zoltan Szabo.
13069 * data/yacc.c (yyparse): strlen -> yystrlen.
13070
13071 2005-05-30 Akim Demaille <akim@epita.fr>
13072
13073 * data/lalr1.cc (_): New.
13074 Translate the various messages.
13075
13076 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
13077
13078 Fix infringement on user name space reported by Bruno Haible.
13079 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
13080 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
13081 the user's name space.
13082 (alloca): Include <stdlib.h> to get it, if it's not built in.
13083 (YYMALLOC, YYFREE): Define only if needed.
13084 (malloc, free): Declare, but only if needed, as this infringes on
13085 the user name space.
13086
13087 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
13088
13089 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
13090 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
13091 with %d format.
13092 * lib/ebitset.c (min, max): Undef before defining.
13093 * lib/vbitset.c (min, max): Likewise.
13094 * lib/subpipe.c (create_subpipe): Save local variables in case
13095 vfork clobbers them.
13096
13097 2005-05-24 Bruno Haible <bruno@clisp.org>
13098
13099 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
13100 error message syntax used by gcc-4.0.
13101
13102 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
13103
13104 * README: Mention m4 1.4.3. Remove obsolete advice about
13105 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
13106
13107 * bootstrap: Remove workaround for problem I encountered with
13108 gettext 0.14.1; it seems to be fixed now.
13109
13110 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
13111
13112 * NEWS: Version 2.0a.
13113
13114 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
13115 the previous change.
13116
13117 Various maintainer cleanups.
13118 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
13119 conftest*, for benefit of CVS commands run at the same time as
13120 "configure". Add build-aux, since "bootstrap" now creates it and
13121 its subfiles.
13122 * Makefile.cfg (move_if_change): Remove.
13123 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
13124 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
13125 (po_repo, do-po-update, po-update, wget_files, get-targets):
13126 (config.guess-url_prefix, config.sub-url_prefix):
13127 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
13128 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
13129 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
13130 Remove.
13131 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
13132 this is now the recommended name.
13133 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
13134 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
13135 ylwrap. These files now go into build-aux.
13136 * config/move-if-change: Remove.
13137 * config/prev-version.txt: Bump from 1.75 to 2.0.
13138
13139 * bootstrap: Add stdio-safer, unistd-safer modules.
13140 Remove m4/glibc2.m4 (introduced by latest gnulib, but
13141 we don't need it).
13142 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
13143 fopen-safer.c, stdio-safer.h, unistd-safer.h.
13144 * lib/subpipe.c: Include "unistd-safer.h".
13145 (create_subpipe): Make sure all the newly-created
13146 file descriptors are > 2, so that diagnostics don't
13147 get sent down them (which might cause Bison to hang, in theory).
13148 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
13149 * src/files.c (xfopen): Use fopen_safer, not fopen.
13150
13151 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
13152 yesterday's yacc.c fix.
13153
13154 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
13155
13156 * data/glr.c, data/lalr1.cc: Update copyright date.
13157
13158 Fix a destructor bug reported by Wolfgang Spraul in
13159 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
13160 * data/yacc.c (yyabortlab): Don't call destructor, and
13161 don't set yychar to EMPTY.
13162 (yyoverflowlab): Don't call destructor.
13163 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
13164 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
13165 since we no longer output the message "discarding lookahead token
13166 end of input ()".
13167
13168 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13169
13170 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
13171 fix a small glitch in debugging output.
13172 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
13173 after YY_SYMBOL_PRINT where needed.
13174
13175 (struct yyGLRState): Add some comments.
13176 (struct yySemanticOption): Add some comments.
13177 (union yyGLRStackItem): Add comment.
13178
13179 (yymergeOptionSets): Correct this to properly perform the union,
13180 avoiding infinite reported by Michael Rosien.
13181 Update comment.
13182
13183 * tests/glr-regression.at: Add test for GLR merging error reported
13184 by M. Rosien.
13185
13186 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
13187
13188 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
13189 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
13190 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
13191 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
13192 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
13193 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
13194 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
13195 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
13196 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
13197 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
13198 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
13199 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
13200 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
13201 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
13202 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
13203 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
13204 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
13205 src/derives.h, src/files.c, src/files.h, src/getargs.c,
13206 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
13207 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
13208 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
13209 src/output.h, src/parse-gram.c, src/parse-gram.h,
13210 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
13211 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
13212 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
13213 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
13214 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
13215 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
13216 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
13217 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
13218 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
13219 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
13220 tests/reduce.at, tests/regression.at, tests/sets.at,
13221 tests/synclines.at, tests/testsuite.at, tests/torture.at:
13222 Update FSF postal mail address.
13223
13224 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
13225
13226 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
13227 Problem reported by Ralf Menzel.
13228
13229 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
13230
13231 * tests/actions.at: Test that stack overflow invokes destructors.
13232 From Marcus Holland-Moritz.
13233 * data/yacc.c (yyerrlab): Move the code that destroys the stack
13234 from here....
13235 (yyreturn): to here. That way, destructors are called properly
13236 even if the stack overflows, or the user calls YYACCEPT or
13237 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
13238 (yyoverflowlab): Destroy the lookahead.
13239
13240 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
13241
13242 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
13243
13244 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
13245
13246 * NEWS: Bison-generated C parsers no longer quote literal strings
13247 associated with tokens.
13248 * src/output.c (prepare_symbols): Don't escape strings,
13249 since users don't want to see C escapes.
13250 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
13251 in diagnostics.
13252 * tests/input.at (Torturing the Scanner): Likewise.
13253 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
13254
13255 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
13256
13257 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
13258 the data size is known to be too small and we can't increase it.
13259 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
13260
13261 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
13262
13263 * src/parse-gram.y: Include quotearg.h.
13264 (string_as_id): Quote $1 before using it as a key, since the
13265 lexer no longer quotes it for us.
13266 (string_content): Don't strip quotes, since lexer no longer
13267 quotes it for us.
13268 * src/scan-gram.l: Include quotearg.h.
13269 ("\""): Omit quote.
13270 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
13271 a key, since the rest of the lexer doesn't quote it.
13272 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
13273 * tests/regression.at (Token definitions): Check for backslashes
13274 in token strings.
13275
13276 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
13277 (YYSIZE_T): Define to unsigned long int when using an older compiler.
13278 (yyparse): Revamp code to generate long syntax error message, to
13279 make it easier to translate, and to avoid problems with arithmetic
13280 overflow. Change "virtual memory" to "memory" in diagnostic, since
13281 we don't know whether the memory is virtual.
13282
13283 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
13284
13285 * NEWS: Bison-generated C parsers now use the _ macro to
13286 translate strings.
13287 * data/yacc.c (_) [!defined _]: New macro.
13288 All English strings wrapped inside this macro.
13289 * doc/bison.texinfo (Bison Parser): Document _.
13290 * po/POTFILES.in: Include src/parse-gram.c, since it now
13291 includes translateable strings that parse-gram.y doesn't.
13292
13293 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
13294
13295 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
13296 reverting the 2004-10-11 change to this function.
13297 (symbol_check_alias_consistency): Don't call symbol_type_set
13298 if the type name is already correct.
13299 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
13300
13301 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
13302
13303 * tests/regression.at (Token definitions): Don't use a token named
13304 c, as that generates a "#define c ..." that runs afoul of buggy
13305 stdlib.h that uses the identifier c as a member of struct
13306 drand48_data. Problem reported by Horst Wente.
13307
13308 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
13309
13310 * bootstrap: Change translation URL from
13311 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
13312 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
13313 redirection glitches. Problem reported by twlevo@xs4all.nl.
13314
13315 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
13316
13317 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
13318 after operands; POSIX says this isn't portable for the c99 command.
13319
13320 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
13321
13322 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
13323 immediately if a data overrun has occurred; this may help us track
13324 down what may be a spurious failure on MacOS.
13325
13326 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
13327
13328 Respond to problems reported by twlevo@xs4all.nl.
13329
13330 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
13331
13332 * src/vcg.h: Comment fix.
13333 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
13334 (G_CMAX): Change to -1 instead of INT_MAX.
13335
13336 * data/yacc.c (yyparse): Omit spaces before #line.
13337
13338 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
13339
13340 * src/tables.c (state_number_to_vector_number): Put it inside an
13341 "#if 0", since it's not currently used. Problem reported by
13342 Roland McGrath.
13343
13344 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
13345
13346 * src/output.c (escaped_output): Renamed from
13347 escaped_file_name_output, since we now use it for symbol tags as
13348 well. All uses changed.
13349 (symbol_destructors_output, symbol_printers_output):
13350 Escape symbol tags too.
13351 Problem reported by Matyas Forstner in
13352 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
13353
13354 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
13355 not needed.
13356 * src/output.c (user_actions_output, token_definitions_output,
13357 symbol_destructors_output, symbol_printers_output): Likewise.
13358 * src/reader.c (prologue_augment): Likewise.
13359 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
13360
13361 * src/vcg.c (output_edge): Don't quote linestyle arg.
13362 Problem reported by twlevo@xs4all.nl.
13363
13364 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
13365
13366 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
13367 example, reported by Derek M Jones. Also, make the example even
13368 more outrageous, to better illustrate how bad the problem is.
13369
13370 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
13371
13372 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
13373 putsym. Typo reported by Sebastian Piping.
13374
13375 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
13376
13377 * doc/bison.texinfo (Language and Grammar): some -> same
13378 (Epilogue): int he -> in the
13379 Typos reported by Sebastian Piping via Justin Pence.
13380
13381 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
13382
13383 * tests/glr-regression.at (Improper handling of embedded actions
13384 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
13385 embedded actions and $-N in GLR parsers", work around an Autoconf bug
13386 with dollar signs in test names.
13387 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
13388 for a similar reason.
13389
13390 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
13391
13392 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
13393 wants to redefine G_VIEW.
13394
13395 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
13396
13397 * src/vcg.c (get_view_str): Remove case for normal_view.
13398 Problem reported by twlevo@xs4all.nl.
13399
13400 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
13401
13402 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
13403 Problem reported by twlevo@xs4all.nl.
13404
13405 * doc/bison.texinfo: Change @dircategory from "GNU programming
13406 tools" to "Software development". Requested by Richard Stallman
13407 via Karl Berry.
13408
13409 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
13410
13411 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
13412 Problem reported by twlevo@xs4all.nl.
13413
13414 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
13415
13416 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
13417 keyword; it's not needed with modern compilers, and it doesn't
13418 affect correctness with older compilers. Suggested by
13419 twlevo@xs4all.nl.
13420
13421 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
13422
13423 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
13424 gcc -Wswitch-default.
13425 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13426 * data/yacc.c (yyparse): Likewise.
13427
13428 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
13429
13430 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
13431 already. Let config.h define any nonstandard values.
13432
13433 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
13434
13435 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
13436 for the benefit of slower hosts. Problem reported by
13437 Nelson H. F. Beebe.
13438
13439 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
13440
13441 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
13442 being defined and not used.
13443 * data/lalr1.cc (yyparse): Likewise.
13444 Use "if (false)" rather than "if (0)".
13445
13446 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
13447
13448 * TODO: Mention that we should allow NUL bytes in tokens.
13449
13450 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
13451
13452 * src/scan-skel.l (<<EOF>>): Don't close standard output.
13453 Problem reported by Hans Aberg.
13454
13455 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
13456
13457 * src/getargs.c (version): Happy new year; update overall
13458 program copyright date from 2004 to 2005.
13459
13460 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
13461 Problem reported by Hans Aberg.
13462 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
13463 (Output file names.): Add a test for the case when standard output
13464 is closed.
13465
13466 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
13467
13468 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
13469 to fix an oversight in the Bison 2.0 manual.
13470
13471 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
13472
13473 * NEWS: Version 2.0. Reformat the existing news items since
13474 1.875, so that related items are grouped together.
13475 * configure.ac (AC_INIT): Bump version to 2.0.
13476 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
13477
13478 * tests/torture.at (Exploding the Stack Size with Alloca): Set
13479 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
13480 otherwise, we're not testing alloca. Unfortunately there's no
13481 simple way to consult HAVE_ALLOCA here.
13482
13483 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
13484 for yymsg, too.
13485
13486 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
13487 hand. This avoids a warning about comparing int to size_t when
13488 GCC warnings are enabled.
13489
13490 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
13491
13492 * NEWS: Bison-generated parsers no longer default to using the
13493 alloca function (when available) to extend the parser stack, due
13494 to widespread problems in unchecked stack-overflow detection.
13495 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
13496 responsibility to set it to a positive value. This lets the user
13497 specify a value that is not a preprocessor constant.
13498 * data/yacc.c (YYMAXDEPTH): Likewise.
13499 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
13500 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
13501 to be a compile-time constant. However, explain the constraints on it.
13502 Also, explain the constraints on YYINITDEPTH.
13503 (Table of Symbols): Explain that alloca is no longer the default.
13504 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
13505 to 1.
13506
13507 * doc/bison.texinfo (Location Default Action): Mention that n must
13508 be zero when k is zero. Suggested by Frank Heckenbach.
13509
13510 2004-12-22 Akim Demaille <akim@epita.fr>
13511
13512 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
13513 (parser::state_type, parser::semantic_type, parser::location_type):
13514 Private, not public.
13515 (parser::parse): Return ints, not bool.
13516 Returning a bool introduces a problem: 0 corresponds to false, and
13517 it seems weird to return false on success. Returning true changes
13518 the conventions for yyparse.
13519 Alternatively we could return void and send an exception.
13520 There is no clear consensus (yet?).
13521 (state_stack, semantic_stack, location_stack): Rename as...
13522 (state_stack_type, semantic_stack_type, location_stack_type): these.
13523 Private, not public.
13524 * tests/c++.at: New.
13525 * tests/testsuite.at, tests/Makefile.am: Adjust.
13526
13527 2004-12-21 Akim Demaille <akim@epita.fr>
13528
13529 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
13530
13531 2004-12-21 Akim Demaille <akim@epita.fr>
13532
13533 Don't impose std::string for filenames.
13534
13535 * data/lalr1.cc (b4_filename_type): New.
13536 (position::filename): Use it.
13537 (parser.hh): Move the inclusion of stack.hh and location.hh below
13538 the user code, so that needed headers for the filename type can be
13539 included first.
13540 Forward declare them before the user code.
13541 * tests/Makefile.am (check-local, installcheck-local): Pass
13542 TESTSUITEFLAGS to the TESTSUITE.
13543
13544 2004-12-20 Akim Demaille <akim@epita.fr>
13545
13546 Use more STL like names: my_class instead of MyClass.
13547
13548 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
13549 (SemanticStack, SemanticType, StateStack, StateType)
13550 (TokenNumberType, Stack, Slice, Traits, Parser::location)
13551 (Parser::value): Rename as...
13552 (location_stack, location_type, rhs_number_type, semantic_stack)
13553 (semantic_type, state_stack, state_type, token_number_type, stack)
13554 (slice, traits, parser::yylloc, parser::yylval): these.
13555
13556 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
13557
13558 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
13559
13560 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
13561 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13562
13563 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
13564
13565 Remove uses of 'short int' and 'unsigned short int'. This raises
13566 some arbitrary limits. It uses more memory but nowadays that's
13567 not much of an issue.
13568
13569 This change does not affect the generated parsers; that's a different
13570 task, as some users will want to conserve memory there.
13571
13572 Ideally we should use size_t to represent all object counts, and
13573 something like ptrdiff_t to represent signed differences of object
13574 counts; but that will require more code-cleanup than I have the
13575 time to do right now.
13576
13577 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
13578 Use size_t, not int or short int, to count objects.
13579 * src/closure.c (nritemset, closure): Likewise.
13580 * src/closure.h (nritemset, closure): Likewise.
13581 * src/nullable.c (nullable_compute): Likewise.
13582 * src/print.c (print_core): Likewise.
13583 * src/print_graph.c (print_core): Likewise.
13584 * src/state.c (state_compare, state_hash): Likewise.
13585 * src/state.h (struct state): Likewise.
13586 * src/tables.c (default_goto, goto_actions): Likewise.
13587
13588 * src/gram.h (rule_number, rule): Use int, not short int.
13589 * src/output.c (prepare_rules): Likewise.
13590 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
13591 errs, reductions): Likewise.
13592 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
13593 Likewise.
13594 * src/tables.c (vector_number, tally, action_number,
13595 ACTION_NUMBER_MINIMUM): Likewise.
13596 * src/output.c (muscle_insert_short_int_table): Remove.
13597
13598 2004-12-17 Akim Demaille <akim@epita.fr>
13599
13600 * data/lalr1.cc: Extensive Doxygenation.
13601 (error_): Rename as...
13602 (error): this, since it is visible to the user.
13603 Adjust callers.
13604 (Parser::message): Now an automatic variable from...
13605 (Parser::yyreport_syntax_error_): here.
13606 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
13607 Parser::error.
13608 * tests/input.at: Escape $.
13609
13610 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
13611
13612 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
13613 Parenthesize rhs to avoid obscure problems with mistakes like
13614 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
13615 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13616 b4_rhs_location): Likewise.
13617 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
13618 b4_rhs_location): Likewise.
13619
13620 2004-12-16 Akim Demaille <akim@epita.fr>
13621
13622 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
13623 yacc.c: be sure to stay within yycheck_.
13624 * tests/actions.at: Re-enable C++ tests.
13625
13626 2004-12-16 Akim Demaille <akim@epita.fr>
13627
13628 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
13629 real.
13630
13631 2004-12-16 Akim Demaille <akim@epita.fr>
13632
13633 Use #define to handle the %name-prefix.
13634
13635 * data/glr.c, data/yacc.c: Comment changes.
13636 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
13637 so that one can refer to yylex in the parser file, and have it
13638 renamed, as is the case with other skeletons.
13639
13640 2004-12-16 Akim Demaille <akim@epita.fr>
13641
13642 Move lalr1.cc internals into yy*.
13643
13644 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
13645 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
13646 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
13647 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
13648 (empty_, final_, terror_, errcode_, ntokens_)
13649 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
13650 (looka_, ilooka_, error_range_, nerrs_):
13651 Rename as...
13652 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
13653 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
13654 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
13655 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
13656 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
13657 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
13658 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
13659 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
13660 these.
13661
13662 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
13663
13664 Fix some problems reported by twlevo at xs4all.
13665 * src/symtab.c (symbol_new): Report an error if the input grammar
13666 contains too many symbols. This is better than calling abort() later.
13667 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
13668 (struct node, struct graph):
13669 Rename member expand to stretch. All uses changed.
13670 (struct graph): Remove member layoutalgorithm. All uses removed.
13671 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
13672 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
13673 All uses changed.
13674 (N_STRETCH): Rename from N_EXPAND. All uses changed.
13675
13676 2004-12-15 Akim Demaille <akim@epita.fr>
13677
13678 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
13679 Add more Doxygen comments.
13680 (symprint_, stack_print_, reduce_print_, destruct_, pop)
13681 (report_syntax_error_, translate_): Rename as...
13682 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
13683 (yypop_, yyreport_syntax_error_, yytranslate_): this.
13684
13685 2004-12-15 Akim Demaille <akim@epita.fr>
13686
13687 * data/lalr1.cc (lex_): Rename as...
13688 (yylex_): this.
13689 Move the trace here.
13690 Take the %name-prefix into account.
13691 Reported by Alexandre Duret-Lutz.
13692
13693 2004-12-15 Akim Demaille <akim@epita.fr>
13694
13695 Simplify the C++ parser constructor.
13696
13697 * data/lalr1.cc (debug_): Rename as...
13698 (yydebug_): so that the parser's internals are always in the yy*
13699 pseudo namespace.
13700 Adjust uses.
13701 (b4_parse_param_decl): Remove the leading comma as it is now only
13702 called as unique argument list.
13703 (Parser::Parser): Remove the constructor accepting a location and
13704 an initial debugging level.
13705 Remove from the other ctor the argument for the debugging level.
13706 (debug_level_type, debug_level, set_debug_level): New.
13707
13708 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
13709 constructor calls.
13710
13711 2004-12-15 Akim Demaille <akim@epita.fr>
13712
13713 Remove b4_root related material: failure experiment
13714 (which goal was to allow to derive from a class).
13715
13716 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
13717 definitions and uses.
13718
13719 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
13720
13721 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
13722 not 2, since it's not portable to subtract 1 from the start of an
13723 array. The new item 0 is never set or used. All uses changed.
13724
13725 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
13726 the default definition of YYLLOC_DEFAULT. Problem reported
13727 by Frank Heckenbach.
13728
13729 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
13730
13731 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
13732 the normal case and one for the error case. Just use the
13733 first one uniformly. Problem reported by Frank Heckenbach.
13734 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
13735 use exactly the same macro in both places.
13736 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
13737 so that the normal-case YYRHSLOC works for the error case too.
13738 All uses changed.
13739 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
13740 (YYLLOC_DEFAULT): Use the same macro as glr.c.
13741 * doc/bison.texinfo (Location Default Action): Don't claim that
13742 we have an array of locations. Use the same macro for both glr
13743 and lalr parsers. Mention YYRHSLOC. Mention what happens when
13744 the index is 0.
13745
13746 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13747
13748 * HACKING: Update email addresses to send announcements to.
13749
13750 * configure.ac (AC_INIT): Bump version to 1.875f.
13751
13752 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
13753
13754 * NEWS: Version 1.875e.
13755 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
13756
13757 * src/scan-skel.l: Include "complain.h", for "fatal".
13758
13759 * src/relation.h (relation_print, relation_digraph):
13760 Relation sizes are of type relation_node, not size_t (this is
13761 merely a doc fix, since the two types are equivalent).
13762 (relation_transpose): Relation sizes are of type relation_node,
13763 not int.
13764 * src/relation.c: Likewise.
13765 (top, infinity): Now of type relation_node, not int.
13766 (traverse, relation_transpose): Use relation_node, not int.
13767
13768 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
13769 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
13770 (yyparse): Remove unused local introduced in 2004-10-25 patch.
13771
13772 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
13773 specifying whether the test should be skipped. Use it tp
13774 specify that the [%defines %skeleton "lalr1.cc"] tests currently
13775 fail on some hosts, and should be skipped.
13776
13777 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
13778
13779 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
13780 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
13781 unless otherwise specified below.
13782
13783 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
13784 to allocate kernel_base, kernel_items, kernel_size, since
13785 they needn't be initialized to 0.
13786 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
13787 * src/closure.c (new_closure): Likewise, for itemset.
13788 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
13789 * src/lalr.c (set_goto_map): Likewise, for temp_map.
13790 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
13791 (build_relations): Likewise for edge, states1, includes.
13792 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
13793 * src/reader.c (packgram): Likewise, for ritem, rules.
13794 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
13795 * src/relation.c (relation_digraph): Likewise for VERTICES.
13796 (relation_transpose): Likewise for new_R, end_R.
13797 * src/symtab.c (symbols_token_translations_init): Likewise for
13798 token_translations.
13799 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
13800 (token_actions): Likewise for yydefact, actrow, conflrow,
13801 conflict_list.
13802 (save_column): Likewise for froms[symno], tos[symno].
13803 (goto_actions): Likewise for state_count.
13804 (pack_table): Likewise for base, pos, check.
13805 (tables_generate): Likewise for width.
13806
13807 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
13808 for initial core. Just have a separate core, so we needn't worry
13809 about whether kernel_size and kernel_base are initialized.
13810
13811 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
13812 kernel_size, kernel_items): Remove unnecessary initialization.
13813 * src/conflicts.c (conflicts): Likewise.
13814 * src/derives.c (derives): Likewise.
13815 * src/muscle_tablc (muscle_insert): Likewise.
13816 * src/relation.c (relation_digraph): Likewise.
13817 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
13818 conflrow, conflict_table, conflict_list, table, check):
13819 Likewise.
13820
13821 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
13822 This is because all callers pass unsigned int.
13823 * src/closure.h (new_closure): Likewise.
13824
13825 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
13826 (build_relations): Initialize includes[i] in all cases.
13827 * src/reader.c (packgram): Always initialize rules[ruleno].prec
13828 and rules[ruleno].precsym. Initialize members in order.
13829 * src/relation.c (relation_transpose): Always initialize new_R[i]
13830 and end_R[i].
13831 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
13832
13833 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
13834 conflict_list[0] was always 0, but now it isn't initialized.
13835
13836 * src/table.c (table_grow): When conflict_table grew, the grown
13837 area wasn't cleared. Fix this.
13838
13839 * lib/.cvsignore: Add strdup.c, strdup.h.
13840 * m4/.cvsignore: Add strdup.m4.
13841
13842 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
13843
13844 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
13845 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
13846 GOTO_NUMBER_MAXIMUM, since we occasionally compute
13847 ngotos + 1 without checking for overflow.
13848 (build_relations): Use END_NODE, not -1, to denote end of edges.
13849 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
13850 build_relations): Use goto_number, not int, for goto numbers.
13851 * src/tables.c (save_column, default_goto): Likewise.
13852
13853 2004-11-23 Akim Demaille <akim@epita.fr>
13854
13855 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
13856 of #defining from yystype.
13857 Don't typedef yystype, C++ does not need it.
13858 This lets it possible to forward declare it as union.
13859
13860 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
13861
13862 * bootstrap (gnulib_modules): Add extensions.
13863 Problem reported by Jim Meyering.
13864
13865 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
13866
13867 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
13868 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
13869 src/system.h, src/tables.c: XFREE -> free, to accommodate
13870 recent change to gnulib xalloc.h.
13871 Problem reported by Jim Meyering.
13872
13873 2004-11-17 Akim Demaille <akim@epita.fr>
13874
13875 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
13876
13877 2004-11-17 Akim Demaille <akim@epita.fr>,
13878 Alexandre Duret-Lutz <adl@gnu.org>
13879
13880 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
13881 changes.
13882 (YYCDEBUG): Adjust.
13883 Use it instead of cdebug_.
13884 (Parser::debug_stream, Parser::set_debug_stream): New.
13885 (Parser::symprint_): Define cdebug_ for temporary backward
13886 compatibility.
13887 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
13888 debug_stream ().
13889
13890 2004-11-17 Akim Demaille <akim@epita.fr>
13891
13892 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
13893 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
13894 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
13895 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13896
13897 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
13898
13899 * data/glr.c (yyloc_default): Remove; not used.
13900 Problem reported by Frank Heckenbach.
13901
13902 2004-10-25 Akim Demaille <akim@epita.fr>
13903
13904 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
13905 Introduce another definition to address simple location arrays.
13906 (yyGLRStack): New member: yyerror_range.
13907 (yyrecoverSyntaxError, yyparse): Update it.
13908 (yyrecoverSyntaxError): Use it when shifting the error token to
13909 have an accurate range, equivalent to the one computed by both
13910 yacc.c and lalr1.cc.
13911 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
13912 that column numbers start at column 0, as per GNU Coding
13913 Standards, the others tests, and the doc.
13914 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
13915 Adjust to the above change (first column is 0).
13916 And adjust the location of the "<error>", now covering the whole
13917 line.
13918
13919 2004-10-22 Akim Demaille <akim@epita.fr>
13920 and Paul Eggert <eggert@cs.ucla.edu>
13921
13922 Remove some arbitrary limits on goto numbers and relations.
13923 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
13924 initial values, since they're never used.
13925 (set_goto_map): ngotos is now unsigned, so test for overflow
13926 by seeing whether it wraps around to zero.
13927 * src/lalr.h (goto_number): Now size_t, not short int.
13928 (GOTO_NUMBER_MAXIMUM): Remove.
13929 * src/relation.c (relation_print, traverse, relation_transpose):
13930 Check for END_NODE rather than looking at sign.
13931 * src/relation.h (END_NODE): New macro.
13932 (relation_node): Now size_t, not short int.
13933
13934 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
13935
13936 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
13937 keyword, not an identifier. Problem reported by Baron Schwartz in
13938 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
13939
13940 2004-10-11 Akim Demaille <akim@epita.fr>
13941
13942 * src/symtab.c (symbol_check_alias_consistency): Also check
13943 type names, destructors, and printers.
13944 Reported by Alexandre Duret-Lutz.
13945 Recode the handling of associativity and precedence in terms
13946 of symbol_precedence_set.
13947 Accept no redeclaration at all, not even equal to the previous
13948 value.
13949 (redeclaration): New.
13950 Use it to factor redeclaration complaints.
13951 (symbol_make_alias): Don't set the type of the alias, let
13952 symbol_check_alias_consistency do it as for other features.
13953 * src/symtab.h (symbol): Add new member prec_location, and
13954 type_location.
13955 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
13956 * tests/input.at (Incompatible Aliases): New.
13957
13958 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
13959
13960 .cvsignore fixes to accommodate gnulib changes,
13961 and the practice of naming build directories "_build".
13962 * .cvsignore: Add "_*". Sort.
13963 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
13964 * m4/.cvsignore: Add "*_gl.m4".
13965
13966 2004-10-06 Akim Demaille <akim@epita.fr>
13967
13968 * src/parse-gram.y (add_param): Fix the truncation of trailing
13969 spaces.
13970
13971 2004-10-05 Akim Demaille <akim@epita.fr>
13972
13973 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
13974 whether the reducion was empty or not. This leaves room to
13975 improve the use of YYLLOC_DEFAULT in such a case.
13976 lalr1.cc is still experimental, so changing this is acceptable.
13977 And finally, there are probably not many users who changed the
13978 handling of locations in GLR, so changing is admissible too.
13979
13980 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
13981 empty reduction, set @$ to an empty location ending the previously
13982 stacked symbol.
13983 Adjust uses to make sure the code is triggered on empty
13984 reductions.
13985 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
13986 expected output: empty reductions have empty locations.
13987
13988 2004-09-29 Akim Demaille <akim@epita.fr>
13989
13990 * data/lalr1.cc: Move towards a more standard C++ coding style
13991 for templates: Class < T > -> Class<T>.
13992
13993 2004-09-29 Akim Demaille <akim@epita.fr>
13994
13995 * data/lalr1.cc: Reinstall the former ctor, for sake of
13996 compatibility, but warn it will be removed.
13997 Move towards a more standard C++ coding style (i.e., type *var ->
13998 type* var).
13999
14000 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
14001
14002 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
14003 since it's less likely to work if NULs are involved in the future.
14004
14005 2004-09-27 Akim Demaille <akim@epita.fr>
14006
14007 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
14008
14009 2004-09-27 Akim Demaille <akim@epita.fr>
14010
14011 * data/lalr1.cc (b4_parse_param_decl_1): New.
14012 (b4_parse_param_decl): Use it to have different names between attribute
14013 and argument names.
14014 (b4_cc_constructor_call): Likewise.
14015
14016 2004-09-24 Akim Demaille <akim@epita.fr>
14017
14018 * src/parse-gram.y (add_param): Strip the leading and trailing
14019 blanks from a formal argument declaration.
14020 (YY_LOCATION_PRINT): New.
14021
14022 2004-09-24 Akim Demaille <akim@epita.fr>
14023
14024 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
14025 after the location.
14026
14027 2004-09-24 Akim Demaille <akim@epita.fr>
14028
14029 * doc/bison.texinfo (Table of Symbols): Sort.
14030
14031 2004-09-21 Akim Demaille <akim@epita.fr>
14032
14033 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
14034 the useless parentheses.
14035 Suggested by Paul Eggert.
14036
14037 2004-09-20 Akim Demaille <akim@epita.fr>
14038
14039 Let the initial-action act on the look-ahead, and use it for the
14040 "initial push" (corresponding to an hypothetical beginning-of-file).
14041 And let lalr1.cc honor %initial-action.
14042
14043 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
14044 example.
14045 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
14046 (Parser::Parser): Remove the ctor that used to initialize it.
14047 (Parser::parse): Like in the other skeletons, issue the "starting
14048 parse" message before any action.
14049 Honor %initial-action.
14050 Initialize the stacks with the lookahead.
14051 * data/yacc.c: Let $$ and @$ in %initial-action designate the
14052 look-ahead.
14053 Push them in the stacks.
14054 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
14055
14056 2004-09-20 Akim Demaille <akim@epita.fr>
14057
14058 * doc/bison.texinfo (Initial Action Decl): New.
14059
14060 2004-09-20 Akim Demaille <akim@epita.fr>
14061
14062 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
14063 clearer criterion to define it.
14064 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
14065 When reducing on an empty RHS, use the latest stacked location as
14066 location.
14067 yylloc is not always available.
14068 * data/glr.c: Likewise.
14069 Also, honor initial-actions.
14070
14071 2004-09-20 Akim Demaille <akim@epita.fr>
14072
14073 * data/yacc.c (YY_LOCATION_PRINT): New.
14074 Define when we know YYLTYPE's structure, i.e., when the default
14075 YYLLOC_DEFAULT is used.
14076 * data/c.m4 (b4_yysymprint_generate): Use it.
14077 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
14078 value of the result.
14079 (error_start_): Replace with...
14080 (error_range_): this location array.
14081 This allows to replace code relying on the implementation of
14082 locations by portable code.
14083 * data/yacc.c (yylerrsp): Replace with...
14084 (yyerror_range): this.
14085 Every time a token is popped, update yyerror_range[0], to have an
14086 accurate location for the error token.
14087 * data/glr.c (YY_LOCATION_PRINT): New.
14088 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
14089 deference a pointer.
14090 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
14091 report the location in %printers.
14092
14093 * src/scan-skel.l: Instead of abort, report error messages to ease
14094 understanding skeleton scanning failures.
14095
14096 2004-09-16 Akim Demaille <akim@epita.fr>
14097
14098 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
14099 (iterator, const_iterator): these, to be more in the C++ spirit.
14100 Also, return reverse iterators so that when displaying the stack
14101 we display its bottom first.
14102 (Parser::stack_print_, Parser::reduce_print_): Match the messages
14103 from yacc.c.
14104 We should probably use vector here though.
14105
14106 2004-09-16 Akim Demaille <akim@epita.fr>
14107
14108 Have more complete shift traces.
14109
14110 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
14111 to report Shifts instead of ad hoc YYDPRINTF invocations,
14112 including for the error token.
14113 * data/lalr1.cc (symprint_): Output the location.
14114 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
14115 output the location within the %printer.
14116 Activate GLR tests, at least to make sure they compile properly.
14117 They still don't pass though.
14118 * tests/calc.at: Adjust expect verbose output, since now "Entering
14119 state..." is on a different line than the "Shifting" message.
14120
14121 2004-09-08 Akim Demaille <akim@epita.fr>
14122
14123 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
14124 Bison directive from the Bison file to the invocation of this
14125 macro, so that these directives are passed to
14126 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
14127 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
14128 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
14129 the extra Bison directives instead of the whole series.
14130 Change the grammar so that there are recoverable errors, and
14131 unrecoverable errors. Now we can have the parser give up before
14132 consuming the whole input. As a result we now can observe that
14133 the lookahead is freed when needed.
14134 Change the parser source to parse argv[1] instead of a hard coded
14135 string.
14136 Simplify yylex, and give a value and location to EOF.
14137 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
14138 passed directives already coded in the file.
14139 Add some tests to check the location of "error".
14140 For some tests, the C++ parser is correct, and not yacc.c.
14141 For other tests, they provide different, but unsatisfying, values,
14142 so keep the C++ value so that at least one parser is "correct"
14143 according to the test suite.
14144 (Actions after errors): Remove, this is subsumed by the
14145 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
14146
14147 2004-09-06 Akim Demaille <akim@epita.fr>
14148
14149 * data/lalr1.cc: Adjust the indentation of the labels.
14150 (Parser::pop): New.
14151 Use it.
14152
14153 2004-09-06 Akim Demaille <akim@epita.fr>
14154
14155 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
14156 argument, an informative message.
14157 Call YY_SYMBOL_PRINT.
14158 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
14159 * data/lalr1.cc (destruct_): Likewise.
14160 In addition, no longer depend on b4_yysymprint_generate and
14161 b4_yydestruct_generate to generate these functions, do it "by
14162 hand".
14163
14164 2004-09-03 Akim Demaille <akim@epita.fr>
14165
14166 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
14167 invoked, yydestruct the lookahead.
14168 * tests/calc.at (Calculator $1): Update the expected lengths of
14169 traces: there is an added line for the discarded lookahead.
14170 * doc/bison.texinfo (Destructor Decl): Some rewording.
14171 Define "discarded" symbols.
14172
14173 2004-09-02 Akim Demaille <akim@epita.fr>
14174
14175 * data/lalr1.cc (translate_, destruct_): No reason to be static.
14176
14177 2004-09-02 Akim Demaille <akim@epita.fr>
14178
14179 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
14180 (YYDSYMPRINTF): Rename as...
14181 (YY_SYMBOL_PRINT): this.
14182 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
14183 two.
14184 Use it instead of direct symprint_ calls.
14185 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
14186 one.
14187
14188 2004-09-02 Akim Demaille <akim@epita.fr>
14189
14190 * data/lalr1.cc (b4_yysymprint_generate): New.
14191 (symprint_): New member function, defined when YYDEBUG.
14192 Use it consistently instead of token/nterm debugging output by
14193 hand.
14194 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
14195 %printer calls to use cdebug_ when using lalr1.cc.
14196
14197 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
14198
14199 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
14200 with #ifdef YYDEBUG.
14201
14202 2004-08-26 Akim Demaille <akim@epita.fr>
14203
14204 * doc/bison.texinfo (Implementing Loops): Rename as...
14205 (Implementing Gotos/Loops): this.
14206
14207 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
14208
14209 Adjust to latest gnulib.
14210 * bootstrap (gnulib_modules): Add xalloc-die.
14211 Set LC_ALL=C so that file names sort consistently.
14212 Prefer the gnulib copies of gettext.m4, glibc21.m4,
14213 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
14214 uintmax_t.m4, ulonglong.m4.
14215 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
14216 po.m4 since we are now using _gl.m4 instead.
14217
14218 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
14219
14220 * src/scan-action.l: Remove. Scanning of semantic actions is
14221 handled in scan-gram.l.
14222
14223 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
14224
14225 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
14226
14227 * src/location.h (struct): The file member is a uniqstr.
14228 (equal_boundaries): Use UNIQSTR_EQ for comparison.
14229
14230 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
14231
14232 Fix bug with non-%union parsers that have printers or destructors,
14233 which led to a Bison core dump. Reported by Peter Fales in
14234 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
14235
14236 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
14237 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
14238 not to our own type.
14239 * src/output.c (symbol_destructors_output, symbol_printers_output):
14240 Don't assume %union.
14241 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
14242 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
14243 UNION-FLAG. All callers changed.
14244 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
14245 Use type char, not unsigned int, when declaring an array of char;
14246 this lets us remove a cast.
14247 (Printers and Destructors): Add non-%union test cases.
14248
14249 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14250
14251 * doc/bison.texinfo: Minor editorial changes, mostly to the new
14252 GLR writeups. E.g., avoid frenchspacing and the future tense,
14253 change "lookahead" to "look-ahead", and change "wrt" to "with
14254 respect to".
14255
14256 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14257
14258 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
14259 New sections, split off from the GLR Parsers section. Put the new
14260 Simple GLR Parser near the start of the GLR section, for clarity.
14261 Rewrite connective text.
14262
14263 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
14264
14265 * doc/bison.texinfo (Simple GLR Parsers): New section.
14266
14267 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
14268
14269 * NEWS, TODO, doc/bison.texinfo:
14270 Use "look-ahead" instead of "lookahead", to be consistent.
14271 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
14272 while we're fixing "look-ahead".
14273 * src/conflicts.c (shift_set): Renamed from shiftset.
14274 (look_ahead_set): Renamed from lookaheadset.
14275 * src/print.c: Likewise.
14276 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
14277 name for "lookahead".
14278 (report_types, usage): Likewise.
14279 * src/getargs.h (report_look_ahead_tokens): Renamed from
14280 report_lookaheads.
14281 * src/lalr.c (compute_look_ahead_tokens): Renamed from
14282 compute_lookaheads.
14283 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
14284 (look_ahead_tokens_print): Renamed from lookaheads_print.
14285 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
14286 state_rule_lookaheads_print.
14287 * src/state.h: Likewise.
14288 (reductions.look_ahead_tokens): Renamed from lookaheads.
14289 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
14290 AT_DATA_LOOKAHEADS_GRAMMAR.
14291
14292 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
14293
14294 * README: Update location of patched M4 distribution.
14295
14296 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
14297
14298 Don't assume the C++ compiler takes the same arguments as the C compiler
14299 (trivial change).
14300 * configure.ac (O0CXXFLAGS): New var.
14301 * tests/atlocal.in (CXXFLAGS): Use it.
14302
14303 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
14304
14305 Fix some "make check" problems with C++ reported by
14306 Albert Chin-A-Young for Tru64 C++ in this thread:
14307 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
14308
14309 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
14310 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14311 Output to a .cc file for C++, not to a .c file.
14312 * tests/calc.at (AT_CHECK_CALC): Likewise.
14313 * tests/regression.at (AT_CHECK_DANCER): Likewise.
14314 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
14315
14316 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
14317
14318 * tests/calc.at, tests/actions.at: Workaround for SGI
14319 C++ compiler. (trivial change)
14320
14321 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
14322
14323 Spent a few hours checking out which prerequisite versions the
14324 current sources actually require. I went all the way back to
14325 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
14326 a seemingly endless set of combinations of versions more recent
14327 than that. The bottom line is that the current sources require
14328 fairly recent versions of the build tools, and it'll be some work
14329 to change this.
14330 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
14331 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
14332 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
14333 Add comments explaining why those particular versions are
14334 currently needed.
14335
14336 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
14337 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
14338 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
14339
14340 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
14341 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
14342
14343 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
14344
14345 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
14346 0.11.5. Suggested by Bruno Haible.
14347 * bootstrap: Remove gettext version checking.
14348
14349 * doc/bison.texinfo (Decl Summary): Also mention that %union
14350 can depend on prerequisite types. Problem reported by Tim
14351 Van Holder.
14352
14353 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
14354
14355 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
14356 * README-alpha: Don't tell people not to package this.
14357
14358 * bootstrap: Don't assume $(...) works; use `...` instead.
14359 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
14360 gettext better.
14361
14362 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
14363 put into the -d output file, and mention what to do if YYSTYPE is
14364 defined as a macro.
14365
14366 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
14367
14368 Undo change made earlier today: it caused autopoint to not bring
14369 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
14370 autopoint's.
14371
14372 * bootstrap: Check that gettext version matches what's in
14373 configure.ac. Warn users to ignore robots.txt ERROR 404.
14374 * bootstrap: Undo today's earlier change (logged below).
14375 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
14376
14377 The gettext version checking is causing more trouble than it's
14378 curing; remove it. Problem reported by Paul Hilfinger.
14379
14380 * bootstrap: Issue a warning that one can expect a message
14381 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
14382 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
14383
14384 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
14385
14386 Ensure that the C++ compiler used for testing actually works on a
14387 simple test program; if not, skip the C++-related tests. Problem
14388 reported by Vin Shelton in:
14389 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
14390
14391 * m4/cxx.m4: New file.
14392 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
14393 * tests/atlocal.in (BISON_CXX_WORKS): Add.
14394 * tests/local.at (AT_COMPILE_CXX): Use it.
14395
14396 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14397
14398 * data/glr.c (yylloc): Output this macro even if locations are not
14399 being generated, as the GLR parser needs it even in that case.
14400 Problem reported by Troy A. Johnson
14401 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
14402
14403 * configure.ac (AC_INIT): Update to 1.875e.
14404
14405 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
14406
14407 * NEWS: Version 1.875d.
14408 * configure.ac (AC_INIT): Likewise.
14409 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
14410
14411 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
14412 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
14413 lalr1.cc runs afoul of the first, and the last two are no longer
14414 supported by GCC 3.4.0.
14415 * README: Mention GNU m4 1.4 or later; mention m4 patches.
14416 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
14417
14418 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
14419
14420 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
14421 unsigned int, for compatibility with latest gnulib hash module.
14422 * src/state.c (state_hash, state_hasher): Likewise.
14423 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
14424 * src/uniqstr.c (hash_uniqstr): Likewise.
14425
14426 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
14427
14428 * NEWS: Unescaped newlines are no longer allowed in char & strings.
14429
14430 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
14431 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
14432 character and string literals.
14433 (unexpected_end): New function.
14434 (unexpected_eof): Use it.
14435 (unexpected_newline): New function.
14436 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
14437 actions.
14438
14439 * NEWS: Document %expect-rr.
14440
14441 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
14442 Fix typo by replacing $1 with $option.
14443 Remove more 'intl'-related files.
14444 Don't DEFUN AM_INTL_SUBDIR twice.
14445
14446 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
14447 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
14448 strtoul.c.
14449 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
14450 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
14451 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
14452 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
14453 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
14454 * src/.cvsignore: Add *.output.
14455
14456 * src/parse-gram.y: Put copyright notice inside %{ %} so it
14457 gets copied to the output file.
14458
14459 2004-04-28 Paul Eggert <eggert@twinsun.com>
14460
14461 Get files from the gnulib and po repositories, instead of relying
14462 on them being in our CVS. Upgrade to latest versions of gnulib
14463 and Automake.
14464
14465 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
14466 * bootstrap: Bootstrap from gnulib and po repositories.
14467 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
14468 * README-cvs: Document these changes. Remove version numbers from
14469 mentions of build tools, since they change so often. Mention Flex.
14470
14471 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
14472 (gl_USE_SYSTEM_EXTENSIONS): Add.
14473 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
14474 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
14475 does this for us.
14476 (AC_ISC_POSIX): Remove; we no longer support this
14477 ancient OS, as it gets in the way of latest Autoconf & gnulib.
14478 (AC_HEADER_STDC): Remove: we now assume C89 or better.
14479 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
14480 Do not check for C89 headers, except for locale.h which is used
14481 by the Yacc library and must port to K&R hosts.
14482 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
14483 Do not check for C89 functions, except for setlocale which is
14484 used by the Yacc library.
14485 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
14486 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
14487 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
14488 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
14489 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
14490 AM_GNU_GETTEXT): Remove; now done by:
14491 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
14492 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
14493 for us.
14494
14495 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
14496 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
14497 Define to empty, as gnulib.mk will do the rest for us.
14498 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
14499 for us.
14500 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
14501 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
14502
14503 * src/files.c: Include gnulib's xstrndup.h.
14504
14505 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
14506 (REALLOC): Use xnrealloc, for likewise.
14507 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
14508 (strnlen, memrchr): Remove decls; functions no longer used.
14509 Include <stpcpy.h>.
14510
14511 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
14512 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14513 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
14514 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
14515 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
14516 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
14517 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
14518 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
14519 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
14520 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
14521 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
14522 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14523 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
14524 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
14525 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
14526 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
14527 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
14528 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
14529 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
14530 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
14531 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
14532 Remove, as these files are now generated automatically
14533 by bootstrap or automake.
14534
14535 * po/ChangeLog: Remove: all but one entry was a duplicate
14536 of this file, and I moved that 2000-11-02 entry here.
14537
14538 * config/.cvsignore: Add Makefile, depcomp, install-sh.
14539 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
14540 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
14541 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
14542 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
14543 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
14544 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
14545 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
14546 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
14547 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
14548 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
14549 xstrndup.h.
14550 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
14551 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
14552 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
14553 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
14554 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
14555 * src/.cvsignore: Remove *_.c.
14556
14557
14558 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
14559 support it. (The latest stable gzip doesn't.)
14560
14561 2004-04-27 Paul Eggert <eggert@twinsun.com>
14562
14563 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
14564 case, as stos_ is now used by destructors due to the 2004-02-09
14565 change.
14566
14567 Remove more K&R C support.
14568 * lib/libiberty.y (PARAMS): Remove. All uses removed.
14569 * lib/subpipe.c (errno): Remove decl.
14570 Include <stdlib.h> unconditionally.
14571 (EXIT_FAILURE): Remove macro.
14572 * src/complain.c (vfprintf, strerror): Remove.
14573 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
14574 unconditionally.
14575 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
14576 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
14577 (strchr, strspn, memchr): Remove decls.
14578 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
14579 unconditionally. Do not declare perror.
14580 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
14581 unconditionally.
14582
14583 * src/complain.c (_): Remove useless defn, as system.h defines this.
14584
14585 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
14586 with latest obstack.h.
14587 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
14588 to procedure types, as obstack.h now does that for us.
14589 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
14590
14591 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
14592 so that this include file can stand alone.
14593 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
14594 does this now. Include subpipe.h first after config.h, to
14595 test whether it can stand alone.
14596
14597 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
14598 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
14599 unused declaration.
14600
14601 * tests/synclines.at (%union synch line): Put a dummy member in
14602 the union, because empty unions aren't allowed in C. Caught
14603 by GCC 3.4.0.
14604
14605 2004-04-13 Jim Meyering <jim@meyering.net>
14606
14607 * src/conflicts.c (conflicts_print): Correct format string typo:
14608 use `%%' to produce literal `%'. (trivial change)
14609
14610 2004-03-30 Paul Eggert <eggert@twinsun.com>
14611
14612 * src/getargs.c (version): Update copyright year to 2004.
14613
14614 * data/c.m4 (b4_int_type): Use 'short int' rather than
14615 'short', and similarly for 'long', 'unsigned', etc.
14616 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
14617 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
14618 yy_yypstack, yydumpstack): Likewise.
14619 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
14620 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
14621 Likewise.
14622 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
14623 yy_stack_print, yyparse): Likewise.
14624 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
14625 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
14626 * lib/bitset.c (bitset_print): Likewise.
14627 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
14628 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14629 * lib/bitsetv.c (bitsetv_dump): Likewise.
14630 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
14631 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
14632 Likewise.
14633 * src/LR0.c (allocate_itemsets): Likewise.
14634 * src/gram.h (rule_number, rule): Likewise.
14635 * src/lalr.h (goto_number): Likewise.
14636 * src/nullable.c (nullable_compute): Likewise.
14637 * src/output.c (prepare_rules): Likewise.
14638 * src/relation.c (relation_print, relation_digraph): Likewise.
14639 * src/relation.h (relation_node): Likewise.
14640 * src/state.h (state_number, transitions, errs, reductions,
14641 struct state): Likewise.
14642 * src/symtab.h (symbol_number, struct symbol): Likewise.
14643 * src/tables.c (vector_number, tally, action_number,
14644 default_goto, goto_actions): Likewise.
14645 * tests/existing.at (GNU Cim Grammar): Likewise.
14646 * tests/regression.at (Web2c Actions): Likewise.
14647
14648 * src/output.c (muscle_insert_short_int_table): Renamed from
14649 muscle_insert_short_table. All uses changed.
14650
14651 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
14652
14653 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
14654 (declaration): Replace expected_conflicts with expected_sr_conflicts.
14655 Add %expect-rr rule.
14656
14657 * src/scan-gram.l: Recognize %expect-rr.
14658
14659 * src/conflicts.h (expected_sr_conflicts): Rename from
14660 expected_conflicts.
14661 (expected_rr_conflicts): Declare.
14662
14663 * src/conflicts.c (expected_sr_conflicts): Rename from
14664 expected_conflicts.
14665 (expected_rr_conflicts): Define.
14666 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
14667 for GLR parsers.
14668 Use expected_sr_conflicts in place of expected_conflicts.
14669 Warn if expected_rr_conflicts used in non-GLR parser.
14670
14671 * doc/bison.texinfo: Add documentation for %expect-rr.
14672
14673 2004-03-08 Paul Eggert <eggert@gnu.org>
14674
14675 Add support for hex token numbers. Suggested by Odd Arild Olsen in
14676 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
14677
14678 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
14679 in lalr1.cc.
14680 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
14681 * src/scan-gram.l (scan_integer): New function.
14682 ({int}): Use it.
14683 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
14684 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
14685 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
14686 Say "long int", not "long", for uniformity with GNU style.
14687
14688 2004-02-25 Paul Eggert <eggert@twinsun.com>
14689
14690 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
14691 compilers. This fixes a problem with Intel's C++ compiler being
14692 chatty, reported by Guido Trentalancia in
14693 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
14694
14695 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
14696
14697 Support %destructor and merge error locations in lalr1.cc.
14698
14699 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
14700 (Parser::stos_): Define unconditionally.
14701 (Parser::destruct_): New method. Generate its body with
14702 b4_yydestruct_generate.
14703 (Parser::error_start_): New attribute.
14704 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
14705 token which are discarded.
14706 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
14707 error_start_ when erroneous token are discarded.
14708 (Parser::parse) <yyerrlab1>: Compute the location of the error
14709 token so that it covers all the discarded tokens.
14710 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
14711 it can be called with `%skeleton "lalr1.cc"', and do that.
14712
14713 2004-02-02 Paul Eggert <eggert@twinsun.com>
14714
14715 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
14716 $(top_srcdir)/lib and ../lib. This fixes a bug reported
14717 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
14718 There's no need to mention top_builddir since Automake does that
14719 for us.
14720 (INCLUDES): Remove, as Automake says it's obsolescent.
14721 Contents migrated into AM_CPPFLAGS as described above.
14722 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
14723
14724 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
14725
14726 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
14727 (yyreportSyntaxError): Handle case where lookahead token is
14728 YYEMPTY.
14729
14730 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14731
14732 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
14733 resulting parsers are compilable with C++.
14734
14735 2003-12-23 Paul Eggert <eggert@twinsun.com>
14736
14737 * config/depcomp, config/install-sh: Sync with Automake 1.8.
14738 * src/output.c (output_skeleton): Rename local var.
14739 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
14740 Bison tokens, as this runs afoul of the 2003-10-07 change that
14741 disallowed NUL bytes in character constants or string literals.
14742
14743 * tests/local.at: Require Autoconf 2.59's Autotest.
14744 * tests/testsuite.at: Don't include local.at, since we now assume
14745 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
14746 including it.
14747 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
14748 multiple inclusion warnings.
14749
14750 2003-12-02 Akim Demaille <akim@epita.fr>
14751
14752 * doc/bison.texinfo (How Can I Reset the Parser): More about start
14753 conditions.
14754 From Bruno Haible.
14755
14756 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
14757
14758 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
14759
14760 2003-10-07 Paul Eggert <eggert@twinsun.com>
14761
14762 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
14763 if testsuite doesn't exist.
14764
14765 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
14766 literals, unfortunately.
14767 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
14768 Complain about NUL bytes in character constants or string literals.
14769
14770 2003-10-05 Paul Eggert <eggert@twinsun.com>
14771
14772 * NEWS: Don't document %no-default-prec, as it's still
14773 too experimental.
14774 * doc/bison.texinfo: Document %no-default-prec only if
14775 the defaultprec flag is set. Normally it's not.
14776
14777 2003-10-04 Paul Eggert <eggert@twinsun.com>
14778
14779 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
14780 non-modifiable lvalue, instead of a modifiable one.
14781 * doc/bison.texinfo (Actions): Document that $$ can
14782 be assigned to. Do not claim that $$ and $N are
14783 array element references: user code should not rely on this.
14784
14785 2003-10-01 Paul Eggert <eggert@twinsun.com>
14786
14787 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
14788 (grammar_declaration): Use it.
14789 * src/scan-gram.l: New token %no-default-prec.
14790 * tests/conflicts.at: Revamp tests to use %no-default-prec.
14791 * NEWS, doc/bison.texinfo: Document the above.
14792
14793 2003-10-01 Akim Demaille <akim@epita.fr>
14794
14795 VCG no longer supports long_straight_phase.
14796
14797 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
14798 * src/print_graph.c (print_graph): Adjust.
14799
14800 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
14801 and Paul Eggert <eggert@twinsun.com>
14802
14803 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
14804 Table of Symbols): Document %default-prec.
14805 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
14806 (grammar_declaration): Set default_prec on %default-prec.
14807 * src/scan-gram.l (%default-prec): New token.
14808 * src/reader.h (default_prec): New flag.
14809 * src/reader.c: Likewise.
14810 (packgram): Handle it.
14811 * tests/conflicts.at (%default-prec without %prec,
14812 %default-prec with %prec, %default-prec 1): New tests.
14813
14814 2003-09-30 Paul Eggert <eggert@twinsun.com>
14815
14816 * tests/testsuite.at: Include local.at, not input.at, fixing
14817 a typo in the 2003-08-25 patch.
14818
14819 2003-08-27 Akim Demaille <akim@epita.fr>
14820
14821 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
14822 GCC warnings.
14823
14824 2003-08-26 Akim Demaille <akim@epita.fr>
14825
14826 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
14827 "<\#" to avoid magic from Gnus when posting parts of this script.
14828
14829 2003-08-26 Akim Demaille <akim@epita.fr>
14830
14831 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
14832 (Parser::parse): here.
14833 Adjust: nerrs and errstatus is now replaced by...
14834 (Parser::nerrs_, Parser::errstatus_): New.
14835
14836 2003-08-25 Akim Demaille <akim@epita.fr>
14837
14838 * config/announce-gen, Makefile.cfg: New.
14839 * Makefile.am: Adjust.
14840 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
14841 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
14842
14843 2003-08-25 Akim Demaille <akim@epita.fr>
14844
14845 When reducing initial empty rules, Bison parser read an initial
14846 location that is not defined. This results in garbage, and that
14847 affects Bison's own parser. Therefore we need (i) to extend Bison
14848 to support a means to initialize this location, and (ii) to use
14849 this CVS Bison to fix CVS Bison's parser.
14850
14851 * src/reader.h, reader.c (epilogue_augment): Remove, replace
14852 with...
14853 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
14854 * src/parse-gram.y: Adjust.
14855 (%initial-action): New.
14856 (%error-verbose): Since we require CVS Bison, there is no reason
14857 not to use it.
14858 * src/scan-gram.l: Adjust.
14859 * src/Makefile.am (YACC): New, to make sure we use our own parser.
14860 * data/yacc.c (yyparse): Use b4_initial_action.
14861
14862 2003-08-25 Akim Demaille <akim@epita.fr>
14863
14864 * doc/bison.texinfo: Don't promote stdout for error messages.
14865
14866 2003-08-25 Akim Demaille <akim@epita.fr>
14867
14868 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
14869 From Alexandre Duret-Lutz.
14870
14871 2003-08-25 Akim Demaille <akim@epita.fr>
14872
14873 Version 1.875c.
14874
14875 2003-08-25 Akim Demaille <akim@epita.fr>
14876
14877 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
14878 Use them.
14879
14880 2003-08-25 Akim Demaille <akim@epita.fr>
14881
14882 * data/lalr1.cc (Parser::reduce_print_): New.
14883 Use it.
14884
14885 2003-08-25 Akim Demaille <akim@epita.fr>
14886
14887 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
14888 error recovery loops. This patch is based on
14889 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
14890 Also, augment the similarity between lalr1.cc and yacc.c.
14891 Note: the locations of error recovery rules are not correct yet.
14892
14893 * data/lalr1.cc: Comment changes to augment the similarity between
14894 lalr1.cc and yacc.c.
14895 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
14896 (yyerrlab1): Remove, but where it used to be (now the bottom part of
14897 yyerrlab), when hitting EOF, pop the whole stack here instead of
14898 merely falling thru the default error handling mechanism.
14899 (yyerrorlab): New label, with the old contents of YYERROR,
14900 plus the following change: pop the stack of rhs corresponding
14901 to the production that invoked YYERROR. That is how Yacc
14902 behaves (required by POSIX).
14903 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
14904 fail.
14905
14906 2003-08-25 Akim Demaille <akim@epita.fr>
14907
14908 Tune local.at so that people can "autom4te -l autotest calc.at -o
14909 calc" for instance, to extract a sub test suite.
14910
14911 * tests/testsuite.at: Move the initialization, Autotest version
14912 requirement, and AT_TESTED invocation into...
14913 * tests/local.at: here.
14914 * tests/testsuite.at: Include it for compatibility with Autoconf
14915 2.57.
14916 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
14917 be ignore.
14918
14919 2003-08-04 Paul Eggert <eggert@twinsun.com>
14920
14921 Rework code slightly to avoid gcc -Wtraditional warnings.
14922 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
14923 The returned value is now stored in *YY0. All callers changed.
14924 * src/output.c (merge_output): Adjust to the above change.
14925
14926 2003-07-26 Paul Eggert <eggert@twinsun.com>
14927
14928 * data/glr.c (YYASSERT): New macro.
14929 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
14930 yyresolveStates, yyprocessOneStack):
14931 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
14932 Derived from a suggestion by Frank Heckenbach.
14933
14934 2003-07-25 Paul Eggert <eggert@twinsun.com>
14935
14936 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
14937 for portability to K&R C (after ansi2knr, presumably). See
14938 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
14939 by Frank Heckenbach, though I have omitted the structure-initialization
14940 part of his glr-knr.diff patch since I recall that the Portable
14941 C Compiler didn't require that change.
14942
14943 Let the user specify how to allocate and free memory.
14944 Derived from a suggestion by Frank Heckenbach in
14945 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
14946 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
14947 All uses of free, malloc, realloc changed to use these macros,
14948 and unnecessary casts removed.
14949 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
14950
14951 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
14952
14953 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
14954 use s.empty() rather than s == "" to test for empty string; see
14955 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
14956 (trivial change)
14957
14958 2003-06-25 Akim Demaille <akim@epita.fr>
14959
14960 * config/depcomp, config/install-sh: Update from masters.
14961
14962 2003-06-20 Paul Eggert <eggert@twinsun.com>
14963
14964 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
14965 and return properly parenthesized result.
14966 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
14967 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
14968 Remove unnecessary parentheses from uses.
14969 * doc/bison.texinfo (Location Default Action): Describe the
14970 conventions for parentheses.
14971
14972 2003-06-19 Paul Eggert <eggert@twinsun.com>
14973
14974 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14975 yyreportTree): Do not assume that size_t is the same width as int,
14976 when printing sizes. Print sizes using an unsigned format.
14977 Problem reported by Frank Heckenbach in
14978 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
14979
14980 Port to Forte Developer 7 C compiler.
14981 * data/glr.c (struct YYLTYPE): If locations are not being used,
14982 declare a single dummy member, as empty structs do not conform
14983 to the C standard.
14984 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
14985 the Forte Developer 7 C compiler complains that end-of-loop
14986 code is not reached.
14987
14988 2003-06-17 Paul Eggert <eggert@twinsun.com>
14989
14990 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
14991 avoid warnings from picky compilers about redefinition of PARAMS.
14992
14993 2003-06-17 Paul Eggert <eggert@twinsun.com>
14994
14995 Version 1.875b.
14996
14997 * NEWS: Document 1.875b.
14998
14999 * lib/bbitset.h: Do not include config.h; that's the includer's job.
15000 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
15001 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
15002 Don't use 'index' in comments, as it's a builtin fn on some hosts.
15003 * lib/bitset_stats.c: Include gettext.h unconditionally, as
15004 per recent gettext manual's suggestion.
15005 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
15006 Use prototypes, not old-style definitions.
15007 * lib/lbitset.c (lbitset_unused_clear): Likewise.
15008 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
15009 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
15010 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
15011 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
15012 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
15013 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
15014 vbitset_or_and_cmp, vbitset_copy): Likewise.
15015
15016 * lib/libiberty.h: Do not include config.h; that's the includer's job.
15017 Do not include <stdlib.h>.
15018 (PARAMS): Define unconditionally for C89.
15019 (ATTRIBUTE_NORETURN): Remove.
15020 (ATTRIBUTE_UNUSED): Define unconditionally.
15021
15022 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
15023 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
15024 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
15025 * lib/vbitset.c, lib/vbitset.h: New files.
15026 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15027 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
15028 from libbitset.
15029
15030 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
15031 `How Can I Reset @code{yyparse}', since texinfo does not allow
15032 arbitrary @ in node names.
15033
15034 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
15035 shouldn't be needed according to the gettext 0.12.1 documentation
15036 but which seem to be needed anyway: codeset.m4 glibc21.m4
15037 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
15038 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
15039 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
15040
15041 * lib/.cvsignore: Add stdbool.h.
15042 * m4/.cvsignore: Add nls.m4, po.m4.
15043
15044 Upgrade to CVS gnulib.
15045 * stdbool_.h: File renamed from stdbool.h.in.
15046 * configure.ac (AM_STDBOOL_H): Invoke this instead of
15047 AC_HEADER_STDBOOL.
15048 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
15049 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
15050 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
15051 (MOSTLYCLEANFILES): New var.
15052 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
15053 (stdbool.h): New rule.
15054 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
15055 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
15056 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
15057 m4/quote.m4: Upgrade to today's gnulib.
15058
15059 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
15060 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
15061 the tests right now.
15062 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
15063 yyerror are declared before use; C99 requires this.
15064
15065 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15066
15067 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
15068 first.
15069 (yyrecoverSyntaxError): Correct the logic for setting and testing
15070 yyerrState.
15071 Correct comment on handling EOF.
15072 Allow states with only a default reduction, rather than failing
15073 (I can't quite reconstruct why these were not allowed before).
15074
15075 Fixes to avoid problem that $-N rules in GLR parsers can cause
15076 buffer overruns, corrupting state.
15077
15078 * src/output.c (prepare_rules): Output max_left_semantic_context
15079 definition.
15080 * src/reader.h (max_left_semantic_context): New variable declaration.
15081 * src/scan-gram.l (max_left_semantic_context): Define.
15082 (handle_action_dollar): Update max_left_semantic_context.
15083 * data/glr.c (YYMAXLEFT): New definition.
15084 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
15085 (yyresolveAction): Ditto.
15086
15087 Fixes to problems with location handling in GLR parsers reported by
15088 Frank Heckenbach (2003/06/05).
15089
15090 * data/glr.c (YYLTYPE): Make trivial if locations not used.
15091 (YYRHSLOC): Add parentheses, and define only if locations used.
15092 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
15093 locations not used.
15094 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
15095 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
15096
15097 * tests/cxx-type.at: Exercise location information; update tests
15098 to differentiate output with and without locations.
15099 Remove forward declarations of yylex and yyerror---caused errors
15100 because default YYLTYPE not yet defined.
15101 Change semantic actions to compute strings, rather than printing
15102 them directly (to test proper passing of semantics values). Change
15103 output to prefix notation and update test data and expected results.
15104 (yylex): Track locations.
15105 (stmtMerge): Return value rather than printing, and include arguments
15106 in value.
15107
15108 2003-06-03 Paul Eggert <eggert@twinsun.com>
15109
15110 Avoid warnings generated by GCC 2.95.4 when Bison is
15111 configured with --enable-gcc-warnings.
15112 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
15113 yy::]b4_parser_class_name[::translate_,
15114 yy::Stack::operator[] (unsigned),
15115 yy::Stack::operator[] (unsigned) const,
15116 yy::Slice::operator[] (unsigned),
15117 yy::Slice::operator[] (unsigned) const):
15118 Rename local vars to avoid warnings.
15119 * tests/glr-regression.at (Improper handling of embedded actions
15120 and $-N in GLR parsers): Remove unused local variable from yylex.
15121 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
15122 (void) as arg when not pure, since we now assume C89 when building
15123 Bison. Pacify GCC by using parameter.
15124
15125 2003-06-02 Paul Eggert <eggert@twinsun.com>
15126
15127 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
15128 yy::Location::lines, yy::Location::columns): Rename arguments
15129 to avoid shadowing; this removes a warning generated by GCC 3.3.
15130
15131 2003-06-01 Paul Eggert <eggert@twinsun.com>
15132
15133 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
15134 to g++, as GCC 3.3 complains if you do it.
15135 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
15136 everything that WARNING_CFLAGS has, except omit warnings
15137 not suitable for C++.
15138 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
15139 * tests/atlocal.in (CXXFLAGS): New var.
15140 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
15141
15142 Fix a GLR parser bug I reported in February; see
15143 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
15144 The problem was that GLR parsers did not conform to the C standard,
15145 because actions like { $1 = $2 + $3; } expanded to expressions
15146 that invoked YYFILL in separate subexpressions, and YYFILL assigned
15147 to a local variable. The C standard says that expressions
15148 like (var = f ()) + (var = f ()) have undefined behavior.
15149 Another problem was that GCC sometimes issues warnings that
15150 yyfill and its parameters are unused.
15151
15152 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
15153 as possibly unused.
15154 (yyfill): New function.
15155 (YYFILL): Use it.
15156 (yyuserAction): Change type of yynormal to bool, so that it matches
15157 the new yyfill signature. Mark it as possibly unused.
15158
15159
15160 Follow up on a bug I reported in February, where a Bison-generated
15161 parser can loop. Provide a test case and a fix for yacc.c. I
15162 don't have a fix for lalr1.cc or for glr.c, unfortunately.
15163 The original bug report is in:
15164 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
15165
15166 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
15167 macro's size was becoming unwieldy.
15168 (yyerrlab): Do not discard an empty lookahead symbol, as this
15169 might destroy garbage.
15170 (yyerrorlab): New label, with the old contents of YYERROR,
15171 plus the following change: pop the stack of rhs corresponding
15172 to the production that invoked YYERROR. That is how Yacc
15173 behaves, and POSIX requires this behavior.
15174 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
15175 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
15176 Define 'alarm' to do nothing if unistd.h is not available.
15177 Add a new rule "exp: '-' error;" to test the above change to
15178 data/yacc.c. Use 'alarm' to abort any test taking longer than
15179 10 seconds, as it's probably looping.
15180 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
15181 Also, the new yacc.c generates two fewer diagnostics for an
15182 existing test.
15183
15184 2003-05-24 Paul Eggert <eggert@twinsun.com>
15185
15186 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
15187 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
15188 This fixes a problem reported by John Bowman when the Compaq/HP
15189 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
15190 -ansi -Wall -gall).
15191 * data/yacc.c (union yyalloc): Likewise.
15192 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
15193
15194 Switch from 'int' to 'bool' where that makes sense.
15195
15196 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
15197 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
15198 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
15199 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
15200 Return or accept bool, not int. All callers changed.
15201 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
15202 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
15203 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
15204 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
15205 bitset_or_and_cmp_): Likewise.
15206 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
15207 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
15208 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
15209 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
15210 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
15211 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
15212 bitset_stats_or_and_cmp): Likewise.
15213 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
15214 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
15215 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
15216 ebitset_xor_cmp): Likewise.
15217 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
15218 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
15219 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
15220 lbitset_xor_cmp): Likewise.
15221 * lib/bbitset.h: Include <stdbool.h>.
15222 (struct bitset_vtable): The following members now return bool, not
15223 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
15224 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
15225 or_and_cmp).
15226 * src/conflicts.c (count_rr_conflicts): Likewise.
15227 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
15228 All uses changed.
15229 * lib/ebitset.c (ebitset_obstack_init): Likewise.
15230 * lib/lbitset.c (lbitset_obstack_init): Likewise.
15231 * src/getargs.c (debug_flag, defines_flag, locations_flag,
15232 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15233 graph_flag): Likewise.
15234 * src/getargs.h (debug_flag, defines_flag, locations_flag,
15235 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
15236 graph_flag): Likewise.
15237 * src/output.c (error_verbose): Likewise.
15238 * src/output.h (error_verbose): Likewise.
15239 * src/reader.c (start_flag, typed): Likewise.
15240 * src/reader.h (typed): Likewise.
15241 * src/getargs.c (LOCATIONS_OPTION): New constant.
15242 (long_options, getargs): Use it.
15243 * src/lalr.c (build_relations): Use bool, not int.
15244 * src/nullable.c (nullable_compute): Likewise.
15245 * src/print.c (print_reductions): Likewise.
15246 * src/tables.c (action_row, pack_vector): Likewise.
15247 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
15248 * src/output.c (prepare): Use it.
15249 * src/output.c (token_definitions_output,
15250 symbol_destructors_output, symbol_destructors_output): Use string,
15251 not boolean integer, to keep track of whether to output separator.
15252 * src/print_graph.c (print_core): Likewise.
15253 * src/state.c (state_rule_lookaheads_print): Likewise.
15254
15255 * config/install-sh: Sync from automake 1.7.5.
15256
15257 2003-05-14 Paul Eggert <eggert@twinsun.com>
15258
15259 * src/parse-gram.y (rules_or_grammar_declaration): Require a
15260 semicolon after a grammar declaration, in the interest of possible
15261 future changes to the Bison input language.
15262 Do not allow a stray semicolon at the start of the grammar.
15263 (rhses.1): Allow one or more semicolons after any rule, including
15264 just before "|" as required by POSIX.
15265 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
15266 grammar.
15267
15268 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
15269
15270 %parse-param support for lalr1.cc.
15271
15272 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
15273 b4_cc_constructor_calls, b4_cc_constructor_call,
15274 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
15275 definitions.
15276 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
15277 parse-param arguments.
15278 (yy::b4_parser_class_name): Declare instance variables to
15279 hold parse-param arguments.
15280 * tests/calc.at: s/value/semantic_value/ because value clashes
15281 with a member of yy::b4_parser_class_name. Adjust C++ code
15282 to handle %parse-param. Enable %parse-param test in C++.
15283
15284 2003-05-12 Paul Eggert <eggert@twinsun.com>
15285
15286 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
15287 English a bit. Fix fclose typo. Change "const char" to "char
15288 const", and use ANSI C rather than K&R for "main". Suggest
15289 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
15290 and suggest yy_switch_to_buffer.
15291
15292 2003-05-05 Paul Eggert <eggert@twinsun.com>
15293
15294 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
15295 C89. This avoids a diagnostic on compilers that define __STDC__
15296 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
15297 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
15298
15299 2003-05-03 Paul Eggert <eggert@twinsun.com>
15300
15301 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
15302 Do not overrun array bounds.
15303 This should fix a bug reported today by Olatunji Oluwabukunmi in
15304 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
15305
15306 2003-04-29 Akim Demaille <akim@epita.fr>
15307
15308 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
15309 * src/getargs.c, src/getargs.h: here, as bool, not int.
15310 (nondeterministic_parser): New.
15311 * src/parse-gram.y, src/scan-gram.l: Support
15312 %nondeterministic-parser.
15313 * src/output.c (prepare): Use nondeterministic_parser instead
15314 of glr_parser where appropriate.
15315 * src/tables.c (conflict_row, action_row, save_row)
15316 (token_actions, token_actions, pack_vector): Ditto.
15317
15318 2003-04-29 Akim Demaille <akim@epita.fr>
15319
15320 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
15321
15322 2003-04-29 Akim Demaille <akim@epita.fr>
15323
15324 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
15325 with %pure-parser and %locations to exercise the patch from Yakov
15326 Markovitch below.
15327
15328 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
15329
15330 * data/yacc.c: (b4_lex_param): Corrected for the case where
15331 %lex-param is provided and %pure-parser isn't.
15332
15333 2003-04-27 Paul Eggert <eggert@twinsun.com>
15334
15335 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
15336 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
15337 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
15338 if it is not defined.
15339 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
15340
15341 2003-04-26 Paul Eggert <eggert@twinsun.com>
15342
15343 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
15344 Declare to be of type suitable for the ninf value itself, not of
15345 type suitable for the corresponding table, since the latter might
15346 be unsigned but the ninf value might be negative. This fixes a
15347 bug reported by Alexandre Duret-Lutz in
15348 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
15349
15350 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
15351 invokes it. We shouldn't invoke it twice because it will attempt
15352 to put error.o in the archive twice. This fixes a glitch reported
15353 by Martin Mokrejs in
15354 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
15355
15356 2003-04-21 Paul Eggert <eggert@twinsun.com>
15357
15358 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
15359 to gnulib.
15360
15361 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
15362
15363 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
15364 Fix obvious typo that results in uncompilable GLR parsers
15365 when both %pure-parser and %locations are used. (trivial change)
15366
15367 2003-04-17 Paul Eggert <eggert@twinsun.com>
15368
15369 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
15370 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
15371 Do not insert the expected token via unput, as this runs afoul
15372 of a POSIX-compatibility bug in flex 2.5.31.
15373 All uses changed to BEGIN the parent state,
15374 since we no longer insert the expected token via unput.
15375 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
15376 that is no longer emitted after the above change.
15377
15378 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
15379 the first one. This change is from Paul Hilfinger, and it fixes
15380 regression reported by Werner Lemberg in
15381 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
15382
15383 (resolve_sr_conflict): Don't invoke state_errs_set
15384 unless one or more tokens have been explicitly made errors.
15385 Otherwise, the above change causes Bison to abort.
15386
15387 * tests/existing.at (GNU pic Grammar): New test case, taken from
15388 Lemberg's email.
15389
15390 2003-03-31 Akim Demaille <akim@epita.fr>
15391
15392 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
15393
15394 2003-03-31 Akim Demaille <akim@epita.fr>
15395
15396 * src/output.c (prepare_symbols): Avoid trailing spaces in the
15397 output.
15398
15399 2003-03-31 Akim Demaille <akim@epita.fr>
15400
15401 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
15402 From Paul Hilfinger.
15403
15404 2003-03-29 Akim Demaille <akim@epita.fr>
15405
15406 * m4/error.m4: Do not put under dynamic conditions some code which
15407 expansion is under static control.
15408
15409 2003-03-29 Akim Demaille <akim@epita.fr>
15410
15411 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
15412
15413 2003-03-29 Akim Demaille <akim@epita.fr>
15414
15415 * doc/bison.texinfo (Strings are Destroyed): New.
15416
15417 2003-03-13 Paul Eggert <eggert@twinsun.com>
15418
15419 * .cvsignore: Add configure.lineno.
15420 * src/.cvsignore: Add yacc.
15421 * tests/.cvsignore: Add testsuite.log.
15422 * doc/fdl.texi: Sync with latest FSF version.
15423
15424 2003-03-12 Paul Eggert <eggert@twinsun.com>
15425
15426 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
15427 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
15428 cursor, instead of leaving it undefined. This fixes a bug
15429 reported by Tim Van Holder in
15430 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
15431 * tests/input.at (Torturing the Scanner): Test the scanner on
15432 an empty input file, which was Tim Van Holder's test case.
15433
15434 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
15435 <sys/resource.h> can be included, include sys/time.h and
15436 sys/times.h first, if available. This works around the SunOS
15437 4.1.4 porting bug reported by Bruce Becker in
15438 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
15439
15440 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
15441 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
15442 AC_HEADER_SYS_WAIT.
15443
15444 Merge changes from gnulib. This was prompted because the CVS
15445 snapshot didn't build on Solaris 7 due to strnlen problems.
15446
15447 These changes need to be merged back into gnulib:
15448 * lib/hash.c: Include <stdbool.h> unconditionally.
15449 * m4/onceonly.m4 (m4_quote): New macro.
15450 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
15451 Quote AC_FOREACH variable-expansions properly.
15452 The 2003-01-03 obstack.h change also needs merging.
15453 {end of changes requiring merging}
15454
15455 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
15456 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
15457 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
15458 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
15459 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
15460 New files, imported from gnulib.
15461 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
15462 above.
15463
15464 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
15465 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
15466 gnulib sources.
15467
15468 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
15469 Add.
15470 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
15471 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
15472 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
15473 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
15474 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
15475 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
15476 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
15477 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
15478 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
15479 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
15480 (jm_PREREQ_ARGMATCH): Remove.
15481 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
15482 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
15483
15484 * src/system.h: Include <stdbool.h> unconditionally.
15485
15486 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
15487 assuming at least C89 in the bitset code for some time now.
15488
15489 2003-03-03 Akim Demaille <akim@epita.fr>
15490
15491 * ro.po: New.
15492
15493 2003-03-02 Akim Demaille <akim@epita.fr>
15494
15495 * doc/bison.texinfo (Table of Symbols): Reactivate the
15496 documentation for %lex-param, and %parse-param.
15497
15498 2003-03-02 Akim Demaille <akim@epita.fr>
15499
15500 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
15501 generate verbose error messages.
15502 Use the number of tokens as an upper bound in yytname, as it
15503 cannot be a non terminal.
15504
15505 2003-03-02 Akim Demaille <akim@epita.fr>
15506
15507 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
15508 message.
15509
15510 2003-03-02 Akim Demaille <akim@epita.fr>
15511
15512 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
15513 Use them to exercise yycheck overrun.
15514 Based on Andrew Suffield's grammar.
15515
15516 2003-03-02 Akim Demaille <akim@epita.fr>
15517
15518 Create tests/local.at for Bison generic testing macros.
15519
15520 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
15521 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
15522 This new file.
15523 * tests/calc.at (AT_CHECK_CALC): Adjust.
15524 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
15525 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
15526 * tests/local.at: here.
15527 (AT_COMPILE_CXX): Tags the tests using it as c++.
15528 Ignore the test if CXX is not functional.
15529
15530 2003-03-01 Paul Eggert <eggert@twinsun.com>
15531
15532 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
15533 not loc->end, since loc->end might contain garbage and this leads
15534 to undefined behavior on some platforms.
15535 (id_loc, token_start): Use (IF_LINTed) initial values that do not
15536 depend on *loc, so that the reader doesn't give the the false
15537 impression that *loc is initialized.
15538 (<INITIAL>"%%"): Do not bother setting code_start, since its value
15539 does not survive the return.
15540
15541 2003-03-01 Akim Demaille <akim@epita.fr>
15542
15543 * src/scan-gram.l (code_start): Always initialize it when entering
15544 into yylex, as SC_EPILOGUE is activated *before* the corresponding
15545 yylex invocation. An alternative would be making it static, but
15546 then it starts with the second %%'s beginning, instead of its end.
15547
15548 2003-02-28 Paul Eggert <eggert@twinsun.com>
15549
15550 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
15551 around a UnixWare 7.1.1 porting bug reported by John Hughes in
15552 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
15553
15554 2003-02-26 Paul Eggert <eggert@twinsun.com>
15555
15556 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
15557 Remove Sequent/Pyramid discussion (nobody uses them any more).
15558 Merge VMS and MS-DOS discussion; these ports may well be dead
15559 but let's keep mentioning them for now. Put <> around email
15560 addresses. Add copyright notice.
15561
15562 2003-02-24 Paul Eggert <eggert@twinsun.com>
15563
15564 * data/glr.c (yy_reduce_print): yylineno -> yylno,
15565 to avoid collision with flex use of yylineno.
15566 Problem reported by Bruce Lilly in
15567 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
15568 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
15569 * data/yacc.c (yy_reduce_print): Likewise.
15570
15571 * config/depcomp: Sync with Automake 1.7.3.
15572
15573 2003-02-21 Akim Demaille <akim@epita.fr>
15574
15575 * data/lalr1.cc: Use temporary variables instead of casts to
15576 change integer types.
15577 Suggested by Paul Eggert.
15578
15579 2003-02-21 Akim Demaille <akim@epita.fr>
15580
15581 * doc/bison.texinfo: Use "location" consistently to refer to @n,
15582 to avoid confusions with lalr1.cc's notion of Position.
15583 Suggested by Paul Eggert.
15584
15585 2003-02-20 Akim Demaille <akim@epita.fr>
15586
15587 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
15588 before initial_columns.
15589 (location.hh): Use consistent variable names when defining the
15590 operator<<.
15591 Use "last" so that we subtract from Positions, not from unsigned.
15592
15593 2003-02-20 Akim Demaille <akim@epita.fr>
15594
15595 * data/lalr1.cc (position.hh): New subfile, including the extended
15596 and Doxygen'ed documentation of class Position.
15597 (location.hh): Use it.
15598 Document a` la Doxygen.
15599 With the help of Benoit Perrot.
15600
15601 2003-02-20 Akim Demaille <akim@epita.fr>
15602
15603 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
15604 AT_YACC_IF.
15605 Redefine AT_YYERROR_SEES_LOC_IF using it.
15606 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15607 not defined.
15608 Don't use the location in yy::Parser::error_ and
15609 yy::Parser::print_ when not %locations.
15610 Activate more lalr1.cc tests.
15611
15612 2003-02-19 Akim Demaille <akim@epita.fr>
15613
15614 * data/lalr1.cc: When displaying a line number, be sure to make it
15615 an int.
15616
15617 2003-02-19 Akim Demaille <akim@epita.fr>
15618
15619 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
15620 Remove, useless.
15621 (YYABORT, YYACCEPT, YYERROR): New.
15622 * tests/calc.at: Renable the lalr1.cc test.
15623
15624 2003-02-19 Akim Demaille <akim@epita.fr>
15625
15626 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
15627 error recovery, mixing with/without pops and discarding of the
15628 lookahead.
15629 Exercise YYERROR.
15630 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
15631
15632 2003-02-17 Paul Eggert <eggert@twinsun.com>
15633
15634 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
15635 * tests/testsuite.at (AT_COMPILE): Use them.
15636 This fixes the testsuite problem reported by Robert Lentz in
15637 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
15638
15639 2003-02-12 Paul Eggert <eggert@twinsun.com>
15640
15641 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
15642 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
15643 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
15644 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
15645 Check for malloc failure, for consistency with yacc.c.
15646 (yytname_size): Remove, for consistency with yacc.c.
15647
15648 The bug still remains in data/lalr1.cc, as I didn't have time
15649 to fix it there.
15650
15651 2003-02-06 Akim Demaille <akim@epita.fr>
15652
15653 * configure.ac (GXX): Rename as...
15654 (CXX): this, to keep the original Autoconf semantics.
15655 Require 2.57.
15656 * data/lalr1.cc: Fix b4_copyright invocations.
15657 If YYDEBUG is not defined, don't depend upon name_ being defined.
15658 (location.hh): Include string and iostream.
15659 (Position::filename): New member.
15660 (Position::Position ()): New.
15661 (operator<< (Position)): New.
15662 (operator- (Position, int)): New.
15663 (Location::first, Location::last): Rename as...
15664 (Location::begin, Location::end): these, to mock the conventional
15665 iterator names.
15666 (operator<< (Location)): New.
15667 * tests/atlocal.in (CXX): New.
15668 * tests/testsuite.at (AT_COMPILE_CXX): New.
15669 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
15670 locations in a more synthetic way.
15671 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
15672 lalr1.cc is used.
15673 Adjust the C locations to match those from Emacs: first column is
15674 column 0.
15675 Change all the expected results.
15676 Conform to the GCS: simplify the locations when applicable.
15677 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
15678 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
15679 these CPP macros with the m4 macros new defined by...
15680 (AT_CHECK_PUSHDEFS): this, i.e.:
15681 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
15682 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
15683 New macros.
15684 (AT_CHECK_POPDEFS): Undefine them.
15685 (AT_CHECK_CALC_LALR1_CC): New.
15686 Use it for the first lalr1.cc test.
15687
15688 2003-02-04 Akim Demaille <akim@epita.fr>
15689
15690 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
15691 Location as is defined.
15692
15693 2003-02-04 Akim Demaille <akim@epita.fr>
15694
15695 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
15696 name_ being defined.
15697
15698 2003-02-03 Paul Eggert <eggert@twinsun.com>
15699
15700 * src/gram.h (start_symbol): Remove unused decl.
15701
15702 Use more-consistent naming conventions for local vars.
15703
15704 * src/derives.c (derives_compute): Change type of local var from
15705 int to rule_number.
15706 * src/gram.c (grammar_rules_partial_print): Likewise.
15707 * src/print.c (print_core): Likewise.
15708 * src/reduce.c (reduce_grammar_tables): Likewise.
15709
15710 * src/gram.c (grammar_dump): Change name of item_number *
15711 local var from r to rp.
15712 * src/nullable.c (nullable_compute): Likewise.
15713
15714 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
15715
15716 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
15717 for symbol or symbol_number var.
15718 * src/reader.c (grammar_start_symbol_set): Likewise.
15719 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
15720 Likewise.
15721 * src/state.c (transitions_to): Likewise.
15722 * src/state.h: Likewise.
15723 * src/tables.c (symbol_number_to_vector_number): Likewise.
15724
15725 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
15726 char * var.
15727
15728 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
15729 var.
15730
15731 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
15732 var.
15733
15734 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
15735 Use str, not s, for char * var. Use ch, not c, for character var.
15736 Use size for size var.
15737
15738 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
15739 char * var.
15740 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
15741 uniqstr var.
15742 * src/uniqstr.h: Likewise.
15743
15744 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15745 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15746 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
15747 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
15748 param to have same name as that of enum, so that we don't use
15749 "s" to stand for a non-state.
15750
15751 2003-02-02 Akim Demaille <akim@epita.fr>
15752
15753 * src/scan-skel.l: Scan more than one inert character per yylex
15754 invocation.
15755
15756 2003-02-01 Paul Eggert <eggert@twinsun.com>
15757
15758 Version 1.875a.
15759
15760 * po/LINGUAS: Add ms.
15761
15762 2003-01-30 Akim Demaille <akim@epita.fr>
15763
15764 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
15765
15766 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15767
15768 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
15769 of $1.
15770
15771 Changes in response to error report by S. Eken: GLR mode does not
15772 handle negative $ indices or $ indices in embedded rules correctly.
15773 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
15774
15775 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
15776 (b4_rhs_location): Ditto.
15777 (yyfill): New function to copy from stack tree into array
15778 incrementally.
15779 (yyuserAction): Modify to allow incremental move of semantic values
15780 to rhs array when in GLR mode.
15781 Define YYFILL to use in user-defined actions to fill semantic array
15782 as needed.
15783 Remove dummy use of yystack, as there is now a guaranteed use.
15784 (yydoAction): Modify to allow incremental move of semantic values
15785 to rhs array when in GLR mode.
15786 (yyresolveAction): Ditto.
15787 (yyglrShiftDefer): Update comment.
15788 (yyresolveStates): Use X == NULL for pointers, not !X.
15789 (yyglrReduce): Ditto.
15790 (yydoAction): Ditto
15791
15792 * tests/glr-regr1.at: Rename to ...
15793 * tests/glr-regression.at: Add new regression test for the problems
15794 described above (adapted from S. Eken).
15795 Update copyright notice.
15796 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
15797 * tests/Makefile.am: Ditto.
15798
15799 2003-01-28 Paul Eggert <eggert@twinsun.com>
15800
15801 * data/lalr1.cc: Do not use @output_header_name@ unless
15802 b4_defines_flag is set. This fixes two bugs reported by
15803 Tim Van Holder in
15804 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
15805 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
15806
15807 2003-01-21 Paul Eggert <eggert@twinsun.com>
15808
15809 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
15810 we don't need to worry about yyerrlab1 being reported as an
15811 "unused label" by non-GCC C compilers. The downside is that if
15812 locations are used then a couple of statements are duplicated each
15813 time YYERROR is invoked, but the upside is that the warnings
15814 should vanish.
15815 (yyerrlab1): Move code to YERROR.
15816 (yyerrlab2): Remove. Change uses back to yyerrlab1.
15817 This reverts some of the 2002-12-27 change.
15818
15819 2003-01-17 Paul Eggert <eggert@twinsun.com>
15820
15821 * src/output.c (symbol_printers_output): Fix typo that led
15822 to core dump. Problem reported by Antonio Rus in
15823 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
15824
15825 2003-01-13 Akim Demaille <akim@epita.fr>,
15826 Quoc Peyrot <chojin@lrde.epita.fr>,
15827 Robert Anisko <anisko_r@lrde.epita.fr>
15828
15829 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
15830 when the stacks contain one element, as the loop would otherwise
15831 free the last state, and then use the top state (the one we just
15832 popped). This means that the initial elements will not be freed
15833 explicitly, as is the case in yacc.c; it is not a problem, as
15834 these elements have fake values.
15835
15836 2003-01-11 Paul Eggert <eggert@twinsun.com>
15837
15838 * NEWS: %expect-violations are now just warnings, reverting
15839 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
15840 bootstrapping problem reported by Matthias Klose; see
15841 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
15842 * src/conflicts.c (conflicts_print): Likewise.
15843 * tests/conflicts.at (%expect not enough, %expect too much,
15844 %expect with reduce conflicts): Likewise.
15845 * doc/bison.texinfo (Expect Decl): Document this. Also mention
15846 that the warning is enabled if the number of conflicts changes
15847 (not necessarily increases).
15848
15849 * src/getargs.c (version): Update copyright year.
15850
15851 2003-01-09 Akim Demaille <akim@epita.fr>
15852
15853 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
15854
15855 2003-01-08 Paul Eggert <eggert@twinsun.com>
15856
15857 * Makefile.maint (WGETFLAGS):
15858 New macro, containing "-C off" to disable proxy caches.
15859 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
15860 (rel-check): Use $(WGET) instead of wget.
15861
15862 2003-01-06 Paul Eggert <eggert@twinsun.com>
15863
15864 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
15865 the GLR paper of Scott, Johnstone and Hussain.
15866
15867 2003-01-04 Paul Eggert <eggert@twinsun.com>
15868
15869 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
15870 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
15871 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
15872 (EXTRA_LIBRARIES): New var, for liby.a.
15873 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
15874 (EXTRA_SCRIPTS): New var, for yacc.
15875
15876 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
15877 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
15878 Problem reported by Nelson H. F. Beebe.
15879
15880 2003-01-03 Paul Eggert <eggert@twinsun.com>
15881
15882 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
15883 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
15884 when compiling Bison 1.875's `bitset bset = obstack_alloc
15885 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
15886
15887 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
15888 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
15889 grow to a huge size with typical invocation.
15890
15891 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
15892 Use the pattern recommended by Autoconf 2.57, except also protect
15893 against double-definition.
15894 * src/system.h: Likewise.
15895 Portability issues reported by Nelson H. F. Beebe.
15896
15897 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
15898 All uses changed. Provide a definition in both C and C++.
15899 (yytrue, yyfalse): Define even if defined (__cplusplus).
15900
15901 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
15902 Reported by Nelson H. F. Beebe.
15903
15904 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
15905
15906 2003-01-02 Paul Eggert <eggert@twinsun.com>
15907
15908 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
15909 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
15910 Bug reported by Nelson H. F. Beebe.
15911
15912 2003-01-01 Paul Eggert <eggert@twinsun.com>
15913
15914 * Version 1.875.
15915
15916 2002-12-30 Paul Eggert <eggert@twinsun.com>
15917
15918 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
15919 Moved here from...
15920 (<INITIAL>","): Here. This causes stray "," to be treated
15921 more uniformly.
15922
15923 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
15924 last brace in braced code when not in Yacc mode, for compatibility
15925 with Bison 1.35. This resurrects the 2001-12-15 patch to
15926 src/reader.c.
15927
15928 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
15929 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
15930
15931 2002-12-28 Paul Eggert <eggert@twinsun.com>
15932
15933 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
15934 that of SYM's type. This fixes Debian bug 168069, reported by
15935 Thomas Olsson.
15936
15937 2002-12-28 Paul Eggert <eggert@twinsun.com>
15938
15939 Version 1.75f.
15940
15941 Switch back to the Yacc style of conflict reports, undoing some
15942 of the 2002-07-30 change.
15943 * doc/bison.texinfo (Understanding): Use Yacc style for
15944 conflict reports. Also, use new way of locating rules.
15945 * src/conflicts.c (conflict_report):
15946 Renamed from conflict_report_yacc, removing the old
15947 'conflict_report'. Translate the entire conflict report at once,
15948 so that we don't assume that "," has the same interpretation in
15949 all languages.
15950 (conflicts_output): Use Yacc-style conflict report for each state,
15951 instead of our more-complicated style.
15952 (conflicts_print): Use Yacc-style conflict report, except print
15953 the input file name when not emulating Yacc.
15954 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
15955 Conflicted Reduction, %expect not enough, %expect too much,
15956 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
15957 * tests/existing.at (GNU Cim Grammar): Likewise.
15958 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
15959
15960 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
15961 fatal): Don't invoke fflush; it's not needed and it might even be
15962 harmful for stdout, as stdout might not be open.
15963 * src/reduce.c (reduce_print): Likewise.
15964
15965 2002-12-27 Paul Eggert <eggert@twinsun.com>
15966
15967 Fix a bug where error locations were not being recorded correctly.
15968 This problem was originally reported by Paul Hilfinger in
15969 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
15970
15971 * data/yacc.c (yyparse): New local var yylerrsp, to record the
15972 top of the location stack's error locations.
15973 (yyerrlab): Set it. When discarding a token, push its location
15974 onto yylerrsp so that we don't lose track of the error's end.
15975 (yyerrlab1): Now is only the target of YYERROR, so that we can
15976 properly record the location of the action that failed. For GCC
15977 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
15978 GCC warning about yyerrlab1 being unused if YYERROR is unused.
15979 (yyerrlab2): New label, which yyerrlab now falls through to.
15980 Compute the error's location by applying YYLLOC_DEFAULT to
15981 the locations of all the symbols that went into the error.
15982 * doc/bison.texinfo (Location Default Action): Mention that
15983 YYLLOC_DEFAULT is also invoked for syntax errors.
15984 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
15985 Error locations include the locations of all the tokens that were
15986 discarded, not just the last token.
15987
15988 2002-12-26 Paul Eggert <eggert@twinsun.com>
15989
15990 * src/files.c: Include quote.h.
15991 (compute_output_file_names): Warn if we detect conflicting
15992 outputs to the same file. This should catch the misunderstanding
15993 exemplified by Debian Bug 165349, reported by Bruce Stephens..
15994
15995 * src/conflicts.c (conflicts_print): If the user specifies
15996 "%expect N", report an error if there are any reduce/reduce
15997 conflicts. This is what the manual says should happen.
15998 This fixes Debian bug 130890, reported by Anthony DeRobertis.
15999 * tests/conflicts.at (%expect with reduce conflicts): New test.
16000
16001 Don't use m4_include on relative file names, as it doesn't work as
16002 desired if there happens to be a file with that name under ".".
16003
16004 * m4sugar/version.m4: Remove; it was included but it wasn't used.
16005 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
16006 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
16007 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
16008 * src/output.c (output_skeleton): Use full path names when
16009 specifying a file to include; don't rely on include path, as
16010 it's unreliable when the working file contains a file with
16011 that name.
16012
16013 2002-12-25 Paul Eggert <eggert@twinsun.com>
16014
16015 Remove obsolete references to bison.simple and bison.hairy.
16016 Problem mentioned by Aubin Mahe in
16017 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
16018 * data/glr.c: Comment fix.
16019 * doc/bison.1: Remove references. Also, mention "yacc".
16020
16021 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
16022 with -g option.
16023
16024 * src/parse-gram.y (declaration): Use enum "report_states" rather
16025 than its numeric value 1.
16026
16027 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
16028 opening a new one. This fixes Debian bug 165349, reported by
16029 Bruce Stephens.
16030
16031 2002-12-24 Paul Eggert <eggert@twinsun.com>
16032
16033 Version 1.75e.
16034
16035 * Makefile.maint (cvs-update): Don't assume that the shell
16036 supports $(...), as Solaris sh doesn't.
16037
16038 * src/parse-gram.y (lloc_default): Remove test for empty
16039 nonterminals at the end, since it didn't change the result.
16040
16041 2002-12-24 Paul Eggert <eggert@twinsun.com>
16042
16043 If the user does not define YYSTYPE as a macro, Bison now declares it
16044 using typedef instead of defining it as a macro. POSIX requires this.
16045 For consistency, YYLTYPE is also declared instead of defined.
16046
16047 %union directives can now have a tag before the `{', e.g., the
16048 directive `%union foo {...}' now generates the C code
16049 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
16050 The default union tag is `YYSTYPE', for compatibility with Solaris 9
16051 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
16052 instead of `yyltype'.
16053
16054 `yystype' and `yyltype' are now obsolescent macros instead of being
16055 typedefs or tags; they are no longer documented and will be
16056 withdrawn in a future release.
16057
16058 * data/glr.c (b4_location_type): Remove.
16059 (YYSTYPE): Renamed from yystype.
16060 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
16061 (struct YYLTYPE): Renamed from struct yyltype.
16062 (YYLTYPE): Renamed from yyltype.
16063 (yyltype, yystype): New (and obsolescent) macros,
16064 for backward compatibility.
16065 * data/yacc.c: Likewise.
16066
16067 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
16068 does not specify a union tag. This is for compatibility with
16069 Solaris 9 yacc.
16070
16071 * src/parse-gram.y (add_param): 2nd arg is now char * not char
16072 const *, since it is now modified by stripping surrounding { }.
16073 (current_braced_code): Remove.
16074 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
16075 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
16076 trailing " {...}". Now of type <chars>.
16077 (grammar_declaration): Adjust to bundled tokens.
16078 (code_content): Remove; stripping is now done by add_param.
16079 (print_token_value): Print contents of bundled tokens.
16080 (token_name): New function.
16081
16082 * src/reader.h (braced_code, current_braced_code): Remove.
16083 (token_name): New decl.
16084
16085 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
16086 token_type, not braced_code code_kind. All uses changed.
16087 (SC_PRE_CODE): New state, for scanning after a keyword that
16088 has (or usually has) an immediately-following braced code.
16089 (token_type): New local var, to keep track of which token type
16090 to return when scanning braced code.
16091 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
16092 <INITIAL>"%parse-param", <INITIAL>"%printer",
16093 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
16094 instead of returning a token type immediately.
16095 (<INITIAL>"{"): Set token type.
16096 (<SC_BRACED_CODE>"}"): Use it.
16097 (handle_action_dollar, handle_action_at): Now returns bool
16098 indicating success. Fail if ! current_rule; this prevents a core dump.
16099 (handle_symbol_code_dollar, handle_symbol_code_at):
16100 Remove; merge body into caller.
16101 (handle_dollar, handle_at): Complain in invalid contexts.
16102
16103 * NEWS, doc/bison.texinfo: Document the above.
16104 * NEWS: Fix years and program names in copyright notice.
16105
16106 2002-12-17 Paul Eggert <eggert@twinsun.com>
16107
16108 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
16109 Reporting, Table of Symbols): Omit mentions of %lex-param and
16110 %parse-param from the documentation for now.
16111
16112 2002-12-15 Paul Eggert <eggert@twinsun.com>
16113
16114 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
16115 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
16116 lookahead symbol, and which sets yychar in parser actions) and it
16117 disagreed with the Bison documentation. Bug
16118 reported by Andrew Walrond.
16119
16120 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
16121 as the caller now does that.
16122 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
16123 (YYEMPTY): Parenthesize right hand side, since others use it.
16124 (yyparse): Don't assume that our generated code is the only code
16125 that sets yychar.
16126
16127 2002-12-13 Paul Eggert <eggert@twinsun.com>
16128
16129 Version 1.75d.
16130
16131 POSIX requires a "yacc" command.
16132 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
16133 (MOSTLYCLEANFILES): Add yacc.
16134 (yacc): New rule.
16135 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
16136 as an alias for bison y.
16137
16138 * po/LINGUAS: Add da.
16139
16140 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
16141 problem with latest <getopt.h>.
16142 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
16143
16144 * doc/fdl.texi: Upgrade to 1.2.
16145 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
16146 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
16147 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
16148 gnulib.
16149 * config/install-sh: Sync with autotools.
16150
16151 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
16152 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
16153 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
16154 locations are requested.
16155 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
16156 locations are requested.
16157
16158 2002-12-12 Paul Eggert <eggert@twinsun.com>
16159
16160 Remove unportable casts and storage allocation tricks.
16161 While we're at it, remove almost all casts, since they
16162 usually aren't needed and are a sign of trouble.
16163
16164 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
16165
16166 * src/derives.c (derives_compute): Do not subtract NTOKENS from
16167 the pointer DSET returned by malloc; this isn't portable.
16168 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
16169 Similarly for DERIVES.
16170 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
16171 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
16172 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
16173
16174 * src/derives.c (derives_compute): Do not bother invoking
16175 int_of_rule_number, since rule numbers are integers.
16176
16177 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
16178 rather than XMALLOC (char, N).
16179
16180 * src/files.c (filename_split): Rewrite to avoid cast.
16181
16182 * src/gram.h (symbol_number_as_item_number,
16183 item_number_as_symbol_number, rule_number_as_item_number,
16184 item_number_as_rule_number):
16185 Now inline functions rather than macros, to avoid casts.
16186 * src/state.h (state_number_as_int): Likewise.
16187 * src/tables.c (state_number_to_vector_number,
16188 symbol_number_to_vector_number): Likewise.
16189
16190 * src/gram.h (int_of_rule_number): Remove; no longer used.
16191
16192 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
16193 since the resulting storage is always stored into.
16194
16195 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
16196 where it's needed.
16197
16198 * src/muscle_tab.c (muscle_m4_output):
16199 Now inline. Return bool, not int.
16200 * src/state.c (state_compare): Likewise.
16201 * src/symtab.c (symbol_check_defined,
16202 symbol_check_alias_consistency, symbol_pack, symbol_translation,
16203 hash_compare_symbol, hash_symbol):
16204 Likewise.
16205 * src/uniqstr.c (uniqstr_print): Likewise.
16206 * src/muscle_tab.c (muscle_m4_output_processor):
16207 New function, to avoid casts.
16208 * src/state.c (state_comparator, stage_hasher): Likewise.
16209 * src/symtab.c (symbol_check_defined_processor,
16210 symbol_check_alias_consistency_processor, symbol_pack_processor,
16211 symbol_translation_processor, hash_symbol_comparator,
16212 hash_symbol_hasher): Likewise.
16213 * src/uniqstr.c (uniqstr_print_processor): Likewise.
16214 * src/muscle_tab.c (muscles_m4_output):
16215 Use new functions instead of casting old functions unportably.
16216 * src/state.c (state_hash_new): Likewise.
16217 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
16218 symbols_token_translations_init):
16219 Likewise.
16220 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
16221
16222 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
16223 var instead of casting to long, to avoid casts.
16224 (prepare_states): Use MALLOC rather than alloca, so that we don't
16225 have to worry about alloca.
16226 * src/state.c (state_hash_lookup): Likewise.
16227
16228 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
16229 local var instead of casting to unsigned char, to avoid casts.
16230
16231 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
16232 STATE_ALLOC): Remove.
16233 (transitions_new, errs_new, reductions_new, state_new): Use malloc
16234 rather than calloc, and use offsetof to avoid allocating slightly
16235 too much storage.
16236 (state_new): Initialize all members.
16237
16238 * src/state.c (state_hash): Use unsigned accumulator, not signed.
16239
16240 * src/symtab.c (symbol_free): Remove; unused.
16241 (symbol_get): Remove cast in lhs of assignment.
16242 (symbols_do): Now static. Accept generic arguments, not
16243 hashing-related ones.
16244
16245 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
16246 (symbol_processor): Remove.
16247 (symbols_do): Remove decl; now static.
16248
16249 * src/system.h (alloca): Remove; decl no longer needed.
16250 (<stddef.h>): Include, for offsetof.
16251 (<inttypes.>, <stdint.h>): Include if available.
16252 (uintptr_t): New type, if system lacks it.
16253 (CALLOC, MALLOC, REALLOC): New macros.
16254 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
16255 new macros.
16256
16257 * src/tables.c (table_size): Now int, to pacify GCC.
16258 (table_grow, table_ninf_remap): Use signed table size.
16259 (save_row): Don't bother initializing locals when not needed.
16260 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
16261 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
16262
16263 * src/vcg.h: Correct misspellings.
16264
16265 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
16266
16267
16268 * src/getargs.c (getargs): Don't assume EOF == -1.
16269
16270 2002-12-09 Paul Eggert <eggert@twinsun.com>
16271
16272 Change identifier spellings to avoid collisions with names
16273 that are reserved by POSIX.
16274
16275 Don't use names ending in _t, since POSIX reserves them.
16276 For consistency, remove _e and _s endings -- they're weren't
16277 needed to remove ambiguity. All uses changed.
16278 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
16279 turn was just renamed from struniq_t.
16280 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
16281 which in turn was just renamed from struniq_processor_t.
16282 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
16283 in turn was renamed from hash_compare_struniq_t.
16284 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
16285 (state_list): Renamed from state_list_t.
16286 * src/assoc.h (assoc): Renamed from assoc_t.
16287 * src/conflicts.c (enum conflict_resolution): Renamed from
16288 enum conflict_resolution_e.
16289 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
16290 (rule_list): Renamed from rule_list_t.
16291 * src/getargs.h (enum trace): Renamed from enum trace_e.
16292 (enum report): Renamed from enum report_e.
16293 * src/gram.h (item_number): Renamed from item_number_t.
16294 (rule_number): Renamed from rule_number_t.
16295 (struct rule_s): Remove the "rule_s" part; not used.
16296 (rule): Renamed from rule_t.
16297 (rule_filter): Renamed from rule_filter_t.
16298 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
16299 (goto_list): Renamed from goto_list_t.
16300 * src/lalr.h (goto_number): Renamed from goto_number_t.
16301 * src/location.h (location): Renamed from location_t.
16302 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
16303 and moved here from:
16304 * src/muscle_tab.h (muscle_entry_t): here.
16305 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
16306 (rule_list): Renamed from rule_list_t.
16307 * src/print_graph.c (static_graph): Renamed from graph.
16308 * src/reader.h (braced_code): Renamed from braced_code_t.
16309 Remove brace_code_e tag.
16310 * src/relation.h (relation_node): Renamed from relation_node_t.
16311 (relation_nodes): Renamed from relation_nodes_t.
16312 (relation): Renamed from relation_t.
16313 * src/state.h (state_number): Renamed from state_number_t.
16314 (struct state): Renamed from struct state_s.
16315 (state): Renamed from state_t.
16316 (transitions): Renamed from transitions_t. Unused (and
16317 misspelled) transtion_s tag removed.
16318 (errs): Renamed from errs_t. Unused errs_s tag removed.
16319 (reductions): Renamed from reductions_t. Unused tag
16320 reductions_s removed.
16321 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
16322 (struct symbol_list): Renamed from struct symbol_list_s.
16323 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
16324 (struct symbol): Renamed from struct symbol_s.
16325 (symbol): Renamed from symbol_t.
16326 * src/tables.c (vector_number): Renamed from vector_number_t.
16327 (action_number): Renamed from action_t.
16328 * src/tables.h (base_number): Renamed from base_t.
16329 * src/vcg.h (enum color): Renamed from enum color_e.
16330 (enum textmode): Renamed from enum textmode_e.
16331 (enum shape): Renamed from enum shape_e.
16332 (struct colorentry): Renamed from struct colorentry_s.
16333 (struct classname): Renamed from struct classname_s.
16334 (struct infoname): Renamed from struct infoname_s.
16335 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
16336 (enum decision): Renamed from enum decision_e.
16337 (enum orientation): Renamed from enum orientation_e.
16338 (enum alignment): Renamed from enum alignment_e.
16339 (enum arrow_mode): Renamed from enum arrow_mode_e.
16340 (enum crossing_type): Renamed from enum crossing_type_e.
16341 (enum view): Renamed from enum view_e.
16342 (struct node): Renamed from struct node_s.
16343 (node): Renamed from node_t.
16344 (enum linestyle): Renamed from enum linestyle_e.
16345 (enum arrowstyle): Renamed from enum arrowstyle_e.
16346 (struct edge): Renamed from struct edge.
16347 (edge): Renamed from edge_t.
16348 (struct graph): Renamed from struct graph_s.
16349 (graph): Renamed from graph_t.
16350 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
16351 Rename value_t -> value.
16352 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
16353 value_t_as_yystype -> value_as_yystype.
16354
16355 Don't include <errno.h> in the mainstream code, since it
16356 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
16357 * lib/get-errno.c, lib/get-errno.h: New files.
16358 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
16359 get-errno.c.
16360 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
16361 * src/output.c (output_skeleton): Likewise.
16362 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
16363 instead of errno.
16364 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
16365 Likewise.
16366 (handle_action_dollar, handle_action_at): Likewise.
16367 * src/system.h: Do not include <errno.h>.
16368 (TAB_EXT): Renamed from EXT_TAB.
16369 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
16370
16371 Avoid str[a-z]*, since <string.h> reserves that name space.
16372 Change all instances of "struniq" in names to "uniqstr", and
16373 likewise for "STRUNIQ" and "UNIQSTR".
16374 * src/uniqstr.c: Renamed from src/struniq.c.
16375 * src/uniqstr.h: Renamed from src/struniq.h.
16376 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
16377 * src/files.c (strsuffix): Remove; unused.
16378 (concat2): Renamed from stringappend. Now static.
16379 * src/files.h (strsuffix, stringappend): Remove; unused.
16380 * src/parse-gram.y (<chars>): Renamed from <string>.
16381 (<uniqstr>): Renamed from <struniq>.
16382 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
16383 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
16384 (struct graph_s.expand): Renamed from struct graph_s.stretch.
16385 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
16386 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
16387 (N_EXPAND): Renamed from N_STRETCH.
16388
16389 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
16390 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
16391 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
16392 Remove; unused.
16393 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
16394 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
16395 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
16396 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
16397 (BASE_MAXIMUM): Renamed from BASE_MAX.
16398 (BASE_MINIMUM): Renamed from BASE_MIN.
16399 (ACTION_MAX): Remove; unused.
16400 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
16401 Unnecessary casts removed from above defines.
16402
16403
16404 Fix misspelling in names.
16405 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
16406 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
16407 G_NODE_ALIGNEMENT.
16408
16409
16410 * lib/timevar.c (timevar_report): Renamed from time_report,
16411 for consistency with other names.
16412 * lib/timevar.h (timevar_report): New decl.
16413 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
16414
16415
16416 Sort include-file uses.
16417
16418 Reorder all include files under src to be in the order "system.h".
16419 then the ../lib include files in angle brackets (alphabetized),
16420 then the . include files in double-quotes (alphabetized). Fix
16421 dependency breakages encountered in this process, as follows:
16422 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
16423 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
16424 * src/state.h: Include "symtab.h".
16425
16426 2002-12-08 Paul Eggert <eggert@twinsun.com>
16427
16428 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
16429 since this causes problems when __file__ contains character
16430 sequences like "@" that are treated specially by src/scan-skel.l.
16431 Instead, just use the file's basename. This fixes the bug
16432 reported by Martin Mokrejs in
16433 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
16434
16435 2002-12-06 Paul Eggert <eggert@twinsun.com>
16436
16437 Add support for rules that do not have trailing semicolons, as
16438 POSIX requires. Improve the quality of locations in Bison
16439 diagnostics.
16440
16441 * src/location.c: Include <quotearg.h>.
16442 (empty_location): Now const.
16443 (location_print): New function. Follow the recommendation of the
16444 GNU Coding Standards for locations that span file boundaries.
16445 * src/location.h: Do not include <quotearg.h>; no longer needed.
16446 (boundary): New type.
16447 (location_t): Use it. This allows locations to span file boundaries.
16448 All member uses changed: file -> start.file or end.file (as needed),
16449 first_line -> start.line, first_column -> start.column,
16450 last_line -> end.line, last_column -> end.column.
16451 (equal_boundaries): New function.
16452 (LOCATION_RESET, LOCATION_STEP): Remove.
16453 (LOCATION_PRINT): Remove. All callers changed to use location_print.
16454 (empty_location): Now const.
16455 (location_print): New decl.
16456 * src/parse-gram.y (lloc_default): New function, which handles
16457 empty locations more accurately.
16458 (YYLLOC_DEFAULT): Use it.
16459 (%token COLON): Remove.
16460 (%token ID_COLON): New token.
16461 (rules): Use it.
16462 (declarations, rules): Remove trailing semicolon.
16463 (declaration, rules_or_grammar_declaration):
16464 Allow empty (";") declaration.
16465 (symbol_def): Remove empty actions; no longer needed.
16466 (rules_or_grammar_declaration): Remove trailing semicolon.
16467 (semi_colon.opt): Remove.
16468 * src/reader.h: Include location.h.
16469 (scanner_cursor): New decl.
16470 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
16471 rolling our own.
16472 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
16473 of *loc.
16474 (STEP): Remove. No longer needed, now that adjust_location does
16475 the work. All uses removed.
16476 (scanner_cursor): New var.
16477 (adjust_location): Renamed from extend_location. It now sets
16478 *loc and adjusts the scanner cursor. All uses changed.
16479 Don't bother testing for CR.
16480 (handle_syncline): Remove location arg; now updates scanner cursor.
16481 All callers changed.
16482 (unexpected_end_of_file): Now accepts start boundary of token or
16483 comment, not location. All callers changed. Update scanner cursor,
16484 not the location.
16485 (SC_AFTER_IDENTIFIER): New state.
16486 (context_state): Renamed from c_context. All uses changed.
16487 (id_loc, code_start, token_start): New local vars.
16488 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
16489 processing of Yacc white space and equivalents here.
16490 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
16491 instead of returning ID immediately, since we need to search for
16492 a subsequent colon.
16493 (<INITIAL>"'", "\""): Save token_start.
16494 (<INITIAL>"%{", "{", "%%"): Save code_start.
16495 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
16496 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
16497 BEGIN context_state at end, not INITIAL.
16498 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
16499 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
16500 Return correct token start.
16501 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
16502 the start of a character, string or multiline comment is found.
16503 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
16504 Reduction): Adjust reported locations to match the more-precise
16505 results now expected.
16506 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
16507 * tests/reduce.at (Useless Rules, Reduced Automaton,
16508 Underivable Rules): Likewise.
16509 * tests/regression.at (Invalid inputs): No longer `expecting ";"
16510 or "|"' now that so many other tokens are allowed by the new grammar.
16511
16512 * src/complain.h (current_file): Remove duplicate decl;
16513 current_file is now owned by files.h.
16514 * src/complain.c, src/scan-gram.l: Include files.h.
16515
16516 2002-12-06 Paul Eggert <eggert@twinsun.com>
16517
16518 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
16519 promotes to int; it might be unsigned int.
16520 * data/yacc.c (yy_reduce_print): Likewise.
16521
16522 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
16523 be #defined in the prologue, not in the Bison declarations.
16524 This fixes Debian Bug 102878, reported by Shaul Karl.
16525
16526 2002-12-02 Paul Eggert <eggert@twinsun.com>
16527
16528 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
16529 * lib/strtoul.c: New file, from gnulib.
16530 This fixes a porting bug reported by Peter Klein in
16531 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
16532
16533 2002-11-30 Paul Eggert <eggert@twinsun.com>
16534
16535 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
16536 and put only a forward declaration in the prologue. This is for
16537 consistency with the other scanner helper functions.
16538
16539 Type clashes now generate warnings, not errors, since it
16540 appears that POSIX may allow some grammars with type clashes.
16541 * src/reader.c (grammar_current_rule_check): Warn about
16542 type clashes instead of complaining.
16543 * tests/input.at (Type Clashes): Expect warnings, not complaints.
16544
16545 Add Yacc library, since POSIX requires it.
16546 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
16547 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
16548 * lib/main.c, lib/yyerror.c: New files.
16549
16550 gram_error can be static; it need not be extern.
16551 * src/reader.h (gram_error): Remove decl.
16552 * src/parse-gram.y (gram_error): Now static. Add static decl.
16553 (print_token_value): Omit parameter names from forward decl,
16554 for consistency.
16555
16556 2002-11-29 Paul Eggert <eggert@twinsun.com>
16557
16558 * doc/bison.texinfo: Emphasize that yylex and yyerror must
16559 be declared before being used. E.g., one should typically
16560 declare them in the prologue. Use GNU coding style in examples.
16561 Put "const" consistently after the type it modifies. Mention
16562 that C99 supports "inline". Mention that yyerror traditionally
16563 returns "int".
16564
16565 %parse-param and %lex-param now take just one argument, the
16566 declaration; the argument name is deduced from the declaration.
16567
16568 * doc/bison.texinfo (Parser Function, Pure Calling, Error
16569 Reporting, Table of Symbols): Document this.
16570 * src/parse-gram.y (add_param): New function.
16571 (COMMA): Remove.
16572 (declaration): Implement new rule for %parse-param and %lex-param.
16573 * src/scan-gram.l: "," now elicits a warning, rather than being
16574 a token; this is more compatible with byacc.
16575 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
16576
16577 2002-11-27 Paul Eggert <eggert@twinsun.com>
16578
16579 Rename identifiers to avoid real and potential collisions.
16580
16581 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
16582 to avoid collision with lex macro described by Bruce Lilly in
16583 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
16584 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
16585 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
16586 * src/parse-gram.y (print_token_value): Renamed from yyprint.
16587 All uses changed.
16588 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
16589 The name "yycontrol" violates the name space rules, and this stuff
16590 wasn't being used anyway.
16591 (input): Remove action; this stuff wasn't being used.
16592 (gram_error): Rename local variable yylloc -> loc.
16593 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
16594 (YY_DECL): Don't use "yy" at start of local variables.
16595 All uses changed, e.g., yylloc -> loc.
16596 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
16597 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
16598 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
16599 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
16600
16601 * src/parse-gram.y (gram_error): loc is now const *.
16602 * src/reader.h (gram_error): Likewise.
16603
16604 2002-11-24 Paul Eggert <eggert@twinsun.com>
16605
16606 Version 1.75c.
16607
16608 * tests/actions.at (Actions after errors): Use an output format
16609 more similar to that of the Printers and Destructors test.
16610 Test the position of the ';' token too.
16611 (Printers and Destructors): Likewise.
16612 (Printers and Destructors: %glr-parser): Remove for now, to avoid
16613 unnecessarily alarming people when the test fails.
16614
16615 * data/yacc.c (yyerrlab1): Move this label down, so that the
16616 parser does not discard the lookahead token if the user code
16617 invokes YYERROR. This change is required for POSIX conformance.
16618
16619 * lib/error.c: Sync with gnulib.
16620
16621 2002-11-22 Paul Eggert <eggert@twinsun.com>
16622
16623 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
16624 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
16625 * lib/xmalloc.c: Likewise.
16626
16627 2002-11-20 Paul Eggert <eggert@twinsun.com>
16628
16629 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
16630
16631 2002-11-20 Paul Eggert <eggert@twinsun.com>
16632
16633 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
16634 should use `if (! x) abort ();' rather than `assert (x);', and
16635 anyway it's one less thing to worry about configuring.
16636
16637 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
16638 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
16639 and replace all instances of assert with abort.
16640 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
16641 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
16642
16643 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
16644 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
16645 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
16646 hash_find_entry, hash_rehash, hash_insert): Likewise.
16647 * src/conflicts.c (resolve_sr_conflict): Likewise.
16648 * src/lalr.c (set_goto_map, map_goto): Likewise.
16649 * src/nullable.c (nullable_compute): Likewise.
16650 * src/output.c (prepare_rules, token_definitions_output): Likewise.
16651 * src/reader.c (packgram, reader): Likewise.
16652 * src/state.c (state_new, state_free, state_transitions_set,
16653 state_reduction_find): Likewise.
16654 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
16655 symbol_pack): Likewise.
16656 * src/tables.c (conflict_row, pack_vector): Likewise.
16657 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
16658 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
16659 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
16660 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
16661
16662 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
16663 (ARGMATCH_CONSTRAINT): New macro.
16664 (ARGMATCH_ASSERT): Use it.
16665
16666 * src/system.h (verify): New macro.
16667 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
16668 rather than assert.
16669 * src/tables.c (tables_generate): Likewise.
16670
16671 * src/struniq.c (struniq_assert): Now returns void, and aborts
16672 if the assertion is false.
16673 (struniq_assert_p): Remove.
16674 * src/struniq.h: Likewise.
16675
16676 2002-11-18 Paul Eggert <eggert@twinsun.com>
16677
16678 * data/glr.c (yygetLRActions): Replace `yyindex' with
16679 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
16680 This fixes the regression with Sun ONE Studio 7 cc that I reported in
16681 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
16682
16683 2002-11-18 Akim Demaille <akim@epita.fr>
16684
16685 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
16686 space.
16687 From Tim Van Holder.
16688
16689 2002-11-17 Paul Eggert <eggert@twinsun.com>
16690
16691 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
16692 to "SyntaxError" for consistency with my 2002-11-15 change.
16693
16694 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
16695 not define to {}, since this breaks the common use of `YYDPRINTF
16696 ((...));' if a single statement is desired (e.g. before `else').
16697 Work around GCC warnings by surrounding corresponding calls with
16698 {} if needed.
16699 (yyhasResolvedValue): Remove unused function.
16700 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
16701 loop body.
16702 (yyreportSyntaxError): Renamed from yyreportParseError.
16703 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
16704 All uses changed.
16705 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
16706 extern when possible. Remove unused initializations.
16707
16708 2002-11-16 Akim Demaille <akim@epita.fr>
16709
16710 Augment the similarity between GLR and LALR traces.
16711
16712 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
16713 (YY_REDUCE_PRINT): New.
16714 (yyparse): Use them.
16715 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
16716 YYDPRINT here.
16717 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
16718 state reached after the reduction/recovery, since...
16719 (yyparse, yyprocessOneStack): Report the state we are entering in.
16720
16721 2002-11-16 Akim Demaille <akim@epita.fr>
16722
16723 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
16724 Add support for --trace=skeleton.
16725 * src/scan-skel.l: %option debug.
16726 Scan strings of non-@ or \n instead of character by character.
16727 (scan_skel): Handle trace_skeleton.
16728 (QPUTS): New.
16729 (@output_parser_name@, @output_header_name@): ``Restore'' their
16730 support (used to be M4 macros).
16731 * data/yacc.c: Quote larger chunks, a la glr.c.
16732 * data/lalr1.cc: Likewise.
16733 The header guards are no longer available, so use some other
16734 string than `YYLSP_NEEDED'.
16735
16736 2002-11-16 Akim Demaille <akim@epita.fr>
16737
16738 Make the ``Printers and Destructors'' test more verbose, taking
16739 `yacc.c''s behavior as (possibly wrong) reference.
16740
16741 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
16742 instead of fprint on stdout.
16743 Set and report the last_line of the symbols.
16744 Consistently display values and locations.
16745
16746 2002-11-16 Paul Eggert <eggert@twinsun.com>
16747
16748 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
16749
16750 2002-11-15 Paul Eggert <eggert@twinsun.com>
16751
16752 * tests/actions.at (Actions after errors): New test case.
16753
16754 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
16755 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
16756 tests/action.at, tests/calc.at, tests/conflicts.at,
16757 tests/cxx-type.at, tests/regression.at:
16758 "parse error" -> "syntax error" for POSIX compatibility.
16759 "parsing stack overflow..." -> "parser stack overflow" so
16760 that code matches Bison documentation.
16761
16762 2002-11-15 Akim Demaille <akim@epita.fr>
16763
16764 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
16765 take two BRACED_CODE, not two string_content.
16766 Free the scanner's obstack when we are done.
16767 (code_content): New.
16768 * tests/calc.at: Adjust.
16769 * doc/bison.texinfo: Adjust.
16770 Also, make sure to include the `,' for these declarations.
16771
16772 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
16773
16774 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
16775 definition; avoids potential autoreconf problems.
16776
16777 2002-11-15 Akim Demaille <akim@epita.fr>
16778
16779 Always check the value returned by yyparse.
16780
16781 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
16782 returned by yyparse.
16783 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
16784 Adjust calls.
16785 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
16786 returned by yyparse.
16787
16788 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16789
16790 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
16791 on input.at test.
16792
16793 2002-11-14 Paul Eggert <eggert@twinsun.com>
16794
16795 * src/output.c (output_skeleton): Call xfopen instead of
16796 duplicating xfopen's body.
16797
16798 Fix bugs reported by Nelson H. F. Beebe in
16799 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
16800
16801 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
16802 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
16803 Group compiler. Instead, use "$CC -E bar.c". Include the .h
16804 file twice in the grammar, as an extra check.
16805
16806 * tests/input.at (Torturing the Scanner): Surround the
16807 backslash-newline tests with "#if 0", to make it less likely that
16808 we'll run into compiler bugs. Bring back solitary \ inside
16809 comment, but add a closing comment to work around HP C bug. Don't
16810 test backslash-newline in C character constant.
16811
16812 2002-11-14 Akim Demaille <akim@epita.fr>
16813
16814 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
16815 status of the compiler.
16816 Calling `exit 1' is no longer needed.
16817 Reported by Nelson H. F. Beebe.
16818
16819 2002-11-14 Akim Demaille <akim@epita.fr>
16820
16821 * tests/atlocal.in (CPPFLAGS): We have config.h.
16822 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
16823 New.
16824 * tests/actions.at, tests/calc.at, tests/conflicts.at,
16825 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
16826 * tests/regression.at, tests/torture.at: Use them for all the
16827 grammars that are to be compiled.
16828 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
16829 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
16830 * doc/bison.texinfo (GLR Parsers): Document `inline'.
16831
16832 2002-11-14 Akim Demaille <akim@epita.fr>
16833
16834 * doc/bison.texinfo: Various formatting changes (alignments in
16835 samples, additional @group/@end group, GCS in samples.
16836 Use @deffn instead of simple @table to define the directives,
16837 macros, variables etc.
16838
16839 2002-11-13 Paul Eggert <eggert@twinsun.com>
16840
16841 Fix some bugs reported by Albert Chin-A-Young in
16842 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
16843
16844 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
16845 -o c"; the HP C compiler chatters during compilation.
16846 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
16847 * tests/headers.at (export YYLTYPE): Likewise.
16848
16849 * tests/input.at (Torturing the Scanner): Remove lines containing
16850 solitary backslashes, as they tickle a bug in the HP C compiler.
16851
16852 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
16853 comments, since they're not portable. Use GNU coding style.
16854
16855 2002-11-13 Akim Demaille <akim@epita.fr>
16856
16857 * data/yacc.c: Leave bigger chunks of quoted text.
16858 (YYDSYMPRINTF): New.
16859 Use it to report symbol activities.
16860 * data/glr.c (YYDSYMPRINTF): New.
16861 Use it.
16862
16863 2002-11-12 Paul Eggert <eggert@twinsun.com>
16864
16865 Version 1.75b.
16866
16867 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
16868 (yyglrReduce): Return yyok, not 0.
16869 This should avoid the enumerated-type warnings reported
16870 by Nelson H. F. Beebe in
16871 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
16872
16873 * lib/bbitset.h (BITSET_INLINE): Remove.
16874 * lib/bitset.h [! BITSET_INLINE]: Remove.
16875 (bitset_set, bitset_reset, bitset_test): Rename local vars
16876 to avoid shadowing warnings by GCC.
16877
16878 * data/glr.c (inline): Remove #define. It's the user's
16879 responsibility to #define it away, just like 'const'.
16880 This fixes one of the bugs reported by Nelson H. F. Beebe in
16881 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
16882
16883 * Makefile.maint (po-check): Scan .l and .y files instead of the
16884 .c and the .h files that they generate. This fixes the bug
16885 reported by Tim Van Holder in:
16886 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
16887 Look for N_ as well as for _. Try to avoid matching #define for
16888 N_ and _.
16889 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
16890 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
16891 * src/scan-gram.l: Revamp regular expressions so that " and '
16892 do not confuse xgettext.
16893
16894 * src/struniq.h (struniq_new): Do not declare the return type
16895 to be 'const'; this violates the C standard.
16896 * src/struniq.c (struniq_new): Likewise.
16897
16898 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
16899
16900 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
16901 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
16902 linker.
16903
16904 2002-11-12 Akim Demaille <akim@epita.fr>
16905
16906 * Makefile.maint: Sync with Autoconf:
16907 (local_updates): New.
16908
16909 2002-11-12 Akim Demaille <akim@epita.fr>
16910
16911 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
16912
16913 2002-11-12 Akim Demaille <akim@epita.fr>
16914
16915 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
16916 locations.
16917
16918 2002-11-12 Akim Demaille <akim@epita.fr>
16919
16920 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
16921 not yyvalue.
16922
16923 2002-11-12 Akim Demaille <akim@epita.fr>
16924
16925 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
16926 Use it to test the GLR parser.
16927
16928 2002-11-12 Akim Demaille <akim@epita.fr>
16929
16930 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
16931 defines it.
16932 * data/glr.c (yystos): New.
16933 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
16934 (YYDSYMPRINT): New.
16935 (yyval): Don't define it, it is handled via M4.
16936 (yyrecoverParseError): Free verbosely the discarded symbols.
16937 * data/yacc.c (yysymprint): Remove, rather...
16938 (b4_yysymprint_generate): invoke.
16939 * data/c.m4 (b4_yysymprint_generate): New.
16940 Accept pointers as arguments, as opposed to the version from
16941 yacc.c.
16942 (b4_yydestruct_generate): Likewise.
16943 * tests/cations.at (Printers and Destructors): Use Bison directives
16944 instead of CPP macros.
16945 Don't rely on internal details.
16946
16947 2002-11-12 Akim Demaille <akim@epita.fr>
16948
16949 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
16950 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
16951 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
16952 it against YYEMPTY and so forth), work on yytoken (i.e., set
16953 it to YYEMPTY etc.).
16954 (yydestruct): Replace with a b4_yydestruct_generate invocation.
16955 (b4_symbol_actions): Remove.
16956 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
16957 for 0, end-of-input.
16958
16959 2002-11-12 Akim Demaille <akim@epita.fr>
16960
16961 * doc/bison.texinfo (Destructor Decl): New.
16962
16963 2002-11-12 Akim Demaille <akim@epita.fr>
16964
16965 * src/tables.c (tables_generate): Use free for pointers that
16966 cannot be NULL, not XFREE.
16967 (pack_vector): Use assert, not fatal, for bound violations.
16968 * src/state.c (state_new): Likewise.
16969 * src/reader.c (reader): Likewise.
16970 * src/lalr.c (set_goto_map): Likewise.
16971 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
16972 the file name.
16973
16974 2002-11-12 Akim Demaille <akim@epita.fr>
16975
16976 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
16977 Restore.
16978 * src/scan-gram.l (last_string): Is global to the file, not to
16979 yylex.
16980 * src/parse-gram.y (input): Don't append the epilogue here,
16981 (epilogue.opt): do it here, and free the scanner's obstack.
16982 * src/reader.c (epilogue_set): Rename as...
16983 (epilogue_augment): this.
16984 * data/c.m4 (b4_epilogue): Defaults to empty.
16985
16986 2002-11-12 Akim Demaille <akim@epita.fr>
16987
16988 * src/getargs.c (long_options): Remove duplicates.
16989 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
16990 Remove.
16991 * doc/bison.rnh: Remove.
16992 * doc/bison.texinfo (VMS Invocation): Remove.
16993
16994 2002-11-12 Akim Demaille <akim@epita.fr>
16995
16996 * src/struniq.h, src/struniq.c (struniq_t): Is const.
16997 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
16998
16999 Use struniq for symbols.
17000
17001 * src/symtab.h (symbol_t): The tag member is a struniq.
17002 (symbol_type_set): Adjust.
17003 * src/symtab.c (symbol_new): Takes a struniq.
17004 (symbol_free): Don't free the tag member.
17005 (hash_compare_symbol_t, hash_symbol_t): Rename as...
17006 (hash_compare_symbol, hash_symbol): these.
17007 Use the fact that tags as struniqs.
17008 (symbol_get): Use struniq_new.
17009 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
17010 Returns a strniq.
17011 * src/reader.h (merger_list, grammar_currentmerge_set): The name
17012 and type members are struniqs.
17013 * src/reader.c (get_merge_function)
17014 (grammar_current_rule_merge_set): Adjust.
17015 (TYPE, current_type): Are struniq.
17016
17017 Use struniq for file names.
17018
17019 * src/files.h, src/files.c (infile): Split into...
17020 (grammar_file, current_file): these.
17021 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
17022 * src/reduce.c (reduce_print): Likewise.
17023 * src/getargs.c (getargs): Likewise.
17024 * src/complain.h, src/complain.c: Likewise.
17025 * src/main.c (main): Call struniqs_new early enough to use it for
17026 file names.
17027 Don't free the input file name.
17028
17029 2002-11-12 Akim Demaille <akim@epita.fr>
17030
17031 * src/symtab.c (symbol_free): Remove dead deactivated code:
17032 type_name are properly removed.
17033 Don't use XFREE to free items that cannot be NULL.
17034 * src/struniq.h, src/struniq.c: New.
17035 * src/main.c (main): Initialize/free struniqs.
17036 * src/parse-gram.y (%union): Add astruniq member.
17037 (yyprint): Adjust.
17038 * src/scan-gram.l (<{tag}>): Return a struniq.
17039 Free the obstack bit that used to store it.
17040 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
17041
17042 2002-11-11 Paul Eggert <eggert@twinsun.com>
17043
17044 Revamp to fix many (but not all) of the C- and M4-related quoting
17045 problems. Among other things, this fixes the Bison bug reported
17046 by Jan Hubicka when processing the Bash grammar; see:
17047 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
17048
17049 Use new @ escapes consistently. Represent brackets with @{ and @}
17050 rather than @<:@ and @:>@, since this works a bit better with dumb
17051 editors like vi. Represent @ with @@, since @ is now consistently
17052 an escape. Use @oline@ and @ofile@ rather than __oline__ and
17053 __ofile__, to avoid unexpected expansions. Similarly, use @output
17054 rather than #output.
17055
17056 * data/c.m4 (b4_copyright): Omit file name from comment, since
17057 the file name could contain "*/".
17058 (b4_synclines_flag): Don't quote the 2nd argument; it should already
17059 be quoted. All uses changed.
17060
17061 * data/glr.c: Use new @ escapes consistently.
17062 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
17063 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
17064 Remove, since they couldn't handle arbitrary characters in file
17065 names.
17066 * data/lalr1.cc: Likewise.
17067 * data/yacc.c: Likewise.
17068
17069 * src/files.c (output_infix): Remove; all uses removed.
17070 * src/files.h: Likewise.
17071
17072 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
17073 mishandled funny characters in file names, and anyway it isn't
17074 needed any more.
17075 * data/yacc.c: Likewise.
17076 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
17077
17078 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
17079 * data/yacc.c: Likewise.
17080
17081 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
17082 strings now.
17083 (muscle_init): Quote filename as a C string.
17084 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
17085 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
17086 * src/output.c (escaped_file_name_output): New function.
17087 (prepare_symbols): Quote tokens for M4.
17088 (prepare): Don't insert output_infix, output_prefix,
17089 output_parser_name, output_header_name; this is now down by scan-skel.
17090 Insert skeleton as a C string.
17091
17092 * src/output.c (user_actions_output, symbol_destructors_output,
17093 symbol_printers_output): Quote filenames for C and M4.
17094 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17095
17096 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
17097 escapes other than \\ and \'; this simplifies the code.
17098 (<SC_STRING>): Likewise, for \\ and \".
17099 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
17100 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
17101 Use new escapes @{ and @} for [ and ].
17102
17103 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
17104 them with auto vars.
17105 Switch to new escape scheme, where @ is the escape character uniformly.
17106 Abort if a stray escape character is found. Avoid unbounded input
17107 buffer when parsing non-escaped text.
17108
17109 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
17110 __oline__, #output, $@, and @{ do not have unintended meanings.
17111
17112 2002-11-09 Paul Eggert <eggert@twinsun.com>
17113
17114 Fix the test failure due to GCC warnings described in
17115 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
17116 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
17117 evaluate to 0 if it's impossible for NINF to be in the respective
17118 table.
17119 (yygetLRActions, yyrecoverParseError): Use them.
17120
17121 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
17122 counted in the token inserted at end of file. Now takes
17123 location_t *, not location_t, so that the location can be
17124 adjusted. All uses changed.
17125
17126 * tests/regression.at (Invalid inputs): Adjust wording in
17127 diagnostic to match the new behavior.
17128
17129 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
17130 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
17131 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
17132 abort ();'. This reduces the runtime of the "Many lookaheads"
17133 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
17134 GCC 3.2.
17135
17136 2002-11-07 Paul Eggert <eggert@twinsun.com>
17137
17138 * src/parse-gram.y (CHARACTER): Remove unused token.
17139 All uses removed.
17140
17141 * src/scan-gram.l: Remove stack option. We no longer use the
17142 stack, since the stack was never deeper than 1; instead, use the
17143 new auto var c_context to record the stacked value.
17144
17145 Remove nounput option. At an unexpected end of file, we now unput
17146 the minimal input necessary to end cleanly; this simplifies the
17147 code.
17148
17149 Avoid unbounded token sizes where this is easy.
17150
17151 (unexpected_end_of_file): New function.
17152 Use it to systematize the error message on unexpected EOF.
17153 (last-string): Now auto, not static.
17154 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
17155 (scanner_last_string_free): Remove; not used.
17156 (percent_percent_count): Move decl to just before use.
17157 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
17158 not the (never otherwised-used) CHARACTER.
17159
17160 2002-11-07 Akim Demaille <akim@epita.fr>
17161
17162 Let yyerror always receive the msg as last argument, so that
17163 yyerror can be variadic.
17164
17165 * data/yacc.c (b4_yyerror_args): New.
17166 Use it when calling yyerror.
17167 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
17168 Use it when calling yyerror.
17169 * doc/bison.texinfo (Error Reporting): Adjust.
17170 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
17171 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
17172
17173 2002-11-06 Akim Demaille <akim@epita.fr>
17174
17175 #line should have quoted strings.
17176 Ideally, this should be done by m4_quotearg.
17177
17178 * src/scan-skel.l: Include quotearg.h.
17179 Quote __ofile__.
17180 * src/output.c (symbol_printers_output)
17181 (symbol_destructors_output): Quote the file name.
17182
17183 2002-11-06 Akim Demaille <akim@epita.fr>
17184
17185 * tests/regression.at (Invalid inputs): Adjust to the recent
17186 messages.
17187
17188 2002-11-06 Akim Demaille <akim@epita.fr>
17189
17190 Restore --no-lines.
17191 Reported by Jim Kent.
17192
17193 * data/c.m4 (b4_syncline): New.
17194 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
17195 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
17196 * src/output.c (user_actions_output): Likewise.
17197 (prepare): Define 'b4_synclines_flag'.
17198 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
17199
17200 2002-11-06 Akim Demaille <akim@epita.fr>
17201
17202 * src/main.c (main): Free `infile'.
17203 * src/scan-gram.l (handle_syncline): New.
17204 Recognize `#line'.
17205 * src/output.c (user_actions_output, symbol_destructors_output)
17206 (symbol_printers_output): Use the location's file name, not
17207 infile.
17208 * src/reader.c (prologue_augment, epilogue_set): Likewise.
17209
17210 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17211
17212 * src/tables.c (matching_state): Don't allow states to match if
17213 either has GLR conflict entries.
17214
17215 2002-11-05 Paul Eggert <eggert@twinsun.com>
17216
17217 * src/scan-gram.l: Use more accurate diagnostics, e.g.
17218 "integer out of range" rather than "invalid value".
17219 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
17220 accordingly.
17221
17222 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
17223 Also, remove one static variable in the scanner.
17224
17225 * src/scan-gram.l (braces_level): Now auto, not static.
17226 Initialize to zero if the compiler is being picky.
17227 (INITIAL): Clear braces_level instead of incrementing it.
17228 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
17229 as POSIX 1003.1-2001 requires.
17230 * src/system.h (IF_LINT): New macro, taken from coreutils.
17231 * configure.ac: Define "lint" if --enable-gcc-warnings.
17232
17233 2002-11-05 Akim Demaille <akim@epita.fr>
17234
17235 * src/scan-gram.l: When it starts with `%', complain about the
17236 whole directive, not just that `invalid character: %'.
17237
17238 2002-11-04 Akim Demaille <akim@epita.fr>
17239
17240 * Makefile.maint: Update from Autoconf.
17241 (update, cvs-update, po-update, do-po-update): New.
17242
17243 2002-11-04 Akim Demaille <akim@epita.fr>
17244
17245 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
17246 and yyerror.
17247 Have yyerror `use' its arguments.
17248 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
17249 returns true when location & yacc & pure & parse-param.
17250 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
17251
17252 2002-11-04 Akim Demaille <akim@epita.fr>
17253
17254 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
17255 clashes.
17256 * src/scan-gram.l: Use [\'] instead of ['] to pacify
17257 font-lock-mode.
17258 Use complain_at.
17259 Use quote, not quote_n since LOCATION_PRINT no longer uses the
17260 slot 0.
17261
17262 2002-11-03 Paul Eggert <eggert@twinsun.com>
17263
17264 * src/reader.c (get_merge_function, grammar_current_rule_check):
17265 Use consistent diagnostics for reporting type name clashes.
17266 Quote the types with <>, for consistency with Yacc.
17267 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
17268
17269 2002-11-03 Akim Demaille <akim@epita.fr>
17270
17271 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
17272 New.
17273 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
17274 (b4_parse_param): Remove.
17275 Use b4_identification.
17276 Propagate b4_pure_args where needed to pass them to yyerror.
17277 * data/glr.m4 (b4_parse_param): Remove.
17278 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
17279 (b4_lpure_formals): New.
17280 Use b4_identification.
17281 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
17282 b4_user_formals and b4_user_args.
17283 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
17284 (yyreportAmbiguity): When using a pure parser, also need
17285 the location, and the parse-params.
17286 Adjust callers.
17287 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
17288 When using a pure parser, also need the parse-params.
17289 Adjust callers.
17290 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
17291 (%pure-parser + %parse-param) LALR and GLR parsers.
17292 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
17293 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
17294 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
17295 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
17296 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
17297 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
17298 * doc/bison.texinfo: Untabify the whole file.
17299 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
17300 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
17301 (Error Reporting): Adjust to these new directives.
17302 Document %error-verbose, deprecate YYERROR_VERBOSE.
17303
17304 2002-11-03 Akim Demaille <akim@epita.fr>
17305
17306 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
17307 AT_CHECK_CALC_GLR invocations to use % directives, instead of
17308 command line options.
17309 * tests/cxx-type.at: Formatting changes.
17310
17311 2002-11-03 Paul Eggert <eggert@twinsun.com>
17312
17313 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
17314 to count columns correctly, and to check for invalid inputs.
17315
17316 Use mbsnwidth to count columns correctly. Account for tabs, too.
17317 Include mbswidth.h.
17318 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
17319 (extend_location): New function.
17320 (YY_LINES): Remove.
17321
17322 Handle CRLF in C code rather than in Lex code.
17323 (YY_INPUT): New macro.
17324 (no_cr_read): New function.
17325
17326 Scan UCNs, even though we don't fully handle them yet.
17327 (convert_ucn_to_byte): New function.
17328
17329 Handle backslash-newline correctly in C code.
17330 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
17331 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
17332 all uses changed.
17333 (tag, splice): New EREs. Do not allow NUL or newline in tags.
17334 Use {splice} wherever C allows backslash-newline.
17335 YY_STEP after space, newline, vertical-tab.
17336 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
17337
17338 (letter, id): Don't assume ASCII; e.g., spell out a-z.
17339
17340 ({int}, handle_action_dollar, handle_action_at): Check for integer
17341 overflow.
17342
17343 (YY_STEP): Omit trailing semicolon, so that it's more like C.
17344
17345 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
17346 as well as \000. Check for UCHAR_MAX, not 255.
17347 Allow \x with an arbitrary positive number of digits, as in C.
17348 Check for overflow here.
17349 Allow \? and UCNs, for compatibility with C.
17350
17351 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
17352 with quote slot used by complain_at.
17353
17354 * tests/input.at: Add tests for backslash-newline, m4 quotes
17355 in symbols, long literals, and funny escapes in strings.
17356
17357 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
17358 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
17359 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
17360 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
17361 * m4/mbswidth.m4: New file, from GNU coreutils.
17362
17363 * doc/bison.texinfo (Grammar Outline): Document // comments.
17364 (Symbols): Document that trigraphs have no special meaning in Bison,
17365 nor is backslash-newline allowed.
17366 (Actions): Document that trigraphs have no special meaning.
17367
17368 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
17369 no longer used.
17370
17371 2002-11-02 Paul Eggert <eggert@twinsun.com>
17372
17373 * src/reader.c: Don't include quote.h; not needed.
17374 (get_merge_function): Reword warning to be consistent with
17375 type clash diagnostic in grammar_current_rule_check.
17376
17377 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
17378 bug in trigraph handling.
17379
17380 * src/output.c (prepare_symbols): When printing token names,
17381 escape "[" as "@<:@" and likewise for "]".
17382
17383 * src/system.h (errno): Remove declaration, as we are now
17384 assuming C89 or better, and C89 guarantees errno.
17385
17386 2002-10-30 Paul Eggert <eggert@twinsun.com>
17387
17388 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
17389 Check for close failures.
17390 * src/files.h (xfclose): Return void, not int, since it always
17391 returned zero.
17392 * src/files.c (xfclose): Likewise. Report I/O error if ferror
17393 indicates one.
17394 * src/output.c (output_skeleton): Use xfclose rather than fclose
17395 and ferror. xfclose now checks ferror.
17396
17397 * data/glr.c (YYLEFTMOST_STATE): Remove.
17398 (yyreportTree): Use a stack-based leftmost state. This avoids
17399 our continuing battles with bogus warnings about initializers.
17400
17401 2002-10-30 Akim Demaille <akim@epita.fr>
17402
17403 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
17404 #if.
17405
17406 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17407
17408 * tests/glr-regr1.at: New test for reported regressions.
17409 * tests/testsuite.at: Add glr-regr1.at test.
17410 * tests/Makefile.am: Add glr-regr1.at test.
17411
17412 2002-10-24 Paul Eggert <eggert@twinsun.com>
17413
17414 Version 1.75a.
17415
17416 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
17417 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
17418 we use malloc. Don't assume 'A' through 'Z' are contiguous.
17419 Don't assume strdup exists; POSIX says its an XSI extension.
17420 Check for buffer overflow on input.
17421
17422 2002-10-24 Akim Demaille <akim@epita.fr>
17423
17424 * src/output.c (output_skeleton): Don't disable M4sugar comments
17425 too soon: it results in comments being expanded.
17426 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
17427 first output.
17428
17429 2002-10-24 Akim Demaille <akim@epita.fr>
17430
17431 * data/yacc.c (m4_int_type): New.
17432 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
17433 char' as only yacc.c wants K&R portability.
17434 * data/glr.c (yysigned_char): Remove.
17435 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
17436 Reported by Quoc Peyrot.
17437
17438 2002-10-23 Paul Eggert <eggert@twinsun.com>
17439
17440 * src/main.c (main): With --trace=time, report times even if a
17441 non-fatal error occurs. Formerly, the times were reported in some
17442 such cases but not in others.
17443 * src/reader.c (reader): Just return if a complaint has been issued,
17444 instead of exiting, so that 'main' can report times.
17445
17446 2002-10-22 Akim Demaille <akim@epita.fr>
17447
17448 * src/system.h: Include sys/types.
17449 Reported by Bert Deknuydt.
17450
17451 2002-10-23 Paul Eggert <eggert@twinsun.com>
17452
17453 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
17454 Suggested by Art Haas.
17455
17456 2002-10-22 Paul Eggert <eggert@twinsun.com>
17457
17458 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
17459 decl; not needed any more.
17460 * src/main.c (main): Use return to exit, undoing yesterday's change.
17461 The last OS that we could find where this wouldn't work is
17462 SunOS 3.5, and that's too old to worry about now.
17463
17464 * data/glr.c (struct yyltype): Define members even when not
17465 doing locations. This is more consistent with yacc.c, and it
17466 works around the following bug reports:
17467 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
17468 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
17469
17470 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
17471 @acronym consistently. Standardize on "Yacc" instead of "YACC",
17472 "Algol" instead of "ALGOL". Give a bit more history about BNF.
17473
17474 2002-10-22 Akim Demaille <akim@epita.fr>
17475
17476 * data/README: New.
17477
17478 2002-10-21 Paul Eggert <eggert@twinsun.com>
17479
17480 Be consistent about 'bool'; the old code used an enum in one
17481 module and an int in another, and this violates the C standard.
17482 * m4/stdbool.m4: New file, from coreutils 4.5.3.
17483 * configure.ac (AC_HEADER_STDBOOL): Add.
17484 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
17485 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
17486 * src/symtab.c (hash_compare_symbol_t): Likewise.
17487 * src/system.h (bool, false, true): Use a definition consistent
17488 with ../lib/hash.c. All uses changed.
17489
17490 * src/complain.c (warning_issued): Renamed from warn_message_count,
17491 so that we needn't worry about integer overflow (!).
17492 Now of type bool. All uses changed.
17493 (complaint_issued): Renamed from complain_message_count; likewise.
17494
17495 * src/main.c (main): Use exit to exit with failure.
17496
17497 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
17498 rather than 1 and 0.
17499 * src/main.c (main): Likewise.
17500 * src/getargs.c (getargs): Likewise.
17501 * src/reader.c (reader): Likewise.
17502
17503 * src/getarg.c (getargs): Remove duplicate code for
17504 "Try `bison --help'".
17505
17506 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
17507 What was that "2" for?
17508
17509 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
17510 * src/getargs.c (usage): Likewise.
17511
17512 * src/getargs.c (getargs): When there are too few operands, report
17513 the last one. When there are too many, report the first extra
17514 one. This is how diffutils does it.
17515
17516 2002-10-20 Paul Eggert <eggert@twinsun.com>
17517
17518 Remove K&R vestiges.
17519 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
17520 * src/complain.c (VA_START): Remove. Assume prototypes.
17521 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
17522 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
17523 fatal): Assume prototypes.
17524 * src/complain.h: Assume prototypes.
17525 * src/system.h (PARAMS): Remove.
17526 Include <limits.h> unconditionally, since it's guaranteeed even
17527 for a freestanding C89 compiler.
17528 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
17529 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
17530
17531 2002-10-20 Akim Demaille <akim@epita.fr>
17532
17533 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
17534 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
17535 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
17536 (yyresolveStates, yyresolveAction, yyresolveStack)
17537 (yyprocessOneStack): Use them.
17538 (yy_reduce_print): New.
17539 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
17540
17541 2002-10-20 Akim Demaille <akim@epita.fr>
17542
17543 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
17544 arguments and output `void'.
17545 (b4_c_function): Rename as...
17546 (b4_c_function_def): this.
17547 (b4_c_function_decl, b4_c_ansi_function_def)
17548 (b4_c_ansi_function_decl): New.
17549 Change the interpretation of the arguments: before `int, foo', now
17550 `int foo, foo'.
17551 * data/yacc.c (yyparse): Prototype and define thanks to these.
17552 Adjust b4_c_function_def uses.
17553 * data/glr.c (yyparse): Likewise, but ANSI only.
17554
17555 2002-10-20 Akim Demaille <akim@epita.fr>
17556
17557 * src/output.c (prepare): Move the definition of `tokens_number',
17558 `nterms_number', `undef_token_number', `user_token_number_max'
17559 to...
17560 (prepare_tokens): Here.
17561 (prepare_tokens): Rename as...
17562 (prepare_symbols): this.
17563 (prepare): Move the definition of `rules_number' to...
17564 (prepare_rules): here.
17565 (prepare): Move the definition of `last', `final_state_number',
17566 `states_number' to...
17567 (prepare_states): here.
17568 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
17569
17570 2002-10-20 Akim Demaille <akim@epita.fr>
17571
17572 * src/tables.h, src/tables.c, src/output.c: Comment changes.
17573
17574 2002-10-20 Akim Demaille <akim@epita.fr>
17575
17576 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
17577 * data/c.m4: here.
17578
17579 2002-10-20 Akim Demaille <akim@epita.fr>
17580
17581 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
17582 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
17583 `pair'.
17584 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
17585 `name' to...
17586 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
17587 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
17588 These.
17589
17590 2002-10-19 Paul Eggert <eggert@twinsun.com>
17591
17592 Do not create a temporary file, as that involves security and
17593 cleanup headaches. Instead, use a pair of pipes.
17594 Derived from a suggestion by Florian Krohm.
17595 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
17596 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
17597 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
17598 (BISON_PREREQ_SUBPIPE): Add.
17599 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
17600 Add subpipe.h, subpipe.c.
17601 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
17602 * po/POTFILES.in: Add lib/subpipe.c.
17603 * src/output.c: Include "subpipe.h".
17604 (m4_invoke): Remove decl.
17605 (scan_skel): New decl.
17606 (output_skeleton): Use pipe rather than temporary file for m4 input.
17607 Check that m4sugar.m4 is readable, to avoid deadlock.
17608 Check for pipe I/O error.
17609 * src/scan-skel.l (readpipe): Remove decl.
17610 (scan_skel): New function, to be used in place of m4_invoke.
17611 Read from stream rather than file.
17612
17613 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
17614 float, as this generates a warning on Solaris 8 + GCC 3.2 with
17615 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
17616 this generates a more-accurate value anyway.
17617
17618 * lib/timevar.c (timervar_accumulate): Rename locals to
17619 avoid confusion with similarly-named more-global.
17620 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
17621
17622 * src/output.c (prepare): Use xstrdup to convert char const *
17623 to char *, to avoid GCC warning.
17624
17625 2002-10-19 Akim Demaille <akim@epita.fr>
17626
17627 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
17628 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
17629 Use them to have `calc.y' ready for %pure-parser.
17630 * data/yacc.c (YYLEX): Pass a yylex return type to
17631 b4_c_function_call.
17632
17633 2002-10-19 Akim Demaille <akim@epita.fr>
17634
17635 Prototype support of %lex-param and %parse-param.
17636
17637 * src/parse-gram.y: Add the definition of the %lex-param and
17638 %parse-param tokens, plus their rules.
17639 Drop the `_' version of %glr-parser.
17640 Add the "," token.
17641 * src/scan-gram.l (INITIAL): Scan them.
17642 * src/muscle_tab.c: Comment changes.
17643 (muscle_insert, muscle_find): Rename `pair' as `probe'.
17644 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
17645 (muscle_entry_s): The `value' member is no longer const.
17646 Adjust all dependencies.
17647 * src/muscle_tab.c (muscle_init): Adjust: use
17648 MUSCLE_INSERT_STRING.
17649 Initialize the obstack earlier.
17650 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
17651 (muscle_pair_list_grow): New.
17652 * data/c.m4 (b4_c_function_call, b4_c_args): New.
17653 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
17654 * tests/calc.at: Use %locations, not --locations.
17655 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
17656
17657 2002-10-19 Akim Demaille <akim@epita.fr>
17658
17659 * src/getargs.c (usage): Take status as argument and exit
17660 accordingly.
17661 Report the traditional `Try ... --help' message when status != 0.
17662 (usage, version): Don't take a FILE * as arg, it is pointless.
17663 (getargs): When there is an incorrect number of arguments, make it
17664 an error, and report it GNUlically thanks to `usage ()'.
17665
17666 2002-10-18 Paul Eggert <eggert@twinsun.com>
17667
17668 * data/glr.c (yyreportParseError): Don't assume that sprintf
17669 yields the length of the printed string, as this is not true
17670 on SunOS 4.1.4. Reported by Peter Klein.
17671
17672 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
17673 * tests/conflicts.at (%nonassoc and eof): Likewise.
17674 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
17675
17676 2002-10-17 Akim Demaille <akim@epita.fr>
17677
17678 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
17679 * src/getargs.c (trace_types, trace_args): Adjust.
17680 * src/reader.c (grammar_current_rule_prec_set)
17681 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
17682 Standardize error messages.
17683 And s/@prec/%prec/!
17684 (reader): Use trace_flag to enable scanner/parser debugging,
17685 instead of an adhoc scheme.
17686 * src/scan-gram.l: Remove trailing debugging code.
17687
17688 2002-10-16 Paul Eggert <eggert@twinsun.com>
17689
17690 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
17691 MUSCLE_TAB_H.
17692
17693 * NEWS: Officially drop support for building Bison with K&R C,
17694 since it didn't work anyway and it's not worth worrying about.
17695 * Makefile.maint (wget_files): Remove ansi2knr.c.
17696 (ansi2knr.c-url_prefix): Remove.
17697 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
17698 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17699 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17700
17701 2002-10-15 Paul Eggert <eggert@twinsun.com>
17702
17703 Stop using the "enum_" trick for K&R-style function definitions;
17704 it confused me, and I was the author! Instead, assume that people
17705 who want to use K&R C compilers (when using these modules in GCC,
17706 perhaps?) will run ansi2knr.
17707
17708 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
17709 All uses of "enum_" changed to "enum ".
17710 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
17711 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
17712
17713 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
17714 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
17715 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
17716 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
17717 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
17718 abitset_not, abitset_ones, abitset_or, abitset_or_and,
17719 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
17720 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
17721 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
17722 Use function prototypes; this removes the need for declaring
17723 static functions simply to provide their prototypes.
17724 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
17725 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
17726 bitset_count_, bitset_create, bitset_dump, bitset_first,
17727 bitset_free, bitset_init, bitset_last, bitset_next,
17728 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
17729 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
17730 bitset_print, bitset_release_memory, bitset_toggle_,
17731 bitset_type_choose, bitset_type_get, bitset_type_name_get,
17732 debug_bitset): Likewise.
17733 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
17734 * lib/bitset_stats.c (bitset_log_histogram_print,
17735 bitset_percent_histogram_print, bitset_stats_and,
17736 bitset_stats_and_cmp, bitset_stats_and_or,
17737 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
17738 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
17739 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
17740 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
17741 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
17742 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
17743 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
17744 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
17745 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
17746 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
17747 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
17748 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
17749 bitset_stats_zero): Likewise.
17750 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
17751 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
17752 bitsetv_dump, debug_bitsetv): Likewise.
17753 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
17754 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
17755 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
17756 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
17757 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
17758 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
17759 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
17760 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
17761 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
17762 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
17763 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
17764 Likewise.
17765 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
17766 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
17767 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
17768 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
17769 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
17770 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
17771 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
17772 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
17773 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
17774 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
17775 lbitset_xor_cmp, lbitset_zero): Likewise.
17776
17777 2002-10-14 Akim Demaille <akim@epita.fr>
17778
17779 Version 1.75.
17780
17781 2002-10-14 Akim Demaille <akim@epita.fr>
17782
17783 * tests/Makefile.am (maintainer-check-posix): New.
17784
17785 2002-10-14 Akim Demaille <akim@epita.fr>
17786
17787 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
17788 member.
17789
17790 2002-10-14 Akim Demaille <akim@epita.fr>
17791
17792 * src/tables.c (table_ninf_remap): base -> tab.
17793 Reported by Matt Rosing.
17794
17795 2002-10-14 Paul Eggert <eggert@twinsun.com>
17796
17797 * tests/action.at, tests/calc.at, tests/conflicts.at,
17798 tests/cxx-type.at, tests/headers.at, tests/input.at,
17799 tests/regression.at, tests/synclines.at, tests/torture.at:
17800 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
17801 so that the tests still work even if POSIXLY_CORRECT is set.
17802 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
17803
17804 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
17805 for portability to K&R hosts. Fix typo: signed char is guaranteed
17806 only to 127, not to 128.
17807 * data/glr.c (yysigned_char): New type.
17808 * data/yacc.c (yysigned_char): Likewise.
17809 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
17810
17811 2002-10-13 Paul Eggert <eggert@twinsun.com>
17812
17813 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
17814 true due to limited range of data type" warning from GCC.
17815
17816 * data/c.m4 (b4_token_defines): Protect against double-inclusion
17817 by wrapping enum yytokentype's definition inside #ifndef
17818 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
17819
17820 2002-10-13 Akim Demaille <akim@epita.fr>
17821
17822 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
17823 Un yy- yyrhs to avoid the name clash with the global YYRHS.
17824
17825 2002-10-13 Akim Demaille <akim@epita.fr>
17826
17827 * Makefile.maint: Update from Autoconf 2.54.
17828 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
17829
17830 2002-10-13 Akim Demaille <akim@epita.fr>
17831
17832 * src/print.c (print_state): Separate the list of solved conflicts
17833 from the other items.
17834 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
17835
17836 2002-10-13 Akim Demaille <akim@epita.fr>
17837
17838 Let nondeterministic skeletons be usable with deterministic
17839 tables.
17840
17841 With the patch, GAWK compiled by GCC without -O2 passes its test
17842 suite using a GLR parser driven by LALR tables. It fails with -O2
17843 because `struct stat' gives two different answers on my machine:
17844 88 (definition of an auto var) and later 96 (memset on this var).
17845 Hence the stack is badly corrumpted. The headers inclusion is to
17846 blame: if I move the awk.h inclusion before GLR's system header
17847 inclusion, the two struct stat have the same size.
17848
17849 * src/tables.c (pack_table): Always create conflict_table.
17850 (token_actions): Always create conflict_list.
17851 * data/glr.c (YYFLAG): Remove, unused.
17852
17853 2002-10-13 Akim Demaille <akim@epita.fr>
17854
17855 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
17856 (O0FLAGS): New.
17857 (VALGRIND, GXX): New.
17858 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
17859 * tests/bison.in: Run $PREBISON a pre-command.
17860 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
17861 (maintainer-check-g++): New.
17862 * Makefile.am (maintainer-check): New.
17863
17864 2002-10-13 Akim Demaille <akim@epita.fr>
17865
17866 * data/glr.c: Formatting changes.
17867 Tweak some trace messages to match yacc.c's.
17868
17869 2002-10-13 Akim Demaille <akim@epita.fr>
17870
17871 GLR parsers sometimes raise parse errors instead of performing the
17872 default reduction.
17873 Reported by Charles-Henry de Boysson.
17874
17875 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
17876 check the length of the traces when %glr.
17877 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
17878 GLR's traces.
17879 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
17880 Test GLR parsers.
17881 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
17882 (yyltype): Remove the yy prefix from the member names.
17883 (yytable): Complete its comment.
17884 (yygetLRActions): Map error action number from YYTABLE from
17885 YYTABLE_NINF to 0.
17886 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
17887 (which was a bug: it should have been YYTABEL_NINF, and yet it was
17888 not satisfying as we could compare an YYACTION computed from
17889 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
17890 only value for error actions.
17891 (yyreportParseError): In verbose parse error messages, don't issue
17892 `error' in the list of expected tokens.
17893 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
17894 next action to perform to match glr.c's decoding.
17895 (yytable): Complete its comment.
17896
17897 2002-10-13 Paul Eggert <eggert@twinsun.com>
17898
17899 Fix problem reported by Henrik Grubbstroem in
17900 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
17901 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
17902 because the Bison parser reads the second action before reducing
17903 the first one.
17904 * src/scan-gram.l (rule_length): New static var.
17905 Use it to keep track of the rule length in the scanner, since
17906 we can't expect the parser to be in lock-step sync with the scanner.
17907 (handle_action_dollar, handle_action_at): Use this var.
17908 * tests/actions.at (Exotic Dollars): Test for the problem.
17909
17910 2002-10-12 Paul Eggert <eggert@twinsun.com>
17911
17912 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
17913 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
17914 Include <sys/time.h> when checking for clock_t and struct tms.
17915 Use same include order as source.
17916 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
17917 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
17918
17919 * lib/timevar.c: Update copyright date and clarify comments.
17920 (get_time) [IN_GCC]: Keep the GCC version for reference.
17921
17922 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
17923 GCC version as of today, then merge Bison's changes.
17924 Change "GCC" to "Bison" in copyright notice. timevar.def's
17925 author is Akim, so change that too.
17926
17927 * src/reader.c (grammar_current_rule_check):
17928 Don't worry about the default action if $$ is untyped.
17929 Prevents bogus warnings reported by Jim Gifford in
17930 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
17931
17932 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
17933 * data/glr.c, data/lalr1.cc, data/yacc.c:
17934 Output token definitions before the first part of user declarations.
17935 Fixes compatibility problem reported by Jim Gifford for kbd in
17936 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
17937
17938 2002-10-11 Paul Eggert <eggert@twinsun.com>
17939
17940 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
17941 (yyparse): here. This undoes some of the 2002-07-25 change.
17942 Compatibility problem reported by Ralf S. Engelschall with
17943 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
17944
17945 2002-10-11 Akim Demaille <akim@epita.fr>
17946
17947 * tests/regression.at Characters Escapes): New.
17948 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
17949 characters.
17950 Reported by Jan Nieuwenhuizen.
17951
17952 2002-10-11 Akim Demaille <akim@epita.fr>
17953
17954 * po/id.po: New.
17955
17956 2002-10-10 Paul Eggert <eggert@twinsun.com>
17957
17958 Portability fixes for bitsets; this also avoids several GCC
17959 warnings.
17960
17961 * lib/abitset.c: Include <stddef.h>, for offsetof.
17962 * lib/lbitset.c: Likewise.
17963
17964 * lib/abitset.c (abitset_bytes): Return a size that is aligned
17965 properly for vectors of objects. Do not assume that adding a
17966 header size to a multiple of a word size yields a value that is
17967 properly aligned for the whole union.
17968 * lib/bitsetv.c (bitsetv_alloc): Likewise.
17969
17970 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
17971 unique names for structures.
17972 * lib/ebitset.c (ebitset_bytes): Likewise.
17973 * lib/lbitset.c (lbitset_bytes): Likewise.
17974
17975 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
17976 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
17977 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
17978 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
17979 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
17980 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
17981 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
17982 to improve the type-checking that GCC can do.
17983 * lib/bitset.c (bitset_op4_cmp): Likewise.
17984 * lib/bitset_stats.c (bitset_stats_count,
17985 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
17986 bitset_stats_copy, bitset_stats_disjoint_p,
17987 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
17988 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
17989 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
17990 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
17991 bitset_stats_and_or_cmp, bitset_stats_andn_or,
17992 bitset_stats_andn_or_cmp, bitset_stats_or_and,
17993 bitset_stats_or_and_cmp): Likewise.
17994 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
17995 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
17996 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
17997 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
17998
17999 * lib/abitset.h: Include bitset.h, not bbitset.h.
18000 * lib/ebitset.h: Likewise.
18001 * lib/lbitset.h: Likewise.
18002
18003 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
18004 All instances of parameters of type enum bitset_opts are now of
18005 type enum_bitset_opts, to conform to the C Standard, and similarly
18006 for enum_bitset_type.
18007 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
18008 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
18009
18010 Do not use "struct bitset_struct" to mean different things in
18011 different modules. Not only is this confusing, it violates
18012 the C Standard, which requires that structure types in different
18013 modules must be compatible if one is to be passed to the other.
18014 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
18015 All instances of "struct bitset_struct *" replaced with "bitset".
18016 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
18017 (union bitset_union, struct abitset_struct, struct ebitset_struct,
18018 struct lbitset_struct, struct bitset_stats_struct): New types.
18019 All uses of struct bitset_struct changed to union bitset_union,
18020 etc.
18021 * lib/abitset.c (struct abitset_struct, abitset,
18022 struct bitset_struct): Remove.
18023 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
18024 struct bitset_struct): Remove.
18025 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
18026 bitset_struct): Remove.
18027 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
18028 Likewise.
18029
18030 Do not call a function of type T using a call that assumes the
18031 function is of a different type U. Standard C requires that a
18032 function must be called with a type that is compatible with its
18033 definition.
18034 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
18035 New decls.
18036 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
18037 New functions.
18038 * lib/ebitset.c (PFV): Remove.
18039 * lib/lbitset.c (PFV): Likewise.
18040 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
18041 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
18042 decls.
18043 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
18044 (ebitset_vtable): Use them.
18045 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
18046 lbitset_xor): New functions.
18047 (lbitset_vtable): Use them.
18048
18049 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
18050 Declare.
18051
18052 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
18053 GCC warning.
18054 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
18055 Use offsetof, for simplicity.
18056
18057 2002-10-06 Paul Eggert <eggert@twinsun.com>
18058
18059 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
18060 the same width as int. This reapplies a hunk of the 2002-08-12 patch
18061 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
18062 which was inadvertently undone by the 2002-09-30 patch.
18063 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
18064 the same width as int.
18065
18066 2002-10-04 Paul Eggert <eggert@twinsun.com>
18067
18068 Version 1.50.
18069
18070 * configure.ac (AC_INIT), NEWS: Increment version number.
18071
18072 * doc/bison.texinfo: Minor spelling, grammar, and white space
18073 fixes.
18074 (Symbols): Mention that any negative value returned from yylex
18075 signifies end-of-input. Warn about negative chars. Mention
18076 the portable Standard C character set.
18077
18078 The GNU coding standard says CFLAGS and YFLAGS are reserved
18079 for the installer to set.
18080 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
18081 * src/Makefile.am (AM_CFLAGS): Likewise.
18082 (AM_YFLAGS): Renamed from YFLAGS.
18083
18084 Fix some MAX and MIN problems.
18085 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
18086 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
18087 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
18088 * src/reader.c (reader): Use it.
18089
18090 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
18091 POSIX 1003.1-2001 has removed fgrep.
18092
18093 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
18094
18095 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
18096 interpreted as signed.
18097 * lib/ebitset.c (ebitset_list): Fix bug.
18098
18099 2002-10-01 Paul Eggert <eggert@twinsun.com>
18100
18101 More fixes for 64-bit hosts and large bitsets.
18102
18103 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
18104 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
18105 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
18106 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
18107 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
18108 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
18109 bitset_count_): Likewise.
18110 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
18111 bitset_first, bitset_last): Likewise.
18112 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
18113 bitset_stats_list_reverse, bitset_stats_size,
18114 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
18115 Likewise.
18116 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18117 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
18118 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
18119 bitsetv_reflexive_transitive_closure): Likewise.
18120 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
18121 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
18122 Likewise.
18123 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
18124 Likewise.
18125
18126 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
18127 Use size_t, not unsigned int, to count bytes.
18128 * lib/abitset.h (abitset_bytes): Likewise.
18129 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
18130 Likewise.
18131 * lib/bitset.h (bitset_bytes): Likewise.
18132 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
18133 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
18134 * lib/bitsetv.c (bitsetv_alloc): Likewise.
18135 * lib/ebitset.c (ebitset_bytes): Likewise.
18136 * lib/ebitset.h (ebitset_bytes): Likewise.
18137 * lib/lbitset.c (lbitset_bytes): Likewise.
18138 * lib/lbitset.h (lbitset_bytes): Likewise.
18139
18140 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
18141 abitset_subset_p, abitset_disjoint_p, abitset_and,
18142 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
18143 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
18144 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
18145 abitset_or_and, abitset_or_and_cmp):
18146 Use bitset_windex instead of unsigned int.
18147 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18148 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
18149 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
18150 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
18151 Likewise.
18152 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
18153
18154 * lib/bitset.c (bitset_print):
18155 Use proper printf formats for widths of integer types.
18156 * lib/bitset_stats.c (bitset_percent_histogram_print,
18157 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
18158 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
18159 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
18160 * lib/lbitset.c (lbitset_bytes): Likewise.
18161
18162 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
18163 BITSET_SIZE_MAX): New macros.
18164 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
18165 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
18166 to BITSET_WINDEX_MAX.
18167
18168 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
18169 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
18170 since we now return the bitset_bindex type (not int).
18171
18172 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
18173 when computing sizes.
18174 * lib/ebitset.c (ebitset_elts_grow): Likewise.
18175
18176 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
18177 and avoid cast to unsigned.
18178
18179 2002-09-30 Akim Demaille <akim@epita.fr>
18180
18181 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
18182 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
18183 Updates from Michael Hayes.
18184
18185 2002-09-30 Art Haas <ahaas@neosoft.com>
18186
18187 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
18188 invocations.
18189 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
18190 defined.
18191
18192 2002-09-27 Akim Demaille <akim@epita.fr>
18193
18194 Version 1.49c.
18195
18196 2002-09-27 Akim Demaille <akim@epita.fr>
18197
18198 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
18199 (Because of AC_LIBSOURCE).
18200
18201 2002-09-27 Akim Demaille <akim@epita.fr>
18202
18203 Playing with Autoscan.
18204
18205 * configure.ac: Remove the old LIBOBJ tweaks.
18206 (AC_REPLACE_FUNCS): Add strrchr and strtol.
18207 * lib/strrchr.c: New.
18208 * lib/strtol.c: New, from the Coreutils 4.5.1.
18209
18210 2002-09-27 Akim Demaille <akim@epita.fr>
18211
18212 Playing with Autoscan.
18213
18214 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
18215 * lib/Makefile.am (libbison_a_SOURCES): No longer include
18216 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
18217 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
18218 Coreutils 4.5.1.
18219
18220 2002-09-24 Akim Demaille <akim@epita.fr>
18221
18222 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
18223 (Frequently Asked Questions, Parser Stack Overflow): New.
18224
18225 2002-09-13 Akim Demaille <akim@epita.fr>
18226
18227 Playing with autoscan.
18228
18229 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
18230 * src/files.c (skeleton_find): Remove, unused.
18231 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
18232 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
18233
18234 2002-09-13 Akim Demaille <akim@epita.fr>
18235
18236 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
18237 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
18238
18239 2002-09-13 Akim Demaille <akim@epita.fr>
18240
18241 * configure.ac: Require 2.54.
18242 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
18243 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
18244 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
18245 Remove, provided by Autoconf macros.
18246
18247 2002-09-12 Akim Demaille <akim@epita.fr>
18248
18249 * m4/prereq.m4: Update, from Coreutils 4.5.1.
18250
18251 2002-09-12 Akim Demaille <akim@epita.fr>
18252
18253 * m4/prereq.m4: Update, from Fileutils 4.1.5.
18254 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
18255 Reported by Martin Mokrejs.
18256
18257 2002-09-10 Akim Demaille <akim@epita.fr>
18258
18259 * src/parse-gram.y: Associate a human readable string to each
18260 token type.
18261 * tests/regression.at (Invalid inputs): Adjust.
18262
18263 2002-09-10 Gary V. Vaughan <gary@gnu.org>
18264
18265 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
18266 with an Autoconf-2.5x style configure.ac.
18267
18268 2002-09-06 Paul Eggert <eggert@twinsun.com>
18269
18270 * doc/bison.texinfo (Conditions): Make explicit that the GPL
18271 exception applies only to yacc.c. This is a modification of a
18272 patch originally suggested by Akim Demaille.
18273
18274 2002-09-06 Akim Demaille <akim@epita.fr>
18275
18276 * data/c.m4 (b4_copyright): Move the GPL exception comment from
18277 here to...
18278 * data/yacc.c: here.
18279
18280 * data/lalr1.cc (struct yyltype): Don't define it, since we use
18281 LocationType.
18282 (b4_ltype): Default to yy::Location from location.hh.
18283
18284 2002-09-04 Jim Meyering <jim@meyering.net>
18285
18286 * data/yacc.c: Guard the declaration of yytoknum also with
18287 `#ifdef YYPRINT', so it is declared only when used.
18288
18289 2002-09-04 Akim Demaille <akim@epita.fr>
18290
18291 * configure.in: Rename as...
18292 * configure.ac: this.
18293 Bump to 1.49c.
18294
18295 2002-09-04 Akim Demaille <akim@epita.fr>
18296
18297 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
18298 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
18299 translate maintainer only messages.
18300
18301 2002-08-12 Paul Eggert <eggert@twinsun.com>
18302
18303 Version 1.49b.
18304
18305 * Makefile.am (SUBDIRS): Remove intl.
18306 (DISTCLEANFILES): Remove.
18307 * NEWS: Mention that GNU M4 is now required. Clarify what is
18308 meant by "larger grammars". Mention the pt_BR translation.
18309 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
18310 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
18311 Bump version from 0.11.2 to 0.11.5.
18312 (BISON_PREREQ_STAGE): Remove.
18313 (AM_GNU_GETTEXT): Use external gettext.
18314 (AC_OUTPUT): Remove intl/Makefile.
18315
18316 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
18317
18318 * data/glr.c: Include string.h, for strlen.
18319 (yyreportParseError): Use size_t for yysize.
18320 (yy_yypstack): No longer nested inside yypstates, as nested
18321 functions are not portable. Do not assume size_t is the
18322 same width as int.
18323 (yypstates): Do not assume that ptrdiff_t is the same width
18324 as int, and similarly for yyposn and YYINDEX.
18325
18326 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
18327
18328 * lib/Makefile.am (INCLUDES): Do not include from the intl
18329 directory, which has been removed.
18330 * src/Makefile.am (INCLUDES): Likewise.
18331
18332 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
18333 (bitsets_sources, additional_bitsets_sources, timevars_sources):
18334 New vars.
18335
18336 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
18337 * tests/Makefile.am (EXTRA_DIST): Likewise.
18338
18339 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
18340 Do not assume that bitset_windex is the same width as unsigned.
18341
18342 * lib/abitset.c (abitset_unused_clear): Do not assume that
18343 bitset_word is the same width as int.
18344 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
18345 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
18346 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
18347 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
18348 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
18349
18350 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
18351 portability to one's complement hosts!).
18352 * lib/ebitset.c (ebitset_op1): Likewise.
18353 * lib/lbitset.c (lbitset_op1): Likewise.
18354
18355 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
18356 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
18357 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
18358 Sync with fileutils.
18359 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
18360 lib/gettext.h: Sync with diffutils.
18361
18362 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
18363 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
18364
18365 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
18366 PROTOTYPES to check for prototypes, and "defined __STDC__" to
18367 check for void *.
18368
18369 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
18370 size_t; the old version tried to do this but casted improperly.
18371 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
18372 (bitset_test): Now returns int, not unsigned long.
18373
18374 * lib/bitset_stats.c: Include "gettext.h".
18375 (_): New macro.
18376 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
18377 name locals "index", as it generates unnecessary warnings on some
18378 hosts that have an "index" function.
18379
18380 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
18381 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
18382 they need translation.
18383 * src/LR0.c (state_list_append, new_itemsets, get_state,
18384 append_states, generate_states): Likewise.
18385 * src/assoc.c (assoc_to_string): Likewise.
18386 * src/closure.c (print_closure, set_firsts, closure): Likewise.
18387 * src/gram.c (grammar_dump): Likewise.
18388 * src/injections.c (injections_compute): Likewise.
18389 * src/lalr.c (lookaheads_print): Likewise.
18390 * src/relation.c (relation_transpose): Likewise.
18391 * src/scan-gram.l: Likewise.
18392 * src/tables.c (table_grow, pack_vector): Likewise.
18393
18394 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
18395 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
18396 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
18397 * m4/mbstate_t.m4: Sync with fileutils.
18398 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
18399
18400 * po/LINGUAS: Add pt_BR.
18401 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
18402 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
18403 lib/timevar.c.
18404 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
18405 manual recommends.
18406 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
18407
18408 * src/complain.c (strerror_r): Remove decl; not needed.
18409 (strerror): Use same pattern as ../lib/error.c.
18410
18411 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
18412
18413 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
18414
18415 * src/main.c (main): Cast result of bindtextdomain and textdomain
18416 to void, to avoid a GCC warning when --disable-nls is in effect.
18417
18418 * src/scan-gram.l: Use strings rather than escapes when possible,
18419 to minimize the number of warnings from xgettext.
18420 (handle_action_dollar, handle_action_at): Don't use isdigit,
18421 as it mishandles negative chars and it may not work as expected
18422 outside the C locale.
18423
18424 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
18425 this is a GCC extension and is not portable to other compilers.
18426
18427 * src/system.h (alloca): Use same pattern as ../lib/error.c.
18428 Do not include <ctype.h>; no longer needed.
18429 Do not include <malloc.h>; no longer needed (and generates
18430 warnings on OpenBSD 3.0).
18431
18432 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
18433 it's not portable.
18434
18435 * tests/regression.at: Do not use 'cc -c input.c -o input';
18436 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
18437
18438 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
18439 exit status as failure, not just exit status 1. Sun C exits
18440 with status 2 sometimes.
18441
18442 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
18443 Use it for the two large tests.
18444
18445 2002-08-02 Akim Demaille <akim@epita.fr>
18446
18447 * src/conflicts.c (conflicts_output): Don't output rules never
18448 reduced here, since anyway that computation doesn't work.
18449 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
18450 (rule_useless_p, rule_never_reduced_p): New.
18451 (grammar_rules_partial_print): Use a filter instead of a range.
18452 Display the title only if needed.
18453 (grammar_rules_print): Adjust.
18454 (grammar_rules_never_reduced_report): New.
18455 * src/tables.c (action_row): Move the computation of rules never
18456 reduced to...
18457 (token_actions): here.
18458 * src/main.c (main): Make the parser before making the report, so
18459 that rules never reduced are computed.
18460 Call grammar_rules_never_reduced_report.
18461 * src/print.c (print_results): Report rules never reduced.
18462 * tests/conflicts.at, tests/reduce.at: Adjust.
18463
18464 2002-08-01 Akim Demaille <akim@epita.fr>
18465
18466 Instead of attaching lookaheads and duplicating the rules being
18467 reduced by a state, attach the lookaheads to the reductions.
18468
18469 * src/state.h (state_t): Remove the `lookaheads',
18470 `lookaheads_rule' member.
18471 (reductions_t): Add a `lookaheads' member.
18472 Use a regular array for the `rules'.
18473 * src/state.c (reductions_new): Initialize the lookaheads member
18474 to 0.
18475 (state_rule_lookaheads_print): Adjust.
18476 * src/state.h, src/state.c (state_reductions_find): New.
18477 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
18478 (count_rr_conflicts): Adjust.
18479 * src/lalr.c (LArule): Remove.
18480 (add_lookback_edge): Adjust.
18481 (state_lookaheads_count): New.
18482 (states_lookaheads_initialize): Merge into...
18483 (initialize_LA): this.
18484 (lalr_free): Adjust.
18485 * src/main.c (main): Don't free nullable and derives too early: it
18486 is used by --verbose.
18487 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
18488
18489 2002-08-01 Akim Demaille <akim@epita.fr>
18490
18491 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
18492 `rule_number_t**'.
18493 (set_derives, free_derives): Rename as...
18494 (derives_compute, derives_free): this.
18495 Adjust all dependencies.
18496 * src/nullable.c (set_nullable, free_nullable): Rename as...
18497 (nullable_compute, nullable_free): these.
18498 (rule_list_t): Store rule_t *, not rule_number_t.
18499 * src/state.c (state_rule_lookaheads_print): Directly compare rule
18500 pointers, instead of their numbers.
18501 * src/main.c (main): Call nullable_free, and derives_free earlier,
18502 as they were lo longer used.
18503
18504 2002-08-01 Akim Demaille <akim@epita.fr>
18505
18506 * lib/timevar.c (get_time): Include children time.
18507 * src/lalr.h (LA, LArule): Don't export them: used with the
18508 state_t.
18509 * src/lalr.c (LA, LArule): Static.
18510 * src/lalr.h, src/lalr.c (lalr_free): New.
18511 * src/main.c (main): Call it.
18512 * src/tables.c (pack_vector): Check whether loc is >= to the
18513 table_size, not >.
18514 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
18515 (tables_generate): do it, since that's also it which allocates
18516 them.
18517 Don't free LA and LArule, main does.
18518
18519 2002-07-31 Akim Demaille <akim@epita.fr>
18520
18521 Separate parser tables computation and output.
18522
18523 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
18524 (conflict_list, conflict_list_cnt, table, check, table_ninf)
18525 (yydefgoto, yydefact, high): Move to...
18526 * src/tables.h, src/tables.c: here.
18527 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18528 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18529 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
18530 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
18531 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
18532 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
18533 (action_row, save_row, token_actions, save_column, default_goto)
18534 (goto_actions, sort_actions, matching_state, pack_vector)
18535 (table_ninf_remap, pack_table, prepare_actions): Move to...
18536 * src/tables.c: here.
18537 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
18538 * src/output.c (token_actions, output_base, output_conflicts)
18539 (output_check): Merge into...
18540 (prepare_actions): this.
18541 (actions_output): Rename as...
18542 (user_actions_output): this.
18543 * src/main.c (main): Call tables_generate and tables_free.
18544
18545 2002-07-31 Akim Demaille <akim@epita.fr>
18546
18547 Steal GCC's --time-report support.
18548
18549 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
18550 stolen/adjusted from GCC.
18551 * m4/stage.m4: Remove time related checks.
18552 * m4/timevar.m4: New.
18553 * configure.in: Adjust.
18554 * src/system.h: Adjust to using timevar.h.
18555 * src/getargs.h, src/getargs.c: Support trace_time for
18556 --trace=time.
18557 * src/main.c (stage): Remove.
18558 (main): Replace `stage' invocations with timevar calls.
18559 * src/output.c: Insert pertinent timevar calls.
18560
18561 2002-07-31 Akim Demaille <akim@epita.fr>
18562
18563 Let --trace have arguments.
18564
18565 * src/getargs.h (enum trace_e): New.
18566 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
18567 (long_options, short_options): --trace/-T takes an optional
18568 argument.
18569 Change all the uses of trace_flag to reflect the new flags.
18570 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
18571
18572 Strengthen `stage' portability.
18573
18574 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
18575 * configure.in: Use it.
18576 Don't check for malloc.h and sys/times.h.
18577 * src/system.h: Include them when appropriate.
18578 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
18579 times and struct tms are available.
18580
18581 2002-07-30 Akim Demaille <akim@epita.fr>
18582
18583 In verbose parse error message, don't report `error' as an
18584 expected token.
18585 * tests/actions.at (Printers and Destructors): Adjust.
18586 * tests/calc.at (Calculator $1): Adjust.
18587 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
18588 error message, do not report the parser accepts the error token in
18589 that state.
18590
18591 2002-07-30 Akim Demaille <akim@epita.fr>
18592
18593 Normalize conflict related messages.
18594
18595 * src/complain.h, src/complain.c (warn, complain): New.
18596 * src/conflicts.c (conflicts_print): Use them.
18597 (conflict_report_yacc): New, extracted from...
18598 (conflicts_print): here.
18599 * tests/conflicts.at, tests/existing.at: Adjust.
18600
18601 2002-07-30 Akim Demaille <akim@epita.fr>
18602
18603 Report rules which are never reduced by the parser: those hidden
18604 by conflicts.
18605
18606 * src/LR0.c (save_reductions): Don't make the final state too
18607 different: save its reduction (accept) instead of having a state
18608 without any action (no shift or goto, no reduce).
18609 Note: the final state is now a ``regular'' state, i.e., the
18610 parsers now contain `reduce 0' as default reduction.
18611 Nevertheless, since they decide to `accept' when yystate =
18612 final_state, they still will not reduce rule 0.
18613 * src/print.c (print_actions, print_reduction): Adjust.
18614 * src/output.c (action_row): Track reduced rules.
18615 (token_actions): Report rules never reduced.
18616 * tests/conflicts.at, tests/regression.at: Adjust.
18617
18618 2002-07-30 Akim Demaille <akim@epita.fr>
18619
18620 `stage' was accidently included in a previous patch.
18621 Initiate its autoconfiscation.
18622
18623 * configure.in: Look for malloc.h and sys/times.h.
18624 * src/main.c (stage): Adjust.
18625 Report only when trace_flag.
18626
18627 2002-07-29 Akim Demaille <akim@epita.fr>
18628
18629 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
18630 state_number_t.
18631 (errs_t): symbol_t*, not symbol_number_t.
18632 (reductions_t): rule_t*, not rule_number_t.
18633 (FOR_EACH_SHIFT): New.
18634 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
18635 * src/print.c, src/print_graph.c: Adjust.
18636
18637 2002-07-29 Akim Demaille <akim@epita.fr>
18638
18639 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
18640
18641 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
18642 (endtoken, accept): these.
18643 * src/reader.c (reader): Set endtoken's default tag to "$end".
18644 Set undeftoken's tag to "$undefined" instead of "$undefined.".
18645 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
18646 Adjust.
18647
18648 2002-07-29 Akim Demaille <akim@epita.fr>
18649
18650 * src/reduce.c (reduce_grammar): When the language is empty,
18651 complain about the start symbol, not the axiom.
18652 Use its location.
18653 * tests/reduce.at (Empty Language): New.
18654
18655 2002-07-26 Akim Demaille <akim@epita.fr>
18656
18657 * src/reader.h, src/reader.c (gram_error): ... can't get
18658 yycontrol without making too strong assumptions on the parser
18659 itself.
18660 * src/output.c (prepare_tokens): Use the real 0th value of
18661 token_translations instead of `0'.
18662 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
18663 visible here.
18664 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
18665 for the time being: %locations ought to provide it to yyerror.
18666
18667 2002-07-25 Akim Demaille <akim@epita.fr>
18668
18669 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
18670 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
18671 * tests/regression.at (Web2c Actions): Adjust.
18672
18673 2002-07-25 Akim Demaille <akim@epita.fr>
18674
18675 Stop storing rules from 1 to nrules + 1.
18676
18677 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
18678 * src/nullable.c, src/output.c, src/print.c, src/reader.c
18679 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
18680 Iterate from 0 to nrules.
18681 Use rule_number_as_item_number and item_number_as_rule_number.
18682 Adjust to `derive' now containing possibly 0.
18683 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
18684 Handle the `- 1' part in rule numbers from/to item numbers.
18685 * src/conflicts.c (log_resolution): Fix the message which reversed
18686 shift and reduce.
18687 * src/output.c (action_row): Initialize default_rule to -1.
18688 (token_actions): Adjust.
18689 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
18690 expected output.
18691 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
18692
18693 2002-07-25 Akim Demaille <akim@epita.fr>
18694
18695 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
18696 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
18697 (b4_c_knr_arg_decl): New.
18698 * data/yacc.c: Use it to define yysymprint, yydestruct, and
18699 yyreport_parse_error.
18700
18701 2002-07-25 Akim Demaille <akim@epita.fr>
18702
18703 * data/yacc.c (yyreport_parse_error): New, extracted from...
18704 (yyparse): here.
18705 (yydestruct, yysymprint): Move above yyparse.
18706 Be K&R compliant.
18707
18708 2002-07-25 Akim Demaille <akim@epita.fr>
18709
18710 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
18711 replace...
18712 (b4_sint_type, b4_uint_type): these.
18713 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
18714 * tests/regression.at (Web2c Actions): Adjust.
18715
18716 2002-07-25 Akim Demaille <akim@epita.fr>
18717
18718 * src/gram.h (TIEM_NUMBER_MAX): New.
18719 (item_number_of_rule_number, rule_number_of_item_number): Rename
18720 as...
18721 (rule_number_as_item_number, item_number_as_rule_number): these.
18722 Adjust dependencies.
18723 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
18724 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
18725 (symbol_number_to_vector_number): New.
18726 (order): Of vector_number_t* type.
18727 (base_t, BASE_MAX, BASE_MIN): New.
18728 (froms, tos, width, pos, check): Of base_t type.
18729 (action_number_t, ACTION_MIN, ACTION_MAX): New.
18730 (actrow): Of action_number_t type.
18731 (conflrow): Of unsigned int type.
18732 (table_ninf, base_ninf): New.
18733 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
18734 (muscle_insert_int_table, muscle_insert_base_table)
18735 (muscle_insert_rule_number_table): New.
18736 (prepare_tokens): Output `toknum' as int_table.
18737 (action_row): Returns a rule_number_t.
18738 Use ACTION_MIN, not SHRT_MIN.
18739 (token_actions): yydefact is rule_number_t*.
18740 (table_ninf_remap): New.
18741 (pack_table): Use it for `base' and `table'.
18742 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
18743 replaced with...
18744 (YYPACT_NINF, YYTABLE_NINF): these.
18745 (yypact, yytable): Compute their types instead of hard-coded
18746 `short'.
18747 * tests/regression.at (Web2c Actions): Adjust.
18748
18749 2002-07-19 Akim Demaille <akim@epita.fr>
18750
18751 * src/scan-gram.l (id): Can start with an underscore.
18752
18753 2002-07-16 Akim Demaille <akim@epita.fr>
18754
18755 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
18756 Adjust all former `associativity' dependencies.
18757 * src/symtab.c (symbol_new): Default associativity is `undef', not
18758 `right'.
18759 (symbol_check_alias_consistence): Adjust.
18760
18761 2002-07-09 Akim Demaille <akim@epita.fr>
18762
18763 * doc/bison.texinfo: Properly set the ``header'' part.
18764 Use @dircategory ``GNU programming tools'' as per Texinfo's
18765 documentation.
18766 Use @copying.
18767
18768 2002-07-09 Akim Demaille <akim@epita.fr>
18769
18770 * lib/quotearg.h: Protect against multiple inclusions.
18771 * src/location.h (location_t): Add a `file' member.
18772 (LOCATION_RESET, LOCATION_PRINT): Adjust.
18773 * src/complain.c (warn_at, complain_at, fatal_at): Drop
18774 `error_one_per_line' support.
18775
18776 2002-07-09 Akim Demaille <akim@epita.fr>
18777
18778 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
18779 * src/reader.c (lineno): Remove.
18780 Adjust all dependencies.
18781 (get_merge_function): Take a location and use complain_at.
18782 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
18783 * tests/regression.at (Invalid inputs, Mixing %token styles):
18784 Adjust.
18785
18786 2002-07-09 Akim Demaille <akim@epita.fr>
18787
18788 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
18789 recovery rule, and forbid extensions when --yacc.
18790 (gram_error): Use complain_at.
18791 * src/reader.c (reader): Exit if there were parse errors.
18792
18793 2002-07-09 Akim Demaille <akim@epita.fr>
18794
18795 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
18796 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
18797 Reported by R Blake <blakers@mac.com>.
18798
18799 2002-07-09 Akim Demaille <akim@epita.fr>
18800
18801 * data/yacc.c: Output the copyright notive in the header.
18802
18803 2002-07-03 Akim Demaille <akim@epita.fr>
18804
18805 * src/output.c (froms, tos): Are state_number_t.
18806 (save_column): sp, sp1, and sp2 are state_number_t.
18807 (prepare): Rename `final' as `final_state_number', `nnts' as
18808 `nterms_number', `nrules' as `rules_number', `nstates' as
18809 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
18810 unused.
18811 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
18812 * data/lalr1.cc (nsym_): Remove, unused.
18813
18814 2002-07-03 Akim Demaille <akim@epita.fr>
18815
18816 * src/lalr.h, src/lalr.c (goto_number_t): New.
18817 * src/lalr.c (goto_list_t): New.
18818 Propagate them.
18819 * src/nullable.c (rule_list_t): New.
18820 Propagate.
18821 * src/types.h: Remove.
18822
18823 2002-07-03 Akim Demaille <akim@epita.fr>
18824
18825 * src/closure.c (print_fderives): Use rule_rhs_print.
18826 * src/derives.c (print_derives): Use rule_rhs_print.
18827 (rule_list_t): New, replaces `shorts'.
18828 (set_derives): Add comments.
18829 * tests/sets.at (Nullable, Firsts): Adjust.
18830
18831 2002-07-03 Akim Demaille <akim@epita.fr>
18832
18833 * src/output.c (prepare_actions): Free `tally' and `width'.
18834 (prepare_actions): Allocate and free `order'.
18835 * src/symtab.c (symbols_free): Free `symbols'.
18836 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
18837 * src/output.c (m4_invoke): Move to...
18838 * src/scan-skel.l: here.
18839 (<<EOF>>): Close yyout, and free its name.
18840
18841 2002-07-03 Akim Demaille <akim@epita.fr>
18842
18843 Fix some memory leaks, and fix a bug: state 0 was examined twice.
18844
18845 * src/LR0.c (new_state): Merge into...
18846 (state_list_append): this.
18847 (new_states): Merge into...
18848 (generate_states): here.
18849 (set_states): Don't ensure a proper `errs' state member here, do it...
18850 * src/conflicts.c (conflicts_solve): here.
18851 * src/state.h, src/state.c: Comment changes.
18852 (state_t): Rename member `shifts' as `transitions'.
18853 Adjust all dependencies.
18854 (errs_new): For consistency, also take the values as argument.
18855 (errs_dup): Remove.
18856 (state_errs_set): New.
18857 (state_reductions_set, state_transitions_set): Assert that no
18858 previous value was assigned.
18859 (state_free): New.
18860 (states_free): Use it.
18861 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
18862 temporary storage: use `errs' and `nerrs' as elsewhere.
18863 (set_conflicts): Allocate and free this `errs'.
18864
18865 2002-07-02 Akim Demaille <akim@epita.fr>
18866
18867 * lib/libiberty.h: New.
18868 * lib: Update the bitset implementation from upstream.
18869 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
18870 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
18871 * src/main.c: Adjust bitset stats calls.
18872
18873 2002-07-01 Paul Eggert <eggert@twinsun.com>
18874
18875 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
18876 char, so that negative chars don't collide with $.
18877
18878 2002-06-30 Akim Demaille <akim@epita.fr>
18879
18880 Have the GLR tests be `warning' checked, and fix the warnings.
18881
18882 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
18883 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
18884 (yyremoveDeletes): `yyi' and `yyj' are size_t.
18885 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
18886 (yyaddDeferredAction): static.
18887 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
18888 (yyreportParseError): yyprefix is const.
18889 yytokenp is used only when verbose.
18890 (yy__GNUC__): Replace with __GNUC__.
18891 (yypdumpstack): yyi is size_t.
18892 (yypreference): Un-yy local variables and arguments, to avoid
18893 clashes with `yyr1'. Anyway, we are not in the user name space.
18894 (yytname_size): be an int, as is compared with ints.
18895 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
18896 Use them.
18897 * tests/cxx-gram.at: Use quotation to protect $1.
18898 Use AT_COMPILE to enable warnings hunts.
18899 Prototype yylex and yyerror.
18900 `Use' argc.
18901 Include `string.h', not `strings.h'.
18902 Produce and prototype stmtMerge only when used.
18903 yylex takes a location.
18904
18905 2002-06-30 Akim Demaille <akim@epita.fr>
18906
18907 We spend a lot of time in quotearg, in particular when --verbose.
18908
18909 * src/symtab.c (symbol_get): Store a quoted version of the key.
18910 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
18911 Adjust all callers.
18912
18913 2002-06-30 Akim Demaille <akim@epita.fr>
18914
18915 * src/state.h (reductions_t): Rename member `nreds' as num.
18916 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
18917 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
18918
18919 2002-06-30 Akim Demaille <akim@epita.fr>
18920
18921 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
18922 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
18923 (shifts_to): Rename as...
18924 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
18925 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
18926 (TRANSITION_IS_DISABLED, transitions_to): these.
18927
18928 2002-06-30 Akim Demaille <akim@epita.fr>
18929
18930 * src/print.c (print_shifts, print_gotos): Merge into...
18931 (print_transitions): this.
18932 (print_transitions, print_errs, print_reductions): Align the
18933 lookaheads columns.
18934 (print_core, print_transitions, print_errs, print_state,
18935 print_grammar): Output empty lines separator before, not after.
18936 (state_default_rule_compute): Rename as...
18937 (state_default_rule): this.
18938 * tests/conflicts.at (Defaulted Conflicted Reduction),
18939 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
18940 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
18941
18942 2002-06-30 Akim Demaille <akim@epita.fr>
18943
18944 Display items as we display rules.
18945
18946 * src/gram.h, src/gram.c (rule_lhs_print): New.
18947 * src/gram.c (grammar_rules_partial_print): Use it.
18948 * src/print.c (print_core): Likewise.
18949 * tests/conflicts.at (Defaulted Conflicted Reduction),
18950 (Unresolved SR Conflicts): Adjust.
18951 (Unresolved SR Conflicts): Adjust and rename as...
18952 (Resolved SR Conflicts): this, as was meant.
18953 * tests/regression.at (Web2c Report): Adjust.
18954
18955 2002-06-30 Akim Demaille <akim@epita.fr>
18956
18957 * src/print.c (state_default_rule_compute): New, extracted from...
18958 (print_reductions): here.
18959 Pessimize, but clarify the code.
18960 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
18961
18962 2002-06-30 Akim Demaille <akim@epita.fr>
18963
18964 * src/output.c (action_row): Let default_rule be always a rule
18965 number.
18966
18967 2002-06-30 Akim Demaille <akim@epita.fr>
18968
18969 * src/closure.c (print_firsts, print_fderives, closure):
18970 Use BITSET_EXECUTE.
18971 * src/lalr.c (lookaheads_print): Likewise.
18972 * src/state.c (state_rule_lookaheads_print): Likewise.
18973 * src/print_graph.c (print_core): Likewise.
18974 * src/print.c (print_reductions): Likewise.
18975 * src/output.c (action_row): Likewise.
18976 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
18977
18978 2002-06-30 Akim Demaille <akim@epita.fr>
18979
18980 * src/print_graph.c: Use report_flag.
18981
18982 2002-06-30 Akim Demaille <akim@epita.fr>
18983
18984 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
18985 to...
18986 * src/relation.h, src/relation.c (traverse, relation_digraph)
18987 (relation_print, relation_transpose): New.
18988
18989 2002-06-30 Akim Demaille <akim@epita.fr>
18990
18991 * src/state.h, src/state.c (shifts_to): New.
18992 * src/lalr.c (build_relations): Use it.
18993
18994 2002-06-30 Akim Demaille <akim@epita.fr>
18995
18996 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
18997 (item_number_of_rule_number, rule_number_of_item_number): New.
18998 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
18999 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19000 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
19001 Propagate their use.
19002 Much remains to be done, in particular wrt `shorts' from types.h.
19003
19004 2002-06-30 Akim Demaille <akim@epita.fr>
19005
19006 * src/symtab.c (symbol_new): Initialize the `printer' member.
19007
19008 2002-06-30 Akim Demaille <akim@epita.fr>
19009
19010 * src/LR0.c (save_reductions): Remove, replaced by...
19011 * src/state.h, src/state.c (state_reductions_set): New.
19012 (reductions, errs): Rename as...
19013 (reductions_t, errs_t): these.
19014 Adjust all dependencies.
19015
19016 2002-06-30 Akim Demaille <akim@epita.fr>
19017
19018 * src/LR0.c (state_list_t, state_list_append): New.
19019 (first_state, last_state): Now symbol_list_t.
19020 (this_state): Remove.
19021 (new_itemsets, append_states, save_reductions): Take a state_t as
19022 argument.
19023 (set_states, generate_states): Adjust.
19024 (save_shifts): Remove, replaced by...
19025 * src/state.h, src/state.c (state_shifts_set): New.
19026 (shifts): Rename as...
19027 (shifts_t): this.
19028 Adjust all dependencies.
19029 * src/state.h (state_t): Remove the `next' member.
19030
19031 2002-06-30 Akim Demaille <akim@epita.fr>
19032
19033 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
19034 escaped in slot 0.
19035
19036 2002-06-30 Akim Demaille <akim@epita.fr>
19037
19038 Use hash.h for the state hash table.
19039
19040 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
19041 (allocate_storage): Use state_hash_new.
19042 (free_storage): Use state_hash_free.
19043 (new_state, get_state): Adjust.
19044 * src/lalr.h, src/lalr.c (states): Move to...
19045 * src/states.h (state_t): Remove the `link' member, no longer
19046 used.
19047 * src/states.h, src/states.c: here.
19048 (state_hash_new, state_hash_free, state_hash_lookup)
19049 (state_hash_insert, states_free): New.
19050 * src/states.c (state_table, state_compare, state_hash): New.
19051 * src/output.c (output_actions): Do not free states now, since we
19052 still need to know the final_state number in `prepare', called
19053 afterwards. Do it...
19054 * src/main.c (main): here: call states_free after `output'.
19055
19056 2002-06-30 Akim Demaille <akim@epita.fr>
19057
19058 * src/state.h, src/state.c (state_new): New, extracted from...
19059 * src/LR0.c (new_state): here.
19060 * src/state.h (STATE_ALLOC): Move to...
19061 * src/state.c: here.
19062 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
19063 * src/state.h, src/state.c: here.
19064
19065 2002-06-30 Akim Demaille <akim@epita.fr>
19066
19067 * src/reader.c (gensym): Rename as...
19068 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
19069 (getsym): Rename as...
19070 (symbol_get): this.
19071
19072 2002-06-30 Akim Demaille <akim@epita.fr>
19073
19074 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
19075 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
19076 * src/output.c, src/print.c, src/print_graph.c: Propagate.
19077 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
19078
19079 2002-06-30 Akim Demaille <akim@epita.fr>
19080
19081 Make the test suite pass with warnings checked.
19082
19083 * tests/actions.at (Printers and Destructors): Improve.
19084 Avoid unsigned vs. signed issues.
19085 * tests/calc.at: Don't exercise the scanner here, do it...
19086 * tests/input.at (Torturing the Scanner): here.
19087
19088 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19089
19090 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
19091 reorganize first lines parallel to yacc.c.
19092
19093 2002-06-28 Akim Demaille <akim@epita.fr>
19094
19095 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
19096 (b4_token_enum, b4_token_defines): New, factored from...
19097 * data/lalr1.cc, data/yacc.c, glr.c: here.
19098
19099 2002-06-28 Akim Demaille <akim@epita.fr>
19100
19101 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
19102 unused variables.
19103 * src/output.c (merger_output): static.
19104
19105 2002-06-28 Akim Demaille <akim@epita.fr>
19106
19107 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
19108 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
19109 pacify GCC.
19110 * src/output.c (save_row): Initialize all the variables to pacify GCC.
19111
19112 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19113
19114 Accumulated changelog for new GLR parsing features.
19115
19116 * src/conflicts.c (count_total_conflicts): Change name to
19117 conflicts_total_count.
19118 * src/conflicts.h: Ditto.
19119 * src/output.c (token_actions): Use the new name.
19120 (output_conflicts): Change conflp => conflict_list_heads, and
19121 confl => conflict_list for better readability.
19122 * data/glr.c: Use the new names.
19123 * NEWS: Add self to GLR announcement.
19124
19125 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
19126
19127 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
19128 Akim Demaille.
19129
19130 * data/bison.glr: Change name to glr.c
19131 * data/glr.c: Renamed from bison.glr.
19132 * data/Makefile.am: Add glr.c
19133
19134 * src/getargs.c:
19135
19136 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
19137 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
19138
19139 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19140
19141 * data/bison.glr: Be sure to restore the
19142 current #line when returning to the skeleton contents after having
19143 exposed the input file's #line.
19144
19145 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19146
19147 * data/bison.glr: Bring up to date with changes to bison.simple.
19148
19149 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19150
19151 * data/bison.glr: Correct definitions that use b4_prefix.
19152 Various reformatting.
19153 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
19154 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
19155 yytokenp argument; now part of stack.
19156 (yychar): Define to behave as documented.
19157 (yyclearin): Ditto.
19158
19159 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19160
19161 * src/reader.h: Add declaration for free_merger_functions.
19162
19163 * src/reader.c (merge_functions): New variable.
19164 (get_merge_function): New function.
19165 (free_merger_functions): New function.
19166 (readgram): Check for %prec that is not followed by a symbol.
19167 Handle %dprec and %merge declarations.
19168 (packgram): Initialize dprec and merger fields in rules array.
19169
19170 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
19171 conflict_list_cnt, conflict_list_free): New variables.
19172 (table_grow): Also grow conflict_table.
19173 (prepare_rules): Output dprec and merger tables.
19174 (conflict_row): New function.
19175 (action_row): Output conflict lists for GLR parser. Don't use
19176 default reduction in conflicted states for GLR parser so that there
19177 are spaces for the conflict lists.
19178 (save_row): Also save conflict information.
19179 (token_actions): Allocate conflict list.
19180 (merger_output): New function.
19181 (pack_vector): Pack conflict table, too.
19182 (output_conflicts): New function to output yyconflp and yyconfl.
19183 (output_check): Allocate conflict_tos.
19184 (output_actions): Output conflict tables, also.
19185 (output_skeleton): Output b4_mergers definition.
19186 (prepare): Output b4_max_rhs_length definition.
19187 Use 'bison.glr' as default skeleton for GLR parsers.
19188
19189 * src/gram.c (glr_parser): New flag.
19190 (grammar_free): Call free_merger_functions.
19191
19192 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
19193 all pairs of conflicting reductions, rather than just all tokens
19194 causing conflicts. Needed to size conflict tables.
19195 (conflicts_output): Modify call to count_rr_conflicts for new
19196 interface.
19197 (conflicts_print): Ditto.
19198 (count_total_conflicts): New function.
19199
19200 * src/reader.h (merger_list): New type.
19201 (merge_functions): New variable.
19202
19203 * src/lex.h (tok_dprec, tok_merge): New token types.
19204
19205 * src/gram.h (rule_s): Add dprec and merger fields.
19206 (glr_parser): New flag.
19207
19208 * src/conflicts.h (count_total_conflicts): New function.
19209
19210 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
19211
19212 * doc/bison.texinfo (Generalized LR Parsing): New section.
19213 (GLR Parsers): New section.
19214 (Language and Grammar): Mention GLR parsing.
19215 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
19216 Correct typo ("tge" -> "the").
19217
19218 * data/bison.glr: New skeleton for GLR parsing.
19219
19220 * tests/cxx-gram.at: New tests for GLR parsing.
19221
19222 * tests/testsuite.at: Include cxx-gram.at.
19223
19224 * tests/Makefile.am: Add cxx-gram.at.
19225
19226 * src/parse-gram.y:
19227
19228 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
19229
19230 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
19231
19232 2002-06-27 Akim Demaille <akim@epita.fr>
19233
19234 * src/options.h, src/options.c: Remove.
19235 * src/getargs.c (short_options, long_options): New.
19236
19237 2002-06-27 Akim Demaille <akim@epita.fr>
19238
19239 * data/bison.simple, data/bison.c++: Rename as...
19240 * data/yacc.c, data/lalr1.cc: these.
19241 * doc/bison.texinfo (Environment Variables): Remove.
19242
19243 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
19244
19245 * src/getargs.c (report_argmatch): Initialize strtok().
19246
19247 2002-06-20 Akim Demaille <akim@epita.fr>
19248
19249 * data/bison.simple (b4_symbol_actions): New, replaces...
19250 (b4_symbol_destructor, b4_symbol_printer): these.
19251 (yysymprint): Be sure to call YYPRINT only for tokens, and using
19252 user token numbers.
19253
19254 2002-06-20 Akim Demaille <akim@epita.fr>
19255
19256 * data/bison.simple (yydestructor): Rename as...
19257 (yydestruct): this.
19258
19259 2002-06-20 Akim Demaille <akim@epita.fr>
19260
19261 * src/symtab.h, src/symtab.c (symbol_type_set)
19262 (symbol_destructor_set, symbol_precedence_set): The location is
19263 the last argument.
19264 Adjust all callers.
19265
19266 2002-06-20 Akim Demaille <akim@epita.fr>
19267
19268 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
19269 internals.
19270 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
19271 Takes a location.
19272 * src/symtab.h, src/symtab.c (symbol_class_set)
19273 (symbol_user_token_number_set): Likewise.
19274 Adjust all callers.
19275 Promote complain_at.
19276 * tests/input.at (Type Clashes): Adjust.
19277
19278 2002-06-20 Akim Demaille <akim@epita.fr>
19279
19280 * data/bison.simple (YYLEX): Fix the declaration when
19281 %pure-parser.
19282
19283 2002-06-20 Akim Demaille <akim@epita.fr>
19284
19285 * data/bison.simple (yysymprint): Don't print the token number,
19286 just its name.
19287 * tests/actions.at (Destructors): Rename as...
19288 (Printers and Destructors): this.
19289 Also exercise %printer.
19290
19291 2002-06-20 Akim Demaille <akim@epita.fr>
19292
19293 * data/bison.simple (YYDSYMPRINT): New.
19294 Use it to remove many of the #if YYDEBUG/if (yydebug).
19295
19296 2002-06-20 Akim Demaille <akim@epita.fr>
19297
19298 * src/symtab.h, src/symtab.c (symbol_t): printer and
19299 printer_location are new members.
19300 (symbol_printer_set): New.
19301 * src/parse-gram.y (PERCENT_PRINTER): New token.
19302 Handle its associated rule.
19303 * src/scan-gram.l: Adjust.
19304 (handle_destructor_at, handle_destructor_dollar): Rename as...
19305 (handle_symbol_code_at, handle_symbol_code_dollar): these.
19306 * src/output.c (symbol_printers_output): New.
19307 (output_skeleton): Call it.
19308 * data/bison.simple (yysymprint): New. Cannot be named yyprint
19309 since there are already many grammar files with a user `yyprint'.
19310 Replace the calls to YYPRINT to calls to yysymprint.
19311 * tests/calc.at: Adjust.
19312 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
19313 taking advantage of parser very internal details (stack size!).
19314
19315 2002-06-20 Akim Demaille <akim@epita.fr>
19316
19317 * src/scan-gram.l: Complete the scanner with the missing patterns
19318 to pacify Flex.
19319 Use `quote' and `symbol_tag_get' where appropriate.
19320
19321 2002-06-19 Akim Demaille <akim@epita.fr>
19322
19323 * tests/actions.at (Destructors): Augment to test locations.
19324 * data/bison.simple (yydestructor): Pass it the current location
19325 if locations are enabled.
19326 Prototype only when __STDC__ or C++.
19327 Change the argument names to move into the yy name space: there is
19328 user code here.
19329
19330 2002-06-19 Akim Demaille <akim@epita.fr>
19331
19332 * data/bison.simple (b4_pure_if): New.
19333 Use it instead of #ifdef YYPURE.
19334
19335 2002-06-19 Akim Demaille <akim@epita.fr>
19336
19337 * data/bison.simple (b4_location_if): New.
19338 Use it instead of #ifdef YYLSP_NEEDED.
19339
19340 2002-06-19 Akim Demaille <akim@epita.fr>
19341
19342 Prepare @$ in %destructor, but currently don't bind it in the
19343 skeleton, as %location use is not cleaned up yet.
19344
19345 * src/scan-gram.l (handle_dollar, handle_destructor_at)
19346 (handle_action_at): New.
19347 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
19348 a braced_code_t and a location as additional arguments.
19349 (handle_destructor_dollar): Instead of requiring `b4_eval', just
19350 unquote one when outputting `b4_dollar_dollar'.
19351 Adjust callers.
19352 * data/bison.simple (b4_eval): Remove.
19353 (b4_symbol_destructor): Adjust.
19354 * tests/input.at (Invalid @n): Adjust.
19355
19356 2002-06-19 Zack Weinberg <zack@codesourcery.com>
19357
19358 * doc/bison.texinfo: Document ability to have multiple
19359 prologue sections.
19360
19361 2002-06-18 Akim Demaille <akim@epita.fr>
19362
19363 * src/files.c (compute_base_names): When computing the output file
19364 names from the input file name, strip the directory part.
19365
19366 2002-06-18 Akim Demaille <akim@epita.fr>
19367
19368 * data/bison.simple.new: Comment changes.
19369 Reported by Andreas Schwab.
19370
19371 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
19372
19373 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
19374 there are no `label `yyoverflowlab' defined but not used' warnings
19375 when yyoverflow is defined.
19376
19377 2002-06-18 Akim Demaille <akim@epita.fr>
19378
19379 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
19380 new member.
19381 (symbol_destructor_set): Adjust.
19382 * src/output.c (symbol_destructors_output): Output the destructor
19383 locations.
19384 Output the symbol name.
19385 * data/bison.simple (b4_symbol_destructor): Adjust.
19386
19387 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
19388 and Akim Demaille <akim@epita.fr>
19389
19390 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
19391 what's left on the stack when the error recovery hits EOF.
19392 * tests/actions.at (Destructors): Complete to exercise this case.
19393
19394 2002-06-17 Akim Demaille <akim@epita.fr>
19395
19396 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
19397 arguments is really empty, not only equal to `[]'.
19398 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
19399 member.
19400 (symbol_destructor_set): New.
19401 * src/output.c (symbol_destructors_output): New.
19402 * src/reader.h (brace_code_t, current_braced_code): New.
19403 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
19404 (handle_dollar): Rename as...
19405 (handle_action_dollar): this.
19406 (handle_destructor_dollar): New.
19407 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
19408 (grammar_declaration): Use it.
19409 * data/bison.simple (yystos): Is always defined.
19410 (yydestructor): New.
19411 * tests/actions.at (Destructors): New.
19412 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
19413
19414 2002-06-17 Akim Demaille <akim@epita.fr>
19415
19416 * src/symlist.h, src/symlist.c (symbol_list_length): New.
19417 * src/scan-gram.l (handle_dollar, handle_at): Compute the
19418 rule_length only when needed.
19419 * src/output.c (actions_output, token_definitions_output): Output
19420 the full M4 block.
19421 * src/symtab.c: Don't access directly to the symbol tag, use
19422 symbol_tag_get.
19423 * src/parse-gram.y: Use symbol_list_free.
19424
19425 2002-06-17 Akim Demaille <akim@epita.fr>
19426
19427 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
19428 (symbol_list_prepend, get_type_name): Move to...
19429 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
19430 (symbol_list_prepend, symbol_list_n_type_name_get): here.
19431 Adjust all callers.
19432 (symbol_list_free): New.
19433 * src/scan-gram.l (handle_dollar): Takes a location.
19434 * tests/input.at (Invalid $n): Adjust.
19435
19436 2002-06-17 Akim Demaille <akim@epita.fr>
19437
19438 * src/reader.h, src/reader.c (symbol_list_new): Export it.
19439 (symbol_list_prepend): New.
19440 * src/parse-gram.y (%union): `list' is a new member.
19441 (symbols.1): New, replaces...
19442 (terms_to_prec.1, nterms_to_type.1): these.
19443 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
19444 Take a location as additional argument.
19445 Adjust all callers.
19446
19447 2002-06-15 Akim Demaille <akim@epita.fr>
19448
19449 * src/parse-gram.y: Move %token in the declaration section so that
19450 we don't depend upon CVS Bison.
19451
19452 2002-06-15 Akim Demaille <akim@epita.fr>
19453
19454 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
19455 * src/print.c (print_core): Use it.
19456
19457 2002-06-15 Akim Demaille <akim@epita.fr>
19458
19459 * src/conflicts.c (log_resolution): Accept the rule involved in
19460 the sr conflicts instead of the lookahead number that points to
19461 that rule.
19462 (flush_reduce): Accept the current lookahead vector as argument,
19463 instead of the index in LA.
19464 (resolve_sr_conflict): Accept the current number of lookahead
19465 bitset to consider for the STATE, instead of the index in LA.
19466 (set_conflicts): Adjust.
19467 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
19468
19469 2002-06-15 Akim Demaille <akim@epita.fr>
19470
19471 * src/state.h (state_t): Replace the `lookaheadsp' member, a
19472 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
19473 Adjust all dependencies.
19474 * src/lalr.c (initialize_lookaheads): Split into...
19475 (states_lookaheads_count, states_lookaheads_initialize): these.
19476 (lalr): Adjust.
19477
19478 2002-06-15 Akim Demaille <akim@epita.fr>
19479
19480 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
19481 out of...
19482 (grammar_rules_print): here.
19483 * src/reduce.c (reduce_output): Use it.
19484 * tests/reduce.at (Useless Rules, Reduced Automaton)
19485 (Underivable Rules): Adjust.
19486
19487 2002-06-15 Akim Demaille <akim@epita.fr>
19488
19489 Copy BYacc's nice way to report the grammar.
19490
19491 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
19492 New.
19493 Don't print the rules' location, it is confusing and useless.
19494 (rule_print): Use grammar_rhs_print.
19495 * src/print.c (print_grammar): Use grammar_rules_print.
19496
19497 2002-06-15 Akim Demaille <akim@epita.fr>
19498
19499 Complete and rationalize `useless thing' warnings.
19500
19501 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
19502 (symbol_tag_print): New.
19503 Use them everywhere in place of accessing directly the tag member.
19504 * src/gram.h, src/gram.c (rule_print): New.
19505 Use it where a rule used to be printed `by hand'.
19506 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
19507 (reduce_grammar_tables): Report the useless rules.
19508 (reduce_print): Useless things are a warning, not an error.
19509 Report it as such.
19510 * tests/reduce.at (Useless Nonterminals, Useless Rules):
19511 (Reduced Automaton, Underivable Rules): Adjust.
19512 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
19513 * tests/conflicts.at (Unresolved SR Conflicts)
19514 (Solved SR Conflicts): Adjust.
19515
19516 2002-06-15 Akim Demaille <akim@epita.fr>
19517
19518 Let symbols have a location.
19519
19520 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
19521 (getsym): Adjust.
19522 Adjust all callers.
19523 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
19524 Use location_t, not int.
19525 * src/symtab.c (symbol_check_defined): Take advantage of the
19526 location.
19527 * tests/regression.at (Invalid inputs): Adjust.
19528
19529 2002-06-15 Akim Demaille <akim@epita.fr>
19530
19531 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
19532 (input): Don't try to initialize yylloc here, do it in the
19533 scanner.
19534 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
19535 * src/gram.h (rule_t): Change line and action_line into location
19536 and action_location, of location_t type.
19537 Adjust all dependencies.
19538 * src/location.h, src/location.c (empty_location): New.
19539 * src/reader.h, src/reader.c (grammar_start_symbol_set)
19540 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
19541 (grammar_current_rule_symbol_append)
19542 (grammar_current_rule_action_append): Expect a location as argument.
19543 * src/reader.c (grammar_midrule_action): Adjust to attach an
19544 action's location as dummy symbol location.
19545 * src/symtab.h, src/symtab.c (startsymbol_location): New.
19546 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
19547 the line numbers.
19548
19549 2002-06-14 Akim Demaille <akim@epita.fr>
19550
19551 Grammar declarations may be found in the grammar section.
19552
19553 * src/parse-gram.y (rules_or_grammar_declaration): New.
19554 (declarations): Each declaration may end with a semicolon, not
19555 just...
19556 (grammar_declaration): `"%union"'.
19557 (grammar): Branch to rules_or_grammar_declaration.
19558
19559 2002-06-14 Akim Demaille <akim@epita.fr>
19560
19561 * src/main.c (main): Invoke scanner_free.
19562
19563 2002-06-14 Akim Demaille <akim@epita.fr>
19564
19565 * src/output.c (m4_invoke): Extracted from...
19566 (output_skeleton): here.
19567 Free tempfile.
19568
19569 2002-06-14 Akim Demaille <akim@epita.fr>
19570
19571 * src/parse-gram.y (directives, directive, gram)
19572 (grammar_directives, precedence_directives, precedence_directive):
19573 Rename as...
19574 (declarations, declaration, grammar, grammar_declaration)
19575 (precedence_declaration, precedence_declarator): these.
19576 (symbol_declaration): New.
19577
19578 2002-06-14 Akim Demaille <akim@epita.fr>
19579
19580 * src/files.c (action_obstack): Remove, unused.
19581 (output_obstack): Remove it, and all its dependencies, as it is no
19582 longer needed.
19583 * src/reader.c (epilogue_set): Build the epilogue in the
19584 muscle_obstack.
19585 * src/output.h, src/output.c (muscle_obstack): Move to...
19586 * src/muscle_tab.h, src/muscle_tab.h: here.
19587 (muscle_init): Initialize muscle_obstack.
19588 (muscle_free): New.
19589 * src/main.c (main): Call it.
19590
19591 2002-06-14 Akim Demaille <akim@epita.fr>
19592
19593 * src/location.h: New, extracted from...
19594 * src/reader.h: here.
19595 * src/Makefile.am (noinst_HEADERS): Merge into
19596 (bison_SOURCES): this.
19597 Add location.h.
19598 * src/parse-gram.y: Use location_t instead of Bison's.
19599 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
19600 Use location_t instead of ints.
19601
19602 2002-06-14 Akim Demaille <akim@epita.fr>
19603
19604 * data/bison.simple, data/bison.c++: Be sure to restore the
19605 current #line when returning to the skeleton contents after having
19606 exposed the input file's #line.
19607
19608 2002-06-12 Akim Demaille <akim@epita.fr>
19609
19610 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
19611 eager.
19612 * tests/actions.at (Exotic Dollars): New.
19613
19614 2002-06-12 Akim Demaille <akim@epita.fr>
19615
19616 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
19617 ['"/] too eagerly.
19618 * tests/input.at (Torturing the Scanner): New.
19619
19620 2002-06-11 Akim Demaille <akim@epita.fr>
19621
19622 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
19623 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
19624 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
19625 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
19626 * src/reader.c (reader): Use it.
19627
19628 2002-06-11 Akim Demaille <akim@epita.fr>
19629
19630 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
19631 Adjust all callers.
19632 (scanner_last_string_free): New.
19633
19634 2002-06-11 Akim Demaille <akim@epita.fr>
19635
19636 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
19637 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
19638 (last_string, YY_OBS_FREE): New.
19639 Use them when returning an ID.
19640
19641 2002-06-11 Akim Demaille <akim@epita.fr>
19642
19643 Have Bison grammars parsed by a Bison grammar.
19644
19645 * src/reader.c, src/reader.h (prologue_augment): New.
19646 * src/reader.c (copy_definition): Remove.
19647
19648 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
19649 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
19650 (grammar_current_rule_prec_set, grammar_current_rule_check)
19651 (grammar_current_rule_symbol_append)
19652 (grammar_current_rule_action_append): Export.
19653 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
19654 (symbol_list_action_append): Remove.
19655 Hook the routines from reader.
19656 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
19657 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
19658
19659 * src/reader.c (read_declarations): Remove, unused.
19660
19661 * src/parse-gram.y: Handle the epilogue.
19662 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
19663 (grammar_start_symbol_set): this.
19664 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
19665 * src/reader.c (readgram): Remove, unused.
19666 (reader): Adjust to insert eoftoken and axiom where appropriate.
19667
19668 * src/reader.c (copy_dollar): Replace with...
19669 * src/scan-gram.h (handle_dollar): this.
19670 * src/parse-gram.y: Remove `%thong'.
19671
19672 * src/reader.c (copy_at): Replace with...
19673 * src/scan-gram.h (handle_at): this.
19674
19675 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
19676 New.
19677
19678 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
19679 time being.
19680
19681 * src/reader.h, src/reader.c (grammar_rule_end): New.
19682
19683 * src/parse.y (current_type, current_class): New.
19684 Implement `%nterm', `%token' support.
19685 Merge `%term' into `%token'.
19686 (string_as_id): New.
19687 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
19688 type name.
19689
19690 * src/parse-gram.y: Be sure to handle properly the beginning of
19691 rules.
19692
19693 * src/parse-gram.y: Handle %type.
19694 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
19695
19696 * src/parse-gram.y: More directives support.
19697 * src/options.c: No longer handle source directives.
19698
19699 * src/parse-gram.y: Fix %output.
19700
19701 * src/parse-gram.y: Handle %union.
19702 Use the prologue locations.
19703 * src/reader.c (parse_union_decl): Remove.
19704
19705 * src/reader.h, src/reader.c (epilogue_set): New.
19706 * src/parse-gram.y: Use it.
19707
19708 * data/bison.simple, data/bison.c++: b4_stype is now either not
19709 defined, then default to int, or to the contents of %union,
19710 without `union' itself.
19711 Adjust.
19712 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
19713
19714 * src/output.c (actions_output): Don't output braces, as they are
19715 already handled by the scanner.
19716
19717 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
19718 characters to themselves.
19719
19720 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
19721 that the epilogue has a proper #line.
19722
19723 * src/parse-gram.y: Handle precedence/associativity.
19724
19725 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
19726 a terminal.
19727 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
19728 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
19729 at all to define terminals that cannot be emitted.
19730
19731 * src/scan-gram.l: Escape M4 characters.
19732
19733 * src/scan-gram.l: Working properly with escapes in user
19734 strings/characters.
19735
19736 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
19737 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
19738 grammar.
19739 Use more modest sizes, as for the time being the parser does not
19740 release memory, and therefore the process swallows a huge amount
19741 of memory.
19742
19743 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
19744 stricter %token grammar.
19745
19746 * src/symtab.h (associativity): Add `undef_assoc'.
19747 (symbol_precedence_set): Do nothing when passed an undef_assoc.
19748 * src/symtab.c (symbol_check_alias_consistence): Adjust.
19749
19750 * tests/regression.at (Invalid %directive): Remove, as it is now
19751 meaningless.
19752 (Invalid inputs): Adjust to the new error messages.
19753 (Token definitions): The new grammar doesn't allow too many
19754 eccentricities.
19755
19756 * src/lex.h, src/lex.c: Remove.
19757 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
19758 (copy_character, copy_string2, copy_string, copy_identifier)
19759 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
19760 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
19761 (parse_action): Remove.
19762 * po/POTFILES.in: Adjust.
19763
19764 2002-06-11 Akim Demaille <akim@epita.fr>
19765
19766 * src/reader.c (parse_action): Don't store directly into the
19767 rule's action member: return the action as a string.
19768 Don't require `rule_length' as an argument: compute it.
19769 (grammar_current_rule_symbol_append)
19770 (grammar_current_rule_action_append): New, eved out from
19771 (readgram): here.
19772 Remove `action_flag', `rulelength', unused now.
19773
19774 2002-06-11 Akim Demaille <akim@epita.fr>
19775
19776 * src/reader.c (grammar_current_rule_prec_set).
19777 (grammar_current_rule_check): New, eved out from...
19778 (readgram): here.
19779 Remove `xaction', `first_rhs': useless.
19780 * tests/input.at (Type clashes): New.
19781 * tests/existing.at (GNU Cim Grammar): Adjust.
19782
19783 2002-06-11 Akim Demaille <akim@epita.fr>
19784
19785 * src/reader.c (grammar_midrule_action): New, Eved out from
19786 (readgram): here.
19787
19788 2002-06-11 Akim Demaille <akim@epita.fr>
19789
19790 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
19791 New.
19792 (readgram): Use them as replacement of inlined code, crule and
19793 crule1.
19794
19795 2002-06-11 Akim Demaille <akim@epita.fr>
19796
19797 * src/reader.c (grammar_end, grammar_symbol_append): New.
19798 (readgram): Use them.
19799 Make the use of `p' as local as possible.
19800
19801 2002-06-10 Akim Demaille <akim@epita.fr>
19802
19803 GCJ's parser requires the tokens to be defined before the prologue.
19804
19805 * data/bison.simple: Output the token definition before the user's
19806 prologue.
19807 * tests/regression.at (Braces parsing, Duplicate string)
19808 (Mixing %token styles): Check the output from bison.
19809 (Early token definitions): New.
19810
19811 2002-06-10 Akim Demaille <akim@epita.fr>
19812
19813 * src/symtab.c (symbol_user_token_number_set): Don't complain when
19814 assigning twice the same user number to a token, so that we can
19815 use it in...
19816 * src/lex.c (lex): here.
19817 Also use `symbol_class_set' instead of hand written code.
19818 * src/reader.c (parse_assoc_decl): Likewise.
19819
19820 2002-06-10 Akim Demaille <akim@epita.fr>
19821
19822 * src/symtab.c, src/symtab.c (symbol_class_set)
19823 (symbol_user_token_number_set): New.
19824 * src/reader.c (parse_token_decl): Use them.
19825 Use a switch instead of ifs.
19826 Use a single argument.
19827
19828 2002-06-10 Akim Demaille <akim@epita.fr>
19829
19830 Remove `%thong' support as it is undocumented, unused, duplicates
19831 `%token's job, and creates useless e-mail traffic with people who
19832 want to know what it is, why it is undocumented, unused, and
19833 duplicates `%token's job.
19834
19835 * src/reader.c (parse_thong_decl): Remove.
19836 * src/options.c (option_table): Remove "thong".
19837 * src/lex.h (tok_thong): Remove.
19838
19839 2002-06-10 Akim Demaille <akim@epita.fr>
19840
19841 * src/symtab.c, src/symtab.c (symbol_type_set)
19842 (symbol_precedence_set): New.
19843 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
19844 (value_components_used): Remove, unused.
19845
19846 2002-06-09 Akim Demaille <akim@epita.fr>
19847
19848 Move symbols handling code out of the reader.
19849
19850 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
19851 (axiom): Move to...
19852 * src/symtab.h, src/symtab.c: here.
19853
19854 * src/gram.c (start_symbol): Remove: use startsymbol->number.
19855 * src/reader.c (startval): Rename as...
19856 * src/symtab.h, src/symtab.c (startsymbol): this.
19857 * src/reader.c: Adjust.
19858
19859 * src/reader.c (symbol_check_defined, symbol_make_alias)
19860 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19861 (token_translations_init)
19862 Move to...
19863 * src/symtab.c: here.
19864 * src/reader.c (packsymbols): Move to...
19865 * src/symtab.h, src/symtab.c (symbols_pack): here.
19866 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
19867 argument.
19868
19869 2002-06-03 Akim Demaille <akim@epita.fr>
19870
19871 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
19872 then statements.
19873
19874 2002-06-03 Akim Demaille <akim@epita.fr>
19875
19876 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
19877 structs with non literals.
19878 * src/scan-skel.l: never-interactive.
19879 * src/conflicts.c (enum conflict_resolution_e): No trailing
19880 comma.
19881 * src/getargs.c (usage): Split long literal strings.
19882 Reported by Hans Aberg.
19883
19884 2002-05-28 Akim Demaille <akim@epita.fr>
19885
19886 * data/bison.c++: Use C++ ostreams.
19887 (cdebug_): New member.
19888
19889 2002-05-28 Akim Demaille <akim@epita.fr>
19890
19891 * src/output.c (output_skeleton): Be sure to allocate enough room
19892 for `/' _and_ for `\0' in full_skeleton.
19893
19894 2002-05-28 Akim Demaille <akim@epita.fr>
19895
19896 * data/bison.c++: Catch up with bison.simple:
19897 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19898 and Paul Eggert <eggert@twinsun.com>: `error' handing.
19899 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
19900 and popping traces.
19901
19902 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19903
19904 * src/output.c (output_skeleton): Put an explicit path in front of
19905 the skeleton file name, rather than relying on the -I directory,
19906 to partially alleviate effects of having a skeleton file lying around
19907 in the current directory.
19908
19909 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19910
19911 * src/conflicts.c (log_resolution): Correct typo:
19912 obstack_printf should be obstack_fgrow1.
19913
19914 2002-05-26 Akim Demaille <akim@epita.fr>
19915
19916 * src/state.h (state_t): `solved_conflicts' is a new member.
19917 * src/LR0.c (new_state): Set it to 0.
19918 * src/conflicts.h, src/conflicts.c (print_conflicts)
19919 (free_conflicts, solve_conflicts): Rename as...
19920 (conflicts_print, conflicts_free, conflicts_solve): these.
19921 Adjust callers.
19922 * src/conflicts.c (enum conflict_resolution_e)
19923 (solved_conflicts_obstack): New, used by...
19924 (log_resolution): this.
19925 Adjust to attach the conflict resolution to each state.
19926 Complete the description with the precedence/associativity
19927 information.
19928 (resolve_sr_conflict): Adjust.
19929 * src/print.c (print_state): Output its solved_conflicts.
19930 * tests/conflicts.at (Unresolved SR Conflicts)
19931 (Solved SR Conflicts): Exercise --report=all.
19932
19933 2002-05-26 Akim Demaille <akim@epita.fr>
19934
19935 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
19936 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19937 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
19938 (token_number_t, item_number_as_token_number)
19939 (token_number_as_item_number, muscle_insert_token_number_table):
19940 Rename as...
19941 (symbol_number_t, item_number_as_symbol_number)
19942 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
19943 these, since it is more appropriate.
19944
19945 2002-05-26 Akim Demaille <akim@epita.fr>
19946
19947 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
19948 `Error:' lines.
19949 * data/bison.simple (yystos) [YYDEBUG]: New.
19950 (yyparse) [YYDEBUG]: Display the symbols which are popped during
19951 error recovery.
19952 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
19953
19954 2002-05-25 Akim Demaille <akim@epita.fr>
19955
19956 * doc/bison.texinfo (Debugging): Split into...
19957 (Tracing): this new section, its former contents, and...
19958 (Understanding): this new section.
19959 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
19960 by...
19961 (report_flag): this.
19962 Adjust all dependencies.
19963 (report_args, report_types, report_argmatch): New.
19964 (usage, getargs): Report/support -r, --report.
19965 * src/options.h
19966 (struct option_table_struct): Rename as..,
19967 (struct option_table_s): this.
19968 Rename the `set_flag' member to `flag' to match with getopt_long's
19969 struct.
19970 * src/options.c (option_table): Split verbose into an entry for
19971 %verbose, and another for --verbose.
19972 Support --report/-r, so remove -r from the obsolete --raw.
19973 * src/print.c: Attach full item sets and lookaheads reports to
19974 report_flag instead of trace_flag.
19975 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
19976
19977 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19978 and Paul Eggert <eggert@twinsun.com>
19979
19980 * data/bison.simple (yyparse): Correct error handling to conform to
19981 POSIX and yacc. Specifically, after syntax error is discovered,
19982 do not reduce further before shifting the error token.
19983 Clean up the code a bit by removing the labels yyerrdefault,
19984 yyerrhandle, yyerrpop.
19985 * NEWS: Document the above.
19986
19987 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
19988
19989 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
19990 type; it isn't always big enough, since it doesn't necessarily
19991 include non-terminals.
19992 (yytranslate): Expand definition of yy_token_number_type, so that
19993 the latter can be removed.
19994 (yy_token_number_type): Remove, only one use.
19995 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
19996 don't use TokenNumberType as element type.
19997
19998 * tests/regression.at: Modify expected output to agree with change
19999 to yyr1 and yytranslate.
20000
20001 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
20002
20003 * src/reader.c (parse_action): Use copy_character instead of
20004 obstack_1grow.
20005
20006 2002-05-13 Akim Demaille <akim@epita.fr>
20007
20008 * tests/regression.at (Token definitions): Prototype yylex and
20009 yyerror.
20010
20011 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
20012
20013 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
20014 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
20015 32-bit arithmetic.
20016 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
20017
20018 2002-05-07 Akim Demaille <akim@epita.fr>
20019
20020 * tests/synclines.at: Be sure to prototype yylex and yyerror to
20021 avoid GCC warnings.
20022
20023 2002-05-07 Akim Demaille <akim@epita.fr>
20024
20025 Kill GCC warnings.
20026
20027 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
20028 over the RHS of each rule.
20029 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
20030 * src/state.h (state_t): Member `nitems' is unsigned short.
20031 * src/LR0.c (get_state): Adjust.
20032 * src/reader.c (packgram): Likewise.
20033 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
20034 `Type'.
20035 (muscle_insert_int_table): Remove, unused.
20036 (prepare_rules): Remove `max'.
20037
20038 2002-05-06 Akim Demaille <akim@epita.fr>
20039
20040 * src/closure.c (print_firsts): Display of the symbol tags.
20041 (bitmatrix_print): Move to...
20042 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
20043 here.
20044 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
20045
20046 2002-05-06 Akim Demaille <akim@epita.fr>
20047
20048 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
20049 hash_do_for_each.
20050
20051 2002-05-06 Akim Demaille <akim@epita.fr>
20052
20053 * src/LR0.c (new_state, get_state): Instead of using the global
20054 `kernel_size' and `kernel_base', have two new arguments:
20055 `core_size' and `core'.
20056 Adjust callers.
20057
20058 2002-05-06 Akim Demaille <akim@epita.fr>
20059
20060 * src/reader.c (packgram): No longer end `ritem' with a 0
20061 sentinel: it is not used.
20062
20063 2002-05-05 Akim Demaille <akim@epita.fr>
20064
20065 New experimental feature: display the lookaheads in the report and
20066 graph.
20067
20068 * src/print (print_core): When --trace-flag, display the rules
20069 lookaheads.
20070 * src/print_graph.c (print_core): Likewise.
20071 Swap the arguments.
20072 Adjust caller.
20073
20074 2002-05-05 Akim Demaille <akim@epita.fr>
20075
20076 * tests/torture.at (Many lookaheads): New test.
20077
20078 2002-05-05 Akim Demaille <akim@epita.fr>
20079
20080 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
20081 (GENERATE_MUSCLE_INSERT_TABLE): this.
20082 (output_int_table, output_unsigned_int_table, output_short_table)
20083 (output_token_number_table, output_item_number_table): Replace with...
20084 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
20085 (muscle_insert_short_table, muscle_insert_token_number_table)
20086 (muscle_insert_item_number_table): these.
20087 Adjust all callers.
20088 (prepare_tokens): Don't free `translations', since...
20089 * src/reader.h, src/reader.c (grammar_free): do it.
20090 Move to...
20091 * src/gram.h, src/gram.c (grammar_free): here.
20092 * data/bison.simple, data/bison.c++: b4_token_number_max is now
20093 b4_translate_max.
20094
20095 2002-05-05 Akim Demaille <akim@epita.fr>
20096
20097 * src/output.c (output_unsigned_int_table): New.
20098 (prepare_rules): `i' is unsigned.
20099 `prhs', `rline', `r2' are unsigned int.
20100 Rename muscle `rhs_number_max' as `rhs_max'.
20101 Output muscles `prhs_max', `rline_max', and `r2_max'.
20102 Free rline and r1.
20103 * data/bison.simple, data/bison.c++: Adjust to use these muscles
20104 to compute types instead of constant types.
20105 * tests/regression.at (Web2c Actions): Adjust.
20106
20107 2002-05-04 Akim Demaille <akim@epita.fr>
20108
20109 * src/symtab.h (SALIAS, SUNDEF): Rename as...
20110 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
20111 Adjust dependencies.
20112 * src/output.c (token_definitions_output): Be sure not to output a
20113 `#define 'a'' when fed with `%token 'a' "a"'.
20114 * tests/regression.at (Token definitions): New.
20115
20116 2002-05-03 Paul Eggert <eggert@twinsun.com>
20117
20118 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
20119 for K&R C.
20120
20121 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
20122
20123 * Makefile.am (SUBDIRS): Remove intl.
20124 (EXTRA_DIST): Add config/config.rpath.
20125
20126 2002-05-03 Akim Demaille <akim@epita.fr>
20127
20128 * data/bison.simple (m4_if): Don't output empty enums.
20129 And actually, output valid enum definitions :(.
20130
20131 2002-05-03 Akim Demaille <akim@epita.fr>
20132
20133 * configure.bat: Remove, completely obsolete.
20134 * Makefile.am (EXTRA_DIST): Adjust.
20135 Don't distribute config.rpath...
20136 * config/Makefile.am (EXTRA_DIST): Do it.
20137
20138 2002-05-03 Akim Demaille <akim@epita.fr>
20139
20140 * configure.in (GETTEXT_VERSION): New.
20141 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
20142
20143 2002-05-03 Akim Demaille <akim@epita.fr>
20144
20145 * data/bison.simple (b4_token_enum): New.
20146 (b4_token_defines): Use it to output tokens both as #define and
20147 enums.
20148 Suggested by Paul Eggert.
20149 * src/output.c (token_definitions_output): Don't output spurious
20150 white spaces.
20151
20152 2002-05-03 Akim Demaille <akim@epita.fr>
20153
20154 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20155
20156 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
20157
20158 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
20159 Update the stack class, give a try to deque as the default container.
20160
20161 2002-05-02 Akim Demaille <akim@epita.fr>
20162
20163 * data/bison.simple (yyparse): Do not implement @$ = @1.
20164 (YYLLOC_DEFAULT): Adjust to do it.
20165 * doc/bison.texinfo (Location Default Action): Fix.
20166
20167 2002-05-02 Akim Demaille <akim@epita.fr>
20168
20169 * src/reader.c (parse_braces): Merge into...
20170 (parse_action): this.
20171
20172 2002-05-02 Akim Demaille <akim@epita.fr>
20173
20174 * configure.in (ALL_LINGUAS): Remove.
20175 * po/LINGUAS, hr.po: New.
20176
20177 2002-05-02 Akim Demaille <akim@epita.fr>
20178
20179 Remove the so called hairy (semantic) parsers.
20180
20181 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
20182 * src/gram.h, src/gram.c (semantic_parser): Remove.
20183 (rule_t): Remove the guard and guard_line members.
20184 * src/lex.h (token_t): remove tok_guard.
20185 * src/options.c (option_table): Remove %guard and %semantic_parser
20186 support.
20187 * src/output.c, src/output.h (guards_output): Remove.
20188 (prepare): Adjust.
20189 (token_definitions_output): Don't output the `T'
20190 tokens (???).
20191 (output_skeleton): Don't output the guards.
20192 * src/files.c, src/files.c (attrsfile): Remove.
20193 * src/reader.c (symbol_list): Remove the guard and guard_line
20194 members.
20195 Adjust dependencies.
20196 (parse_guard): Remove.
20197 * data/bison.hairy: Remove.
20198 * doc/bison.texinfo (Environment Variables): Remove occurrences of
20199 BISON_HAIRY.
20200
20201 2002-05-02 Akim Demaille <akim@epita.fr>
20202
20203 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
20204 (parse_guard): Rename the formal argument `stack_offset' as
20205 `rule_length', which is more readable.
20206 Adjust callers.
20207 (copy_at, copy_dollar): Instead of outputting the hard coded
20208 values of $$, $n and so forth, output invocation to b4_lhs_value,
20209 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
20210 Note: this patch partially drops `semantic-parser' support: it
20211 always does `rule_length - n', where semantic parsers ought to
20212 always use `-n'.
20213 * data/bison.simple, data/bison.c++ (b4_lhs_value)
20214 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
20215
20216 2002-05-02 Akim Demaille <akim@epita.fr>
20217
20218 * configure.in (AC_INIT): Bump to 1.49b.
20219 (AM_INIT_AUTOMAKE): Short invocation.
20220
20221 2002-05-02 Akim Demaille <akim@epita.fr>
20222
20223 Version 1.49a.
20224
20225 2002-05-01 Akim Demaille <akim@epita.fr>
20226
20227 * src/skeleton.h: Remove.
20228
20229 2002-05-01 Akim Demaille <akim@epita.fr>
20230
20231 * src/skeleton.h: Fix the #endif.
20232 Reported by Magnus Fromreide.
20233
20234 2002-04-26 Paul Eggert <eggert@twinsun.com>
20235
20236 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
20237 Define if we define YYSTYPE and YYLTYPE, respectively.
20238 (YYCOPY): Fix [] quoting problem in the non-GCC case.
20239
20240 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
20241
20242 * src/scan-skel.l: Postprocess quadrigraphs.
20243
20244 * src/reader.c (copy_character): New function, used to output
20245 single characters while replacing `[' and `]' with quadrigraphs, to
20246 avoid troubles with M4 quotes.
20247 (copy_comment): Output characters with copy_character.
20248 (read_additionnal_code): Likewise.
20249 (copy_string2): Likewise.
20250 (copy_definition): Likewise.
20251
20252 * tests/calc.at: Exercise M4 quoting.
20253
20254 2002-04-25 Akim Demaille <akim@epita.fr>
20255
20256 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
20257 between `!' and the command.
20258 Reported by Paul Eggert.
20259
20260 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
20261
20262 * tests/calc.at: Exercise prologue splitting.
20263
20264 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
20265 `b4_post_prologue' instead of `b4_prologue'.
20266
20267 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
20268 muscles.
20269 (output): Free pre_prologue_obstack and post_prologue_obstack.
20270 * src/files.h, src/files.c (attrs_obstack): Remove.
20271 (pre_prologue_obstack, post_prologue_obstack): New.
20272 * src/reader.c (copy_definition): Add a parameter to specify the
20273 obstack to fill, instead of using attrs_obstack unconditionally.
20274 (read_declarations): Pass pre_prologue_obstack to copy_definition if
20275 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
20276
20277 2002-04-23 Paul Eggert <eggert@twinsun.com>
20278
20279 * data/bison.simple: Remove unnecessary commentary and white
20280 space differences from 1_29-branch.
20281 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
20282
20283 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
20284 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
20285 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
20286 constructors or destructors.
20287
20288 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
20289
20290 2002-04-23 Akim Demaille <akim@epita.fr>
20291
20292 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
20293 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
20294 location with columns.
20295 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
20296 All reported by Paul Eggert.
20297
20298 2002-04-22 Akim Demaille <akim@epita.fr>
20299
20300 * src/reduce.c (dump_grammar): Move to...
20301 * src/gram.h, src/gram.c (grammar_dump): here.
20302 Be sure to separate long item numbers.
20303 Don't read the members of a rule's prec if its nil.
20304
20305 2002-04-22 Akim Demaille <akim@epita.fr>
20306
20307 * src/output.c (table_size, table_grow): New.
20308 (MAXTABLE): Remove, replace uses with table_size.
20309 (pack_vector): Instead of dying when the table is too big, grow it.
20310
20311 2002-04-22 Akim Demaille <akim@epita.fr>
20312
20313 * data/bison.simple (yyr1): Its type is that of a token number.
20314 * data/bison.c++ (r1_): Likewise.
20315 * tests/regression.at (Web2c Actions): Adjust.
20316
20317 2002-04-22 Akim Demaille <akim@epita.fr>
20318
20319 * src/reader.c (token_translations_init): 256 is now the default
20320 value for the error token, i.e., it will be assigned another
20321 number if the user assigned 256 to one of her tokens.
20322 (reader): Don't force 256 to error.
20323 * doc/bison.texinfo (Symbols): Adjust.
20324 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
20325 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
20326 etc. instead of 10, 20, 30 (which was used to `jump' over error
20327 (256) and undefined (2)).
20328
20329 2002-04-22 Akim Demaille <akim@epita.fr>
20330
20331 Propagate more token_number_t.
20332
20333 * src/gram.h (token_number_as_item_number)
20334 (item_number_as_token_number): New.
20335 * src/output.c (GENERATE_OUTPUT_TABLE): New.
20336 Use it to create output_item_number_table and
20337 output_token_number_table.
20338 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
20339 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
20340 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
20341 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
20342
20343 2002-04-22 Akim Demaille <akim@epita.fr>
20344
20345 * src/output.h, src/output.c (get_lines_number): Remove.
20346
20347 2002-04-19 Akim Demaille <akim@epita.fr>
20348
20349 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
20350 as Lex/Flex'.
20351 (Debugging): More details about enabling the debugging features.
20352 (Table of Symbols): Describe $$, $n, @$, and @n.
20353 Suggested by Tim Josling.
20354
20355 2002-04-19 Akim Demaille <akim@epita.fr>
20356
20357 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
20358
20359 2002-04-10 Akim Demaille <akim@epita.fr>
20360
20361 * src/system.h: Rely on HAVE_LIMITS_H.
20362 Suggested by Paul Eggert.
20363
20364 2002-04-09 Akim Demaille <akim@epita.fr>
20365
20366 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
20367 full stderr, and strip it according to the bison options, instead
20368 of composing the error message from different bits.
20369 This makes it easier to check for several error messages.
20370 Adjust all the invocations.
20371 Add an invocation exercising the error token.
20372 Add an invocation demonstrating a stupid error message.
20373 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
20374 Adjust the tests.
20375 Error message are for stderr, not stdout.
20376
20377 2002-04-09 Akim Demaille <akim@epita.fr>
20378
20379 * src/gram.h, src/gram.c (error_token_number): Remove, use
20380 errtoken->number.
20381 * src/reader.c (reader): Don't specify the user token number (2)
20382 for $undefined, as it uselessly prevents using it.
20383 * src/gram.h (token_number_t): Move to...
20384 * src/symtab.h: here.
20385 (state_t.number): Is a token_number_t.
20386 * src/print.c, src/reader.c: Use undeftoken->number instead of
20387 hard coded 2.
20388 (Even though this 2 is not the same as above: the number of the
20389 undeftoken remains being 2, it is its user token number which
20390 might not be 2).
20391 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
20392 `user_token_number_max'.
20393 Output `undef_token_number'.
20394 * data/bison.simple, data/bison.c++: Use them.
20395 Be sure to map invalid yylex return values to
20396 `undef_token_number'. This saves us from gratuitous SEGV.
20397
20398 * tests/conflicts.at (Solved SR Conflicts)
20399 (Unresolved SR Conflicts): Adjust.
20400 * tests/regression.at (Web2c Actions): Adjust.
20401
20402 2002-04-08 Akim Demaille <akim@epita.fr>
20403
20404 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
20405 Adding #line.
20406 Remove the duplicate `typedefs'.
20407 (RhsNumberType): Fix the declaration and various other typos.
20408 Use __ofile__.
20409 * data/bison.simple: Use __ofile__.
20410 * src/scan-skel.l: Handle __ofile__.
20411
20412 2002-04-08 Akim Demaille <akim@epita.fr>
20413
20414 * src/gram.h (item_number_t): New, the type of item numbers in
20415 RITEM. Note that it must be able to code symbol numbers as
20416 positive number, and the negation of rule numbers as negative
20417 numbers.
20418 Adjust all dependencies (pretty many).
20419 * src/reduce.c (rule): Remove this `short *' pointer: use
20420 item_number_t.
20421 * src/system.h (MINSHORT, MAXSHORT): Remove.
20422 Include `limits.h'.
20423 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
20424 (shortcpy): Remove.
20425 (MAXTABLE): Move to...
20426 * src/output.c (MAXTABLE): here.
20427 (prepare_rules): Use output_int_table to output rhs.
20428 * data/bison.simple, data/bison.c++: Adjust.
20429 * tests/torture.at (Big triangle): Move the limit from 254 to
20430 500.
20431 * tests/regression.at (Web2c Actions): Ajust.
20432
20433 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
20434 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
20435 passes, but produces negative #line number, once fixed, GCC is
20436 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
20437 C), it passes.
20438 * src/state.h (state_h): Code input lines on ints, not shorts.
20439
20440 2002-04-08 Akim Demaille <akim@epita.fr>
20441
20442 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
20443 and then the grammar.
20444
20445 2002-04-08 Akim Demaille <akim@epita.fr>
20446
20447 * src/system.h: No longer using strndup.
20448
20449 2002-04-07 Akim Demaille <akim@epita.fr>
20450
20451 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
20452 * src/output.c (output_table_data): Return the longest number.
20453 (prepare_tokens): Output `token_number_max').
20454 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
20455 New.
20456 Use them to define yy_token_number_type/TokenNumberType.
20457 Use this type for yytranslate.
20458 * tests/torture.at (Big triangle): Push the limit from 124 to
20459 253.
20460 * tests/regression.at (Web2c Actions): Adjust.
20461
20462 2002-04-07 Akim Demaille <akim@epita.fr>
20463
20464 * tests/torture.at (Big triangle): New.
20465 (GNU AWK Grammar, GNU Cim Grammar): Move to...
20466 * tests/existing.at: here.
20467
20468 2002-04-07 Akim Demaille <akim@epita.fr>
20469
20470 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
20471 nritems.
20472 Adjust dependencies.
20473
20474 2002-04-07 Akim Demaille <akim@epita.fr>
20475
20476 * src/reader.c: Normalize increments to prefix form.
20477
20478 2002-04-07 Akim Demaille <akim@epita.fr>
20479
20480 * src/reader.c, symtab.c: Remove debugging code.
20481
20482 2002-04-07 Akim Demaille <akim@epita.fr>
20483
20484 Rename all the `bucket's as `symbol_t'.
20485
20486 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
20487 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
20488 * src/symtab.c, src/symtab.h (bucket): Rename as...
20489 (symbol_t): this.
20490 (symbol_list_new, bucket_check_defined, bucket_make_alias)
20491 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
20492 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20493 (buckets_new, buckets_free, buckets_do): Rename as...
20494 (symbol_list_new, symbol_check_defined, symbol_make_alias)
20495 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
20496 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
20497 (symbols_new, symbols_free, symbols_do): these.
20498
20499 2002-04-07 Akim Demaille <akim@epita.fr>
20500
20501 Use lib/hash for the symbol table.
20502
20503 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
20504 EOF.
20505 * src/lex.c (lex): Set the `number' member of new terminals.
20506 * src/reader.c (bucket_check_defined, bucket_make_alias)
20507 (bucket_check_alias_consistence, bucket_translation): New.
20508 (reader, grammar_free, readgram, token_translations_init)
20509 (packsymbols): Adjust.
20510 (reader): Number the predefined tokens.
20511 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
20512 for predefined tokens.
20513 * src/symtab.h (bucket): Remove all the hash table related
20514 members.
20515 * src/symtab.c (symtab): Replace by...
20516 (bucket_table): this.
20517 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
20518 (buckets_new, buckets_do): New.
20519
20520 2002-04-07 Akim Demaille <akim@epita.fr>
20521
20522 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
20523 (start_symbol, max_user_token_number, semantic_parser)
20524 (error_token_number): Initialize.
20525 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
20526 Initialize.
20527 (reader): Don't.
20528 (errtoken, eoftoken, undeftoken, axiom): Extern.
20529
20530 2002-04-07 Akim Demaille <akim@epita.fr>
20531
20532 * src/gram.h (rule_s): prec and precsym are now pointers
20533 to the bucket giving the priority/associativity.
20534 Member `associativity' removed: useless.
20535 * src/reduce.c, src/conflicts.c: Adjust.
20536
20537 2002-04-07 Akim Demaille <akim@epita.fr>
20538
20539 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
20540 Properly escape the symbols' TAG when outputting them.
20541
20542 2002-04-07 Akim Demaille <akim@epita.fr>
20543
20544 * src/lalr.h (LA): Is a bitsetv, not bitset*.
20545
20546 2002-04-07 Akim Demaille <akim@epita.fr>
20547
20548 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
20549 (LArule): this, which is an array to rule_t*.
20550 * src/print.c, src/conflicts.c: Adjust.
20551
20552 2002-04-07 Akim Demaille <akim@epita.fr>
20553
20554 * src/gram.h (rule_t): Rename `number' as `user_number'.
20555 `number' is a new member.
20556 Adjust dependencies.
20557 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
20558
20559 2002-04-07 Akim Demaille <akim@epita.fr>
20560
20561 As a result of the previous patch, it is no longer needed
20562 to reorder ritem itself.
20563
20564 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
20565
20566 2002-04-07 Akim Demaille <akim@epita.fr>
20567
20568 Be sure never to walk through RITEMS, but use only data related to
20569 the rules themselves. RITEMS should be banished.
20570
20571 * src/output.c (output_token_translations): Rename as...
20572 (prepare_tokens): this.
20573 In addition to `translate', prepare the muscles `tname' and
20574 `toknum', which were handled by...
20575 (output_rule_data): this.
20576 Remove, and move the remainder of its outputs into...
20577 (prepare_rules): this new routines, which also merges content from
20578 (output_gram): this.
20579 (prepare_rules): Be sure never to walk through RITEMS.
20580 (output_stos): Rename as...
20581 (prepare_stos): this.
20582 (output): Always invoke prepare_states, after all, just don't use it
20583 in the output if you don't need it.
20584
20585 2002-04-07 Akim Demaille <akim@epita.fr>
20586
20587 * src/LR0.c (new_state): Display `nstates' as the name of the
20588 newly created state.
20589 Adjust to initialize first_state and last_state if needed.
20590 Be sure to distinguish the initial from the final state.
20591 (new_states): Create the itemset of the initial state, and use
20592 new_state.
20593 * src/closure.c (closure): Now that the initial state has its
20594 items properly set, there is no need for a special case when
20595 creating `ruleset'.
20596
20597 As a result, now the rule 0, reducing to $axiom, is visible in the
20598 outputs. Adjust the test suite.
20599
20600 * tests/conflicts.at (Solved SR Conflicts)
20601 (Unresolved SR Conflicts): Adjust.
20602 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
20603 * tests/conflicts.at (S/R in initial): New.
20604
20605 2002-04-07 Akim Demaille <akim@epita.fr>
20606
20607 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
20608 the RHS of the rules.
20609 * src/output.c (output_gram): Likewise.
20610
20611 2002-04-07 Akim Demaille <akim@epita.fr>
20612
20613 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
20614 bucket.
20615 Adjust all dependencies.
20616 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
20617 `number' of the buckets too.
20618 * src/gram.h: Include `symtab.h'.
20619 (associativity): Move to...
20620 * src/symtab.h: here.
20621 No longer include `gram.h'.
20622
20623 2002-04-07 Akim Demaille <akim@epita.fr>
20624
20625 * src/gram.h, src/gram.c (rules_rhs_length): New.
20626 (ritem_longest_rhs): Use it.
20627 * src/gram.h (rule_t): `number' is a new member.
20628 * src/reader.c (packgram): Set it.
20629 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
20630 the end of `rules', and count them out of `nrules'.
20631 (reduce_output, dump_grammar): Adjust.
20632 * src/print.c (print_grammar): It is no longer needed to check for
20633 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
20634 * tests/reduce.at (Reduced Automaton): New test.
20635
20636 2002-04-07 Akim Demaille <akim@epita.fr>
20637
20638 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
20639 lacking `+ 1' to nrules, Bison reported as useless a token if it
20640 was used solely to set the precedence of the last rule...
20641
20642 2002-04-07 Akim Demaille <akim@epita.fr>
20643
20644 * data/bison.c++, data/bison.simple: Don't output the current file
20645 name in #line, to avoid useless diffs between two identical
20646 outputs under different names.
20647
20648 2002-04-07 Akim Demaille <akim@epita.fr>
20649
20650 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
20651 Normalize loops to using `< nrules + 1', not `<= nrules'.
20652
20653 2002-04-07 Akim Demaille <akim@epita.fr>
20654
20655 * TODO: Update.
20656
20657 2002-04-07 Akim Demaille <akim@epita.fr>
20658
20659 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
20660 bucket.value as bucket.number.
20661
20662 2002-04-07 Akim Demaille <akim@epita.fr>
20663
20664 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
20665 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
20666 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
20667 RHS, instead of being an index in RITEMS.
20668
20669 2002-04-04 Paul Eggert <eggert@twinsun.com>
20670
20671 * doc/bison.texinfo: Update copyright date.
20672 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
20673 (Symbols): Warn about running Bison in one character set,
20674 but compiling and/or running in an incompatible one.
20675 Warn about character code 256, too.
20676
20677 2002-04-03 Paul Eggert <eggert@twinsun.com>
20678
20679 * src/bison.data (YYSTACK_ALLOC): Depend on whether
20680 YYERROR_VERBOSE is nonzero, not whether it is defined.
20681
20682 Merge changes from bison-1_29-branch.
20683
20684 2002-03-20 Paul Eggert <eggert@twinsun.com>
20685
20686 Merge fixes from Debian bison_1.34-1.diff.
20687
20688 * configure.in (AC_PREREQ): 2.53.
20689
20690 2002-03-20 Akim Demaille <akim@epita.fr>
20691
20692 * src/conflicts.c (log_resolution): Argument `resolution' is const.
20693
20694 2002-03-19 Paul Eggert <eggert@twinsun.com>
20695
20696 * src/bison.simple (YYCOPY): New macro.
20697 (YYSTACK_RELOCATE): Use it.
20698 Remove Type arg; no longer needed. All callers changed.
20699 (yymemcpy): Remove; no longer needed.
20700
20701 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
20702 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
20703
20704 2002-03-19 Akim Demaille <akim@epita.fr>
20705
20706 Test and fix the #line outputs.
20707
20708 * tests/atlocal.at (GCC): New.
20709 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
20710 (Prologue synch line, %union synch line, Postprologue synch line)
20711 (Action synch line, Epilogue synch line): New tests.
20712 * src/reader.c (parse_union_decl): Define the muscle stype_line.
20713 * data/bison.simple, data/bison.c++: Use it.
20714
20715 2002-03-19 Akim Demaille <akim@epita.fr>
20716
20717 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
20718 (Solved SR Conflicts, %expect not enough, %expect right)
20719 (%expect too much): Move to...
20720 * tests/conflicts.at: this new file.
20721
20722 2002-03-19 Akim Demaille <akim@epita.fr>
20723
20724 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
20725 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
20726 that we can move to enums for instance.
20727 * src/output.c (token_definitions_output): Output a list of
20728 `token-name, token-number' instead of the #define.
20729 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
20730
20731 2002-03-14 Akim Demaille <akim@epita.fr>
20732
20733 Use Gettext 0.11.1.
20734
20735 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
20736
20737 * data/bison.c++: Make the user able to add members to the generated
20738 parser by subclassing.
20739
20740 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
20741
20742 * src/reader.c (read_additionnal_code): `c' should be an integer, not
20743 a character.
20744 Reported by Nicolas Tisserand and Nicolas Burrus.
20745
20746 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20747
20748 * src/reader.c: Warn about lacking semi-colons, do not complain.
20749
20750 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20751
20752 * data/bison.c++: Remove a debug line.
20753
20754 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
20755
20756 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
20757 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
20758 provide a default implementation.
20759
20760 2002-03-04 Akim Demaille <akim@epita.fr>
20761
20762 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
20763 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
20764 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
20765 * tests/semantic.at (Parsing Guards): Similarly.
20766 * src/reader.at (readgram): Complain if the last rule is not ended
20767 with a semi-colon.
20768
20769 2002-03-04 Akim Demaille <akim@epita.fr>
20770
20771 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
20772 * src/closure.c: here.
20773 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
20774 RTC.
20775 * src/warshall.h, src/warshall.c: Remove.
20776 * tests/sets.at (Broken Closure): Adjust.
20777
20778 2002-03-04 Akim Demaille <akim@epita.fr>
20779
20780 * src/output.c (output_skeleton): tempdir is const.
20781 bytes_read is unused.
20782
20783 2002-03-04 Akim Demaille <akim@epita.fr>
20784
20785 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20786 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
20787 Update.
20788 From Michael Hayes.
20789
20790 2002-03-04 Akim Demaille <akim@epita.fr>
20791
20792 * src/closure.c (closure): `r' is unused.
20793
20794 2002-03-04 Akim Demaille <akim@epita.fr>
20795
20796 * tests/sets.at (Broken Closure): Add the ending `;'.
20797 * src/reader.at (readgram): Complain if a rule is not ended with a
20798 semi-colon.
20799
20800 2002-03-04 Akim Demaille <akim@epita.fr>
20801
20802 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
20803 (count_sr_conflicts): Use bitset_count.
20804 * src/reduce.c (inaccessable_symbols): Ditto.
20805 (bits_size): Remove.
20806 * src/warshall.h, src/warshall.c: Convert to bitsetv.
20807
20808 2002-03-04 Akim Demaille <akim@epita.fr>
20809
20810 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
20811 * src/reduce.c: Remove the `bitset_zero's following the
20812 `bitset_create's, as now it is performed by the latter.
20813
20814 2002-03-04 Akim Demaille <akim@epita.fr>
20815
20816 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
20817 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
20818 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
20819 latest sources from Michael.
20820
20821 2002-03-04 Akim Demaille <akim@epita.fr>
20822
20823 * src/output.c (output): Don't free the grammar.
20824 * src/reader.c (grammar_free): New.
20825 * src/main.c (main): Call it and don't free symtab here.
20826
20827 2002-03-04 Akim Demaille <akim@epita.fr>
20828
20829 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
20830 before returning.
20831 Reported by Benoit Perrot.
20832
20833 2002-03-04 Akim Demaille <akim@epita.fr>
20834
20835 Use bitset operations when possible, not loops over bits.
20836
20837 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
20838 bitset_or.
20839 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
20840 * src/reduce.c (useless_nonterminals): Formatting changes.
20841 * src/warshall.c (TC): Use bitset_or.
20842
20843 2002-03-04 Akim Demaille <akim@epita.fr>
20844
20845 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
20846 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
20847 Ditto.
20848
20849 2002-03-04 Akim Demaille <akim@epita.fr>
20850
20851 * src/lalr.c (F): Now a bitset*.
20852 Adjust all dependencies.
20853
20854 2002-03-04 Akim Demaille <akim@epita.fr>
20855
20856 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
20857 Adjust all dependencies.
20858
20859 2002-03-04 Akim Demaille <akim@epita.fr>
20860
20861 * src/L0.c, src/LR0.h (nstates): Be size_t.
20862 Adjust comparisons (signed vs unsigned).
20863 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
20864 bitset*.
20865 Adjust all dependencies.
20866
20867 2002-03-04 Akim Demaille <akim@epita.fr>
20868
20869 * src/closure.c (firsts): Now, also a bitset.
20870 Adjust all dependencies.
20871 (varsetsize): Remove, now unused.
20872 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
20873
20874 2002-03-04 Akim Demaille <akim@epita.fr>
20875
20876 * src/print.c: Convert to use bitset.h, not hand coded iterations
20877 over ints.
20878
20879 2002-03-04 Akim Demaille <akim@epita.fr>
20880
20881 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
20882
20883 2002-03-04 Akim Demaille <akim@epita.fr>
20884
20885 * src/closure.c (ruleset): Be a bitset.
20886 (rulesetsize): Remove.
20887
20888 2002-03-04 Akim Demaille <akim@epita.fr>
20889
20890 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20891 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
20892 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
20893 * src/closure.c (fderives): Be an array of bitsets.
20894
20895 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
20896
20897 * data/bison.c++: Merge the two generated headers. Insert a copyright
20898 notice in each output file.
20899
20900 2002-02-28 Akim Demaille <akim@epita.fr>
20901
20902 * data/bison.c++: Copy the prologue of bison.simple to fetch
20903 useful M4 definitions, such as b4_header_guard.
20904
20905 2002-02-25 Akim Demaille <akim@epita.fr>
20906
20907 * src/getargs.c (version): Give the name of the authors, and use a
20908 translator friendly scheme for the bgr
20909 copyright notice.
20910
20911 2002-02-25 Akim Demaille <akim@epita.fr>
20912
20913 * src/output.c (header_output): Remove, now handled completely via
20914 M4.
20915
20916 2002-02-25 Akim Demaille <akim@epita.fr>
20917
20918 * m4/m4.m4: New, from CVS Autoconf.
20919 * configure.in: Invoke it.
20920 * src/output.c (output_skeleton): Use its result instead of the
20921 hard coded name.
20922
20923 2002-02-25 Akim Demaille <akim@epita.fr>
20924
20925 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
20926 Fileutils 4.1.5.
20927 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
20928 * src/output.c (output_skeleton): Use mkstemp to create a real
20929 temporary file.
20930 Move the filling of `skeleton' and its muscle to...
20931 (prepare): here.
20932 (output): Move the definition of the prologue muscle to...
20933 (prepare): here.
20934 * src/system.h (DEFAULT_TMPDIR): New.
20935
20936 2002-02-14 Paul Eggert <eggert@twinsun.com>
20937
20938 Remove the support for C++ namespace cleanliness; it was
20939 causing more problems than it was curing, since it didn't work
20940 properly on some nonstandard C++ compilers. This can wait
20941 for a proper C++ parser.
20942
20943 * NEWS: Document this.
20944 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
20945 of C++, as it's treated like C now.
20946 * src/bison.simple (YYSTD): Remove.
20947 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
20948 Treat C++ just like Standard C instead of trying to support
20949 namespace cleanliness.
20950
20951 2002-02-14 Akim Demaille <akim@epita.fr>
20952
20953 * tests/regression.at (else): Adjust to Andreas' change.
20954
20955 2002-02-14 Akim Demaille <akim@epita.fr>
20956
20957 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
20958
20959 2002-02-13 Andreas Schwab <schwab@suse.de>
20960
20961 * src/output.c (output_rule_data): Don't output NULL, it might
20962 not be defined yet.
20963
20964 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
20965
20966 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
20967 (Copyright notice): Update.
20968
20969 2002-02-11 Akim Demaille <akim@epita.fr>
20970
20971 * tests/regression.at (%nonassoc and eof): Don't include
20972 nonportable headers.
20973
20974 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
20975
20976 * data/bison.c++: Correct error recovery. Make the user able to
20977 initialize the starting location.
20978
20979 2002-02-07 Akim Demaille <akim@epita.fr>
20980
20981 * tests/input.at: New.
20982
20983 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20984
20985 * data/bison.c++: Replace some direct m4 expansions by constants. Be
20986 more consistent when naming methods and variables. Put preprocessor
20987 directives around tables only needed for debugging.
20988
20989 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20990
20991 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
20992 C++ parsers.
20993 (yy::b4_name::parse): Use print_.
20994
20995 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
20996
20997 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20998
20999 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
21000
21001 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
21002 C++ parsers.
21003 (yy::b4_name::parse): Build verbose error messages, and use error_.
21004
21005 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
21006
21007 * data/bison.c++: Fix m4 quoting in comments.
21008
21009 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
21010
21011 * data/bison.c++: Adjust the parser code. Fix some muscles that were
21012 not expanded by m4.
21013
21014 2002-02-05 Akim Demaille <akim@epita.fr>
21015
21016 * data/bison.c++: Adjust to the M4 back end.
21017 More is certainly needed.
21018
21019 2002-02-05 Akim Demaille <akim@epita.fr>
21020
21021 Give a try to M4 as a back end.
21022
21023 * lib/readpipe.c: New, from wdiff.
21024 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
21025 BISON_HAIRY.
21026 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
21027 specific values. Now it is m4 that performs the lookup.
21028 * src/parse-skel.y: Remove.
21029 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
21030 * src/output.c (actions_output, guards_output)
21031 (token_definitions_output): No longer keeps track of the output
21032 line number, hence remove the second argument.
21033 (guards_output): Check against the guard member of a rule, not the
21034 action member.
21035 Adjust callers.
21036 (output_skeleton): Don't look for the skeleton location, let m4 do
21037 that.
21038 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
21039 file will be used.
21040 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
21041 (prepare): Given that for the time being changesyntax is not
21042 usable in M4, rename the muscles using `-' to `_'.
21043 Define `defines_flag', `output_parser_name' and `output_header_name'.
21044 * src/output.h (actions_output, guards_output)
21045 (token_definitions_output): Adjust prototypes.
21046 * src/scan-skel.l: Instead of scanning the skeletons, it now
21047 processes the output of m4: `__oline__' and `#output'.
21048 * data/bison.simple: Adjust to be used by M4(sugar).
21049 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
21050 to date.
21051 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
21052 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
21053 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
21054 shamelessly stolen from CVS Autoconf.
21055
21056 2002-02-05 Akim Demaille <akim@epita.fr>
21057
21058 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
21059 * configure.in: Check for the declarations of free and malloc.
21060 * src/muscle_tab.c: Adjust.
21061
21062 2002-02-05 Akim Demaille <akim@epita.fr>
21063
21064 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
21065 which have no values.
21066
21067 2002-02-05 Akim Demaille <akim@epita.fr>
21068
21069 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
21070 * data/: here.
21071
21072 2002-01-29 Paul Eggert <eggert@twinsun.com>
21073
21074 * src/bison.simple (YYSIZE_T): Do not define merely because
21075 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
21076 On some platforms, <alloca.h> does not declare YYSTD (size_t).
21077
21078 2002-01-27 Akim Demaille <akim@epita.fr>
21079
21080 Fix `%nonassoc and eof'.
21081
21082 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
21083 which were not properly copied! Replace
21084 memcpy (res->errs, src->errs, src->nerrs);
21085 with
21086 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
21087 !!!
21088 * tests/regression.at (%nonassoc and eof): Adjust to newest
21089 Autotest: `.' is not in the PATH.
21090
21091 2002-01-27 Akim Demaille <akim@epita.fr>
21092
21093 * tests/sets.at (AT_EXTRACT_SETS): New.
21094 (Nullable): Use it.
21095 (Firsts): New.
21096
21097 2002-01-26 Akim Demaille <akim@epita.fr>
21098
21099 * tests/actions.at, tests/calc.at, tests/headers.at,
21100 * tests/torture.at: Adjust to the newest Autotest which no longer
21101 forces `.' in the PATH.
21102
21103 2002-01-25 Akim Demaille <akim@epita.fr>
21104
21105 * tests/regression.at (%nonassoc and eof): New.
21106 Suggested by Robert Anisko.
21107
21108 2002-01-24 Akim Demaille <akim@epita.fr>
21109
21110 Bison dumps core when trying to complain about broken input files.
21111 Reported by Cris van Pelt.
21112
21113 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
21114 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
21115 into...
21116 (Invalid inputs): Strengthen: exercise parse_percent_token.
21117
21118 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
21119
21120 * src/Makefile.am: Add bison.c++.
21121 * src/bison.c++: New skeleton.
21122
21123 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
21124
21125 * po/it.po: New.
21126
21127 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
21128
21129 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
21130
21131 2002-01-20 Marc Autret <marc@gnu.org>
21132
21133 * src/files.c (compute_output_file_names): Fix
21134
21135 2002-01-20 Marc Autret <marc@gnu.org>
21136
21137 * tests/output.at: New test.
21138 * src/files.c (compute_base_names): Don't map extensions when
21139 the YACC flag is set, use defaults.
21140 Reported by Evgeny Stambulchik.
21141
21142 2002-01-20 Marc Autret <marc@gnu.org>
21143
21144 * src/system.h: Need to define __attribute__ away for non-GCC
21145 compilers as well (i.e., the vendor C compiler).
21146 Suggested by Albert Chin-A-Young.
21147
21148 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
21149
21150 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
21151 canonical definition.
21152 * src/system.h: Use the canonical definition for PARAMS (avoids
21153 a conflict with the macro from lib/hash.h).
21154
21155 2002-01-11 Akim Demaille <akim@epita.fr>
21156
21157 * configure.in: Use AC_FUNC_STRNLEN.
21158 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
21159
21160 2002-01-09 Akim Demaille <akim@epita.fr>
21161
21162 * src/files.c, src/files.h (output_infix): New.
21163 (tab_extension): Remove.
21164 (compute_base_names): Compute the former, drop the latter.
21165 * src/output.c (prepare): Insert the muscles `output-infix', and
21166 `output-suffix'.
21167 * src/parse-skel.y (string, string.1): New.
21168 (section.header): Use it.
21169 (section.yacc): Remove.
21170 (prefix): Remove too.
21171 * src/scan-skel.l: Adjust.
21172 * src/bison.simple, src/bison.hairy: Adjust.
21173
21174 2002-01-09 Akim Demaille <akim@epita.fr>
21175
21176 * configure.in (WERROR_CFLAGS): Compute it.
21177 * src/Makefile.am (CFLAGS): Pass it.
21178 * tests/atlocal.in (CFLAGS): Idem.
21179 * src/files.c: Fix a few warnings.
21180 (get_extension_index): Remove, unused.
21181
21182 2002-01-08 Akim Demaille <akim@epita.fr>
21183
21184 * src/getargs.c (AS_FILE_NAME): New.
21185 (getargs): Use it to convert DOSish file names.
21186 * src/files.c (base_name): Rename as full_base_name to avoid
21187 clashes with `base_name ()'.
21188 (filename_split): New.
21189 (compute_base_names): N-th rewrite, using filename_split.
21190
21191 2002-01-08 Akim Demaille <akim@epita.fr>
21192
21193 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
21194 New, stolen from the Fileutils 4.1.
21195 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21196 * configure.in: Check for the presence of memrchr, and of its
21197 prototype.
21198
21199 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
21200
21201 * lib/hash.h (__P): Added definition for this macro.
21202 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
21203 BUILT_SOURCES, to ensure they are generated first.
21204 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
21205 %error-verbose to allow bootstrapping with bison 1.30x.
21206
21207 2002-01-06 Akim Demaille <akim@epita.fr>
21208
21209 * src/reader.c (parse_braces): Don't fetch the next char, the
21210 convention is to fetch on entry.
21211 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
21212 'switch' without a following semicolon.
21213 * tests/regression.at (braces parsing): New.
21214
21215 2002-01-06 Akim Demaille <akim@epita.fr>
21216
21217 Bison is dead wrong in its RR conflict reports.
21218
21219 * tests/torture.at (GNU Cim Grammar): New.
21220 * src/conflicts.c (count_rr_conflicts): Fix.
21221
21222 2002-01-06 Akim Demaille <akim@epita.fr>
21223
21224 Creating package.m4 from configure.ac causes too many problems.
21225
21226 * tests/Makefile.am (package.m4): Create it by hand,
21227 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
21228
21229 2002-01-06 Akim Demaille <akim@epita.fr>
21230
21231 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
21232 skeleton.h.
21233
21234 2002-01-04 Paul Eggert <eggert@twinsun.com>
21235
21236 * doc/bison.texinfo (Debugging):
21237 Remove YYSTDERR; it's no longer defined or used.
21238 Also, s/cstdio.h/cstdio/.
21239
21240 2002-01-03 Akim Demaille <akim@epita.fr>
21241
21242 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
21243
21244 2002-01-03 Akim Demaille <akim@epita.fr>
21245
21246 * src/parse-skel.y (process_skeleton): Don't bind the parser's
21247 tracing code to --trace, wait for a better --trace option, with
21248 args.
21249
21250 2002-01-03 Akim Demaille <akim@epita.fr>
21251
21252 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
21253 The ISO C++ standard is extremely clear about it: stderr is
21254 considered a macro, not a regular symbol (see table 94 `Header
21255 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
21256 Therefore std:: does not apply to it. It still does with fprintf.
21257 Also, s/cstdio.h/cstdio/.
21258
21259 2002-01-03 Akim Demaille <akim@epita.fr>
21260
21261 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
21262 for non system headers.
21263
21264 2002-01-02 Akim Demaille <akim@epita.fr>
21265
21266 Equip the skeleton chain with location tracking, runtime trace,
21267 pure parser and scanner.
21268
21269 * src/parse-skel.y: Request a pure parser, locations, and prefix
21270 renaming.
21271 (%union): Having several members with the same type does not help
21272 type mismatches, simplify.
21273 (YYPRINT, yyprint): New.
21274 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
21275 (skel_error): this.
21276 Handle locations.
21277 * src/scan-skel.l: Adjust to these changes.
21278 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
21279 (LOCATION_PRINT, skel_control_t): New.
21280
21281 2001-12-30 Akim Demaille <akim@epita.fr>
21282
21283 * src/parse-skel.y: Get rid of the shift/reduce conflict:
21284 replace `gb' with BLANKS.
21285 * src/scan-skel.l: Adjust.
21286
21287 2001-12-30 Akim Demaille <akim@epita.fr>
21288
21289 * src/system.h: We don't need nor want bcopy.
21290 Throw away MS-DOS crap: we don't need getpid.
21291 * configure.in: We don't need strndup. It was even causing
21292 problems: because Flex includes the headers *before* us,
21293 _GNU_SOURCE is not defined by config.h, and therefore strndup was
21294 not visible.
21295 * lib/xstrndup.c: New.
21296 * src/scan-skel.l: Use it.
21297 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
21298 * src/parse-skel.y: Use %directives instead of #defines.
21299
21300 2001-12-30 Akim Demaille <akim@epita.fr>
21301
21302 * src/skeleton.h: New.
21303 * src/output.c (output_parser, output_master_parser): Remove, dead
21304 code.
21305 * src/output.h (get_lines_number, actions_output, guards_output)
21306 (token_definitions_output): Prototype them.
21307 * src/parse-skel.y: Add the license notice.
21308 Include output.h and skeleton.h.
21309 (process_skeleton): Returns void, and takes a single parameter.
21310 * src/scan-skel.l: Add the license notice.
21311 Include skeleton.h.
21312 Don't use %option yylineno: it seems that then Flex imagines
21313 REJECT has been used, and therefore it won't reallocate its
21314 buffers (which makes no other sense to me than a bug). It results
21315 in warnings for `unused: yy_flex_realloc'.
21316
21317 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
21318
21319 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21320 (MUSCLE_INSERT_PREFIX): ...to there.
21321 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
21322 (MUSCLE_INSERT_PREFIX): Move from here...
21323
21324 * src/bison.hairy: Add a section directive. Put braces around muscle
21325 names. This parser skeleton is still broken, but Bison should not
21326 choke on a bad muscle 'syntax'.
21327 * src/bison.simple: Add a section directive. Put braces around muscle
21328 names.
21329
21330 * src/files.h (strsuffix, stringappend): Add declarations.
21331 (tab_extension): Add declaration.
21332 (short_base_name): Add declaration.
21333
21334 * src/files.c (strsuffix, stringappend): No longer static. These
21335 functions are used in the skeleton parser.
21336 (tab_extension): New.
21337 (compute_base_names): Use the computations done in this function
21338 to guess if the generated parsers should have '.tab' in their
21339 names.
21340 (short_base_name): No longer static.
21341
21342 * src/output.c (output_skeleton): New.
21343 (output): Disable call to output_master_parser, and give a try to
21344 a new skeleton handling system.
21345 (guards_output, actions_output): No longer static.
21346 (token_definitions_output, get_lines_number): No longer static.
21347
21348 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
21349
21350 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
21351 parse-skel.y.
21352
21353 * src/parse-skel.y: New file.
21354 * src/scan-skel.l: New file.
21355
21356 2001-12-29 Akim Demaille <akim@epita.fr>
21357
21358 %name-prefix is broken.
21359
21360 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
21361 Adjust all dependencies.
21362 * tests/headers.at (export YYLTYPE): Strengthen this test: use
21363 %name-prefix.
21364
21365 Renaming yylval but not yylloc is not consistent. Now we do.
21366
21367 * src/bison.simple: Prefix yylloc if used.
21368 * doc/bison.texinfo (Decl Summary): Document that.
21369
21370 2001-12-29 Akim Demaille <akim@epita.fr>
21371
21372 * doc/bison.texinfo: Promote `%long-directive' over
21373 `%long_directive'.
21374 Remove all references to fixed-output-files, yacc is enough.
21375
21376 2001-12-29 Akim Demaille <akim@epita.fr>
21377
21378 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
21379 user prologue. These are defaults.
21380 * tests/actions.at (Mid-rule actions): Make sure the user can
21381 define YYDEBUG and YYERROR_VERBOSE.
21382
21383 2001-12-29 Akim Demaille <akim@epita.fr>
21384
21385 * src/output.c (header_output): Don't forget to export YYLTYPE and
21386 yylloc.
21387 * tests/headers.at (export YYLTYPE): New, make sure it does.
21388 * tests/regression.at (%union and --defines, Invalid CPP headers):
21389 Move to...
21390 * tests/headers.at: here.
21391
21392 2001-12-29 Akim Demaille <akim@epita.fr>
21393
21394 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
21395
21396 2001-12-29 Akim Demaille <akim@epita.fr>
21397
21398 * tests/actions.at (Mid-rule actions): Output on a single line
21399 instead of several.
21400
21401 2001-12-29 Akim Demaille <akim@epita.fr>
21402
21403 * doc/bison.texinfo: Formatting changes.
21404
21405 2001-12-29 Akim Demaille <akim@epita.fr>
21406
21407 Don't store the token defs in a muscle, just be ready to output it
21408 on command. Now possible via `symbols'. Fixes a memory leak.
21409
21410 * src/output.c (token_definitions_output): New.
21411 (output_parser, header_output): Use it.
21412 * src/reader.c (symbols_save): Remove.
21413
21414 2001-12-29 Akim Demaille <akim@epita.fr>
21415
21416 * src/bison.simple: Do not provide a default for YYSTYPE and
21417 YYLTYPE before the user's prologue. Otherwise it's hardly... a
21418 default.
21419
21420 2001-12-29 Akim Demaille <akim@epita.fr>
21421
21422 Mid-rule actions are simply... ignored!
21423
21424 * src/reader.c (readgram): Be sure to attach mid-rule actions to
21425 the empty-rule associated to the dummy symbol, not to the host
21426 rule.
21427 * tests/actions.at (Mid-rule actions): New.
21428
21429 2001-12-29 Akim Demaille <akim@epita.fr>
21430
21431 Memory leak.
21432
21433 * src/reader.c (reader): Free grammar.
21434
21435 2001-12-29 Akim Demaille <akim@epita.fr>
21436
21437 Memory leak.
21438
21439 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
21440 since it allocates it for each state, although only one is needed.
21441 (allocate_storage): Do it here.
21442
21443 2001-12-29 Akim Demaille <akim@epita.fr>
21444
21445 * src/options.h, src/options.c (create_long_option_table): Rename
21446 as...
21447 (long_option_table_new): this, with a clearer prototype.
21448 (percent_table): Remove, unused,
21449 * src/getargs.c (getargs): Adjust.
21450
21451 2001-12-29 Akim Demaille <akim@epita.fr>
21452
21453 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
21454 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
21455 as states.
21456
21457 2001-12-29 Akim Demaille <akim@epita.fr>
21458
21459 * src/lalr.c (build_relations): Rename `states' as `states1'.
21460 Sorry, I don't understand exactly what it is, no better name...
21461
21462 2001-12-29 Akim Demaille <akim@epita.fr>
21463
21464 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
21465 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
21466 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
21467 as rules.
21468
21469 2001-12-29 Akim Demaille <akim@epita.fr>
21470
21471 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
21472 ago.
21473
21474 2001-12-29 Akim Demaille <akim@epita.fr>
21475
21476 * src/reader.c, src/reader.h (user_toknums): Remove.
21477 Adjust all users to use symbols[i]->user_token_number.
21478
21479 2001-12-29 Akim Demaille <akim@epita.fr>
21480
21481 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
21482 Adjust all users to use symbols[i]->prec or ->assoc.
21483
21484 2001-12-29 Akim Demaille <akim@epita.fr>
21485
21486 * src/reader.c, src/reader.h (tags): Remove.
21487 Adjust all users to use symbols[i]->tag.
21488
21489 2001-12-29 Akim Demaille <akim@epita.fr>
21490
21491 * src/gram.h, src/gram.c (symbols): New, similar to state_table
21492 and rule_table.
21493 * src/reader.c (packsymbols): Fill this table.
21494 Drop sprec.
21495 * src/conflicts.c (resolve_sr_conflict): Adjust.
21496 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
21497 single table.
21498 Use symbols[i]->tag instead of tags[i].
21499
21500 2001-12-29 Akim Demaille <akim@epita.fr>
21501
21502 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
21503 In addition, put a comment in there, to replace...
21504 * tests/regression.at (%union and C comments): Remove.
21505
21506 2001-12-29 Akim Demaille <akim@epita.fr>
21507
21508 * tests/regression.at (Web2c Actions): Blindly move the actual
21509 output as expected output. The contents *seem* right to me, but I
21510 can't pretend reading perfectly parser tables... Nonetheless, all
21511 the other tests pass correctly, the table look OK, even though the
21512 presence of `$axiom' is to be noted: AFAICS it is useless (but
21513 harmless).
21514
21515 2001-12-29 Akim Demaille <akim@epita.fr>
21516
21517 * src/reader.c (readgram): Don't add the rule 0 if there were no
21518 rules read. In other words, add it _after_ having performed
21519 grammar sanity checks.
21520 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
21521
21522 2001-12-29 Akim Demaille <akim@epita.fr>
21523
21524 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
21525 visible, and some states have now a different number.
21526
21527 2001-12-29 Akim Demaille <akim@epita.fr>
21528
21529 * src/reader.c (readgram): Bind the initial rule's lineno to that
21530 of the first rule.
21531 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
21532 (Solved SR Conflicts): Adjust rule 0's line number.
21533
21534 2001-12-29 Akim Demaille <akim@epita.fr>
21535
21536 Fix the `GAWK Grammar' failure.
21537
21538 * src/LR0.c (final_state): Initialize to -1 so that we do compute
21539 the reductions of the first state which was mistakenly confused
21540 with the final state because precisely final_state was initialized
21541 to 0.
21542 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
21543 now noticed by Bison.
21544 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
21545 have a reduction on $default.
21546
21547 2001-12-29 Akim Demaille <akim@epita.fr>
21548
21549 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
21550 rule line numbers.
21551 * src/closure.c (print_closure): Likewise.
21552 * src/derives.c (print_derives): Likewise.
21553 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
21554 now.
21555
21556 2001-12-29 Akim Demaille <akim@epita.fr>
21557
21558 * src/lalr.c (lookaheads_print): New.
21559 (lalr): Call it when --trace-flag.
21560 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
21561 are dumped.
21562
21563 2001-12-29 Akim Demaille <akim@epita.fr>
21564
21565 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
21566 when walking through ritem, even via rule->rhs.
21567 * src/reduce.c (dump_grammar, useful_production, reduce_output)
21568 (useful_production, useless_nonterminals): Likewise.
21569 (reduce_grammar_tables): Likewise, plus update nritems.
21570 * src/nullable.c (set_nullable): Likewise.
21571 * src/lalr.c (build_relations): Likewise.
21572 * tests/sets.at (Nullable): Adjust.
21573 Fortunately, now, the $axiom is no longer nullable.
21574
21575 2001-12-29 Akim Demaille <akim@epita.fr>
21576
21577 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
21578 the 0-sentinel.
21579 * src/gram.c (ritem_longest_rhs): Likewise.
21580 * src/reduce.c (nonterminals_reduce): Likewise.
21581 * src/print_graph.c (print_graph): Likewise.
21582 * src/output.c (output_rule_data): Likewise.
21583 * src/nullable.c (set_nullable): Likewise.
21584
21585 2001-12-29 Akim Demaille <akim@epita.fr>
21586
21587 * src/output.c: Comment changes.
21588
21589 2001-12-27 Paul Eggert <eggert@twinsun.com>
21590
21591 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
21592 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
21593 Sparc, as they were causing more porting problems than the
21594 (minor) performance improvement was worth.
21595
21596 Also, catch up with 1.31's YYSTD.
21597
21598 2001-12-27 Akim Demaille <akim@epita.fr>
21599
21600 * src/output.c (output_gram): Rely on nritems, not the
21601 0-sentinel. See below.
21602 Use -1 as separator, not 0.
21603 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
21604 Rely on -1 as separator in yyrhs, instead of 0.
21605 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
21606 twice `Now at end of input', therefore there are two lines less to
21607 expect.
21608
21609 2001-12-27 Akim Demaille <akim@epita.fr>
21610
21611 * tests/regression.at (Unresolved SR Conflicts):
21612 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
21613 below.
21614
21615 2001-12-27 Akim Demaille <akim@epita.fr>
21616
21617 * src/LR0.c (new_state): Recognize the final state by the fact it
21618 is reached by eoftoken.
21619 (insert_start_shifting_state, insert_eof_shifting_state)
21620 (insert_accepting_state, augment_automaton): Remove, since now
21621 these states are automatically computed from the initial state.
21622 (generate_states): Adjust.
21623 * src/print.c: When reporting a rule number to the user, substract
21624 1, so that the axiom rule is rule 0, and the first user rule is 1.
21625 * src/reduce.c: Likewise.
21626 * src/print_graph.c (print_core): For the time being, just as for
21627 the report, depend upon --trace-flags to dump the full set of
21628 items.
21629 * src/reader.c (readgram): Once the grammar read, insert the rule
21630 0: `$axiom: START-SYMBOL $'.
21631 * tests/set.at: Adjust: rule 0 is now displayed, and since the
21632 number of the states has changed (the final state is no longer
21633 necessarily the last), catch up.
21634
21635 2001-12-27 Akim Demaille <akim@epita.fr>
21636
21637 Try to make the use of the eoftoken valid. Given that its value
21638 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
21639 is used instead of > 0 where appropriate, (ii), depend upon nritems
21640 instead of the 0-sentinel.
21641
21642 * src/gram.h, src/gram.c (nritems): New.
21643 Expected to be duplication of nitems, but for the time being...
21644 * src/reader.c (packgram): Assert nritems and nitems are equal.
21645 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
21646 * src/closure.c (print_closure, print_fderives): Likewise.
21647 * src/gram.c (ritem_print): Likewise.
21648 * src/print.c (print_core, print_grammar): Likewise.
21649 * src/print_graph.c: Likewise.
21650
21651 2001-12-27 Akim Demaille <akim@epita.fr>
21652
21653 * src/main.c (main): If there are complains after grammar
21654 reductions, then output the report anyway if requested, then die.
21655 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
21656 * src/reader.c (eoftoken): New.
21657 (parse_token_decl): If the token being defined has value `0', it
21658 is the eoftoken.
21659 (packsymbols): No longer hack `tags' to insert `$' by hand.
21660 Be sure to preserve the value of the eoftoken.
21661 (reader): Make sure eoftoken is defined.
21662 Initialize nsyms to 0: now eoftoken is created just like the others.
21663 * src/print.c (print_grammar): Don't special case the eof token.
21664 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
21665 lie anyway, albeit pleasant.
21666 * tests/calc.at: Exercise error messages with eoftoken.
21667 Change the grammar so that empty input is invalid.
21668 Adjust expectations.
21669 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
21670
21671 2001-12-27 Akim Demaille <akim@epita.fr>
21672
21673 * configure.in: Check the protos of strchr ans strspn.
21674 Replace strchr if needed.
21675 * src/system.h: Provide the protos of strchr, strspn and memchr if
21676 missing.
21677 * lib/strchr.c: New.
21678 * src/reader.c (symbols_save): Use strchr.
21679
21680 2001-12-27 Akim Demaille <akim@epita.fr>
21681
21682 * src/print.c, src/print_graph.c (escape): New.
21683 Use it to quote the TAGS outputs.
21684 * src/print_graph.c (print_state): Now errors are in red, and
21685 reductions in green.
21686 Prefer high to wide: output the state number on a line of its own.
21687
21688 2001-12-27 Akim Demaille <akim@epita.fr>
21689
21690 * src/state.h, src/state.c (reductions_new): New.
21691 * src/LR0.c (set_state_table): Let all the states have a
21692 `reductions', even if reduced to 0.
21693 (save_reductions): Adjust.
21694 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
21695 * src/print.c (print_reductions, print_actions): Adjust.
21696 * src/output.c (action_row): Adjust.
21697
21698 2001-12-27 Akim Demaille <akim@epita.fr>
21699
21700 * src/state.h, src/state.c (errs_new, errs_dup): New.
21701 * src/LR0.c (set_state_table): Let all the states have an errs,
21702 even if reduced to 0.
21703 * src/print.c (print_errs, print_reductions): Adjust.
21704 * src/output.c (output_actions, action_row): Adjust.
21705 * src/conflicts.c (resolve_sr_conflict): Adjust.
21706
21707 2001-12-27 Akim Demaille <akim@epita.fr>
21708
21709 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
21710
21711 2001-12-27 Akim Demaille <akim@epita.fr>
21712
21713 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
21714 * src/print.c: here.
21715 (lookaheadset, shiftset): New, used as additional storage by
21716 print_reductions.
21717 (print_results): Adjust.
21718 (print_shifts, print_gotos, print_errs): New, extracted from...
21719 (print_actions): here.
21720 * src/print_graph.c (print_actions): Remove dead code.
21721
21722 2001-12-27 Akim Demaille <akim@epita.fr>
21723
21724 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
21725 `$n' and `@n'.
21726
21727 2001-12-27 Akim Demaille <akim@epita.fr>
21728
21729 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
21730 (build_relations): Adjust.
21731
21732 2001-12-27 Akim Demaille <akim@epita.fr>
21733
21734 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
21735 duplication.
21736
21737 2001-12-27 Akim Demaille <akim@epita.fr>
21738
21739 * src/reader.c (packgram): Catch nitems overflows.
21740
21741 2001-12-27 Akim Demaille <akim@epita.fr>
21742
21743 * src/files.c, src/files.h (guard_obstack): Remove.
21744 * src/output.c (output): Adjust.
21745 * src/reader.c (parse_braces): New, factoring...
21746 (copy_action, copy_guard): these two which are renamed as...
21747 (parse_action, parse_guard): these.
21748 As a voluntary consequence, using braces around guards is now
21749 mandatory.
21750
21751 2001-12-27 Akim Demaille <akim@epita.fr>
21752
21753 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
21754 * src/reader.c (symbol_list): `guard' and `guard_line' are new
21755 members.
21756 (symbol_list_new): Adjust.
21757 (copy_action): action_line is the first line, not the last.
21758 (copy_guard): Just as for actions, store the `action' only, not
21759 the switch/case/break flesh.
21760 Don't parse the user action that might follow the guard, let...
21761 (readgram): do it, i.e., now, there can be an action after a
21762 guard.
21763 In other words the guard is just explicitly optional.
21764 (packgram): Adjust.
21765 * src/output.c (guards_output): New.
21766 (output_parser): Call it when needed.
21767 (output): Also free the guard and attrs obstacks.
21768 * src/files.c, src/files.h (obstack_save): Remove.
21769 (output_files): Remove.
21770 As a result, if one needs the former `.act' file, using an
21771 appropriate skeleton which requires actions and guards is now
21772 required.
21773 * src/main.c (main): Adjust.
21774 * tests/semantic.at: New.
21775 * tests/regression.at: Use `input.y' as input file name.
21776 Avoid 8+3 problems by requiring input.c when the test needs the
21777 parser.
21778
21779 2001-12-27 Akim Demaille <akim@epita.fr>
21780
21781 * src/reader.c (symbol_list_new): Be sure to initialize all the
21782 fields.
21783
21784 2001-12-27 Akim Demaille <akim@epita.fr>
21785
21786 All the hacks using a final pseudo state are now useless.
21787
21788 * src/LR0.c (set_state_table): state_table holds exactly nstates.
21789 * src/lalr.c (nLA): New.
21790 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
21791 instead of lookaheadsp from the pseudo state (nstate + 1).
21792
21793 2001-12-27 Akim Demaille <akim@epita.fr>
21794
21795 * src/output.c (action_row, token_actions): Use a state_t instead
21796 of a integer, and nlookaheads instead of the following state's
21797 lookaheadsp.
21798
21799 2001-12-27 Akim Demaille <akim@epita.fr>
21800
21801 * src/conflicts.c (log_resolution, flush_shift)
21802 (resolve_sr_conflict, set_conflicts, solve_conflicts)
21803 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
21804 (conflicts_print, print_reductions): Use a state_t instead of an
21805 integer when referring to a state.
21806 As much as possible, depend upon nlookaheads, instead of the
21807 `lookaheadsp' member of the following state (since lookaheads of
21808 successive states are successive, the difference between state n + 1
21809 and n served as the number of lookaheads for state n).
21810 * src/lalr.c (add_lookback_edge): Likewise.
21811 * src/print.c (print_core, print_actions, print_state)
21812 (print_results): Likewise.
21813 * src/print_graph.c (print_core, print_actions, print_state)
21814 (print_graph): Likewise.
21815 * src/conflicts.h: Adjust.
21816
21817 2001-12-27 Akim Demaille <akim@epita.fr>
21818
21819 * src/bison.hairy: Formatting/comment changes.
21820 ANSIfy.
21821 Remove `register' indications.
21822 Add plenty of `static'.
21823
21824 2001-12-27 Akim Demaille <akim@epita.fr>
21825
21826 * src/output.c (prepare): Drop the muscle `ntbase' which
21827 duplicates ntokens.
21828 * src/bison.simple: Formatting/comment changes.
21829 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
21830 is an undocumented synonym.
21831
21832 2001-12-22 Akim Demaille <akim@epita.fr>
21833
21834 * src/output.c (output_table_data): Change the prototype to use
21835 `int' for array ranges: some invocations do pass an int, not a
21836 short.
21837 Reported by Wayne Green.
21838
21839 2001-12-22 Akim Demaille <akim@epita.fr>
21840
21841 Some actions of web2c.y are improperly triggered.
21842 Reported by Mike Castle.
21843
21844 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
21845 * tests/regression.at (Web2c): Rename as...
21846 (Web2c Report): this.
21847 (Web2c Actions): New.
21848
21849 2001-12-22 Akim Demaille <akim@epita.fr>
21850
21851 Reductions in web2c.y are improperly reported.
21852 Reported by Mike Castle.
21853
21854 * src/conflicts.c (print_reductions): Fix.
21855 * tests/regression.at (Web2c): New.
21856
21857 2001-12-18 Akim Demaille <akim@epita.fr>
21858
21859 Some host fail on `assert (!"foo")', which expands to
21860 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
21861 Reported by Nelson Beebee.
21862
21863 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
21864 `#define it_succeeded 0' and `assert (it_succeeded)'.
21865
21866 2001-12-17 Marc Autret <autret_m@epita.fr>
21867
21868 * src/bison.simple: Don't hard code the skeleton line and filename.
21869 * src/output.c (output_parser): Rename 'line' as 'output_line'.
21870 New line counter 'skeleton_line' (skeleton-line muscle).
21871
21872 2001-12-17 Paul Eggert <eggert@twinsun.com>
21873
21874 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
21875 YYDEBUG must be defined to a nonzero value.
21876
21877 * src/bison.simple (yytname): Do not assume that the user defines
21878 YYDEBUG to a properly parenthesized expression.
21879
21880 2001-12-17 Akim Demaille <akim@epita.fr>
21881
21882 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
21883 nlookaheads is a new member.
21884 Adjust all users.
21885 * src/lalr.h (nlookaheads): Remove this orphan declaration.
21886 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
21887 state.
21888
21889 2001-12-17 Akim Demaille <akim@epita.fr>
21890
21891 * src/files.h, src/files.c (open_files, close_files): Remove.
21892 * src/main.c (main): Don't open/close files, nor invoke lex_free,
21893 let...
21894 * src/reader.c (reader): Do it.
21895
21896 2001-12-17 Akim Demaille <akim@epita.fr>
21897
21898 * src/conflicts.c (print_reductions): Formatting changes.
21899
21900 2001-12-17 Akim Demaille <akim@epita.fr>
21901
21902 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
21903 (flush_reduce): New.
21904 (resolve_sr_conflict): Adjust.
21905
21906 2001-12-17 Akim Demaille <akim@epita.fr>
21907
21908 * src/output.c (output_obstack): Be static and rename as...
21909 (format_obstack): this, to avoid any confusion with files.c's
21910 output_obstack.
21911 * src/reader.h (muscle_obstack): Move to...
21912 * src/output.h: here, since it's defined in output.c.
21913
21914 2001-12-17 Akim Demaille <akim@epita.fr>
21915
21916 * src/output.c (action_row, save_column, default_goto)
21917 (sort_actions, matching_state, pack_vector): Better variable
21918 locality.
21919
21920 2001-12-17 Akim Demaille <akim@epita.fr>
21921
21922 * src/output.c: Various formatting changes.
21923
21924 2001-12-17 Akim Demaille <akim@epita.fr>
21925
21926 * src/files.c (output_files): Free the output_obstack.
21927 * src/main.c (main): Call print and print_graph conditionally.
21928 * src/print.c (print): Work unconditionally.
21929 * src/print_graph.c (print_graph): Work unconditionally.
21930 * src/conflicts.c (log_resolution): Output only if verbose_flag.
21931
21932 2001-12-16 Marc Autret <autret_m@epita.fr>
21933
21934 * src/output.c (actions_output): Fix. When we use %no-lines,
21935 there is one less line per action.
21936
21937 2001-12-16 Marc Autret <autret_m@epita.fr>
21938
21939 * src/bison.simple: Remove a useless #line directive.
21940 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
21941 * src/output.c (get_lines_number): New.
21942 (output_parser): Adjust, now takes care about the lines of a
21943 output muscles.
21944 Fix line numbering.
21945 (actions_output): Computes the number of lines taken by actions.
21946 (output_master_parser): Insert new skeleton which is the name of
21947 the output parser file name.
21948
21949 2001-12-15 Marc Autret <autret_m@epita.fr>
21950
21951 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
21952
21953 2001-12-15 Marc Autret <autret_m@epita.fr>
21954
21955 * src/output.c (output_gram): Keep track of the hairy one.
21956
21957 2001-12-15 Akim Demaille <akim@epita.fr>
21958
21959 Make `make distcheck' work.
21960
21961 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
21962 system.h which uses libgettext.h.
21963
21964 2001-12-15 Akim Demaille <akim@epita.fr>
21965
21966 * src/nullable.c (set_nullable): Useless rules must be skipped,
21967 otherwise, since we range over their symbols, we might look at a
21968 nonterminal which no longer ``exists'', i.e., it is not counted in
21969 `nvars', hence we overflow our arrays.
21970
21971 2001-12-15 Akim Demaille <akim@epita.fr>
21972
21973 The header can also be produced directly, without any obstack!
21974 Yahoo!
21975
21976 * src/files.c, src/files.h (defines_obstack): Remove.
21977 (compute_header_macro): Global.
21978 (defines_obstack_save): Remove.
21979 * src/reader.c (parse_union_decl): No longer output to
21980 defines_obstack: its content can be found in the `stype' muscle
21981 anyway.
21982 (output_token_translations): Merge into...
21983 (symbols_output): this.
21984 Rename as...
21985 (symbols_save): this.
21986 (reader): Adjust.
21987 * src/output.c (header_output): New.
21988 (output): Call it.
21989
21990 2001-12-15 Akim Demaille <akim@epita.fr>
21991
21992 * src/reader.c (parse_union_decl): Instead of handling two obstack
21993 simultaneously, use one to define the `stype' muscle, and use the
21994 value of the latter to fill defines_obstack.
21995 (copy_comment): Remove.
21996 (copy_comment2): Work for a single obstack.
21997 Rename as...
21998 (copy_comment): this.
21999
22000 2001-12-15 Akim Demaille <akim@epita.fr>
22001
22002 * src/lex.c, src/lex.h (xgetc): No longer static.
22003 * src/reader.c (parse_union_decl): Revamp.
22004
22005 2001-12-15 Akim Demaille <akim@epita.fr>
22006
22007 Still making progress in separating Bison into (i) input, (ii)
22008 process, (iii) output: now we can directly output the parser file
22009 without using table_obstack at all.
22010
22011 * src/files.c, src/files.h (table_obstack): Bye bye.
22012 (parser_file_name): New.
22013 * src/files.c (compute_output_file_names): Compute it.
22014 * src/output.c (actions_output, output_parser)
22015 (output_master_parser): To a file instead of an obstack.
22016
22017 2001-12-15 Akim Demaille <akim@epita.fr>
22018
22019 Attach actions to rules, instead of pre-outputting them to
22020 actions_obstack.
22021
22022 * src/gram.h (rule_t): action and action_line are new members.
22023 * src/reader.c (symbol_list): Likewise.
22024 (copy_action): Save the actions within the rule.
22025 (packgram): Save them in rule_table.
22026 * src/output.c (actions_output): New.
22027 (output_parser): Use it on `%%actions'.
22028 (output_rule_data): Don't free rule_table.
22029 (output): Do it.
22030 (prepare): Don't save the `action' muscle.
22031 * src/bison.simple: s/%%action/%%actions/.
22032
22033 2001-12-15 Akim Demaille <akim@epita.fr>
22034
22035 * src/reader.c (copy_action): When --yacc, don't append a `;'
22036 to the user action: let it fail if lacking.
22037 Suggested by Arnold Robbins and Tom Tromey.
22038
22039 2001-12-14 Akim Demaille <akim@epita.fr>
22040
22041 * src/lex.c (literalchar): Simply return the char you decoded, non
22042 longer mess around with obstacks and int pointers.
22043 Adjust all callers.
22044
22045 2001-12-14 Akim Demaille <akim@epita.fr>
22046
22047 * src/lex.c (literalchar): Don't escape the special characters,
22048 just decode them, and keep them as char (before, eol was output as
22049 the 2 char string `\n' etc.).
22050 * src/output.c (output_rule_data): Use quotearg to output the
22051 token strings.
22052
22053 2001-12-13 Paul Eggert <eggert@twinsun.com>
22054
22055 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
22056 Do not infringe on the global user namespace when using C++.
22057 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
22058 All uses of `fprintf' and `stderr' changed.
22059
22060 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
22061
22062 2001-12-13 Akim Demaille <akim@epita.fr>
22063
22064 The computation of nullable is broken: it doesn't handle empty
22065 RHS's properly.
22066
22067 * tests/torture.at (GNU AWK Grammar): New.
22068 * tests/sets.at (Nullable): New.
22069 * src/nullable.c (set_nullable): Instead of blindly looping over
22070 `ritems', loop over the rules, and then over their rhs's.
22071
22072 Work around Autotest bugs.
22073
22074 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
22075 frame, because Autotest understand lines starting with a `+' as
22076 traces from the shell. Then, they are not processed properly.
22077 Admittedly an Autotest bug, but we don't have time to wait for
22078 Autotest to catch up.
22079 * tests/regression.at (Broken Closure): Adjust to the new table
22080 frames.
22081 Move to...
22082 * tests/sets.at: here.
22083
22084 2001-12-13 Akim Demaille <akim@epita.fr>
22085
22086 * src/closure.c (closure): Use nrules instead of playing tricks
22087 with BITS_PER_WORD.
22088
22089 2001-12-13 Akim Demaille <akim@epita.fr>
22090
22091 * src/print.c (print_actions): Output the handling of `$' as the
22092 traces do: shifting the token EOF. Before EOF was treated as a
22093 nonterminal.
22094 * tests/regression.at: Adjust some tests.
22095 * src/print_graph.c (print_core): Complete the set of items via
22096 closure. The next-to-final and final states are still unsatisfying,
22097 but that's to be addressed elsewhere.
22098 No longer output the rule numbers, but do output the state number.
22099 A single loop for the shifts + gotos is enough, but picked a
22100 distinct color for each.
22101 (print_graph): Initialize and finalize closure.
22102
22103 2001-12-13 Akim Demaille <akim@epita.fr>
22104
22105 * src/reader.c (readgram): Remove dead code, an strip useless
22106 braces.
22107 (get_type): Remove, unused.
22108
22109 2001-12-12 Akim Demaille <akim@epita.fr>
22110
22111 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
22112 on that of lib/error.c.
22113
22114 2001-12-12 Akim Demaille <akim@epita.fr>
22115
22116 Some hosts don't like `/' in includes.
22117
22118 * src/system.h: Include libgettext.h without qualifying the path.
22119 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
22120 $(top_srcdir).
22121
22122 2001-12-11 Marc Autret <autret_m@epita.fr>
22123
22124 * src/output.c (output_parser): Remove useless muscle.
22125
22126 2001-12-11 Marc Autret <autret_m@epita.fr>
22127
22128 * src/bison.simple: Remove #line just before %%epilogue. It
22129 is now handled in ...
22130 * src/reader.c (read_additionnal_code): Add the output of a
22131 #line for the epilogue.
22132
22133 2001-12-10 Marc Autret <autret_m@epita.fr>
22134
22135 * src/reader.c (copy_definition): Re-use CPP-outed code which
22136 replace precedent remove.
22137 * src/bison.simple: Remove #line before %%prologue because
22138 %%input-line is wrong at this time.
22139
22140 2001-12-10 Marc Autret <autret_m@epita.fr>
22141
22142 * src/reader.c (symbols_output): Clean up.
22143 * src/output.c (output_gram, output): Clean up.
22144
22145 2001-12-10 Akim Demaille <akim@epita.fr>
22146
22147 * src/lalr.c (initialize_lookaheads): New. Extracted from...
22148 * src/LR0.c (set_state_table): here.
22149 * src/lalr.c (lalr): Call it.
22150
22151 2001-12-10 Akim Demaille <akim@epita.fr>
22152
22153 * src/state.h (shifts): Remove the `number' member: shifts are
22154 attached to state, hence no longer need to be labelled with a
22155 state number.
22156
22157 2001-12-10 Akim Demaille <akim@epita.fr>
22158
22159 Now that states have a complete set of members, the linked list of
22160 shifts is useless: just fill directly the state's shifts member.
22161
22162 * src/state.h (shifts): Remove the `next' member.
22163 * src/LR0.c (first_state, last_state): Remove.
22164 Adjust the callers.
22165 (augment_automaton): Don't look for the shifts that must be added
22166 a shift on EOF: it is those of the state we looked for! But now,
22167 since shifts are attached, it is no longer needed to looking
22168 merely by its id: its number.
22169
22170 2001-12-10 Akim Demaille <akim@epita.fr>
22171
22172 * src/LR0.c (augment_automaton): Better variable locality.
22173 Remove an impossible branch: if there is a state corresponding to
22174 the start symbol being shifted, then there is shift for the start
22175 symbol from the initial state.
22176
22177 2001-12-10 Akim Demaille <akim@epita.fr>
22178
22179 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
22180 only when appropriate: when insert_start_shifting_state' is not
22181 invoked.
22182 * tests/regression.at (Rule Line Numbers): Adjust.
22183
22184 2001-12-10 Akim Demaille <akim@epita.fr>
22185
22186 * src/LR0.c (augment_automaton): Now that all states have shifts,
22187 merge the two cases addition shifts to the initial state.
22188
22189 2001-12-10 Akim Demaille <akim@epita.fr>
22190
22191 * src/lalr.c (set_state_table): Move to...
22192 * src/LR0.c: here.
22193 * src/lalr.c (lalr): Don't call it...
22194 * src/LR0.c (generate_states): do it.
22195 * src/LR0.h (first_state): Remove, only the table is used.
22196
22197 2001-12-10 Akim Demaille <akim@epita.fr>
22198
22199 * src/LR0.h (first_shift, first_reduction): Remove.
22200 * src/lalr.c: Don't use first_shift: find shifts through the
22201 states.
22202
22203 2001-12-10 Akim Demaille <akim@epita.fr>
22204
22205 * src/LR0.c: Attach shifts to states as soon as they are
22206 computed.
22207 * src/lalr.c (set_state_table): Instead of assigning shifts to
22208 state, just assert that the mapping was properly done.
22209
22210 2001-12-10 Akim Demaille <akim@epita.fr>
22211
22212 * src/LR0.c (insert_start_shift): Rename as...
22213 (insert_start_shifting_state): this.
22214 (insert_eof_shifting_state, insert_accepting_state): New.
22215 (augment_automaton): Adjust.
22216 Better locality of the variables.
22217 When looking if the start_symbol is shifted from the initial
22218 state, using `while (... symbol != start_symbol ...)' sounds
22219 better than `while (... symbol < start_symbol ...)': If fail
22220 to see how the order between symbols could be relevant!
22221
22222 2001-12-10 Akim Demaille <akim@epita.fr>
22223
22224 * src/getargs.h: Don't declare `spec_name_prefix' and
22225 `spec_file_prefix', declared by src/files.h.
22226 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
22227 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
22228 * src/output.c (prepare): Adjust.
22229 * src/reader.c (symbols_output): Likewise.
22230 * src/vmsgetargs.c: Vaguely adjust, but who cares?
22231
22232 2001-12-10 Akim Demaille <akim@epita.fr>
22233
22234 * src/muscle_tab.c (muscle_init): NULL is a better default than
22235 `"0"'.
22236
22237 2001-12-10 Akim Demaille <akim@epita.fr>
22238
22239 * src/reader.c (reader): Calling symbols_output once is enough.
22240
22241 2001-12-10 Akim Demaille <akim@epita.fr>
22242
22243 Now that states have a complete set of members, the linked list of
22244 reductions is useless: just fill directly the state's reductions
22245 member.
22246
22247 * src/state.h (struct reductions): Remove member `number' and
22248 `next'.
22249 * src/LR0.c (first_reduction, last_reduction): Remove.
22250 (save_reductions): Don't link the new reductions, store them in
22251 this_state.
22252 * src/lalr.c (set_state_table): No need to attach reductions to
22253 states, it's already done.
22254 * src/output.c (output_actions): No longer free the shifts, then
22255 the reductions, then the states: free all the states and their
22256 members.
22257
22258 2001-12-10 Akim Demaille <akim@epita.fr>
22259
22260 * src/options.c (OPTN, DRTV, BOTH): New.
22261 (option_table): Use them.
22262
22263 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
22264 the job of system.h.
22265 * src/options.c: Don't include stdio.h and xalloc.h for the same
22266 reasons.
22267
22268 2001-12-10 Akim Demaille <akim@epita.fr>
22269
22270 * src/output.c (output, prepare): Make sure the values of the
22271 muscles `action' and `prologue' are 0-terminated.
22272
22273 2001-12-10 Akim Demaille <akim@epita.fr>
22274
22275 Clean up GCC warnings.
22276
22277 * src/reader.c (copy_action): `buf' is not used.
22278 (parse_skel_decl): Be static.
22279 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
22280 * src/options.h (create_long_option_table): Have a real prototype.
22281 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
22282 (hash_delete_at): Return const void *.
22283 Adjust casts to preserve the const.
22284
22285 2001-12-10 Akim Demaille <akim@epita.fr>
22286
22287 * configure.in: Require 2.52g.
22288 M4 is not needed, but AUTOM4TE is.
22289 * m4/m4.m4: Remove.
22290 * tests/Makefile.am: Adjust.
22291
22292 2001-12-10 Akim Demaille <akim@epita.fr>
22293
22294 One structure for states is enough, even though theoretically
22295 there are LR(0) states and LALR(1) states.
22296
22297 * src/lalr.h (state_t): Remove.
22298 (state_table): Be state_t **, not state_t *.
22299 * src/state.h (core, CORE_ALLOC): Rename as...
22300 (state_t, STATE_ALLOC): this.
22301 Add the LALR(1) members: shifts, reductions, errs.
22302 * src/LR0.c (state_table): Rename as...
22303 (state_hash): this, to avoid name clashes with the global
22304 `state_table'.
22305 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
22306 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
22307
22308 2001-12-10 Akim Demaille <akim@epita.fr>
22309
22310 Bison dumps core on bash.y.
22311 Reported by Pascal Bart.
22312
22313 * src/warshall.c (bitmatrix_print): New.
22314 (TC): Use it.
22315 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
22316 j must be the outer loop.
22317 * tests/regression.at (Broken Closure): New.
22318
22319 2001-12-05 Akim Demaille <akim@epita.fr>
22320
22321 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
22322 its argument.
22323 Reported by Peter Hamorsky.
22324
22325 2001-12-05 Akim Demaille <akim@epita.fr>
22326
22327 * src/conflicts.c (err_table): Remove.
22328 (resolve_sr_conflict): Adjust.
22329 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
22330 Rename as...
22331 (state_t.reductions, state_t.shifts): this.
22332
22333 2001-12-05 Akim Demaille <akim@epita.fr>
22334
22335 * src/reduce.c (reduce_grammar_tables): No longer disable the
22336 removal of useless rules via CPP but via `if (0)', so that the
22337 compiler still check the code is valid.
22338 For instance, it should have noticed `rline' no longer exists: use
22339 the `line' member of rule_t.
22340 * src/gram.c (dummy, rline): Remove, unused.
22341
22342 2001-12-05 Akim Demaille <akim@epita.fr>
22343
22344 * src/output.c (pack_vector): Use assert, not berror.
22345 * src/main.c (berror): Remove, unused.
22346
22347 2001-12-05 Akim Demaille <akim@epita.fr>
22348
22349 New experimental feature: if --verbose --trace output all the
22350 items of a state, not only its kernel.
22351
22352 * src/print.c (print_core): If `trace_flag', then invoke closure
22353 before outputting the items of the state (print_core is no longer
22354 a correct name them).
22355 (print_results): Invoke new_closure/free_closure if needed.
22356
22357 2001-12-05 Akim Demaille <akim@epita.fr>
22358
22359 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
22360 * src/closure.c, src/closure.h (itemsetsize): Rename as...
22361 (nitemset): for consistency with the rest of the project.
22362
22363 2001-12-05 Akim Demaille <akim@epita.fr>
22364
22365 * src/closure.c (print_closure): Improve.
22366 (closure): Use it for printing input and output.
22367
22368 2001-12-05 Akim Demaille <akim@epita.fr>
22369
22370 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
22371 indexed by nonterminals.
22372
22373 2001-12-05 Akim Demaille <akim@epita.fr>
22374
22375 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
22376 what it was!).
22377 * src/warshall.h: Remove accidental duplication of the content.
22378
22379 2001-12-05 Akim Demaille <akim@epita.fr>
22380
22381 * src/closure.c (set_fderives): De-obfuscate.
22382
22383 2001-12-05 Akim Demaille <akim@epita.fr>
22384
22385 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
22386
22387 2001-12-05 Akim Demaille <akim@epita.fr>
22388
22389 * src/closure.c (set_firsts): De-obfuscate.
22390
22391 2001-12-05 Akim Demaille <akim@epita.fr>
22392
22393 * src/output.c (action_row): De-obfuscate
22394 using the good o' techniques: arrays not pointers, variable
22395 locality, BITISSET, RESETBIT etc.
22396
22397 2001-12-05 Akim Demaille <akim@epita.fr>
22398
22399 Pessimize the code to simplify it: from now on, all the states
22400 have a valid SHIFTS, which NSHIFTS is possibly 0.
22401
22402 * src/LR0.c (shifts_new): Be global and move to..
22403 * src/state.c, src/state.h: here.
22404 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
22405 * src/print_graph: Adjust.
22406
22407 2001-12-05 Akim Demaille <akim@epita.fr>
22408
22409 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
22410 * src/conflicts.c: Use it.
22411 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
22412 incorrectly ``simplified''.
22413
22414 2001-12-05 Akim Demaille <akim@epita.fr>
22415
22416 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
22417 using the good o' techniques: arrays not pointers, variable
22418 locality, BITISSET, RESETBIT etc.
22419
22420 2001-12-05 Akim Demaille <akim@epita.fr>
22421
22422 * src/state.h (SHIFT_SYMBOL): New.
22423 * src/conflicts.c: Use it to deobfuscate.
22424
22425 2001-12-05 Akim Demaille <akim@epita.fr>
22426
22427 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
22428 (print_reductions): De-obfuscate using the good o' techniques:
22429 arrays not pointers, variable locality, BITISSET.
22430
22431 2001-12-05 Akim Demaille <akim@epita.fr>
22432
22433 * src/conflicts.c (print_reductions): Arrays, not pointers.
22434 Use BITISSET.
22435
22436 2001-12-05 Akim Demaille <akim@epita.fr>
22437
22438 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22439
22440 2001-12-05 Akim Demaille <akim@epita.fr>
22441
22442 * src/conflicts.c (print_reductions): Improve variable locality.
22443
22444 2001-12-05 Akim Demaille <akim@epita.fr>
22445
22446 * src/conflicts.c (print_reductions): Pessimize, but clarify.
22447
22448 2001-12-05 Akim Demaille <akim@epita.fr>
22449
22450 * src/conflicts.c (print_reductions): Improve variable locality.
22451
22452 2001-12-05 Akim Demaille <akim@epita.fr>
22453
22454 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
22455 * src/lalr.c: Use them.
22456
22457 2001-12-05 Akim Demaille <akim@epita.fr>
22458
22459 * src/LR0.c (augment_automaton): Formatting changes.
22460 Better variable locality.
22461
22462 2001-12-05 Akim Demaille <akim@epita.fr>
22463
22464 * src/lalr.c (matrix_print): New.
22465 (transpose): Use it.
22466 Use arrays instead of pointers.
22467
22468 2001-12-05 Akim Demaille <akim@epita.fr>
22469
22470 * src/lalr.c (maxrhs): Move to...
22471 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
22472 * src/lalr.c (build_relations): Adjust.
22473
22474 2001-12-05 Akim Demaille <akim@epita.fr>
22475
22476 * src/lalr.c (transpose): Free the memory allocated to the
22477 argument, as it is replaced by the results by the unique caller.
22478 (build_relations): Merely invoke transpose: it handles the memory
22479 deallocation.
22480 Improve variable locality.
22481 Avoid variables used as mere abbreviations.
22482 (compute_lookaheads): Use arrays instead of pointers.
22483
22484 2001-12-05 Akim Demaille <akim@epita.fr>
22485
22486 * src/lalr.c (initialize_F): Improve variable locality.
22487 Avoid variables used as mere abbreviations.
22488
22489 2001-12-05 Akim Demaille <akim@epita.fr>
22490
22491 * src/derives.c (print_derives): Display the ruleno.
22492 * src/lalr.c (initialize_F, transpose): Better variable locality
22493 to improve readability.
22494 Avoid variables used as mere abbreviations.
22495
22496 2001-12-05 Akim Demaille <akim@epita.fr>
22497
22498 * src/lalr.c (traverse): Use arrays instead of pointers.
22499
22500 2001-12-05 Akim Demaille <akim@epita.fr>
22501
22502 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
22503 the handling of squeue.
22504 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22505
22506 2001-12-05 Akim Demaille <akim@epita.fr>
22507
22508 Because useless nonterminals are now kept alive (instead of being
22509 `destroyed'), we now sometimes examine them, and store information
22510 related to them. Hence we need to know their number, and adjust
22511 memory allocations.
22512
22513 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
22514 static.
22515 * src/LR0.c (allocate_itemsets): The memory allocated to
22516 `symbol_count' was used for two different purpose: once to count
22517 the number of occurrences of each symbol, and later reassigned to
22518 `shift_symbol', containing the symbol that can be shifted from a
22519 given state.
22520 Deobfuscate, i.e., allocate, use and free `symbol_count' here
22521 only, and...
22522 (new_itemsets): Allocate `shift_symbol' here.
22523 (allocate_itemsets): symbol_count includes useless nonterminals.
22524 Make room for them.
22525 (free_storage): Use `free', not `XFREE', for pointers that cannot
22526 be null.
22527
22528 2001-12-05 Akim Demaille <akim@epita.fr>
22529
22530 * src/nullable.c (set_nullable): Deobfuscate the handling of
22531 ritem.
22532 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
22533
22534 2001-12-05 Akim Demaille <akim@epita.fr>
22535
22536 * src/gram.c, src/gram.h (ritem_print): New.
22537 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
22538 (This useless function was defined only to work around VMS linkers
22539 that can't handle compilation units with variables only).
22540 * src/reduce.c (dump_grammar): Use it to trace the construction of
22541 ritem.
22542
22543 2001-12-04 Paul Eggert <eggert@twinsun.com>
22544
22545 * src/bison.simple (union yyalloc): Change member names
22546 to be the same as the stack names.
22547 (yyparse): yyptr is now union yyalloc *, not char *.
22548 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
22549 and may generate better code on some machines.
22550 (yystpcpy): Use prototype if __STDC__ is defined, not just
22551 if __cplusplus is defined.
22552
22553 2001-11-30 Akim Demaille <akim@epita.fr>
22554
22555 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
22556 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
22557 Gettext doesn't compile cleanly, and dies with -Werror.
22558 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
22559 Include WARNING_CFLAGS here.
22560 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
22561 before being defined.
22562
22563 2001-11-27 Paul Eggert <eggert@twinsun.com>
22564
22565 * lib/quotearg.h (quotearg_n, quotearg_n_style):
22566 First arg is int, not unsigned.
22567 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22568 (SIZE_MAX, UINT_MAX): New macros.
22569 (quotearg_n_options): Abort if N is negative.
22570 Avoid overflow check on hosts where size_t is 64 bits and int
22571 is 32 bits, as overflow is impossible there.
22572 Fix off-by-one typo that caused unnecessary reallocation.
22573
22574 2001-11-29 Paul Eggert <eggert@twinsun.com>
22575
22576 Name space cleanup in generated parser.
22577
22578 * doc/bison.texinfo (Bison Parser): Discuss system headers
22579 and their effect on the user name space.
22580
22581 * src/bison.simple:
22582 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
22583 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
22584 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
22585
22586 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
22587 on user names when possible.
22588
22589 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
22590 Simplify test for whather <alloca.h> exists.
22591
22592 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
22593
22594 (<stdio.h>): Include if YYDEBUG.
22595
22596 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
22597 ! defined (yyoverflow) && ! defined (yymemcpy).
22598
22599 (yymemcpy, yyparse): Rename local variables as needed so that
22600 they all begin with 'yy'.
22601
22602 (yystrlen, yystpcpy): New functions.
22603
22604 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
22605 All uses changed.
22606
22607 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
22608 instead of relying on string.h functions. Use YYSTACK_ALLOC
22609 and YYSTACK_FREE instead of malloc and free.
22610
22611 2001-11-30 Akim Demaille <akim@epita.fr>
22612
22613 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
22614 before their first uses.
22615 (YYBISON, YYPURE): Move to the top of the output.
22616
22617 2001-11-30 Akim Demaille <akim@epita.fr>
22618
22619 * tests/reduce.at (Useless Nonterminals): Fix.
22620
22621 2001-11-30 Akim Demaille <akim@epita.fr>
22622
22623 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
22624 if body instead of `;' to pacify GCC's warnings.
22625
22626 2001-11-30 Akim Demaille <akim@epita.fr>
22627
22628 Instead of mapping the LHS of unused rules to -1, keep the LHS
22629 valid, but flag the rules as invalid.
22630
22631 * src/gram.h (rule_t): `useful' is a new member.
22632 * src/print.c (print_grammar): Adjust.
22633 * src/derives.c (set_derives): Likewise.
22634 * src/reader.c (packgram, reduce_output): Likewise.
22635 * src/reduce.c (reduce_grammar_tables): Likewise.
22636 * tests/reduce.at (Underivable Rules, Useless Rules): New.
22637
22638 2001-11-30 Akim Demaille <akim@epita.fr>
22639
22640 * src/reduce.c (reduce_output): Formatting changes.
22641 * src/print.c (print_results, print_grammar): Likewise.
22642 * tests/regression.at (Rule Line Numbers)
22643 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
22644
22645 2001-11-30 Akim Demaille <akim@epita.fr>
22646
22647 * src/reduce.c (nonterminals_reduce): Instead of throwing away
22648 useless nonterminals, move them at the end of the symbol arrays.
22649 (reduce_output): Adjust.
22650 * tests/reduce.at (Useless Nonterminals): Adjust.
22651
22652 2001-11-30 Akim Demaille <akim@epita.fr>
22653
22654 * src/reduce.c: Various comment/formatting changes.
22655 (nonterminals_reduce): New, extracted from...
22656 (reduce_grammar_tables): here.
22657 (reduce_grammar): Call nonterminals_reduce.
22658
22659 2001-11-29 Paul Eggert <eggert@twinsun.com>
22660
22661 * src/bison.simple (YYSTACK_REALLOC): Remove.
22662 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
22663 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
22664 New macros.
22665 (union yyalloc): New type.
22666 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
22667 an arbitrary restriction on hosts where size_t is wider than int.
22668
22669 (yyparse): Don't dump core if alloca or malloc fails; instead, report
22670 a parser stack overflow. Allocate just one block of memory for all
22671 three stacks, instead of allocating three blocks; this typically is
22672 faster and reduces fragmentation.
22673
22674 Do not limit the number of items in the stack to a value that fits
22675 in 'int', as this is an arbitrary limit on hosts with 64-bit
22676 size_t and 32-bit int.
22677
22678 2001-11-29 Marc Autret <autret_m@epita.fr>
22679
22680 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
22681 of defining YYERROR_VERBOSE.
22682 [AT_DATA]: $4 is now out of C declarations in the prologue.
22683
22684 2001-11-28 Marc Autret <autret_m@epita.fr>
22685
22686 * src/reader.c (parse_dquoted_param): New.
22687 (parse_skel_decl): Use it.
22688 * src/lex.h: Add its prototype.
22689 * src/lex.c (literalchar): Become not static.
22690
22691 2001-11-28 Marc Autret <autret_m@epita.fr>
22692
22693 * src/output.h: And put its extern declaration here.
22694 * src/output.c (error_verbose): Define here.
22695 (prepare): Echo name modification.
22696 * src/getargs.h: Clean its extern declaration.
22697 * src/getargs.c (error_verbose_flag): Remove.
22698 (getargs): Remove case 'e'.
22699 * src/options.c (option_table): 'error-verbose' is now seen as simple
22700 percent option.
22701 Include output.h.
22702
22703 * src/reader.c (read_declarations): Remove case tok_include.
22704 (parse_include_decl): Remove.
22705 * src/lex.h (token_t): Remove tok_include.
22706 * src/options.c (option_table): 'include' is now a simple command line
22707 option.
22708
22709 2001-11-28 Marc Autret <autret_m@epita.fr>
22710
22711 * src/bison.simple: Adjust muscle names.
22712 * src/muscle_tab.c (muscle_init): Also rename the muscles.
22713 * src/output.c (prepare): s/_/-/ for the muscles names.
22714 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
22715
22716 2001-11-28 Marc Autret <autret_m@epita.fr>
22717
22718 * src/bison.simple: Fix debug.
22719 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
22720
22721 2001-11-28 Akim Demaille <akim@epita.fr>
22722
22723 * src/LR0.c (shifts_new): New.
22724 (save_shifts, insert_start_shift, augment_automaton): Use it.
22725
22726 2001-11-28 Akim Demaille <akim@epita.fr>
22727
22728 * src/closure.c (closure): `b' and `ruleno' denote the same value:
22729 keep ruleno only.
22730
22731 2001-11-28 Akim Demaille <akim@epita.fr>
22732
22733 * src/closure.c (closure): Instead of looping over word in array
22734 then bits in words, loop over bits in array.
22735
22736 2001-11-28 Akim Demaille <akim@epita.fr>
22737
22738 * src/closure.c (closure): No longer optimize the special case
22739 where all the bits of `ruleset[r]' are set to 0, to make the code
22740 clearer.
22741
22742 2001-11-28 Akim Demaille <akim@epita.fr>
22743
22744 * src/closure.c (closure): `r' and `c' are new variables, used to
22745 de-obfuscate accesses to RULESET and CORE.
22746
22747 2001-11-28 Akim Demaille <akim@epita.fr>
22748
22749 * src/reduce.c (reduce_print): Use ngettext.
22750 (dump_grammar): Improve the trace accuracy.
22751
22752 2001-11-28 Akim Demaille <akim@epita.fr>
22753
22754 * src/reduce.c (dump_grammar): Don't translate trace messages.
22755
22756 2001-11-28 Akim Demaille <akim@epita.fr>
22757
22758 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
22759 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
22760 as all tags are free'ed afterwards.
22761 From Enrico Scholz.
22762
22763 2001-11-27 Paul Eggert <eggert@twinsun.com>
22764
22765 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
22766 use alloca when we didn't want to, and vice versa.
22767
22768 2001-11-27 Marc Autret <autret_m@epita.fr>
22769
22770 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
22771 initialization.
22772 * src/output.c (prepare): Remove its update.
22773
22774 2001-11-27 Marc Autret <autret_m@epita.fr>
22775
22776 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
22777 Use %error-verbose.
22778
22779 2001-11-27 Marc Autret <autret_m@epita.fr>
22780
22781 * src/bison.simple: Remove YYERROR_VERBOSE using.
22782 Use %%error_verbose.
22783 (yyparse): Likewise.
22784 * src/output.c (prepare): Give its final value.
22785 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
22786 * src/getargs.h: Add its extern declaration.
22787 * src/getargs.c (error_verbose_flag): New int.
22788 (getargs): Update to catch new case.
22789 * src/options.c (option_table): 'error-verbose' is a new option.
22790 (shortopts): Update.
22791
22792 2001-11-27 Akim Demaille <akim@epita.fr>
22793
22794 * src/system.h: Use intl/libgettext.h.
22795 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
22796
22797 2001-11-27 Akim Demaille <akim@epita.fr>
22798
22799 * tests/torture.at (Exploding the Stack Size with Malloc):
22800 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
22801
22802 2001-11-27 Akim Demaille <akim@epita.fr>
22803
22804 * src/files.c: Include error.h.
22805 Reported by Hans Aberg.
22806
22807 2001-11-26 Marc Autret <autret_m@epita.fr>
22808
22809 * src/reader.c (parse_include_decl): New, not yet implemented.
22810 (read_declarations): Add case tok_include.
22811 * src/getargs.h (include): Add its extern definition.
22812 * src/getargs.c (include): New const char *.
22813 (getargs): Add case '-I'.
22814 * src/options.c (option_table): Add include as command line and
22815 percent option.
22816 * src/lex.h (token_t): Add tok_include.
22817
22818 2001-11-26 Akim Demaille <akim@epita.fr>
22819
22820 * src/reader.c (readgram): Make sure rules for mid-rule actions
22821 have a lineno equal to that of their host rule.
22822 Reported by Hans Aberg.
22823 * tests/regression.at (Rule Line Numbers): New.
22824
22825 2001-11-26 Akim Demaille <akim@epita.fr>
22826
22827 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
22828 size_ts.
22829
22830 2001-11-26 Akim Demaille <akim@epita.fr>
22831
22832 * src/complain.c, src/complain.h (error): Remove, provided by
22833 lib/error.[ch].
22834
22835 2001-11-26 Akim Demaille <akim@epita.fr>
22836
22837 * src/reader.c (read_declarations): Don't abort on tok_illegal,
22838 issue an error message.
22839 * tests/regression.at (Invalid %directive): New.
22840 Reported by Hans Aberg.
22841
22842 2001-11-26 Akim Demaille <akim@epita.fr>
22843
22844 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
22845 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
22846
22847 2001-11-26 Akim Demaille <akim@epita.fr>
22848
22849 * src/conflicts.c (conflicts_print): Don't complain at all when
22850 there are no reduce/reduce conflicts, and as many shift/reduce
22851 conflicts as expected.
22852 * tests/regression.at (%expect right): Adjust.
22853
22854 2001-11-23 Akim Demaille <akim@epita.fr>
22855
22856 * lib/alloca.c: Update, from fileutils.
22857
22858 2001-11-23 Akim Demaille <akim@epita.fr>
22859
22860 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
22861
22862 2001-11-23 Akim Demaille <akim@epita.fr>
22863
22864 * src/system.h: Include alloca.h.
22865 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
22866
22867 2001-11-23 Akim Demaille <akim@epita.fr>
22868
22869 * src/print_graph.c (print_actions): Remove `rule', unused.
22870 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
22871 pacify GCC's signed < unsigned warnings.
22872 * src/closure.c (itemsetsize): Likewise.
22873 * src/reader.c (symbol_list_new): Static.
22874
22875 2001-11-23 Akim Demaille <akim@epita.fr>
22876
22877 Attaching lineno to buckets is stupid, since only one copy of each
22878 symbol is kept, only the line of the first occurrence is kept too.
22879
22880 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
22881 * src/reader.c (rline_allocated): Remove, unused.
22882 (symbol_list): Have a `line' member.
22883 (symbol_list_new): New.
22884 (readgram): Use it.
22885 * src/print.c (print_grammar): Output the rule line numbers.
22886 * tests/regression.at (Solved SR Conflicts)
22887 (Unresolved SR Conflicts): Adjust.
22888 Reported by Hans Aberg.
22889
22890 2001-11-22 Marc Autret <autret_m@epita.fr>
22891
22892 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
22893
22894 2001-11-22 Marc Autret <autret_m@epita.fr>
22895
22896 * src/muscle_tab.c (muscle_init): Remove initialization of
22897 skeleton muscle.
22898 * src/output.c (output_master_parser): Do it here.
22899
22900 2001-11-20 Akim Demaille <akim@epita.fr>
22901
22902 * po/sv.po: New.
22903 * configure.in (ALL_LINGUAS): Adjust.
22904 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
22905 longer contains strings to translate.
22906
22907 2001-11-19 Akim Demaille <akim@epita.fr>
22908
22909 * src/conflicts.c (conflicts_print): Add a missing \n.
22910
22911 2001-11-19 Akim Demaille <akim@epita.fr>
22912
22913 * src/nullable.c (nullable_print): New.
22914 (set_nullable): Call it when tracing.
22915 Better locality of variables.
22916
22917 2001-11-19 Akim Demaille <akim@epita.fr>
22918
22919 * src/print.c (print_actions): Better locality of variables.
22920
22921 2001-11-19 Akim Demaille <akim@epita.fr>
22922
22923 * src/derives.c (print_derives): Fix and enrich.
22924 * src/closure.c (print_fderives): Likewise.
22925
22926 2001-11-19 Akim Demaille <akim@epita.fr>
22927
22928 * src/closure.c (itemsetend): Remove, replaced with...
22929 (itemsetsize): new.
22930
22931 2001-11-19 Akim Demaille <akim@epita.fr>
22932
22933 * src/LR0.c (kernel_end): Remove, replaced with...
22934 (kernel_size): new.
22935
22936 2001-11-19 Akim Demaille <akim@epita.fr>
22937
22938 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
22939 to clarify.
22940
22941 2001-11-19 Akim Demaille <akim@epita.fr>
22942
22943 * src/closure.c (closure): Use arrays instead of pointers to clarify.
22944
22945 2001-11-19 Akim Demaille <akim@epita.fr>
22946
22947 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
22948 trace messages.
22949 * src/LR0.c: Likewise.
22950 (allocate_itemsets): Use arrays instead of pointers to clarify.
22951
22952 2001-11-19 Akim Demaille <akim@epita.fr>
22953
22954 * src/getargs.c (statistics_flag): Replace with...
22955 (trace_flag): New.
22956 (longopts): Accept --trace instead of --statistics.
22957 * src/getargs.h, src/options.c: Adjust.
22958 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
22959 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
22960
22961 2001-11-19 Akim Demaille <akim@epita.fr>
22962
22963 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
22964 pointers to clarify the code.
22965 (save_reductions, save_shifts): Factor common parts of alternatives.
22966
22967 2001-11-19 Akim Demaille <akim@epita.fr>
22968
22969 * src/LR0.c (new_state, get_state): Complete TRACE code.
22970 * src/closure.c: Include `reader.h' to get `tags', needed by the
22971 trace code.
22972 Rename the conditional DEBUG as TRACE.
22973 Output consistently TRACEs to stderr, not stdout.
22974 * src/derives.c: Likewise.
22975 * src/reduce.c: (inaccessable_symbols): Using if is better style
22976 than goto.
22977 Use `#if TRACE' instead of `#if 0' for tracing code.
22978
22979 2001-11-19 Akim Demaille <akim@epita.fr>
22980
22981 * src/system.h (LIST_FREE, shortcpy): New.
22982 * src/LR0.c: Use them.
22983 * src/output.c (free_itemsets, free_reductions, free_shifts):
22984 Remove, replaced by LIST_FREE.
22985
22986 2001-11-19 Akim Demaille <akim@epita.fr>
22987
22988 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
22989 (REDUCTIONS_ALLOC): New.
22990 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
22991 allocation.
22992
22993 2001-11-19 Akim Demaille <akim@epita.fr>
22994
22995 * src/LR0.c (new_state): Complete trace code.
22996 * src/nullable.c (set_nullable): Don't translate traces.
22997
22998 2001-11-19 Akim Demaille <akim@epita.fr>
22999
23000 * src/print_graph.c (print_core): Better locality of variables.
23001 * src/print.c (print_core): Likewise.
23002
23003 2001-11-19 Akim Demaille <akim@epita.fr>
23004
23005 * src/vcg.c: You do the output, so you are responsible of the
23006 handling of VCG syntax, in particular: use quotearg.
23007 * src/print_graph.c: Don't.
23008 (print_actions): Don't output the actions as part of the nodes,
23009 since that's the job of the edges.
23010 (print_state): Don't output by hand: fill the node description,
23011 and ask for its output.
23012
23013 2001-11-19 Akim Demaille <akim@epita.fr>
23014
23015 * src/bison.simple (yyparse): When verbosely reporting an error,
23016 no longer put additional quotes around token names.
23017 * tests/calc.at: Adjust.
23018
23019 2001-11-19 Akim Demaille <akim@epita.fr>
23020
23021 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
23022 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
23023 * src/output.c: Adjust.
23024
23025 2001-11-19 Akim Demaille <akim@epita.fr>
23026
23027 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
23028 (rule_t): this.
23029 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
23030
23031 2001-11-19 Akim Demaille <akim@epita.fr>
23032
23033 * src/gram.h (rule_t): New.
23034 (rule_table): New.
23035 (rrhs, rlhs): Remove, part of state_t.
23036 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
23037 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
23038 * src/reader.c, src/reduce.c: Adjust.
23039
23040 2001-11-19 Akim Demaille <akim@epita.fr>
23041
23042 * src/reader.c (symbols_output): New, extracted from...
23043 (packsymbols): Here.
23044 (reader): Call it.
23045
23046 2001-11-19 Akim Demaille <akim@epita.fr>
23047
23048 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
23049 (maxrhs): this new function.
23050
23051 2001-11-19 Akim Demaille <akim@epita.fr>
23052
23053 * src/lalr.c (F): New macro to access the variable F.
23054 Adjust.
23055
23056 2001-11-19 Akim Demaille <akim@epita.fr>
23057
23058 * src/lalr.h (LA): New macro to access the variable LA.
23059 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23060 * src/lalr.c: Adjust.
23061
23062 2001-11-19 Akim Demaille <akim@epita.fr>
23063
23064 * src/lalr.c (initialize_LA): Only initialize LA. Let...
23065 (set_state_table): handle the `lookaheads' members.
23066
23067 2001-11-19 Akim Demaille <akim@epita.fr>
23068
23069 * src/lalr.h (lookaheads): Removed array, whose contents is now
23070 a member of...
23071 (state_t): this structure.
23072 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23073 Adjust.
23074
23075 2001-11-19 Akim Demaille <akim@epita.fr>
23076
23077 * src/lalr.h (consistent): Removed array, whose contents is now
23078 a member of...
23079 (state_t): this structure.
23080 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23081 Adjust.
23082
23083 2001-11-19 Akim Demaille <akim@epita.fr>
23084
23085 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
23086 contents are now members of...
23087 (state_t): this structure.
23088 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
23089 Adjust.
23090
23091 2001-11-19 Akim Demaille <akim@epita.fr>
23092
23093 * src/lalr.h (state_t): New.
23094 (state_table): Be a state_t * instead of a core **.
23095 (accessing_symbol): Remove, part of state_t.
23096 * src/lalr.c: Adjust.
23097 (set_accessing_symbol): Merge into...
23098 (set_state_table): this.
23099 * src/print_graph.c, src/conflicts.c: Adjust.
23100
23101 2001-11-14 Akim Demaille <akim@epita.fr>
23102
23103 * tests/calc.at, tests/output.at, tests/regression.at,
23104 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
23105 now the tests are run in private dirs, therefore AC_CLEANUP and
23106 family can be simplified to 0-ary.
23107 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
23108 use abs. path to find config.h.
23109 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
23110 stderr, there can be way too much random noise.
23111 Instead pass -Werror to GCC and rely on the exit status.
23112 Reported by Wolfram Wagner.
23113
23114 2001-11-14 Akim Demaille <akim@epita.fr>
23115
23116 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
23117 defined only if yyoverflow is defined, to avoid `warning: unused
23118 variable `yyvs1''.
23119 Reported by The Test Suite.
23120
23121 2001-11-14 Akim Demaille <akim@epita.fr>
23122
23123 * src/print.c: Include reduce.h.
23124 Reported by Hans Aberg.
23125
23126 2001-11-14 Akim Demaille <akim@epita.fr>
23127
23128 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
23129 Revert a previous patch: these are really const.
23130 * src/conflicts.c (conflict_report): Additional useless pair of
23131 braces to pacify GCC's warnings for `if () if () {} else {}'.
23132 * src/lex.c (parse_percent_token): Replace equal_offset with
23133 arg_offset.
23134 arg is const.
23135 Be sure to strdup `arg' when used, since there is no reason for
23136 token_buffer not to change.
23137
23138 2001-11-14 Akim Demaille <akim@epita.fr>
23139
23140 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
23141 definition.
23142 * src/main.c (main): Use them.
23143 Suggested by Hans Aberg.
23144
23145 2001-11-12 Akim Demaille <akim@epita.fr>
23146
23147 * src/system.h (ngettext): Now that we use ngettext, be sure to
23148 provide a default definition when NLS are not used.
23149
23150 2001-11-12 Akim Demaille <akim@epita.fr>
23151
23152 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
23153 Use @kbd to denote user input.
23154 (Language and Grammar): ANSIfy the example.
23155 Adjust its layout for info/notinfo.
23156 (Location Tracking Calc): Output error messages to stderr.
23157 Output locations in a more GNUtically correct way.
23158 Fix a couple of Englishos.
23159 Adjust @group/@end group pairs.
23160
23161 2001-11-12 Akim Demaille <akim@epita.fr>
23162
23163 %expect was not functioning at all.
23164
23165 * src/conflicts.c (expected_conflicts): Set to -1.
23166 (conflict_report): Use ngettext.
23167 (conflicts_print): Check %expect and make its violation an error.
23168 * doc/bison.texinfo (Expect Decl): Adjust.
23169 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
23170 * tests/regression.at (%expect not enough, %expect right)
23171 (%expect too much): New.
23172
23173 2001-11-12 Akim Demaille <akim@epita.fr>
23174
23175 * tests/regression.at (Conflicts): Rename as...
23176 (Unresolved SR Conflicts): this.
23177 (Solved SR Conflicts): New.
23178
23179 2001-11-12 Akim Demaille <akim@epita.fr>
23180
23181 * src/reduce.c (print_results): Rename as...
23182 (reduce_output): This.
23183 Output to OUT, passed as argument, instead of output_obstack.
23184 (dump_grammar): Likewise.
23185 (reduce_free): New.
23186 Also free V1.
23187 (reduce_grammar): No longer call reduce_output, since...
23188 * src/print.c (print_results): do it.
23189 * src/main.c (main): Call reduce_free;
23190
23191 2001-11-12 Akim Demaille <akim@epita.fr>
23192
23193 * src/conflicts.c (print_reductions): Accept OUT as argument.
23194 Output to it, not to output_obstack.
23195 * src/print.c (print_actions): Adjust.
23196
23197 2001-11-12 Akim Demaille <akim@epita.fr>
23198
23199 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
23200 the result instead of using...
23201 (src_total, rrc_total, src_count, rrc_count): Remove.
23202 (any_conflicts): Remove.
23203 (print_conflicts): Split into...
23204 (conflicts_print, conflicts_output): New.
23205 * src/conflicts.h: Adjust.
23206 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
23207 * src/print.c (print_grammar): Issue `\n' between two rules.
23208 * tests/regression.at (Conflicts): New.
23209 Reported by Tom Lane.
23210
23211 2001-11-12 Akim Demaille <akim@epita.fr>
23212
23213 * tests/regression.at (Invalid input): Remove, duplicate with
23214 ``Invalid input: 1''.
23215
23216 2001-11-12 Akim Demaille <akim@epita.fr>
23217
23218 * tests/torture.at (AT_DATA_STACK_TORTURE)
23219 (Exploding the Stack Size with Alloca)
23220 (Exploding the Stack Size with Malloc): New.
23221
23222 2001-11-12 Akim Demaille <akim@epita.fr>
23223
23224 * src/bison.simple (YYSTACK_REALLOC): New.
23225 (yyparse) [!yyoverflow]: Use it and free the old stack.
23226 Reported by Per Allansson.
23227
23228 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
23229
23230 * src/bison.simple: Define type yystype instead of YYSTYPE, and
23231 define CPP macro, which substitute YYSTYPE by yystype.
23232 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
23233 with yyltype/YYLTYPE. This allows inclusion of the generated
23234 header within the parser if the compiler, such as GGC, accepts
23235 multiple equivalent #defines.
23236 From Akim.
23237
23238 2001-11-05 Akim Demaille <akim@epita.fr>
23239
23240 * src/reader.c (symbols_output): New, extracted from...
23241 (packsymbols): here.
23242 (reader): Adjust.
23243
23244 2001-11-05 Akim Demaille <akim@epita.fr>
23245
23246 * src/lex.c (parse_percent_token): s/quotearg/quote/.
23247
23248 2001-11-05 Akim Demaille <akim@epita.fr>
23249
23250 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
23251 pattern.
23252
23253 2001-11-05 Akim Demaille <akim@epita.fr>
23254
23255 * src/options.h (struct option_table_struct): set_flags is void*.
23256 * src/options.c (longopts): Support `--output' and `%output'.
23257 (usage): Adjust.
23258 * src/lex.h (tok_setopt): Remove, replaced with...
23259 (tok_intopt, tok_stropt): these new guys.
23260 * src/lex.c (getopt.h): Not needed.
23261 (token_buffer, unlexed_token_buffer): Not const.
23262 (percent_table): Promote `-' over `_' in directive names.
23263 Active `%name-prefix', `file-prefix', and `output'.
23264 (parse_percent_token): Accept possible arguments to directives.
23265 Promote `-' over `_' in directive names.
23266
23267 2001-11-04 Akim Demaille <akim@epita.fr>
23268
23269 * doc/bison.texinfo (Decl Summary): Split the list into
23270 `directives for grammars' and `directives for bison'.
23271 Sort'em.
23272 Add description of `%name-prefix', `file-prefix', and `output'.
23273 Promote `-' over `_' in directive names.
23274 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
23275 Simplify the description of `--name-prefix'.
23276 Promote `-' over `_' in directive names.
23277 Promote `--output' over `--output-file'.
23278 Fix the description of `--defines'.
23279 * tests/output.at: Exercise %file-prefix and %output.
23280
23281 2001-11-02 Akim Demaille <akim@epita.fr>
23282
23283 * doc/refcard.tex: Update.
23284
23285 2001-11-02 Akim Demaille <akim@epita.fr>
23286
23287 * src/symtab.h (SUNDEF): New.
23288 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
23289 stand for `uninitialized', instead of 0.
23290 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
23291 * src/lex.c (lex): Adjust.
23292
23293 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
23294 Number it 0.
23295 Let yylex return it instead of a plain 0.
23296 Reported by Dick Streefland.
23297
23298 2001-11-02 Akim Demaille <akim@epita.fr>
23299
23300 * tests/regression.at (Mixing %token styles): New test.
23301
23302 2001-11-02 Akim Demaille <akim@epita.fr>
23303
23304 * src/reader.c (parse_thong_decl): Formatting changes.
23305 (token_translations_init): New, extracted from...
23306 (packsymbols): Here.
23307 Adjust.
23308
23309 2001-11-01 Akim Demaille <akim@epita.fr>
23310
23311 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
23312 Check that `9foo.y' produces correct cpp guards.
23313 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
23314 guards.
23315 Reported by Wwp.
23316
23317 2001-11-01 Akim Demaille <akim@epita.fr>
23318
23319 * tests/regression.at (Invalid input: 2): New.
23320 * src/lex.c (unlexed_token_buffer): New.
23321 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
23322 too.
23323 Reported by Wwp.
23324
23325 2001-11-01 Akim Demaille <akim@epita.fr>
23326
23327 * tests/calc.at: Catch up with 1.30.
23328 * configure.in: Bump to 1.49a.
23329 Adjust to newer Autotest.
23330
23331 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
23332
23333 * src/conflicts.c: Move global variables rrc_total and src_total ...
23334 (print_conflicts): here.
23335 * src/output.c (output): Free global variable user_toknums.
23336 * src/lex.c (token_obstack): Become static.
23337
23338 2001-10-18 Akim Demaille <akim@epita.fr>
23339
23340 * tests/atlocal.in (GCC): Add.
23341 * tests/calc.at: s/m4_match/m4_bmatch/.
23342 s/m4_patsubst/m4_bpatsubst/.
23343 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
23344 * configure.in: AC_SUBST(GCC).
23345
23346 2001-10-14 Marc Autret <autret_m@epita.fr>
23347
23348 * src/options.c (create_long_option_table): Fix.
23349
23350 2001-10-10 Akim Demaille <akim@epita.fr>
23351
23352 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
23353
23354 2001-10-04 Akim Demaille <akim@epita.fr>
23355
23356 * src/reader.c (parse_union_decl): Push the caracters in
23357 union_obstack, not attrs_obstack.
23358
23359 2001-10-04 Akim Demaille <akim@epita.fr>
23360
23361 Merge in the branch 1.29.
23362
23363 * src/reader.c (packsymbols): Use a temporary obstack for
23364 `%%tokendef', since output_stack is already used elsewhere.
23365
23366 2001-10-02 Akim Demaille <akim@epita.fr>
23367
23368 Bump 1.29d.
23369
23370 2001-10-02 Akim Demaille <akim@epita.fr>
23371
23372 Version 1.29c.
23373
23374 2001-10-02 Akim Demaille <akim@epita.fr>
23375
23376 * tests/regression.at (Invalid CPP headers): New.
23377 From Alexander Belopolsky.
23378 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
23379
23380 2001-10-02 Akim Demaille <akim@epita.fr>
23381
23382 * tests/regression.at (Invalid input): New.
23383 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
23384 Reported by Shura.
23385
23386 2001-10-02 Akim Demaille <akim@epita.fr>
23387
23388 * tests/calc.at: Now that --debug works, the tests must be adjusted.
23389
23390 2001-10-02 Akim Demaille <akim@epita.fr>
23391
23392 * src/output.c (output_parser): Assert `skeleton'.
23393 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
23394 systems.
23395 From Shura.
23396
23397 2001-10-01 Marc Autret <autret_m@epita.fr>
23398
23399 * src/lex.h: Echo modifications.
23400 * src/lex.c (unlex): Parameter is now token_t.
23401 From Hans Aberg.
23402
23403 2001-10-01 Marc Autret <autret_m@epita.fr>
23404
23405 * src/main.c: Include lex.h.
23406 From Hans Aberg.
23407
23408 2001-09-29 Akim Demaille <akim@epita.fr>
23409
23410 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
23411
23412 2001-09-28 Akim Demaille <akim@epita.fr>
23413
23414 * tests/testsuite.at: Update to newer Autotest.
23415 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
23416
23417 2001-09-27 Akim Demaille <akim@epita.fr>
23418
23419 Position independent wrapper.
23420
23421 * tests/bison: Remove.
23422 * tests/bison.in: New.
23423 * configure.in: Adjust.
23424
23425 2001-09-27 Paul Eggert <eggert@twinsun.com>
23426
23427 Port quotearg fixes from tar 1.13.24.
23428
23429 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23430 tm to be declared.
23431 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23432 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23433
23434 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
23435 * m4/mbrtowc.m4: New file.
23436 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
23437 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
23438
23439 2001-09-27 Akim Demaille <akim@epita.fr>
23440
23441 Bump to 1.29c.
23442
23443 2001-09-27 Akim Demaille <akim@epita.fr>
23444
23445 Version 1.29b.
23446
23447 2001-09-25 Akim Demaille <akim@epita.fr>
23448
23449 * src/system.h: Include `xalloc.h'.
23450 Remove it from the C files.
23451 * src/files.c (output_files): Free the obstacks.
23452 * src/lex.c (init_lex): Rename as...
23453 (lex_init): this.
23454 (lex_free): New.
23455 * src/main.c (main): Use it.
23456
23457 2001-09-24 Marc Autret <autret_m@epita.fr>
23458
23459 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
23460 to output informations in fout (FILE*).
23461 (open_graph, close_graph): Likewise.
23462 (output_graph, output_edge, output_node): Likewise.
23463 * src/vcg.h: Update function prototypes.
23464 * src/print_graph.c (print_graph): Open output graph file.
23465 (print_actions): Adjust.
23466 * src/files.h: Remove extern declaration.
23467 * src/files.c: Remove graph_obstack declaration.
23468 (open_files): Remove graph_obstack initialization.
23469 (output_files): Remove graph_obstack saving.
23470
23471 2001-09-24 Marc Autret <autret_m@epita.fr>
23472
23473 * src/files.c (compute_output_file_names): Fix.
23474
23475 2001-09-24 Marc Autret <autret_m@epita.fr>,
23476 Akim Demaille <akim@epita.fr>
23477
23478 * src/reader.c (reader): Remove call to free_symtab ().
23479 * src/main.c (main): Call it here.
23480 Include symtab.h.
23481 * src/conflicts.c (initialize_conflicts): Rename as...
23482 (solve_conflicts): this.
23483 * src/print.c (print_core, print_actions, print_state)
23484 (print_grammar): Dump to a file instead a `output_obstack'.
23485 (print_results): Dump `output_obstack', and then proceed with the
23486 FILE *.
23487 * src/files.c (compute_output_file_names, close_files): New.
23488 (output_files): Adjust.
23489 * src/main.c (main): Adjust.
23490
23491 2001-09-23 Marc Autret <autret_m@epita.fr>
23492
23493 * src/files.c (compute_header_macro): Computes header macro name
23494 from spec_defines_file when given.
23495
23496 2001-09-23 Marc Autret <autret_m@epita.fr>
23497
23498 * src/files.c (output_files): Add default extensions.
23499
23500 2001-09-22 Akim Demaille <akim@epita.fr>
23501
23502 * src/conflicts.c (finalize_conflicts): Rename as...
23503 (free_conflicts): this.
23504
23505 2001-09-22 Akim Demaille <akim@epita.fr>
23506
23507 * src/gram.c (gram_free): Rename back as...
23508 (dummy): this.
23509 (output_token_translations): Free `token_translations'.
23510 * src/symtab.c (free_symtab): Free the tag field.
23511
23512 2001-09-22 Akim Demaille <akim@epita.fr>
23513
23514 Remove `translations' as it is always set to true.
23515
23516 * src/gram.h: Adjust.
23517 * src/reader.c (packsymbols, parse_token_decl): Adjust
23518 * src/print.c (print_grammar): Adjust.
23519 * src/output.c (output_token_translations): Adjust.
23520 * src/lex.c (lex): Adjust.
23521 * src/gram.c: Be sure the set pointers to NULL.
23522 (dummy): Rename as...
23523 (gram_free): this.
23524
23525 2001-09-22 Akim Demaille <akim@epita.fr>
23526
23527 * configure.in: Invoke AM_LIB_DMALLOC.
23528 * src/system.h: Use dmalloc.
23529 * src/LR0.c: Be sure to have pointers initialized to NULL.
23530 (allocate_itemsets): Allocate kernel_items only if needed.
23531
23532 2001-09-22 Akim Demaille <akim@epita.fr>
23533
23534 * configure.in: Bump to 1.29b.
23535 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
23536 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
23537 need xmalloc.c in calc.y.
23538 From Pascal Bart.
23539
23540 2001-09-21 Akim Demaille <akim@epita.fr>
23541
23542 Version 1.29a.
23543 * Makefile.maint, config/config.guess, config/config.sub,
23544 * config/missing: Update from masters.
23545 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
23546 upon package.m4.
23547 * configure.in (ALL_LINGUAS): Add `tr'.
23548
23549 2001-09-21 Akim Demaille <akim@epita.fr>
23550
23551 * tests/Makefile.am (package.m4): Move to...
23552 ($(srcdir)/$(TESTSUITE)): here.
23553
23554 2001-09-20 Akim Demaille <akim@epita.fr>
23555
23556 * src/complain.c: No longer try to be standalone: use system.h.
23557 Don't assume __STDC__ is defined to 1. Just test if it is defined.
23558 * src/complain.h: Likewise.
23559 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
23560 Remove the unused variable `n'.
23561 From Albert Chin-A-Young.
23562
23563 2001-09-18 Marc Autret <autret_m@epita.fr>
23564
23565 * doc/bison.1: Update.
23566 * doc/bison.texinfo (Bison Options): Update --defines and --graph
23567 descriptions.
23568 (Option Cross Key): Update.
23569 Add --graph.
23570
23571 2001-09-18 Marc Autret <autret_m@epita.fr>
23572
23573 * tests/regression.at: New test (comment in %union).
23574
23575 2001-09-18 Marc Autret <autret_m@epita.fr>
23576
23577 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
23578 do that.
23579 Reported by Keith Browne.
23580
23581 2001-09-18 Marc Autret <autret_m@epita.fr>
23582
23583 * tests/output.at: Add tests for --defines and --graph.
23584
23585 2001-09-18 Marc Autret <autret_m@epita.fr>
23586
23587 * tests/output.at: Removes tests of %{header,src}_extension features.
23588
23589 2001-09-18 Akim Demaille <akim@epita.fr>
23590
23591 * tests/Makefile.am (package.m4): New.
23592 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
23593 (_AT_CHECK_CALC_ERROR): Likewise.
23594 Factor the `, ' part of verbose error messages.
23595
23596 2001-09-18 Marc Autret <autret_m@epita.fr>
23597
23598 * src/getargs.c (longopts): Declare --defines and --graph as options
23599 with optional arguments.
23600 * src/files.h: Add extern declarations.
23601 * src/files.c (spec_graph_file, spec_defines_file): New.
23602 (output_files): Update.
23603 Remove CPP-outed code.
23604
23605 2001-09-18 Marc Autret <autret_m@epita.fr>
23606
23607 Turn off %{source,header}_extension feature.
23608
23609 * src/files.c (compute_exts_from_gf): Update.
23610 (compute_exts_from_src): Update.
23611 (output_files): CPP-out useless code.
23612 * src/files.h: Remove {header,source}_extension extern declarations.
23613 * src/reader.c (parse_dquoted_param): CPP-out.
23614 (parse_header_extension_decl): Remove.
23615 (parse_source_extension_decl): Remove.
23616 (read_declarations): Remove cases tok_{hdrext,srcext}.
23617 * src/lex.c (percent_table): Remove {header,source}_extension entries.
23618 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
23619
23620 2001-09-10 Akim Demaille <akim@epita.fr>
23621
23622 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
23623 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
23624 (AT_CHECK_OUTPUT): this.
23625 Merely check ls' exit status, its output is useless.
23626
23627 2001-09-10 Akim Demaille <akim@epita.fr>
23628
23629 * tests/calc.at: Use m4_match.
23630 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
23631
23632 2001-09-10 Marc Autret <autret_m@epita.fr>,
23633 Akim Demaille <akim@epita.fr>
23634
23635 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
23636 enum color_e.
23637 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
23638 to `normal'.
23639 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
23640 * src/lex.h: Adjust prototype.
23641 (token_t): Add `tok_undef'.
23642 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
23643 (parse_percent_token): Now returns token_t.
23644 Add default statement in switch.
23645 (lex): Separate `c' as an input variable, from the token_t result
23646 part.
23647 (unlexed): Is a token_t.
23648
23649 2001-09-10 Akim Demaille <akim@epita.fr>
23650
23651 * configure.in: Bump to 1.29a.
23652
23653 2001-09-07 Akim Demaille <akim@epita.fr>
23654
23655 Version 1.29.
23656
23657 2001-08-30 Akim Demaille <akim@epita.fr>
23658
23659 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
23660 * m4/atconfig.m4: Remove.
23661 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
23662 * tests/bison: New.
23663 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
23664 m4_if, m4_patsubst, and m4_regexp.
23665 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
23666 `input' file instead of echo.
23667
23668 2001-08-29 Akim Demaille <akim@epita.fr>
23669
23670 Bump to 1.28e.
23671
23672 2001-08-29 Akim Demaille <akim@epita.fr>
23673
23674 Version 1.28d.
23675
23676 2001-08-29 Paul Eggert <eggert@twinsun.com>
23677
23678 * src/bison.simple (yyparse): Don't take the address of an
23679 item before the start of an array, as that doesn't conform to
23680 the C Standard.
23681
23682 2001-08-29 Robert Anisko <anisko_r@epita.fr>
23683
23684 * doc/bison.texinfo (Location Tracking Calc): New node.
23685
23686 2001-08-29 Paul Eggert <eggert@twinsun.com>
23687
23688 * src/output.c (output): Do not define const, as this now
23689 causes more problems than it cures.
23690
23691 2001-08-29 Akim Demaille <akim@epita.fr>
23692
23693 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
23694 the nodes.
23695 Be sure to tag the `detailmenu'.
23696
23697 2001-08-29 Akim Demaille <akim@epita.fr>
23698
23699 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
23700 download in a tmp dir.
23701
23702 2001-08-28 Marc Autret <autret_m@epita.fr>
23703
23704 * config/depcomp: New file.
23705
23706 2001-08-28 Marc Autret <autret_m@epita.fr>
23707
23708 * doc/bison.1 (mandoc): Adjust.
23709 From Juan Manuel Guerrero.
23710
23711 2001-08-28 Marc Autret <autret_m@epita.fr>
23712
23713 * src/print_graph.c (print_state): Fix.
23714
23715 2001-08-27 Marc Autret <autret_m@epita.fr>
23716
23717 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
23718 char * members.
23719 Echo modifications to the functions prototypes.
23720 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
23721
23722 2001-08-27 Marc Autret <autret_m@epita.fr>
23723
23724 * src/vcg.c: Include `xalloc.h'.
23725 (add_colorentry): New.
23726 (add_classname): New.
23727 (add_infoname): New.
23728 * src/vcg.h: Add new prototypes.
23729
23730 2001-08-27 Akim Demaille <akim@epita.fr>
23731
23732 * Makefile.maint: Sync. again with CVS Autoconf.
23733
23734 2001-08-27 Akim Demaille <akim@epita.fr>
23735
23736 * Makefile.maint: Formatting changes.
23737 (po-update, cvs-update, update): New targets.
23738 (AMTAR): Remove.
23739
23740 2001-08-27 Akim Demaille <akim@epita.fr>
23741
23742 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
23743 * Makefile.maint: Sync. with CVS Autoconf.
23744
23745 2001-08-27 Marc Autret <autret_m@epita.fr>
23746
23747 * src/vcg.h (struct infoname_s): New.
23748 (struct colorentry_s): New.
23749 (graph_s): New fields {vertical,horizontal}_order in structure.
23750 Add `infoname' field.
23751 Add `colorentry' field;
23752 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
23753 (G_HORIZONTAL_ORDER): New.
23754 (G_INFONAME): New.
23755 (G_COLORENTRY): New.
23756 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
23757 Add output of `infoname'.
23758 Add output of `colorentry'.
23759
23760 2001-08-27 Marc Autret <autret_m@epita.fr>
23761
23762 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
23763 This one shadowed a global parameter.
23764
23765 2001-08-24 Marc Autret <autret_m@epita.fr>
23766
23767 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
23768 instead of `unsigned'.
23769 (print_state): Do not call obstack_object_size () in obstack_grow ()
23770 to avoid macro variables shadowing.
23771
23772 2001-08-23 Marc Autret <autret_m@epita.fr>
23773
23774 * src/lex.c (percent_table): Typo: s/naem/name/.
23775 Add graph option.
23776 Normalize new options declarations.
23777
23778 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
23779
23780 * tests/suite.at: Exercise %header_extension and %source_extension.
23781
23782 2001-08-16 Marc Autret <autret_m@epita.fr>
23783
23784 * src/reader.c (parse_dquoted_param): New.
23785 (parse_header_extension_decl): Use it.
23786 (parse_source_extension_decl): Likewise.
23787
23788 2001-08-16 Marc Autret <autret_m@epita.fr>
23789
23790 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
23791 (get_xxxx_str): Use assert () instead of complain ().
23792 Remove return invokations in default cases.
23793 (get_decision_str): Modify default behaviour. Remove second argument.
23794 Echo modifications on calls.
23795 (output_graph): Fix.
23796
23797 2001-08-16 Marc Autret <autret_m@epita.fr>
23798
23799 * src/getargs.c (usage): Update with ``-g, --graph''.
23800
23801 2001-08-16 Marc Autret <autret_m@epita.fr>
23802
23803 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
23804 (Option Cross Key): Likewise.
23805 * doc/bison.1: Update.
23806
23807 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
23808
23809 * src/output.c (output_master_parser): Don't finish action_obstack.
23810 (output_parser): Don't care about the muscle action, here.
23811 (prepare): Copy the action_obstack in the action muscle.
23812 (output): Free action_obstack.
23813
23814 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23815
23816 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
23817 will contain `%union' declaration.
23818 (parse_union_decl): Delete #line directive output.
23819 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
23820 informations about %union.
23821 (parse_union_decl): Copy the union_obstack in the muscle stype.
23822 * src/bison.simple: Add new #line directive.
23823 Add typdef %%stype YYSTYPE.
23824
23825 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
23826
23827 * src/bison.simple: Add new `#line' directive.
23828
23829 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
23830
23831 * src/bison.simple: New `#line' directive.
23832 * src/output.c (output_parser): Support new dynamic muscle input_line.
23833
23834 2001-09-22 Marc Autret <autret_m@epita.fr>
23835
23836 * src/output.c (output_master_parser): New.
23837 (output_parser): Be more re-entrant.
23838
23839 2001-09-21 Marc Autret <autret_m@epita.fr>
23840
23841 * src/reader.c (copy_definition, parse_union_decl): Update and use
23842 `linef' muscle.
23843 (copy_action): Likewise.
23844 Use obstack_1grow ().
23845 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
23846
23847 2001-09-21 Marc Autret <autret_m@epita.fr>
23848
23849 * src/options.c (option_table): Adjust.
23850 * src/lex.c (parse_percent_token): Fix.
23851
23852 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23853
23854 * src/options.c (symtab.h): Include it, need by lex.h.
23855
23856 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
23857
23858 * src/lex.c (parse_percent_token): Change type of variable `tx', which
23859 is now an option_table_struct*.
23860 (option_strcmp): New function option_strcmp.
23861 (parse_percent_token): Call option_strcmp.
23862 * src/getargs.c (xalloc.h, options.h): Include it.
23863 (getargs): Call create_long_option_table.
23864 (getargs): Free longopts at the end of the function.
23865 (shortopts): Move in options.c.
23866 * src/options.c (create_long_option_table): New function. Convert
23867 information from option_table to option structure.
23868 * src/reader.c (options.h): Include it.
23869
23870 * src/Makefile.am: Adjust.
23871 * src/options.c (option_table): Create from longopts and percent_table.
23872 * src/getargs.c (longopts): Delete.
23873 * src/lex.c (struct percent_table_struct): Delete.
23874 (percent_table): Delete.
23875 (options.h): Include it.
23876 * src/options.c: Create.
23877 * src/options.h: Create.
23878 Declare enum opt_access_e.
23879 Define struct option_table_struct.
23880
23881 2001-09-20 Marc Autret <autret_m@epita.fr>
23882
23883 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
23884 sections of Bison.
23885
23886 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
23887
23888 * src/bison.simple: s/%%filename/%%skeleton.
23889 * src/muscle_tab.c (getargs.h): Include it.
23890 (muscle_init): Insert new muscle skeleton.
23891
23892 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
23893
23894 * src/output.c (output_parser): Delete unused variable actions_dumped.
23895
23896 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
23897
23898 * src/output.c (output): Delete call to reader_output_yylsp.
23899 * src/reader.c (reader): Likewise.
23900 * src/reader.h: Delete declaration of reader_output_yylsp.
23901
23902 2001-09-02 Marc Autret <autret_m@epita.fr>
23903
23904 * src/reader.c: Include muscle_tab.h.
23905 (parse_union_decl): Update.
23906 (parse_macro_decl): Rename parse_muscle_decl.
23907 Update to use renamed functions and variable.
23908 (read_declarations, copy_action, read_additionnal_code, : Updated
23909 with correct variables and functions names.
23910 (packsymbols, reader): Likewise.
23911
23912 * src/reader.h (muscle_obstack): Extern declaration update.
23913
23914 * src/output.c: Include muscle_tab.h
23915 In all functions using macro_insert, change by using muscle_insert ().
23916 (macro_obstack): Rename muscle_obstack.
23917 Echo modifications in the whole file.
23918 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
23919 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
23920 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
23921
23922 * src/muscle_tab.h: Update double inclusion macros.
23923 (macro_entry_s): Rename muscle_entry_s.
23924 Update prototypes.
23925
23926 * src/muscle_tab.c: Include muscle_tab.h.
23927 Rename macro_tabble to muscle_table.
23928 (mhash1, mhash2, mcmp): Use muscle_entry.
23929 (macro_init): Rename muscle_init. Update.
23930 (macro_insert): Rename muscle_insert. Update.
23931 (macro_find): Rename muscle_find. Update.
23932
23933 * src/main.c: Include muscle_tab.h.
23934 (main): Call muscle_init ().
23935 * src/Makefile.am (bison_SOURCES): Echo modifications.
23936
23937 2001-09-02 Marc Autret <autret_m@epita.fr>
23938
23939 Now the files macro_tab.[ch] are named muscle_tab.[ch].
23940
23941 * src/muscle_tab.c, src/muscle_tab.h: Add files.
23942
23943 2001-09-02 Marc Autret <autret_m@epita.fr>
23944
23945 * src/macrotab.c, src/macrotab.h: Remove.
23946
23947 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
23948
23949 * src/reader.c (copy_guard): Use muscle to specify the `#line'
23950 filename.
23951
23952 2001-09-01 Marc Autret <autret_m@epita.fr>
23953
23954 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
23955 to an explicit value to activate the feature. We do it here.
23956
23957 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23958
23959 * src/output.c (prepare): Delete the `filename' muscule insertion.
23960 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
23961 (parse_union_decl): Likewise.
23962 * src/macrotab.c (macro_init): Initialize filename by infile.
23963
23964 2001-08-31 Marc Autret <autret_m@epita.fr>
23965
23966 * src/bison.simple (YYLSP_NEEDED): New definition.
23967 * src/output.c (prepare): Add macro insertion of `locations_flag'
23968
23969 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23970
23971 * src/output.c (prepare): Delete insertion of previous muscles,
23972 and insert the `prefix' muscles.
23973 * src/macrotab.c (macro_init): Likewise.
23974 (macro_init): Initialization prefix directive by `yy'.
23975 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
23976 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
23977 yylval, yydebug, yyerror, yynerrs and yyparse.
23978 New directive `#define' to substitute yydebug, ... with option
23979 name_prefix.
23980
23981 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
23982
23983 * src/main.c (main): Standardize.
23984 * src/output.c (output_table_data, output_parser): Likewise.
23985 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
23986
23987 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
23988
23989 * src/reader.c (read_additionnal_code): Rename %%user_code to
23990 %%epilogue.
23991 * src/output.c (output): Rename %%declarations to %%prologue.
23992 * src/bison.simple: Echo modifications.
23993
23994 2001-08-31 Marc Autret <autret_m@epita.fr>
23995
23996 * src/reader.c (readgram): CleanUp.
23997 (output_token_defines): Likewise.
23998 (packsymbols): Likewise.
23999 (reader): Likewise.
24000 * src/output.c (output): CPP-out useless code.
24001
24002 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
24003
24004 * src/reader.c (reader): Delete obsolete call to function
24005 output_trailers and output_headers.
24006 * src/output.h: Remove obsolete functions prototypes of output_headers
24007 and output_trailers.
24008
24009 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
24010
24011 * src/main.c: Include macrotab.h.
24012 * src/macrotab.h (macro_entry_s): Constify fields.
24013 Adjust functions prototypes.
24014 * src/macrotab.c (macro_insert): Constify key and value.
24015 (macro_find): Constify key.
24016 (macro_insert): Include 'xalloc.h'
24017 (macro_insert): Use XMALLOC.
24018 (macro_find): Constify return value.
24019 * src/output.c (output_table_data): Rename table to table_data.
24020 (output_parser): Constify macro_key, macro_value.
24021
24022 2001-08-30 Marc Autret <autret_m@epita.fr>
24023
24024 * src/reader.c (parse_skel_decl): New.
24025 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
24026 * src/lex.h (token_t): New token `tok_skel'.
24027 * src/lex.c (percent_table): Add skeleton option entry.
24028 Standardize.
24029
24030 2001-08-29 Marc Autret <autret_m@epita.fr>
24031
24032 * src/bison.simple: Add %%user_code directive at the end.
24033 * src/reader.c (read_additionnal_code): New.
24034 (reader): Use it.
24035 * src/output.c (output_program): Remove.
24036 (output): Update.
24037
24038 2001-08-28 Marc Autret <autret_m@epita.fr>
24039
24040 * src/output.c (output_actions): Clean up.
24041 (output_gram): CPP-out useless code.
24042 * src/reader.c (reader): Clean up, CPP-out useless code.
24043
24044 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
24045
24046 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
24047 directive.
24048 * src/bison.simple: Add `%%definitions'.
24049
24050 2001-08-28 Marc Autret <autret_m@epita.fr>
24051
24052 * config/depcomp: New file.
24053
24054 2001-08-27 Paul Eggert <eggert@twinsun.com>
24055
24056 * src/bison.simple (yyparse): Don't take the address of an
24057 item before the start of an array, as that doesn't conform to
24058 the C Standard.
24059
24060 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
24061
24062 * src/output.c (output): Remove the initialization of the macro
24063 obstack. It was done too late here.
24064
24065 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
24066 completely wrong.
24067 (reader): Initialize the macro obstack here, since we need it to grow
24068 '%define' directives.
24069
24070 * src/reader.h: Declare the macro obstack as extern.
24071
24072 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
24073
24074 * src/output.c (output_parser): Fix. Store single '%' characters in
24075 the output obstack instead of throwing them away.
24076
24077 2001-08-27 Akim Demaille <akim@epita.fr>
24078
24079 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
24080
24081 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24082
24083 * lib/Makefile.am: Adjust.
24084
24085 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24086
24087 * src/bison.simple: Update and add '%%' directives.
24088
24089 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24090
24091 * src/reader.c (reader): Remove calls to 'output_headers' and
24092 'output_trailers'. Remove some C output.
24093 (readgram): Disable a piece of code that was writing a default
24094 definition for 'YYSTYPE'.
24095 (reader_output_yylsp): Remove.
24096 (packsymbols): Output token defintions to a macro.
24097 (copy_definition): Disable C output.
24098
24099 * src/reader.c (parse_macro_decl): New function used to parse macro
24100 declarations.
24101 (copy_string2): Put the body of copy_string into this new function.
24102 Add a parameter to let the caller choose whether he wants to copy the
24103 string delimiters or not.
24104 (copy_string): Be a simple call to copy_string2 with the last argument
24105 bound to true.
24106 (read_declarations): Add case for macro definition.
24107 (copy_identifier): New.
24108 (parse_macro_decl): Read macro identifiers using copy_identifier
24109 rather than lex.
24110
24111 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24112
24113 * src/output.c (prepare): Add prefixed names.
24114 (output_parser): Output semantic actions.
24115 (output_parser): Fix bug on '%%line' directives.
24116
24117 * src/output.c (output_headers): Remove. The C code printed by this
24118 function should now be in the skeletons.
24119 (output_trailers): Remove.
24120 (output): Disable call to 'reader_output_yylsp'.
24121 (output_rule_data): Do not output tables to the table obstack.
24122
24123 * src/output.c: Remove some C dedicated output.
24124 Improve the use of macro and output obstacks.
24125 (output_defines): Remove.
24126
24127 * src/output.c (output_token_translations): Associate 'translate'
24128 table with a macro. No output to the table obstack.
24129 (output_gram): Same for 'rhs' and 'prhs'.
24130 (output_stos): Same for 'stos'.
24131 (output_rule_data): Same for 'r1' and 'r2'.
24132 (token_actions): Same for 'defact'.
24133 (goto_actions): Same for 'defgoto'.
24134 (output_base): Same for 'pact' and 'pgoto'.
24135 (output_table): Same for 'table'.
24136 (output_check): Same for 'check'.
24137
24138 * src/output.c (output_table_data): New function.
24139 (output_short_table): Remove.
24140 (output_short_or_char_table): Remove.
24141
24142 * src/output.c (output_parser): Replace most of the skeleton copy code
24143 with something new. Skeletons are now processed character by character
24144 rather than line by line, and Bison looks for '%%' macros. This is the
24145 first step in making Bison's output process (a lot) more flexible.
24146 (output_parser): Use the macro table.
24147
24148 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24149
24150 * src/main.c (main): Initialize the macro table.
24151
24152 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24153
24154 * src/lex.c (percent_table): Add tok_define.
24155 * src/lex.h: Add tok_define.
24156
24157 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24158
24159 * src/macrotab.c: New file.
24160 * src/macrotab.h: New file.
24161 * src/Makefile.am: Update.
24162
24163 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
24164
24165 * lib/hash.c: New file.
24166 * lib/hash.h: New file.
24167 * lib/Makefile.am: Update.
24168
24169 2001-08-15 Akim Demaille <akim@epita.fr>
24170
24171 Version 1.28c.
24172
24173 2001-08-15 Marc Autret <autret_m@epita.fr>
24174
24175 * src/reader.c (readgram): Indent output macro YYSTYPE.
24176 (packsymbols): Likewise.
24177 (output_token_defines): Likewise.
24178 * src/files.c: Standardize.
24179 (compute_header_macro): New.
24180 (defines_obstack_save): New. Use compute_header_macro.
24181 (output_files): Update. Use defines_obstack_save.
24182
24183 2001-08-15 Akim Demaille <akim@epita.fr>
24184
24185 * doc/bison.texinfo (Table of Symbols): Document
24186 YYSTACK_USE_ALLOCA.
24187
24188 2001-08-15 Akim Demaille <akim@epita.fr>
24189
24190 * missing: Update from CVS Automake.
24191 * config/config.guess, config/config.sub, config/texinfo.tex:
24192 Update from gnu.org.
24193
24194 2001-08-15 Akim Demaille <akim@epita.fr>
24195
24196 * Makefile.maint: Sync with CVS Autoconf.
24197
24198 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
24199
24200 * doc/bison.texinfo: Include GNU Free Documentation License from
24201 `fdl.texi'.
24202 * doc/fdl.texi: Add to package.
24203
24204 2001-08-14 Marc Autret <autret_m@epita.fr>
24205
24206 Turn on %{source,header}_extension features.
24207
24208 * src/lex.c (percent_table): Un-CPP out header_extension and
24209 source_extension.
24210 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
24211 (compute_exts_from_src): Remove conditions. It restores priorities
24212 between options.
24213
24214 2001-08-14 Marc Autret <autret_m@epita.fr>
24215
24216 * src/files.c (compute_base_names): Add extensions computing when
24217 `--file-prefix' used.
24218 Standardize function calls.
24219
24220 2001-08-13 Marc Autret <autret_m@epita.fr>
24221
24222 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
24223 defining it (defined but null disables alloca).
24224
24225 2001-08-13 Marc Autret <autret_m@epita.fr>
24226
24227 * src/bison.simple (_yy_memcpy): CPP reformat.
24228
24229 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
24230
24231 * tests/atconfig.in (CPPFLAGS): Fix.
24232
24233 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
24234
24235 * doc/bison.texinfo: Include GNU General Public License from
24236 `gpl.texi'.
24237 * doc/gpl.texi: Add to package.
24238
24239 2001-08-10 Marc Autret <autret_m@epita.fr>
24240
24241 * src/print_graph.h: Fix.
24242 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
24243
24244 2001-08-10 Akim Demaille <akim@epita.fr>
24245
24246 * src/system.h: Provide default declarations for stpcpy, strndup,
24247 and strnlen.
24248
24249 2001-08-10 Robert Anisko <anisko_r@epita.fr>
24250
24251 * doc/bison.texinfo (Locations): Update @$ stuff.
24252
24253 2001-08-09 Robert Anisko <anisko_r@epita.fr>
24254
24255 * src/bison.simple (YYLLOC_DEFAULT): Update.
24256 (yyparse): Adjust.
24257
24258 2001-08-08 Marc Autret <autret_m@epita.fr>
24259
24260 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
24261 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
24262 Reported by Fabrice Bauzac.
24263
24264 2001-08-08 Marc Autret <autret_m@epita.fr>
24265
24266 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
24267 * src/vcg.c (output_node): Fix.
24268 * src/vcg.h: Cleanup.
24269 * src/print_graph.c: Add comments.
24270 (node_output_size): New global variable. Simplify the formatting of
24271 the VCG graph output.
24272 (print_actions): Unused code is now used. It notifies the final state
24273 and no action states in the VCG graph. It also give the reduce actions.
24274 The `shift and goto' edges are red and the `go to state' edges are
24275 blue.
24276 Get the current node name and node_obstack by argument.
24277 (node_obstack): New variable.
24278 (print_state): Manage node_obstack.
24279 (print_core): Use node_obstack given by argument.
24280 A node is not only computed here but in print_actions also.
24281 (print_graph): CPP out useless code instead of commenting it.
24282
24283 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
24284
24285 * tests/atconfig.in (CPPFLAGS): Fix.
24286
24287 2001-08-07 Akim Demaille <akim@epita.fr>
24288
24289 * src/print_graph.c (quote): New.
24290 (print_core): Use it.
24291
24292 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
24293
24294 * src/vcg.c (complain.h): Include it.
24295 Unepitaize `return' invocations.
24296 [NDEBUG] (main): Remove.
24297 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
24298 * src/files.c (open_files): Initialize graph_obstack.
24299 * src/print_graph.c (print_actions): CPP out useless code.
24300 (print_core): Don't output the last `\n' in labels.
24301 Use `quote'.
24302 * src/files.c (output_files): Output the VCG file.
24303 * src/main.c (main): Invoke print_graph ();
24304
24305 2001-08-06 Marc Autret <autret_m@epita.fr>
24306
24307 Automaton VCG graph output.
24308 Using option ``-g'' or long option ``--graph'', you can generate
24309 a gram_filename.vcg file containing a VCG description of the LALR (1)
24310 automaton of your grammar.
24311
24312 * src/main.c: Call to print_graph() function.
24313 * src/getargs.h: Update.
24314 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
24315 (graph_flag): New flag.
24316 (longopts): Update.
24317 (getargs): Add case `g'.
24318 * src/files.c (graph_obstack): New obstack struct.
24319 (open_files): Initialize new obstack.
24320 (output_files): Saves graph_obstack if required.
24321 * src/files.h (graph_obstack): New extern declaration.
24322 * src/Makefile.am: Add new source files.
24323
24324 2001-08-06 Marc Autret <autret_m@epita.fr>
24325
24326 * src/print_graph.c, src/print_graph.h (graph): New.
24327 * src/vcg.h: New file.
24328 * src/vcg.c: New file, VCG graph handling.
24329
24330 2001-08-06 Marc Autret <autret_m@epita.fr>
24331
24332 Add of %source_extension and %header_extension which specify
24333 the source or/and the header output file extension.
24334
24335 * src/files.c (compute_base_names): Remove initialisation of
24336 src_extension and header_extension.
24337 (compute_exts_from_gf): Update.
24338 (compute_exts_from_src): Update.
24339 (output_files): Update.
24340 * src/reader.c (parse_header_extension_decl): New.
24341 (parse_source_extension_decl): New.
24342 (read_declarations): New case statements for the new tokens.
24343 * src/lex.c (percent_table): Add entries for %source_extension
24344 and %header_extension.
24345 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
24346
24347 2001-08-06 Marc Autret <autret_m@epita.fr>
24348
24349 * configure.in: Bump to 1.28c.
24350 * doc/bison.texinfo: Texinfo thingies.
24351
24352 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
24353
24354 * tests/atconfig.in (CPPFLAGS): Add.
24355 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
24356
24357 2001-08-03 Akim Demaille <akim@epita.fr>
24358
24359 Version 1.28b.
24360
24361 2001-08-03 Akim Demaille <akim@epita.fr>
24362
24363 * tests/Makefile.am (check-local): Ship testsuite.
24364 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
24365 Include `string.h'.
24366
24367 2001-08-03 Akim Demaille <akim@epita.fr>
24368
24369 * configure.in: Try using -Wformat when compiling.
24370
24371 2001-08-03 Akim Demaille <akim@epita.fr>
24372
24373 * configure.in: Bump to 1.28b.
24374
24375 2001-08-03 Akim Demaille <akim@epita.fr>
24376
24377 * src/complain.c: Adjust strerror_r portability issues.
24378
24379 2001-08-03 Akim Demaille <akim@epita.fr>
24380
24381 Version 1.28a.
24382
24383 2001-08-03 Akim Demaille <akim@epita.fr>
24384
24385 * src/getargs.c, src/getarg.h (skeleton)): Constify.
24386 * src/lex.c (literalchar): Avoid name clashes on `buf'.
24387 * src/getargs.c: Include complain.h.
24388 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
24389 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
24390
24391 2001-08-03 Akim Demaille <akim@epita.fr>
24392
24393 * src/reader.c (readgram): Display hidden chars in error messages.
24394
24395 2001-08-03 Akim Demaille <akim@epita.fr>
24396
24397 Update to gettext 0.10.39.
24398
24399 2001-08-03 Akim Demaille <akim@epita.fr>
24400
24401 * lib/strspn.c: New.
24402
24403 2001-08-01 Marc Autret <autret_m@epita.fr>
24404
24405 * doc/bison.texinfo: Update.
24406 * doc/bison.1 (mandoc): Update.
24407 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
24408 * src/files.c: Support output files extensions computing.
24409 (src_extension): New static variable.
24410 (header_extension): New static variable.
24411 (tr): New function.
24412 (get_extension_index): New function, gets the index of an extension
24413 filename in a string.
24414 (compute_exts_from_gf): New function, computes extensions from the
24415 grammar file extension.
24416 (compute_exts_from_src): New functions, computes extensions from the
24417 C source file extension, file given by ``-o'' option.
24418 (compute_base_names): Update.
24419 (output_files): Update.
24420
24421 2001-08-01 Robert Anisko <anisko_r@epita.fr>
24422
24423 * doc/bison.texi: Document @$.
24424 (Locations): New section.
24425
24426 2001-07-18 Akim Demaille <akim@epita.fr>
24427
24428 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
24429 * config/prev-version.txt, config/move-if-change: New.
24430 * Makefile.am: Adjust.
24431
24432 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
24433
24434 * src/bison.simple (yyparse): Suppress warning `comparaison
24435 between signed and unsigned'.
24436
24437 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
24438
24439 * src/getargs.h (raw_flag): Remove.
24440 * src/getargs.c: Die on `-r'/`--raw'.
24441 * src/lex.c (parse_percent_token): Die on `%raw'.
24442 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
24443 * tests/calc.at: Suppress test with option `--raw'.
24444
24445 2001-07-14 Akim Demaille <akim@epita.fr>
24446
24447 * config/: New.
24448 * configure.in: Require Autoconf 2.50.
24449 Update to gettext 0.10.38.
24450
24451 2001-03-16 Akim Demaille <akim@epita.fr>
24452
24453 * doc/bison.texinfo: ANSIfy the examples.
24454
24455 2001-03-16 Akim Demaille <akim@epita.fr>
24456
24457 * getargs.c (skeleton): New variable.
24458 (longopts): --skeleton is a new option.
24459 (shortopts, getargs): -S is a new option.
24460 * getargs.h: Declare skeleton.
24461 * output.c (output_parser): Use it.
24462
24463 2001-03-16 Akim Demaille <akim@epita.fr>
24464
24465 * m4/strerror_r.m4: New.
24466 * m4/error.m4: Run AC_FUNC_STRERROR_R.
24467 * lib/error.h, lib/error.c: Update.
24468
24469 2001-03-16 Akim Demaille <akim@epita.fr>
24470
24471 * src/getargs.c (longopts): Clean up.
24472
24473 2001-02-21 Akim Demaille <akim@epita.fr>
24474
24475 * src/reader.c (gensym): `gensym_count' is your own.
24476 Use a static buf to create the symbol name, as token_buffer is no
24477 longer a buffer.
24478
24479 2001-02-08 Akim Demaille <akim@epita.fr>
24480
24481 * src/conflicts.c (conflict_report): Be sure not to append to res
24482 between two calls, which could happen if both first sprintf were
24483 skipped, but not the first cp += strlen.
24484
24485 2001-02-08 Akim Demaille <akim@epita.fr>
24486
24487 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
24488 New, from fileutils 4.0.37.
24489 * configure.in: Require Autoconf 2.49c. I took some time before
24490 making this decision. This is the only way out for portability
24491 issues in Bison, it would mean way too much duplicate effort to
24492 import in Bison features implemented in 2.49c since 2.13.
24493 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
24494
24495 2001-02-02 Akim Demaille <akim@epita.fr>
24496
24497 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
24498 * lib/xalloc.h, lib/xmalloc.c: Update.
24499
24500 2001-01-19 Akim Demaille <akim@epita.fr>
24501
24502 Get rid of the ad hoc handling of token_buffer in the scanner: use
24503 the obstacks.
24504
24505 * src/lex.c (token_obstack): New.
24506 (init_lex): Initialize it. No longer call...
24507 (grow_token_buffer): this. Remove it.
24508 Adjust all the places which used it to use the obstack.
24509
24510 2001-01-19 Akim Demaille <akim@epita.fr>
24511
24512 * src/lex.h: Rename all the tokens:
24513 s/\bENDFILE\b/tok_eof/g;
24514 s/\bIDENTIFIER\b/tok_identifier/g;
24515 etc.
24516 Let them be enums, not #define, to ease debugging.
24517 Adjust all the code.
24518
24519 2001-01-18 Akim Demaille <akim@epita.fr>
24520
24521 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
24522 * src/lex.c (maxtoken, grow_token_buffer): Static.
24523
24524 2001-01-18 Akim Demaille <akim@epita.fr>
24525
24526 Since we now use obstacks, more % directives can be enabled.
24527
24528 * src/lex.c (percent_table): Also accept `%yacc',
24529 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
24530 `%debug'.
24531 Handle the actions for `%semantic_parser' and `%pure_parser' here,
24532 instead of returning a token.
24533 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
24534 * src/reader.c (read_declarations): Adjust.
24535 * src/files.c (open_files): Don't call `compute_base_names', don't
24536 compute `attrsfile' since they depend upon data which might be
24537 *in* the input file now.
24538 (output_files): Do it here.
24539 * src/output.c (output_headers): Document the fact that this patch
24540 introduces a guaranteed SEGV for semantic parsers.
24541 * doc/bison.texinfo: Document them.
24542 * tests/suite.at: Exercise these %options.
24543
24544 2000-12-20 Akim Demaille <akim@epita.fr>
24545
24546 Also handle the output file (--verbose) with obstacks.
24547
24548 * files.c (foutput): Remove.
24549 (output_obstack): New.
24550 Adjust all dependencies.
24551 * src/conflicts.c: Return a string.
24552 * src/system.h (obstack_grow_string): Rename as...
24553 (obstack_sgrow): this. Be ready to work with non literals.
24554 (obstack_fgrow4): New.
24555
24556 2000-12-20 Akim Demaille <akim@epita.fr>
24557
24558 * src/files.c (open_files): Fix the computation of short_base_name
24559 in the case of `-o foo.tab.c'.
24560
24561 2000-12-20 Akim Demaille <akim@epita.fr>
24562
24563 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
24564 (copy_dollar): Now that everything uses obstacks, get rid of the
24565 FILE * parameters.
24566
24567 2000-12-20 Akim Demaille <akim@epita.fr>
24568
24569 * src/files.c (open_files): Actually the `.output' file is based
24570 on the short_base_name, not base_name.
24571 * tests/suite.at (Checking output file names): Adjust.
24572
24573 2000-12-20 Akim Demaille <akim@epita.fr>
24574
24575 * src/bison.s1: Remove, we now use directly...
24576 * src/bison.simple: this.
24577 * src/Makefile.am: Use pkgdata instead of data.
24578
24579 2000-12-20 Akim Demaille <akim@epita.fr>
24580
24581 * src/files.c (guard_obstack): New.
24582 (open_files): Initialize it.
24583 (output_files): Dump it...
24584 * src/files.h: Export it.
24585 * src/reader.c (copy_guard): Use it.
24586
24587 2000-12-19 Akim Demaille <akim@epita.fr>
24588
24589 * src/files.c (outfile, defsfile, actfile): Removed as global
24590 vars.
24591 (open_files): Don't compute them.
24592 (output_files): Adjust.
24593 (base_name, short_base_name): Be global.
24594 Adjust dependencies.
24595
24596 2000-12-19 Akim Demaille <akim@epita.fr>
24597
24598 * src/files.c (strsuffix): New.
24599 (stringappend): Be just like strcat but allocate.
24600 (base_names): Eve out from open_files.
24601 Try to simplify the rather hairy computation of base_name and
24602 short_base_name.
24603 (open_files): Use it.
24604 * tests/suite.at (Checking output file names): New test.
24605
24606 2000-12-19 Akim Demaille <akim@epita.fr>
24607
24608 * src/system.h (obstack_grow_literal_string): Rename as...
24609 (obstack_grow_string): this.
24610 * src/output.c (output_parser): Recognize `%% actions' instead of
24611 `$'.
24612 * src/bison.s1: s/$/%% actions/.
24613 * src/bison.hairy: Likewise.
24614
24615 2000-12-19 Akim Demaille <akim@epita.fr>
24616
24617 * src/output.c (output_parser): Compute the `#line' lines when
24618 there are.
24619 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
24620 Suggested by Hans Aberg.
24621
24622 2000-12-19 Akim Demaille <akim@epita.fr>
24623
24624 Let the handling of the skeleton files be local to the procedures
24625 that use it.
24626
24627 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
24628 longer static.
24629 (fparser, open_extra_files): Remove.
24630 (open_files, output_files): Don't take care of fparser.
24631 * src/files.h: Adjust.
24632 * src/output.c (output_parser): Open and close the file to the
24633 skeleton.
24634 * src/reader.c (read_declarations): When %semantic_parser, open
24635 fguard.
24636
24637 2000-12-19 Akim Demaille <akim@epita.fr>
24638
24639 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
24640 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
24641
24642 2000-12-19 Akim Demaille <akim@epita.fr>
24643
24644 * src/files.c (open_files): Yipee! We no longer need all the code
24645 looking for `/tmp' since we have no tmp file.
24646
24647 2000-12-19 Akim Demaille <akim@epita.fr>
24648
24649 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
24650 New macros.
24651 * src/files.c (open_files): Less dependency on MSDOS etc.
24652
24653 2000-12-14 Akim Demaille <akim@epita.fr>
24654
24655 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
24656 Provide a default definition.
24657 Use it when executing the default @ action.
24658 * src/reader.c (reader_output_yylsp): No longer include
24659 `timestamp' and `text' in the default YYLTYPE.
24660
24661 2000-12-12 Akim Demaille <akim@epita.fr>
24662
24663 * src/reader.c (copy_definition, parse_union_decl, copy_action)
24664 (copy_guard): Quote the file names.
24665 Reported by Laurent Mascherpa.
24666
24667 2000-12-12 Akim Demaille <akim@epita.fr>
24668
24669 * src/output.c (output_headers, output_program, output): Be sure
24670 to escape special characters when outputting filenames.
24671 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
24672 (output_headers): Don't depend on them, Use ACTSTR.
24673
24674 2000-11-17 Akim Demaille <akim@epita.fr>
24675
24676 * lib/obstack.h: Formatting changes.
24677 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
24678 prevents type checking.
24679 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24680 cast the value to (void *): assigning a `foo *' to a `void *'
24681 variable is valid.
24682 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24683 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
24684 append characters.
24685
24686 2000-11-17 Akim Demaille <akim@epita.fr>
24687
24688 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
24689 as...
24690 (suite.m4, regression.m4, calc.m4): these.
24691 * tests/atgeneral.m4: Update from CVS Autoconf.
24692
24693 2000-11-17 Akim Demaille <akim@epita.fr>
24694
24695 * tests/regression.m4 (%union and --defines): New test,
24696 demonstrating a current bug in the obstack implementation.
24697
24698 2000-11-17 Akim Demaille <akim@epita.fr>
24699
24700 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
24701 macros.
24702 Use them to declare the variables which are global or local to
24703 `yyparse'.
24704
24705 2000-11-17 Akim Demaille <akim@epita.fr>
24706
24707 * acconfig.h: Remove, no longer used.
24708
24709 2000-11-07 Akim Demaille <akim@epita.fr>
24710
24711 * src: s/Copyright (C)/Copyright/g.
24712
24713 2000-11-07 Akim Demaille <akim@epita.fr>
24714
24715 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
24716 defining.
24717 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
24718
24719 2000-11-07 Akim Demaille <akim@epita.fr>
24720
24721 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
24722 Merge in a single CPP if/else.
24723
24724 2000-11-07 Akim Demaille <akim@epita.fr>
24725
24726 * src/output.c (output): Remove useless variables.
24727 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
24728 argument `data' for consistency with the prototypes.
24729 Qualify it `const'.
24730 (obstack_copy, obstack_copy0): Rename the second argument as
24731 `address' for consistency. Qualify it `const'.
24732 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
24733 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
24734 `const' their input argument (`data' or `address').
24735 Adjust the corresponding macros to include `const' in casts.
24736
24737 2000-11-03 Akim Demaille <akim@epita.fr>
24738
24739 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
24740 s/PFILE1/BISON_HAIRY/.
24741 Adjust dependencies.
24742
24743 2000-11-03 Akim Demaille <akim@epita.fr>
24744
24745 For some reason, this was not applied.
24746
24747 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24748 `unlink': it's no longer used.
24749
24750 2000-11-03 Akim Demaille <akim@epita.fr>
24751
24752 * src/files.c (skeleton_find): New function, eved out of...
24753 (open_files, open_extra_files): here.
24754
24755 2000-11-03 Akim Demaille <akim@epita.fr>
24756
24757 Don't use `atexit'.
24758
24759 * src/files.c (obstack_save): New function.
24760 (done): Rename as...
24761 (output_files): this.
24762 Use `obstack_save'.
24763 * src/main.c (main): Don't use `atexit' to register `done', since
24764 it no longer has to remove tmp files, just call `output_files'
24765 when there are no errors.
24766
24767 2000-11-02 Akim Demaille <akim@epita.fr>
24768
24769 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
24770 `unlink': it's no longer used.
24771 * src/files.h: Formatting changes.
24772
24773 2000-11-02 Akim Demaille <akim@epita.fr>
24774
24775 Remove the last uses of mktemp and unlink/delete.
24776
24777 * src/files.c (fdefines, ftable): Removed.
24778 (defines_ostack, table_obstack): New.
24779 Adjust dependencies of the former into uses of the latter.
24780 * src/output.c (output_short_or_char_table, output_short_table):
24781 Convert to using obstacks.
24782 * src/reader.c (copy_comment2): Accept one FILE * and two
24783 obstacks.
24784 (output_token_defines, reader_output_yylsp): Use obstacks.
24785 * src/system.h (obstack_fgrow3): New.
24786 * po/POTFILES.in: Adjust.
24787
24788 2000-11-01 Akim Demaille <akim@epita.fr>
24789
24790 Change each use of `fattrs' into a use of `attrs_obstack'.
24791
24792 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
24793 * src/files.c (fattrs): Remove.
24794 (attrs_obstack): New.
24795 Adjust all dependencies.
24796 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
24797
24798 2000-11-01 Akim Demaille <akim@epita.fr>
24799
24800 Introduce obstacks.
24801 Change each use of `faction' into a use of `action_obstack'.
24802
24803 * lib/obstack.h, lib/obstack.c: New files.
24804 * src/files.c (faction): Remove.
24805 (action_obstack): New.
24806 Adjust all dependencies.
24807
24808 2000-10-20 Akim Demaille <akim@epita.fr>
24809
24810 * lib/quote.h (PARAMS): New macro. Use it.
24811
24812 2000-10-16 Akim Demaille <akim@epita.fr>
24813
24814 * src/output.c (output_short_or_char_table): New function.
24815 (output_short_table, output_token_translations): Use it.
24816 (goto_actions): Use output_short_table.
24817
24818 2000-10-16 Akim Demaille <akim@epita.fr>
24819
24820 * src/symtab.c (bucket_new): New function.
24821 (getsym): Use it.
24822
24823 * src/output.c (output_short_table): New argument to display the
24824 comment associated with the table.
24825 Adjust dependencies.
24826 (output_gram): Use it.
24827 (output_rule_data): Nicer output layout for YYTNAME.
24828
24829 2000-10-16 Akim Demaille <akim@epita.fr>
24830
24831 * src/lex.c (read_typename): New function.
24832 (lex): Use it.
24833 * src/reader.c (copy_dollar): Likewise.
24834
24835 2000-10-16 Akim Demaille <akim@epita.fr>
24836
24837 * src/reader.c (copy_comment2): Expect the input stream to be on
24838 the `/' which is suspected to open a comment, instead of being
24839 called after `//' or `/*' was read.
24840 (copy_comment, copy_definition, parse_union_decl, copy_action)
24841 (copy_guard): Adjust.
24842
24843 2000-10-16 Akim Demaille <akim@epita.fr>
24844
24845 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
24846 `read_signed_integer'.
24847
24848 2000-10-16 Akim Demaille <akim@epita.fr>
24849
24850 * src/reader.c (copy_dollar): New function.
24851 (copy_guard, copy_action): Use it.
24852
24853 2000-10-16 Akim Demaille <akim@epita.fr>
24854
24855 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
24856 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
24857 New files, from Fileutils 4.0.27.
24858 * src/main.c (printable_version): Remove.
24859 * src/lex.c, src/reader.c: Use `quote'.
24860
24861 2000-10-04 Akim Demaille <akim@epita.fr>
24862
24863 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
24864
24865 2000-10-04 Akim Demaille <akim@epita.fr>
24866
24867 * doc/bison.texinfo: Various typos spotted by Neil Booth.
24868
24869 2000-10-04 Akim Demaille <akim@epita.fr>
24870
24871 When a literal string is used to define two different tokens,
24872 `bison -v' segfaults.
24873 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
24874
24875 * tests/regression.m4: New file.
24876 Include the core of the sample provided by Piotr Gackiewicz.
24877 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
24878 properly.
24879
24880 2000-10-04 Akim Demaille <akim@epita.fr>
24881
24882 * src/reader.c (parse_expect_decl): Keep `count' within the size
24883 of `buffer'.
24884 From Neil Booth.
24885
24886 2000-10-02 Paul Eggert <eggert@twinsun.com>
24887
24888 * bison.s1 (yyparse): Assign the default value
24889 unconditionally, to avoid a GCC warning and make the parser a
24890 tad smaller.
24891
24892 2000-10-02 Akim Demaille <akim@epita.fr>
24893
24894 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
24895 options.
24896
24897 2000-10-02 Akim Demaille <akim@epita.fr>
24898
24899 * src/derives.c, src/print.c, src/reduce.c: To ease the
24900 translation, move some `\n' out of the translated strings.
24901
24902 2000-10-02 Akim Demaille <akim@epita.fr>
24903
24904 The location tracking mechanism is precious for parse error
24905 messages. Nevertheless, it is enabled only when `@n' is used in
24906 the grammar, which is a different issue (you can use it in error
24907 message, but not in the grammar per se). Therefore, there should
24908 be another means to enable it.
24909
24910 * src/getargs.c (getargs): Support `--locations'.
24911 (usage): Report it.
24912 * src/getargs.h (locationsflag): Export it.
24913 * src/lex.c (percent_table): Support `%locations'.
24914 * src/reader.c (yylsp_needed): Remove this variable, now replaced
24915 with `locationsflag'.
24916 * doc/bison.texinfo: Document `--locations' and `%locations'.
24917 Sort the options.
24918 * tests/calc.m4: Test it.
24919
24920 For regularity of the names, replace each
24921 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
24922 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
24923 In addition replace each `flag' with `_flag'.
24924
24925 2000-10-02 Akim Demaille <akim@epita.fr>
24926
24927 Also test parse error messages, including with YYERROR_VERBOSE.
24928
24929 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
24930 associative).
24931 Use it to check the computations.
24932 Use it to check `nonassoc' is honored.
24933 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
24934 `--yyerror-verbose'.
24935 (_AT_CHECK_CALC): Adjust to this option.
24936 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
24937
24938 2000-10-02 Akim Demaille <akim@epita.fr>
24939
24940 Test also `--verbose', `--defines' and `--name-prefix'. Testing
24941 the latter demonstrates a flaw in the handling of non debugging
24942 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
24943 was used in order to simplify:
24944
24945 #if YYDEBUG
24946 if (yydebug)
24947 {
24948 ...
24949 }
24950 #endif
24951
24952 into
24953
24954 if (yydebug)
24955 {
24956 ...
24957 }
24958
24959 unfortunately this leads to a CPP conflict when
24960 `--name-prefix=foo' is used since it produces `#define yydebug
24961 foodebug'.
24962
24963 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
24964 (YYDPRINTF): New macro.
24965 Spread its use.
24966 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
24967 the bison options.
24968 Also test `--verbose', `--defines' and `--name-prefix'.
24969
24970 2000-10-02 Akim Demaille <akim@epita.fr>
24971
24972 Improve the readability of the produced parsers.
24973
24974 * src/bison.s1: Formatting changes.
24975 Improve the comment related to the `$' mark.
24976 (yydefault): Don't fall through to `yyresume': `goto' there.
24977 * src/output.c (output_parser): When the `$' is met, skip the end
24978 of its line.
24979 New variable, `number_of_dollar_signs', to check there's exactly
24980 one `$' in the parser skeleton.
24981
24982 2000-10-02 Akim Demaille <akim@epita.fr>
24983
24984 * lib/xstrdup.c: New file, from the fileutils.
24985 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
24986 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
24987 instead of strlen + xmalloc + strcpy.
24988 * src/symtab.c (copys): Remove, use xstrdup instead.
24989
24990 2000-10-02 Akim Demaille <akim@epita.fr>
24991
24992 * src/gram.h (associativity): New enum type which replaces the
24993 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
24994 `right_assoc', `left_assoc' and `non_assoc'.
24995 Adjust all dependencies.
24996 * src/reader.c: Formatting changes.
24997 (LTYPESTR): Don't define it, use it as a literal in
24998 `reader_output_yylsp'.
24999 * src/symtab.h (symbol_class): New enum type which replaces the
25000 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
25001 `sunknown', `stoken and `snterm'.
25002
25003 2000-10-02 Akim Demaille <akim@epita.fr>
25004
25005 * src/getargs.c (fixed_outfiles): Rename as...
25006 (yaccflag): for consistency and accuracy.
25007 Adjust dependencies.
25008
25009 2000-10-02 Akim Demaille <akim@epita.fr>
25010
25011 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
25012 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
25013 difficult and introduced a lot of core dump. It turns out that
25014 Bison used an implementation of `xmalloc' based on `calloc', and
25015 at various places it does depend upon the initialization to 0. I
25016 have not tried to isolate the pertinent places, and all the former
25017 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
25018 someone should address this issue.
25019
25020 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
25021 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
25022 files.
25023 Adjust dependencies.
25024 * src/warshall.h: New file.
25025 Propagate.
25026
25027 2000-10-02 Akim Demaille <akim@epita.fr>
25028
25029 Various anti-`extern in *.c' changes.
25030
25031 * src/system.h: Include `assert.h'.
25032
25033 2000-10-02 Akim Demaille <akim@epita.fr>
25034
25035 * src/state.h (nstates, final_state, first_state, first_shift)
25036 (first_reduction): Move their exportation from here...
25037 * src/LR0.h: to here.
25038 Adjust dependencies.
25039 * src/getargs.c (statisticsflag): New variable.
25040 Add support for `--statistics'.
25041 Adjust dependencies.
25042
25043 Remove a lot of now useless `extern' statements in most files.
25044
25045 2000-10-02 Akim Demaille <akim@epita.fr>
25046
25047 * src/LR0.h: New file.
25048 Propagate its use.
25049
25050 2000-10-02 Akim Demaille <akim@epita.fr>
25051
25052 * src/print.h: New file.
25053 Propagate its use.
25054 * src/print.c: Formatting and ordering changes.
25055 (verbose, terse): Replace with...
25056 (print_results): this new function.
25057 Adjust dependencies.
25058
25059 2000-10-02 Akim Demaille <akim@epita.fr>
25060
25061 * src/conflicts.c (conflict_report): New function.
25062 (conflict_log, verbose_conflict_log): Replace with...
25063 (print_conflicts): this function.
25064 Adjust dependencies.
25065 * src/conflicts.h: New file.
25066 Propagate its inclusion.
25067
25068 2000-10-02 Akim Demaille <akim@epita.fr>
25069
25070 * src/nullable.h: New file.
25071 Propagate its inclusion.
25072 * src/nullable.c: Formatting changes.
25073
25074 2000-10-02 Akim Demaille <akim@epita.fr>
25075
25076 * src/reduce.h: New file.
25077 Propagate its inclusion.
25078 * src/reduce.c: Topological sort and other formatting changes.
25079 (bool, TRUE, FALSE): Move their definition to...
25080 * src/system.h: here.
25081
25082 2000-10-02 Akim Demaille <akim@epita.fr>
25083
25084 * src/files.c: Formatting changes.
25085 (tryopen, tryclose, openfiles): Rename as...
25086 (xfopen, xfclose, open_files): this.
25087 (stringappend): static.
25088 * src/files.h: Complete the list of exported symbols.
25089 Propagate its use.
25090
25091 2000-10-02 Akim Demaille <akim@epita.fr>
25092
25093 * src/reader.h: New file.
25094 Propagate its use instead of tedious list of `extern' and
25095 prototypes.
25096 * src/reader.c: Formatting changes, topological sort,
25097 s/register//.
25098
25099 2000-10-02 Akim Demaille <akim@epita.fr>
25100
25101 * src/lex.h: Prototype `lex.c' exported functions.
25102 * src/reader.c: Adjust.
25103 * src/lex.c: Formatting changes.
25104 (safegetc): Rename as...
25105 (xgetc): this.
25106
25107 2000-10-02 Akim Demaille <akim@epita.fr>
25108
25109 * src/lalr.h: New file.
25110 Propagate its inclusion instead of prototypes and `extern'.
25111 * src/lalr.c: Formatting changes, topological sorting etc.
25112
25113 2000-10-02 Akim Demaille <akim@epita.fr>
25114
25115 * src/output.c (token_actions): Introduce a temporary array,
25116 YYDEFACT, that makes it possible for this function to use
25117 output_short_table.
25118
25119 2000-10-02 Akim Demaille <akim@epita.fr>
25120
25121 `user_toknums' is output as a `short[]' in `output.c', while it is
25122 defined as a `int[]' in `reader.c'. For consistency with the
25123 other output tables, `user_toknums' is now defined as a table of
25124 shorts.
25125
25126 * src/reader.c (user_toknums): Be a short table instead of an int
25127 table.
25128 Adjust dependencies.
25129
25130 Factor the short table outputs.
25131
25132 * src/output.c (output_short_table): New function.
25133 * src/output.c (output_gram, output_stos, output_rule_data)
25134 (output_base, output_table, output_check): Use it.
25135
25136 2000-10-02 Akim Demaille <akim@epita.fr>
25137
25138 * src/output.c (output): Topological sort of the functions, in
25139 order to get rid of the `static' prototypes.
25140 No longer use `register'.
25141 * src/output.h: New file.
25142 Propagate its inclusion in files explicitly prototyping functions
25143 from output.c.
25144
25145 2000-09-21 Akim Demaille <akim@epita.fr>
25146
25147 * src/atgeneral.m4: Update from Autoconf.
25148
25149 2000-09-21 Akim Demaille <akim@epita.fr>
25150
25151 * src/closure.h: New file.
25152 * src/closure.c: Formatting changes, topological sort over the
25153 functions, use of closure.h.
25154 (initialize_closure, finalize_closure): Rename as...
25155 (new_closure, free_closure): these. Adjust dependencies.
25156 * src/LR0.c: Formatting changes, topological sort, use of
25157 cloture.h.
25158 (initialize_states): Rename as...
25159 (new_states): this.
25160 * src/Makefile.am (noinst_HEADERS): Adjust.
25161
25162 2000-09-20 Akim Demaille <akim@epita.fr>
25163
25164 * src/acconfig.h: Don't protect config.h against multiple
25165 inclusion.
25166 Don't define PARAMS.
25167 * src/system.h: Define PARAMS.
25168 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
25169 purpose of config.h. system.h must not try to fix wrong
25170 definitions in config.h.
25171
25172 2000-09-20 Akim Demaille <akim@epita.fr>
25173
25174 * src/derives.h: New file.
25175 * src/main.c, src/derives.h: Use it.
25176 Formatting changes.
25177 * src/Makefile.am (noinst_HEADERS): Adjust.
25178
25179 2000-09-20 Akim Demaille <akim@epita.fr>
25180
25181 * tests/atgeneral.m4: Update from Autoconf.
25182 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
25183 (AT_CHECK_CALC): New macros.
25184 Use these macros to test bison with options `', `--raw',
25185 `--debug', `--yacc', `--yacc --debug'.
25186
25187 2000-09-19 Akim Demaille <akim@epita.fr>
25188
25189 * src/output.c: Formatting changes.
25190 * src/machine.h: Remove, leaving its contents in...
25191 * src/system.h: here.
25192 Include stdio.h.
25193 Adjust all dependencies on stdio.h and machine.h.
25194 * src/getargs.h: New file.
25195 Let all `extern' declarations about getargs.c be replaced with
25196 inclusion of `getargs.h'.
25197 * src/Makefile.am (noinst_HEADERS): Adjust.
25198
25199 * tests/calc.m4 (yyin): Be initialized in main, not on the global
25200 scope.
25201 (yyerror): Returns void, not int.
25202 * doc/bison.texinfo: Formatting changes.
25203
25204 2000-09-19 Akim Demaille <akim@epita.fr>
25205
25206 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
25207 portable.
25208
25209 2000-09-18 Akim Demaille <akim@epita.fr>
25210
25211 * configure.in: Append WARNING_CFLAGS to CFLAGS.
25212 * src/Makefile.am (INCLUDES): Don't.
25213 Be ready to fetch headers in lib/.
25214
25215 2000-09-18 Akim Demaille <akim@epita.fr>
25216
25217 * doc/bison.texinfo: Update the copyright.
25218 ANSIfy and GNUify the examples.
25219 Remove the old menu.
25220
25221 2000-09-18 Akim Demaille <akim@epita.fr>
25222
25223 First set of tests: use the `calc' example from the documentation.
25224
25225 * src/bison.s1 (yyparse): Condition the code using `yytname' which
25226 is defined only when YYDEBUG is.
25227 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
25228 * src/files.c (tryopen, tryclose): Formatting changes.
25229 Move to the top and be static.
25230 * src/reader.c (read_signed_integer): Likewise.
25231 * tests/calc.m4: New file.
25232 * Makefile.am, suite.m4: Adjust.
25233 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
25234
25235 2000-09-18 Akim Demaille <akim@epita.fr>
25236
25237 Add support for an Autotest test suite for Bison.
25238
25239 * m4/m4.m4, m4/atconfig.m4: New files.
25240 * m4/Makefile.am (EXTRA_DIST): Adjust.
25241 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
25242 files.
25243 * src/getargs.c: Display a more standard --version message.
25244 * src/reader.c (reader): Formatting changes.
25245 No longer depend upon VERSION_STRING.
25246 * configure.in: No longer use `dnl'.
25247 Set up the test suite and the new directory `tests/.
25248 (VERSION_STRING): Remove.
25249
25250 2000-04-14 Akim Demaille <akim@epita.fr>
25251
25252 * src/reader.c (copy_comment2): New function, same as former
25253 `copy_comment', but outputs into two FILE *.
25254 (copy_comment): Use it.
25255 (parse_union_decl): Use it.
25256 (get_type, parse_start_decl): Use the same `invalid' message.
25257 (parse_start_decl, parse_union_decl): Use the same `multiple'
25258 message.
25259 (parse_union_decl, copy_guard, copy_action): Use the same
25260 `unmatched' message.
25261 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
25262
25263 2000-03-31 Akim Demaille <akim@epita.fr>
25264
25265 * src/files.c (tryopen, tryclose): Move to the top.
25266 Be static.
25267
25268 2000-03-31 Akim Demaille <akim@epita.fr>
25269
25270 * src/main.c (main): Don't call `done', exit does it.
25271
25272 2000-03-31 Akim Demaille <akim@epita.fr>
25273
25274 * allocate.c: s/return (foo)/return foo/.
25275 * lalr.c: Likewise.
25276 * LR0.c: Likewise.
25277 * output.c: Likewise.
25278 * reader.c: Likewise.
25279 * symtab.c: Likewise.
25280 * vmsgetargs.c: Likewise.
25281
25282 2000-03-31 Akim Demaille <akim@epita.fr>
25283
25284 Clean up the error reporting functions.
25285
25286 * src/report.c: New file.
25287 * src/report.h: Likewise.
25288 * src/Makefile.am: Adjust.
25289 * m4/error.m4: New file.
25290 * m4/Makefile.am: Adjust.
25291 * configure.in (jm_PREREQ_ERROR): Call it.
25292 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
25293 Remove.
25294 (fatal, fatals): Remove. All callers use complain.c::fatal.
25295 (warn, warni, warns, warnss, warnss): Remove. All callers use
25296 complain.c::complain.
25297 (toomany): Remove, use fatal instead.
25298 * src/files.c (done): No argument, use complain_message_count.
25299 * src/main.c (main): Register `done' to `atexit'.
25300
25301 * src/getargs.c (usage): More `fputs', less `fprintf'.
25302
25303 2000-03-28 Akim Demaille <akim@epita.fr>
25304
25305 * lib/: New directory.
25306 * Makefile.am (SUBDIRS): Adjust.
25307 * configure.in: Adjust.
25308 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
25309 useless.
25310 * src/alloca.c: Moved to lib/.
25311 * src/getopt.c: Likewise.
25312 * src/getopt1.c: Likewise.
25313 * src/getopt.h: Likewise.
25314 * src/ansi2knr.c: Likewise.
25315 * src/ansi2knr.1: Likewise.
25316 * src/Makefile.am: Adjust.
25317 * lib/Makefile.am: New file.
25318
25319 2000-03-28 Akim Demaille <akim@epita.fr>
25320
25321 * src/getargs.c (usage): Refresh the help message.
25322
25323 2000-03-17 Akim Demaille <akim@epita.fr>
25324
25325 * src/getopt1.c: Updated from textutils 2.0e
25326 * src/getopt.c: Likewise.
25327 * src/getopt.h: Likewise.
25328
25329 2000-03-17 Akim Demaille <akim@epita.fr>
25330
25331 * src/Makefile.am (bison.simple): Fix the awk program: quote only
25332 the file name, not the whole `#line LINE FILE'.
25333
25334 2000-03-17 Akim Demaille <akim@epita.fr>
25335
25336 On syntax errors, report the token on which we choked.
25337
25338 * src/bison.s1 (yyparse): In the label yyerrlab, when
25339 YYERROR_VERBOSE, add yychar in msg.
25340
25341 2000-03-17 Akim Demaille <akim@epita.fr>
25342
25343 * src/reader.c (copy_at): New function.
25344 (copy_guard): Use it.
25345 (copy_action): Use it.
25346
25347 2000-03-17 Akim Demaille <akim@epita.fr>
25348
25349 Be kind to translators, save some useless translations.
25350
25351 * src/main.c (banner): New function.
25352 (fatal_banner): Use it.
25353 (warn_banner): Use it.
25354
25355 2000-03-17 Akim Demaille <akim@epita.fr>
25356
25357 * src/reader.c (copy_definition): Use copy_string and
25358 copy_comment. Removed now unused `match', `ended',
25359 `cplus_comment'.
25360 (copy_comment, copy_string): Moved, to be visible from
25361 copy_definition.
25362
25363 2000-03-17 Akim Demaille <akim@epita.fr>
25364
25365 * src/reader.c (copy_string): Declare `static inline'. No
25366 problems with inline, since it is checked by configure.
25367 (copy_comment): Likewise.
25368
25369 2000-03-17 Akim Demaille <akim@epita.fr>
25370
25371 * src/reader.c (packsymbols): Formatting changes.
25372
25373 2000-03-17 Akim Demaille <akim@epita.fr>
25374
25375 * src/reader.c (copy_comment): New function, factored out from:
25376 (copy_action): Use it. Removed now unused `match', `ended',
25377 `cplus_comment'.
25378 (copy_guard): Likewise.
25379
25380 2000-03-17 Akim Demaille <akim@epita.fr>
25381
25382 * src/reader.c (copy_string): New function, factored out from:
25383 (copy_action): Use it.
25384 (copy_guard): Likewise.
25385
25386 2000-03-17 Akim Demaille <akim@epita.fr>
25387
25388 Change the handling of @s so that they behave exactly like $s.
25389 There is now a pseudo variable @$ (readble and writable), location
25390 of the lhs of the rule (by default ranging from the location of
25391 the first symbol of the rhs, to the location of the last symbol,
25392 or, if the rhs is empty, YYLLOC).
25393
25394 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
25395 yyval.
25396 (yyparse): When providing a default semantic action, provide a
25397 default location action.
25398 (after the $): No longer change `*YYLSP', just stack YYLOC the
25399 same way you stack YYVAL.
25400 * src/reader.c (read_declarations): Use warns.
25401 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
25402 (copy_action, case '@'): Likewise.
25403 Use a standard error message, to save useless work from
25404 translators.
25405
25406 2000-03-17 Akim Demaille <akim@epita.fr>
25407
25408 * src/bison.s1: Formatting and cosmetics changes.
25409 * src/reader.c: Likewise.
25410 Update the Copyright notice.
25411
25412 2000-03-17 Akim Demaille <akim@epita.fr>
25413
25414 * src/bison.s1 (#line): All set to `#line' only, since the
25415 Makefile now handles them.
25416
25417 2000-03-16 Akim Demaille <akim@epita.fr>
25418
25419 * src/output.c (output_rule_data): Output the documentation of
25420 some of the tables.
25421 (Copyright notice): Update.
25422 Formatting changes.
25423
25424 2000-03-16 Akim Demaille <akim@epita.fr>
25425
25426 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
25427 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
25428 One `#if YYDEBUG' remains, since it uses variables which are
25429 defined only if `YYDEBUG != 0'.
25430
25431 2000-03-16 Akim Demaille <akim@epita.fr>
25432
25433 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
25434 and related variables so that the similarities are highlighted.
25435
25436 2000-03-16 Akim Demaille <akim@epita.fr>
25437
25438 * src/bison.s1: Properly indent CPP directives.
25439
25440 2000-03-16 Akim Demaille <akim@epita.fr>
25441
25442 * src/bison.s1: Properly indent the `alloca' CPP section.
25443
25444 2000-03-16 Akim Demaille <akim@epita.fr>
25445
25446 Do not hard code values of directories in `configure.in'.
25447 Update the `configure' tool chain.
25448
25449 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
25450 src/makefile.am.
25451 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
25452 (AC_OUTPUT): Add m4/Makefile.
25453 Bump to bison 1.28a, 1.29 has never been released.
25454 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
25455 handled via src/Makefile.am.
25456 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
25457 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
25458 autoheader.
25459 * Makefile.am (SUBDIRS): Add m4.
25460 (ACLOCAL_AM_FLAGS): New variable.
25461 (AUTOMAKE_OPTIONS): Add check-news.
25462 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
25463 the proper line number and file name.
25464 (DEFS): Propagate the location of bison library files and of the
25465 locale files.
25466 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
25467 builddir.
25468 * acinclude.m4: Remove, replaced by the directory m4.
25469 * m4/Makefile.am (EXTRA_DIST): New variable.
25470 * m4/gettext.m4: New file, from the fileutils.
25471 * m4/lcmessage.m4: Likewise
25472 * m4/progtest.m4: Likewise.
25473 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
25474
25475 2000-03-10 Akim Demaille <akim@epita.fr>
25476
25477 * src/closure.c:
25478 Formatting changes of various comments.
25479 Respect the GNU coding standards at various places.
25480 Don't use `_()' when no translation is needed.
25481
25482 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25483
25484 * src/files.c:
25485 OS/2 honors TMPDIR environment variable.
25486
25487 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25488
25489 * doc/bison.texinfo: Tweaked spelling and grammar.
25490 Updated ISBN.
25491 Removed reference to price of printed copy.
25492 Mention BISON_SIMPLE and BISON_HAIRY.
25493
25494 1999-12-13 Jesse Thilo <jthilo@gnu.org>
25495
25496 * configure.in, NEWS:
25497 Bison 1.29 released.
25498
25499 1999-10-27 Jesse Thilo <jthilo@gnu.org>
25500
25501 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
25502 Added reference card.
25503
25504 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25505
25506 * po/ru.po: Added Russian translation.
25507
25508 1999-07-26 Jesse Thilo <jthilo@gnu.org>
25509
25510 * configure.in: Added Russian translation.
25511
25512 1999-07-06 Jesse Thilo <jthilo@gnu.org>
25513
25514 * configure.in, NEWS, README:
25515 Released version 1.28.
25516
25517 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25518
25519 * src/system.h:
25520 Squashed redefinition warning on some systems.
25521
25522 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
25523 Have configure build version string instead of relying on ANSI string
25524 concatentation.
25525
25526 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25527
25528 * po/POTFILES.in: Got rid of version.c.
25529
25530 1999-06-14 Jesse Thilo <jthilo@gnu.org>
25531
25532 * acconfig.h, configure.in:
25533 Have configure build version string instead of relying on ANSI string
25534 concatentation.
25535
25536 1999-06-08 Jesse Thilo <jthilo@gnu.org>
25537
25538 * doc/bison.1:
25539 Dropped mention of `+' for long-named options.
25540
25541 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25542
25543 * src/files.c: Added <unistd.h> for unlink().
25544
25545 * src/Makefile.am, src/system.h:
25546 I18n fixes.
25547
25548 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25549
25550 * README: Added a FAQ list.
25551
25552 * configure.in, acconfig.h:
25553 I18n fixes.
25554
25555 1999-05-30 Jesse Thilo <jthilo@gnu.org>
25556
25557 * doc/FAQ, doc/Makefile.am:
25558 Added a FAQ list.
25559
25560 1999-05-19 Jesse Thilo <jthilo@gnu.org>
25561
25562 * src/alloc.h, src/symtab.h, src/version.c:
25563 Protected inclusion of "config.h" with HAVE_CONFIG_H.
25564
25565 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25566
25567 * src/.cvsignore, src/Makefile.am:
25568 Reorganized: sources in `src', documentation in `doc'.
25569
25570 * src/lex.c (literalchar):
25571 fixed the code for escaping double quotes (thanks
25572 Jonathan Czisny.)
25573
25574 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25575
25576 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
25577 Adjusted paths to reflect directory reorganization.
25578
25579 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25580
25581 * doc/.cvsignore, doc/Makefile.am:
25582 Reorganized: sources in `src', documentation in `doc'.
25583
25584 1999-04-18 Jesse Thilo <jthilo@gnu.org>
25585
25586 * configure.in:
25587 Updated AC_INIT file to reflect directory reorganization.
25588
25589 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
25590 Reorganized: sources in `src', documentation in `doc'.
25591
25592 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25593
25594 * src/allocate.c:
25595 Don't declare calloc() and realloc() if not necessary.
25596
25597 1999-04-13 Jesse Thilo <jthilo@gnu.org>
25598
25599 * configure.in, acconfig.h, acinclude.m4:
25600 Don't declare calloc() and realloc() if not necessary.
25601
25602 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25603
25604 * po/.cvsignore: Added i18n support.
25605
25606 1999-03-23 Jesse Thilo <jthilo@gnu.org>
25607
25608 * acconfig.h, configure.in, Makefile.am:
25609 Added i18n support.
25610
25611 1999-03-22 Jesse Thilo <jthilo@gnu.org>
25612
25613 * src/bison.s1: Fixed #line numbers.
25614
25615 1999-03-15 Jesse Thilo <jthilo@gnu.org>
25616
25617 * po/es.po, po/fr.po, po/nl.po, po/de.po:
25618 Added PO files from Translation Project.
25619
25620 1999-03-03 Jesse Thilo <jthilo@gnu.org>
25621
25622 * Makefile.am:
25623 Added support for non-ANSI compilers (ansi2knr).
25624
25625 1999-02-16 Jesse Thilo <jthilo@gnu.org>
25626
25627 * configure.in: Bumped version number to 1.27.
25628
25629 * Makefile.am:
25630 Added `bison.simple' to list of files removed by `make distclean'.
25631
25632 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25633
25634 * src/files.c, src/files.h:
25635 Defined locations of parser files in config.h instead of Makefile.
25636
25637 1999-02-12 Jesse Thilo <jthilo@gnu.org>
25638
25639 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
25640 Defined locations of parser files in config.h instead of Makefile.
25641
25642 1999-02-09 Jesse Thilo <jthilo@gnu.org>
25643
25644 * Makefile.am:
25645 Removed inappropriate use of $< macro.
25646
25647 1999-02-05 Jesse Thilo <jthilo@gnu.org>
25648
25649 * po/Makefile.in.in, po/POTFILES.in:
25650 Add `po' directory skeleton.
25651
25652 1999-01-27 Jesse Thilo <jthilo@gnu.org>
25653
25654 * README: Document help-bison list.
25655
25656 * configure.in: Add check for mkstemp().
25657
25658 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25659
25660 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
25661 Hush a few compiler warnings.
25662
25663 * src/files.c:
25664 Add tryclose(), which verifies that fclose was successful.
25665 Hush a couple of compiler warnings.
25666
25667 1999-01-20 Jesse Thilo <jthilo@gnu.org>
25668
25669 * Makefile.am, OChangeLog:
25670 ChangeLog is now automatically generated. Include the old version as
25671 OChangeLog.
25672
25673 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25674
25675 * 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:
25676 Update FSF address.
25677
25678 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25679
25680 * doc/bison.texinfo: Fix formatting glitch.
25681
25682 * doc/bison.texinfo: Update FSF address.
25683
25684 1999-01-14 Jesse Thilo <jthilo@gnu.org>
25685
25686 * acconfig.h: Update FSF address.
25687
25688 1999-01-08 Jesse Thilo <jthilo@gnu.org>
25689
25690 * src/system.h:
25691 Don't define PACKAGE here, since config.h defines it.
25692
25693 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25694
25695 * src/reader.c: Update copyright date.
25696
25697 * src/main.c:
25698 Ditch sprintf to statically-sized buffers in fatal/warn functions in
25699 favor of output directly to stderr (avoids buffer overruns).
25700
25701 * src/reader.c: Some checks for premature EOF.
25702
25703 * 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:
25704 Use prototypes if the compiler understands them.
25705
25706 * src/files.c: Honor TMPDIR on Unix hosts.
25707 Use prototypes if the compiler understands them.
25708
25709 * src/reader.c:
25710 Fix a couple of buffer overrun bugs.
25711 Use prototypes if the compiler understands them.
25712
25713 * src/system.h: Include unistd.h and ctype.h.
25714 Use #ifdef instead of #if for NLS symbols.
25715
25716 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25717
25718 * doc/bison.texinfo:
25719 Delete comment "consider using @set for edition number, etc..." since
25720 we now are doing so.
25721
25722 1998-12-30 Jesse Thilo <jthilo@gnu.org>
25723
25724 * configure.in:
25725 Use prototypes if the compiler understands them.
25726
25727 * NEWS: Document 1.26 highlights.
25728
25729 * Makefile.am: Require Automake 1.3 or later.
25730
25731 * acconfig.h:
25732 Use prototypes if the compiler understands them.
25733
25734 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25735
25736 * src/version.c:
25737 Use VERSION symbol from automake for version number.
25738
25739 1998-12-29 Jesse Thilo <jthilo@gnu.org>
25740
25741 * acconfig.h, configure.in, version.cin:
25742 Use VERSION symbol from automake for version number.
25743
25744 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25745
25746 * Makefile.am:
25747 Distribute original version of simple parser (bison.s1), not built
25748 version (bison.simple).
25749
25750 1998-11-28 Jesse Thilo <jthilo@gnu.org>
25751
25752 * doc/bison.texinfo: Add info dir entry.
25753
25754 * doc/bison.texinfo:
25755 Let automake put version number into documentation.
25756
25757 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25758
25759 * src/bison.cld, src/build.com, src/vmshlp.mar:
25760 Add non-RCS files from /gd/gnu/bison.
25761
25762 1998-11-26 Jesse Thilo <jthilo@gnu.org>
25763
25764 * doc/bison.1:
25765 Document the BISON_HAIRY and BISON_SIMPLE variables.
25766
25767 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25768
25769 * src/version.c: Build version.c automatically.
25770
25771 * src/reader.c:
25772 Fix token numbering (used to start at 258, not 257).
25773
25774 * src/system.h: Include config.h.
25775
25776 * src/getargs.c: Update bug report address.
25777
25778 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
25779 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
25780
25781 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25782
25783 * Makefile.am:
25784 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25785
25786 * configure.in, version.cin:
25787 Build version.c automatically.
25788
25789 * AUTHORS: Add AUTHORS file.
25790
25791 * README: Update bug report address.
25792
25793 * bison.simple:
25794 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
25795
25796 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
25797 Add automake stuff.
25798
25799 1998-11-25 Jesse Thilo <jthilo@gnu.org>
25800
25801 * doc/bison.texinfo: Clean up some formatting.
25802
25803 1998-05-05 Richard Stallman <rms@gnu.org>
25804
25805 * doc/bison.texinfo:
25806 Explain better why to make a pure parser.
25807
25808 1998-01-05 Richard Stallman <rms@gnu.org>
25809
25810 * src/files.c (openfiles):
25811 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
25812 find a temporary directory, if possible. Do not unlink files while
25813 they are open.
25814
25815 1997-08-25 Richard Stallman <rms@gnu.org>
25816
25817 * src/reader.c (stack_offset;):
25818 Change some warni to warns.
25819
25820 * src/lex.c (literalchar): Use warns, not warni.
25821
25822 1997-06-28 Richard Stallman <rms@gnu.org>
25823
25824 * src/bison.s1: Add a Bison version comment.
25825
25826 * src/main.c (fatal, warn, berror):
25827 Use program_name.
25828
25829 1997-06-28 Richard Stallman <rms@gnu.org>
25830
25831 * Makefile.in (bison_version): New variable.
25832 (dist): Use that variable.
25833 (bison.s1): Substitute the Bison version into bison.simple.
25834
25835 * bison.simple: Add a Bison version comment.
25836
25837 1997-06-18 Richard Stallman <rms@gnu.org>
25838
25839 * src/main.c (fatal, warn, berror):
25840 Make error messages standard.
25841 (toomany): Improve error message text.
25842
25843 * 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:
25844 new.h renamed to alloc.h.
25845
25846 1997-06-18 Richard Stallman <rms@gnu.org>
25847
25848 * Makefile.in: new.h renamed to alloc.h.
25849
25850 1997-05-24 Richard Stallman <rms@gnu.org>
25851
25852 * src/lex.c (literalchar):
25853 Fix the code for escaping \, " and '.
25854
25855 (lex): Avoid trouble when there are many chars
25856 to discard in a char literal with just several chars in it.
25857
25858 1997-05-17 Richard Stallman <rms@gnu.org>
25859
25860 * src/bison.s1:
25861 Use malloc, if using alloca is troublesome.
25862 (YYSTACK_USE_ALLOCA): New flag macro.
25863 Define it for some systems and compilers.
25864 (YYSTACK_ALLOC): New macro.
25865 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25866 If it was malloc'd, free it.
25867
25868 1997-05-17 Richard Stallman <rms@gnu.org>
25869
25870 * bison.simple:
25871 Use malloc, if using alloca is troublesome.
25872 (YYSTACK_USE_ALLOCA): New flag macro.
25873 Define it for some systems and compilers.
25874 (YYSTACK_ALLOC): New macro.
25875 (yyparse): Use YYSTACK_ALLOC to allocate stack.
25876 If it was malloc'd, free it.
25877
25878 1997-04-23 Richard Stallman <rms@gnu.org>
25879
25880 * src/bison.s1:
25881 (alloca) [__hpux]: Always define as __builtin_alloca.
25882
25883 1997-04-23 Richard Stallman <rms@gnu.org>
25884
25885 * bison.simple:
25886 (alloca) [__hpux]: Always define as __builtin_alloca.
25887
25888 1997-04-22 Richard Stallman <rms@gnu.org>
25889
25890 * src/bison.s1:
25891 [__hpux]: Include alloca.h (right for HPUX 10)
25892 instead of declaring alloca (right for HPUX 9).
25893
25894 * src/bison.s1 (__yy_memcpy):
25895 Declare arg `count' as unsigned int.
25896 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25897
25898 1997-04-22 Richard Stallman <rms@gnu.org>
25899
25900 * bison.simple:
25901 [__hpux]: Include alloca.h (right for HPUX 10)
25902 instead of declaring alloca (right for HPUX 9).
25903
25904 * bison.simple (__yy_memcpy):
25905 Declare arg `count' as unsigned int.
25906 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
25907
25908 1997-01-03 Richard Stallman <rms@gnu.org>
25909
25910 * src/allocate.c: [__STDC__ or _MSC_VER]:
25911 Declare calloc and realloc to return void *.
25912
25913 1997-01-02 Richard Stallman <rms@gnu.org>
25914
25915 * src/system.h:
25916 [_MSC_VER]: Include stdlib.h and process.h.
25917 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
25918
25919 * src/main.c (main): Return FAILURE as a value.
25920 (printable_version): Declare arg as int, not char.
25921
25922 1997-01-02 Richard Stallman <rms@gnu.org>
25923
25924 * Makefile.in (dist):
25925 Explicitly check for symlinks, and copy them.
25926
25927 1996-12-19 Richard Stallman <rms@gnu.org>
25928
25929 * src/files.c:
25930 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
25931
25932 1996-12-18 Paul Eggert <eggert@gnu.org>
25933
25934 * src/bison.s1 (yyparse):
25935 If __GNUC__ and YYPARSE_PARAM are both defined,
25936 declare yyparse to have a void * argument.
25937
25938 1996-12-18 Paul Eggert <eggert@gnu.org>
25939
25940 * bison.simple (yyparse):
25941 If __GNUC__ and YYPARSE_PARAM are both defined,
25942 declare yyparse to have a void * argument.
25943
25944 1996-12-17 Richard Stallman <rms@gnu.org>
25945
25946 * src/reduce.c (nbits): Add some casts.
25947
25948 1996-08-12 Richard Stallman <rms@gnu.org>
25949
25950 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
25951
25952 1996-08-12 Richard Stallman <rms@gnu.org>
25953
25954 * bison.simple: Test _MSDOS as well as _MSDOS_.
25955
25956 1996-07-31 Richard Stallman <rms@gnu.org>
25957
25958 * src/bison.s1:
25959 [__sun && __i386]: Include alloca.h.
25960
25961 1996-07-31 Richard Stallman <rms@gnu.org>
25962
25963 * bison.simple:
25964 [__sun && __i386]: Include alloca.h.
25965
25966 1996-07-30 Richard Stallman <rms@gnu.org>
25967
25968 * src/bison.s1: Comment change.
25969
25970 * src/bison.s1: Test _MSDOS_, not MSDOS.
25971
25972 1996-07-30 Richard Stallman <rms@gnu.org>
25973
25974 * bison.simple: Comment change.
25975
25976 * bison.simple: Test _MSDOS_, not MSDOS.
25977
25978 1996-06-01 Richard Stallman <rms@gnu.org>
25979
25980 * 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:
25981 Insert `_' macro around many string constants.
25982
25983 * src/main.c:
25984 Insert `_' macro around many string constants.
25985
25986 (main): Call setlocale, bindtextdomain and textdomain.
25987
25988 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
25989 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
25990 [ENABLE_NLS]: Include libintl.h.
25991 [ENABLE_NLS] (gettext): Define.
25992 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
25993 (N_, PACKAGE, LOCALEDIR): New macros.
25994
25995 1996-06-01 Richard Stallman <rms@gnu.org>
25996
25997 * POTFILES.in: New file.
25998
25999 * Makefile.in (allocate.o):
26000 Define target explicitly.
26001
26002 * Makefile.in (CFLAGS): Set to @CFLAGS@.
26003 (LDFLAGS): Set to @LDFLAGS@.
26004 (configure): Run autoconf only if preceding `cd' succeeds.
26005 (bison.s1): Redirect output to temporary file then move the
26006 temporary to the target, rather than redirecting directly to bison.s1.
26007 (clean): Remove config.status and config.log.
26008 (distclean): Don't remove config.status here.
26009
26010 1996-05-12 Richard Stallman <rms@gnu.org>
26011
26012 * src/bison.s1:
26013 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
26014
26015 1996-05-12 Richard Stallman <rms@gnu.org>
26016
26017 * bison.simple:
26018 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
26019
26020 1996-05-11 Richard Stallman <rms@gnu.org>
26021
26022 * src/bison.s1 (__yy_memcpy):
26023 Really reorder the args, as was supposedly done on Feb 14 1995.
26024 (yyparse): Calls changed accordingly.
26025
26026 1996-05-11 Richard Stallman <rms@gnu.org>
26027
26028 * Makefile.in (dist): Don't use $(srcdir).
26029
26030 * bison.simple (__yy_memcpy):
26031 Really reorder the args, as was supposedly done on Feb 14 1995.
26032 (yyparse): Calls changed accordingly.
26033
26034 1996-01-27 Richard Stallman <rms@gnu.org>
26035
26036 * src/output.c (output_rule_data):
26037 Test YYERROR_VERBOSE in the conditional
26038 around the definition of ttyname.
26039
26040 1995-12-29 Richard Stallman <rms@gnu.org>
26041
26042 * src/bison.s1:
26043 Fix line numbers in #line commands.
26044
26045 1995-12-29 Richard Stallman <rms@gnu.org>
26046
26047 * bison.simple:
26048 Fix line numbers in #line commands.
26049
26050 1995-12-27 Richard Stallman <rms@gnu.org>
26051
26052 * src/bison.s1 (YYPARSE_PARAM_DECL):
26053 In C++, make it always null.
26054 (YYPARSE_PARAM_ARG): New macro.
26055 (yyparse): Use YYPARSE_PARAM_ARG.
26056
26057 1995-12-27 Richard Stallman <rms@gnu.org>
26058
26059 * bison.simple (YYPARSE_PARAM_DECL):
26060 In C++, make it always null.
26061 (YYPARSE_PARAM_ARG): New macro.
26062 (yyparse): Use YYPARSE_PARAM_ARG.
26063
26064 1995-11-29 Richard Stallman <rms@gnu.org>
26065
26066 * doc/bison.texinfo:
26067 Describe literal string tokens, %raw, %no_lines, %token_table.
26068
26069 1995-11-29 Daniel Hagerty <hag@gnu.org>
26070
26071 * doc/bison.texinfo: Fixed update date
26072
26073 1995-10-16 Richard Stallman <rms@gnu.org>
26074
26075 * src/version.c: Version 1.25.
26076
26077 1995-10-16 Richard Stallman <rms@gnu.org>
26078
26079 * NEWS: *** empty log message ***
26080
26081 1995-10-16 Richard Stallman <rms@gnu.org>
26082
26083 * doc/bison.1, doc/bison.rnh:
26084 Add new options.
26085
26086 1995-10-15 Richard Stallman <rms@gnu.org>
26087
26088 * src/vmsgetargs.c, src/getargs.c:
26089 Added -n, -k, and -raw switches.
26090 (noparserflag, toknumflag, rawtoknumflag): New variables.
26091
26092 * src/symtab.h (SALIAS):
26093 New #define for adding aliases to %token.
26094 (struct bucket): Added `alias' field.
26095
26096 * src/reduce.c (reduce_grammar):
26097 Revise error message.
26098 (print_notices): Remove final `.' from error message.
26099
26100 * src/reader.c (reader_output_yylsp):
26101 New function.
26102 (readgram): Use `#if 0' around code that accepted %command
26103 inside grammar rules: The documentation doesn't allow it,
26104 and it will fail since the %command processors scan for the next %.
26105 (parse_token_decl): Extended the %token
26106 declaration to allow a multi-character symbol as an alias.
26107 (parse_thong_decl): New function.
26108 (read_declarations): Added %thong declarations.
26109 (read_declarations): Handle NOOP to deal with allowing
26110 % declarations as another means to specify the flags.
26111 (readgram): Allow %prec prior to semantics embedded in a rule.
26112 (skip_to_char, read_declarations, copy_definition)
26113 (parse_token_decl, parse_start_decl, parse_type_decl)
26114 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
26115 (get_type_name, copy_guard, copy_action, readgram)
26116 (get_type, packsymbols): Revised most error messages.
26117 Changed `fatal' to `warnxxx' to avoid aborting for error.
26118 Revised and use multiple warnxxx functions to avoid using VARARGS1.
26119 (read_declarations): Improve the error message for
26120 an invalid character. Do not abort.
26121 (read_declarations, copy_guard, copy_action): Use
26122 printable_version to avoid unprintable characters in printed output.
26123 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
26124 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
26125 Allow the type of a non-terminal can be given
26126 more than once, as long as all specifications give the same type.
26127
26128 * src/output.c:
26129 (output_headers, output_trailers, output, output_gram)
26130 (output_rule_data): Implement noparserflag variable.
26131 Implement toknumflag variable.
26132 (output): Call reader_output_yylsp to output LTYPESTR.
26133
26134 * src/main.c (main):
26135 If reader sees an error, don't process the grammar.
26136 (fatals): Updated to not use VARARGS1.
26137 (printable_version, int_to_string, warn, warni, warns, warnss)
26138 (warnsss): New error reporting functions. Avoid abort for error.
26139
26140 * src/lex.h:
26141 Added THONG and NOOP for alias processing.
26142 Added SETOPT for the new code that allows setting options with %flags.
26143
26144 * src/lex.c:
26145 Include getopt.h. Add some extern decls.
26146 (safegetc): New function to deal with EOF gracefully.
26147 (literalchar); new function to deal with reading \ escapes.
26148 (lex): Use literalchar.
26149 (lex): Implemented "..." tokens.
26150 (literalchar, lex, parse_percent_token): Made tokenbuffer
26151 always contain the token. This includes growing the token
26152 buffer while reading an integer.
26153 (parse_percent_token): Replaced if-else statement with percent_table.
26154 (parse_percent_token): Added % declarations as another
26155 way to specify the flags -n, -l, and -r. Also added hooks for
26156 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
26157 major changes to files.c.
26158 (lex) Retain in the incoming stream a character following
26159 an incorrect '/'.
26160 (skip_white_space, lex): Revised most error messages
26161 and changed fatal to warn to avoid aborting.
26162 (percent_table): Added %thong declarations.
26163
26164 * src/gram.h: Comment changes.
26165
26166 * src/files.c (openfiles, open_extra_files, done):
26167 Add faction flag
26168 and actfile file. Handle noparserflag. Both for -n switch.
26169
26170 * src/conflicts.c (resolve_sr_conflict):
26171 Remove use of alloca.
26172
26173 1995-06-01 Jim Meyering <meyering@gnu.org>
26174
26175 * doc/bison.texinfo: *** empty log message ***
26176
26177 1995-05-06 Richard Stallman <rms@gnu.org>
26178
26179 * src/bison.s1: Comment change.
26180
26181 1995-05-06 Richard Stallman <rms@gnu.org>
26182
26183 * bison.simple: Comment change.
26184
26185 1995-05-03 Richard Stallman <rms@gnu.org>
26186
26187 * src/version.c: Version now 1.24.
26188
26189 * src/bison.s1: Change distribution terms.
26190
26191 * src/version.c: Version now 1.23.
26192
26193 1995-05-03 Richard Stallman <rms@gnu.org>
26194
26195 * doc/bison.texinfo:
26196 Rewrite "Conditions for Using Bison".
26197 Update version to 1.24.
26198
26199 1995-05-03 Richard Stallman <rms@gnu.org>
26200
26201 * bison.simple: Change distribution terms.
26202
26203 1995-02-23 Richard Stallman <rms@gnu.org>
26204
26205 * src/files.c: Test __VMS_POSIX as well as VMS.
26206
26207 1995-02-14 Jim Meyering <meyering@gnu.org>
26208
26209 * src/bison.s1 (__yy_memcpy):
26210 Renamed from __yy_bcopy to avoid
26211 confusion. Reverse FROM and TO arguments to be consistent with
26212 those of memcpy.
26213
26214 1995-02-14 Jim Meyering <meyering@gnu.org>
26215
26216 * bison.simple (__yy_memcpy):
26217 Renamed from __yy_bcopy to avoid
26218 confusion. Reverse FROM and TO arguments to be consistent with
26219 those of memcpy.
26220
26221 1994-11-10 David J. MacKenzie <djm@gnu.org>
26222
26223 * NEWS: reformat
26224
26225 * NEWS: New file.
26226
26227 * Makefile.in (DISTFILES): Include NEWS.
26228
26229 * Makefile.in (DISTFILES):
26230 Include install-sh, not install.sh.
26231
26232 * configure.in: Update to Autoconf v2 macro names.
26233
26234 1994-10-05 David J. MacKenzie <djm@gnu.org>
26235
26236 * Makefile.in: fix typo
26237
26238 * Makefile.in (prefix, exec_prefix):
26239 Let configure set them.
26240
26241 1994-09-28 David J. MacKenzie <djm@gnu.org>
26242
26243 * Makefile.in: Set datadir to $(prefix)/share.
26244
26245 1994-09-15 Richard Stallman <rms@gnu.org>
26246
26247 * src/bison.s1:
26248 Update copyright notice and GPL version.
26249
26250 1994-09-15 Richard Stallman <rms@gnu.org>
26251
26252 * bison.simple:
26253 Update copyright notice and GPL version.
26254
26255 1994-07-12 Richard Stallman <rms@gnu.org>
26256
26257 * src/reduce.c, src/reader.c:
26258 entered into RCS
26259
26260 1994-05-05 David J. MacKenzie <djm@gnu.org>
26261
26262 * Makefile.in: entered into RCS
26263
26264 1994-03-26 Richard Stallman <rms@gnu.org>
26265
26266 * src/bison.s1: entered into RCS
26267
26268 1994-03-26 Richard Stallman <rms@gnu.org>
26269
26270 * bison.simple: entered into RCS
26271
26272 1994-03-25 Richard Stallman <rms@gnu.org>
26273
26274 * src/main.c: entered into RCS
26275
26276 1994-03-24 Richard Stallman <rms@gnu.org>
26277
26278 * src/conflicts.c: entered into RCS
26279
26280 1994-01-02 Richard Stallman <rms@gnu.org>
26281
26282 * Makefile.in: *** empty log message ***
26283
26284 1993-11-21 Richard Stallman <rms@gnu.org>
26285
26286 * src/bison.s1: *** empty log message ***
26287
26288 1993-11-21 Richard Stallman <rms@gnu.org>
26289
26290 * doc/bison.texinfo: entered into RCS
26291
26292 * doc/bison.texinfo: *** empty log message ***
26293
26294 1993-11-21 Richard Stallman <rms@gnu.org>
26295
26296 * bison.simple: *** empty log message ***
26297
26298 1993-10-25 David J. MacKenzie <djm@gnu.org>
26299
26300 * doc/bison.texinfo: *** empty log message ***
26301
26302 1993-10-19 Richard Stallman <rms@gnu.org>
26303
26304 * src/bison.s1: *** empty log message ***
26305
26306 1993-10-19 Richard Stallman <rms@gnu.org>
26307
26308 * bison.simple: *** empty log message ***
26309
26310 1993-10-14 Richard Stallman <rms@gnu.org>
26311
26312 * src/bison.s1: *** empty log message ***
26313
26314 1993-10-14 Richard Stallman <rms@gnu.org>
26315
26316 * bison.simple: *** empty log message ***
26317
26318 1993-09-14 David J. MacKenzie <djm@gnu.org>
26319
26320 * doc/bison.texinfo: *** empty log message ***
26321
26322 1993-09-13 Noah Friedman <friedman@gnu.org>
26323
26324 * Makefile.in: *** empty log message ***
26325
26326 1993-09-10 Richard Stallman <rms@gnu.org>
26327
26328 * src/conflicts.c: *** empty log message ***
26329
26330 * src/system.h: entered into RCS
26331
26332 1993-09-10 Richard Stallman <rms@gnu.org>
26333
26334 * doc/bison.1: entered into RCS
26335
26336 1993-09-06 Noah Friedman <friedman@gnu.org>
26337
26338 * src/version.c: entered into RCS
26339
26340 1993-09-06 Noah Friedman <friedman@gnu.org>
26341
26342 * Makefile.in: *** empty log message ***
26343
26344 1993-07-30 David J. MacKenzie <djm@gnu.org>
26345
26346 * Makefile.in: *** empty log message ***
26347
26348 1993-07-24 Richard Stallman <rms@gnu.org>
26349
26350 * src/bison.s1: *** empty log message ***
26351
26352 1993-07-24 Richard Stallman <rms@gnu.org>
26353
26354 * bison.simple: *** empty log message ***
26355
26356 1993-07-08 David J. MacKenzie <djm@gnu.org>
26357
26358 * Makefile.in: *** empty log message ***
26359
26360 1993-07-04 Richard Stallman <rms@gnu.org>
26361
26362 * src/bison.s1: *** empty log message ***
26363
26364 1993-07-04 Richard Stallman <rms@gnu.org>
26365
26366 * bison.simple: *** empty log message ***
26367
26368 1993-06-26 David J. MacKenzie <djm@gnu.org>
26369
26370 * src/getargs.c: entered into RCS
26371
26372 1993-06-26 David J. MacKenzie <djm@gnu.org>
26373
26374 * doc/bison.texinfo: *** empty log message ***
26375
26376 * doc/bison.1: New file.
26377
26378 1993-06-25 Richard Stallman <rms@gnu.org>
26379
26380 * src/getargs.c: New file.
26381
26382 1993-06-16 Richard Stallman <rms@gnu.org>
26383
26384 * src/bison.s1: *** empty log message ***
26385
26386 1993-06-16 Richard Stallman <rms@gnu.org>
26387
26388 * bison.simple: *** empty log message ***
26389
26390 1993-06-03 Richard Stallman <rms@gnu.org>
26391
26392 * src/bison.s1: New file.
26393
26394 1993-06-03 Richard Stallman <rms@gnu.org>
26395
26396 * doc/bison.texinfo: *** empty log message ***
26397
26398 1993-06-03 Richard Stallman <rms@gnu.org>
26399
26400 * bison.simple: New file.
26401
26402 1993-05-19 Richard Stallman <rms@gnu.org>
26403
26404 * doc/bison.texinfo: New file.
26405
26406 1993-05-07 Noah Friedman <friedman@gnu.org>
26407
26408 * Makefile.in: *** empty log message ***
26409
26410 1993-04-28 Noah Friedman <friedman@gnu.org>
26411
26412 * src/reader.c: *** empty log message ***
26413
26414 1993-04-23 Noah Friedman <friedman@gnu.org>
26415
26416 * src/alloc.h: entered into RCS
26417
26418 1993-04-20 David J. MacKenzie <djm@gnu.org>
26419
26420 * src/version.c: *** empty log message ***
26421
26422 * src/files.c, src/allocate.c:
26423 entered into RCS
26424
26425 * src/reader.c: *** empty log message ***
26426
26427 * src/lex.c: entered into RCS
26428
26429 * src/conflicts.c: New file.
26430
26431 * src/symtab.c: entered into RCS
26432
26433 * src/alloc.h: New file.
26434
26435 * src/LR0.c: entered into RCS
26436
26437 1993-04-18 Noah Friedman <friedman@gnu.org>
26438
26439 * src/reader.c: New file.
26440
26441 * src/version.c: *** empty log message ***
26442
26443 1993-04-18 Noah Friedman <friedman@gnu.org>
26444
26445 * Makefile.in: *** empty log message ***
26446
26447 1993-04-17 Noah Friedman <friedman@gnu.org>
26448
26449 * Makefile.in: *** empty log message ***
26450
26451 1993-04-15 Richard Stallman <rms@gnu.org>
26452
26453 * src/main.c, src/files.c:
26454 New file.
26455
26456 1993-04-15 Noah Friedman <friedman@gnu.org>
26457
26458 * configure.in: entered into RCS
26459
26460 * configure.in: *** empty log message ***
26461
26462 * configure.in: New file.
26463
26464 1993-04-14 Richard Stallman <rms@gnu.org>
26465
26466 * Makefile.in: New file.
26467
26468 1993-04-13 Richard Stallman <rms@gnu.org>
26469
26470 * src/version.c: New file.
26471
26472 1993-03-25 Richard Stallman <rms@gnu.org>
26473
26474 * src/output.c: entered into RCS
26475
26476 1992-09-25 Richard Stallman <rms@gnu.org>
26477
26478 * configure.bat: entered into RCS
26479
26480 1992-06-22 Richard Stallman <rms@gnu.org>
26481
26482 * src/vmsgetargs.c: entered into RCS
26483
26484 1992-06-22 Richard Stallman <rms@gnu.org>
26485
26486 * doc/bison.rnh: entered into RCS
26487
26488 1992-04-20 David J. MacKenzie <djm@gnu.org>
26489
26490 * README: entered into RCS
26491
26492 1992-01-22 Richard Stallman <rms@gnu.org>
26493
26494 * src/machine.h: entered into RCS
26495
26496 1991-12-21 Richard Stallman <rms@gnu.org>
26497
26498 * src/lalr.c, src/closure.c:
26499 entered into RCS
26500
26501 1991-12-20 Richard Stallman <rms@gnu.org>
26502
26503 * src/state.h: entered into RCS
26504
26505 1991-12-18 Richard Stallman <rms@gnu.org>
26506
26507 * src/print.c, src/nullable.c, src/derives.c:
26508 entered into RCS
26509
26510 1991-11-03 David J. MacKenzie <djm@gnu.org>
26511
26512 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
26513 entered into RCS
26514
26515 1988-09-09 Richard Stallman <rms@gnu.org>
26516
26517 * src/bison.hairy: entered into RCS
26518
26519 1987-12-16 Richard Stallman <rms@gnu.org>
26520
26521 * REFERENCES: entered into RCS
26522
26523
26524 -----
26525
26526 Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
26527 Inc.
26528
26529 Copying and distribution of this file, with or without
26530 modification, are permitted provided the copyright notice and this
26531 notice are preserved.